moderation view: get last transition entry faster

get it from @@contenthistorypopup instead from @@historyview
This commit is contained in:
Katja Suess
2019-12-16 15:31:48 +01:00
parent 96e0fb83c0
commit f777315da3
4 changed files with 26 additions and 11 deletions
@@ -224,18 +224,16 @@ require(["jquery", "pat-registry"], function($, registry) {
* Comments published: Load history for publishing date.
**********************************************************************/
$(".last-history-entry").each(function() {
var me = $(this);
var lasthistoryentry = $(this);
$.ajax({
url: me.attr("data-href"),
url: lasthistoryentry.attr("data-href"),
success: function (data) {
let first_history_entry = $(data).find(".historyByLine").first();
me.html(first_history_entry);
lasthistoryentry.html($(data).find(".historyByLine").first());
// format date
registry.scan(me);
registry.scan(lasthistoryentry);
},
error: function (msg) {
alert("Error getting history.");
console.error("Error getting history.");
}
});
});
+1 -1
View File
@@ -196,7 +196,7 @@
</td>
<td>
<span class="last-history-entry"
tal:attributes="data-href string:$item_url/@@historyview">
tal:attributes="data-href string:$item_url/@@contenthistorypopup">
last history entry
</span>
</td>