Started replacing toolbar in OHIF Viewer with that of Lesion Tracker (OHIF-49)
This commit is contained in:
1 parent
a59713957d
commit
59c851fa57
36 files changed
+1312
-239
No files matched your search
@@ -5,7 +5,7 @@
|
||||
<label for="btnImport">
|
||||
<i class="fa fa-plus"></i> Add new study
|
||||
</label>
|
||||
<input id="btnImport" type="file" webkitdirectory directory multiple>
|
||||
<input id="btnImport" class='js-import-files' type="file" webkitdirectory directory multiple>
|
||||
</div>
|
||||
{{/if }}
|
||||
</div>
|
||||
|
||||
@@ -1,34 +1,36 @@
|
||||
Template.worklistToolbar.onCreated(() => {
|
||||
Meteor.call('importSupported', function(error, result) {
|
||||
if (error || !result) {
|
||||
Session.set('importSupported', false);
|
||||
} else {
|
||||
Session.set('importSupported', true);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Template.worklistToolbar.events({
|
||||
'change #btnImport': function(e) {
|
||||
'change .js-import-files'(event) {
|
||||
// Get selected files located in the client machine
|
||||
var selectedFiles = $.map(e.currentTarget.files, function(value) {
|
||||
var selectedFiles = $.map(event.currentTarget.files, (value) => {
|
||||
return value;
|
||||
});
|
||||
|
||||
importStudies(selectedFiles);
|
||||
},
|
||||
|
||||
'click #btnImport': function(e) {
|
||||
'click .js-import-files'(event) {
|
||||
// Reset file input
|
||||
var fileInput = e.currentTarget;
|
||||
var fileInput = event.currentTarget;
|
||||
$(fileInput).val('');
|
||||
}
|
||||
});
|
||||
|
||||
Template.worklistToolbar.helpers({
|
||||
importSupported: function() {
|
||||
importSupported() {
|
||||
var importSupported = Session.get('importSupported');
|
||||
var studyListFunctionsEnabled = Meteor.settings && Meteor.settings.public && Meteor.settings.public.ui &&
|
||||
Meteor.settings.public.ui.studyListFunctionsEnabled || false;
|
||||
|
||||
return (importSupported && studyListFunctionsEnabled);
|
||||
}
|
||||
});
|
||||
|
||||
Meteor.call('importSupported', function(err, result) {
|
||||
if (!err && result) {
|
||||
Session.set('importSupported', true);
|
||||
} else {
|
||||
Session.set('importSupported', false);
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user