Styling updates to prevent lesion dialogs from going off screen
This commit is contained in:
1 parent
4ae0183a9c
commit
d7d4ea0394
10 files changed
+41
-42
No files matched your search
+1
-1
@@ -54,7 +54,7 @@
|
||||
{{ #if code }}
|
||||
<option value={{code}} selected={{selected}}>{{code}} - {{text}}</option>
|
||||
{{ else }}
|
||||
<option value={{text}}} selected={{selected}}>{{text}}</option>
|
||||
<option value={{text}} selected={{selected}}>{{text}}</option>
|
||||
{{ /if }}
|
||||
{{ /each}}
|
||||
</select>
|
||||
|
||||
+9
@@ -94,6 +94,14 @@ function getLesionLocationCallback(measurementData, eventData) {
|
||||
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
|
||||
// If device is touch device, set position center of screen vertically and horizontally
|
||||
if (isTouchDevice()) {
|
||||
@@ -103,6 +111,7 @@ function getLesionLocationCallback(measurementData, eventData) {
|
||||
dialogProperty.left = 0;
|
||||
dialogProperty.right = 0;
|
||||
dialogProperty.bottom = 0;
|
||||
dialogProperty.margin = 'auto';
|
||||
}
|
||||
|
||||
dialog.css(dialogProperty);
|
||||
|
||||
+4
-8
@@ -12,13 +12,6 @@
|
||||
padding: 10px 20px 10px 20px
|
||||
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
|
||||
width: 100%
|
||||
|
||||
@@ -27,4 +20,7 @@
|
||||
|
||||
.locationOK
|
||||
text-align: center
|
||||
|
||||
|
||||
/* dialogMobile is added to #nonTargetLesionLocationDialog when touchDevices is detected */
|
||||
.dialogMobile
|
||||
margin: auto
|
||||
Reference in new issue
Block a user