Some code to get #384 working.

This commit is contained in:
James Cole
2017-12-10 17:55:06 +01:00
parent b93a96db23
commit 54c449f11b
7 changed files with 469 additions and 10 deletions

View File

@@ -25,4 +25,33 @@ function loadAjaxPartial(holder, uri) {
}).fail(function () {
failAjaxPartial(uri, holder);
});
}
function failAjaxPartial(uri, holder) {
"use strict";
var holderObject = $('#' + holder);
holderObject.parent().find('.overlay').remove();
holderObject.addClass('general-chart-error');
}
function displayAjaxPartial(data, holder) {
"use strict";
var obj = $('#' + holder);
obj.html(data);
obj.parent().find('.overlay').remove();
// call some often needed recalculations and what-not:
// find a sortable table and make it sortable:
if (typeof $.bootstrapSortable === "function") {
$.bootstrapSortable(true);
}
// find the info click things and respond to them:
triggerInfoClick();
// trigger list thing
listLengthInitial();
}