Revision 904fd3cd snf-astakos-app/astakos/im/static/im/js/common.js
b/snf-astakos-app/astakos/im/static/im/js/common.js | ||
---|---|---|
309 | 309 |
|
310 | 310 |
|
311 | 311 |
|
312 |
|
|
313 |
$('.landing-page .cms').hover( |
|
314 |
function () { |
|
315 |
el = $('.cloudbar ul.services li').first(); |
|
316 |
var offset = el.offset(); |
|
317 |
positionX = offset.left; |
|
318 |
$('#hand').css('left',positionX); |
|
319 |
$('#hand').show(); |
|
320 |
}, |
|
321 |
function () { |
|
322 |
$('#hand').hide(); |
|
323 |
|
|
324 |
}); |
|
325 |
|
|
326 |
$('.landing-page .pithos').hover( |
|
327 |
function () { |
|
328 |
el = $('.cloudbar ul.services li:nth-child(3)'); |
|
329 |
var offset = el.offset(); |
|
330 |
positionX = offset.left; |
|
331 |
left = parseInt(positionX) +20; |
|
332 |
$('#hand').css('left',left+'px'); |
|
333 |
$('#hand').show(); |
|
334 |
}, |
|
335 |
function () { |
|
336 |
$('#hand').hide(); |
|
337 |
|
|
338 |
}); |
|
339 |
|
|
340 |
$('.landing-page .cyclades').hover( |
|
341 |
function () { |
|
342 |
el = $('.cloudbar ul.services li:nth-child(2)').first(); |
|
343 |
var offset = el.offset(); |
|
344 |
positionX = offset.left; |
|
345 |
left = parseInt(positionX) +20; |
|
346 |
$('#hand').css('left',left+'px'); |
|
347 |
$('#hand').show(); |
|
348 |
}, |
|
349 |
function () { |
|
350 |
$('#hand').hide(); |
|
351 |
|
|
352 |
}); |
|
353 |
|
|
354 |
|
|
355 |
$('.landing-page .dashboard').hover( |
|
356 |
function () { |
|
357 |
el = $('.cloudbar .profile'); |
|
358 |
var offset = el.offset(); |
|
359 |
positionX = offset.left +50; |
|
360 |
$('#hand').css('left',positionX); |
|
361 |
$('#hand').show(); |
|
362 |
}, |
|
363 |
function () { |
|
312 |
// landing-page initialization |
|
313 |
if ($('.landing-page').length > 0) { |
|
314 |
var wrapper = $(".landing-page"); |
|
315 |
var services = wrapper.find(".landing-service"); |
|
316 |
services.hover(function(e) { |
|
317 |
var cls, service_cls, cloudbar_li, offset, positionX; |
|
318 |
cls = _.filter($(this).attr("class").split(" "), function(cls) { |
|
319 |
return cls.indexOf("service-") == 0 |
|
320 |
}); |
|
321 |
if (!cls.length) { return } |
|
322 |
service_cls = $.trim(cls[0]); |
|
323 |
extra = 0; |
|
324 |
if (service_cls == 'service-astakos') { |
|
325 |
cloudbar_li = $(".cloudbar .profile"); |
|
326 |
extra = 50; |
|
327 |
} else { |
|
328 |
cloudbar_li = $(".cloudbar ul.services li." + service_cls); |
|
329 |
if (cloudbar_li.index() != 0) { |
|
330 |
extra = 20; |
|
331 |
} |
|
332 |
} |
|
333 |
offset = cloudbar_li.offset(); |
|
334 |
if (!offset) { return } |
|
335 |
positionX = offset.left + extra; |
|
336 |
$('#hand').css('left',positionX + 'px'); |
|
337 |
$('#hand').show(); |
|
338 |
}, function (e) { |
|
364 | 339 |
$('#hand').hide(); |
365 |
|
|
366 |
});
|
|
367 |
|
|
340 |
}); |
|
341 |
} |
|
342 |
|
|
368 | 343 |
$('.pagination a.disabled').click(function(e){ |
369 | 344 |
e.preventDefault(); |
370 | 345 |
}); |
Also available in: Unified diff