[Rt-commit] rt branch, 4.6/tweak-elevator-themes, updated. rt-4.4.4-422-g620a043b3
? sunnavy
sunnavy at bestpractical.com
Fri Oct 18 16:56:03 EDT 2019
The branch, 4.6/tweak-elevator-themes has been updated
via 620a043b33e65f33024b69501a1283a8a516c538 (commit)
via 2bd532b392b251c4f9b0073146e6575453a3216e (commit)
via 255abc4442f5f5dcb2dfdc19bb258582b8a29857 (commit)
via e182e70d80fe75545f9988fe603876a79821a8e8 (commit)
via 64906fac8dff4586749c2c74b538159ab50a006d (commit)
from 1abea8fe981cde452d233286c5ecebfa3c5f72d7 (commit)
Summary of changes:
share/html/Asset/Elements/ShowRoleMembers | 11 ++--------
share/html/Widgets/TitleBoxStart | 4 ----
share/static/css/elevator-light/accordion.css | 5 +++++
share/static/css/elevator-light/assets.css | 5 +++++
share/static/js/util.js | 30 ---------------------------
5 files changed, 12 insertions(+), 43 deletions(-)
- Log -----------------------------------------------------------------
commit 64906fac8dff4586749c2c74b538159ab50a006d
Author: sunnavy <sunnavy at bestpractical.com>
Date: Sat Oct 19 03:32:06 2019 +0800
Clearly separate last asset and the following "Add an asset"
We intentionally disable the bottom border of the last item in
accordion, which looks fine mostly, until there are some other stuff
right below it(like the "Add an asset").
I chose to set top border for "Add an asset" instead of enabling bottom
border of the last asset item mainly because "Add an asset" doesn't
always exist(depending on if current user has ModifyTcket right)
The padding is to be consistent with previous accordion.
diff --git a/share/static/css/elevator-light/assets.css b/share/static/css/elevator-light/assets.css
index 7f193138c..4cfb199f1 100644
--- a/share/static/css/elevator-light/assets.css
+++ b/share/static/css/elevator-light/assets.css
@@ -5,3 +5,8 @@
left: inherit;
padding: 0;
}
+
+.add-asset {
+ padding-top: 10px;
+ border-top: 1px solid #E0E6EC;
+}
commit e182e70d80fe75545f9988fe603876a79821a8e8
Author: sunnavy <sunnavy at bestpractical.com>
Date: Sat Oct 19 04:11:24 2019 +0800
Link user/group name to summary page directly for assets
This is to be consistent with the ticket widget of "More about the
requestors".
diff --git a/share/html/Asset/Elements/ShowRoleMembers b/share/html/Asset/Elements/ShowRoleMembers
index f38296590..b441e0577 100644
--- a/share/html/Asset/Elements/ShowRoleMembers
+++ b/share/html/Asset/Elements/ShowRoleMembers
@@ -57,14 +57,10 @@
% } elsif ($Single) {
<& /Elements/ShowUser, User => $user, Link => 1 &>
% } else {
- <a href="#"><& /Elements/ShowUser, User => $user, Link => 0 &>
+ <& /Elements/ShowUser, User => $user, Link => 1 &>
% if ($Note) {
<span class="note"><% $Note %></span>
% }
- </a>
-% if ( $session{'CurrentUser'}->Privileged ){
- <a class="user-summary" href="<%RT->Config->Get('WebPath')%>/User/Summary.html?id=<% $user->Id %>"><&|/l&>User Summary</&></a>
-% }
</span>
% }
<div id="<% $Role %>-user-<% $user->id %>" class="accordion-content collapse" aria-labelledby="<% $Role %>-user-<% $user->id %>-title">
@@ -81,7 +77,7 @@
% while (my $g = $groups->Next) {
% next if $Skip and $Skip->HasMember( $g->PrincipalId );
<div class="accordion-item accordion-item-bare">
-<a href="#"><&|/l, $g->Name &>Group: [_1]</&></a>
+ <a href="<% RT->Config->Get('WebPath') %>/Group/Summary.html?id=<% $g->Id %>"><&|/l, $g->Name &>Group: [_1]</&></a>
% if ($Note) {
<span class="note"><% $Note %></span>
% }
commit 255abc4442f5f5dcb2dfdc19bb258582b8a29857
Author: sunnavy <sunnavy at bestpractical.com>
Date: Sat Oct 19 04:17:01 2019 +0800
Simplify the logic of accordion user title for assets
The difference is trivial depending on if $Single is on or not, and we
even don't actually call this component for $Single roles(see also
ShowPeople).
This also fixes a possible unbalanced <span>
diff --git a/share/html/Asset/Elements/ShowRoleMembers b/share/html/Asset/Elements/ShowRoleMembers
index b441e0577..551f3dc53 100644
--- a/share/html/Asset/Elements/ShowRoleMembers
+++ b/share/html/Asset/Elements/ShowRoleMembers
@@ -53,16 +53,13 @@
<div class="accordion-item">
<span class="accordion-title collapsed toggle" data-toggle="collapse" data-target="#<% $Role %>-user-<% $user->id %>" aria-expanded="false" aria-controls="<% $Role %>-user-<% $user->id %>" id="<% $Role %>-user-<% $user->id %>-title" >
-% if (not $Title) {
-% } elsif ($Single) {
- <& /Elements/ShowUser, User => $user, Link => 1 &>
-% } else {
+% if ($Title) {
<& /Elements/ShowUser, User => $user, Link => 1 &>
% if ($Note) {
<span class="note"><% $Note %></span>
% }
- </span>
% }
+ </span>
<div id="<% $Role %>-user-<% $user->id %>" class="accordion-content collapse" aria-labelledby="<% $Role %>-user-<% $user->id %>-title">
<& /User/Elements/UserInfo,
User => $user,
commit 2bd532b392b251c4f9b0073146e6575453a3216e
Author: sunnavy <sunnavy at bestpractical.com>
Date: Sat Oct 19 04:32:56 2019 +0800
Align the first user/group with corresponding labels
This is mainly to fix asset people widget.
diff --git a/share/static/css/elevator-light/accordion.css b/share/static/css/elevator-light/accordion.css
index 6469c24a0..0445bdbb6 100644
--- a/share/static/css/elevator-light/accordion.css
+++ b/share/static/css/elevator-light/accordion.css
@@ -61,3 +61,8 @@
flex-grow: 1;
margin-right: 10px;
}
+
+.value > .accordion .accordion-item-bare:first-child,
+.value > .accordion .accordion-item:first-child .accordion-title {
+ padding-top: 0;
+}
commit 620a043b33e65f33024b69501a1283a8a516c538
Author: sunnavy <sunnavy at bestpractical.com>
Date: Sat Oct 19 04:26:37 2019 +0800
Drop code that is to support old deleted themes
diff --git a/share/html/Widgets/TitleBoxStart b/share/html/Widgets/TitleBoxStart
index 2d7935bb4..6c52e7f1b 100644
--- a/share/html/Widgets/TitleBoxStart
+++ b/share/html/Widgets/TitleBoxStart
@@ -48,11 +48,7 @@
<div class="titlebox card<% $class ? " $class " : '' %><% $rolledup ? " rolled-up" : ""%>" id="<% $id %>">
<div class="titlebox-title card-header<% $title_class ? " $title_class" : ''%>">
% if ($hideable) {
-% if ( RT->Config->Get('WebDefaultStylesheet', $session{CurrentUser}) =~ /^elevator-/ ) {
<span class="toggle <% $rolledup ? " collapsed" : ""%>" data-toggle="collapse" data-target="#<%$tid|n%>" title="<% loc('Toggle visibility') %>"></span>
-% } else {
- <span class="widget"><a href="#" onclick="return rollup(<%$tid|n,j%>);" title="<% loc('Toggle visibility') %>"></a></span>
-% }
% }
<span class="left"><%
$title_href ? qq[<a href="$title_href">] : '' | n
diff --git a/share/static/js/util.js b/share/static/js/util.js
index 3e3795810..28cb8a5ff 100644
--- a/share/static/js/util.js
+++ b/share/static/js/util.js
@@ -56,36 +56,6 @@ function delClass(id, value) {
jQueryWrap(id).removeClass(value);
}
-/* Rollups */
-
-function rollup(id) {
- var e = jQueryWrap(id);
- var e2 = e.parent();
-
- if (e.hasClass('hidden')) {
- set_rollup_state(e,e2,'shown');
- createCookie(id,1,365);
- }
- else {
- set_rollup_state(e,e2,'hidden');
- createCookie(id,0,365);
- }
- return false;
-}
-
-function set_rollup_state(e,e2,state) {
- if (e && e2) {
- if (state == 'shown') {
- show(e);
- delClass( e2, 'rolled-up' );
- }
- else if (state == 'hidden') {
- hide(e);
- addClass( e2, 'rolled-up' );
- }
- }
-}
-
/* other utils */
function getClosestInputElements(input) {
-----------------------------------------------------------------------
More information about the rt-commit
mailing list