mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 17:23:04 +02:00
related to #1609 fixing add album popin title and rename popin title
This commit is contained in:
@@ -13,7 +13,7 @@ $(document).ready(() => {
|
||||
|
||||
function createAlbumNode(node, li) {
|
||||
icon = "<span class='%icon%'></span>";
|
||||
title = "<span data-id='"+node.id+"' class='move-cat-title-container'><p class='move-cat-title' title='%name%'>%name%</p> <span class='icon-pencil'></span> </span>";
|
||||
title = "<span data-id='"+node.id+"' class='move-cat-title-container'><p class='move-cat-title' title="+node.name+">%name%</p> <span class='icon-pencil'></span> </span>";
|
||||
toggler_cont = "<div class='move-cat-toogler' data-id=%id%>%content%</div>";
|
||||
toggler_close = "<span class='icon-left-open'></span>";
|
||||
toggler_open = "<span class='icon-down-open'></span>";
|
||||
@@ -150,7 +150,7 @@ $(document).ready(() => {
|
||||
nodeToGo = $('.tree').tree('getNodeById', catToOpen);
|
||||
|
||||
goToNode(nodeToGo, nodeToGo);
|
||||
if (nodeToGo.children) {move-cat-delete-small
|
||||
if (nodeToGo.children) {
|
||||
$(".tree").tree("openNode", nodeToGo, false);
|
||||
}
|
||||
}
|
||||
@@ -293,15 +293,15 @@ $(document).ready(() => {
|
||||
$(".AddAlbumErrors").hide();
|
||||
$(".DeleteAlbumErrors").hide();
|
||||
$(".add-album-button").on("click", function () {
|
||||
openAddAlbumPopIn();
|
||||
openAddAlbumPopIn(0);
|
||||
$(".AddAlbumSubmit").data("a-parent", 0);
|
||||
})
|
||||
$(".move-cat-add").on("click", function () {
|
||||
openAddAlbumPopIn();
|
||||
openAddAlbumPopIn($(this).data("aid"));
|
||||
$(".AddAlbumSubmit").data("a-parent", $(this).data("aid"));
|
||||
})
|
||||
$(".move-cat-add-small").on("click", function () {
|
||||
openAddAlbumPopIn();
|
||||
openAddAlbumPopIn($(this).data("aid"));
|
||||
$(".AddAlbumSubmit").data("a-parent", $(this).data("aid"));
|
||||
})
|
||||
$(".CloseAddAlbum").on("click", function () {
|
||||
@@ -372,11 +372,11 @@ $(document).ready(() => {
|
||||
}
|
||||
|
||||
$(".move-cat-add").unbind("click").on("click", function () {
|
||||
openAddAlbumPopIn();
|
||||
openAddAlbumPopIn($(this).data("aid"));
|
||||
$(".AddAlbumSubmit").data("a-parent", $(this).data("aid"));
|
||||
});
|
||||
$(".move-cat-add-small").unbind("click").on("click", function () {
|
||||
openAddAlbumPopIn();
|
||||
openAddAlbumPopIn($(this).data("aid"));
|
||||
$(".AddAlbumSubmit").data("a-parent", $(this).data("aid"));
|
||||
});
|
||||
$(".move-cat-delete").on("click", function () {
|
||||
@@ -436,7 +436,12 @@ $(document).ready(() => {
|
||||
|
||||
});
|
||||
|
||||
function openAddAlbumPopIn() {
|
||||
function openAddAlbumPopIn(parentAlbumId) {
|
||||
if (parentAlbumId != 0) {
|
||||
$("#AddAlbum .AddIconTitle span").html(add_sub_album_of.replace("%s", $(".tree").tree('getNodeById', parentAlbumId).name));
|
||||
} else {
|
||||
$("#AddAlbum .AddIconTitle span").html(add_album_root_title)
|
||||
}
|
||||
$("#AddAlbum").fadeIn();
|
||||
$(".AddAlbumLabelUsername .user-property-input").val('');
|
||||
$(".AddAlbumLabelUsername .user-property-input").focus();
|
||||
@@ -514,11 +519,11 @@ function openDeleteAlbumPopIn(cat_to_delete) {
|
||||
$('.tree').tree('removeNode', node);
|
||||
|
||||
$(".move-cat-add").on("click", function () {
|
||||
openAddAlbumPopIn();
|
||||
openAddAlbumPopIn($(this).data("aid"));
|
||||
$(".AddAlbumSubmit").data("a-parent", $(this).data("aid"));
|
||||
});
|
||||
$(".move-cat-add-small").on("click", function () {
|
||||
openAddAlbumPopIn();
|
||||
openAddAlbumPopIn($(this).data("aid"));
|
||||
$(".AddAlbumSubmit").data("a-parent", $(this).data("aid"));
|
||||
});
|
||||
$(".move-cat-delete").on("click", function () {
|
||||
@@ -668,11 +673,11 @@ function applyMove(event) {
|
||||
setSubcatsBadge($('.tree').tree('getNodeById', moveParent));
|
||||
|
||||
$(".move-cat-add").unbind("click").on("click", function () {
|
||||
openAddAlbumPopIn();
|
||||
openAddAlbumPopIn($(this).data("aid"));
|
||||
$(".AddAlbumSubmit").data("a-parent", $(this).data("aid"));
|
||||
});
|
||||
$(".move-cat-add-small").unbind("click").on("click", function () {
|
||||
openAddAlbumPopIn();
|
||||
openAddAlbumPopIn($(this).data("aid"));
|
||||
$(".AddAlbumSubmit").data("a-parent", $(this).data("aid"));
|
||||
});
|
||||
$(".move-cat-delete").on("click", function () {
|
||||
@@ -689,11 +694,11 @@ function applyMove(event) {
|
||||
.catch(function (message) {
|
||||
console.log('An error has occured : ' + message );
|
||||
$(".move-cat-add").unbind("click").on("click", function () {
|
||||
openAddAlbumPopIn();
|
||||
openAddAlbumPopIn($(this).data("aid"));
|
||||
$(".AddAlbumSubmit").data("a-parent", $(this).data("aid"));
|
||||
});
|
||||
$(".move-cat-add-small").unbind("click").on("click", function () {
|
||||
openAddAlbumPopIn();
|
||||
openAddAlbumPopIn($(this).data("aid"));
|
||||
$(".AddAlbumSubmit").data("a-parent", $(this).data("aid"));
|
||||
});
|
||||
$(".move-cat-delete").on("click", function () {
|
||||
|
||||
@@ -8,9 +8,9 @@ var str_apply_order_raw = "{'apply automatic sort order'|translate}";
|
||||
var str_apply_order = str_apply_order_raw.charAt(0).toUpperCase() + str_apply_order_raw.slice(1);
|
||||
var str_edit = "{'Edit album'|@translate}";
|
||||
var str_are_you_sure = "{'The status of the album \'%s\' and its sub-albums will change to private. Are you sure?'|@translate}";
|
||||
var str_yes_change_parent = "{'Yes change parent anyway'|@translate}"
|
||||
var str_no_change_parent = "{'No, don\'t move this album here'|@translate}"
|
||||
var str_root = "{'Root'|@translate}"
|
||||
var str_yes_change_parent = "{'Yes change parent anyway'|@translate}";
|
||||
var str_no_change_parent = "{'No, don\'t move this album here'|@translate}";
|
||||
var str_root = "{'Root'|@translate}";
|
||||
var openCat = {$open_cat};
|
||||
var nb_albums = {$nb_albums};
|
||||
|
||||
@@ -32,12 +32,15 @@ const has_images_becomming_orphans = '{'delete album and the %d orphan photos'|@
|
||||
const has_images_recursives = '{'delete only album, not photos'|@translate|escape:javascript}';
|
||||
const rename_item = '{'Rename "%s"'|@translate|escape:javascript}';
|
||||
|
||||
const str_add_album = '{'Add album'|@translate|escape:javascript}';
|
||||
const str_add_album = '{'Add Album'|@translate|escape:javascript}';
|
||||
const str_edit_album = '{'Edit album'|@translate|escape:javascript}';
|
||||
const str_add_photo = '{'Add Photos'|@translate|escape:javascript}';
|
||||
const str_visit_gallery = '{'Visit Gallery'|@translate|escape:javascript}';
|
||||
const str_sort_order = '{'Automatic sort order'|@translate|escape:javascript}';
|
||||
const str_delete_album = '{'Delete album'|@translate|escape:javascript}';
|
||||
|
||||
const add_album_root_title = '{'Create a new album at root'|@translate|escape:javascript}';
|
||||
const add_sub_album_of = '{'Create a sub-album of "%s"'|@translate|escape:javascript}';
|
||||
{/footer_script}
|
||||
|
||||
{combine_script id='albums' load='footer' path='admin/themes/default/js/albums.js'}
|
||||
@@ -130,7 +133,7 @@ const str_delete_album = '{'Delete album'|@translate|escape:javascript}';
|
||||
<span class="AddIcon icon-blue icon-plus-circled"></span>
|
||||
</div>
|
||||
<div class="AddIconTitle">
|
||||
<span>{'Créer un nouvel album à la racine'|translate}</span>
|
||||
<span></span>
|
||||
</div>
|
||||
|
||||
<div class="AddAlbumInputContainer">
|
||||
|
||||
@@ -1276,6 +1276,8 @@ $lang['More information'] = 'More information';
|
||||
$lang['This photo is an orphan'] = 'This photo is an orphan';
|
||||
$lang['This albums is already in related categories list'] = 'This albums is already in related albums list';
|
||||
$lang['No search in progress'] = 'No search in progress';
|
||||
$lang['Create a new album at root'] = 'Create a new album at root';
|
||||
$lang['Create a sub-album of "%s"'] = 'Create a sub-album of "%s"';
|
||||
|
||||
$lang['Visited'] = 'Visited';
|
||||
$lang['Downloaded'] = 'Downloaded';
|
||||
|
||||
@@ -1270,6 +1270,8 @@ $lang['Advanced features'] = 'Fonctionnalités avancées';
|
||||
$lang['Global Gallery Actions'] = 'Actions sur la gallerie';
|
||||
$lang['Purge Actions'] = 'Actions de purge';
|
||||
$lang['Purge Cache'] = 'Purger le cache';
|
||||
$lang['Create a new album at root'] = 'Créer un nouvel album à la racine';
|
||||
$lang['Create a sub-album of "%s"'] = 'Créer un sous-album de "%s"';
|
||||
$lang['Rename "%s"'] = 'Renommer "%s"';
|
||||
$lang['Yes, rename'] = 'Oui, renommer';
|
||||
$lang['Tag name'] = 'Nom du tag';
|
||||
|
||||
Reference in New Issue
Block a user