PageSourceSearch

https://bitmall.ru/catalog/view/theme/unishop2/js/login-register.js

js bitmall.ru collected 2026-10-09 01:32:00 UTC 3,875 bytes, 146 lines download raw bytes

1function uniLoginOpen() {
2	uniAddCss('catalog/view/theme/unishop2/stylesheet/login_register.css');
3	
4	$.ajax({
5		url:'index.php?route=extension/module/uni_login_register/modal',
6		type:'post',
7		data:{'type':'login'},
8		dataType:'html',
9		success:function(data) {
10			$('html body').append(data);
11			$('#modal-login-form').addClass(uniJsVars.popup_effect_in).modal('show');
12			
13			$(document).on('keydown', '#modal-login-form input', function(e) {
14				if (e.keyCode == 13) {
15					$(this).parent().parent().find('.btn').click();
16				}
17			});
18		}
19	});
20}
21
22function uniLoginSend() {
23	var form = '#modal-login-form';
24	
25	$.ajax({
26		url: 'index.php?route=extension/module/uni_login_register/login',
27		type: 'post',
28		data: $(form+' input, '+form+' textarea').serialize(),
29		dataType: 'json',
30		beforeSend: function() {
31			$('.login_button').button('loading');
32		},
33		complete: function() {
34			$('.login_button').button('reset');
35		},
36		success: function(json) {
37			if (json['redirect']) {
38				if (typeof(uniDelPageCache) === 'function') {
39					uniDelPageCache();
40				}
41				
42				if(window.location.pathname == '/logout/' || window.location.search == '?route=account/logout') {
43					window.location = json['redirect'];
44				} else {
45					window.location.reload();
46				}
47			}
48			
49			if (json['error']) {
50				uniFlyAlert('danger', json['error']);
51			}
52		}
53	});
54}
55
56function uniRegisterOpen() {
57	uniAddCss('catalog/view/theme/unishop2/stylesheet/login_register.css');
58	uniAddJs('catalog/view/theme/unishop2/js/jquery.maskedinput.min.js');
59	
60	$.ajax({
61		url: 'index.php?route=extension/module/uni_login_register/modal',
62		type:'post',
63		data:{'type':'register'},
64		dataType: 'html',
65		success: function(data) {
66			$('html body').append(data);
67			$('#modal-register-form').addClass(uniJsVars.popup_effect_in).modal('show');
68		}
69	});
70}
71
72function uniRegisterSend() {
73	var form = '#modal-register-form', btn = '.modal-register__btn';
74	
75	$.ajax({
76		url: 'index.php?route=extension/module/uni_login_register/register',
77		type: 'post',
78		data: $(form+' input, '+form+' textarea').serialize(),
79		dataType: 'json',
80		beforeSend: function() {
81			$(btn).button('loading');
82		},
83		complete: function() {
84			$(btn).button('reset');
85		},
86		success: function(json) {				
87			if (json['redirect']) {
88				window.location = json['redirect'];
89			}
90			
91			if (json['appruv']) {
92				$('.modal-register').html($('<div class="register_success">'+json['appruv']+'</div>').fadeIn());
93			}
94			
95			if (json['error']) {
96				for (i in json['error']) {
97					form_error(form, i);
98				}
99				
100				uniFlyAlert('danger', json['error']);
101			}
102		},
103		error: function(xhr, ajaxOptions, thrownError) {
104			//alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
105			alert(xhr.responseText);
106	    }
107	});
108}
109
110function uniRegisterPageSend() {
111	var form = '.account-register__form',  btn = '.account-register__submit';
112	
113	$.ajax({
114		url: 'index.php?route=extension/module/uni_login_register/register',
115		type: 'post',
116		data: $(form+' input, '+form+' textarea').serialize(),
117		dataType: 'json',
118		beforeSend: function() {
119			$(btn).button('loading');
120		},
121		complete: function() {
122			$(btn).button('reset');
123		},
124		success: function(json) {				
125			if (json['redirect']) {
126				window.location = json['redirect'];
127			}
128			
129			if (json['appruv']) {
130				$('.account-register').html($('<div class="register_success">'+json['appruv']+'</div>').fadeIn());
131			}
132			
133			if (json['error']) {
134				for (i in json['error']) {
135					form_error(form, i);
136				}
137				
138				uniFlyAlert('danger', json['error']);
139			}
140		},
141		error: function(xhr, ajaxOptions, thrownError) {
142			//alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
143			alert(xhr.responseText);
144	    }
145	});
146}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.