Revision 8dd49103 cloudcms/static/cloudcms/js/common.js
b/cloudcms/static/cloudcms/js/common.js | ||
---|---|---|
1 |
function setContainerMinHeight(){ |
|
2 |
|
|
3 |
var h = $('.header').height(); |
|
4 |
var f = $('.footer').height(); |
|
5 |
var w = $(window).height(); |
|
6 |
var pTop = parseInt (($('.container .wrapper').css('padding-top').replace("px", "")) ); |
|
7 |
var pBottom = parseInt (($('.container .wrapper').css('padding-bottom').replace("px", ""))); |
|
8 |
|
|
9 |
var c = w - ( h+f+pTop+pBottom); |
|
10 |
$('.container .wrapper').css('min-height', c); |
|
11 |
|
|
12 |
|
|
13 |
} |
|
14 |
|
|
1 | 15 |
$(document).ready(function() { |
2 | 16 |
|
17 |
setContainerMinHeight(); |
|
3 | 18 |
|
4 |
$('.show-extra').click(function(e) { |
|
19 |
$('.show-extra').click(function(e) {
|
|
5 | 20 |
e.preventDefault(); |
6 |
$(this).parents('.bg-wrap').find('.extra').show('slow'); |
|
21 |
|
|
22 |
$(this).parents('.bg-wrap').find('.extra').toggle('slow'); |
|
23 |
$('.hide-extra').toggle(); |
|
7 | 24 |
}); |
8 | 25 |
$('.hide-extra').click(function(e) { |
9 | 26 |
e.preventDefault(); |
27 |
$(this).hide(); |
|
10 | 28 |
$(this).parents('.bg-wrap').find('.extra').hide('slow'); |
11 | 29 |
}); |
12 | 30 |
|
... | ... | |
15 | 33 |
$(this).parents('.box-more').toggleClass('border'); |
16 | 34 |
}); |
17 | 35 |
|
18 |
|
|
19 |
$('select').dropkick(); |
|
36 |
|
|
20 | 37 |
$('.top-msg a.close').click(function(e) { |
21 | 38 |
e.preventDefault(); |
22 | 39 |
$(this).parents('.top-msg').slideUp('5000', function() { |
... | ... | |
24 | 41 |
}); |
25 | 42 |
}); |
26 | 43 |
|
27 |
if ( $('#os') ) { |
|
44 |
//$('select').dropkick(); |
|
45 |
|
|
46 |
|
|
47 |
if ( $('#os').length > 0 ) { |
|
28 | 48 |
var os = BrowserDetect.OS; |
29 | 49 |
if ( os!=="an unknown OS" ) { |
30 | 50 |
$('#os').html('version '+os); |
31 | 51 |
} |
32 | 52 |
} |
53 |
|
|
54 |
$('.top-msg .success').parents('.top-msg').css( |
|
55 |
{ |
|
56 |
backgroundColor: '#f3c', |
|
57 |
color: '#fff' |
|
58 |
} |
|
59 |
) |
|
60 |
|
|
61 |
$('.top-msg .error').parents('.top-msg').css( |
|
62 |
{ |
|
63 |
backgroundColor: 'red', |
|
64 |
color: '#fff' |
|
65 |
} |
|
66 |
) |
|
67 |
|
|
68 |
|
|
69 |
$('.top-msg .warning').parents('.top-msg').css( |
|
70 |
{ |
|
71 |
backgroundColor: '#90f', |
|
72 |
color: '#fff' |
|
73 |
} |
|
74 |
) |
|
75 |
|
|
33 | 76 |
}); |
Also available in: Unified diff