]> source.dussan.org Git - nextcloud-server.git/commitdiff
Enhancement : Toggle Add Group on Click, @blizzz have a look here.
authorraghunayyar <me@iraghu.com>
Tue, 25 Feb 2014 10:09:01 +0000 (15:39 +0530)
committerArthur Schiwon <blizzz@owncloud.com>
Mon, 2 Jun 2014 10:53:53 +0000 (12:53 +0200)
settings/css/settings.css
settings/js/users/groups.js
settings/templates/users/part.grouplist.php

index 2f0585f29907c986825c0f8b766c5ca597c68308..e6ad4fd304f91b663116e10a0177dd0cc6796090 100644 (file)
@@ -51,6 +51,11 @@ table.nostyle label { margin-right: 2em; }
 table.nostyle td { padding: 0.2em 0; }
 
 /* USERS */
+#newgroup-init a span { margin-left: 20px; }
+#newgroup-init a span:before {
+       position: absolute;     left: 12px; top:-2px;
+       content: '+'; font-weight: bold; font-size: 150%;
+}
 .usercount { float: left; margin: 5px; }
 li.active span.utils .delete {
        float: left; position: relative; opacity: 0.5;
index 3234d6911e4c4059ebf4958d06717b40dc8df44c..3ac8d3f36e3ef067519d82bebda1b3ac64499427 100644 (file)
@@ -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) === '') {
index 51351733d0d692ab696e4f601178efdc5f81d35f..620049eb298c00dcc7a78e545a26cfa7a73443ff 100644 (file)
@@ -1,7 +1,12 @@
 <ul>
        <!-- Add new group -->
-       <li>
-               <form id="newgroup">
+       <li id="newgroup-init">
+               <a href="#">
+                       <span><?php p($l->t('Add Group'))?></span>
+               </a>
+       </li>
+       <li id="newgroup-form">
+               <form>
                        <input type="text" id="newgroupname" placeholder="<?php p($l->t('Group')); ?>..." />
                        <input type="submit" class="button" value="<?php p($l->t('Add Group'))?>" />
                </form>