feature(edit-names) add ability to edit file names in editor

This commit is contained in:
coderaiser 2016-12-29 13:08:28 +02:00
parent ce92cddf0e
commit 6e7e99201e
7 changed files with 266 additions and 9 deletions

View file

@ -1,3 +1,5 @@
/* global itype */
var CloudCmd, Util, DOM, CloudFunc;
(function(CloudCmd, Util, DOM) {
@ -26,6 +28,13 @@ var CloudCmd, Util, DOM, CloudFunc;
}
};
var Edit = function(fn) {
if (!itype.function(fn))
return;
fn();
};
function init(callback) {
var element = createElement();
@ -79,22 +88,22 @@ var CloudCmd, Util, DOM, CloudFunc;
return config;
}
this.show = function(options) {
Edit.show = function(options) {
if (Loading)
return;
CloudCmd.View.show(Element, initConfig(options));
};
this.getEditor = function() {
Edit.getEditor = function() {
return editor;
};
this.getElement = function() {
Edit.getElement = function() {
return Element;
};
this.hide = function() {
Edit.hide = function() {
CloudCmd.View.hide();
};
@ -135,6 +144,8 @@ var CloudCmd, Util, DOM, CloudFunc;
}
init(callback);
return Edit;
}
})(CloudCmd, Util, DOM, CloudFunc);