Sha256: d1ccb27304446b00728fdf47182216505c36752422ab39d7849cf664e20625ec
Contents?: true
Size: 1.07 KB
Versions: 16
Compression:
Stored size: 1.07 KB
Contents
function redirect_to(target) { var dashboard_namespace = "<%= Faalis::Engine.dashboard_namespace.to_s %>"; var uri = target.replace("/"+ dashboard_namespace + "/", "/" + dashboard_namespace + "#/"); console.log("Redirecting to: %s", uri); Turbolinks.visit(target, { keep: ['sidebar', 'topnav']}); } function big_random() { return Math.random(0,10)*100000000000000000; } function debug(msg) { if ("debug" in window) { if (window.debug === true) { console.log(msg); } } } function show_error_queue(){ if (ErrorQueue.length > 0) { error_message(window.ErrorQueue.join("<br/>")); } } /* * Catch the remote api error */ function catch_error1(error){ if (error.data.error) { console.log(error.data.error); error_message(error.data.error); } else { console.log("Translate catch_error"); error_message("Unkown error: please try again or contact to administrator."); } }; $(function(){ $("#flash").on("click", hide_flash); show_error_queue(); });
Version data entries
16 entries across 16 versions & 1 rubygems