|
@@ -29,23 +29,23 @@ MaterioUser = function(){
|
|
|
href = $this.attr("href"),
|
|
|
destination = href.match('/\?destination=([^,]+)');
|
|
|
|
|
|
- destination = "/" + destination[1].replace('%23', '#');
|
|
|
+ destination = "/" + destination[1];
|
|
|
destination = destination.replace('//', '/');
|
|
|
// trace('destination', destination);
|
|
|
|
|
|
- if($this.parents('.gratos').size()){
|
|
|
- loadRegisterBlock(destination);
|
|
|
- }else{
|
|
|
+ // if($this.parents('.gratos').size()){
|
|
|
+ // loadRegisterBlock(destination);
|
|
|
+ // }else{
|
|
|
loadLoginAndRegisterBlock(destination);
|
|
|
- }
|
|
|
+ // }
|
|
|
return false;
|
|
|
});
|
|
|
};
|
|
|
|
|
|
- function loadRegisterBlock (destination) {
|
|
|
- // trace("loadRegisterBlock :: dest = "+destination);
|
|
|
- $.getJSON(Drupal.settings.basePath+Drupal.settings.pathPrefix+'materio_user/registerblock', function(json){formLoaded(json, destination);});
|
|
|
- }
|
|
|
+ // function loadRegisterBlock (destination) {
|
|
|
+ // // trace("loadRegisterBlock :: dest = "+destination);
|
|
|
+ // $.getJSON(Drupal.settings.basePath+Drupal.settings.pathPrefix+'materio_user/registerblock', function(json){formLoaded(json, destination);});
|
|
|
+ // }
|
|
|
|
|
|
function loadLoginAndRegisterBlock(destination){
|
|
|
// trace('loadRegistrationBlock :: dest = '+destination);
|
|
@@ -142,7 +142,7 @@ MaterioUser = function(){
|
|
|
|
|
|
}else{
|
|
|
// trace('destination = '+destination);
|
|
|
- window.location.pathname = destination;
|
|
|
+ window.location = destination.replace('%23', '#');
|
|
|
}
|
|
|
};
|
|
|
|