Ignore:
Timestamp:
Dec 18, 2013, 6:48:06 PM (10 years ago)
Author:
mistic100
Message:

update for 2.6

File:
1 edited

Legend:

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

    r24234 r26025  
    1 {combine_css path=$EASYCAPTCHA_PATH|@cat:"template/style.css"}
    2 
    3 {combine_css path="themes/default/js/plugins/chosen.css"}
     1{combine_css path=$EASYCAPTCHA_PATH|cat:'template/style.css'}
     2
     3{combine_css path='themes/default/js/plugins/chosen.css'}
    44{combine_script id='jquery.chosen' load='footer' path='themes/default/js/plugins/chosen.jquery.min.js'}
    55
     
    88
    99{assign var="spectrum_language" value=$EASYCAPTCHA_PATH|cat:'template/bgrins-spectrum/i18n/jquery.spectrum-'|cat:$lang_info.code|cat:'.js'}
    10 {if 'PHPWG_ROOT_PATH'|@constant|@cat:$spectrum_language|file_exists}
     10{if 'PHPWG_ROOT_PATH'|constant|cat:$spectrum_language|file_exists}
    1111{combine_script id='jquery.spectrum.'|cat:$lang_info.code load='footer' require='jquery.spectrum' path=$spectrum_language}
    1212{/if}
    1313
    1414
    15 {footer_script}{literal}
     15{footer_script}
    1616// multiselect
    1717$("select").css({
    18     "width":"700px"
     18    width: 300
    1919}).chosen({
    2020    disable_search:true,
     21    placeholder_text_multiple: '{'Nowhere'|translate}'
    2122});
    2223
     
    3334$('.preview-tictac').on('change', function() {
    3435    var inputs = ['size','bg1','bg2','bd','obj','sel'],
    35         url = '{/literal}{$EASYCAPTCHA_PATH}{literal}' + 'tictac/gen_admin.php?t='+ new Date().getTime();
     36        url = '{$EASYCAPTCHA_PATH}' + 'tictac/gen_admin.php?t='+ new Date().getTime();
    3637
    3738    for (var i=0; i<inputs.length; i++) {
     
    4445
    4546// Drag & drop preview
    46 {/literal}
    47 var themes = {ldelim}
     47var themes = {
    4848{foreach from=$THEMES key=theme item=params}
    4949  '{$theme}': '{$EASYCAPTCHA_PATH}drag/{$theme}/{$params.image}',
    5050{/foreach}
    5151};
    52 {literal}
    5352
    5453$('.preview-drag').on('change', function() {
     
    5958
    6059    for (var i=0; i<inputs.length; i++) {
    61         search = '{\\$EASYCAPTCHA_CONF\\.'+ inputs[i] +'}';
     60        search = '{ldelim}\\$EASYCAPTCHA.drag\\.'+ inputs[i] +'}';
    6261        replace = $('input[name="drag['+ inputs[i] +']"]').val();
    6362        style = style.replace(new RegExp(search, 'g'), replace);
     
    6766        y = parseInt($('input[name="drag[nb]"]').val());
    6867
    69     search = '{dat_equation}',
     68    search = '{ldelim}math equation=\'15+(x+5)*y\' x=$EASYCAPTCHA.drag.size y=$EASYCAPTCHA.drag.nb}',
    7069    replace = 15+(x+5)*y;
    71     style = style.replace(new RegExp(search, 'g'), replace);
     70    style = style.replace(search, replace);
    7271
    7372    $('#drag_style').text(style);
     
    107106    $(this).nextAll('.preview').slideDown();
    108107});
    109 {/literal}{/footer_script}
     108{/footer_script}
    110109
    111110
     
    233232        <a class="buttonLike">{'Preview'|translate}</a>
    234233        <div class="preview">
    235           {include file=$EASYCAPTCHA_ABS_PATH|cat:'template/common.inc.tpl' EASYCAPTCHA_CHALLENGE='drag' EASYCAPTCHA_CONF=$easycaptcha.drag}
     234          {$easycaptcha.challenge = 'drag'}
     235          {include file=$EASYCAPTCHA_ABS_PATH|cat:'template/common.inc.tpl' EASYCAPTCHA=$easycaptcha}
    236236          {$smarty.capture.easycaptcha}
    237237        </div>
     
    251251    [<a href="https://www.iconfinder.com/iconsets/ie_Bright" class="externalLink">#4</a>]
    252252  | Libraries
    253     [<a href="http://bgrins.github.io/spectrum"class="externalLink">Spectrum.js</a>]
    254     [<a href="http://threedubmedia.com"class="externalLink">jQuery.events</a>]
     253    [<a href="http://bgrins.github.io/spectrum" class="externalLink">Spectrum.js</a>]
     254    [<a href="http://threedubmedia.com" class="externalLink">jQuery.events</a>]
    255255</div>
    256256
    257257
    258258{* <!-- weird thing to update bunch of CSS --> *}
    259 {html_head}{literal}
     259{html_head}
    260260<style id="drag_style"></style>
    261261<script type="text/template" id="drag_style_src">
    262 #easycaptcha, #easycaptcha_noscript {
    263   background: {$EASYCAPTCHA_CONF.bg1};
    264   background: -webkit-linear-gradient(top, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%);
    265   background: -moz-linear-gradient(top, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%);
    266   background: -ms-linear-gradient(top, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%);
    267   background: -o-linear-gradient(top, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%);
    268   background: linear-gradient(to bottom, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%);
    269   color:{$EASYCAPTCHA_CONF.txt};
    270 }
    271 #easycaptcha .drag_item {
    272   width:{$EASYCAPTCHA_CONF.size}px;
    273   height:{$EASYCAPTCHA_CONF.size}px;
    274   border:1px solid {$EASYCAPTCHA_CONF.bd1};
    275   background:{$EASYCAPTCHA_CONF.obj};
    276 }
    277 #easycaptcha .drag_item img {
    278   width:{$EASYCAPTCHA_CONF.size}px;
    279   height:{$EASYCAPTCHA_CONF.size}px;
    280 }
    281 #easycaptcha .drop_zone {
    282   width:{$EASYCAPTCHA_CONF.size}px;
    283   height:{$EASYCAPTCHA_CONF.size}px;
    284   margin-left:{dat_equation}px;
    285   line-height:{$EASYCAPTCHA_CONF.size}px;
    286   background: {$EASYCAPTCHA_CONF.bg1};
    287   background: -webkit-linear-gradient(bottom, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%);
    288   background: -moz-linear-gradient(bottom, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%);
    289   background: -ms-linear-gradient(bottom, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%);
    290   background: -o-linear-gradient(bottom, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%);
    291   background: linear-gradient(to top, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%);
    292   border:1px dotted {$EASYCAPTCHA_CONF.bd2};
    293   color:{$EASYCAPTCHA_CONF.txt};
    294 }
    295 #easycaptcha .drop_zone.active {
    296   background:{$EASYCAPTCHA_CONF.sel};
    297 }
    298 #easycaptcha .drop_zone.valid {
    299   background:{$EASYCAPTCHA_CONF.sel};
    300   box-shadow:0 0 0 2px {$EASYCAPTCHA_CONF.sel};
    301 }
     262{$DRAG_CSS}
    302263</script>
    303 {/literal}{/html_head}
     264{/html_head}
Note: See TracChangeset for help on using the changeset viewer.