Move pin/unpin outside of userObject

This commit is contained in:
yflory
2018-07-10 18:23:16 +02:00
parent 66a494cbd2
commit 321c7d5512
5 changed files with 93 additions and 169 deletions

View File

@@ -46,7 +46,7 @@ define([
console.error.apply(console, arguments);
};
if (pinPads) {
if (config.outer) {
// Extend "exp" with methods used only outside of the iframe (requires access to store)
OuterFO.init(config, exp, files);
}
@@ -561,20 +561,20 @@ define([
// DELETE
// Permanently delete multiple files at once using a list of paths
// NOTE: We have to be careful when removing elements from arrays (trash root, unsorted or template)
exp.delete = function (paths, cb, nocheck, isOwnPadRemoved, noUnpin) {
exp.delete = function (paths, cb, nocheck, isOwnPadRemoved) {
if (sframeChan) {
return void sframeChan.query("Q_DRIVE_USEROBJECT", {
cmd: "delete",
data: {
paths: paths,
nocheck: nocheck,
noUnpin: noUnpin,
isOwnPadRemoved: isOwnPadRemoved
}
}, cb);
}
exp.deleteMultiplePermanently(paths, nocheck, isOwnPadRemoved, noUnpin);
if (typeof cb === "function") { cb(); }
cb = cb || function () {};
exp.deleteMultiplePermanently(paths, nocheck, isOwnPadRemoved, cb);
//if (typeof cb === "function") { cb(); }
};
exp.emptyTrash = function (cb) {
if (sframeChan) {