summaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-04-10 14:12:54 +0200
committerRobin Appelman <icewind@owncloud.com>2013-04-10 14:12:54 +0200
commit1abc264873cf9eb4312f5a9554ae2782955dd07c (patch)
tree99e28857d4e59d67c7312e9706f8f938bb94710b /settings/js
parent48dabd2c145be296b575fe1ff47b800fc31e06ee (diff)
downloadnextcloud-server-1abc264873cf9eb4312f5a9554ae2782955dd07c.tar.gz
nextcloud-server-1abc264873cf9eb4312f5a9554ae2782955dd07c.zip
Add the quota change listeners to newly added user entries in the user list
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/users.js31
1 files changed, 19 insertions, 12 deletions
diff --git a/settings/js/users.js b/settings/js/users.js
index b92feb52334..4a358a4392d 100644
--- a/settings/js/users.js
+++ b/settings/js/users.js
@@ -4,6 +4,18 @@
* See the COPYING-README file.
*/
+function setQuota (uid, quota, ready) {
+ $.post(
+ OC.filePath('settings', 'ajax', 'setquota.php'),
+ {username: uid, quota: quota},
+ function (result) {
+ if (ready) {
+ ready(result.data.quota);
+ }
+ }
+ );
+}
+
var UserList = {
useUndo: true,
availableGroups: [],
@@ -118,6 +130,13 @@ var UserList = {
if (sort) {
UserList.doSort();
}
+
+ quotaSelect.singleSelect();
+ quotaSelect.on('change', function () {
+ var uid = $(this).parent().parent().attr('data-uid');
+ var quota = $(this).val();
+ setQuota(uid, quota);
+ });
},
// From http://my.opera.com/GreyWyvern/blog/show.dml/1671288
alphanum: function(a, b) {
@@ -303,18 +322,6 @@ $(document).ready(function () {
});
});
- function setQuota (uid, quota, ready) {
- $.post(
- OC.filePath('settings', 'ajax', 'setquota.php'),
- {username: uid, quota: quota},
- function (result) {
- if (ready) {
- ready(result.data.quota);
- }
- }
- );
- }
-
$('select[multiple]').each(function (index, element) {
UserList.applyMultiplySelect($(element));
});