mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-05-07 05:44:58 +02:00
related to #1609 new created album is public by default and visit in gallery btn must be clickable
This commit is contained in:
+1
-1
@@ -189,7 +189,7 @@ SELECT
|
||||
$orderedCat['id'] = $cat['cat']['id'];
|
||||
$orderedCat['nb_images'] = isset($nb_photos_in[$cat['cat']['id']]) ? $nb_photos_in[$cat['cat']['id']] : 0;
|
||||
$orderedCat['last_updates'] = $cat['cat']['lastmodified'];
|
||||
$orderedCat['has_access'] = cat_admin_access($cat['cat']['id']);
|
||||
$orderedCat['has_not_access'] = !cat_admin_access($cat['cat']['id']);
|
||||
if (isset($cat['children']))
|
||||
{
|
||||
//Does not update when moving a node
|
||||
|
||||
@@ -97,7 +97,7 @@ $(document).ready(() => {
|
||||
cont.find(".last-update").hide();
|
||||
}
|
||||
|
||||
if (!node.has_access) {
|
||||
if (node.has_not_access) {
|
||||
cont.find(".move-cat-see").addClass("notClickable");
|
||||
}
|
||||
}
|
||||
@@ -335,6 +335,21 @@ $(document).ready(() => {
|
||||
|
||||
if (parent_node) {
|
||||
setSubcatsBadge(parent_node);
|
||||
|
||||
$("#cat-"+parent_node.id).on( 'click', '.move-cat-toogler', function(e) {
|
||||
var node_id = parent_node.id;
|
||||
var node = $('.tree').tree('getNodeById', node_id);
|
||||
if (node) {
|
||||
open_nodes = $('.tree').tree('getState').open_nodes;
|
||||
if (!open_nodes.includes(node_id)) {
|
||||
$(this).html(toggler_open);
|
||||
$('.tree').tree('openNode', node);
|
||||
} else {
|
||||
$(this).html(toggler_close);
|
||||
$('.tree').tree('closeNode', node);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(".move-cat-add").unbind("click").on("click", function () {
|
||||
@@ -345,21 +360,6 @@ $(document).ready(() => {
|
||||
triggerDeleteAlbum($(this).data("id"));
|
||||
});
|
||||
|
||||
$("#cat-"+parent_node.id).on( 'click', '.move-cat-toogler', function(e) {
|
||||
var node_id = parent_node.id;
|
||||
var node = $('.tree').tree('getNodeById', node_id);
|
||||
if (node) {
|
||||
open_nodes = $('.tree').tree('getState').open_nodes;
|
||||
if (!open_nodes.includes(node_id)) {
|
||||
$(this).html(toggler_open);
|
||||
$('.tree').tree('openNode', node);
|
||||
} else {
|
||||
$(this).html(toggler_close);
|
||||
$('.tree').tree('closeNode', node);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
goToNode($(".tree").tree('getNodeById', data.result.id), $(".tree").tree('getNodeById', data.result.id));
|
||||
$('html,body').animate({
|
||||
scrollTop: $("#cat-" + data.result.id).offset().top - screen.height / 2},
|
||||
|
||||
Reference in New Issue
Block a user