Ignore:
Timestamp:
Mar 7, 2013, 10:06:42 PM (11 years ago)
Author:
mistic100
Message:

too many changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Subscribe_to_comments/template/form_comment.tpl

    r15677 r21340  
    11{if !$SUBSCRIBED_ALL_IMAGES && !$SUBSCRIBED_ALL_ALBUMS && !$SUBSCRIBED_ALBUM && !$SUBSCRIBED_ALBUM_IMAGES && !$SUBSCRIBED_IMAGE}
     2
    23<p>
    34  {'Notify me of followup comments'|@translate} :<br>
     
    56  {if $STC_ON_PICTURE}
    67    {if $STC_ALLOW_GLOBAL}
    7       <label><input type="radio" name="stc_mode" value="image" {if $STC_MODE == "image"}checked="checked"{/if}> {'this picture'|@translate}</label>
    8       {if $STC_ALLOW_ALBUM_IMAGES}<label><input type="radio" name="stc_mode" value="album-images" {if $STC_MODE == "album-images"}checked="checked"{/if}> {'all pictures of this album'|@translate}</label>{/if}
    9       <label><input type="radio" name="stc_mode" value="all-images" {if $STC_MODE == "all-images"}checked="checked"{/if}> {'all pictures of the gallery'|@translate}</label>
     8      <label><input type="radio" name="stc_mode" value="image" {if $STC_MODE=="image"}checked="checked"{/if}> {'this picture'|@translate}</label>
     9      {if $STC_ALLOW_ALBUM_IMAGES}<label><input type="radio" name="stc_mode" value="album-images" {if $STC_MODE=="album-images"}checked="checked"{/if}> {'all pictures of this album'|@translate}</label>{/if}
     10      <label><input type="radio" name="stc_mode" value="all-images" {if $STC_MODE=="all-images"}checked="checked"{/if}> {'all pictures of the gallery'|@translate}</label>
    1011    {else}
    11       <label><input type="radio" name="stc_mode" value="image" {if $STC_MODE == "image"}checked="checked"{/if}> {'Yes'|@translate}</label>
     12      <label><input type="radio" name="stc_mode" value="image" {if $STC_MODE=="image"}checked="checked"{/if}> {'Yes'|@translate}</label>
    1213    {/if}
    1314  {elseif $STC_ON_ALBUM}
    1415    {if $STC_ALLOW_GLOBAL}
    15       <label><input type="radio" name="stc_mode" value="album" {if $STC_MODE == "album"}checked="checked"{/if}> {'this album'|@translate}</label>
    16       <label><input type="radio" name="stc_mode" value="all-albums" {if $STC_MODE == "all-albums"}checked="checked"{/if}> {'all albums of the gallery'|@translate}</label>
     16      <label><input type="radio" name="stc_mode" value="album" {if $STC_MODE=="album"}checked="checked"{/if}> {'this album'|@translate}</label>
     17      <label><input type="radio" name="stc_mode" value="all-albums" {if $STC_MODE=="all-albums"}checked="checked"{/if}> {'all albums of the gallery'|@translate}</label>
    1718    {else}
    18       <label><input type="radio" name="stc_mode" value="album" {if $STC_MODE == "album"}checked="checked"{/if}> {'Yes'|@translate}</label>
     19      <label><input type="radio" name="stc_mode" value="album" {if $STC_MODE=="album"}checked="checked"{/if}> {'Yes'|@translate}</label>
    1920    {/if}
    2021  {/if}
     
    2223
    2324{if $STC_ASK_MAIL}
    24   <p><label id="stc_mail" {if !$STC_MODE}style="display:none;"{/if}>{'Email address'|@translate} : <input type="text" name="stc_mail" value="{$STC_MAIL}"></label></p>
    25   {footer_script require="jquery"}{literal}
    26   jQuery(document).ready(function() {
    27     $("#addComment input[name='stc_mode']").change(function() {
    28       if ($(this).val() != "-1")
    29         $("#stc_mail").css("display", "");
    30       else
    31         $("#stc_mail").css("display", "none");
    32     });
     25{footer_script require="jquery"}{literal}
     26        var $stc_email_input = $("#addComment input[name='email']");
     27  var stc_bordercolor = $stc_email_input.css('border-color');
     28 
     29  $("#addComment input[name='stc_mode']").change(function() {
     30    if ($(this).val() != "-1") {
     31      if ($stc_email_input.val()=="") {
     32        $stc_email_input.css("border-color", "red");
     33      }
     34    }
     35    else {
     36      $stc_email_input.css("border-color", stc_bordercolor);
     37    }
    3338  });
    34   {/literal}{/footer_script}
     39  $stc_email_input.change(function() {
     40    $(this).css('border-color', stc_bordercolor);
     41  });
     42{/literal}{/footer_script}
    3543{/if}
     44
    3645{/if}
Note: See TracChangeset for help on using the changeset viewer.