3bc9af21
Yarik
Layout
|
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
132
133
134
135
136
137
138
139
140
141
142
143
|
}
function forms() {
if($('.phone-input input').length){
$('.phone-input input').mask('+38 (000) 000 00 00');
}
}
function tabsContentOiv() {
$('.oiv-list li').click(function (e) {
e.preventDefault()
if($(this).hasClass('active-list-oiv')){
} else {
$('.table-wrapp-2').after('<div id="preload-cab"><div></div></div>')
$('.oiv-list li').removeClass('active-list-oiv')
$(this).addClass('active-list-oiv')
var thisNum = $(this).index()
var cabContent = $('.hidden-tables-oiv')
setTimeout(function () {
cabContent.removeClass('active-tab-oiv')
$(cabContent[thisNum]).addClass('active-tab-oiv')
$('#preload-cab').remove()
},800)
}
})
}
}
function formsHome() {
$('.btn_login, .btn_login_2').click(function (e) {
e.preventDefault()
var pos = ($(window).scrollTop())+20
$('#overlay').fadeIn(400,
function(){
$('#login_form')
.css('display', 'block')
.animate({opacity: 1, top: pos}, 200);
});
})
$('#modal_close, #overlay').click( function(){
$('.forms_').animate({opacity: 0, top: '0'}, 200,function(){
$(this).css('display', 'none');
$('#overlay').fadeOut(400);
});
});
$('.btn_register').click( function(e){
e.preventDefault()
var pos = ($(window).scrollTop())+20
$('#login_form').animate({opacity: 0, top: '-50px'}, 200,function(){
$('#register_form')
.css('display', 'block')
.animate({opacity: 1, top: pos}, 200);
});
});
$('#login_form form button').click(function (e) {
if($('#input-1').val().length<1){
e.preventDefault()
$('#input-1').addClass('errors')
} else {
$('#input-1').removeClass('errors')
}
if($('#input-2').val().length<1){
e.preventDefault()
$('#input-2').addClass('errors')
} else {
$('#input-2').removeClass('errors')
}
})
$('#register_form form button').click(function (e) {
if($('#input-3').val().length<1){
e.preventDefault()
$('#input-3').addClass('errors')
} else {
$('#input-3').removeClass('errors')
}
if($('#input-4').val().length<1){
e.preventDefault()
$('#input-4').addClass('errors')
} else {
$('#input-4').removeClass('errors')
}
if($('#input-5').val().length<1){
e.preventDefault()
$('#input-5').addClass('errors')
} else {
$('#input-5').removeClass('errors')
}
})
}
|
f1b535e4
Yarik
Datepicker
|
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
|
$(document).on('pjax:complete', function() {
initDatePicker();
});
function initDatePicker() {
$('._datepicer, ._datepicker')
.datepicker(
{
changeMonth: true,
changeYear: true,
dateFormat: 'dd.mm.yy',
closeText: 'Закрыть',
prevText: 'Пред',
nextText: 'След',
monthNames: [
'Январь',
'Февраль',
'Март',
'Апрель',
'Май',
'Июнь',
'Июль',
'Август',
'Сентябрь',
'Октябрь',
'Ноябрь',
'Декабрь'
],
monthNamesShort: [
'Январь',
'Февраль',
'Март',
'Апрель',
'Май',
'Июнь',
'Июль',
'Август',
'Сентябрь',
'Октябрь',
'Ноябрь',
'Декабрь'
],
dayNames: [
'воскресенье',
'понедельник',
'вторник',
'среда',
'четверг',
'пятница',
'суббота'
],
dayNamesShort: [
'вск',
'пнд',
'втр',
'срд',
'чтв',
'птн',
'сбт'
],
dayNamesMin: [
'Вс',
'Пн',
'Вт',
'Ср',
'Чт',
'Пт',
'Сб'
],
firstDay: 1
}
);
}
|
dcfb3d5c
Alexey Boroda
-Form ajax ready
|
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
|
$(document).on('beforeSubmit', '#add-int-prop-form', function() {
$.post($(this).attr('action'), $(this).serialize(), function(data) {
var type;
if(data.error) {
type = 'danger';
} else {
type = 'success';
}
$('#add-composition-modal').modal('hide');
showStatus(data.message, type);
document.getElementById('add-int-prop-form').reset();
});
return false;
});
|