mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
2b7d0f054d
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.
25 lines
No EOL
661 B
JavaScript
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)); |