Ignore:
Timestamp:
Jan 9, 2014, 7:55:29 PM (10 years ago)
Author:
mistic100
Message:

update for 2.6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/oAuth/template/identification_common.tpl

    r24142 r26556  
    11{combine_css path=$OAUTH_PATH|cat:'template/oauth_sprites.css'}
    22
    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"}
    175
    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}
    2211
    23 {footer_script}{literal}
     12{footer_script}
    2413// redirect, called from the popup
    2514function 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') {
    2917    url = "{$ABS_ROOT_URL}"+ type +".php";
    3018  }
    31 {literal}
     19
    3220  window.location.href = url;
    3321}
     
    4937    case 'OpenID': case 'Wordpress': case 'Flickr': case 'Steam':
    5038      switch(idp) {
    51 {/literal}
    5239        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;
    5441        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;
    5643      }
    5744     
    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
    5951      jQuery("#openid_form .oauth_38px").removeClass().addClass("oauth_38px " + idp.toLowerCase());
    6052      jQuery("#openid_form h3").html(idp);
    6153      jQuery("#openid_form").data('idp', idp);
    62 {literal} 
     54
    6355      jQuery.colorbox({
    6456        inline:true,
     
    6658        initialWidth:0,
    6759        initialHeight:0,
    68         onComplete:function(){ jQuery.colorbox.resize({speed:0}) } // prevent misalignement when icon not loaded
     60        onComplete: function(){ jQuery.colorbox.resize({ speed:0 }) } // prevent misalignement when icon not loaded
    6961      })
    7062      break;
    7163     
    7264    default:
    73 {/literal}
    7465      open_auth("{$OAUTH_URL}"+ idp);
    75 {literal}
    7666  }
    7767 
     
    9585    case 'Steam': oi = "http://steamcommunity.com/openid/" + oi; break;
    9686  }
    97 {/literal} 
     87
    9888  open_auth("{$OAUTH_URL}OpenID&openid_identifier="+ encodeURI(oi));
    99 {literal}
     89
    10090  jQuery.colorbox.close();
    10191  return false;
     
    10797  return false;
    10898});
    109 {/literal}{/footer_script}
     99{/footer_script}
    110100
    111101<div style="display:none;">
     
    123113    <div>
    124114      <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>
    127117    </div>
    128118  </form>
Note: See TracChangeset for help on using the changeset viewer.