Skip to content

Commit

Permalink
Merge pull request #18437 from owncloud/ext-auth-trigger
Browse files Browse the repository at this point in the history
Trigger storage recheck on auth mechanism change
  • Loading branch information
Vincent Petry committed Aug 20, 2015
2 parents 06d8edd + dc335ba commit 28e5859
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions apps/files_external/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,7 @@ MountConfigListView.prototype = {
var $tr = $target.closest('tr');
$el.find('tbody').append($tr.clone());
$el.find('tbody tr').last().find('.mountPoint input').val('');
$tr.data('constructing', true);
var selected = $target.find('option:selected').text();
var backend = $target.val();
$tr.find('.backend').text(selected);
Expand Down Expand Up @@ -739,6 +740,9 @@ MountConfigListView.prototype = {
$tr.removeAttr('id');
$target.remove();
addSelect2($tr.find('.applicableUsers'), this._userListLimit);

$tr.removeData('constructing');
this.saveStorageConfig($tr);
},

_onSelectAuthMechanism: function(event) {
Expand All @@ -753,6 +757,11 @@ MountConfigListView.prototype = {
$.each(authMechanismConfiguration['configuration'], _.partial(
this.writeParameterInput, $td, _, _, ['auth-param']
));

if ($tr.data('constructing') !== true) {
// row is ready, trigger recheck
this.saveStorageConfig($tr);
}
},

writeParameterInput: function($td, parameter, placeholder, classes) {
Expand Down

0 comments on commit 28e5859

Please sign in to comment.