Browse Source

UI-1887: Remove ability to delete Mobile devices in SmartPBX on device edition

4.3
Joris Tirado 10 years ago
parent
commit
cb569bdea6
2 changed files with 10 additions and 12 deletions
  1. +10
    -8
      submodules/devices/devices.js
  2. +0
    -4
      views/devices-mobile.html

+ 10
- 8
submodules/devices/devices.js View File

@ -394,19 +394,21 @@ define(function(require){
}
});
templateDevice.find('#delete_device').on('click', function() {
var deviceId = $(this).parents('.edit-device').data('id');
if (type !== 'mobile') {
templateDevice.find('#delete_device').on('click', function() {
var deviceId = $(this).parents('.edit-device').data('id');
monster.ui.confirm(self.i18n.active().devices.confirmDeleteDevice, function() {
self.devicesDeleteDevice(deviceId, function(device) {
popup.dialog('close').remove();
monster.ui.confirm(self.i18n.active().devices.confirmDeleteDevice, function() {
self.devicesDeleteDevice(deviceId, function(device) {
popup.dialog('close').remove();
toastr.success(monster.template(self, '!' + self.i18n.active().devices.deletedDevice, { deviceName: device.name }));
toastr.success(monster.template(self, '!' + self.i18n.active().devices.deletedDevice, { deviceName: device.name }));
callbackDelete && callbackDelete(device);
callbackDelete && callbackDelete(device);
});
});
});
});
}
templateDevice.find('.actions .cancel-link').on('click', function() {
popup.dialog('close').remove();


+ 0
- 4
views/devices-mobile.html View File

@ -193,10 +193,6 @@
</div>
<div class="actions clearfix">
{{#if id}}
<a id="delete_device" class="monster-link"><i class="fa fa-trash-o monster-red"></i>{{ i18n.devices.deleteDevice }}</a>
{{/if}}
<div class="pull-right">
<a class="cancel-link monster-link blue" href="javascript:void(0);">{{ i18n.cancel }}</a>
<button type="button" class="monster-button monster-button-success save">


Loading…
Cancel
Save