Ignore:
Timestamp:
May 22, 2011, 12:23:03 PM (13 years ago)
Author:
mistic100
Message:

code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/bbcode_bar/template/bbcode_bar.tpl

    r10024 r10983  
    44{footer_script require='jquery'}
    55BBCodeBar = {ldelim}
    6         markupSet: [
    7                 {if isset($BBC_b)}{ldelim}name:'{'b_help'|@translate}', key:'B', openWith:'[b]', closeWith:'[/b]', className:'markItUpBold'},{/if}
    8                 {if isset($BBC_i)}{ldelim}name:'{'i_help'|@translate}', key:'I', openWith:'[i]', closeWith:'[/i]', className:'markItUpItalic'},{/if}
    9                 {if isset($BBC_u)}{ldelim}name:'{'u_help'|@translate}', key:'U', openWith:'[u]', closeWith:'[/u]', className:'markItUpUnderline'},{/if}
    10                 {if isset($BBC_s)}{ldelim}name:'{'s_help'|@translate}', key:'S', openWith:'[s]', closeWith:'[/s]', className:'markItUpStroke'},{/if}
    11                
    12                 {if isset($BBC_p) OR isset($BBC_center) OR isset($BBC_right) OR isset($BBC_quote)}{ldelim}separator:'|'},{/if}
    13                
    14                 {if isset($BBC_p)}{ldelim}name:'{'p_help'|@translate}', openWith:'[p]', closeWith:'[/p]', className:'markItUpParagraph'},{/if}
    15                 {if isset($BBC_center)}{ldelim}name:'{'center_help'|@translate}', openWith:'[center]', closeWith:'[/center]', className:'markItUpCenter'},{/if}
    16                 {if isset($BBC_right)}{ldelim}name:'{'right_help'|@translate}', openWith:'[right]', closeWith:'[/right]', className:'markItUpRight'},{/if}
    17                 {if isset($BBC_quote)}{ldelim}name:'{'quote_help'|@translate}', openWith:'[quote]', closeWith:'[/quote]', className:'markItUpQuote'},{/if}
    18                
    19                 {if isset($BBC_ul) OR isset($BBC_ol) OR isset($BBC_li)}{ldelim}separator:'|'},{/if}
    20                
    21                 {if isset($BBC_ul)}{ldelim}name:'{'ul_help'|@translate}', openWith:'[ul]\n', closeWith:'\n[/ul]', className:'markItUpListUL'},{/if}
    22                 {if isset($BBC_ol)}{ldelim}name:'{'ol_help'|@translate}', openWith:'[ol]\n', closeWith:'\n[/ol]', className:'markItUpListOL'},{/if}
    23                 {if isset($BBC_ul) OR isset($BBC_ol)}{ldelim}name:'{'li_help'|@translate}', openWith:'[li]', closeWith:'[/li]', className:'markItUpListLI'},{/if}
    24                
    25                 {if isset($BBC_img) OR isset($BBC_url) OR isset($BBC_mail)}{ldelim}separator:'|' },{/if}
    26                
    27                 {if isset($BBC_img)}{ldelim}name:'{'img_help'|@translate}', key:'P', replaceWith:'[img][![Url]!][/img]', className:'markItUpPicture'},{/if}
    28                 {if isset($BBC_url)}{ldelim}name:'{'url_help'|@translate}', key:'L', openWith:'[url=[![Url]!]]', closeWith:'[/url]', className:'markItUpLink'},{/if}
    29                 {if isset($BBC_email)}{ldelim}name:'{'mail_help'|@translate}', key:'M', replaceWith:'[email][![Mail]!][/email]', className:'markItUpMail'},{/if}
    30                
    31                 {if isset($BBC_size) OR isset($BBC_color) OR isset($BBC_smilies)}{ldelim}separator:'|'},{/if}
    32                
    33                 {if isset($BBC_size)}
    34                 {ldelim}name:'{'size_help'|@translate}', className:'markItUpSize',
    35                         dropMenu :[
    36                                 {ldelim}name:'{'tiny'|@translate}', openWith:'[size=7]', closeWith:'[/size]' },
    37                                 {ldelim}name:'{'small'|@translate}', openWith:'[size=9]', closeWith:'[/size]' },
    38                                 {ldelim}name:'{'normal'|@translate}', openWith:'[size=12]', closeWith:'[/size]' },
    39                                 {ldelim}name:'{'large'|@translate}', openWith:'[size=18]', closeWith:'[/size]' },
    40                                 {ldelim}name:'{'huge'|@translate}', openWith:'[size=24]', closeWith:'[/size]' },
    41                         ]
    42                 },
    43                 {/if}
    44                 {if isset($BBC_color)}
    45                 {ldelim}name:'{'color_help'|@translate}', className:'markItUpColors', openWith:'[color=[![Color]!]]', closeWith:'[/color]',
    46                         dropMenu: [
    47                                 {ldelim}name:'{'yellow_help'|@translate}',      openWith:'[color=yellow]',      closeWith:'[/color]', className:"col1-1" },
    48                                 {ldelim}name:'{'orange_help'|@translate}',      openWith:'[color=orange]',      closeWith:'[/color]', className:"col1-2" },
    49                                 {ldelim}name:'{'red_help'|@translate}',         openWith:'[color=red]',         closeWith:'[/color]', className:"col1-3" },
    50                                
    51                                 {ldelim}name:'{'blue_help'|@translate}',        openWith:'[color=blue]',        closeWith:'[/color]', className:"col2-1" },
    52                                 {ldelim}name:'{'purple_help'|@translate}',      openWith:'[color=purple]',      closeWith:'[/color]', className:"col2-2" },
    53                                 {ldelim}name:'{'green_help'|@translate}',       openWith:'[color=green]',       closeWith:'[/color]', className:"col2-3" },
    54                                
    55                                 {ldelim}name:'{'white_help'|@translate}',       openWith:'[color=white]',       closeWith:'[/color]', className:"col3-1" },
    56                                 {ldelim}name:'{'grey_help'|@translate}',        openWith:'[color=gray]',        closeWith:'[/color]', className:"col3-2" },
    57                                 {ldelim}name:'{'black_help'|@translate}',       openWith:'[color=black]',       closeWith:'[/color]', className:"col3-3" }
    58                         ]
    59                 },
    60                 {/if}
    61         ]
     6  markupSet: [
     7    {if isset($BBC_b)}{ldelim}name:'{'b_help'|@translate}', key:'B', openWith:'[b]', closeWith:'[/b]', className:'markItUpBold'},{/if}
     8    {if isset($BBC_i)}{ldelim}name:'{'i_help'|@translate}', key:'I', openWith:'[i]', closeWith:'[/i]', className:'markItUpItalic'},{/if}
     9    {if isset($BBC_u)}{ldelim}name:'{'u_help'|@translate}', key:'U', openWith:'[u]', closeWith:'[/u]', className:'markItUpUnderline'},{/if}
     10    {if isset($BBC_s)}{ldelim}name:'{'s_help'|@translate}', key:'S', openWith:'[s]', closeWith:'[/s]', className:'markItUpStroke'},{/if}
     11   
     12    {if isset($BBC_p) OR isset($BBC_center) OR isset($BBC_right) OR isset($BBC_quote)}{ldelim}separator:'|'},{/if}
     13   
     14    {if isset($BBC_p)}{ldelim}name:'{'p_help'|@translate}', openWith:'[p]', closeWith:'[/p]', className:'markItUpParagraph'},{/if}
     15    {if isset($BBC_center)}{ldelim}name:'{'center_help'|@translate}', openWith:'[center]', closeWith:'[/center]', className:'markItUpCenter'},{/if}
     16    {if isset($BBC_right)}{ldelim}name:'{'right_help'|@translate}', openWith:'[right]', closeWith:'[/right]', className:'markItUpRight'},{/if}
     17    {if isset($BBC_quote)}{ldelim}name:'{'quote_help'|@translate}', openWith:'[quote]', closeWith:'[/quote]', className:'markItUpQuote'},{/if}
     18   
     19    {if isset($BBC_ul) OR isset($BBC_ol) OR isset($BBC_li)}{ldelim}separator:'|'},{/if}
     20   
     21    {if isset($BBC_ul)}{ldelim}name:'{'ul_help'|@translate}', openWith:'[ul]\n', closeWith:'\n[/ul]', className:'markItUpListUL'},{/if}
     22    {if isset($BBC_ol)}{ldelim}name:'{'ol_help'|@translate}', openWith:'[ol]\n', closeWith:'\n[/ol]', className:'markItUpListOL'},{/if}
     23    {if isset($BBC_ul) OR isset($BBC_ol)}{ldelim}name:'{'li_help'|@translate}', openWith:'[li]', closeWith:'[/li]', className:'markItUpListLI'},{/if}
     24   
     25    {if isset($BBC_img) OR isset($BBC_url) OR isset($BBC_mail)}{ldelim}separator:'|' },{/if}
     26   
     27    {if isset($BBC_img)}{ldelim}name:'{'img_help'|@translate}', key:'P', replaceWith:'[img][![Url]!][/img]', className:'markItUpPicture'},{/if}
     28    {if isset($BBC_url)}{ldelim}name:'{'url_help'|@translate}', key:'L', openWith:'[url=[![Url]!]]', closeWith:'[/url]', className:'markItUpLink'},{/if}
     29    {if isset($BBC_email)}{ldelim}name:'{'mail_help'|@translate}', key:'M', replaceWith:'[email][![Mail]!][/email]', className:'markItUpMail'},{/if}
     30   
     31    {if isset($BBC_size) OR isset($BBC_color) OR isset($BBC_smilies)}{ldelim}separator:'|'},{/if}
     32   
     33    {if isset($BBC_size)}
     34    {ldelim}name:'{'size_help'|@translate}', className:'markItUpSize',
     35      dropMenu :[
     36        {ldelim}name:'{'tiny'|@translate}', openWith:'[size=7]', closeWith:'[/size]' },
     37        {ldelim}name:'{'small'|@translate}', openWith:'[size=9]', closeWith:'[/size]' },
     38        {ldelim}name:'{'normal'|@translate}', openWith:'[size=12]', closeWith:'[/size]' },
     39        {ldelim}name:'{'large'|@translate}', openWith:'[size=18]', closeWith:'[/size]' },
     40        {ldelim}name:'{'huge'|@translate}', openWith:'[size=24]', closeWith:'[/size]' },
     41      ]
     42    },
     43    {/if}
     44    {if isset($BBC_color)}
     45    {ldelim}name:'{'color_help'|@translate}', className:'markItUpColors', openWith:'[color=[![Color]!]]', closeWith:'[/color]',
     46      dropMenu: [
     47        {ldelim}name:'{'yellow_help'|@translate}',  openWith:'[color=yellow]',   closeWith:'[/color]', className:"col1-1" },
     48        {ldelim}name:'{'orange_help'|@translate}',  openWith:'[color=orange]',   closeWith:'[/color]', className:"col1-2" },
     49        {ldelim}name:'{'red_help'|@translate}',   openWith:'[color=red]',   closeWith:'[/color]', className:"col1-3" },
     50       
     51        {ldelim}name:'{'blue_help'|@translate}',   openWith:'[color=blue]',   closeWith:'[/color]', className:"col2-1" },
     52        {ldelim}name:'{'purple_help'|@translate}',   openWith:'[color=purple]',   closeWith:'[/color]', className:"col2-2" },
     53        {ldelim}name:'{'green_help'|@translate}',   openWith:'[color=green]',   closeWith:'[/color]', className:"col2-3" },
     54       
     55        {ldelim}name:'{'white_help'|@translate}',   openWith:'[color=white]',   closeWith:'[/color]', className:"col3-1" },
     56        {ldelim}name:'{'grey_help'|@translate}',   openWith:'[color=gray]',   closeWith:'[/color]', className:"col3-2" },
     57        {ldelim}name:'{'black_help'|@translate}',  openWith:'[color=black]',   closeWith:'[/color]', className:"col3-3" }
     58      ]
     59    },
     60    {/if}
     61  ]
    6262};
    6363
    6464jQuery(document).ready(function() {ldelim}
    65         jQuery('#{$form_name} textarea').markItUp(BBCodeBar);
     65  jQuery('#{$form_name} textarea').markItUp(BBCodeBar);
    6666});
    6767{/footer_script}
Note: See TracChangeset for help on using the changeset viewer.