LT-331 Study list context menu behaviour issues

This commit is contained in:
Emanuel F. Oliveira committed 2016-11-15 10:35:30 -02:00
1 parent c89319344a
commit 9998323cfb
3 files changed
+78 -8

No files matched your search

@@ -1,4 +1,5 @@
import { OHIF } from 'meteor/ohif:core';
import { $ } from 'meteor/jquery';
/**
* This function is used inside the StudyList package to define a right click callback
@@ -55,12 +56,18 @@ function viewSeriesDetails() {
Template.studyContextMenu.events({
'click a': function(e) {
var study = Template.studyContextMenu.$study;
var id = $(e.currentTarget).attr('id');
var id, fn, target = $(e.currentTarget);
var fn = StudyList.functions[id];
if (fn && typeof(fn) === 'function') {
fn(study);
if (target.hasClass('disabled')) {
return;
}
id = target.attr('id');
if (id in StudyList.functions) {
fn = StudyList.functions[id];
if (typeof fn === 'function') {
fn(Template.studyContextMenu.$study);
}
}
var dialog = $('#studyContextMenu');