|
@@ -12,6 +12,7 @@ $(document).ready(function() {
|
|
|
var $exampleCancel = $('#add-example-cancel');
|
|
var $exampleCancel = $('#add-example-cancel');
|
|
|
var $saveChanges = $('#save-changes');
|
|
var $saveChanges = $('#save-changes');
|
|
|
var $notification = $('#notification');
|
|
var $notification = $('#notification');
|
|
|
|
|
+ var $revertEditor = $('#revert-editor');
|
|
|
var $panelLeft = $('.panel-left');
|
|
var $panelLeft = $('.panel-left');
|
|
|
var $panelRight = $('.panel-right');
|
|
var $panelRight = $('.panel-right');
|
|
|
var $window = $(window);
|
|
var $window = $(window);
|
|
@@ -232,6 +233,10 @@ $(document).ready(function() {
|
|
|
toggleEditor();
|
|
toggleEditor();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ function revertEditor() {
|
|
|
|
|
+ editorStorage.reset();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
function saveChanges() {
|
|
function saveChanges() {
|
|
|
var payload = editorStorage.getSources();
|
|
var payload = editorStorage.getSources();
|
|
|
|
|
|
|
@@ -260,5 +265,6 @@ $(document).ready(function() {
|
|
|
$exampleCancel.click(clearAndCloseEditor);
|
|
$exampleCancel.click(clearAndCloseEditor);
|
|
|
$saveChanges.click(saveChanges);
|
|
$saveChanges.click(saveChanges);
|
|
|
$exampleForm.submit(saveExample);
|
|
$exampleForm.submit(saveExample);
|
|
|
|
|
+ $revertEditor.click(revertEditor);
|
|
|
loadExampleList();
|
|
loadExampleList();
|
|
|
});
|
|
});
|