From ad10a97f4ac3ffad5508b90da45b5c5a63db95ff Mon Sep 17 00:00:00 2001 From: mistic100 Date: Sat, 24 May 2014 16:24:52 +0000 Subject: feature 3077 : use selectize on batch_manager_global, cat_modify and photos_add_direct + rewrite "add album" popup (more flexible and working with selectize) git-svn-id: http://piwigo.org/svn/trunk@28533 68402e56-0260-453c-a942-63ccdbb3a9ee --- .../default/template/include/add_album.inc.tpl | 83 ++-------------------- .../default/template/include/colorbox.inc.tpl | 2 +- 2 files changed, 7 insertions(+), 78 deletions(-) (limited to 'admin/themes/default/template/include') diff --git a/admin/themes/default/template/include/add_album.inc.tpl b/admin/themes/default/template/include/add_album.inc.tpl index 08ada07a4..f2d87146f 100644 --- a/admin/themes/default/template/include/add_album.inc.tpl +++ b/admin/themes/default/template/include/add_album.inc.tpl @@ -1,86 +1,15 @@ -{footer_script}{literal} -jQuery(document).ready(function(){ - jQuery(".addAlbumOpen").colorbox({ - inline: true, - href: "#addAlbumForm", - onComplete: function() { - var $albumSelect = jQuery("#albumSelect"); +{include file='include/colorbox.inc.tpl'} - jQuery("input[name=category_name]").focus(); - - jQuery("#category_parent").html('') - .append($albumSelect.html()) - .val($albumSelect.val() || 0); - } - }); - - jQuery("#addAlbumForm form").submit(function() { - jQuery("#categoryNameError").text(""); - - var parent_id = jQuery("select[name=category_parent] option:selected").val(), - name = jQuery("input[name=category_name]").val(); - - jQuery.ajax({ - url: "ws.php", - dataType: 'json', - data: { - format: 'json', - method: 'pwg.categories.add', - parent: parent_id, - name: name - }, - beforeSend: function() { - jQuery("#albumCreationLoading").show(); - }, - success: function(data) { - jQuery("#albumCreationLoading").hide(); - jQuery(".addAlbumOpen").colorbox.close(); - - var newAlbum = data.result.id, - newAlbum_name = ''; - - if (parent_id!=0) { - newAlbum_name = jQuery("#category_parent").find("option[value="+ parent_id +"]").text() +' / '; - } - newAlbum_name+= name; - - var new_option = jQuery("