1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 17:59:55 +02:00
DanieL 2022-09-15 10:57:15 -03:00
parent bb08f2ad22
commit 9bff738c71
3 changed files with 3366 additions and 3359 deletions

File diff suppressed because one or more lines are too long

View file

@ -1546,9 +1546,13 @@ if (Permissions::canAdminVideos()) {
$('#inputNextVideo-id').val(""); $('#inputNextVideo-id').val("");
}); });
function getGridCurrentPage() {
return $("#grid").bootgrid("getCurrentPage");
// //return parseInt($('#grid-footer > div > div:nth-child(1) > ul > li.active > a').attr('data-page'));
}
function getGridURL() { function getGridURL() {
var url = webSiteRootURL + "objects/videos.json.php?showAll=1&status=" + filterStatus; var url = webSiteRootURL + "objects/videos.json.php?showAll=1&status=" + filterStatus;
$('.searchFieldsNames:checked').each(function (index) { $('.searchFieldsNames:checked').each(function (index) {
url = addGetParam(url, 'searchFieldsNames[' + index + ']', $(this).val()); url = addGetParam(url, 'searchFieldsNames[' + index + ']', $(this).val());
}); });
@ -1849,10 +1853,11 @@ if (AVideoPlugin::isEnabledByName('PlayLists')) {
}, },
post: function () { post: function () {
var page = $("#grid").bootgrid("getCurrentPage"); var page = getGridCurrentPage();
if (!page) { if (!page) {
page = 1; page = 1;
} }
console.log('post page', page);
var ret = {current: page}; var ret = {current: page};
return ret; return ret;
}, },
@ -2008,7 +2013,9 @@ if (Permissions::canAdminVideos()) {
setVideoSuggested(row.id, isSuggested).then((data) => { setVideoSuggested(row.id, isSuggested).then((data) => {
$("#grid").bootgrid("reload"); $("#grid").bootgrid("reload");
}).catch((error) => {console.log(error)}); }).catch((error) => {
console.log(error)
});
}); });
grid.find(".command-editlikes").on("click", function (e) { grid.find(".command-editlikes").on("click", function (e) {
var row_index = $(this).closest('tr').index(); var row_index = $(this).closest('tr').index();