Changeset 26025 for extensions/EasyCaptcha/template/admin.tpl
- Timestamp:
- Dec 18, 2013, 6:48:06 PM (10 years ago)
- 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'} 4 4 {combine_script id='jquery.chosen' load='footer' path='themes/default/js/plugins/chosen.jquery.min.js'} 5 5 … … 8 8 9 9 {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} 11 11 {combine_script id='jquery.spectrum.'|cat:$lang_info.code load='footer' require='jquery.spectrum' path=$spectrum_language} 12 12 {/if} 13 13 14 14 15 {footer_script} {literal}15 {footer_script} 16 16 // multiselect 17 17 $("select").css({ 18 "width":"700px"18 width: 300 19 19 }).chosen({ 20 20 disable_search:true, 21 placeholder_text_multiple: '{'Nowhere'|translate}' 21 22 }); 22 23 … … 33 34 $('.preview-tictac').on('change', function() { 34 35 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(); 36 37 37 38 for (var i=0; i<inputs.length; i++) { … … 44 45 45 46 // Drag & drop preview 46 {/literal} 47 var themes = {ldelim} 47 var themes = { 48 48 {foreach from=$THEMES key=theme item=params} 49 49 '{$theme}': '{$EASYCAPTCHA_PATH}drag/{$theme}/{$params.image}', 50 50 {/foreach} 51 51 }; 52 {literal}53 52 54 53 $('.preview-drag').on('change', function() { … … 59 58 60 59 for (var i=0; i<inputs.length; i++) { 61 search = '{ \\$EASYCAPTCHA_CONF\\.'+ inputs[i] +'}';60 search = '{ldelim}\\$EASYCAPTCHA.drag\\.'+ inputs[i] +'}'; 62 61 replace = $('input[name="drag['+ inputs[i] +']"]').val(); 63 62 style = style.replace(new RegExp(search, 'g'), replace); … … 67 66 y = parseInt($('input[name="drag[nb]"]').val()); 68 67 69 search = '{ dat_equation}',68 search = '{ldelim}math equation=\'15+(x+5)*y\' x=$EASYCAPTCHA.drag.size y=$EASYCAPTCHA.drag.nb}', 70 69 replace = 15+(x+5)*y; 71 style = style.replace( new RegExp(search, 'g'), replace);70 style = style.replace(search, replace); 72 71 73 72 $('#drag_style').text(style); … … 107 106 $(this).nextAll('.preview').slideDown(); 108 107 }); 109 {/ literal}{/footer_script}108 {/footer_script} 110 109 111 110 … … 233 232 <a class="buttonLike">{'Preview'|translate}</a> 234 233 <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} 236 236 {$smarty.capture.easycaptcha} 237 237 </div> … … 251 251 [<a href="https://www.iconfinder.com/iconsets/ie_Bright" class="externalLink">#4</a>] 252 252 | 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>] 255 255 </div> 256 256 257 257 258 258 {* <!-- weird thing to update bunch of CSS --> *} 259 {html_head} {literal}259 {html_head} 260 260 <style id="drag_style"></style> 261 261 <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} 302 263 </script> 303 {/ literal}{/html_head}264 {/html_head}
Note: See TracChangeset
for help on using the changeset viewer.