[26144] | 1 | {combine_script id='jquery.colorbox' load='footer' require='jquery' path='themes/default/js/plugins/jquery.colorbox.min.js'} |
---|
| 2 | {combine_css id='colorbox' path='themes/default/js/plugins/colorbox/style2/colorbox.css'} |
---|
[26140] | 3 | |
---|
[26144] | 4 | {footer_script require='jquery,jquery.colorbox'} |
---|
| 5 | (function($){ |
---|
| 6 | $('#open_stc_standalone').colorbox({ |
---|
| 7 | inline: true |
---|
[26140] | 8 | }); |
---|
[26144] | 9 | |
---|
| 10 | var bg_color = 'white'; |
---|
| 11 | $.each(['#the_page #content', 'body'], function(i, selector) { |
---|
| 12 | var color = $(selector).css('background-color'); |
---|
| 13 | if (color && color!='transparent') { |
---|
| 14 | bg_color = color; |
---|
| 15 | return false; |
---|
| 16 | } |
---|
| 17 | }); |
---|
| 18 | $('#stc_standalone').css('background-color', bg_color); |
---|
| 19 | |
---|
| 20 | {if $STC.ALLOW_GLOBAL} |
---|
| 21 | $("#stc_submit").hide(); |
---|
| 22 | $("#stc_standalone input[name='stc_mode']").change(function() { |
---|
| 23 | $("#stc_submit").show(); |
---|
| 24 | $.colorbox.resize({ speed:0 }); |
---|
| 25 | }); |
---|
[26140] | 26 | {/if} |
---|
| 27 | |
---|
[26144] | 28 | {if !isset($STC_SUBSCRIBED) and $STC.ASK_MAIL} |
---|
| 29 | var $stc_email_input = $("#addComment input[name='email']"); |
---|
| 30 | var stc_bordercolor = $stc_email_input.css('border-color'); |
---|
[26140] | 31 | |
---|
[26144] | 32 | $("#addComment input[name='stc_mode']").change(function() { |
---|
| 33 | if ($(this).val() != "-1") { |
---|
| 34 | if ($stc_email_input.val()=="") { |
---|
| 35 | $stc_email_input.css("border-color", "red"); |
---|
| 36 | } |
---|
| 37 | } |
---|
| 38 | else { |
---|
| 39 | $stc_email_input.css("border-color", stc_bordercolor); |
---|
| 40 | } |
---|
| 41 | }); |
---|
| 42 | $stc_email_input.change(function() { |
---|
| 43 | $(this).css('border-color', stc_bordercolor); |
---|
| 44 | }); |
---|
| 45 | {/if} |
---|
| 46 | }(jQuery)); |
---|
| 47 | {/footer_script} |
---|
| 48 | |
---|
| 49 | <div style="display:none"> |
---|
| 50 | <form method="post" action="{$comment_add.F_ACTION}" id="stc_standalone" style="padding:10px;min-width:350px;"> |
---|
| 51 | {if $STC.ON_PICTURE} |
---|
| 52 | {if $STC.ALLOW_GLOBAL} |
---|
| 53 | <label><input type="radio" name="stc_mode" value="image"> {'this picture'|translate}</label> |
---|
| 54 | {if $STC.ALLOW_ALBUM_IMAGES}<label><input type="radio" name="stc_mode" value="album-images"> {'all pictures of this album'|translate}</label>{/if} |
---|
| 55 | <label><input type="radio" name="stc_mode" value="all-images"> {'all pictures of the gallery'|translate}</label> |
---|
| 56 | {else} |
---|
| 57 | <input type="hidden" name="stc_mode" value="image"> |
---|
[26140] | 58 | {/if} |
---|
[26144] | 59 | {else if $STC.ON_ALBUM} |
---|
| 60 | {if $STC.ALLOW_GLOBAL} |
---|
| 61 | <label><input type="radio" name="stc_mode" value="album"> {'this album'|translate}</label> |
---|
| 62 | <label><input type="radio" name="stc_mode" value="all-albums"> {'all albums of the gallery'|translate}</label> |
---|
| 63 | {else} |
---|
| 64 | <input type="hidden" name="stc_mode" value="album"> |
---|
| 65 | {/if} |
---|
| 66 | {/if} |
---|
| 67 | {if $STC.ALLOW_GLOBAL and $STC.ASK_MAIL}<br>{/if} |
---|
[26140] | 68 | <span id="stc_submit"> |
---|
[26144] | 69 | {if $STC.ASK_MAIL} |
---|
| 70 | <label>{'Email'|translate} <input type="text" name="stc_mail" size="30"></label> |
---|
[26140] | 71 | {/if} |
---|
| 72 | <label><input type="submit" name="stc_submit" value="{'Subscribe'|translate}"></label> |
---|
| 73 | </span> |
---|
[26144] | 74 | </form> |
---|
| 75 | </div> |
---|