Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-04-10 16:12:54 +0400
committerRobin Appelman <icewind@owncloud.com>2013-04-10 16:50:42 +0400
commit892d85556bf890271a37d50ee779ceb7d77be359 (patch)
treec209f30747f0dc1305decb2b4792ebc340b3d66a /settings
parent5fb891e20aae17c5aab271320d9997dea0ced2b6 (diff)
Add the quota change listeners to newly added user entries in the user list
Diffstat (limited to 'settings')
-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 d79b21765ff..5f9710053c9 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));
});