mirror of
https://github.com/janeczku/calibre-web
synced 2025-11-01 15:53:01 +00:00
Prepare for save name sort order
This commit is contained in:
@@ -19,13 +19,16 @@ var direction = 0; // Descending order
|
||||
var sort = 0; // Show sorted entries
|
||||
|
||||
$("#sort_name").click(function() {
|
||||
/*$.ajax({
|
||||
var class_name = $("h1").attr('Class') + "_sort_name";
|
||||
var obj = {};
|
||||
obj[class_name] = sort;
|
||||
$.ajax({
|
||||
method:"post",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
url: window.location.pathname + "/../../ajax/view",
|
||||
data: "{" + st + "}",
|
||||
});*/
|
||||
data: JSON.stringify({obj}),
|
||||
});
|
||||
|
||||
var count = 0;
|
||||
var index = 0;
|
||||
|
||||
@@ -378,16 +378,19 @@ $(function() {
|
||||
});
|
||||
|
||||
$(".update-view").click(function(e) {
|
||||
var target = $(this).data("target");
|
||||
var view = $(this).data("view");
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
var data = {};
|
||||
data[target] = view;
|
||||
console.debug("Updating view data: ", data);
|
||||
$.post( "/ajax/view", data).done(function( ) {
|
||||
location.reload();
|
||||
$.ajax({
|
||||
method:"post",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
url: window.location.pathname + "/../../ajax/view",
|
||||
data: JSON.stringify({"series_view":view}),
|
||||
success: function success() {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user