mirror of
https://github.com/Squidly271/community.applications.git
synced 2025-06-03 14:52:13 +08:00
Reinstate backup of views HTML due to race condition somewhere
Also add in debugging info displayed if sortorder winds up not being an array
This commit is contained in:
parent
6d037299a4
commit
9aff996748
Binary file not shown.
@ -205,6 +205,7 @@ $(function(){
|
||||
} else {
|
||||
setSortOrder();
|
||||
var displayContent = $("#tooltipviews").html();
|
||||
$("#tooltipviews").attr("data-backup",displayContent);
|
||||
$("#tooltipviews").html(""); // Because I'm using id's instead of classes
|
||||
}
|
||||
instance.content(displayContent);
|
||||
@ -214,6 +215,7 @@ $(function(){
|
||||
$(".sortButton,.dirButton").click(function() { changeSortOrder(this.id,$(this).attr("class")); });
|
||||
},
|
||||
functionAfter: function(instance,helper) {
|
||||
$("#tooltipviews").html($("#tooltipviews").attr("data-backup"));
|
||||
setSortOrder();
|
||||
}
|
||||
});
|
||||
|
@ -541,6 +541,7 @@ function getPostArray($setting) {
|
||||
return $_POST[$setting];
|
||||
}
|
||||
function getSortOrder($sortArray) {
|
||||
if ( ! is_array($sortArray) ) { print_r($_POST); }
|
||||
foreach ($sortArray as $sort) {
|
||||
$sortOrder[$sort[0]] = $sort[1];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user