Changeset 26605 for extensions/oAuth/template/identification_common.tpl
- Timestamp:
- Jan 11, 2014, 1:27:14 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/oAuth/template/identification_common.tpl
r26604 r26605 3 3 {combine_script id='jquery.colorbox' load='footer' require='jquery' path='themes/default/js/plugins/jquery.colorbox.min.js'} 4 4 {combine_css id='colorbox' path="themes/default/js/plugins/colorbox/style2/colorbox.css"} 5 6 {if $OAUTH.providers.Persona.enabled} 7 {combine_script id='persona' path='https://login.persona.org/include.js' load='footer'} 8 {/if} 5 9 6 10 {html_style} … … 31 35 32 36 // click on a button 33 jQuery('a.oauth ').click(function(e) {37 jQuery('a.oauth:not(.persona)').click(function(e) { 34 38 e.preventDefault(); 35 39 … … 100 104 jQuery.colorbox.close(); 101 105 }); 106 107 {if $OAUTH.providers.Persona.enabled} 108 jQuery('a.oauth.persona').click(function(e) { 109 e.preventDefault(); 110 navigator.id.request(); 111 }); 112 113 jQuery('a[href$="act=logout"]').click(function(e) { 114 e.preventDefault(); 115 navigator.id.logout(); 116 }); 117 118 navigator.id.watch({ 119 loggedInUser: {if not empty($OAUTH.persona_email)}'{$OAUTH.persona_email}'{else}null{/if}, 120 121 onlogin: function(assertion) { 122 jQuery.ajax({ 123 type: 'POST', 124 url: '{$OAUTH.u_login}Persona', 125 dataType: 'json', 126 data: { assertion: assertion }, 127 success: function(data) { 128 oauth_redirect(data.redirect_to); 129 }, 130 error: function() { 131 alert('Unknown error'); 132 } 133 }); 134 }, 135 136 onlogout: function() { 137 window.location.href = '{$U_LOGOUT}'; 138 } 139 }); 140 {/if} 102 141 {/footer_script} 103 142
Note: See TracChangeset
for help on using the changeset viewer.