Changeset 23395 for extensions/skeleton


Ignore:
Timestamp:
06/20/13 12:51:22 (6 years ago)
Author:
mistic100
Message:

corrections and example of {html_style}, {html_options}, API info

Location:
extensions/skeleton/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • extensions/skeleton/trunk/admin/config.php

    r17899 r23395  
    1212    'option1' => intval($_POST['option1']), 
    1313    'option2' => isset($_POST['option2']), 
     14    'option3' => $_POST['option3'], 
    1415    ); 
    1516       
     
    1819} 
    1920 
     21$select_options = array( 
     22  'one' => l10n('One'), 
     23  'two' => l10n('Two'), 
     24  'three' => l10n('Three'), 
     25  ); 
     26   
    2027// send config to template 
    2128$template->assign(array( 
    2229  'skeleton' => $conf['skeleton'], 
     30  'select_options' => $select_options 
    2331  )); 
    2432 
  • extensions/skeleton/trunk/admin/template/config.tpl

    r17899 r23395  
    44jQuery('input[name="option2"]').change(function() { 
    55  $('.option1').toggle(); 
     6}); 
     7 
     8jQuery(".showInfo").tipTip({ 
     9  delay: 0, 
     10  fadeIn: 200, 
     11  fadeOut: 200, 
     12  maxWidth: '300px', 
     13  defaultPosition: 'bottom' 
    614}); 
    715{/literal}{/footer_script} 
     
    1826    <li> 
    1927      <label> 
    20         <span class="property"> 
    21           {'Checkbox'|@translate} 
    22           <a class="showInfo" title="{'Check me!'|@translate}">i</a> 
    23         </span> 
    2428        <input type="checkbox" name="option2" value="1" {if $skeleton.option2}checked="checked"{/if}> 
     29        <b>{'Checkbox'|@translate}</b> 
    2530      </label> 
     31      <a class="showInfo" title="{'Check me!'|@translate}">i</a> 
    2632    </li> 
    2733    <li class="option1" {if not $skeleton.option2}style="display:none;"{/if}> 
    2834      <label> 
    29         <span class="property">{'Integer'|@translate}</span> 
     35        <b>{'Integer'|@translate}</b> 
    3036        <input type="text" name="option1" value="{$skeleton.option1}" size="4"> 
     37      </label> 
     38    </li> 
     39    <li> 
     40      <label> 
     41        <b>{'Select'|@translate}</b> 
     42        {html_options name=option3 options=$select_options selected=$skeleton.option3} 
    3143      </label> 
    3244    </li> 
     
    3446</fieldset> 
    3547 
    36 <p style="text-align:left;"><input type="submit" name="save_config" value="{'Save Settings'|@translate}"></p> 
     48<p class="formButtons"><input type="submit" name="save_config" value="{'Save Settings'|@translate}"></p> 
    3749 
    3850</form> 
  • extensions/skeleton/trunk/admin/template/home.tpl

    r17899 r23395  
    11{combine_css path=$SKELETON_PATH|@cat:"admin/template/style.css"} 
     2 
     3{html_style}{literal} 
     4h4 { text-align:left !important; } 
     5{/literal}{/html_style} 
    26 
    37<div class="titrePage"> 
  • extensions/skeleton/trunk/include/install.inc.php

    r19842 r23395  
    2121  if (empty($conf['skeleton'])) 
    2222  { 
    23     $skeleton_default_config = serialize(array( 
     23    $conf['skeleton'] = serialize(array( 
    2424      'option1' => 10, 
    2525      'option2' => true, 
    2626      )); 
    2727   
    28     conf_update_param('skeleton', $skeleton_default_config); 
    29     $conf['skeleton'] = $skeleton_default_config; 
     28    conf_update_param('skeleton', $conf['skeleton']); 
    3029  } 
    3130  else 
     
    3332    // if you need to test the "old" configuration you must check if not yet unserialized 
    3433    $old_conf = is_string($conf['skeleton']) ? unserialize($conf['skeleton']) : $conf['skeleton']; 
     34     
     35    if (empty($old_conf['option3'])) 
     36    { 
     37      $old_conf['option3'] = 'two'; 
     38    } 
     39     
     40    $conf['skeleton'] = serialize($old_conf); 
     41    conf_update_param('skeleton', $conf['skeleton']); 
    3542  } 
    3643   
  • extensions/skeleton/trunk/include/ws_functions.inc.php

    r17933 r23395  
    1010    'ws_php_info', 
    1111    array( 
    12       'what' => array('default'=> 'INFO_ALL'), 
     12      'what' => array('default'=>'INFO_ALL', 'info'=>'This parameter has a default value'), 
     13      'ids' => array('flags'=>WS_PARAM_FORCE_ARRAY, 'info'=>'This one must be an array'), 
    1314      ), 
    1415    'Returns phpinfo (don\'t use XML request format)' 
  • extensions/skeleton/trunk/template/menubar_skeleton.tpl

    r17899 r23395  
    11<dt>{$block->get_title()}</dt> 
    22<dd> 
    3   Menublock added by Skeleton plugin 
     3  {'Menublock added by Skeleton plugin'|@translate} 
    44        <ul>{strip} 
    55                {foreach from=$block->data item=link} 
  • extensions/skeleton/trunk/template/skeleton_page.tpl

    r17899 r23395  
    4646 
    4747 
    48 {if $clear}<div style="clear: both;"></div> 
     48{if isset($clear)}<div style="clear: both;"></div> 
    4949</div>{/if} 
    5050</div>{* <!-- content --> *} 
Note: See TracChangeset for help on using the changeset viewer.