Ignore:
Timestamp:
Jun 3, 2011, 1:57:17 PM (13 years ago)
Author:
mistic100
Message:

clean code, add some options

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Front2Back/template/admin.tpl

    r9784 r11217  
     1{combine_css path=$F2B_PATH|@cat:"template/style.css"}
     2
     3{footer_script require='jquery'}{literal}
     4jQuery().ready( function () {
     5  jQuery('select[name="lang_desc_select"]').change(function () {
     6    jQuery('[id^="link_name"]').hide();
     7    jQuery("#link_name_"+this.options[this.selectedIndex].value).show();
     8  });
     9  jQuery('[id^="link_name_"]').keyup(function () {
     10    arr = jQuery(this).attr("id").split("link_name_");
     11    id = arr[1];
     12    opt = jQuery('select[name="lang_desc_select"] option[id="opt_'+id+'"]');
     13    if (this.value != '')
     14      opt.html(opt.html().replace("\u2718", "\u2714"));
     15    else
     16      opt.html(opt.html().replace("\u2714", "\u2718"));
     17  });
     18});
     19
     20jQuery('.lang_help').tipTip();
     21{/literal}{/footer_script}
     22
    123<div class="titrePage">
    2         <h2>Front2Back</h2>
     24  <h2>Front2Back</h2>
    325</div>
    426
    527<form method="post" action="" class="properties" ENCTYPE="multipart/form-data">
    6         <fieldset>
    7                 <legend>{'Configuration'|@translate}</legend>     
    8                 <ul>                   
     28  <fieldset>
     29    <legend>{'Configuration'|@translate}</legend>   
     30    <ul>     
     31      <li>
     32        <span class="property">{'Back sides folder'|@translate}</span>
     33        <input type="text" name="path" value="{$PATH}"/>
     34      </li>
     35      <li>
     36        <span class="property">{'Web sized pics sub-folder'|@translate}</span>
     37        <input type="text" name="parent" value="{$PARENT}"/>
     38      </li>   
     39      <li>
     40        <span class="property">{'HD pics sub-folder'|@translate}</span>
     41        <input type="text" name="hd_parent" value="{$HD_PARENT}"/>
     42      </li>
     43      <li>
     44        <span class="property">{'Suffix'|@translate}</span>
     45        <input type="text" name="suffix" value="{$SUFFIX}"/>
     46      </li>
     47     
     48      <li>
     49        <span class="property">{'Link position'|@translate}</span>
     50        <label><input type="radio" name="position" value="top" {if $POSITION == 'top'}checked="checked"{/if}/> {'Top'|@translate}</label>
     51        <label><input type="radio" name="position" value="bottom" {if $POSITION == 'bottom'}checked="checked"{/if}/> {'Bottom'|@translate}</label>
     52        <label><input type="radio" name="position" value="toolbar" {if $POSITION == 'toolbar'}checked="checked"{/if}/> {'Toolbar'|@translate}</label>
     53      </li>
    954                        <li>
    10                                 <span class="property">{'f2b_path'|@translate}</span>
    11                                 <input type="text" name="path" value="{$PATH}"/>
     55                                <span class="property">{'Switch mode'|@translate}</span>
     56                                <label><input type="radio" name="switch_mode" value="click" {if $SWITCH_MODE == 'click'}checked="checked"{/if}/> {'Click'|@translate}</label>
     57                                <label><input type="radio" name="switch_mode" value="hover" {if $SWITCH_MODE == 'hover'}checked="checked"{/if}/> {'Mouseover'|@translate}</label>
    1258                        </li>
    1359                        <li>
    14                                 <span class="property">{'f2b_parent'|@translate}</span>
    15                                 <input type="text" name="parent" value="{$PARENT}"/>
    16                         </li>           
    17                         <li>
    18                                 <span class="property">{'f2b_hd_parent'|@translate}</span>
    19                                 <input type="text" name="hd_parent" value="{$HD_PARENT}"/>
     60                                <span class="property">{'Transition'|@translate}</span>
     61                                <label><input type="radio" name="transition" value="none" {if $TRANSITION == 'none'}checked="checked"{/if}/> {'None'|@translate}</label>
     62                                <label><input type="radio" name="transition" value="fade" {if $TRANSITION == 'fade'}checked="checked"{/if}/> {'Fade'|@translate}</label>
    2063                        </li>
    21                         <li>
    22                                 <span class="property">{'f2b_suffix'|@translate}</span>
    23                                 <input type="text" name="suffix" value="{$SUFFIX}"/>
    24                         </li>
    25                 </ul>
    26         </fieldset>
    27                
    28         <p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" /></p>
     64     
     65      <li>
     66        <span class="property">{'Link name'|@translate}</span>
     67        <select name="lang_desc_select">
     68          {foreach from=$link_name item=lang}
     69            <option value="{$lang.LANGUAGE_CODE}" id="opt_{$lang.LANGUAGE_CODE}">{if empty($lang.VALUE)}&#x2718;{else}&#x2714;{/if} &nbsp;{$lang.LANGUAGE_NAME}</option>
     70          {/foreach}
     71        </select>
     72        {foreach from=$link_name item=lang}
     73          <input type="text" size="30" name="link_name[{$lang.LANGUAGE_CODE}]" id="link_name_{$lang.LANGUAGE_CODE}" value="{$lang.VALUE}" style="{if $lang.LANGUAGE_CODE != 'default'}display:none; {/if}margin-left:10px;">
     74        {/foreach}
     75
     76        <a class="lang_help" title="{'Seperate the two labels with the | symbol. Leave blank to use default translation.'|@translate}">i</a>
     77      </li>
     78    </ul>
     79  </fieldset>
     80   
     81  <p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" /></p>
    2982</form>
    3083
Note: See TracChangeset for help on using the changeset viewer.