mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
feature(client) add getType
This commit is contained in:
parent
2b35b44291
commit
0b77463f64
1 changed files with 15 additions and 0 deletions
|
|
@ -2083,6 +2083,21 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
|
||||
return lRet;
|
||||
};
|
||||
|
||||
this.getType = function(name, callback) {
|
||||
CloudCmd.getExt(function(extensions) {
|
||||
var str, index,
|
||||
ext = Util.getExtension(name);
|
||||
ext = extensions[ext];
|
||||
|
||||
if (ext) {
|
||||
index = ext.indexOf('/') + 1;
|
||||
ext = ext.substr(index);
|
||||
}
|
||||
|
||||
Util.exec(callback, ext);
|
||||
});
|
||||
};
|
||||
},
|
||||
|
||||
DOMTree = Util.extendProto(DOMTreeProto),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue