Ignore:
Timestamp:
May 9, 2011, 3:15:45 AM (13 years ago)
Author:
mistic100
Message:

use a private album instead a privacy level

Location:
extensions/Back2Front/template
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/Back2Front/template/picture_content.tpl

    r10819 r10821  
    22
    33{footer_script require="jquery"}
    4         jQuery('.reverse').click(function() {ldelim}
    5                 if (jQuery(this).attr('rel') == 'front') {ldelim}
    6                         /* picture attributes */
    7                         jQuery('#theImage img:first-child').attr({ldelim}
    8                                 src: '{$VERSO_URL}',
    9                                 style: 'width:;height:;',
    10                         });
    11                        
    12                         /* hd link atributes */
    13                         {if isset($VERSO_HD)}
    14                         jQuery('#theImage a:first-child').attr({ldelim}
    15                                 href: "javascript:phpWGOpenWindow('{$VERSO_HD}','{$high.UUID}','scrollbars=yes,toolbar=no,status=no,resizable=yes')"
    16                         });
    17                         {/if}
    18                        
    19                         /* B2F link content */
    20                         jQuery(this).html('<img src="{$B2F_PATH}template/rotate_2.png"/> {'See front'|@translate}');
    21                         jQuery(this).attr('rel', 'back');
    22                        
    23                 } else if (jQuery(this).attr('rel') == 'back') {ldelim}
    24                         jQuery('#theImage img:first-child').attr({ldelim}
    25                                 src: '{$SRC_IMG}',
    26                                 style: 'width:{$WIDTH_IMG}px;height:{$HEIGHT_IMG}px;',
    27                         });
    28                        
    29                         {if isset($VERSO_HD)}
    30                         jQuery('#theImage a:first-child').attr({ldelim}
    31                                 href: "javascript:phpWGOpenWindow('{$high.U_HIGH}','{$high.UUID}','scrollbars=yes,toolbar=no,status=no,resizable=yes')')"
    32                         });
    33                         {/if}
    34                        
    35                         jQuery(this).html('<img src="{$B2F_PATH}template/rotate_1.png"/> {'See back'|@translate}');
    36                         jQuery(this).attr('rel', 'front');
    37                 }
    38         });
     4jQuery(document).ready(function () {ldelim}
     5  jQuery('.reverse').click(function() {ldelim}
     6    if (jQuery(this).attr('rel') == 'front') {ldelim}
     7      /* picture attributes */
     8      jQuery('#theImage img:first-child').attr({ldelim}
     9        src: '{$VERSO_URL}',
     10        style: 'width:;height:;',
     11      });
     12     
     13      /* hd link atributes */
     14      {if isset($VERSO_HD)}
     15      jQuery('#theImage a:first-child').attr({ldelim}
     16        href: "javascript:phpWGOpenWindow('{$VERSO_HD}','{$high.UUID}','scrollbars=yes,toolbar=no,status=no,resizable=yes')"
     17      });
     18      {/if}
     19     
     20      /* B2F link content */
     21      jQuery(this).html('<img src="{$B2F_PATH}template/rotate_2.png"/> {'See front'|@translate}');
     22      jQuery(this).attr('rel', 'back');
     23     
     24    } else if (jQuery(this).attr('rel') == 'back') {ldelim}
     25      jQuery('#theImage img:first-child').attr({ldelim}
     26        src: '{$SRC_IMG}',
     27        style: 'width:{$WIDTH_IMG}px;height:{$HEIGHT_IMG}px;',
     28      });
     29     
     30      {if isset($VERSO_HD)}
     31      jQuery('#theImage a:first-child').attr({ldelim}
     32        href: "javascript:phpWGOpenWindow('{$high.U_HIGH}','{$high.UUID}','scrollbars=yes,toolbar=no,status=no,resizable=yes')')"
     33      });
     34      {/if}
     35     
     36      jQuery(this).html('<img src="{$B2F_PATH}template/rotate_1.png"/> {'See back'|@translate}');
     37      jQuery(this).attr('rel', 'front');
     38    }
     39  });
     40});
    3941{/footer_script}
    4042
    4143<a class="reverse" rel="front" href="#">
    42         <img src="{$B2F_PATH}template/rotate_1.png"/>
    43         {'See back'|@translate}
     44  <img src="{$B2F_PATH}template/rotate_1.png"/>
     45  {'See back'|@translate}
    4446</a>
  • extensions/Back2Front/template/picture_modify.tpl

    r10819 r10821  
    33  $('input[name="b2f_is_verso"]').change(function () {ldelim}
    44    if (this.checked) {ldelim}
    5       $('#frontside_id').css('visibility', '');
    6       $('select[name="level"]').prepend('<option label="{'Nobody (backside)'|@translate}" value="99">{'Nobody (backside)'|@translate}</option>');
    7       $('select[name="level"]').val('99').attr('readonly', 'readonly').css('opacity', '0.6');
    8      
     5      $('.frontside_id').css('visibility', '');
    96    } else {ldelim}
    10       $('#frontside_id').css('visibility', 'hidden');
    11       $('select[name="level"] option[value="99"]').remove();
    12       $('select[name="level"]').val($('input[name="b2f_old_level"]').val()).removeAttr('readonly').css('opacity', '1');
     7      $('.frontside_id').css('visibility', 'hidden');
    138    }
    149  });
    15 
    16   {if isset($B2F_IS_VERSO)}
    17   $('#frontside_id').css('visibility', '');
    18   $('select[name="level"]').prepend('<option label="{'Nobody (backside)'|@translate}" value="99">{'Nobody (backside)'|@translate}</option>');
    19   $('select[name="level"]').val('99').attr('readonly', 'readonly').css('opacity', '0.6');
    20   {else}
    21   $('#frontside_id').css('visibility', 'hidden');
    22   $('select[name="level"]').val('{$level_options_selected.0}');
    23   {/if}
    2410});
    2511{/footer_script}
    2612
    2713
    28 <form action="{$F_ACTION}#back2front" method="post" id="back2front">
     14<form action="{$F_ACTION}" method="post" id="back2front">
    2915
    3016  <fieldset>
    3117    <legend>{'Backside management'|@translate}</legend>
    3218
     19  {if isset($B2F_VERSO_ID)}
    3320    <table>
    34     {if isset($B2F_VERSO_ID)}
    3521      <tr>
    36         <td><strong>{'This picture has a backside :'|@translate}</strong></td>
     22        <td><b>{'This picture has a backside :'|@translate}</b></td>
    3723        <td><a href="{$B2F_VERSO_URL}">{$B2F_VERSO_ID} - {$B2F_VERSO_NAME}</a></td>
    3824      </tr>
    3925    </table>
    40     {else}
    41 
     26  {else}
     27    <table>
    4228      <tr>
    43         <td><strong>{'This picture is a backside...'|@translate}</strong></td>
     29        <td><b>{'This picture is a backside...'|@translate}</b></td>
    4430        <td><input type="checkbox" name="b2f_is_verso" {$B2F_IS_VERSO}></td>
    4531      </tr>
    4632
    47       <tr id="frontside_id">
    48         <td><strong>{'...of the picture n°'|@translate}</strong></td>
     33      <tr class="frontside_id" {if !isset($B2F_IS_VERSO)}style="visibility:hidden;"{/if}>
     34        <td><b>{'...of the picture n°'|@translate}</b></td>
    4935        <td><input type="text" size="4" name="b2f_front_id" value="{$B2F_FRONT_ID}"></td>
    5036      </tr>
    51 
     37     
     38      <tr class="frontside_id" {if !isset($B2F_IS_VERSO)}style="visibility:hidden;"{/if}>
     39        <td><b>{'Move backside to private album'|@translate}</b></td>
     40        <td><input type="checkbox" name="b2f_move_verso" checked="checked"></td>
     41      </tr>
    5242    </table>
    5343
    5444    <p style="text-align:center;">
    55       <input type="hidden" name="b2f_old_level" value="{if isset($B2F_OLD_LEVEL)}{$B2F_OLD_LEVEL}{else}{$level_options_selected.0}{/if}">
    5645      <input class="submit" type="submit" value="{'Submit'|@translate}" name="b2f_submit">
    5746    </p>
    58     {/if}
     47  {/if}
    5948
    6049  </fieldset>
Note: See TracChangeset for help on using the changeset viewer.