Skip to content

Commit

Permalink
feature 2626: add watermark preview (copied from original configurati…
Browse files Browse the repository at this point in the history
…on screen)

git-svn-id: http://piwigo.org/svn/trunk@14514 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
plegall committed Apr 29, 2012
1 parent d04e389 commit 233b86b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
19 changes: 15 additions & 4 deletions admin/themes/default/template/configuration.tpl
Expand Up @@ -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();
}
Expand All @@ -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}
Expand Down
2 changes: 2 additions & 0 deletions admin/themes/default/theme.css
Expand Up @@ -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;}
Binary file added themes/default/watermarks/copyright.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 233b86b

Please sign in to comment.