[Rt-commit] rt branch, 4.4/history-scroll-load-all, repushed
Dustin Graves
dustin at bestpractical.com
Tue Aug 9 17:52:34 EDT 2016
The branch 4.4/history-scroll-load-all was deleted and repushed:
was 72c4aa1ab436b14a98f4e398fdfd3ca32ae6ce4a
now 06cbf256f5b53d1d3e366cdd61223280e52b86b2
1: 72c4aa1 ! 1: 06cbf25 add "Load All" button to "as you scroll" history mode
@@ -3,6 +3,33 @@
add "Load All" button to "as you scroll" history mode
Fixes: I#32094
+
+diff --git a/share/html/Elements/ShowHistoryHeader b/share/html/Elements/ShowHistoryHeader
+--- a/share/html/Elements/ShowHistoryHeader
++++ b/share/html/Elements/ShowHistoryHeader
+@@
+ $ShowHeaders => 0
+ $ShowTitle => 1
+ $ShowDisplayModes => 1
++$ScrollShowHistory => 0
+ </%ARGS>
+ <%INIT>
+ my $record_type = $Object->RecordType;
+@@
+ qq{</a>};
+ }
+ }
++
++if ( $ScrollShowHistory ) {
++ $titleright .= qq{<span id="LoadAllHistoryContainer">} .
++ ($titleright ? '—' : '') .
++ qq{<a href="#" id="LoadAllHistory">} .
++ loc('Load All') .
++ qq{</a></span>};
++}
+ </%perl>
+ <& /Widgets/TitleBoxStart, title => $title, titleright_raw => $titleright &>
+ % }
diff --git a/share/html/Helpers/TicketHistoryPage b/share/html/Helpers/TicketHistoryPage
--- a/share/html/Helpers/TicketHistoryPage
@@ -29,17 +56,13 @@
--- a/share/html/Ticket/Elements/ScrollShowHistory
+++ b/share/html/Ticket/Elements/ScrollShowHistory
@@
+ ShowHeaders => $ShowHeaders,
+ ShowTitle => $ShowTitle,
ShowDisplayModes => $ShowDisplayModes,
++ ScrollShowHistory => 1,
&>
-+<div id="LoadAllHistoryContainer">
-+ <input class="button" type="button" id="LoadAllHistory" value="Load All" />
-+ <br /><br />
-+</div>
-+
</div>
- % if ($ShowDisplayModes or $ShowTitle) {
- <& /Widgets/TitleBoxEnd &>
@@
loadDistanceFromBottom = 1500, // to load before bottom of page is reached
lastTransactionId = null,
@@ -66,7 +89,7 @@
} else {
disableLoading = true;
+
-+ // disable 'Load All' button if we're done loading
++ // hide 'Load All' link container if we're done loading
+ var loadAllHistoryContainer = jQuery('#LoadAllHistoryContainer');
+ loadAllHistoryContainer.hide();
}
@@ -84,7 +107,7 @@
};
+ var loadAllHistory = function() {
-+ // hide button
++ // hide link container
+ var loadAllHistoryContainer = jQuery('#LoadAllHistoryContainer');
+ loadAllHistoryContainer.hide();
+ loadAll = true;
@@ -98,7 +121,7 @@
loadHistoryPage();
});
-+ jQuery('.history-container').on('click', '#LoadAllHistory', function(e) {
++ jQuery('div.history').on('click', '#LoadAllHistory', function(e) {
+ e.preventDefault();
+ loadAllHistory();
+ });
More information about the rt-commit
mailing list