Commit 2c3e8690 by Will Daly

Merge remote-tracking branch 'origin/authoring' into will/js-refactor-assessment-editing

Conflicts:
	openassessment/xblock/static/css/openassessment.css
	openassessment/xblock/static/js/openassessment.min.js
	openassessment/xblock/static/js/src/oa_edit.js
parents a93984c0 64506f31
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -12,9 +12,13 @@
**/
OpenAssessment.StudioView = function(runtime, element, server) {
this.element = element;
this.runtime = runtime;
this.server = server;
// Resize the editing modal
this.fixModalHeight();
// Initialize the tabs
$(".openassessment_editor_content_and_tabs", this.element).tabs();
......@@ -54,6 +58,23 @@ OpenAssessment.StudioView = function(runtime, element, server) {
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 () {
// Add the full height class to every element from the XBlock
// to the modal window in Studio.
$(this.element)
.toggleClass('openassessment_full_height', true)
.parentsUntil('.modal-window')
.toggleClass('openassessment_full_height', true);
// Add the modal window class to the modal window
$(this.element)
.closest('.modal-window')
.toggleClass('openassessment_modal_window', true);
},
/**
Save the problem's XML definition to the server.
If the problem has been released, make the user confirm the save.
**/
......
......@@ -179,10 +179,11 @@
#openassessment-editor {
margin-bottom: 0;
height: 100%;
.openassessment_editor_content_and_tabs {
width: 100%;
height: 373px;
height: Calc(100% - 97px);
}
#openassessment_editor_header{
......@@ -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 {
height: 470px !important;
background-color: #e5e5e5;
.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%;
}
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