From 54097c351eb46162a4433b8a6134a1471a5750d1 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Tue, 21 Apr 2015 12:02:59 -0400 Subject: [PATCH] Finish work on the new role group and make sure it only appears when the new layout is enabled --- static/css/core-ui.css | 2 +- .../ui/repository-permissions-table.css | 15 ++++++++++++++ static/css/directives/ui/role-group.css | 20 +++++++++---------- static/directives/new-role-group.html | 16 +++++++++++++++ static/directives/old-role-group.html | 6 ++++++ .../repository-permissions-table.html | 6 ++++-- static/directives/role-group.html | 17 +--------------- static/directives/teams-manager.html | 2 +- static/js/directives/ui/role-group.js | 6 ++++-- 9 files changed, 58 insertions(+), 32 deletions(-) create mode 100644 static/directives/new-role-group.html create mode 100644 static/directives/old-role-group.html diff --git a/static/css/core-ui.css b/static/css/core-ui.css index bc016a843..b17afff8b 100644 --- a/static/css/core-ui.css +++ b/static/css/core-ui.css @@ -75,7 +75,7 @@ } .co-nav-title .co-nav-title-content { - height: 28px; + height: 34px; overflow: hidden; text-overflow: ellipsis; font-size: 22px; diff --git a/static/css/directives/ui/repository-permissions-table.css b/static/css/directives/ui/repository-permissions-table.css index a77655ae1..03f9dda85 100644 --- a/static/css/directives/ui/repository-permissions-table.css +++ b/static/css/directives/ui/repository-permissions-table.css @@ -18,4 +18,19 @@ margin-top: 6px; padding-top: 10px; border-top: 2px solid #eee; +} + +.repository-permissions-table .mobile-add-row .add-button, +.repository-permissions-table .mobile-add-row .role-group { + display: block; + width: 100%; + margin-top: 10px; +} + +.repository-permissions-table .mobile-add-row .role-group .btn-group { + display: block; +} + +.repository-permissions-table .mobile-add-row .role-group .btn-group .btn { + width: 100%; } \ No newline at end of file diff --git a/static/css/directives/ui/role-group.css b/static/css/directives/ui/role-group.css index d1ed50bc6..119a0db16 100644 --- a/static/css/directives/ui/role-group.css +++ b/static/css/directives/ui/role-group.css @@ -1,39 +1,39 @@ -.role-group .btn { +.new-role-group .btn { width: 90px; position: relative; text-align: left; } -.role-group .btn .caret { +.new-role-group .btn .caret { position: absolute; top: 15px; right: 7px; } -.role-group .role-help-text { +.new-role-group .role-help-text { font-size: 12px; color: #ccc; margin-top: 4px; margin-bottom: 2px; } -.role-group .btn { +.new-role-group .btn { border-left: 4px solid #ccc; } -.role-group .btn.success { +.new-role-group .btn.success { border-left-color: #5cb85c; } -.role-group .btn.primary { +.new-role-group .btn.primary { border-left-color: #337ab7; } -.role-group li a { +.new-role-group li a { vertical-align: middle; } -.role-group li a:before { +.new-role-group li a:before { content: ""; border-radius: 50%; width: 10px; @@ -43,10 +43,10 @@ margin-right: 6px; } -.role-group li.success a:before { +.new-role-group li.success a:before { background-color: #5cb85c; } -.role-group li.primary a:before { +.new-role-group li.primary a:before { background-color: #337ab7; } \ No newline at end of file diff --git a/static/directives/new-role-group.html b/static/directives/new-role-group.html new file mode 100644 index 000000000..97a6593a8 --- /dev/null +++ b/static/directives/new-role-group.html @@ -0,0 +1,16 @@ +
+ +
diff --git a/static/directives/old-role-group.html b/static/directives/old-role-group.html new file mode 100644 index 000000000..d87326d6a --- /dev/null +++ b/static/directives/old-role-group.html @@ -0,0 +1,6 @@ +
+ +
\ No newline at end of file diff --git a/static/directives/repository-permissions-table.html b/static/directives/repository-permissions-table.html index 66ee3377a..162f26c2b 100644 --- a/static/directives/repository-permissions-table.html +++ b/static/directives/repository-permissions-table.html @@ -122,14 +122,16 @@ +
+ current-entity="addPermissionInfo.entity" + pull-right="true"> - - -
- + \ No newline at end of file diff --git a/static/directives/teams-manager.html b/static/directives/teams-manager.html index 7af99e024..f67d53e0f 100644 --- a/static/directives/teams-manager.html +++ b/static/directives/teams-manager.html @@ -51,7 +51,7 @@
- diff --git a/static/js/directives/ui/role-group.js b/static/js/directives/ui/role-group.js index a3b1589c4..78a169a14 100644 --- a/static/js/directives/ui/role-group.js +++ b/static/js/directives/ui/role-group.js @@ -13,10 +13,12 @@ angular.module('quay').directive('roleGroup', function () { 'roles': '@roles', 'currentRole': '=currentRole', 'readOnly': '=readOnly', - 'roleChanged': '&roleChanged' + 'roleChanged': '&roleChanged', + 'pullLeft': '@pullLeft' }, - controller: function($scope, $element, RolesService) { + controller: function($scope, $element, RolesService, Config) { $scope.fullRoles = RolesService[$scope.roles]; + $scope.Config = Config; $scope.setRole = function(role) { if ($scope.currentRole == role) { return; }