aboutsummaryrefslogtreecommitdiff
path: root/kamon-dashboard/src/main/resources/web/js/app.js
blob: c0c4799883f869dd0cdfa6183eb9abaa58288b7c (plain) (blame)
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
'use strict';

angular.module('kamon', ['kamonServices','highcharts-ng']);


$(function() {
    $( ".column" ).sortable({
        connectWith: ".column"
    });

    $( ".portlet" ).addClass( "ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" )
        .find( ".portlet-header" )
        .addClass( "ui-widget-header ui-corner-all" )
        .prepend( "<span class='ui-icon ui-icon-minusthick'></span>")
        .end()
        .find( ".portlet-content" );

    $( ".portlet-header .ui-icon" ).click(function() {
        $( this ).toggleClass( "ui-icon-minusthick" ).toggleClass( "ui-icon-plusthick" );
        $( this ).parents( ".portlet:first" ).find( ".portlet-content" ).toggle();
    });

    $( ".column" ).disableSelection();

    document.getElementById('fullscreenButton').addEventListener('click', function () {
        if (screenfull.enabled) {
            screenfull.request();
        } else {
            // Ignore or do something else
        }
    });
});