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:
@@ -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'}),
|
||||
|
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user