From 260db747fc6af518056c7d433da763c0478c8c70 Mon Sep 17 00:00:00 2001 From: Tom Needham Date: Thu, 27 Aug 2015 22:42:12 +0200 Subject: Remove autosave WIP and fix reopen editor --- js/editor.js | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'js') diff --git a/js/editor.js b/js/editor.js index 6a54ae0..4f4faa5 100644 --- a/js/editor.js +++ b/js/editor.js @@ -123,7 +123,8 @@ var Files_Texteditor = { */ _onReOpenTrigger: function() { if($('#notification').data('reopeneditor') == true) { - alert('todo'); // TODO + document.title = OCA.Files_Texteditor.file.name + ' - ' + document.title; + OCA.Files_Texteditor.$container.show(); } }, @@ -262,7 +263,6 @@ var Files_Texteditor = { _self.configureACE(file); // Show the controls _self.loadControlBar(file, _self.currentContext); - //window.aceEditor.getSession().on('change', _self.setupAutosave); window.aceEditor.focus(); }, function(message){ @@ -509,25 +509,9 @@ var Files_Texteditor = { */ hideEditor: function() { this.$container.hide(); - this.unloadControlBar(); document.title = this.oldTitle; }, - /** - * Re opens the editor - */ - reOpenEditor: function() { - this.$container.show(); - } - - /** - * Configure the autosave timer - */ - //setupAutosave: function() { - // clearTimeout(this.saveTimer); - // this.saveTimer = setTimeout(OCA.Files_Texteditor._onSaveTrigger, 3000); - //} - } OCA.Files_Texteditor = Files_Texteditor; -- cgit v1.2.3