{:uriI"file:///home/lxsameer/src/Yellowen/Faalis/app/assets/javascripts/faalis/dashboard/lib/flash_message.js?type=application/javascript&pipeline=self&id=5ab72ef9cde5800ac9317af3a94951607ae522962c1750938ca36ddd90cac162:ET:load_pathI">/home/lxsameer/src/Yellowen/Faalis/app/assets/javascripts;T: filenameI"d/home/lxsameer/src/Yellowen/Faalis/app/assets/javascripts/faalis/dashboard/lib/flash_message.js;T: nameI"'faalis/dashboard/lib/flash_message;T:logical_pathI"/faalis/dashboard/lib/flash_message.self.js;T:content_typeI"application/javascript;T: sourceI"u/* * Show a flash message on dashboard UI. * * Note: To create a theme for faalis dashboard * you probably need to override this func * in your theme assets. * * @OVERRIDE */ 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); } /* * Hide the flash area * @OVERRIDE */ function hide_flash() { $("#flash-alert").hide(); } //TODO: Use a js template engine in here /* * Render the form errors in a flash message and * highlight the problematic form controls * * Note: This function will highligh those elements with */ function form_error(data) { $('.has-error').removeClass('has-error'); var msg = data.title + "
"; error_message(msg); } function success_message(msg){ show_flash_message(msg, "success"); } function warning_message(msg){ show_flash_message(msg, "warning"); } function error_message(msg){ show_flash_message(msg, "error"); } $(function(){ $("#flash").on("click", hide_flash); }); ;T: metadata{ :dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"rfile-digest:///home/lxsameer/src/Yellowen/Faalis/app/assets/javascripts/faalis/dashboard/lib/flash_message.js;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: charsetI" utf-8;F: digest"%H>>fB>2uFE}mXn: lengthiu:dependencies_digest"%f#֜syțۦ Z9N:idI"E5ab72ef9cde5800ac9317af3a94951607ae522962c1750938ca36ddd90cac162;F: mtimel+ЗW