0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/core/admin/assets/js/views/debug.js
Jacob Gable 2b7d0f054d Import and Export UI
Added a basic UI and implementation for importing and exporting data.
Hooked up the routes and tested importing and exporting a version 001
file.

Slipped in the TemplateView in base.js but didn't end up using it.  I
think it will encapsulate common logic for template views pretty well.

Should close #175.
2013-06-23 16:06:57 -05:00

25 lines
No EOL
661 B
JavaScript

/*global jQuery, window, document, Ghost, Backbone, $, _, alert */
(function ($, _, Backbone, Ghost, undefined) {
"use strict";
Ghost.Views.Debug = Ghost.View.extend({
events: {
"click .settings-menu a": "handleMenuClick"
},
handleMenuClick: function (ev) {
ev.preventDefault();
var $target = $(ev.currentTarget);
// Hide the current content
this.$(".settings-content").hide();
// Show the clicked content
this.$("#debug-" + $target.attr("class")).show();
return false;
}
});
}(jQuery, _, Backbone, window.Ghost));