Changeset 28703


Ignore:
Timestamp:
Jun 14, 2014, 4:15:05 PM (6 years ago)
Author:
mistic100
Message:

add dark selectize theme + "ternary" template modifier

Location:
trunk
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes/default/template/batch_manager_global.tpl

    r28613 r28703  
    1111{combine_script id='LocalStorageCache' load='footer' path='admin/themes/default/js/LocalStorageCache.js'}
    1212
     13{assign var="selectizeTheme" value=($themeconf.name=='roma')|ternary:'dark':'default'}
    1314{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
    14 {combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.default.css"}
     15{combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.`$selectizeTheme`.css"}
    1516
    1617{combine_script id='jquery.progressBar' load='footer' path='themes/default/js/plugins/jquery.progressbar.min.js'}
  • trunk/admin/themes/default/template/batch_manager_unit.tpl

    r28613 r28703  
    55{combine_script id='LocalStorageCache' load='footer' path='admin/themes/default/js/LocalStorageCache.js'}
    66
     7{assign var="selectizeTheme" value=($themeconf.name=='roma')|ternary:'dark':'default'}
    78{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
    8 {combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.default.css"}
     9{combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.`$selectizeTheme`.css"}
    910
    1011{footer_script}
  • trunk/admin/themes/default/template/cat_modify.tpl

    r28542 r28703  
    11{combine_script id='LocalStorageCache' load='footer' path='admin/themes/default/js/LocalStorageCache.js'}
    22
     3{assign var="selectizeTheme" value=($themeconf.name=='roma')|ternary:'dark':'default'}
    34{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
    4 {combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.default.css"}
     5{combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.`$selectizeTheme`.css"}
    56
    67{footer_script}
  • trunk/admin/themes/default/template/cat_perm.tpl

    r28555 r28703  
    11{combine_script id='LocalStorageCache' load='footer' path='admin/themes/default/js/LocalStorageCache.js'}
    22
     3{assign var="selectizeTheme" value=($themeconf.name=='roma')|ternary:'dark':'default'}
    34{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
    4 {combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.default.css"}
     5{combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.`$selectizeTheme`.css"}
    56
    67{footer_script}
  • trunk/admin/themes/default/template/include/add_album.inc.tpl

    r28533 r28703  
    11{include file='include/colorbox.inc.tpl'}
    22
     3{assign var="selectizeTheme" value=($themeconf.name=='roma')|ternary:'dark':'default'}
    34{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
    4 {combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.default.css"}
     5{combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.`$selectizeTheme`.css"}
    56
    67{combine_script id='addAlbum.js' load='footer' require='jquery.colorbox' path='admin/themes/default/js/addAlbum.js'}
  • trunk/admin/themes/default/template/photos_add_direct.tpl

    r28555 r28703  
    1313{combine_script id='LocalStorageCache' load='footer' path='admin/themes/default/js/LocalStorageCache.js'}
    1414
     15{assign var="selectizeTheme" value=($themeconf.name=='roma')|ternary:'dark':'default'}
    1516{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
    16 {combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.default.css"}
     17{combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.`$selectizeTheme`.css"}
    1718
    1819{footer_script}
  • trunk/admin/themes/default/template/picture_modify.tpl

    r28616 r28703  
    55{combine_script id='LocalStorageCache' load='footer' path='admin/themes/default/js/LocalStorageCache.js'}
    66
     7{assign var="selectizeTheme" value=($themeconf.name=='roma')|ternary:'dark':'default'}
    78{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
    8 {combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.default.css"}
     9{combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.`$selectizeTheme`.css"}
    910
    1011{footer_script}
  • trunk/admin/themes/default/template/user_list.tpl

    r28555 r28703  
    44{combine_css path="themes/default/js/plugins/datatables/css/jquery.dataTables.css"}
    55
     6{assign var="selectizeTheme" value=($themeconf.name=='roma')|ternary:'dark':'default'}
    67{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
    7 {combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.default.css"}
     8{combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.`$selectizeTheme`.css"}
    89
    910{combine_script id='jquery.underscore' load='footer' path='themes/default/js/plugins/underscore.js'}
  • trunk/include/template.class.php

    r28600 r28703  
    122122    $this->smarty->registerPlugin('modifiercompiler', 'translate_dec', array('Template', 'modcompiler_translate_dec') );
    123123    $this->smarty->registerPlugin('modifier', 'explode', array('Template', 'mod_explode') );
     124    $this->smarty->registerPlugin('modifier', 'ternary', array('Template', 'mod_ternary') );
    124125    $this->smarty->registerPlugin('modifier', 'get_extent', array($this, 'get_extent') );
    125126    $this->smarty->registerPlugin('block', 'html_head', array($this, 'block_html_head') );
     
    666667   * "explode" variable modifier.
    667668   * Usage :
    668    *    - {assign var=valueExploded value=$value|@explode:','}
     669   *    - {assign var=valueExploded value=$value|explode:','}
    669670   *
    670671   * @param string $text
     
    675676  {
    676677    return explode($delimiter, $text);
     678  }
     679 
     680  /**
     681   * ternary variable modifier.
     682   * Usage :
     683   *    - {$variable|ternary:'yes':'no'}
     684   *
     685   * @param mixed $param
     686   * @param mixed $true
     687   * @param mixed $false
     688   * @return mixed
     689   */
     690  static function mod_ternary($param, $true, $false)
     691  {
     692    return $param ? $true : $false;
    677693  }
    678694
Note: See TracChangeset for help on using the changeset viewer.