Nextrek
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
(function(){
jQuery(document).ready(function($){
$('.reg-select a').click(function(e){
e.preventDefault();
var id = $(this).attr('href');
$('.reg-header').hide();
$('.reg-select').hide();
switch(id){
case "#user":
$('.user-reg-header').show();
$('.affiliate-reg-header').hide();
$('.landing-form-user').addClass("visible");
$('.landing-form-user').show();
$('.landing-form-affiliate').removeClass("visible");
$('.landing-form-affiliate').hide();
$('.landing-form-user #name_user').hide();
$('.landing-form-user #surname_user').hide();
//document.getElementById("avatar_path_user").removeAttribute("required")
break;
case "#affiliate":
$('.affiliate-reg-header').show();
$('#step1').show();
$('#step2').hide();
//$('.landing-form-affiliate').addClass("visible");
//$('.landing-form-affiliate').show();
$('.landing-form-user').addClass("visible");
$('.landing-form-user').show();
$('.landing-form-user #name_user').show();
$('.landing-form-user #surname_user').show();
$('.landing-form-user #name_user').attr("required", "");
$('.landing-form-user #surname_user').attr("required", "");
//$('.landing-form-user #avatar_path_user').attr("required", "");
break;
default:
$('.user-reg-header').hide();
$('.affiliate-reg-header').hide();
$('.landing-form-affiliate').removeClass("visible");
$('.landing-form-affiliate').hide();
$('.landing-form-user').removeClass("visible");
$('.landing-form-user').hide();
break;
}
window.location.hash = id
window.location.href = window.location.origin + window.location.pathname + window.location.hash;
var cookieName = id.slice(1,id.length);
$.cookie(cookieName, id, {expires : expireDate()});
});
$('input#passw1_user').hover(function(){
$('#tooltip-psw').css("display", "block");
}, function(){
$('#tooltip-psw').css("display", "none");
});
/*$('input#avatar_path_user').hover(function(){
var hash = window.location.hash;
if (hash == '#user'){
$('#tooltip-avatar').css("display", "block");
} else{
$('#tooltip-avatar-logo').css("display", "block");
}
}, function(){
var hash = window.location.hash;
if (hash == '#user'){
$('#tooltip-avatar').css("display", "none");
} else{
$('#tooltip-avatar-logo').css("display", "none");
}
});*/
if($.cookie("user")!=null && $.cookie("affiliate")==null && $.cookie("affiliate2")==null){
$('.reg-header').hide();
$('.reg-select').hide();
$('.user-reg-header').show();
$('.affiliate-reg-header').hide();
$('.landing-form-user').addClass("visible");
$('.landing-form-user').show();
$('.landing-form-affiliate').removeClass("visible");
$('.landing-form-affiliate').hide();
//document.getElementById("avatar_path_user").removeAttribute("required")
window.location.href = window.location.origin + window.location.pathname + "#user";
} else if ($.cookie("user")==null && $.cookie("affiliate")!=null && $.cookie("affiliate2")==null){
$('.reg-header').hide();
$('.reg-select').hide();
$('.user-reg-header').hide();
$('.affiliate-reg-header').show();
$('.landing-form-affiliate').addClass("visible");
$('.landing-form-affiliate').show();
$('.landing-form-user').addClass("visible");
$('.landing-form-user').show();
$('.landing-form-user #name_user').show();
$('.landing-form-user #surname_user').show();
$('.landing-form-user #name_user').attr("required", "");
$('.landing-form-user #surname_user').attr("required", "");
$('.landing-form-user #avatar_path_user').attr("required", "");
window.location.href = window.location.origin + window.location.pathname + "#affiliate";
} else if ($.cookie("user")==null && $.cookie("affiliate")==null && $.cookie("affiliate2")!=null){
$('.reg-header').hide();
$('.reg-select').hide();
$('.user-reg-header').hide();
$('.affiliate-reg-header').show();
$('.landing-form-user').removeClass("visible");
$('.landing-form-user').hide();
$('#form-user').hide();
$('#step1').hide();
$('#step2').show();
$('.landing-form-affiliate').show();
$('.landing-form-affiliate .form-control').show();
$('#form-affiliate').show();
window.location.href = window.location.origin + window.location.pathname + "#affiliate";
getTypologies();
} else{
$('.reg-header').show();
$('.reg-select').show();
window.location.hash = window.location.hash.replace(window.location.hash, '');
//window.location.href = window.location.origin + window.location.pathname + window.location.search;
}
});
})();
|
Revision |
Author |
Commited |
Message |
803
|
JMBauan
|
Mon 19 Oct, 2015 14:14:39 +0000 |
|