From f9053c077de535204a4d222a2c1d84019e4ea227 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 Conflicts: src/views/admin/manage/groups.tpl --- public/less/admin/admin.less | 6 ++++ public/less/generics.less | 27 ++++++++++++++ public/src/admin/manage/groups.js | 13 +++---- src/views/admin/manage/groups.tpl | 59 ++++++++++++++----------------- 4 files changed, 65 insertions(+), 40 deletions(-) diff --git a/public/less/admin/admin.less b/public/less/admin/admin.less index 7700db2437..74a4b459ff 100644 --- a/public/less/admin/admin.less +++ b/public/less/admin/admin.less @@ -349,3 +349,9 @@ max-height: 24px; } } + +.groups-list { + .description { + font-size: 1rem; + } +} 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 7dd0bfe5f5..de13d4fb5c 100644 --- a/src/views/admin/manage/groups.tpl +++ b/src/views/admin/manage/groups.tpl @@ -2,37 +2,32 @@
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

    -
      +
        -
          +