fixed hash encoding bug with chrome between tarifs page and register form
This commit is contained in:
parent
2d5be00cf1
commit
feb93503b6
@ -29,23 +29,23 @@ MaterioUser = function(){
|
|||||||
href = $this.attr("href"),
|
href = $this.attr("href"),
|
||||||
destination = href.match('/\?destination=([^,]+)');
|
destination = href.match('/\?destination=([^,]+)');
|
||||||
|
|
||||||
destination = "/" + destination[1].replace('%23', '#');
|
destination = "/" + destination[1];
|
||||||
destination = destination.replace('//', '/');
|
destination = destination.replace('//', '/');
|
||||||
// trace('destination', destination);
|
// trace('destination', destination);
|
||||||
|
|
||||||
if($this.parents('.gratos').size()){
|
// if($this.parents('.gratos').size()){
|
||||||
loadRegisterBlock(destination);
|
// loadRegisterBlock(destination);
|
||||||
}else{
|
// }else{
|
||||||
loadLoginAndRegisterBlock(destination);
|
loadLoginAndRegisterBlock(destination);
|
||||||
}
|
// }
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
function loadRegisterBlock (destination) {
|
// function loadRegisterBlock (destination) {
|
||||||
// trace("loadRegisterBlock :: dest = "+destination);
|
// // trace("loadRegisterBlock :: dest = "+destination);
|
||||||
$.getJSON(Drupal.settings.basePath+Drupal.settings.pathPrefix+'materio_user/registerblock', function(json){formLoaded(json, destination);});
|
// $.getJSON(Drupal.settings.basePath+Drupal.settings.pathPrefix+'materio_user/registerblock', function(json){formLoaded(json, destination);});
|
||||||
}
|
// }
|
||||||
|
|
||||||
function loadLoginAndRegisterBlock(destination){
|
function loadLoginAndRegisterBlock(destination){
|
||||||
// trace('loadRegistrationBlock :: dest = '+destination);
|
// trace('loadRegistrationBlock :: dest = '+destination);
|
||||||
@ -142,7 +142,7 @@ MaterioUser = function(){
|
|||||||
|
|
||||||
}else{
|
}else{
|
||||||
// trace('destination = '+destination);
|
// trace('destination = '+destination);
|
||||||
window.location.pathname = destination;
|
window.location = destination.replace('%23', '#');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* Implements hook_init().
|
* Implements hook_init().
|
||||||
*/
|
*/
|
||||||
function materio_user_init() {
|
function materio_user_init() {
|
||||||
drupal_add_js(drupal_get_path('module', 'materio_user').'/js/materio_user.min.js');
|
drupal_add_js(drupal_get_path('module', 'materio_user').'/js/materio_user.js');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ function materio_user_register_submit(){
|
|||||||
}else{
|
}else{
|
||||||
$messages = drupal_get_messages('status');
|
$messages = drupal_get_messages('status');
|
||||||
// $return['messages'] = $messages;
|
// $return['messages'] = $messages;
|
||||||
drupal_set_message(t("Congratulations, you juste created your free materiO' account, welcome !"), 'status');
|
// drupal_set_message(t("Congratulations, you juste created your free materiO' account, welcome !"), 'status');
|
||||||
foreach ($messages['status'] as $msg) {
|
foreach ($messages['status'] as $msg) {
|
||||||
drupal_set_message($msg, 'status');
|
drupal_set_message($msg, 'status');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user