diff --git a/admin/themes/default/js/albums.js b/admin/themes/default/js/albums.js
index af036b00d..92dc14014 100644
--- a/admin/themes/default/js/albums.js
+++ b/admin/themes/default/js/albums.js
@@ -13,7 +13,7 @@ $(document).ready(() => {
function createAlbumNode(node, li) {
icon = "";
- title = "%name%
";
+ title = "%name%
";
toggler_cont = "
%content%
";
toggler_close = "";
toggler_open = "";
@@ -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 () {
diff --git a/admin/themes/default/template/albums.tpl b/admin/themes/default/template/albums.tpl
index 6f94512a8..ad26df83c 100644
--- a/admin/themes/default/template/albums.tpl
+++ b/admin/themes/default/template/albums.tpl
@@ -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}';
- {'Créer un nouvel album à la racine'|translate}
+
diff --git a/language/en_UK/admin.lang.php b/language/en_UK/admin.lang.php
index 36150f22c..d38867fa1 100644
--- a/language/en_UK/admin.lang.php
+++ b/language/en_UK/admin.lang.php
@@ -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';
diff --git a/language/fr_FR/admin.lang.php b/language/fr_FR/admin.lang.php
index f2b51f20b..f95e25e32 100644
--- a/language/fr_FR/admin.lang.php
+++ b/language/fr_FR/admin.lang.php
@@ -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';