Merge filepicker and share iframes
This commit is contained in:
1 parent
4672bf794b
commit
894a355f0a
18 files changed
+213
-490
No files matched your search
@@ -941,8 +941,16 @@ define([
|
||||
if (ifr) { ifr.remove(); }
|
||||
};
|
||||
|
||||
common.initFilePicker({
|
||||
onSelect: function (data) {
|
||||
APP.AddImage = function(cb1, cb2) {
|
||||
APP.AddImageSuccessCallback = cb1;
|
||||
APP.AddImageErrorCallback = cb2;
|
||||
common.openFilePicker({
|
||||
types: ['file'],
|
||||
where: ['root'],
|
||||
filter: {
|
||||
fileType: ['image/']
|
||||
}
|
||||
}, function (data) {
|
||||
if (data.type !== 'file') {
|
||||
debug("Unexpected data type picked " + data.type);
|
||||
return;
|
||||
@@ -963,19 +971,6 @@ define([
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
APP.AddImage = function(cb1, cb2) {
|
||||
APP.AddImageSuccessCallback = cb1;
|
||||
APP.AddImageErrorCallback = cb2;
|
||||
common.openFilePicker({
|
||||
types: ['file'],
|
||||
where: ['root'],
|
||||
filter: {
|
||||
fileType: ['image/']
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user