mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
Added rename validation when "Enter" is pressed, and tiptip working when create/move album
This commit is contained in:
@@ -394,6 +394,11 @@ $(document).ready(() => {
|
||||
openRenameAlbumPopIn($(this).find(".move-cat-title").attr("title"));
|
||||
$(".RenameAlbumSubmit").data("cat_id", $(this).attr('data-id'));
|
||||
});
|
||||
$('.tiptip').tipTip({
|
||||
delay: 0,
|
||||
fadeIn: 200,
|
||||
fadeOut: 200
|
||||
});
|
||||
|
||||
updateTitleBadge(nb_albums+1)
|
||||
|
||||
@@ -470,6 +475,12 @@ function openRenameAlbumPopIn(replacedAlbumName) {
|
||||
$(".RenameAlbumTitle span").html(rename_item.replace("%s", replacedAlbumName))
|
||||
$(".RenameAlbumLabelUsername .user-property-input").val(replacedAlbumName);
|
||||
$(".RenameAlbumLabelUsername .user-property-input").focus();
|
||||
|
||||
$(document).unbind("keypress").on('keypress',function(e) {
|
||||
if(e.which == 13) {
|
||||
$(".RenameAlbumSubmit").trigger("click");
|
||||
}
|
||||
});
|
||||
}
|
||||
function closeRenameAlbumPopIn() {
|
||||
$("#RenameAlbum").fadeOut();
|
||||
@@ -551,6 +562,11 @@ function openDeleteAlbumPopIn(cat_to_delete) {
|
||||
openRenameAlbumPopIn($(this).find(".move-cat-title").attr("title"));
|
||||
$(".RenameAlbumSubmit").data("cat_id", $(this).attr('data-id'));
|
||||
});
|
||||
$('.tiptip').tipTip({
|
||||
delay: 0,
|
||||
fadeIn: 200,
|
||||
fadeOut: 200
|
||||
});
|
||||
|
||||
updateTitleBadge(nb_albums-1);
|
||||
setSubcatsBadge(parentOfDeletedNode);
|
||||
@@ -709,6 +725,11 @@ function applyMove(event) {
|
||||
openRenameAlbumPopIn($(this).find(".move-cat-title").attr("title"));
|
||||
$(".RenameAlbumSubmit").data("cat_id", $(this).attr('data-id'));
|
||||
});
|
||||
$('.tiptip').tipTip({
|
||||
delay: 0,
|
||||
fadeIn: 200,
|
||||
fadeOut: 200
|
||||
});
|
||||
})
|
||||
.catch(function (message) {
|
||||
console.log('An error has occured : ' + message );
|
||||
@@ -730,6 +751,11 @@ function applyMove(event) {
|
||||
openRenameAlbumPopIn($(this).find(".move-cat-title").attr("title"));
|
||||
$(".RenameAlbumSubmit").data("cat_id", $(this).attr('data-id'));
|
||||
});
|
||||
$('.tiptip').tipTip({
|
||||
delay: 0,
|
||||
fadeIn: 200,
|
||||
fadeOut: 200
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user