|
|
@ -28,6 +28,7 @@ define([
|
|
|
|
Messages)
|
|
|
|
Messages)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var APP = {};
|
|
|
|
var APP = {};
|
|
|
|
|
|
|
|
var driveAPP = {};
|
|
|
|
var SHARED_FOLDER_NAME = Messages.fm_sharedFolderName;
|
|
|
|
var SHARED_FOLDER_NAME = Messages.fm_sharedFolderName;
|
|
|
|
|
|
|
|
|
|
|
|
var copyObjectValue = function (objRef, objToCopy) {
|
|
|
|
var copyObjectValue = function (objRef, objToCopy) {
|
|
|
@ -58,26 +59,155 @@ define([
|
|
|
|
var updateObject = function (sframeChan, obj, cb) {
|
|
|
|
var updateObject = function (sframeChan, obj, cb) {
|
|
|
|
sframeChan.query('Q_DRIVE_GETOBJECT', null, function (err, newObj) {
|
|
|
|
sframeChan.query('Q_DRIVE_GETOBJECT', null, function (err, newObj) {
|
|
|
|
copyObjectValue(obj, newObj);
|
|
|
|
copyObjectValue(obj, newObj);
|
|
|
|
if (!APP.loggedIn && APP.newSharedFolder) {
|
|
|
|
if (!driveAPP.loggedIn && driveAPP.newSharedFolder) {
|
|
|
|
obj.drive.sharedFolders = obj.drive.sharedFolders || {};
|
|
|
|
obj.drive.sharedFolders = obj.drive.sharedFolders || {};
|
|
|
|
obj.drive.sharedFolders[APP.newSharedFolder] = {};
|
|
|
|
obj.drive.sharedFolders[driveAPP.newSharedFolder] = {};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cb();
|
|
|
|
cb();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var history = {
|
|
|
|
var setEditable = DriveUI.setEditable;
|
|
|
|
isHistoryMode: false,
|
|
|
|
|
|
|
|
|
|
|
|
var mainCategories = {
|
|
|
|
|
|
|
|
'general': [
|
|
|
|
|
|
|
|
'cp-team-info',
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
'list': [
|
|
|
|
|
|
|
|
'cp-team-list',
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
'create': [
|
|
|
|
|
|
|
|
'cp-team-create',
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
var teamCategories = {
|
|
|
|
|
|
|
|
'back': [
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
'drive': [
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
'members': [
|
|
|
|
|
|
|
|
],
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var setEditable = DriveUI.setEditable;
|
|
|
|
var create = {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var makeBlock = function (key, getter) {
|
|
|
|
|
|
|
|
create[key] = function (common) {
|
|
|
|
|
|
|
|
var $div = $('<div>', {'class': 'cp-team-' + key + ' cp-sidebarlayout-element'});
|
|
|
|
|
|
|
|
getter(common, function (content) {
|
|
|
|
|
|
|
|
$div.append(content);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return $div;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
makeBlock('info', function (common, cb) {
|
|
|
|
|
|
|
|
cb([
|
|
|
|
|
|
|
|
h('h3', 'Team application'), // XXX
|
|
|
|
|
|
|
|
h('p', 'From here you can ...') // XXX
|
|
|
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
makeBlock('list', function (common, cb) {
|
|
|
|
|
|
|
|
var content = [];
|
|
|
|
|
|
|
|
var sframeChan = common.getSframeChannel();
|
|
|
|
|
|
|
|
APP.module.execCommand('LIST_TEAMS', null, function (obj) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Sidebar layout
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var hideCategories = function () {
|
|
|
|
|
|
|
|
APP.$rightside.find('> div').hide();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
var showCategories = function (cat) {
|
|
|
|
|
|
|
|
hideCategories();
|
|
|
|
|
|
|
|
cat.forEach(function (c) {
|
|
|
|
|
|
|
|
APP.$rightside.find('.'+c).show();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
var createLeftside = function (team) {
|
|
|
|
|
|
|
|
APP.$leftside.empty();
|
|
|
|
|
|
|
|
var $categories = $('<div>', {'class': 'cp-sidebarlayout-categories'})
|
|
|
|
|
|
|
|
.appendTo(APP.$leftside);
|
|
|
|
|
|
|
|
|
|
|
|
var setHistory = function (bool, update) {
|
|
|
|
var categories = team ? teamCategories : mainCategories;
|
|
|
|
history.isHistoryMode = bool;
|
|
|
|
var active = team ? 'drive' : 'general';
|
|
|
|
setEditable(!bool);
|
|
|
|
|
|
|
|
if (!bool && update) {
|
|
|
|
Object.keys(categories).forEach(function (key) {
|
|
|
|
history.onLeaveHistory();
|
|
|
|
var $category = $('<div>', {'class': 'cp-sidebarlayout-category'}).appendTo($categories);
|
|
|
|
|
|
|
|
if (key === 'general') { $category.append($('<span>', {'class': 'fa fa-info-circle'})); }
|
|
|
|
|
|
|
|
if (key === 'list') { $category.append($('<span>', {'class': 'fa fa-list'})); }
|
|
|
|
|
|
|
|
if (key === 'create') { $category.append($('<span>', {'class': 'fa fa-plus-circle'})); }
|
|
|
|
|
|
|
|
if (key === 'back') { $category.append($('<span>', {'class': 'fa fa-arrow-left'})); }
|
|
|
|
|
|
|
|
if (key === 'members') { $category.append($('<span>', {'class': 'fa fa-users'})); }
|
|
|
|
|
|
|
|
if (key === 'drive') { $category.append($('<span>', {'class': 'fa fa-hdd-o'})); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (key === active) {
|
|
|
|
|
|
|
|
$category.addClass('cp-leftside-active');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$category.click(function () {
|
|
|
|
|
|
|
|
if (!Array.isArray(categories[key]) && categories[key].onClick) {
|
|
|
|
|
|
|
|
categories[key].onClick();
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$categories.find('.cp-leftside-active').removeClass('cp-leftside-active');
|
|
|
|
|
|
|
|
$category.addClass('cp-leftside-active');
|
|
|
|
|
|
|
|
showCategories(categories[key]);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$category.append(Messages['team_cat_'+key] || key); // XXX
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
showCategories(categories[active]);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var buildUI = function (common, team) {
|
|
|
|
|
|
|
|
var $rightside = APP.$rightside;
|
|
|
|
|
|
|
|
$rightside.empty();
|
|
|
|
|
|
|
|
var addItem = function (cssClass) {
|
|
|
|
|
|
|
|
var item = cssClass.slice(8);
|
|
|
|
|
|
|
|
if (typeof (create[item]) === "function") {
|
|
|
|
|
|
|
|
$rightside.append(create[item](common));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
var categories = team ? teamCategories : mainCategories;
|
|
|
|
|
|
|
|
for (var cat in categories) {
|
|
|
|
|
|
|
|
if (!Array.isArray(categories[cat])) { continue; }
|
|
|
|
|
|
|
|
categories[cat].forEach(addItem);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
createLeftside(team);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Team APP
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var loadTeam = function (common) {
|
|
|
|
|
|
|
|
var sframeChan = common.getSframeChannel();
|
|
|
|
|
|
|
|
nThen(function (waitFor) {
|
|
|
|
|
|
|
|
updateObject(sframeChan, proxy, waitFor(function () {
|
|
|
|
|
|
|
|
updateSharedFolders(sframeChan, null, proxy.drive, folders, waitFor());
|
|
|
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
}).nThen(function (waitFor) {
|
|
|
|
|
|
|
|
if (!proxy.drive || typeof(proxy.drive) !== 'object') {
|
|
|
|
|
|
|
|
throw new Error("Corrupted drive");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var drive = DriveUI.create(common, {
|
|
|
|
|
|
|
|
proxy: proxy,
|
|
|
|
|
|
|
|
folders: folders,
|
|
|
|
|
|
|
|
updateObject: updateObject,
|
|
|
|
|
|
|
|
updateSharedFolders: updateSharedFolders,
|
|
|
|
|
|
|
|
APP: driveAPP
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
driveAPP.refresh = drive.refresh;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
buildUI(common, true);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var loadMain = function (common) {
|
|
|
|
|
|
|
|
buildUI(common);
|
|
|
|
|
|
|
|
UI.removeLoadingScreen();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var main = function () {
|
|
|
|
var main = function () {
|
|
|
@ -91,151 +221,86 @@ define([
|
|
|
|
UI.addLoadingScreen();
|
|
|
|
UI.addLoadingScreen();
|
|
|
|
}));
|
|
|
|
}));
|
|
|
|
window.cryptpadStore.getAll(waitFor(function (val) {
|
|
|
|
window.cryptpadStore.getAll(waitFor(function (val) {
|
|
|
|
APP.store = JSON.parse(JSON.stringify(val));
|
|
|
|
driveAPP.store = JSON.parse(JSON.stringify(val));
|
|
|
|
}));
|
|
|
|
}));
|
|
|
|
SFCommon.create(waitFor(function (c) { common = c; }));
|
|
|
|
SFCommon.create(waitFor(function (c) { common = c; }));
|
|
|
|
}).nThen(function (waitFor) {
|
|
|
|
}).nThen(function (waitFor) {
|
|
|
|
var privReady = Util.once(waitFor());
|
|
|
|
APP.$container = $('#cp-sidebarlayout-container');
|
|
|
|
var metadataMgr = common.getMetadataMgr();
|
|
|
|
APP.$leftside = $('<div>', {id: 'cp-sidebarlayout-leftside'}).appendTo(APP.$container);
|
|
|
|
if (JSON.stringify(metadataMgr.getPrivateData()) !== '{}') {
|
|
|
|
APP.$rightside = $('<div>', {id: 'cp-sidebarlayout-rightside'}).appendTo(APP.$container);
|
|
|
|
privReady();
|
|
|
|
sFrameChan = common.getSframeChannel();
|
|
|
|
return;
|
|
|
|
sFrameChan.onReady(waitFor());
|
|
|
|
}
|
|
|
|
|
|
|
|
metadataMgr.onChange(function () {
|
|
|
|
|
|
|
|
if (typeof(metadataMgr.getPrivateData().readOnly) === 'boolean') {
|
|
|
|
|
|
|
|
readOnly = APP.readOnly = metadataMgr.getPrivateData().readOnly;
|
|
|
|
|
|
|
|
privReady();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}).nThen(function (waitFor) {
|
|
|
|
}).nThen(function (waitFor) {
|
|
|
|
APP.loggedIn = common.isLoggedIn();
|
|
|
|
var sframeChan = common.getSframeChannel();
|
|
|
|
if (!APP.loggedIn) { Feedback.send('ANONYMOUS_DRIVE'); }
|
|
|
|
|
|
|
|
APP.$body = $('body');
|
|
|
|
|
|
|
|
APP.$bar = $('#cp-toolbar');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common.setTabTitle(Messages.type.drive);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var metadataMgr = common.getMetadataMgr();
|
|
|
|
var metadataMgr = common.getMetadataMgr();
|
|
|
|
var privateData = metadataMgr.getPrivateData();
|
|
|
|
var privateData = metadataMgr.getPrivateData();
|
|
|
|
if (privateData.newSharedFolder) {
|
|
|
|
readOnly = driveAPP.readOnly = metadataMgr.getPrivateData().readOnly;
|
|
|
|
APP.newSharedFolder = privateData.newSharedFolder;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var sframeChan = common.getSframeChannel();
|
|
|
|
driveAPP.loggedIn = common.isLoggedIn();
|
|
|
|
updateObject(sframeChan, proxy, waitFor(function () {
|
|
|
|
if (!driveAPP.loggedIn) { throw new Error('NOT_LOGGED_IN'); }
|
|
|
|
updateSharedFolders(sframeChan, null, proxy.drive, folders, waitFor());
|
|
|
|
|
|
|
|
}));
|
|
|
|
common.setTabTitle('TEAMS'); // XXX
|
|
|
|
}).nThen(function () {
|
|
|
|
|
|
|
|
var sframeChan = common.getSframeChannel();
|
|
|
|
// Drive data
|
|
|
|
var metadataMgr = common.getMetadataMgr();
|
|
|
|
var metadataMgr = common.getMetadataMgr();
|
|
|
|
var privateData = metadataMgr.getPrivateData();
|
|
|
|
var privateData = metadataMgr.getPrivateData();
|
|
|
|
|
|
|
|
if (privateData.newSharedFolder) {
|
|
|
|
APP.disableSF = !privateData.enableSF && AppConfig.disableSharedFolders;
|
|
|
|
driveAPP.newSharedFolder = privateData.newSharedFolder;
|
|
|
|
if (APP.newSharedFolder && !APP.loggedIn) {
|
|
|
|
|
|
|
|
readOnly = APP.readOnly = true;
|
|
|
|
|
|
|
|
var data = folders[APP.newSharedFolder];
|
|
|
|
|
|
|
|
if (data) {
|
|
|
|
|
|
|
|
sframeChan.query('Q_SET_PAD_TITLE_IN_DRIVE', {
|
|
|
|
|
|
|
|
title: data.metadata && data.metadata.title,
|
|
|
|
|
|
|
|
}, function () {});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
driveAPP.disableSF = !privateData.enableSF && AppConfig.disableSharedFolders;
|
|
|
|
|
|
|
|
|
|
|
|
// ANON_SHARED_FOLDER
|
|
|
|
// Toolbar
|
|
|
|
var pageTitle = (!APP.loggedIn && APP.newSharedFolder) ? SHARED_FOLDER_NAME : Messages.type.drive;
|
|
|
|
var $bar = $('#cp-toolbar');
|
|
|
|
|
|
|
|
|
|
|
|
var configTb = {
|
|
|
|
var configTb = {
|
|
|
|
displayed: ['useradmin', 'pageTitle', 'newpad', 'limit', 'notifications'],
|
|
|
|
displayed: ['useradmin', 'pageTitle', 'newpad', 'limit', 'notifications'],
|
|
|
|
pageTitle: pageTitle,
|
|
|
|
pageTitle: 'TEAMS', // XXX
|
|
|
|
metadataMgr: metadataMgr,
|
|
|
|
metadataMgr: metadataMgr,
|
|
|
|
readOnly: privateData.readOnly,
|
|
|
|
readOnly: privateData.readOnly,
|
|
|
|
sfCommon: common,
|
|
|
|
sfCommon: common,
|
|
|
|
$container: APP.$bar
|
|
|
|
$container: $bar
|
|
|
|
};
|
|
|
|
};
|
|
|
|
var toolbar = APP.toolbar = Toolbar.create(configTb);
|
|
|
|
var toolbar = Toolbar.create(configTb);
|
|
|
|
|
|
|
|
toolbar.$rightside.hide(); // hide the bottom part of the toolbar
|
|
|
|
var $rightside = toolbar.$rightside;
|
|
|
|
// Update the name in the user menu
|
|
|
|
$rightside.html(''); // Remove the drawer if we don't use it to hide the toolbar
|
|
|
|
driveAPP.$displayName = $bar.find('.' + Toolbar.constants.username);
|
|
|
|
APP.$displayName = APP.$bar.find('.' + Toolbar.constants.username);
|
|
|
|
metadataMgr.onChange(function () {
|
|
|
|
|
|
|
|
var name = metadataMgr.getUserData().name || Messages.anonymous;
|
|
|
|
|
|
|
|
driveAPP.$displayName.text(name);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
/* add the usage */
|
|
|
|
/* add the usage */
|
|
|
|
if (APP.loggedIn) {
|
|
|
|
// XXX Teams
|
|
|
|
|
|
|
|
if (false) {
|
|
|
|
|
|
|
|
// Synchronous callback...
|
|
|
|
common.createUsageBar(function (err, $limitContainer) {
|
|
|
|
common.createUsageBar(function (err, $limitContainer) {
|
|
|
|
if (err) { return void DriveUI.logError(err); }
|
|
|
|
if (err) { return void DriveUI.logError(err); }
|
|
|
|
APP.$limit = $limitContainer;
|
|
|
|
driveAPP.$limit = $limitContainer;
|
|
|
|
}, true);
|
|
|
|
}, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* add a history button */
|
|
|
|
// Load the Team module
|
|
|
|
APP.histConfig = {
|
|
|
|
APP.module = common.makeUniversal('team', {
|
|
|
|
onLocal: function () {
|
|
|
|
onEvent: onEvent
|
|
|
|
UI.addLoadingScreen({ loadingText: Messages.fm_restoreDrive });
|
|
|
|
|
|
|
|
var data = {};
|
|
|
|
|
|
|
|
if (history.sfId) {
|
|
|
|
|
|
|
|
copyObjectValue(folders[history.sfId], history.currentObj);
|
|
|
|
|
|
|
|
data.sfId = history.sfId;
|
|
|
|
|
|
|
|
data.drive = history.currentObj;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
proxy.drive = history.currentObj.drive;
|
|
|
|
|
|
|
|
data.drive = history.currentObj.drive;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
sframeChan.query("Q_DRIVE_RESTORE", data, function () {
|
|
|
|
|
|
|
|
UI.removeLoadingScreen();
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
timeout: 5 * 60 * 1000
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
onOpen: function () {},
|
|
|
|
|
|
|
|
onRemote: function () {},
|
|
|
|
|
|
|
|
setHistory: setHistory,
|
|
|
|
|
|
|
|
applyVal: function (val) {
|
|
|
|
|
|
|
|
var obj = JSON.parse(val || '{}');
|
|
|
|
|
|
|
|
history.currentObj = obj;
|
|
|
|
|
|
|
|
history.onEnterHistory(obj);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
$toolbar: APP.$bar,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Add a "Burn this drive" button
|
|
|
|
|
|
|
|
if (!APP.loggedIn) {
|
|
|
|
|
|
|
|
APP.$burnThisDrive = common.createButton(null, true).click(function () {
|
|
|
|
|
|
|
|
UI.confirm(Messages.fm_burnThisDrive, function (yes) {
|
|
|
|
|
|
|
|
if (!yes) { return; }
|
|
|
|
|
|
|
|
common.getSframeChannel().event('EV_BURN_ANON_DRIVE');
|
|
|
|
|
|
|
|
}, null, true);
|
|
|
|
|
|
|
|
}).attr('title', Messages.fm_burnThisDriveButton)
|
|
|
|
|
|
|
|
.removeClass('fa-question')
|
|
|
|
|
|
|
|
.addClass('fa-ban');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
metadataMgr.onChange(function () {
|
|
|
|
|
|
|
|
var name = metadataMgr.getUserData().name || Messages.anonymous;
|
|
|
|
|
|
|
|
APP.$displayName.text(name);
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$('body').css('display', '');
|
|
|
|
$('body').css('display', '');
|
|
|
|
if (!proxy.drive || typeof(proxy.drive) !== 'object') {
|
|
|
|
if (privateData.teamId) {
|
|
|
|
throw new Error("Corrupted drive");
|
|
|
|
loadTeam(common, privateData.teamId);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
loadMain(common);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
DriveUI.create(common, {
|
|
|
|
|
|
|
|
proxy: proxy,
|
|
|
|
|
|
|
|
folders: folders,
|
|
|
|
|
|
|
|
updateObject: updateObject,
|
|
|
|
|
|
|
|
updateSharedFolders: updateSharedFolders,
|
|
|
|
|
|
|
|
history: history,
|
|
|
|
|
|
|
|
APP: APP
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var onDisconnect = function (noAlert) {
|
|
|
|
var onDisconnect = function (noAlert) {
|
|
|
|
setEditable(false);
|
|
|
|
setEditable(false);
|
|
|
|
if (APP.refresh) { APP.refresh(); }
|
|
|
|
if (driveAPP.refresh) { driveAPP.refresh(); }
|
|
|
|
APP.toolbar.failed();
|
|
|
|
toolbar.failed();
|
|
|
|
if (!noAlert) { UI.alert(Messages.common_connectionLost, undefined, true); }
|
|
|
|
if (!noAlert) { UI.alert(Messages.common_connectionLost, undefined, true); }
|
|
|
|
};
|
|
|
|
};
|
|
|
|
var onReconnect = function (info) {
|
|
|
|
var onReconnect = function (info) {
|
|
|
|
setEditable(true);
|
|
|
|
setEditable(true);
|
|
|
|
if (APP.refresh) { APP.refresh(); }
|
|
|
|
if (driveAPP.refresh) { driveAPP.refresh(); }
|
|
|
|
APP.toolbar.reconnecting(info.myId);
|
|
|
|
toolbar.reconnecting(info.myId);
|
|
|
|
UI.findOKButton().click();
|
|
|
|
UI.findOKButton().click();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|