mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-25 06:27:03 +01:00
Alert when changes may not been saved
This commit is contained in:
parent
150e112387
commit
1e80512ca7
@ -1,5 +1,11 @@
|
|||||||
/*global $, ace, Materialize, newCSS, CSS_ID, ADMIN*/
|
/*global $, ace, Materialize, newCSS, CSS_ID, ADMIN*/
|
||||||
(function () {
|
(function () {
|
||||||
|
$(window).bind('beforeunload', function(){
|
||||||
|
if ($("#live_preview_warning").is(":visible")) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if($("#css_editor").length != 0) {
|
if($("#css_editor").length != 0) {
|
||||||
var editor = ace.edit("css_editor");
|
var editor = ace.edit("css_editor");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user