Revision 7e5c8125 cloudcms/static/cloudcms/js/common.js

b/cloudcms/static/cloudcms/js/common.js
36 36
        $(this).parents('.box-more').toggleClass('border');
37 37
    });
38 38
	
39
		
40
	var topMargin=parseInt($('.mainlogo').height())+parseInt($('.top-msg').css('marginBottom'));
41
	$('.mainlogo').css('marginTop','-'+topMargin+'px')
39
	var fixTopMessageHeight = function() {
40
		var topMargin = parseInt($('.mainlogo img').height())+parseInt($('.top-msg').css('marginBottom'));
41
		$('.mainlogo').css('marginTop','-'+topMargin+'px');
42
	}
43
	
44
	if ($('.mainlogo img').length > 0) {
45
		$('.mainlogo img').bind('load', fixTopMessageHeight)
46
	} else {
47
		fixTopMessageHeight();
48
	}
42 49
	
43 50
	$('.top-msg a.close').click(function(e) {
44 51
        $('.top-msg').animate({
......
60 67
    
61 68
    $('.top-msg .success').parents('.top-msg').css(
62 69
    	{
63
    		backgroundColor: '#f3c',
70
    		backgroundColor: '#00A2B1',
64 71
    		color: '#fff'
65 72
    	}
66 73
    )
67 74
    
68 75
    $('.top-msg .error').parents('.top-msg').css(
69 76
    	{
70
    		backgroundColor: 'red',
77
    		backgroundColor: '#C43F73',
71 78
    		color: '#fff'
72 79
    	}
73 80
    )
......
75 82
    
76 83
    $('.top-msg .warning').parents('.top-msg').css(
77 84
    	{
78
    		backgroundColor: '#90f',
85
    		backgroundColor: '#F0A216',
86
    		color: '#fff'
87
    	}
88
    )
89
    
90
    $('.top-msg .info').parents('.top-msg').css(
91
    	{
92
    		backgroundColor: '#75A23A',
79 93
    		color: '#fff'
80 94
    	}
81 95
    )

Also available in: Unified diff