Changeset 26556 for extensions/oAuth/template/identification_common.tpl
- Timestamp:
- Jan 9, 2014, 7:55:29 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/oAuth/template/identification_common.tpl
r24142 r26556 1 1 {combine_css path=$OAUTH_PATH|cat:'template/oauth_sprites.css'} 2 2 3 {html_style}{literal} 4 #openid_form { 5 padding:20px; 6 } 7 #openid_form h3, #openid_form .oauth_38px { 8 display:inline-block; 9 vertical-align:middle; 10 margin:0; 11 } 12 #openid_label.error { 13 color:red; 14 font-weight:bold; 15 } 16 {/literal}{/html_style} 3 {combine_script id='jquery.colorbox' load='footer' require='jquery' path='themes/default/js/plugins/jquery.colorbox.min.js'} 4 {combine_css id='colorbox' path="themes/default/js/plugins/colorbox/style2/colorbox.css"} 17 5 18 {if not isset($OAUTH_NO_LIGHTBOX)} 19 {combine_script id='jquery.colorbox' load='footer' require='jquery' path='themes/default/js/plugins/jquery.colorbox.min.js'} 20 {combine_css path="themes/default/js/plugins/colorbox/style2/colorbox.css"} 21 {/if} 6 {html_style} 7 #openid_form { padding:20px; } 8 #openid_form h3, #openid_form .oauth_38px { display:inline-block; vertical-align:middle; margin:0; } 9 #openid_label.error { color:red; font-weight:bold; } 10 {/html_style} 22 11 23 {footer_script} {literal}12 {footer_script} 24 13 // redirect, called from the popup 25 14 function redirect(type) { 26 {/literal} 27 url = "{$REDIRECT_TO}"; 28 if (typeof type != 'undefined' && type != 'default') {ldelim} 15 var url = "{$REDIRECT_TO}"; 16 if (typeof type != 'undefined' && type != 'default') { 29 17 url = "{$ABS_ROOT_URL}"+ type +".php"; 30 18 } 31 {literal} 19 32 20 window.location.href = url; 33 21 } … … 49 37 case 'OpenID': case 'Wordpress': case 'Flickr': case 'Steam': 50 38 switch(idp) { 51 {/literal}52 39 case 'OpenID': 53 jQuery("#openid_label").html('{'Please enter your OpenID URL'| @translate|escape:javascript}'); break;40 jQuery("#openid_label").html('{'Please enter your OpenID URL'|translate|escape:javascript}'); break; 54 41 case 'Wordpress': case 'Flickr': case 'Steam': 55 jQuery("#openid_label").html('{'Please enter your username'| @translate|escape:javascript}'); break;42 jQuery("#openid_label").html('{'Please enter your username'|translate|escape:javascript}'); break; 56 43 } 57 44 58 jQuery("#openid_form").css('background-color', $("#the_page #content").css('background-color')); 45 var bg_color = $('#the_page #content').css('background-color'); 46 if (!bg_color || bg_color=='transparent') { 47 bg_color = $('body').css('background-color'); 48 } 49 jQuery("#openid_form").css('background-color', bg_color); 50 59 51 jQuery("#openid_form .oauth_38px").removeClass().addClass("oauth_38px " + idp.toLowerCase()); 60 52 jQuery("#openid_form h3").html(idp); 61 53 jQuery("#openid_form").data('idp', idp); 62 {literal} 54 63 55 jQuery.colorbox({ 64 56 inline:true, … … 66 58 initialWidth:0, 67 59 initialHeight:0, 68 onComplete: function(){ jQuery.colorbox.resize({speed:0}) } // prevent misalignement when icon not loaded60 onComplete: function(){ jQuery.colorbox.resize({ speed:0 }) } // prevent misalignement when icon not loaded 69 61 }) 70 62 break; 71 63 72 64 default: 73 {/literal}74 65 open_auth("{$OAUTH_URL}"+ idp); 75 {literal}76 66 } 77 67 … … 95 85 case 'Steam': oi = "http://steamcommunity.com/openid/" + oi; break; 96 86 } 97 {/literal} 87 98 88 open_auth("{$OAUTH_URL}OpenID&openid_identifier="+ encodeURI(oi)); 99 {literal} 89 100 90 jQuery.colorbox.close(); 101 91 return false; … … 107 97 return false; 108 98 }); 109 {/ literal}{/footer_script}99 {/footer_script} 110 100 111 101 <div style="display:none;"> … … 123 113 <div> 124 114 <br> 125 <input type="submit" name="{'Submit'| @translate}">126 <a href="#" id="openid_cancel">{'Cancel'| @translate}</a>115 <input type="submit" name="{'Submit'|translate}"> 116 <a href="#" id="openid_cancel">{'Cancel'|translate}</a> 127 117 </div> 128 118 </form>
Note: See TracChangeset
for help on using the changeset viewer.