Sha256: 25677f36caacdeaad495527e927f141332bf0b018c76872d9ef9f7013f83bdc7

Contents?: true

Size: 639 Bytes

Versions: 7

Compression:

Stored size: 639 Bytes

Contents

function show_flash_message(msg, klass) {
    var icon = "";

    if (klass == "success") {
        icon = "check";
    }
    else if (klass == "error") {
        icon = "ban";
        klass = 'danger';
    }
    else if (klass == 'warning') {
        icon = 'warning';
    }
    else if (klass == 'info') {
        icon = 'info';
    }

    $("#flash-alert").removeClass().addClass("alert alert-dismissable alert-" + klass);
    $("#flash-icon").removeClass().addClass("fa fa-" + icon);
    $("#flash-msg").html(msg);
    $("#flash-alert").fadeIn(700).delay(5000).fadeOut(500);
}


function hide_flash() {
    $("#flash-alert").hide();
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
dashstrap-1.1.0 app/assets/javascripts/dashstrap/functions.js
dashstrap-1.0.0 app/assets/javascripts/dashstrap/functions.js
dashstrap-0.2.3 app/assets/javascripts/dashstrap/functions.js
dashstrap-0.2.2 app/assets/javascripts/dashstrap/functions.js
dashstrap-0.2.1 app/assets/javascripts/dashstrap/functions.js
dashstrap-0.2.0 app/assets/javascripts/dashstrap/functions.js
dashstrap-0.1.0 app/assets/javascripts/dashstrap/functions.js