Skip to content

Commit

Permalink
prueba
Browse files Browse the repository at this point in the history
  • Loading branch information
Dario Guzik committed Jan 13, 2012
1 parent 7c9bf40 commit facbafd
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 21 deletions.
22 changes: 12 additions & 10 deletions pkg/mercadolibre.js
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ var XAuth = (function () {

var Sroc = window.Sroc;

var MercadoLibre = {
var MELI = {
baseURL : "https://api.mercadolibre.com",
authorizationURL : "http://auth.mercadolibre.com/authorization",
authorizationStateURL : "https://www.mercadolibre.com/jms/SITE/oauth/authorization/state",
Expand Down Expand Up @@ -1230,7 +1230,7 @@ var XAuth = (function () {
this.options.xauth_domain = this.options.xauth_domain_fallback;

if (!this.options.xd_url)
this.options.xd_url = "/xd.html";
this.options.xd_url = "/xd_sdk.html";
if (typeof(this.options.show_login) != "undefined")
this.showLogin = this.options.show_login;

Expand Down Expand Up @@ -1354,7 +1354,7 @@ var XAuth = (function () {
if (!this.authorizationStateCallbackInProgress) {
this.authorizationStateCallbackInProgress = true;
//launch timer to catch timeout
this.authorizationStateCallbackTimer = setTimeout('MercadoLibre._authFail();',this.options.auth_timeout);
this.authorizationStateCallbackTimer = setTimeout('MELI._authFail();',this.options.auth_timeout);
if (this.appInfo == null) {
this._getApplicationInfo(this._authorize);
} else {
Expand Down Expand Up @@ -1427,7 +1427,7 @@ var XAuth = (function () {
}

XAuth.expire({key:key});
MercadoLibre.authorizationState[key] = null;
MELI.authorizationState[key] = null;
cookie("ats", null, {domain:document.domain, path:"/"});
this.secret = null;

Expand Down Expand Up @@ -1576,7 +1576,7 @@ var XAuth = (function () {

},
_authorize: function () {
MercadoLibre._iframe(MercadoLibre._authorizationStateURL());
MELI._iframe(MELI._authorizationStateURL());
},
bind : function(event, callback) {
if (typeof (this.callbacks[event]) == "undefined")
Expand Down Expand Up @@ -1770,8 +1770,8 @@ var XAuth = (function () {
clearTimeout(this.authorizationStateCallbackTimer);
this.authorizationStateCallbackTimer = null;
}
MercadoLibre._iframe(MercadoLibre._xd_url());
MercadoLibre._authComplete(null);
MELI._iframe(MELI._xd_url());
MELI._authComplete(null);

},
_authComplete : function(secret) {
Expand Down Expand Up @@ -1840,11 +1840,13 @@ var XAuth = (function () {

};

MercadoLibre._parseHash();
MELI._parseHash();

MercadoLibre._checkPostAuthorization();
MELI._checkPostAuthorization();

window.MercadoLibre = MercadoLibre;
window.MELI = MELI;
if (typeof(window.mlAsyncInit) == "function")
window.mlAsyncInit();

})(cookie, XAuth);

Expand Down
Loading

0 comments on commit facbafd

Please sign in to comment.