From 22e3e6c50c0b3db84b3238951421e3d787e5ab47 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 22 Jan 2015 10:34:41 -0500 Subject: [PATCH] feature(edit) rm setValueFirst, goToLine --- lib/client/edit.js | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/lib/client/edit.js b/lib/client/edit.js index 0ee2673b..77725986 100644 --- a/lib/client/edit.js +++ b/lib/client/edit.js @@ -80,7 +80,7 @@ var CloudCmd, Util, DOM, CloudFunc, MenuIO, edward; if (error) { alert(error); } else { - Edit.setValueFirst(path, data); + edward.setValueFirst(path, data); CloudCmd.View.show(Element, ConfigView); } }); @@ -88,18 +88,10 @@ var CloudCmd, Util, DOM, CloudFunc, MenuIO, edward; return this; }; - this.setValueFirst = function(path, value) { - edward.setValueFirst(path, value); - }; - this.hide = function() { CloudCmd.View.hide(); }; - this.goToLine = function() { - edward.goToLine(); - }; - this.create = function(element) { Element = element; @@ -188,10 +180,10 @@ var CloudCmd, Util, DOM, CloudFunc, MenuIO, edward; }, menuData = { 'Save Ctrl+S' : function() { - CloudCmd.Edit.save(); + edward.save(); }, 'Go To Line Ctrl+G' : function() { - CloudCmd.Edit.goToLine(); + edward.goToLine(); }, 'Select All Ctrl+A' : function() { edward.selectAll(); @@ -200,12 +192,14 @@ var CloudCmd, Util, DOM, CloudFunc, MenuIO, edward; edward.remove('right'); }, 'Beautify Ctrl+B' : function() { - CloudCmd.Edit.beautify(); + edward.beautify(); }, 'Minify Ctrl+M' : function() { - CloudCmd.Edit.minify(); + edward.minify(); }, - 'Close Esc' : CloudCmd.Edit.hide + 'Close Esc' : function() { + Edit.hide(); + } }; if (error) {