From 680ec056dc8c4fb84b8300967bcc12db2a57f225 Mon Sep 17 00:00:00 2001 From: Robin McCorkell Date: Thu, 12 Mar 2015 16:27:31 +0000 Subject: [PATCH] Implement priority on client side in hidden input --- apps/files_external/js/settings.js | 12 ++++++++++++ apps/files_external/templates/settings.php | 3 +++ 2 files changed, 15 insertions(+) diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index b3567b7ebf5..44488db4bc3 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -332,6 +332,13 @@ GlobalStorageConfig.prototype = _.extend({}, StorageConfig.prototype, */ applicableGroups: null, + /** + * Storage priority + * + * @type int + */ + priority: null, + /** * Returns the data from this object * @@ -342,6 +349,7 @@ GlobalStorageConfig.prototype = _.extend({}, StorageConfig.prototype, return _.extend(data, { applicableUsers: this.applicableUsers, applicableGroups: this.applicableGroups, + priority: this.priority, }); } }); @@ -546,6 +554,8 @@ MountConfigListView.prototype = { highlightInput(newElement); $td.append(newElement); }); + var priorityEl = $(''); + $tr.append(priorityEl); if (parameters['custom'] && $el.find('tbody tr.'+backendClass.replace(/\\/g, '\\\\')).length === 1) { OC.addScript('files_external', parameters['custom']); } @@ -627,6 +637,8 @@ MountConfigListView.prototype = { storage.applicableUsers = users; storage.applicableGroups = groups; + + storage.priority = $tr.find('input.priority').val(); } return storage; diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php index 5f7d7cff752..4c54d4069b2 100644 --- a/apps/files_external/templates/settings.php +++ b/apps/files_external/templates/settings.php @@ -90,6 +90,9 @@ print_unescaped(json_encode($mount['applicable']['users'])); ?>'> + + + class="remove" style="visibility:hidden;" -- 2.39.5