[Rt-commit] rt branch, 5.0-trunk, updated. rt-5.0.0beta1-5-gaff64e0602
? sunnavy
sunnavy at bestpractical.com
Fri Jun 5 18:25:46 EDT 2020
The branch, 5.0-trunk has been updated
via aff64e0602dd8d80972eb417cc1d15476239c316 (commit)
via ddda286757a389a6244fb92ef8bf7c9705936e0e (commit)
via b8e1ba812a29ded08bc83aa778cf0bd1f1603816 (commit)
from 4fdaf28266da3251e656f0ff1b0fa8587df61fcf (commit)
Summary of changes:
share/html/Elements/JavascriptConfig | 1 +
share/static/css/elevator-light/collection.css | 4 +++-
share/static/js/util.js | 12 +++++++++++-
3 files changed, 15 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit b8e1ba812a29ded08bc83aa778cf0bd1f1603816
Author: Aaron Trevena <aaron at aarontrevena.co.uk>
Date: Fri Apr 17 13:07:25 2020 +0100
Add reciprocal re-clip button to "show less"
The clip/unclip feature and button lacked a re-clip feature, this addresses
that and adds a button to show less, that's hidden when clipped and exposed
when unclipped making unclip action reversible.
diff --git a/share/html/Elements/JavascriptConfig b/share/html/Elements/JavascriptConfig
index 548e0bad6b..00e76d734e 100644
--- a/share/html/Elements/JavascriptConfig
+++ b/share/html/Elements/JavascriptConfig
@@ -77,6 +77,7 @@ my $Catalog = {
lower_disabled => "disabled", # loc
history_scroll_error => "Could not load ticket history. Reason:", #loc
unclip => "Show all", #loc
+ clip => "Show less", #loc
};
$_ = loc($_) for values %$Catalog;
diff --git a/share/static/css/elevator-light/collection.css b/share/static/css/elevator-light/collection.css
index 3f508c5d42..b9609630bf 100644
--- a/share/static/css/elevator-light/collection.css
+++ b/share/static/css/elevator-light/collection.css
@@ -21,7 +21,8 @@
overflow-y: hidden;
}
-.collection-as-table a.unclip {
+.collection-as-table a.unclip,
+.collection-as-table a.reclip {
font-size: smaller;
font-weight: normal;
}
diff --git a/share/static/js/util.js b/share/static/js/util.js
index 6ee838aa63..9d24a50c00 100644
--- a/share/static/js/util.js
+++ b/share/static/js/util.js
@@ -283,14 +283,24 @@ jQuery(function() {
var max_height = jQuery(this).css('line-height').replace('px', '') * 5;
if ( jQuery(this).children().height() > max_height ) {
jQuery(this).children().wrapAll('<div class="clip">');
- jQuery(this).children('div.clip').height('' + max_height + 'px');
+ var height = '' + max_height + 'px';
+ jQuery(this).children('div.clip').attr('clip-height', height).height(height);
jQuery(this).append('<a href="#" class="unclip button btn btn-primary">' + loc_key('unclip') + '</a>');
+ jQuery(this).append('<a href="#" class="reclip button btn btn-primary" style="display: none;">' + loc_key('clip') + '</a>');
}
}
});
jQuery('a.unclip').click(function() {
jQuery(this).siblings('div.clip').css('height', 'auto');
jQuery(this).hide();
+ jQuery(this).siblings('a.reclip').show();
+ return false;
+ });
+ jQuery('a.reclip').click(function() {
+ var clip_div = jQuery(this).siblings('div.clip');
+ clip_div.height(clip_div.attr('clip-height'));
+ jQuery(this).siblings('a.unclip').show();
+ jQuery(this).hide();
return false;
});
});
commit ddda286757a389a6244fb92ef8bf7c9705936e0e
Author: sunnavy <sunnavy at bestpractical.com>
Date: Sat Jun 6 05:54:36 2020 +0800
Add a bit more space between clipped content and clip buttons
diff --git a/share/static/css/elevator-light/collection.css b/share/static/css/elevator-light/collection.css
index b9609630bf..15ee314522 100644
--- a/share/static/css/elevator-light/collection.css
+++ b/share/static/css/elevator-light/collection.css
@@ -25,6 +25,7 @@
.collection-as-table a.reclip {
font-size: smaller;
font-weight: normal;
+ margin-top: 0.3rem;
}
/* squeeze multiple-lined headers */
commit aff64e0602dd8d80972eb417cc1d15476239c316
Merge: 4fdaf28266 ddda286757
Author: sunnavy <sunnavy at bestpractical.com>
Date: Sat Jun 6 06:11:18 2020 +0800
Merge branch '5.0/reclip-expanded-content' into 5.0-trunk
-----------------------------------------------------------------------
More information about the rt-commit
mailing list