mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 05:02:50 +08:00
Minor code cleanup [fixes SCI-463]
This commit is contained in:
parent
2c144aa2f3
commit
db1e24202a
1 changed files with 5 additions and 3 deletions
|
@ -439,12 +439,14 @@ function initializeUnsavedWorkDialog() {
|
|||
var alertText = dh.attr('data-unsaved-work-text');
|
||||
|
||||
ignoreUnsavedWorkAlert = false;
|
||||
if ( ignoreUnsavedWorkAlert ) return;
|
||||
if ( ignoreUnsavedWorkAlert ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$(document).on('page:before-change', beforechange);
|
||||
$(window).on('beforeunload', beforeunload);
|
||||
|
||||
function beforeunload(ev) {
|
||||
function beforeunload() {
|
||||
//Check if we are actually in report editor
|
||||
if ( $(REPORT_CONTENT).length ) {
|
||||
return alertText;
|
||||
|
@ -455,7 +457,7 @@ function initializeUnsavedWorkDialog() {
|
|||
}
|
||||
}
|
||||
|
||||
function beforechange(ev) {
|
||||
function beforechange() {
|
||||
//Check if we are actually in report editor
|
||||
if ( $(REPORT_CONTENT).length ) {
|
||||
var exit;
|
||||
|
|
Loading…
Reference in a new issue