HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/sportivo.komma.pro/wwwroot/packages/komma/kms/js/main.js
(function($) {

    // Save button
    $('#save-button').click(function(e){
        $('#entity-form').find('input, textarea').attr('disabled',false);
        $('#entity-form').submit();
    });

    // TinyMCE
    tinymce.init({
        selector: 'textarea',
        skin: 'kms',
        menubar: false,
        statusbar: false,
        plugins: ['code', 'paste', 'link'],
        toolbar: 'styleselect | bold italic underline | bullist numlist | link image | code',
        height: '200',
        paste_as_text: true,
        style_formats: [{title: 'Titel', block: 'h2'}]
    });

    // Hierarchical list
    $('.entities-list-item .dropdown-icon').click(function(e){
        e.preventDefault();
        if($(this).parent().parent().hasClass('open')){
            //$('.animate-to-triangle', this)[0].beginElement();
            $(this).parent().parent().removeClass('open');
        }else{
            //$('.animate-to-minus', this)[0].beginElement();
            $(this).parent().parent().addClass('open');
        }
    });

    // Scroll to active item in list
    $(window).load(function(){
        var $container = $('#entities .entities-list');
        var $activeListItem = $('.entities-list-item.active', $container).first();
        if($activeListItem.length == 0) return;
        var top = $activeListItem.position().top;
        $container.scrollTop(top);
    });

    // Flash messages
    var hideFlashMessage = function(){
        $('#flash-messages').fadeOut();
    };
    $('#flash-messages').click(function(){
        hideFlashMessage();
    });
    setTimeout(function(){
        hideFlashMessage();
    }, 5000);

})(jQuery);