Revision e44aadcd cloudcms/static/cloudcms/js/common.js
b/cloudcms/static/cloudcms/js/common.js | ||
---|---|---|
23 | 23 |
|
24 | 24 |
} |
25 | 25 |
|
26 |
|
|
26 |
function addClassHover(hoverEl, applicableEl){ |
|
27 |
$(hoverEl).hover( |
|
28 |
function () { |
|
29 |
|
|
30 |
$(applicableEl).addClass('red-border') |
|
31 |
}, |
|
32 |
function () { |
|
33 |
$(applicableEl).removeClass('red-border'); |
|
34 |
|
|
35 |
}); |
|
36 |
} |
|
27 | 37 |
//equal heights |
28 | 38 |
|
29 | 39 |
(function($) { |
... | ... | |
74 | 84 |
} |
75 | 85 |
//end of fix |
76 | 86 |
|
87 |
|
|
77 | 88 |
$(document).ready(function() { |
78 | 89 |
|
79 | 90 |
|
... | ... | |
188 | 199 |
}); |
189 | 200 |
}); |
190 | 201 |
|
191 |
|
|
202 |
|
|
203 |
|
|
192 | 204 |
$('table .more-info').click(function(e){ |
193 |
|
|
194 | 205 |
e.preventDefault(); |
195 | 206 |
$(this).toggleClass('open'); |
196 | 207 |
if ($(this).hasClass('open')){ |
... | ... | |
241 | 252 |
|
242 | 253 |
|
243 | 254 |
|
244 |
$('.auth_methods').find('li>a').click(function(e){ |
|
245 |
e.preventDefault(); |
|
246 |
$(this).siblings('.wrap').toggle('slow'); |
|
247 |
$(this).toggleClass('up'); |
|
248 |
}); |
|
249 |
|
|
250 |
$('.auth_methods a.red').click(function(e){ |
|
251 |
e.preventDefault(); |
|
252 |
$(this).siblings('.dialog').show(); |
|
253 |
}) |
|
254 |
|
|
255 |
|
|
255 | 256 |
|
256 |
$('.auth_methods .dialog .no').click( function(e){ |
|
257 |
e.preventDefault(); |
|
258 |
console.log($(this)); |
|
259 |
$(this).parents('.dialog').hide(); |
|
260 |
}) |
|
261 | 257 |
|
262 | 258 |
setTimeout(function() { |
263 | 259 |
if ($('input#id_username').val()){ |
... | ... | |
268 | 264 |
} |
269 | 265 |
}, 100); |
270 | 266 |
|
267 |
|
|
268 |
|
|
269 |
|
|
270 |
$('.landing-page .cms').hover( |
|
271 |
function () { |
|
272 |
el = $('.cloudbar ul.services li').first(); |
|
273 |
var offset = el.offset(); |
|
274 |
positionX = offset.left; |
|
275 |
$('#hand').css('left',positionX); |
|
276 |
$('#hand').show(); |
|
277 |
}, |
|
278 |
function () { |
|
279 |
$('#hand').hide(); |
|
280 |
|
|
281 |
}); |
|
282 |
|
|
283 |
$('.landing-page .pithos').hover( |
|
284 |
function () { |
|
285 |
el = $('.cloudbar ul.services li:nth-child(3)'); |
|
286 |
var offset = el.offset(); |
|
287 |
positionX = offset.left; |
|
288 |
left = parseInt(positionX) +20; |
|
289 |
$('#hand').css('left',left+'px'); |
|
290 |
$('#hand').show(); |
|
291 |
}, |
|
292 |
function () { |
|
293 |
$('#hand').hide(); |
|
294 |
|
|
295 |
}); |
|
296 |
|
|
297 |
$('.landing-page .cyclades').hover( |
|
298 |
function () { |
|
299 |
el = $('.cloudbar ul.services li:nth-child(2)').first(); |
|
300 |
var offset = el.offset(); |
|
301 |
positionX = offset.left; |
|
302 |
left = parseInt(positionX) +20; |
|
303 |
$('#hand').css('left',left+'px'); |
|
304 |
$('#hand').show(); |
|
305 |
}, |
|
306 |
function () { |
|
307 |
$('#hand').hide(); |
|
308 |
|
|
309 |
}); |
|
310 |
|
|
311 |
|
|
312 |
$('.landing-page .dashboard').hover( |
|
313 |
function () { |
|
314 |
el = $('.cloudbar .profile'); |
|
315 |
var offset = el.offset(); |
|
316 |
positionX = offset.left +50; |
|
317 |
$('#hand').css('left',positionX); |
|
318 |
$('#hand').show(); |
|
319 |
}, |
|
320 |
function () { |
|
321 |
$('#hand').hide(); |
|
322 |
|
|
323 |
}); |
|
324 |
|
|
325 |
$('.pagination a.disabled').click(function(e){ |
|
326 |
e.preventDefault(); |
|
327 |
}); |
|
328 |
|
|
329 |
// fix for recaptcha fields |
|
330 |
$('#okeanos_recaptcha').parents('.form-row').find('.extra-img').hide(); |
|
331 |
|
|
271 | 332 |
|
272 | 333 |
|
273 | 334 |
}); |
... | ... | |
275 | 336 |
$(window).resize(function() { |
276 | 337 |
|
277 | 338 |
setContainerMinHeight('.container .wrapper'); |
278 |
|
|
279 |
}); |
|
280 |
|
|
339 |
|
|
340 |
|
|
341 |
}); |
Also available in: Unified diff