mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-05-08 22:35:00 +02:00
related to #1609 added icons to edit album
This commit is contained in:
committed by
Matthieu Leproux
parent
121f887e13
commit
6adbb6e9d4
@@ -16,32 +16,24 @@ $(document).ready(() => {
|
||||
icon = "<span class='%icon%'></span>";
|
||||
title = "<p class='move-cat-title' title='%name%'>%name%</p>";
|
||||
toggler_cont = "<div class='move-cat-toogler' data-id=%id%>%content%</div>";
|
||||
toggler_close = "<span class='icon-left-open'></span> <p>"+str_show_sub+"</p>";
|
||||
toggler_open = "<span class='icon-down-open'></span> <p>"+str_hide_sub+"</p>";
|
||||
actions = '<div class="move-cat-action-cont">'
|
||||
toggler_close = "<span class='icon-left-open'></span>";
|
||||
toggler_open = "<span class='icon-down-open'></span>";
|
||||
actions =
|
||||
'<div class="move-cat-action-cont">'
|
||||
+"<div class='move-cat-action'>"
|
||||
+"<a class='move-cat-edit icon-pencil' href='admin.php?page=album-"+node.id+"'>"+str_edit+"</a>"
|
||||
+"<a class='move-cat-add icon-plus-circled' href='admin.php?page=album-"+node.id+"'></a>"
|
||||
+"<a class='move-cat-edit icon-pencil' href='admin.php?page=album-"+node.id+"'></a>"
|
||||
+"<a class='move-cat-upload icon-upload' href='admin.php?page=photos_add&album="+node.id+"'></a>"
|
||||
+"<a class='move-cat-see icon-eye' href='admin.php?page=album-"+node.id+"'></a>"
|
||||
+"<a class='move-cat-order icon-sort-name-up' href='admin.php?page=album-"+node.id+"'></a>"
|
||||
+"</div>"
|
||||
+'</div>';
|
||||
action_order = "<a data-id='"+node.id+"' class='move-cat-order icon-sort-alt-up'>"+str_apply_order+"</a>";
|
||||
action_order = "<a data-id='"+node.id+"' class='move-cat-delete icon-trash'></a>";
|
||||
|
||||
cont = li.find('.jqtree-element');
|
||||
cont.addClass('move-cat-container');
|
||||
cont.attr('id', 'cat-'+node.id)
|
||||
cont.html('');
|
||||
cont.append($(icon.replace(/%icon%/g, 'icon-grip-vertical-solid')));
|
||||
|
||||
if (node.children.length != 0) {
|
||||
cont.append($(icon.replace(/%icon%/g, 'icon-sitemap')));
|
||||
} else {
|
||||
cont.append($(icon.replace(/%icon%/g, 'icon-folder-open')));
|
||||
}
|
||||
|
||||
cont.append($(title.replace(/%name%/g, node.name)));
|
||||
|
||||
if (node.status == 'private') {
|
||||
cont.find(".move-cat-title").addClass('icon-lock');
|
||||
}
|
||||
|
||||
cont.append(actions);
|
||||
|
||||
@@ -59,9 +51,23 @@ $(document).ready(() => {
|
||||
cont.find('.move-cat-action').append(action_order);
|
||||
}
|
||||
|
||||
cont.append($(icon.replace(/%icon%/g, 'icon-grip-vertical-solid')));
|
||||
|
||||
if (node.children.length != 0) {
|
||||
cont.append($(icon.replace(/%icon%/g, 'icon-sitemap')));
|
||||
} else {
|
||||
cont.append($(icon.replace(/%icon%/g, 'icon-folder-open')));
|
||||
}
|
||||
|
||||
cont.append($(title.replace(/%name%/g, node.name)));
|
||||
|
||||
if (node.status == 'private') {
|
||||
cont.find(".move-cat-title").addClass('icon-lock');
|
||||
}
|
||||
|
||||
var colors = ["icon-red", "icon-blue", "icon-yellow", "icon-purple", "icon-green"];
|
||||
var colorId = Number(node.id)%5;
|
||||
cont.find(".icon-folder-open, .icon-sitemap").addClass(colors[colorId]);
|
||||
cont.find("span.icon-folder-open, span.icon-sitemap").addClass(colors[colorId]);
|
||||
}
|
||||
|
||||
var url_split = window.location.href.split("#");
|
||||
@@ -173,8 +179,12 @@ $(document).ready(() => {
|
||||
$(".albumsFilter .search-input").on('input', function () {
|
||||
// console.log($(this).val());
|
||||
//close the tree
|
||||
closeTree($('.tree'));
|
||||
$(".jqtree-element").removeClass('animateFocus').removeClass('imune');
|
||||
|
||||
if ($(".albumsFilter .search-input").val().length >= 2) {
|
||||
closeTree($('.tree'));
|
||||
$(".jqtree-element").removeClass('animateFocus').removeClass('imune');
|
||||
console.log("here");
|
||||
}
|
||||
|
||||
if ($(".albumsFilter .search-input").val().length >= 3) {
|
||||
$('.tree').tree('getNodeByCallback',
|
||||
|
||||
@@ -4174,7 +4174,7 @@ FORM#categoryOrdering p.albumActions .userSeparator {margin:0 5px;}
|
||||
.move-cat-container .move-cat-toogler {
|
||||
display: flex;
|
||||
color: #FFBD4D;
|
||||
margin-left: 15px;
|
||||
margin-left: 5px;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
z-index: 2;
|
||||
@@ -4182,7 +4182,11 @@ FORM#categoryOrdering p.albumActions .userSeparator {margin:0 5px;}
|
||||
}
|
||||
|
||||
.move-cat-container .move-cat-toogler .icon-left-open{
|
||||
transform: rotate(90deg);
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
.move-cat-container .move-cat-toogler{
|
||||
color: #ff7700;
|
||||
transform: scale(1.4);
|
||||
}
|
||||
|
||||
.move-cat-action-cont {
|
||||
@@ -4210,19 +4214,21 @@ FORM#categoryOrdering p.albumActions .userSeparator {margin:0 5px;}
|
||||
}
|
||||
|
||||
.move-cat-action a {
|
||||
padding: 30px 15px;
|
||||
padding: 30px 10px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
height: 100%;
|
||||
border-left: 1px solid #00000012;
|
||||
background-color: #00000003;
|
||||
text-align: center;
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
.move-cat-action a:last-child {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.move-cat-action a:hover {
|
||||
color: #444;
|
||||
color: #ff7700;
|
||||
text-decoration: none;
|
||||
background-color: #FFA646;
|
||||
}
|
||||
|
||||
.cat-move-order-popin {
|
||||
|
||||
Reference in New Issue
Block a user