mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-25 17:04:16 +00:00
feature(edit-names) add ability to edit file names in editor
This commit is contained in:
parent
ce92cddf0e
commit
6e7e99201e
7 changed files with 266 additions and 9 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue