Some fixes :)
This commit is contained in:
@@ -7,7 +7,7 @@ $(document).ready(function () {
|
||||
return false;
|
||||
},
|
||||
format: function (s, table, cell) {
|
||||
return $(cell).find("input[id^=production-date]").val() || "1970-01-01";
|
||||
return $(cell).find("input[id^=production-date]").val() || "2222-01-01";
|
||||
},
|
||||
parsed: false,
|
||||
type: "text"
|
||||
@@ -62,6 +62,29 @@ $(document).ready(function () {
|
||||
3: { sorter: "production_date" },
|
||||
},
|
||||
});
|
||||
$("#allTable").bind('filterEnd', function () {
|
||||
localStorage.setItem("productionSchedule_filter", $.tablesorter.getFilters($("#allTable")));
|
||||
});
|
||||
$("#allTable").bind("sortEnd", function () {
|
||||
try {
|
||||
localStorage.setItem('productionSchedule_sort',
|
||||
$("#allTable")[0].config.sortList[0][0] + "|" + $("#allTable")[0].config.sortList[0][1]);
|
||||
} catch (e) {}
|
||||
});
|
||||
setTimeout(() => {
|
||||
const filters = localStorage.getItem("productionSchedule_filter");
|
||||
if (filters) {
|
||||
$.tablesorter.setFilters($('#allTable'), filters.split(','), true);
|
||||
}
|
||||
const sort = localStorage.getItem("productionSchedule_sort");
|
||||
if (sort) {
|
||||
try {
|
||||
var tmp = sort.split("|");
|
||||
$("#allTable")[0].config.sortList = [[parseInt(tmp[0]), parseInt(tmp[1])]];
|
||||
$.tablesorter.sortOn($("#allTable")[0].config, [[parseInt(tmp[0]), parseInt(tmp[1])]]);
|
||||
} catch (e) { }
|
||||
}
|
||||
}, 500);
|
||||
$("#duplicateBtn").click(() => duplicatePositions());
|
||||
$("#deleteBtn").click(() => { removePositions(); });
|
||||
$("#excelBtn").click(() => { exportExcel(); });
|
||||
@@ -153,7 +176,7 @@ function saveDescription(id) {
|
||||
$.ajax({
|
||||
method: "get",
|
||||
url: $(location).attr("href") + "&to_pdf=1&ajaxAction=saveProductDescription&id=" + id + "&description=" + $("#descriptionInput-" + id).val(),
|
||||
success: function (data) {
|
||||
success: function () {
|
||||
$("#description-" + id).html($("#descriptionInput-" + id).val());
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user