diff --git a/i18n/en-US.json b/i18n/en-US.json index 3cd5886..bafa738 100644 --- a/i18n/en-US.json +++ b/i18n/en-US.json @@ -169,6 +169,7 @@ "basicSectionTitle": "Basic Settings", "dragAndDrop": "To select a codec, drag and drop from the available codecs box to selected codecs box", "noOwner": "- No Owner -", + "saveAndApply": "Save and Apply", "options": { "menuTitle": "Options" }, diff --git a/submodules/devices/devices.js b/submodules/devices/devices.js index f9fdece..f22e6a7 100644 --- a/submodules/devices/devices.js +++ b/submodules/devices/devices.js @@ -581,13 +581,26 @@ define(function(require) { templateDevice.find('.feature-key-value:not(.active)').remove(); var $this = $(this), + hasToRestart = !!$this.data('extra'), dataToSave = self.devicesMergeData(data, templateDevice, audioCodecs, videoCodecs); + if ($this.hasClass('disabled')) { + return; + } + $this.prop('disabled', 'disabled'); self.devicesSaveDevice(dataToSave, function(data) { - popup.dialog('close').remove(); + if (hasToRestart) { + self.devicesRestart(data.id, function() { + monster.ui.toast({ + type: 'success', + message: self.i18n.active().devices.popupSettings.miscellaneous.restart.success + }); + }); + } + popup.dialog('close').remove(); callbackSave && callbackSave(data); }, function() { $this.prop('disabled', false); diff --git a/submodules/devices/devices.scss b/submodules/devices/devices.scss index 348a1e8..1635346 100644 --- a/submodules/devices/devices.scss +++ b/submodules/devices/devices.scss @@ -234,8 +234,19 @@ padding: 15px; } -.voip-edit-device-popup .edit-device .actions button { - margin-left: 10px; +.voip-edit-device-popup .edit-device .actions{ + button { + &.save { + font-size: 15px; + margin-left: 10px; + } + } + + a { + &.save.disabled { + color: $french-gray; + } + } } .voip-edit-device-popup .edit-device .title-bar { diff --git a/submodules/devices/views/devices-sip_device.html b/submodules/devices/views/devices-sip_device.html index a828255..6b19b0f 100644 --- a/submodules/devices/views/devices-sip_device.html +++ b/submodules/devices/views/devices-sip_device.html @@ -436,13 +436,26 @@