LT-259 Adding warning for when user attempts to close the Lesion Tracker before saving measurements [INTEGRATING NEW MODULE INTO VIEWER + DOCUMENTATION]
This commit is contained in:
1 parent
849ca2d488
commit
d2095f3cb7
7 files changed
+134
-23
No files matched your search
@@ -1,3 +1,5 @@
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
const studylistContentId = 'studylistTab';
|
||||
const viewerContentId = 'viewerTab';
|
||||
|
||||
@@ -19,11 +21,21 @@ Template.app.events({
|
||||
'click .js-toggle-studyList'() {
|
||||
const contentId = Session.get('activeContentId');
|
||||
|
||||
if (contentId !== studylistContentId) {
|
||||
switchToTab(studylistContentId);
|
||||
} else {
|
||||
switchToTab(viewerContentId);
|
||||
}
|
||||
OHIF.ui.unsavedChanges.checkBeforeAction('viewer.*', function(shouldProceed, hasChanges) {
|
||||
if (shouldProceed) {
|
||||
// Drop signaled unsaved changes if any...
|
||||
if (hasChanges) {
|
||||
OHIF.ui.unsavedChanges.clear('viewer.*');
|
||||
}
|
||||
|
||||
if (contentId !== studylistContentId) {
|
||||
switchToTab(studylistContentId);
|
||||
} else {
|
||||
switchToTab(viewerContentId);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user