-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjavascript-general.js
49 lines (31 loc) · 1.45 KB
/
javascript-general.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Allgemeine Rückgaben im Kopfbereich
function headerNotification( value ) { $( '#target-headerNotification' ).slideDown( 200 ).html( value ).delay( 2000 ).slideUp( 500 ); }
function headerNotification_ON( value ) { $( '#target-headerNotification' ).slideDown( 200 ).html( value ); }
function headerNotification_QuickON( value ) { $( '#target-headerNotification' ).show().html( value ); }
function headerNotification_OFF( value ) { $( '#target-headerNotification' ).slideUp( 200 ); }
$( document ).ready( function() {
$( '#target-headerNotification' ).hide();
$('[data-toggle="tooltip"]').tooltip()
drawDisplay();
$( window ).resize( function () { drawDisplay(); });
});
// Darstellung
function drawDisplay() {
var windowWidth = $( window ).width();
var windowHeight = $( window ).height();
var headerHeight = $( 'header' ).height() + 40;
var footerHeight = $( 'footer' ).height();
var contentHeight = windowHeight - headerHeight - footerHeight
$( '#content' ).height( contentHeight );
$( '#sidebar' ).height( contentHeight - 20 + 'px');
$( '#sidebar-inner' ).slimScroll({ height: contentHeight - 20 + 'px', distance: '0px' });
$( '#canvas').height( contentHeight );
$( '#canvas').width( windowWidth - $( '#sidebar' ).width() - 15 + 'px' );
if( windowWidth < 600 ) {
$( '#windowLock' ).width( windowWidth - 100 );
$( '#windowLock' ).height( windowHeight );
$( '#windowLock' ).show();
} else {
$( '#windowLock' ).hide();
}
}