Styling updates for Study List

This commit is contained in:
Erik Ziegler committed 2016-07-22 11:00:16 +02:00
1 parent d014c72aa4
commit 7c92b9a7dd
11 files changed
+211 -143

No files matched your search

@@ -36,23 +36,16 @@ Template.lesionTracker.onRendered(function() {
});
Template.lesionTracker.events({
'click #tablist a[data-toggle="tab"]': function(e) {
// If this tab is already active, do nothing
var tabButton = $(e.currentTarget);
var tabTitle = tabButton.parents('.tabTitle');
if (tabTitle.hasClass('active')) {
return;
'click .js-toggle-studyList': function() {
var contentId = Session.get('activeContentId');
var worklistContentId = 'worklistTab';
var viewerContentId = 'viewerTab';
if (contentId !== worklistContentId) {
switchToTab(worklistContentId);
} else {
switchToTab(viewerContentId);
}
// Otherwise, switch to the tab
var contentId = tabButton.data('target').replace('#', '');
switchToTab(contentId);
},
'click #loadStudyList': function() {
// TODO: Make some set of 'closing study' callbacks
$('#lesionTableHUD').display('none');
switchToTab('worklistTab');
}
});
@@ -62,6 +55,21 @@ Template.lesionTracker.helpers({
showWorklistMenu: function() {
return Template.instance().showWorklistMenu.get();
},
studyListToggleText: function() {
var contentId = Session.get('activeContentId');
if (!contentId) {
return;
}
var worklistContentId = 'worklistTab';
var viewerContentId = 'viewerTab';
if (contentId === worklistContentId) {
return 'Back to viewer';
} else if (contentId === viewerContentId) {
return 'Study list';
}
},
onStudyList: function() {
return (Session.get('activeContentId') === 'worklistTab');
}