mirror of
https://github.com/nextcloud/server.git
synced 2026-05-15 01:49:53 -04:00
fix(files_external): check for changes when saving settings
Signed-off-by: Enjeck C <patrathewhiz@gmail.com>
This commit is contained in:
parent
c30e153aac
commit
f96eb98700
1 changed files with 8 additions and 3 deletions
|
|
@ -554,6 +554,8 @@ MountOptionsDropdown.prototype = {
|
|||
this.setOptions(mountOptions, visibleOptions, storage)
|
||||
|
||||
this.$el.appendTo($container)
|
||||
|
||||
this._initialOptions = JSON.stringify(this.getOptions())
|
||||
MountOptionsDropdown._last = this
|
||||
|
||||
this.$el.trigger('show')
|
||||
|
|
@ -1455,11 +1457,14 @@ MountConfigListView.prototype = _.extend({
|
|||
})
|
||||
|
||||
dropDown.$el.on('hide', function() {
|
||||
const mountOptions = dropDown.getOptions()
|
||||
const newOptions = dropDown.getOptions()
|
||||
const newOptionsStr = JSON.stringify(newOptions)
|
||||
$('body').off('mouseup.mountOptionsDropdown')
|
||||
$tr.find('input.mountOptions').val(JSON.stringify(mountOptions))
|
||||
$tr.find('td.mountOptionsToggle>.icon-more').attr('aria-expanded', 'false')
|
||||
self.saveStorageConfig($tr)
|
||||
if (dropDown._initialOptions !== newOptionsStr) {
|
||||
$tr.find('input.mountOptions').val(newOptionsStr)
|
||||
self.saveStorageConfig($tr)
|
||||
}
|
||||
})
|
||||
},
|
||||
}, OC.Backbone.Events)
|
||||
|
|
|
|||
Loading…
Reference in a new issue