Fixed OHIF Viewer layout / CINE / Hanging Protocol buttons (OHIF-49)
This commit is contained in:
1 parent
59c851fa57
commit
8b364ce9d0
37 files changed
+496
-709
No files matched your search
+19
@@ -0,0 +1,19 @@
|
||||
<template name="previousPresentationGroupButton">
|
||||
<div id="{{this.id}}"
|
||||
class="toolbarSectionButton rp-x-1 {{this.classes}} {{activeClass}} {{ #if previousNotAvailable }}disabled{{ /if }}"
|
||||
title="{{this.title}}"
|
||||
disabled="{{ #if previousNotAvailable }}true{{ /if }}">
|
||||
<div class="svgContainer">
|
||||
{{ #if this.svgLink }}
|
||||
<svg>
|
||||
<use xlink:href={{this.svgLink}}></use>
|
||||
</svg>
|
||||
{{ else }}
|
||||
<i class={{iconClasses}}></i>
|
||||
{{ /if }}
|
||||
</div>
|
||||
<div class="buttonLabel">
|
||||
{{this.title}}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
Template.previousPresentationGroupButton.helpers({
|
||||
/**
|
||||
* Check if an earlier stage exists for the user to switch to
|
||||
*
|
||||
* @returns {boolean} Whether or not an earlier stage exists
|
||||
*/
|
||||
previousNotAvailable() {
|
||||
// Run this helper whenever the ProtocolEngine / LayoutManager has changed
|
||||
Session.get('LayoutManagerUpdated');
|
||||
|
||||
// If no ProtocolEngine has been defined yet, stop here
|
||||
if (!ProtocolEngine) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Return whether or not the current stage is the first stage
|
||||
return ProtocolEngine.stage === 0;
|
||||
}
|
||||
});
|
||||
|
||||
Template.previousPresentationGroupButton.events({
|
||||
/**
|
||||
* Switch to the previous Presentation group
|
||||
*
|
||||
* @param event The click event on the button
|
||||
*/
|
||||
'click #previousPresentationGroup'(event) {
|
||||
// If no ProtocolEngine has been defined yet, do nothing
|
||||
if (!ProtocolEngine) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Hide the button's Bootstrap tooltip in case it was shown
|
||||
$(event.currentTarget).tooltip('hide');
|
||||
|
||||
// Instruct the ProtocolEngine to switch to the next stage
|
||||
ProtocolEngine.previousProtocolStage();
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user