diff options
author | raghunayyar <me@iraghu.com> | 2014-02-25 15:39:01 +0530 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2014-06-02 12:53:53 +0200 |
commit | 65aa20433c796c40592e6031eb8ba323c171c108 (patch) | |
tree | 369e356d673516ddaa879127c192527e8b533fe0 /settings/js | |
parent | 17e640af22d07c5ecede6ae1b6d1a89509e104a9 (diff) | |
download | nextcloud-server-65aa20433c796c40592e6031eb8ba323c171c108.tar.gz nextcloud-server-65aa20433c796c40592e6031eb8ba323c171c108.zip |
Enhancement : Toggle Add Group on Click, @blizzz have a look here.
Diffstat (limited to 'settings/js')
-rw-r--r-- | settings/js/users/groups.js | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/settings/js/users/groups.js b/settings/js/users/groups.js index 3234d6911e4..3ac8d3f36e3 100644 --- a/settings/js/users/groups.js +++ b/settings/js/users/groups.js @@ -64,7 +64,23 @@ $(document).ready( function () { // Call function for handling delete/undo on Groups GroupList.delete_group(gid); }); - $('#newgroup').submit(function (event) { + + // Display or hide of Create Group List Element + $('#newgroup-form').hide(); + $('#newgroup-init').on('click', function (e) { + e.stopPropagation(); + $('#newgroup-form').show(); + $('#newgroup-init').hide(); + $(document).click( function (e) { + if (e.target.id !== 'newgroup-form') { + $("#newgroup-form").hide(); + $("#newgroup-init").show(); + } + }); + }); + + // Responsible for Creating Groups. + $('#newgroup-form form').submit(function (event) { event.preventDefault(); var groupname = $('#newgroupname').val(); if ($.trim(groupname) === '') { |