Styling updates to prevent lesion dialogs from going off screen
This commit is contained in:
parent
4ae0183a9c
commit
d7d4ea0394
@ -76,6 +76,14 @@ function getLesionLocationCallback(measurementData, eventData) {
|
|||||||
display: 'block'
|
display: 'block'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var pageHeight = $(window).height();
|
||||||
|
dialogProperty.top = Math.max(dialogProperty.top, 0);
|
||||||
|
dialogProperty.top = Math.min(dialogProperty.top, pageHeight - dialog.outerHeight());
|
||||||
|
|
||||||
|
var pageWidth = $(window).width();
|
||||||
|
dialogProperty.left = Math.max(dialogProperty.left, 0);
|
||||||
|
dialogProperty.left = Math.min(dialogProperty.left, pageWidth - dialog.outerWidth());
|
||||||
|
|
||||||
// Device is touch device or not
|
// Device is touch device or not
|
||||||
// If device is touch device, set position center of screen vertically and horizontally
|
// If device is touch device, set position center of screen vertically and horizontally
|
||||||
if (isTouchDevice()) {
|
if (isTouchDevice()) {
|
||||||
|
|||||||
@ -7,18 +7,11 @@
|
|||||||
right: 0
|
right: 0
|
||||||
z-index: 100
|
z-index: 100
|
||||||
width: 300px
|
width: 300px
|
||||||
margin: auto
|
height: 130px
|
||||||
border-radius: 5px
|
border-radius: 5px
|
||||||
padding: 10px 20px 10px 20px
|
padding: 10px 20px 10px 20px
|
||||||
background-color: rgba(255,255,255,1)
|
background-color: rgba(255,255,255,1)
|
||||||
|
|
||||||
/* dialogMobile is added to #lesionLocationDialog when touchDevices is detected */
|
|
||||||
.dialogMobile
|
|
||||||
margin: 0 auto
|
|
||||||
float: none
|
|
||||||
background-color: rgba(0,0,0,0.5)
|
|
||||||
text-align: center
|
|
||||||
|
|
||||||
#closeLesionPopup
|
#closeLesionPopup
|
||||||
outline: none
|
outline: none
|
||||||
border: none
|
border: none
|
||||||
|
|||||||
@ -54,7 +54,7 @@
|
|||||||
{{ #if code }}
|
{{ #if code }}
|
||||||
<option value={{code}} selected={{selected}}>{{code}} - {{text}}</option>
|
<option value={{code}} selected={{selected}}>{{code}} - {{text}}</option>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<option value={{text}}} selected={{selected}}>{{text}}</option>
|
<option value={{text}} selected={{selected}}>{{text}}</option>
|
||||||
{{ /if }}
|
{{ /if }}
|
||||||
{{ /each}}
|
{{ /each}}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -94,6 +94,14 @@ function getLesionLocationCallback(measurementData, eventData) {
|
|||||||
display: 'block'
|
display: 'block'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var pageHeight = $(window).height();
|
||||||
|
dialogProperty.top = Math.max(dialogProperty.top, 0);
|
||||||
|
dialogProperty.top = Math.min(dialogProperty.top, pageHeight - dialog.outerHeight());
|
||||||
|
|
||||||
|
var pageWidth = $(window).width();
|
||||||
|
dialogProperty.left = Math.max(dialogProperty.left, 0);
|
||||||
|
dialogProperty.left = Math.min(dialogProperty.left, pageWidth - dialog.outerWidth());
|
||||||
|
|
||||||
// Device is touch device or not
|
// Device is touch device or not
|
||||||
// If device is touch device, set position center of screen vertically and horizontally
|
// If device is touch device, set position center of screen vertically and horizontally
|
||||||
if (isTouchDevice()) {
|
if (isTouchDevice()) {
|
||||||
@ -103,6 +111,7 @@ function getLesionLocationCallback(measurementData, eventData) {
|
|||||||
dialogProperty.left = 0;
|
dialogProperty.left = 0;
|
||||||
dialogProperty.right = 0;
|
dialogProperty.right = 0;
|
||||||
dialogProperty.bottom = 0;
|
dialogProperty.bottom = 0;
|
||||||
|
dialogProperty.margin = 'auto';
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog.css(dialogProperty);
|
dialog.css(dialogProperty);
|
||||||
|
|||||||
@ -12,13 +12,6 @@
|
|||||||
padding: 10px 20px 10px 20px
|
padding: 10px 20px 10px 20px
|
||||||
background-color: rgba(255,255,255,1)
|
background-color: rgba(255,255,255,1)
|
||||||
|
|
||||||
/* dialogMobile is added to #nonTargetLesionLocationDialog when touchDevices is detected */
|
|
||||||
.dialogMobile
|
|
||||||
margin: 0 auto
|
|
||||||
float: none
|
|
||||||
background-color: rgba(0,0,0,0.5)
|
|
||||||
text-align: center
|
|
||||||
|
|
||||||
#selectNonTargetLesionLocation, #selectNonTargetLesionLocationResponse
|
#selectNonTargetLesionLocation, #selectNonTargetLesionLocationResponse
|
||||||
width: 100%
|
width: 100%
|
||||||
|
|
||||||
@ -28,3 +21,6 @@
|
|||||||
.locationOK
|
.locationOK
|
||||||
text-align: center
|
text-align: center
|
||||||
|
|
||||||
|
/* dialogMobile is added to #nonTargetLesionLocationDialog when touchDevices is detected */
|
||||||
|
.dialogMobile
|
||||||
|
margin: auto
|
||||||
@ -44,6 +44,14 @@ changeNonTargetResponse = function(measurementData, eventData, doneCallback) {
|
|||||||
} else {
|
} else {
|
||||||
dialogProperty.top = eventData.currentPoints.page.y - dialog.outerHeight() - 40;
|
dialogProperty.top = eventData.currentPoints.page.y - dialog.outerHeight() - 40;
|
||||||
dialogProperty.left = eventData.currentPoints.page.x - dialog.outerWidth() / 2;
|
dialogProperty.left = eventData.currentPoints.page.x - dialog.outerWidth() / 2;
|
||||||
|
|
||||||
|
var pageHeight = $(window).height();
|
||||||
|
dialogProperty.top = Math.max(dialogProperty.top, 0);
|
||||||
|
dialogProperty.top = Math.min(dialogProperty.top, pageHeight - dialog.outerHeight());
|
||||||
|
|
||||||
|
var pageWidth = $(window).width();
|
||||||
|
dialogProperty.left = Math.max(dialogProperty.left, 0);
|
||||||
|
dialogProperty.left = Math.min(dialogProperty.left, pageWidth - dialog.outerWidth());
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog.css(dialogProperty);
|
dialog.css(dialogProperty);
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
<div class="timepointDialogContentWrapper">
|
<div class="timepointDialogContentWrapper">
|
||||||
<div class="dialogContent">
|
<div class="dialogContent">
|
||||||
<div class="timepointContent">
|
<div class="timepointContent">
|
||||||
<input type="checkbox" id="checkBoxBaseline" value="ok"><strong >Baseline</strong>
|
<input type="checkbox" id="checkBoxBaseline" value="ok">
|
||||||
|
<label for="checkBoxBaseline">Baseline</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
#timepointTextDialog
|
#timepointTextDialog
|
||||||
display: none
|
display: none
|
||||||
position: absolute
|
position: absolute
|
||||||
@ -12,7 +11,6 @@
|
|||||||
background-color: rgba(255,255,255,1)
|
background-color: rgba(255,255,255,1)
|
||||||
border-top-left-radius: 5px
|
border-top-left-radius: 5px
|
||||||
border-top-right-radius: 5px
|
border-top-right-radius: 5px
|
||||||
text-align: left
|
|
||||||
|
|
||||||
.dialogContent
|
.dialogContent
|
||||||
margin: 0 auto
|
margin: 0 auto
|
||||||
|
|||||||
@ -3,17 +3,13 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
<div>
|
<div>Patient Name</div>
|
||||||
Patient Name
|
|
||||||
</div>
|
|
||||||
<div class="patient-name-input">
|
<div class="patient-name-input">
|
||||||
<input type="text" class="form-control worklist-search" id="patientName">
|
<input type="text" class="form-control worklist-search" id="patientName">
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<div>
|
<div>Patient ID</div>
|
||||||
Patient ID
|
|
||||||
</div>
|
|
||||||
<div class="patientid-input">
|
<div class="patientid-input">
|
||||||
<input type="text" class="form-control worklist-search" id="patientId">
|
<input type="text" class="form-control worklist-search" id="patientId">
|
||||||
</div>
|
</div>
|
||||||
@ -21,9 +17,7 @@
|
|||||||
|
|
||||||
{{#unless isTouchDevice}}
|
{{#unless isTouchDevice}}
|
||||||
<th>
|
<th>
|
||||||
<div>
|
<div>Accession #</div>
|
||||||
Accession #
|
|
||||||
</div>
|
|
||||||
<div class="worklist-input">
|
<div class="worklist-input">
|
||||||
<input type="text" class="form-control worklist-search" id="accessionNumber">
|
<input type="text" class="form-control worklist-search" id="accessionNumber">
|
||||||
</div>
|
</div>
|
||||||
@ -31,9 +25,7 @@
|
|||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|
||||||
<th>
|
<th>
|
||||||
<div>
|
<div>Study Date</div>
|
||||||
Study Date
|
|
||||||
</div>
|
|
||||||
<div class="worklist-input">
|
<div class="worklist-input">
|
||||||
<input type="text" class="form-control worklist-search" id="studyDate">
|
<input type="text" class="form-control worklist-search" id="studyDate">
|
||||||
</div>
|
</div>
|
||||||
@ -41,18 +33,14 @@
|
|||||||
|
|
||||||
{{#unless isTouchDevice}}
|
{{#unless isTouchDevice}}
|
||||||
<th>
|
<th>
|
||||||
<div>
|
<div>Modality</div>
|
||||||
Modality
|
|
||||||
</div>
|
|
||||||
<div class="modality-input">
|
<div class="modality-input">
|
||||||
<input type="text" class="form-control worklist-search" id="modality" style="visibility: hidden; ">
|
<input type="text" class="form-control worklist-search" id="modality" style="visibility: hidden; ">
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
<th>
|
<th>
|
||||||
<div>
|
<div>Study Description</div>
|
||||||
StudyDescription
|
|
||||||
</div>
|
|
||||||
<div class="study-description-input">
|
<div class="study-description-input">
|
||||||
<input type="text" class="form-control worklist-search" id="studyDescription" style="visibility: hidden; ">
|
<input type="text" class="form-control worklist-search" id="studyDescription" style="visibility: hidden; ">
|
||||||
</div>
|
</div>
|
||||||
@ -60,9 +48,7 @@
|
|||||||
|
|
||||||
{{#unless isTouchDevice}}
|
{{#unless isTouchDevice}}
|
||||||
<th>
|
<th>
|
||||||
<div>
|
<div># Images</div>
|
||||||
# Images
|
|
||||||
</div>
|
|
||||||
<div class="worklist-input">
|
<div class="worklist-input">
|
||||||
<input type="text" class="form-control worklist-search" id="numberOfImages" style="visibility: hidden; ">
|
<input type="text" class="form-control worklist-search" id="numberOfImages" style="visibility: hidden; ">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -111,7 +111,7 @@ function search() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Template.worklistResult.events({
|
Template.worklistResult.events({
|
||||||
'keypress': function(event) {
|
'keydown': function(event) {
|
||||||
if (event.keyCode === 13) { // Enter
|
if (event.keyCode === 13) { // Enter
|
||||||
search();
|
search();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user