1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 06:33:48 +00:00

Added remote wipe option when unlinking a device.

This commit is contained in:
Shuai Lin
2016-05-07 11:45:47 +08:00
committed by lian
parent 7514c587d5
commit 7dc7034de4
10 changed files with 93 additions and 13 deletions

View File

@@ -11,6 +11,9 @@ define([
'platform': this.get('platform'),
'device_id': this.get('device_id')
};
if (options.wipe_device) {
data['wipe_device'] = 'true';
}
$.ajax({
url: Common.getUrl({name: 'devices'}),

View File

@@ -73,9 +73,13 @@ define([
device_name = this.model.get('device_name');
var title = gettext('Unlink device');
var content = gettext('Are you sure you want to unlink this device?');
var extraOption = gettext('Delete files from this device the next time it comes online.');
var yesCallback = function () {
var yesCallback = function (wipe_device) {
console.log('wipe_device = ' + wipe_device);
_this.model.unlink({
wipe_device: wipe_device,
success: function() {
_this.remove();
@@ -92,7 +96,7 @@ define([
});
return false;
};
Common.showConfirm(title, content, yesCallback);
Common.showConfirmWithExtraOption(title, content, extraOption, yesCallback);
}
});