5077a0ec
Yarik
test
|
1
2
3
4
5
6
7
|
$(document).ready(
function()
{
var checkscroll = [];
for(var ch = 0; ch < 2; ch++)
{
checkscroll[checkscroll.length] = false;
|
eb7e82fb
Administrator
29.02.16
|
8
|
}
|
5077a0ec
Yarik
test
|
9
10
11
12
13
|
contentHeight();
resizeWindow();
scrolling();
menuBg();
projectAllMenu();
|
004b2298
Yarik
test
|
14
|
// mapLoad();
|
5077a0ec
Yarik
test
|
15
16
17
18
19
20
21
|
federationHome();
//validationForms();
//menuContent();
jobClick();
box15Height();
formRezume();
fileVal();
|
004b2298
Yarik
test
|
22
|
//newMenuMap();
|
5077a0ec
Yarik
test
|
23
24
25
26
27
28
29
30
|
seeAllComm();
gallerPage();
selectAfter();
tagPortfolio();
seeAllProfile();
featuresTags();
inputNumber();
videoFull();
|
6668b7fe
Виталий
git
|
31
|
fixMenuRadius();
|
5077a0ec
Yarik
test
|
32
33
34
35
36
37
|
function resizeWindow()
{
$(window).resize(
function()
{
contentHeight();
|
eb7e82fb
Administrator
29.02.16
|
38
|
}
|
5077a0ec
Yarik
test
|
39
40
|
);
}
|
eb7e82fb
Administrator
29.02.16
|
41
|
|
5077a0ec
Yarik
test
|
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
|
function contentHeight()
{
//прижимаем футер
var headerHeight = document.getElementsByClassName('section-box header');
var menuHeight = document.getElementsByClassName('section-box menu-header-all');
var contentHeight = document.getElementsByClassName('section-box content');
var footerHeight = document.getElementsByClassName('section-box footer');
$(contentHeight).css({minHeight : ($(window).height()) - ($(footerHeight).height()) - ($(headerHeight).height()) - ($(menuHeight).height())});
}
function scrolling()
{
//проверка браузера
var sUsrAg = navigator.userAgent;
if(sUsrAg.indexOf("Chrome") > -1)
{
} else if(sUsrAg.indexOf("Safari") > -1)
{
$('body').css({fontFamily : 'arial'});
}
var _browser = navigator.userAgent;
_browser = _browser.indexOf("WebKit");
//scroll
var tempScrollTop = 0;
var currentScrollTop = 0;
$(window).scroll(
function()
{
if(_browser >= 0)
{
currentScrollTop = $('body').scrollTop();
} else
{
currentScrollTop = $('html').scrollTop();
|
eb7e82fb
Administrator
29.02.16
|
77
|
}
|
5077a0ec
Yarik
test
|
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
if(tempScrollTop < currentScrollTop)
{
if(currentScrollTop >= 114)
{
$('.menu-header-all').css({position : 'fixed', zIndex : 9990});
$('.section-box.content').css({marginTop : 41});
}
if($('.section-box-6').hasClass('section-box-6'))
{
if(currentScrollTop > offsetSect6 && !checkscroll[0])
{
checkscroll[0] = true;
landingAnimation();
}
}
|
eb7e82fb
Administrator
29.02.16
|
94
|
|
5077a0ec
Yarik
test
|
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
if($('.section-box-8').hasClass('section-box-8'))
{
if(currentScrollTop > offsetSect8 && !checkscroll[1])
{
checkscroll[1] = true;
landingAnimationWhyWork();
}
if(currentScrollTop > (offsetSect8 + 300) && !checkscroll[2])
{
checkscroll[2] = true;
landingAnimationWhyWorkTwo();
}
}
|
eb7e82fb
Administrator
29.02.16
|
109
|
}
|
5077a0ec
Yarik
test
|
110
111
112
113
114
115
116
117
118
|
else if(tempScrollTop > currentScrollTop)
{
//console.log('вверх');
if(currentScrollTop <= 114)
{
$('.menu-header-all').css({position : 'relative'});
$('.section-box.content').css({marginTop : 0});
}
|
eb7e82fb
Administrator
29.02.16
|
119
120
|
}
|
5077a0ec
Yarik
test
|
121
|
tempScrollTop = currentScrollTop;
|
eb7e82fb
Administrator
29.02.16
|
122
|
}
|
5077a0ec
Yarik
test
|
123
124
|
);
}
|
eb7e82fb
Administrator
29.02.16
|
125
|
|
5077a0ec
Yarik
test
|
126
127
128
129
130
131
132
133
134
135
136
137
138
|
function menuBg()
{
var heightUlTwoMenu = $('ul.content-menu-first').height();
$('.menu-two-wrapp').css({height : heightUlTwoMenu - 1});
$('ul.content-menu-first').hover(
function()
{
}, function()
{
$('.content-menu-first li').css({backgroundColor : '#fff'});
|
eb7e82fb
Administrator
29.02.16
|
139
|
}
|
5077a0ec
Yarik
test
|
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
|
);
$('.content-menu-first li').hover(
function()
{
var dataMenuBg = $(this).find('span').attr('data-menu-bg');
$('.content-menu-first li').css({backgroundColor : '#fff'});
$('.content-menu-first li a').css({color : '#333333'});
$(this).css({backgroundColor : dataMenuBg}).find('ul li').css({backgroundColor : dataMenuBg});
$('.content-menu-first li >ul li').mouseover(
function()
{
$(this).parent().parent().css({backgroundColor : dataMenuBg});
$('.content-menu-first li >ul li').css({backgroundColor : dataMenuBg});
$('.content-menu-first li >ul li').removeClass('hov-arrow');
$(this).addClass('hov-arrow');
}
)
|
eb7e82fb
Administrator
29.02.16
|
159
|
|
5077a0ec
Yarik
test
|
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
}, function()
{
$('.hov-arrow').removeClass('hov-arrow');
}
);
var thirdUlMenu = $('ul.content-menu-first li ul li ul');
thirdUlMenu.addClass('third-ul-menu');
if(thirdUlMenu.hasClass('third-ul-menu'))
{
thirdUlMenu.parent().find('a').addClass('remove-link');
$('.third-ul-menu li a').removeClass('remove-link');
$('.remove-link').parent().addClass('yes-after');
var remLink = $('.remove-link');
for(var ixx = 0; ixx < remLink.length; ixx++)
{
$(remLink[ixx]).html($(remLink[ixx]).text() + '<div class="hack-arrow"></div>')
}
|
eb7e82fb
Administrator
29.02.16
|
178
|
}
|
eb7e82fb
Administrator
29.02.16
|
179
|
|
5077a0ec
Yarik
test
|
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
|
$('ul.content-menu-first li ul li ul li ul').removeClass('third-ul-menu').addClass('last-ul-menu');
var lastUlMenu = $('ul.content-menu-first li ul li ul li ul');
if(lastUlMenu.hasClass('last-ul-menu'))
{
lastUlMenu.parent().find('a').addClass('remove-link-two');
$('.remove-link-two').parent().addClass('yes-after yes-after-two');
var remLastLink = $('ul.content-menu-first li ul li ul li.yes-after-two ul');
remLastLink.find('li').removeClass('yes-after yes-after-two');
remLastLink.find('a').removeClass('.remove-link-two');
var remLinkT = $('.remove-link-two');
$('.last-ul-menu .remove-link-two').removeClass('remove-link-two')
for(var ixx = 0; ixx < remLinkT.length; ixx++)
{
$(remLinkT[ixx]).html($(remLinkT[ixx]).text() + '<div class="hack-arrow"></div>')
$('.last-ul-menu .hack-arrow').removeClass('hack-arrow')
}
|
eb7e82fb
Administrator
29.02.16
|
198
|
}
|
5077a0ec
Yarik
test
|
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
$('ul.last-ul-menu').find('a').removeClass('remove-link-two');
$('.remove-link, .remove-link-two').click(
function(e)
{
e.preventDefault();
}
);
$('ul.content-menu-first > li').hover(
function()
{
var dataImgThis = $(this).attr('data-img');
$('.menu-two-wrapp').css({backgroundImage : 'url(' + dataImgThis + ')'})
}
);
|
eb7e82fb
Administrator
29.02.16
|
215
216
|
}
|
004b2298
Yarik
test
|
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
|
// function newMenuMap()
// {
// $('.company-performer-map-menu .content-menu-first>li>ul').addClass('content-menu-map-first');
// $('.company-performer-map-menu .content-menu-first>li>ul>li').addClass('content-menu-map-second');
// $('.company-performer-map-menu .content-menu-first>li').addClass('old-content-menu-map-zero');
// $('.company-performer-map-menu .content-menu-map-first').parent().removeClass('old-content-menu-map-zero').addClass('content-menu-map-zero');
// $('.company-performer-map-menu .content-menu-map-zero').click(
// function(e)
// {
// e.preventDefault();
// }
// );
// $('.company-performer-map-menu .content-menu-map-second, .company-performer-map-menu .old-content-menu-map-zero').click(
// function(e)
// {
// e.preventDefault()
// $.post(
// "maps/maps.php", function(data)
// {
// $("#map_cloud").empty();
// $("#map_cloud").append(data);
// initialize();
// }
// );
// }
// );
// }
|
eb7e82fb
Administrator
29.02.16
|
244
|
|
5077a0ec
Yarik
test
|
245
246
247
248
249
250
251
252
253
254
|
function projectAllMenu()
{
$('.all-project-home-title_menu li').click(
function()
{
$('.all-project-home-title_menu li').removeClass('project-home-active')
$(this).addClass('project-home-active')
}
)
}
|
eb7e82fb
Administrator
29.02.16
|
255
|
|
004b2298
Yarik
test
|
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
|
// function mapLoad()
// {
// $('.settings-map-ul ul li a').click(
// function(e)
// {
// e.preventDefault();
// $('.settings-map-ul ul li a').removeClass('active')
// $(this).addClass('active')
// $.post(
// "maps/maps.php", function(data)
// {
// $("#map_cloud").empty();
// $("#map_cloud").append(data);
// initialize();
// }
// );
// }
// );
// }
//
// mapLoadNewMenus()
// function mapLoadNewMenus()
// {
// $('.all-project-home-title_menu ul li').click(
// function()
// {
// $.post(
// "maps/maps.php", function(data)
// {
// $("#map_cloud").empty();
// $("#map_cloud").append(data);
// initialize();
// }
// );
// }
// );
// }
|
eb7e82fb
Administrator
29.02.16
|
293
|
|
5077a0ec
Yarik
test
|
294
295
|
function federationHome()
{
|
5077a0ec
Yarik
test
|
296
297
298
299
300
301
302
303
304
305
306
307
|
$('.federation-home-list li').click(
function()
{
$('.federation-home-list li').removeClass('federation-home-list-active')
$(this).addClass('federation-home-list-active')
var fedTisIndex = $(this).index()
var fedBlocks = $('.federation-home-blocks-wr-blocks')
$(fedBlocks).css({display : 'none'})
$(fedBlocks[fedTisIndex]).css({display : 'block'})
}
);
}
|
eb7e82fb
Administrator
29.02.16
|
308
|
|
5077a0ec
Yarik
test
|
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
|
if($('.section-box-6').hasClass('section-box-6'))
{
var offsetSect6 = $('.section-box-6').offset().top;
offsetSect6 = offsetSect6 - ($(window).height() / 2);
}
$('.lan_yo_buis_txt, .lan_yo_buis_img, .lan_yo_buis_arr').css({opacity : 0})
function landingAnimation()
{
var animBlockLand = $('.landing-your-buisnes-blocks');
var animBlockLandArrow = $('.lan_yo_buis_arr');
$(animBlockLand[0]).css({transform : 'rotateY(0deg)'}).find('.lan_yo_buis_img ').css({transition : '2s', opacity : 1});
$(animBlockLand[0]).find('.lan_yo_buis_txt').css({transition : '2s', opacity : 1});
setTimeout(
function()
{
$(animBlockLand[1]).css({transform : 'rotateY(0deg)'}).find('.lan_yo_buis_img ').css({transition : '2s', opacity : 1});
$(animBlockLand[1]).find('.lan_yo_buis_txt').css({transition : '2s', opacity : 1});
}, 500
)
setTimeout(
function()
{
$(animBlockLand[2]).css({transform : 'rotateY(0deg)'}).find('.lan_yo_buis_img ').css({transition : '2s', opacity : 1});
$(animBlockLand[2]).find('.lan_yo_buis_txt').css({transition : '2s', opacity : 1});
}, 1000
)
setTimeout(
function()
{
$(animBlockLand[5]).css({transform : 'rotateY(0deg)'}).find('.lan_yo_buis_img ').css({transition : '2s', opacity : 1});
$(animBlockLand[5]).find('.lan_yo_buis_txt').css({transition : '2s', opacity : 1});
}, 1500
)
setTimeout(
function()
{
$(animBlockLand[4]).css({transform : 'rotateY(0deg)'}).find('.lan_yo_buis_img ').css({transition : '2s', opacity : 1});
$(animBlockLand[4]).find('.lan_yo_buis_txt').css({transition : '2s', opacity : 1});
}, 2000
)
setTimeout(
function()
{
$(animBlockLand[3]).css({transform : 'rotateY(0deg)'}).find('.lan_yo_buis_img ').css({transition : '2s', opacity : 1});
$(animBlockLand[3]).find('.lan_yo_buis_txt').css({transition : '2s', opacity : 1});
}, 2500
)
setTimeout(
function()
{
$(animBlockLandArrow[0]).css({transition : '1s', opacity : 1});
}, 300
);
setTimeout(
function()
{
$(animBlockLandArrow[1]).css({transition : '1s', opacity : 1});
}, 650
);
setTimeout(
function()
{
$(animBlockLandArrow[4]).css({transition : '1s', opacity : 1});
}, 1300
);
setTimeout(
function()
{
$(animBlockLandArrow[2]).css({transition : '1s', opacity : 1});
}, 1950
);
setTimeout(
function()
{
$(animBlockLandArrow[3]).css({transition : '1s', opacity : 1});
}, 2600
);
}
|
eb7e82fb
Administrator
29.02.16
|
388
|
|
5077a0ec
Yarik
test
|
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
|
if($('.section-box-8').hasClass('section-box-8'))
{
var offsetSect8 = $('.section-box-8').offset().top;
offsetSect8 = offsetSect8 - (($(window).height()) - 264);
}
var whyWorkImg = $('.landing-work-our-img-text');
var whyWorkText = $('.landing-work-our-img p');
whyWorkImg.css({marginTop : 155, opacity : 0});
whyWorkText.css({display : 'none'});
function landingAnimationWhyWork()
{
whyWorkImg.css({transition : '0.8s'});
$(whyWorkImg[0]).css({marginTop : 0, opacity : 1});
$(whyWorkText[0]).delay(600).fadeIn(350);
setTimeout(
function()
{
$(whyWorkImg[1]).css({marginTop : 0, opacity : 1});
$(whyWorkText[1]).delay(600).fadeIn(350)
}, 250
);
|
eb7e82fb
Administrator
29.02.16
|
413
|
|
5077a0ec
Yarik
test
|
414
415
416
417
418
419
420
421
|
setTimeout(
function()
{
$(whyWorkImg[2]).css({marginTop : 0, opacity : 1});
$(whyWorkText[2]).delay(600).fadeIn(350)
}, 500
);
}
|
eb7e82fb
Administrator
29.02.16
|
422
|
|
5077a0ec
Yarik
test
|
423
424
425
426
427
428
429
430
431
432
433
434
|
function landingAnimationWhyWorkTwo()
{
$(whyWorkImg[3]).css({marginTop : 0, opacity : 1});
$(whyWorkText[3]).delay(600).fadeIn(350);
setTimeout(
function()
{
$(whyWorkImg[4]).css({marginTop : 0, opacity : 1});
$(whyWorkText[4]).delay(600).fadeIn(350)
}, 250
);
|
eb7e82fb
Administrator
29.02.16
|
435
|
|
5077a0ec
Yarik
test
|
436
437
438
439
440
441
442
443
|
setTimeout(
function()
{
$(whyWorkImg[5]).css({marginTop : 0, opacity : 1});
$(whyWorkText[5]).delay(600).fadeIn(350)
}, 500
);
}
|
eb7e82fb
Administrator
29.02.16
|
444
|
|
5077a0ec
Yarik
test
|
445
446
447
448
449
450
451
452
453
454
455
456
457
458
|
function jobClick()
{
var container = $('.search-worker-sort-wr');
var sort = $(container).find('.activejob a[data-sort-name]').data('sort-name');
var active = $(container).find('ul.sorter a[data-sort=' + sort + ']').clone();
$(container).find('.activejob a[data-sort-name]').replaceWith(active);
$('.activejob>a').click(
function(e)
{
e.preventDefault();
}
);
|
eb7e82fb
Administrator
29.02.16
|
459
|
|
5077a0ec
Yarik
test
|
460
461
462
463
464
465
466
467
468
469
470
|
$('.activejob a').click(
function(e)
{
$('.sidebar-droped-wr').toggleClass('act')
$('.performance-vacancy-sidebar-company-job>ul').addClass('active-dropped-ul')
if(!($('.sidebar-droped-wr').hasClass('act')))
{
$('.performance-vacancy-sidebar-company-job>ul').removeClass('active-dropped-ul')
}
}
);
|
eb7e82fb
Administrator
29.02.16
|
471
|
|
5077a0ec
Yarik
test
|
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
|
$('.sidebar-droped-wr li').click(
function()
{
if($('.sidebar-droped-wr').hasClass('act'))
{
$('.sidebar-droped-wr').removeClass('act')
}
$('.performance-vacancy-sidebar-company-job>ul').removeClass('active-dropped-ul')
$('.sidebar-droped-wr li').css({display : 'block'})
$(this).css({display : 'none'})
var thisTxtSidebar = $(this).text()
$('.activejob>a').text(thisTxtSidebar);
}
);
}
|
eb7e82fb
Administrator
29.02.16
|
487
|
|
5077a0ec
Yarik
test
|
488
489
490
491
492
|
function box15Height()
{
$('.section-box-15').css({minHeight : ($('.performer-vacancy-sidebar-views ul').height() - 50)})
$('.section-box-17').css({minHeight : ($('.performer-vacancy-sidebar-left').height()) - 164})
}
|
eb7e82fb
Administrator
29.02.16
|
493
|
|
5077a0ec
Yarik
test
|
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
|
function formRezume()
{
$('.performance-vacancy-desc-form a').click(
function(e)
{
e.preventDefault();
$('#overlay').fadeIn(
400, function()
{
$('#modal_form')
.css('display', 'block')
.animate({opacity : 1, top : '50%'}, 200);
}
);
}
);
|
eb7e82fb
Administrator
29.02.16
|
510
|
|
5077a0ec
Yarik
test
|
511
512
513
|
$('.closed-form, #overlay').on(
'click', function()
{
|
eb7e82fb
Administrator
29.02.16
|
514
|
$('#modal_form')
|
5077a0ec
Yarik
test
|
515
516
517
518
519
520
521
|
.animate(
{opacity : 0, top : '30%'}, 200, function()
{
$(this).css('display', 'none');
$('#overlay').fadeOut(400);
}
);
|
eb7e82fb
Administrator
29.02.16
|
522
523
|
}
);
|
eb7e82fb
Administrator
29.02.16
|
524
|
|
eb7e82fb
Administrator
29.02.16
|
525
526
|
}
|
5077a0ec
Yarik
test
|
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
|
function fileVal()
{
$('#res_file').change(
function()
{
var fileVal = $(this).val();
if(fileVal.indexOf('C:\\fakepath\\') + 1)
{
fileVal = fileVal.substr(12);
}
var e = $(this).next().find('.fake_file_input');
e.val(t);
$('.res-wrapper-mb p').text(fileVal)
}
);
$('.label-file a').click(
function(e)
{
e.preventDefault()
}
)
}
|
eb7e82fb
Administrator
29.02.16
|
549
|
|
5077a0ec
Yarik
test
|
550
551
552
|
fileValMulti();
function fileValMulti()
{
|
5077a0ec
Yarik
test
|
553
554
555
|
if($('.tender-file-wr input[type="file"]').val == 0)
{
alert('fdg')
|
eb7e82fb
Administrator
29.02.16
|
556
|
}
|
5077a0ec
Yarik
test
|
557
558
559
560
561
562
563
|
var txtMulti = $('.MultiFile-title').text()
$('.tender-file-wr a').click(
function(e)
{
e.preventDefault()
}
)
|
eb7e82fb
Administrator
29.02.16
|
564
|
}
|
eb7e82fb
Administrator
29.02.16
|
565
|
|
5077a0ec
Yarik
test
|
566
567
568
|
$('.tender-form-buttons-wr a').click(
function(e)
{
|
eb7e82fb
Administrator
29.02.16
|
569
|
e.preventDefault()
|
5077a0ec
Yarik
test
|
570
571
572
573
574
575
576
577
578
579
580
581
582
583
|
window.location.reload()
}
)
function seeAllComm()
{
var comNum = $('.company-performer-comments-bl').length;
var strComm = document.getElementsByClassName('company-performer-comments-txt');
for(var azz = 0; azz < comNum; azz++)
{
var comLenght = ($(strComm[azz]).text().length);
if(comLenght < 220)
{
$(strComm[azz]).next().css({display : 'none'})
|
eb7e82fb
Administrator
29.02.16
|
584
585
|
}
}
|
eb7e82fb
Administrator
29.02.16
|
586
|
|
5077a0ec
Yarik
test
|
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
|
$('.company-comm-see-all').click(
function(e)
{
e.preventDefault();
var expandFirst = $(this).prev();
expandFirst.toggleClass('auto-height-blog-post');
$(this).toggleClass('company-comm-expand');
var expand = 'Развернуть';
var rolUp = 'Свернуть';
var seeAllBlogSpan = $(this).find('span');
if(expandFirst.hasClass('auto-height-blog-post'))
{
seeAllBlogSpan.text(rolUp);
} else
{
seeAllBlogSpan.text(expand)
}
}
)
|
eb7e82fb
Administrator
29.02.16
|
606
|
}
|
eb7e82fb
Administrator
29.02.16
|
607
|
|
5077a0ec
Yarik
test
|
608
609
610
611
612
613
614
615
|
function gallerPage()
{
var galBlocks = $('.gallery-box');
for(var i = 1; i < galBlocks.length; i++)
{
if(!(i % 4))
{
$(galBlocks[i - 1]).css({marginLeft : 34})
|
eb7e82fb
Administrator
29.02.16
|
616
|
}
|
eb7e82fb
Administrator
29.02.16
|
617
|
}
|
5077a0ec
Yarik
test
|
618
|
}
|
eb7e82fb
Administrator
29.02.16
|
619
|
|
5077a0ec
Yarik
test
|
620
621
622
|
function selectAfter()
{
$('.search-work-form select').after('<div class="select-after"></div>')
|
eb7e82fb
Administrator
29.02.16
|
623
|
}
|
eb7e82fb
Administrator
29.02.16
|
624
|
|
5077a0ec
Yarik
test
|
625
626
627
628
629
630
631
632
633
|
function tagPortfolio()
{
$('.portfolio-project-tags a').click(
function()
{
$('.portfolio-project-tags a').removeClass('active-tag')
$(this).addClass('active-tag')
}
)
|
eb7e82fb
Administrator
29.02.16
|
634
|
|
5077a0ec
Yarik
test
|
635
636
637
638
639
640
|
$('.portfolio-project-tags a.active-tag').click(
function(e)
{
e.preventDefault();
}
)
|
eb7e82fb
Administrator
29.02.16
|
641
|
}
|
eb7e82fb
Administrator
29.02.16
|
642
|
|
5077a0ec
Yarik
test
|
643
644
645
646
|
function seeAllProfile()
{
$('.proektant-profile-hidden-txt').css({height : 306});
var txtLenght = $('.proektant-profile-hidden-txt p').text().length;
|
eb7e82fb
Administrator
29.02.16
|
647
|
|
5077a0ec
Yarik
test
|
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
|
var profileSee = $('.profile-see-all');
var expand = 'Развернуть';
var rolUp = 'Свернуть';
if(txtLenght >= 1000)
{
profileSee.text(expand).css({display : 'block'})
profileSee.click(
function(e)
{
e.preventDefault()
$(this).toggleClass('profile-txt-big');
if($(this).hasClass('profile-txt-big'))
{
$(this).text(rolUp)
$('.proektant-profile-hidden-txt').css({height : 'auto'})
} else
{
$(this).text(expand);
$('.proektant-profile-hidden-txt').css({height : 306})
}
}
)
}
}
function featuresTags()
{
if($('.features-tags-profile').hasClass('features-tags-profile'))
{
var replaceLast = $('.features-tags span:last-child').html()
|
b9a54f61
Yarik
test
|
679
680
681
682
|
var newReplaceLast = replaceLast;
if(replaceLast !== undefined) {
newReplaceLast = replaceLast.replace(/,(?![^,]*,)/m, '')
}
|
5077a0ec
Yarik
test
|
683
684
685
686
687
688
689
690
691
692
693
694
695
|
$('.features-tags span:last-child').empty().html(newReplaceLast)
var featuresTags = $('.features-tags span')
var featuresTagsLangth = featuresTags.length
var featuresTagsLeft = featuresTagsLangth - 6
featuresTagsDisplay()
function featuresTagsDisplay()
{
for(var i = 6; i <= featuresTagsLangth + 1; i++)
{
$(featuresTags[i]).addClass('features-tags-display')
}
}
|
eb7e82fb
Administrator
29.02.16
|
696
|
|
5077a0ec
Yarik
test
|
697
|
$(featuresTags[6]).after('<a href="#" class="features-tags-left">еще ' + featuresTagsLeft + '</a>')
|
eb7e82fb
Administrator
29.02.16
|
698
|
|
5077a0ec
Yarik
test
|
699
700
701
702
703
704
705
706
|
$('.features-tags-left').click(
function(e)
{
e.preventDefault()
featuresTags.removeClass('features-tags-display')
$('.features-tags-left').remove()
}
)
|
eb7e82fb
Administrator
29.02.16
|
707
|
}
|
5077a0ec
Yarik
test
|
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
|
if($('.features-tags-company').hasClass('features-tags-company'))
{
var replaceLastTwo = $('.features-tags-company');
for(var i = 0; i < replaceLastTwo.length; i++)
{
var repTwo = $(replaceLastTwo[i]).find('span:last-child').html()
$(replaceLastTwo[i]).find('span:last-child').empty().html(repTwo.replace(/,(?![^,]*,)/m, ''))
var repLenghtTwo = $(replaceLastTwo[i]).find('span')
var repLenghtLenTwo = repLenghtTwo.length
var repLenghtLeftTwo = repLenghtLenTwo - 6
$(repLenghtTwo[6 - 1]).after('<a href="#" class="features-tags-left">еще ' + repLenghtLeftTwo + '</a>')
for(var iq = 6; iq <= repLenghtLenTwo + 1; iq++)
{
$(repLenghtTwo[iq]).addClass('features-tags-display')
}
}
$('.features-tags-left').click(
function(e)
{
e.preventDefault()
var newClickTags = $(this).parent().parent().parent().parent();
newClickTags.find('.features-tags-left').remove();
newClickTags.find('.features-tags-display').removeClass('features-tags-display')
}
)
|
eb7e82fb
Administrator
29.02.16
|
738
739
|
}
}
|
eb7e82fb
Administrator
29.02.16
|
740
|
|
5077a0ec
Yarik
test
|
741
742
743
744
745
746
|
function include(url)
{
var script = document.createElement('script');
script.src = url;
document.getElementsByTagName('head')[0].appendChild(script);
}
|
eb7e82fb
Administrator
29.02.16
|
747
|
|
57bb4b5a
Yarik
test
|
748
749
750
|
// include("/js/forms.js");
// include("/js/jmousewhell.js");
// include("/js/jscroll.js");
|
5077a0ec
Yarik
test
|
751
752
753
754
755
756
757
758
759
760
761
762
763
|
function inputNumber()
{
$('.form-price-wr input').keypress(
function(e)
{
if(!(e.which == 8 || (e.which > 47 && e.which < 58)))
{
return false;
}
}
);
}
|
eb7e82fb
Administrator
29.02.16
|
764
|
|
5077a0ec
Yarik
test
|
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
|
$('.min_markers li').click(
function()
{
$('.min_markers li').removeClass('active_m');
$(this).addClass('active_m');
$('.min_markers_two li').removeClass('active_m');
}
);
$('.min_markers_two li').click(
function()
{
$('.min_markers li').removeClass('active_m');
$('.min_markers_two li').removeClass('active_m');
$(this).addClass('active_m');
}
)
//подгрузка карты
$('.min_markers li, .min_markers_two li').click(
function()
{
$.post(
"maps/maps-all-markers.php", function(data)
{
$("#map_cloud").empty();
$("#map_cloud").append(data);
initialize();
$('#demo5 ul').empty();
var slider_append = $('.slider_for_maps').children();
$('#demo5 ul').append(slider_append)
}
);
}
);
messagePage();
function messagePage()
{
$(".input_file").change(
function()
{
var filename = $(".input_file").val().replace(/.+[\\\/]/, "");
if(filename == "")
{
var filename = "Максимальный размер файла 5 МБ";
}
$(".input_file_text").text(filename);
}
);
if($('.comments_block').hasClass('comments_block'))
{
$(
function()
{
$('.comments_block').jScrollPane({showArrows : true, scrollbarWidth : 20, arrowSize : 20});
}
);
}
}
|
eb7e82fb
Administrator
29.02.16
|
822
|
|
5077a0ec
Yarik
test
|
823
824
825
826
|
$('.main-menu').hover(
function()
{
$('select').blur()
|
eb7e82fb
Administrator
29.02.16
|
827
|
}
|
5077a0ec
Yarik
test
|
828
829
830
831
832
833
834
835
836
|
)
if($('.section-box-tender-tags-wr').hasClass('section-box-tender-tags-wr'))
{
var lastTagTender = $('.section-box-tender-tags span')
var lastTagTenderLenght = lastTagTender.length
var lastTagTenderHtml = $(lastTagTender[lastTagTenderLenght - 1]).html()
$(lastTagTender[lastTagTenderLenght - 1]).empty().html(lastTagTenderHtml.replace(/,(?![^,]*,)/m, '.'))
}
|
eb7e82fb
Administrator
29.02.16
|
837
|
|
5077a0ec
Yarik
test
|
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
|
var jVal_res_f = {
'resComm' : function()
{
var ele = $('#res_f_text');
if(ele.val().length < 2)
{
jVal_res_f.errors = true;
ele.removeClass('normal').addClass('wrong');
} else
{
ele.removeClass('wrong').addClass('normal');
}
}, 'resSendItF' : function()
{
if(!jVal_res_f.errors)
{
$('.resformsfile').submit();
}
}
};
// ====================================================== //
$('#res_f_submit').click(
function()
{
jVal_res_f.errors = false;
jVal_res_f.resComm();
jVal_res_f.resSendItF();
return false;
}
);
$('#res_f_submit2').click(
function()
{
jVal_res_f.errors = false;
jVal_res_f.resComm();
jVal_res_f.resSendItF();
return false;
}
);
|
eb7e82fb
Administrator
29.02.16
|
878
|
|
5077a0ec
Yarik
test
|
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
|
$('#res_f_text').focusout(
function()
{
jVal_res_f.resComm();
}
);
var video_slider = $('.video-slider li').length;
$('.video-slider ul').css({width : (video_slider * 220) - 20})
function videoFull()
{
if($('.scroll-img').hasClass('video-slider'))
{
$("body").append('<div class="video-full"></div>');
$('.video-slider ul li').click(
function(e)
{
$('.video-full').append('<div class="closed-form"></div>')
e.preventDefault()
$('#overlay').fadeIn(
400, function()
{
$('.video-full')
.css('display', 'block')
.animate({opacity : 1, top : '50%'}, 200);
}
);
var thisIframe = $(this).find('.iframe-video').html();
$('.video-full').append('<div class="video-full-iframe"></div>')
$('.video-full-iframe').append(thisIframe)
var iframeSrc = $('.video-full-iframe iframe').attr('src')
iframeSrc = iframeSrc.replace('showinfo=0', 'showinfo=1')
$('.video-full-iframe').empty()
$('.video-full-iframe').append('<iframe width="100%" height="100%" src="' + iframeSrc + '" frameborder="0" allowfullscreen></iframe>')
$('.closed-form, #overlay').on(
'click', function()
{
$('#overlay').fadeOut(400)
$('.video-full')
.animate(
{opacity : 0, top : '30%'}, 200, function()
{
$(this).css('display', 'none');
$(this).empty();
}
);
}
);
}
)
}
}
|
eb7e82fb
Administrator
29.02.16
|
935
|
|
5077a0ec
Yarik
test
|
936
937
938
939
940
941
942
943
944
945
|
$('.search-list span').click(
function()
{
if($('.search-ul').hasClass('active'))
{
$('.search-list ul').removeClass('active');
$('.search-main-menu form input').focus()
} else
{
$('.search-list ul').addClass('active');
|
eb7e82fb
Administrator
29.02.16
|
946
|
|
5077a0ec
Yarik
test
|
947
948
949
950
951
952
953
954
955
956
957
958
|
}
$('.search-list ul.active li').click(
function()
{
$('.search-list ul').removeClass('active');
$('.search-list span').html($(this).text())
var searchListIndex = $(this).index()
searchListIndex = searchListIndex + 1
$('.search-main-menu form input[type="hidden"]').val(searchListIndex)
$('.search-main-menu form input').focus()
}
)
|
eb7e82fb
Administrator
29.02.16
|
959
|
|
5077a0ec
Yarik
test
|
960
961
|
}
)
|
eb7e82fb
Administrator
29.02.16
|
962
|
|
3ddcc442
Yarik
test
|
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
|
$(document).on(
'click', '.add_project_user_link', function()
{
var component = $(this).parents('.add_project_user_wrapper').attr('id');
var ids = [];
$.each(
$('#' + component).find('.project_user_wrapper'), function(i, val)
{
if(ids.indexOf($(val).data('id')) < 0)
{
ids.push($(val).data('id'));
}
}
);
$.fancybox.open(
{href : '/ajax/project-user'}, {
|
2f324895
Yarik
test
|
979
|
type : 'ajax', margin : [70, 20, 30, 20], maxWidth : 800, ajax : {dataType : 'html', data : {ids : JSON.stringify(ids)}},
|
3ddcc442
Yarik
test
|
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
|
tpl : {wrap : '<div class="fancybox-wrap" tabIndex="-1" data-model="common\\models\\PortfolioUser" data-component="' + component + '"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>'}
}
);
}
);
$(document).on(
'click', '.user_search_modal_tick', function()
{
var user_id = $(this).parents('.user_search_modal_row').data('key');
var model = $(this).parents('.fancybox-wrap').data('model');
var component = $(this).parents('.fancybox-wrap').data('component');
var result;
$.fancybox.close();
$.fancybox.showLoading();
$.get(
'/ajax/user-input', {
id : user_id, model : model, component : component
}, function(data)
{
if(data.result.component !== undefined)
{
$('#' + data.result.component).find('.add_project_user_list')
.append(data.result.html);
}
}
).always(
function()
{
$.fancybox.hideLoading();
}
);
}
);
$(document).on(
|
2f324895
Yarik
test
|
1014
|
'click', '.add_project_user_list .project_user_remove', function()
|
3ddcc442
Yarik
test
|
1015
1016
1017
1018
|
{
$(this).parents('.project_user_wrapper').remove();
}
);
|
2f324895
Yarik
test
|
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
|
$(document).on(
'click', '.added_project_user_list .project_user_remove', function()
{
var wrapper = $(this).parents('.project_user_wrapper');
var user_id = $(wrapper).data('id');
var portfolio_id = $(wrapper).data('portfolio');
$.post(
'/ajax/portfolio-user-remove', {user_id : user_id, portfolio_id : portfolio_id}, function(data)
{
if(data.error) {
alert(data.error);
} else {
var element = $('.added_project_user_list .project_user_wrapper[data-id='+data.result.user_id+'][data-portfolio='+data.result.portfolio_id+']');
var widget_wrapper = $(element).parents('.add_project_user_wrapper');
$(element).remove();
var widget_id = $(widget_wrapper).attr('id');
checkAddedHeader(widget_id);
}
}
);
}
);
|
3ddcc442
Yarik
test
|
1041
|
|
2f324895
Yarik
test
|
1042
1043
1044
1045
1046
1047
1048
1049
|
function checkAddedHeader(id) {
var count = $('#'+id).find('.added_project_user_list').find('.project_user_wrapper').length;
if(count <= 0) {
$('#'+id).find('.added_project_user_header').hide();
} else {
$('#'+id).find('.added_project_user_header').show();
}
}
|
7d705d85
Yarik
test
|
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
|
// Блок для предложения проекта
$(document).on('click', '#off_submit', function(e) {
e.preventDefault();
var project_id = $('#off_value').val();
var performer_id = $('#off_value').data('performer-id');
if(project_id && performer_id) {
$.post(
'/tender/offer',
{
project_id: project_id,
performer_id: performer_id
},
function(data) {
if(data.error) {
$('#overlay, .forms-modal-hide').remove();
alert(data.error);
} else {
$('#overlay, .forms-modal-hide').remove();
alert(data.message);
}
}
).fail(
function() {
$('#overlay, .forms-modal-hide').remove();
alert('Неизвестная ошибка');
}
)
return false;
}
});
|
0f123b59
Виталий
git
|
1080
1081
1082
1083
1084
|
function fixMenuRadius() {
var newRadius = $('.content-menu-first > li')
var radiusLenght = (newRadius.length)-1
$(newRadius[radiusLenght]).addClass('_fix_radius_')
}
|
b2b47581
Виталий
git
|
1085
1086
1087
1088
1089
1090
|
fixBlog()
function fixBlog() {
var firstPost = $('.blog-post-wr');
$(firstPost[0]).css({marginTop:-1})
}
|
6668b7fe
Виталий
git
|
1091
|
|
5077a0ec
Yarik
test
|
1092
1093
|
}
);
|