MiniDigger/Hangar

View on GitHub
ore/public/javascripts/notes.js

Summary

Maintainability
A
0 mins
Test Coverage
//=====> DOCUMENT READY

$(function() {
    $('.btn-note-addmessage-submit').click(function() {
        var panel = $(this).parent().parent().parent();
        var textarea = panel.find('textarea');
        textarea.attr('disabled', 'disabled');
        toggleSpinner($(this).find('[data-fa-i2svg]').toggleClass('fa-save'));
        $.ajax({
            type: 'post',
            url: '/' + resourcePath + '/notes/addmessage',
            data: { csrfToken: csrf, content: textarea.val() },
            success: function() {
                location.reload();
            }
        });
    });
});