aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2012-04-29 12:36:30 +0000
committerplegall <plg@piwigo.org>2012-04-29 12:36:30 +0000
commit233b86be56530424d2e4631b5a708825f1b2bbbe (patch)
tree3c62adce25d37ea0d8635de15a04cc497b5dfafc /admin
parentd04e3894119ade77bfafd02a29cf368efcdde565 (diff)
feature 2626: add watermark preview (copied from original configuration screen)
git-svn-id: http://piwigo.org/svn/trunk@14514 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/themes/default/template/configuration.tpl19
-rw-r--r--admin/themes/default/theme.css2
2 files changed, 17 insertions, 4 deletions
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}
</select>
<br>{'... or '|@translate}<a href="#" class="addWatermarkOpen" title="{'add a new watermark'|@translate}">{'add a new watermark'|@translate}</a>
+ <br><img id="wImg"></img>
</li>
-{*
-<p><img id="wImg"></img></p>
-*}
-
<li>
<label>
{'Apply watermark if width is bigger than'|@translate}
diff --git a/admin/themes/default/theme.css b/admin/themes/default/theme.css
index f56444877..d85dab084 100644
--- a/admin/themes/default/theme.css
+++ b/admin/themes/default/theme.css
@@ -1111,3 +1111,5 @@ FORM#categoryOrdering .categoryLi:hover p.albumActions {visibility:visible;}
input[type="text"].dError {border-color:#ff7070; background-color:#FFe5e5;}
.dErrorDesc {background-color:red; color:white; padding:0 5px;border-radius:10px; font-weight:bold;cursor:help;}
+
+#wImg {max-height:100px;border:2px solid #ccc;} \ No newline at end of file