Index: /extensions/photoWidget/CHANGELOG =================================================================== --- /extensions/photoWidget/CHANGELOG (revision 19907) +++ /extensions/photoWidget/CHANGELOG (revision 19908) @@ -1,2 +1,7 @@ +photoWidget 0.3.0 - 2013-01-06 +================================ +* Make plugin compatible with piwigo 2.4 +* Improve selection of albums (auto-complete) + photoWidget 0.3.0 - 2011-05-22 ================================ Index: /extensions/photoWidget/MANIFEST =================================================================== --- /extensions/photoWidget/MANIFEST (revision 19907) +++ /extensions/photoWidget/MANIFEST (revision 19908) @@ -13,4 +13,7 @@ photoWidget/language/en_UK/index.php photoWidget/language/en_UK/description.txt +photoWidget/language/pt_PT/plugin.lang.php +photoWidget/language/pt_PT/index.php +photoWidget/language/pt_PT/description.txt photoWidget/language/de_DE/plugin.lang.php photoWidget/language/de_DE/index.php @@ -22,4 +25,7 @@ photoWidget/language/ru_RU/index.php photoWidget/language/ru_RU/description.txt +photoWidget/language/da_DK/plugin.lang.php +photoWidget/language/da_DK/index.php +photoWidget/language/da_DK/description.txt photoWidget/language/tr_TR/plugin.lang.php photoWidget/language/tr_TR/index.php @@ -31,10 +37,15 @@ photoWidget/language/cs_CZ/index.php photoWidget/language/cs_CZ/description.txt -photoWidget/language/no_NO/plugin.lang.php -photoWidget/language/no_NO/index.php -photoWidget/language/no_NO/description.txt +photoWidget/language/nb_NO/plugin.lang.php +photoWidget/language/nb_NO/index.php +photoWidget/language/nb_NO/description.txt photoWidget/language/pl_PL/plugin.lang.php photoWidget/language/pl_PL/index.php photoWidget/language/pl_PL/description.txt +photoWidget/language/uk_UA/plugin.lang.php +photoWidget/language/uk_UA/index.php +photoWidget/language/el_GR/plugin.lang.php +photoWidget/language/el_GR/index.php +photoWidget/language/el_GR/description.txt photoWidget/language/sk_SK/plugin.lang.php photoWidget/language/sk_SK/index.php @@ -43,4 +54,7 @@ photoWidget/language/it_IT/index.php photoWidget/language/it_IT/description.txt +photoWidget/language/sv_SE/plugin.lang.php +photoWidget/language/sv_SE/index.php +photoWidget/language/sv_SE/description.txt photoWidget/language/hu_HU/plugin.lang.php photoWidget/language/hu_HU/index.php Index: /extensions/photoWidget/admin.php =================================================================== --- /extensions/photoWidget/admin.php (revision 19907) +++ /extensions/photoWidget/admin.php (revision 19908) @@ -3,9 +3,9 @@ // | photoWidget - a plugin for Piwigo | // +-----------------------------------------------------------------------+ -// | Copyright(C) 2010-2011 Nicolas Roudaire http://www.nikrou.net | +// | Copyright(C) 2010-2013 Nicolas Roudaire http://www.nikrou.net | // +-----------------------------------------------------------------------+ // | This program is free software; you can redistribute it and/or modify | -// | it under the terms of the GNU General Public License as published by | -// | the Free Software Foundation | +// | it under the terms of the GNU General Public License version 2 as | +// | published by the Free Software Foundation | // | | // | This program is distributed in the hope that it will be useful, but | @@ -17,5 +17,5 @@ // | along with this program; if not, write to the Free Software | // | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | -// | MA 02110-1301 USA. | +// | MA 02110-1301 USA | // +-----------------------------------------------------------------------+ @@ -80,13 +80,11 @@ $query = ' -SELECT id,name +SELECT id,name,global_rank,uppercats FROM '.CATEGORIES_TABLE; -$all_categories = simple_hash_from_query($query, 'id', 'name'); +display_select_cat_wrapper($query, $me->pw_categories, 'all_categories'); $template->set_filenames(array('plugin_admin_content' => PW_TEMPLATE . '/admin.tpl')); $template->assign('PW_CAT_CHOICES', array(1 => l10n('Yes'), 0 => l10n('No'))); -$template->assign('ALL_CATEGORIES', $all_categories); -$template->assign('PW_CATEGORIES', $me->pw_categories); $template->assign('PW_ALL_CATEGORIES', $me->pw_all_categories); $template->assign('PWG_PHOTO_WIDGET_PLUGIN_CSS', PW_CSS); Index: /extensions/photoWidget/css/admin.css =================================================================== --- /extensions/photoWidget/css/admin.css (revision 19907) +++ /extensions/photoWidget/css/admin.css (revision 19908) @@ -32,4 +32,5 @@ p.pw-categories select { float: left; + width: 700px; } Index: /extensions/photoWidget/default_values.inc.php =================================================================== --- /extensions/photoWidget/default_values.inc.php (revision 19907) +++ /extensions/photoWidget/default_values.inc.php (revision 19908) @@ -3,9 +3,9 @@ // | photoWidget - a plugin for Piwigo | // +-----------------------------------------------------------------------+ -// | Copyright(C) 2010 Nicolas Roudaire http://www.nikrou.net | +// | Copyright(C) 2010-2013 Nicolas Roudaire http://www.nikrou.net | // +-----------------------------------------------------------------------+ // | This program is free software; you can redistribute it and/or modify | -// | it under the terms of the GNU General Public License as published by | -// | the Free Software Foundation | +// | it under the terms of the GNU General Public License version 2 as | +// | published by the Free Software Foundation | // | | // | This program is distributed in the hope that it will be useful, but | @@ -17,5 +17,5 @@ // | along with this program; if not, write to the Free Software | // | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | -// | MA 02110-1301 USA. | +// | MA 02110-1301 USA | // +-----------------------------------------------------------------------+ Index: /extensions/photoWidget/include/photoWidgetConfig.class.php =================================================================== --- /extensions/photoWidget/include/photoWidgetConfig.class.php (revision 19907) +++ /extensions/photoWidget/include/photoWidgetConfig.class.php (revision 19908) @@ -3,9 +3,9 @@ // | photoWidget - a plugin for Piwigo | // +-----------------------------------------------------------------------+ -// | Copyright(C) 2010 Nicolas Roudaire http://www.nikrou.net | +// | Copyright(C) 2010-2013 Nicolas Roudaire http://www.nikrou.net | // +-----------------------------------------------------------------------+ // | This program is free software; you can redistribute it and/or modify | -// | it under the terms of the GNU General Public License as published by | -// | the Free Software Foundation | +// | it under the terms of the GNU General Public License version 2 as | +// | published by the Free Software Foundation | // | | // | This program is distributed in the hope that it will be useful, but | @@ -17,5 +17,5 @@ // | along with this program; if not, write to the Free Software | // | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | -// | MA 02110-1301 USA. | +// | MA 02110-1301 USA | // +-----------------------------------------------------------------------+ @@ -53,5 +53,5 @@ private function get_config_file_dir() { - return $GLOBALS['conf']['local_data_dir'].'/plugins/'; + return $GLOBALS['conf']['data_location'].'/plugins/'; } Index: /extensions/photoWidget/include/photoWidgetContent.class.php =================================================================== --- /extensions/photoWidget/include/photoWidgetContent.class.php (revision 19907) +++ /extensions/photoWidget/include/photoWidgetContent.class.php (revision 19908) @@ -3,9 +3,9 @@ // | photoWidget - a plugin for Piwigo | // +-----------------------------------------------------------------------+ -// | Copyright(C) 2010-2011 Nicolas Roudaire http://www.nikrou.net | +// | Copyright(C) 2010-2013 Nicolas Roudaire http://www.nikrou.net | // +-----------------------------------------------------------------------+ // | This program is free software; you can redistribute it and/or modify | -// | it under the terms of the GNU General Public License as published by | -// | the Free Software Foundation | +// | it under the terms of the GNU General Public License version 2 as | +// | published by the Free Software Foundation | // | | // | This program is distributed in the hope that it will be useful, but | @@ -17,5 +17,5 @@ // | along with this program; if not, write to the Free Software | // | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | -// | MA 02110-1301 USA. | +// | MA 02110-1301 USA | // +-----------------------------------------------------------------------+ Index: /extensions/photoWidget/init.php =================================================================== --- /extensions/photoWidget/init.php (revision 19907) +++ /extensions/photoWidget/init.php (revision 19908) @@ -3,9 +3,9 @@ // | photoWidget - a plugin for Piwigo | // +-----------------------------------------------------------------------+ -// | Copyright(C) 2010 Nicolas Roudaire http://www.nikrou.net | +// | Copyright(C) 2010-2013 Nicolas Roudaire http://www.nikrou.net | // +-----------------------------------------------------------------------+ // | This program is free software; you can redistribute it and/or modify | -// | it under the terms of the GNU General Public License as published by | -// | the Free Software Foundation | +// | it under the terms of the GNU General Public License version 2 as | +// | published by the Free Software Foundation | // | | // | This program is distributed in the hope that it will be useful, but | @@ -17,5 +17,5 @@ // | along with this program; if not, write to the Free Software | // | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | -// | MA 02110-1301 USA. | +// | MA 02110-1301 USA | // +-----------------------------------------------------------------------+ Index: /extensions/photoWidget/language/ar_SA/index.php =================================================================== --- /extensions/photoWidget/language/ar_SA/index.php (revision 19907) +++ /extensions/photoWidget/language/ar_SA/index.php (revision 19908) @@ -1,11 +1,11 @@ Index: /extensions/photoWidget/language/pl_PL/index.php =================================================================== --- /extensions/photoWidget/language/pl_PL/index.php (revision 19907) +++ /extensions/photoWidget/language/pl_PL/index.php (revision 19908) @@ -1,11 +1,11 @@ Index: /extensions/photoWidget/template/admin.tpl =================================================================== --- /extensions/photoWidget/template/admin.tpl (revision 19907) +++ /extensions/photoWidget/template/admin.tpl (revision 19908) @@ -1,5 +1,7 @@ {combine_css path="$PWG_PHOTO_WIDGET_PLUGIN_CSS/admin.css"} +{combine_css path="themes/default/js/plugins/chosen.css"} {combine_css path="$PWG_PHOTO_WIDGET_PLUGIN_CSS/colorpicker.css"} +{combine_script id="jquery.chosen" load="footer" path="themes/default/js/plugins/chosen.jquery.min.js"} {combine_script id="colorpicker" require="jquery" path="$PWG_PHOTO_WIDGET_PLUGIN_JS/colorpicker.js"} @@ -7,31 +9,40 @@ {literal} $(function() { -$('input[name=pw_all_categories]').change(function() { -if ($(this).attr('value')==0) { -$('#pw-select-categories').removeClass('hide'); -} else { -$('#pw-select-categories').addClass('hide'); -} + $('input.pwg-picker') + .each(function() { + if ($(this).val() !== undefined) { + $(this).css('background-color', '#'+$(this).val()); + } + }) + .ColorPicker({ + onSubmit: function(hsb, hex, rgb, el) { + $(el).val(hex); + $(el).ColorPickerHide(); + $(el).css('background-color', '#'+hex); + }, + onBeforeShow: function () { + $(this).ColorPickerSetColor(this.value); + } + }) + .bind('keyup', function(){ + $(this).ColorPickerSetColor(this.value); + }); }); +{/literal} +{/footer_script} -$('input.pwg-picker') - .each(function() { - if ($(this).val() !== undefined) { - $(this).css('background-color', '#'+$(this).val()); - } - }) - .ColorPicker({ - onSubmit: function(hsb, hex, rgb, el) { - $(el).val(hex); - $(el).ColorPickerHide(); - $(el).css('background-color', '#'+hex); - }, - onBeforeShow: function () { - $(this).ColorPickerSetColor(this.value); - } -}) -.bind('keyup', function(){ - $(this).ColorPickerSetColor(this.value); -}); + +{footer_script require="jquery.chosen"} +{literal} +$(function() { + $('input[name=pw_all_categories]').change(function() { + if ($(this).attr('value')==0) { + $('#pw-select-categories').removeClass('hide'); + } else { + $('#pw-select-categories').addClass('hide'); + } + }); + + $('#pw-select-categories select').chosen(); }); {/literal} @@ -59,7 +70,7 @@
Index: /extensions/photoWidget/template/liste.xml =================================================================== --- /extensions/photoWidget/template/liste.xml (revision 19907) +++ /extensions/photoWidget/template/liste.xml (revision 19908) @@ -3,5 +3,5 @@ $image) { - printf('