From b45335c6ba6896e17b996b331aeff86f95ca8198 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 26 May 2015 15:24:07 -0400 Subject: [PATCH] updated groups ACP styling and template to use a table, like categories --- public/less/admin/admin.less | 7 +++- public/less/admin/manage/groups.less | 54 -------------------------- public/less/generics.less | 27 +++++++++++++ public/src/admin/manage/groups.js | 13 +++---- src/views/admin/manage/groups.tpl | 57 +++++++++++++--------------- 5 files changed, 64 insertions(+), 94 deletions(-) delete mode 100644 public/less/admin/manage/groups.less diff --git a/public/less/admin/admin.less b/public/less/admin/admin.less index 8ab5c633e9..eab0eee29e 100644 --- a/public/less/admin/admin.less +++ b/public/less/admin/admin.less @@ -3,7 +3,6 @@ @import "./general/dashboard"; @import "./general/navigation"; -@import "./manage/groups"; @import "./manage/tags"; @import "./manage/flags"; @import "./manage/users"; @@ -350,3 +349,9 @@ max-height: 24px; } } + +.groups-list { + .description { + font-size: 1rem; + } +} \ No newline at end of file diff --git a/public/less/admin/manage/groups.less b/public/less/admin/manage/groups.less deleted file mode 100644 index 03f42694d9..0000000000 --- a/public/less/admin/manage/groups.less +++ /dev/null @@ -1,54 +0,0 @@ -.groups { - #groups-list { - padding-left: 0; - - > li { - list-style-type: none; - margin-bottom: 1em; - padding: 1em; - .zebra; - - h2 { - margin-top: 0; - font-size: 26px; - } - } - } - - .members { - padding: 1em; - - &.current_members { - li { - margin-right: 1em; - } - } - - li { - display: inline-block; - border: 1px solid rgb(200, 200, 200); - - img { - width: 32px; - } - - span { - padding: 0 1em; - } - - &:hover { - .pointer; - background: rgba(192, 192, 192, 0.2); - } - - &.more { - width: 34px; - height: 34px; - vertical-align: top; - padding-top: 3px; - position: relative; - left: -4px; - } - } - } -} \ No newline at end of file diff --git a/public/less/generics.less b/public/less/generics.less index e44d5f0d72..4ce04c4337 100644 --- a/public/less/generics.less +++ b/public/less/generics.less @@ -13,4 +13,31 @@ .opacity(0.5); } } +} + +.user-list { + padding-left: 2rem; + padding-top: 1rem; + + li { + .pointer; + display: inline-block; + list-style-type: none; + padding: 0.5rem 1rem; + + &:hover { + background: @gray-lighter; + } + + img { + float: left; + max-width: 36px; + padding-right: 1rem; + } + + span { + vertical-align: middle; + display: inline-block; + } + } } \ No newline at end of file diff --git a/public/src/admin/manage/groups.js b/public/src/admin/manage/groups.js index f604bc9387..e0b27a674d 100644 --- a/public/src/admin/manage/groups.js +++ b/public/src/admin/manage/groups.js @@ -4,8 +4,9 @@ define('admin/manage/groups', [ 'iconSelect', 'admin/modules/colorpicker', - 'translator' -], function(iconSelect, colorpicker, translator) { + 'translator', + 'components' +], function(iconSelect, colorpicker, translator, components) { var Groups = {}; Groups.init = function() { @@ -26,9 +27,6 @@ define('admin/manage/groups', [ groupLabelPreview = $('#group-label-preview'), searchDelay; - // Tooltips - $('#groups-list .members li').tooltip(); - createModal.on('keypress', function(e) { if (e.keyCode === 13) { createModalGo.click(); @@ -87,10 +85,10 @@ define('admin/manage/groups', [ }, 0); }); - $('#groups-list').on('click', 'button[data-action]', function() { + $('.groups-list').on('click', 'button[data-action]', function() { var el = $(this), action = el.attr('data-action'), - groupName = el.parents('li[data-groupname]').attr('data-groupname'); + groupName = el.parents('tr[data-groupname]').attr('data-groupname'); switch (action) { case 'delete': @@ -110,7 +108,6 @@ define('admin/manage/groups', [ break; case 'members': socket.emit('admin.groups.get', groupName, function(err, groupObj) { - changeGroupName.val(groupObj.name).prop('readonly', groupObj.system); changeGroupDesc.val(groupObj.description); changeGroupUserTitle.val(groupObj.userTitle); diff --git a/src/views/admin/manage/groups.tpl b/src/views/admin/manage/groups.tpl index 26fe157dac..578c4c86c2 100644 --- a/src/views/admin/manage/groups.tpl +++ b/src/views/admin/manage/groups.tpl @@ -3,36 +3,31 @@
Groups List
-
    - -
  • -
    -
    -

    - {groups.name} - - System Group - -

    -

    {groups.description}

    - -
    - - - - -
    -
    -
    -
      -
    • -
    • -
    + + + + + + + + + + + +
    Group NameGroup Description
    + {groups.name} + + System Group + + +
    + + + +
    - - - - +

    {groups.description}

    +
@@ -113,12 +108,12 @@

Click on a user to remove them from the group

-
    +
      -
        +