Commit 64506f31 by gradyward

Merge pull request #483 from edx/grady/modal-height

Changes the Modal Height when used for OpenAssessment Editing
parents 86a5d3be ec3819cf
...@@ -2137,10 +2137,11 @@ hr.divider, ...@@ -2137,10 +2137,11 @@ hr.divider,
border-bottom: none; } border-bottom: none; }
#openassessment-editor { #openassessment-editor {
margin-bottom: 0; } margin-bottom: 0;
height: 100%; }
#openassessment-editor .openassessment_editor_content_and_tabs { #openassessment-editor .openassessment_editor_content_and_tabs {
width: 100%; width: 100%;
height: 373px; } height: Calc(100% - 97px); }
#openassessment-editor #openassessment_editor_header { #openassessment-editor #openassessment_editor_header {
background-color: #e5e5e5; background-color: #e5e5e5;
width: 100%; width: 100%;
...@@ -2448,9 +2449,15 @@ hr.divider, ...@@ -2448,9 +2449,15 @@ hr.divider,
border: 0px; border: 0px;
clear: both; } clear: both; }
.modal-content { .modal-lg.modal-window.confirm.openassessment_modal_window {
height: 470px !important; height: 80%;
background-color: #e5e5e5; } top: 10%; }
.openassessment_full_height.edit-xblock-modal,
.openassessment_full_height.xblock-editor,
.openassessment_full_height.xblock.xblock-studio_view.xblock-initialized,
[class*="view-"] .modal-lg.modal-editor .openassessment_full_height.modal-content {
height: 100%; }
.openassessment .self-assessment__display__header, .openassessment .peer-assessment__display__header, .openassessment .step__header { .openassessment .self-assessment__display__header, .openassessment .peer-assessment__display__header, .openassessment .step__header {
margin-bottom: 0 !important; margin-bottom: 0 !important;
......
...@@ -19,6 +19,8 @@ OpenAssessment.StudioView = function(runtime, element, server) { ...@@ -19,6 +19,8 @@ OpenAssessment.StudioView = function(runtime, element, server) {
var liveElement = this.liveElement; var liveElement = this.liveElement;
this.fixModalHeight();
// Instantiates JQuery selector variables which will allow manipulation and display controls. // Instantiates JQuery selector variables which will allow manipulation and display controls.
this.settingsFieldSelectors = { this.settingsFieldSelectors = {
promptBox: $('#openassessment_prompt_editor', liveElement), promptBox: $('#openassessment_prompt_editor', liveElement),
...@@ -90,6 +92,16 @@ OpenAssessment.StudioView = function(runtime, element, server) { ...@@ -90,6 +92,16 @@ OpenAssessment.StudioView = function(runtime, element, server) {
OpenAssessment.StudioView.prototype = { OpenAssessment.StudioView.prototype = {
/** /**
Adjusts the modal's height, position and padding to be larger for OA editing only (Does not impact other modals)
*/
fixModalHeight: function () {
var element = this.liveElement;
element.toggleClass('openassessment_full_height');
element.parentsUntil('.modal-window').toggleClass('openassessment_full_height');
$('.modal-window').toggleClass('openassessment_modal_window');
},
/**
Load the XBlock XML definition from the server and display it in the view. Load the XBlock XML definition from the server and display it in the view.
**/ **/
load: function () { load: function () {
......
...@@ -179,10 +179,11 @@ ...@@ -179,10 +179,11 @@
#openassessment-editor { #openassessment-editor {
margin-bottom: 0; margin-bottom: 0;
height: 100%;
.openassessment_editor_content_and_tabs { .openassessment_editor_content_and_tabs {
width: 100%; width: 100%;
height: 373px; height: Calc(100% - 97px);
} }
#openassessment_editor_header{ #openassessment_editor_header{
...@@ -659,12 +660,17 @@ ...@@ -659,12 +660,17 @@
} }
#openassessment_make_invisible{ //For Both of these, we use high specificity to overload the previous styles
//without the important tag.
.modal-lg.modal-window.confirm.openassessment_modal_window{
height: 80%;
top: 10%;
} }
.modal-content { .openassessment_full_height.edit-xblock-modal,
height: 470px !important; .openassessment_full_height.xblock-editor,
background-color: #e5e5e5; .openassessment_full_height.xblock.xblock-studio_view.xblock-initialized,
[class*="view-"] .modal-lg.modal-editor .openassessment_full_height.modal-content
{
height: 100%;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment