diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-10-30 20:45:47 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-10-30 20:46:53 +0100 |
commit | 9d230bcc75185e855d28656ab898ff05c15bebc8 (patch) | |
tree | 979d5ad4071aa1a3d493941839e7370e366d8831 /settings/js | |
parent | ca4a1ee5f7e223b521e41784b0d9b7ed2af162af (diff) | |
download | nextcloud-server-9d230bcc75185e855d28656ab898ff05c15bebc8.tar.gz nextcloud-server-9d230bcc75185e855d28656ab898ff05c15bebc8.zip |
Improve quota input field
- Added tooltip with examples
- The quota value returned by the server is now displayed after update
- Fixes #5346
Diffstat (limited to 'settings/js')
-rw-r--r-- | settings/js/users.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/settings/js/users.js b/settings/js/users.js index 4c2ad5417ca..6222c0e70cd 100644 --- a/settings/js/users.js +++ b/settings/js/users.js @@ -147,7 +147,11 @@ var UserList = { quotaSelect.on('change', function () { var uid = $(this).parent().parent().attr('data-uid'); var quota = $(this).val(); - setQuota(uid, quota); + setQuota(uid, quota, function(returnedQuota){ + if (quota !== returnedQuota) { + $(quotaSelect).find(':selected').text(returnedQuota); + } + }); }); }, // From http://my.opera.com/GreyWyvern/blog/show.dml/1671288 @@ -428,9 +432,14 @@ $(document).ready(function () { }); $('select.quota, select.quota-user').singleSelect().on('change', function () { + var select = $(this); var uid = $(this).parent().parent().attr('data-uid'); var quota = $(this).val(); - setQuota(uid, quota); + setQuota(uid, quota, function(returnedQuota){ + if (quota !== returnedQuota) { + select.find(':selected').text(returnedQuota); + } + }); }); $('#newuser').submit(function (event) { |