function iboxTools($timeout) {
    return {
        restrict: 'A',
        scope: true,
        templateUrl: 'views/common/ibox_tools.html',
        controller: function ($scope, $element) {
            // Function for collapse ibox
            $scope.showhide = function () {
                var ibox = $element.closest('div.ibox');
                var icon = $element.find('i:first');
                var content = ibox.find('div.ibox-content');
                content.slideToggle(200);
                // Toggle icon from up to down
                icon.toggleClass('fa-chevron-up').toggleClass('fa-chevron-down');
                ibox.toggleClass('').toggleClass('border-bottom');
                $timeout(function () {
                    ibox.resize();
                    ibox.find('[id^=map-]').resize();
                }, 50);
            };
                // Function for close ibox
                $scope.closebox = function () {
                    var ibox = $element.closest('div.ibox');
                    ibox.remove();
                }
        }
    };
}
/**
 * iboxTools - Directive for iBox tools elements in right corner of ibox
 */
Directive for iBox tools elements in right corner of ibox
Directive for iBox tools elements in right corner of ibox
function iboxTools($timeout) {
    return {
        restrict: 'A',
        scope: true,
        templateUrl: 'views/common/ibox_tools.html',
        controller: function ($scope, $element) {
            $scope.showhide = function () {
                var ibox = $element.closest('div.ibox');
                var icon = $element.find('i:first');
                var content = ibox.find('div.ibox-content');
                content.slideToggle(200);
                icon.toggleClass('fa-chevron-up').toggleClass('fa-chevron-down');
                ibox.toggleClass('').toggleClass('border-bottom');
                $timeout(function () {
                    ibox.resize();
                    ibox.find('[id^=map-]').resize();
                }, 50);
            };
                $scope.closebox = function () {
                    var ibox = $element.closest('div.ibox');
                    ibox.remove();
                }
        }
    };
}
function iboxTools ( $timeout ) { return { restrict : 'A' , scope : true , templateUrl : 'views/common/ibox_tools.html' , controller : function ( $scope , $element ) { $scope . showhide = function ( ) { var ibox = $element . closest ( 'div.ibox' ) ; var icon = $element . find ( 'i:first' ) ; var content = ibox . find ( 'div.ibox-content' ) ; content . slideToggle ( 200 ) ; icon . toggleClass ( 'fa-chevron-up' ) . toggleClass ( 'fa-chevron-down' ) ; ibox . toggleClass ( '' ) . toggleClass ( 'border-bottom' ) ; $timeout ( function ( ) { ibox . resize ( ) ; ibox . find ( '[id^=map-]' ) . resize ( ) ; } , 50 ) ; } ; $scope . closebox = function ( ) { var ibox = $element . closest ( 'div.ibox' ) ; ibox . remove ( ) ; } } } ; }
iboxTools - Directive for iBox tools elements in right corner of ibox
iboxTools - Directive for iBox tools elements in right corner of ibox
// Function for collapse ibox // Toggle icon from up to down // Function for close ibox