More resources translated ...
This commit is contained in:
@@ -28,30 +28,34 @@
|
||||
var tableElem = $('#historyTable');
|
||||
jQuery.ajax("service/maps/${mindmapId}/history", {
|
||||
async:false,
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
dataType:'json',
|
||||
type:'GET',
|
||||
contentType:"text/plain",
|
||||
success : function(data, textStatus, jqXHR) {
|
||||
$(data.changes).each(function() {
|
||||
tableElem.append('\
|
||||
success:function (data, textStatus, jqXHR) {
|
||||
if (data.changes.length > 0) {
|
||||
$(data.changes).each(function () {
|
||||
tableElem.append('\
|
||||
<tr data-history-id="' + this.id + '">\
|
||||
<td>' + this.creator + '</td>\
|
||||
<td><abbr class="timeago" title="' + this.creationTime + '">' + jQuery.timeago(this.creationTime) + '</abbr></td>\
|
||||
<td><a class="view" href="#">view</a></td>\
|
||||
<td><a class="revert" href="#">revert</a></td>\
|
||||
</tr>');
|
||||
});
|
||||
});
|
||||
} else {
|
||||
$('#historyContainer').text("<spring:message code="NO_HISTORY_RESULTS"/>");
|
||||
}
|
||||
|
||||
tableElem.find('tr a.view').each(function() {
|
||||
$(this).click(function(event) {
|
||||
tableElem.find('tr a.view').each(function () {
|
||||
$(this).click(function (event) {
|
||||
window.open("/c/maps/${mindmapId}/" + $(this).closest("tr").attr("data-history-id") + "/view");
|
||||
event.preventDefault();
|
||||
});
|
||||
});
|
||||
tableElem.find('tr a.revert').each(function() {
|
||||
$(this).click(function(event) {
|
||||
tableElem.find('tr a.revert').each(function () {
|
||||
$(this).click(function (event) {
|
||||
var url = "service/maps/${mindmapId}/history/" + $(this).closest("tr").attr("data-history-id");
|
||||
jQuery.post(url, function(data) {
|
||||
jQuery.post(url, function (data) {
|
||||
window.parent.location = "c/maps/${mindmapId}/edit";
|
||||
});
|
||||
event.preventDefault();
|
||||
@@ -59,8 +63,8 @@
|
||||
});
|
||||
|
||||
},
|
||||
error:function(jqXHR, textStatus, errorThrown) {
|
||||
alert(textStatus);
|
||||
error:function (jqXHR, textStatus, errorThrown) {
|
||||
console.log(textStatus);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user