Bug tri gallery

This commit is contained in:
Fred Tempez 2020-04-24 12:37:01 +02:00
parent f7a05e4bf6
commit da7aea6838
2 changed files with 5 additions and 5 deletions

View File

@ -19,7 +19,7 @@ class gallery extends common {
const SORT_ASC = 'SORT_ASC';
const SORT_DSC = 'SORT_DSC';
const SORT_HAND = 'SORT_HAND';
const GALLERY_VERSION = '2.19';
const GALLERY_VERSION = '2.20';
public static $directories = [];
@ -130,7 +130,7 @@ class gallery extends common {
* Tri de la liste des galeries
*
*/
private function sort () {
public function sort() {
if($_POST['response']) {
$data = explode('&',$_POST['response']);
$data = str_replace('galleryTable%5B%5D=','',$data);

View File

@ -26,7 +26,7 @@ $( document ).ready(function() {
// Affiche le bouton de tri après un déplacement
$(":input[type='submit']").prop('disabled', false);
// Sauvegarde le tri
sort();
sortGalleries();
},
// Supprime le tiret des séparateurs
serializeRegexp: ""
@ -91,8 +91,8 @@ directoryDOM.on("change", function() {
* Tri dynamique des galeries
*/
function sort() {
var url = "<?php echo helper::baseUrl() . $this->getUrl(0) . '/sort'; ?>";
function sortGalleries() {
var url = "<?php echo helper::baseUrl() . $this->getUrl(0); ?>/sort";
var data = $("#galleryConfigFilterResponse").val();
$.ajax({
type: "POST",