mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
filePicker gets key from modules.json
This commit is contained in:
parent
d1ef8b723e
commit
df831c32e7
2 changed files with 14 additions and 7 deletions
|
|
@ -54,6 +54,8 @@ getJSONfromFileTable.
|
|||
|
||||
* Removed init property from view and edit.
|
||||
|
||||
* FilePicker gets key from modules.json.
|
||||
|
||||
|
||||
2012.04.22, v0.2.0
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
var CloudCmd, Util, DOM, $, filepicker;
|
||||
/* module for work with filepicker */
|
||||
|
||||
(function(CloudCmd, Util, DOM){
|
||||
'use strict';
|
||||
|
|
@ -43,14 +42,20 @@ var CloudCmd, Util, DOM, $, filepicker;
|
|||
|
||||
function load(pCallBack){
|
||||
console.time('filepicker load');
|
||||
var lHTTP = "https:"===document.location.protocol? "https:" : "http:";
|
||||
var lHTTP = document.location.protocol;
|
||||
|
||||
DOM.jsload(lHTTP + '//api.filepicker.io/v1/filepicker.js', function(){
|
||||
filepicker.setKey('AACq5fTfzRY2E_Rw_4kyaz');
|
||||
DOM.Images.hideLoad();
|
||||
console.timeEnd('filepicker loaded');
|
||||
Util.exec(pCallBack);
|
||||
});
|
||||
CloudCmd.getModules(function(pModules){
|
||||
var lStorage = Util.findObjByNameInArr(pModules, 'storage'),
|
||||
lFilePicker = Util.findObjByNameInArr(lStorage, 'FilePicker'),
|
||||
lKey = lFilePicker && lFilePicker.key;
|
||||
|
||||
filepicker.setKey(lKey);
|
||||
DOM.Images.hideLoad();
|
||||
console.timeEnd('filepicker loaded');
|
||||
Util.exec(pCallBack);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue