From 233b86be56530424d2e4631b5a708825f1b2bbbe Mon Sep 17 00:00:00 2001 From: plegall Date: Sun, 29 Apr 2012 12:36:30 +0000 Subject: feature 2626: add watermark preview (copied from original configuration screen) git-svn-id: http://piwigo.org/svn/trunk@14514 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/themes/default/template/configuration.tpl | 19 +++++++++++++++---- admin/themes/default/theme.css | 2 ++ 2 files changed, 17 insertions(+), 4 deletions(-) (limited to 'admin/themes') diff --git a/admin/themes/default/template/configuration.tpl b/admin/themes/default/template/configuration.tpl index 86f2dc416..10210428a 100644 --- a/admin/themes/default/template/configuration.tpl +++ b/admin/themes/default/template/configuration.tpl @@ -453,6 +453,20 @@ jQuery(document).ready(function(){ {footer_script}{literal} jQuery(document).ready(function() { + function onWatermarkChange() { + var val = jQuery("#wSelect").val(); + if (val.length) { + jQuery("#wImg").attr('src', {/literal}'{$ROOT_URL}'{literal}+val).show(); + } + else { + jQuery("#wImg").hide(); + } + } + + onWatermarkChange(); + + jQuery("#wSelect").bind("change", onWatermarkChange); + if (jQuery("input[name='w[position]']:checked").val() == 'custom') { jQuery("#positionCustomDetails").show(); } @@ -478,12 +492,9 @@ jQuery(document).ready(function() { {html_options options=$watermark_files selected=$watermark.file}
{'... or '|@translate}{'add a new watermark'|@translate} +
-{* -

-*} -