mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-42887 Forms: Collapse all field elements below their labels on screens less than 1180px
Includes css fixes to make the question type edit screens look OK with this change.
This commit is contained in:
parent
529d3bad0e
commit
d8383b247e
7 changed files with 115 additions and 62 deletions
|
@ -17,3 +17,4 @@ Upgrade procedure:
|
||||||
after "DOM.setStyle(ifr, 'height',DOM.getSize(ifr).h + dy); // Resize iframe"
|
after "DOM.setStyle(ifr, 'height',DOM.getSize(ifr).h + dy); // Resize iframe"
|
||||||
7/ reimplement patch in MDL-42481
|
7/ reimplement patch in MDL-42481
|
||||||
8/ reimplement patch in MDL-42684
|
8/ reimplement patch in MDL-42684
|
||||||
|
9/ reimplement patch in MDL-42887
|
||||||
|
|
|
@ -155,7 +155,6 @@
|
||||||
// Resizes the iframe by a relative height value
|
// Resizes the iframe by a relative height value
|
||||||
_resizeIframe : function(ed, tb_id, dy) {
|
_resizeIframe : function(ed, tb_id, dy) {
|
||||||
var ifr = ed.getContentAreaContainer().firstChild;
|
var ifr = ed.getContentAreaContainer().firstChild;
|
||||||
var ultcon = ed.getContainer().parentNode; //Ultimate parent container
|
|
||||||
var parcon = ed.getContainer(); //Parent container
|
var parcon = ed.getContainer(); //Parent container
|
||||||
var tablecon = ed.getContainer().childNodes[1]; // Table container
|
var tablecon = ed.getContainer().childNodes[1]; // Table container
|
||||||
var textarea = DOM.get(ed.id);
|
var textarea = DOM.get(ed.id);
|
||||||
|
@ -178,10 +177,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set all the containers to the same width
|
// Set all the containers to the same width
|
||||||
DOM.setStyle(textarea, 'width',DOM.getSize(ultcon).w);
|
DOM.setStyle(textarea, 'width','100%');
|
||||||
DOM.setStyle(parcon, 'width',DOM.getSize(ultcon).w);
|
DOM.setStyle(parcon, 'width','100%');
|
||||||
DOM.setStyle(tablecon, 'width',DOM.getSize(ultcon).w);
|
DOM.setStyle(tablecon, 'width','100%');
|
||||||
DOM.setStyle(ifr, 'width',DOM.getSize(ultcon).w);
|
DOM.setStyle(ifr, 'width','100%');
|
||||||
|
|
||||||
|
|
||||||
if (collapsedContainer) {
|
if (collapsedContainer) {
|
||||||
|
|
|
@ -329,36 +329,48 @@ input#id_externalurl {direction:ltr;}
|
||||||
#portfolio-add-button {display:inline;}
|
#portfolio-add-button {display:inline;}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the labels above text editors and file managers.
|
* Show the labels above text editors and file managers except on wide screens.
|
||||||
*/
|
*/
|
||||||
#adminsettings #admin-summary .form-label,
|
.mform .fcontainer .fitem .fitemtitle label {
|
||||||
.mform .fcontainer .fitem_ffilemanager .fitemtitle,
|
font-weight: bold;
|
||||||
.mform .fcontainer .fitem_feditor .fitemtitle {
|
|
||||||
display: block;
|
|
||||||
margin-top: 4px;
|
|
||||||
margin-bottom: 4px;
|
|
||||||
text-align: left;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.dir-rtl #adminsettings #admin-summary .form-label,
|
|
||||||
.dir-rtl .mform .fcontainer .fitem_ffilemanager .fitemtitle,
|
|
||||||
.dir-rtl .mform .fcontainer .fitem_feditor .fitemtitle {
|
|
||||||
text-align: right;
|
|
||||||
}
|
}
|
||||||
|
@media (max-width: 1199px) {
|
||||||
|
.mform .fcontainer .fitem .fitemtitle {
|
||||||
|
display: block;
|
||||||
|
margin-top: 4px;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
text-align: left;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.dir-rtl .mform .fcontainer .fitem .fitemtitle {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
#adminsettings #admin-summary .form-setting,
|
.mform .fcontainer .fitem .felement {
|
||||||
#adminsettings #admin-summary .form-description,
|
margin-left: 0;
|
||||||
.mform .fcontainer .fitem_ffilemanager .ffilemanager,
|
width: 100%;
|
||||||
.mform .fcontainer .fitem_feditor .feditor {
|
float: left;
|
||||||
margin-left: 0%;
|
margin-bottom: 6px;
|
||||||
width: 100%;
|
padding-left: 0;
|
||||||
float: left;
|
padding-right: 0;
|
||||||
}
|
}
|
||||||
.dir-rtl #adminsettings #admin-summary .form-setting,
|
.dir-rtl .mform .fcontainer .fitem .felement {
|
||||||
.dir-rtl #adminsettings #admin-summary .form-description,
|
margin-right: 0;
|
||||||
.dir-rtl .mform .fcontainer .fitem_ffilemanager .ffilemanager,
|
float: right;
|
||||||
.dir-rtl .mform .fcontainer .fitem_feditor .feditor {
|
padding-right: 0;
|
||||||
margin-right: 0%;
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
.mform .fcontainer .fitem_fcheckbox .fitemtitle,
|
||||||
|
.mform .fcontainer .fitem_fcheckbox .felement {
|
||||||
|
display: inline-block;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
.dir-rtl .mform .fcontainer .fitem_fcheckbox .felement {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.mform .fcontainer .fitem_fcheckbox .felement {
|
||||||
|
padding: 6px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -130,7 +130,28 @@ body.path-question-type .fitem_fgroup .accesshide {font: inherit;left: 0;positio
|
||||||
background: none;
|
background: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Add a little padding to the answer sections of edit question forms. */
|
||||||
|
.path-question-type.editing #id_answerhdr .fitem .fitemtitle,
|
||||||
|
.path-question-type.editing #id_answerhdr .fitem .felement {
|
||||||
|
margin-left: 6px;
|
||||||
|
margin-right: 6px;
|
||||||
|
}
|
||||||
|
.path-question-type.editing #id_answerhdr .fitem_feditor .felement {
|
||||||
|
margin-left: 0px;
|
||||||
|
margin-right: 0px;
|
||||||
|
}
|
||||||
|
@media (min-width: 1200px) {
|
||||||
|
.path-question-type.editing #id_answerhdr .fitem_feditor .felement {
|
||||||
|
margin-left: 16%;
|
||||||
|
margin-right: 0px;
|
||||||
|
}
|
||||||
|
.dir-rtl .path-question-type.editing #id_answerhdr .fitem_feditor .felement {
|
||||||
|
margin-right: 16%;
|
||||||
|
margin-left: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** Overide for RTL layout **/
|
/** Overide for RTL layout **/
|
||||||
.dir-rtl #qtypechoicecontainer #chooseqtype .instruction,
|
.dir-rtl #qtypechoicecontainer #chooseqtype .instruction,
|
||||||
.dir-rtl #qtypechoicecontainer #chooseqtype .qtypesummary {right: 60%;left: 0%; border-left:0;border-right: 1px solid grey;}
|
.dir-rtl #qtypechoicecontainer #chooseqtype .qtypesummary {right: 60%;left: 0%; border-left:0;border-right: 1px solid grey;}
|
||||||
#qtypechoicecontainer #chooseqtype .qtypeoption {padding-right: 0.3em;}
|
#qtypechoicecontainer #chooseqtype .qtypeoption {padding-right: 0.3em;}
|
||||||
|
|
|
@ -384,34 +384,44 @@ fieldset.coursesearchbox label {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the labels above text editors and file managers.
|
* Show the labels above text editors and file managers except on wide screens.
|
||||||
*/
|
*/
|
||||||
#adminsettings #admin-summary .form-label,
|
.mform .fcontainer .fitem .fitemtitle label {
|
||||||
.mform .fcontainer .fitem_ffilemanager .fitemtitle,
|
font-weight: bold;
|
||||||
.mform .fcontainer .fitem_feditor .fitemtitle {
|
|
||||||
display: block;
|
|
||||||
margin-top: 4px;
|
|
||||||
margin-bottom: 4px;
|
|
||||||
text-align: left;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.dir-rtl #adminsettings #admin-summary .form-label,
|
|
||||||
.dir-rtl .mform .fcontainer .fitem_ffilemanager .fitemtitle,
|
|
||||||
.dir-rtl .mform .fcontainer .fitem_feditor .fitemtitle {
|
|
||||||
text-align: right;
|
|
||||||
}
|
}
|
||||||
|
@media (max-width: 1199px) {
|
||||||
|
.mform .fcontainer .fitem .fitemtitle {
|
||||||
|
display: block;
|
||||||
|
margin-top: 4px;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
text-align: left;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.dir-rtl .mform .fcontainer .fitem .fitemtitle {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
#adminsettings #admin-summary .form-setting,
|
.mform .fcontainer .fitem .felement {
|
||||||
#adminsettings #admin-summary .form-description,
|
margin-left: 0;
|
||||||
.mform .fcontainer .fitem_ffilemanager .ffilemanager,
|
width: 100%;
|
||||||
.mform .fcontainer .fitem_feditor .feditor {
|
float: left;
|
||||||
margin-left: 0%;
|
padding-left: 0;
|
||||||
width: 100%;
|
padding-right: 0;
|
||||||
float: left;
|
}
|
||||||
}
|
.dir-rtl .mform .fcontainer .fitem .felement {
|
||||||
.dir-rtl #adminsettings #admin-summary .form-setting,
|
margin-right: 0;
|
||||||
.dir-rtl #adminsettings #admin-summary .form-description,
|
padding-left: 0;
|
||||||
.dir-rtl .mform .fcontainer .fitem_ffilemanager .ffilemanager,
|
padding-right: 0;
|
||||||
.dir-rtl .mform .fcontainer .fitem_feditor .feditor {
|
}
|
||||||
margin-right: 0%;
|
.mform .fcontainer .fitem_fcheckbox .fitemtitle,
|
||||||
|
.mform .fcontainer .fitem_fcheckbox .felement {
|
||||||
|
display: inline-block;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
.dir-rtl .mform .fcontainer .fitem_fcheckbox .felement {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.mform .fcontainer .fitem_fcheckbox .felement {
|
||||||
|
padding: 6px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -461,3 +461,13 @@ a#hidebankcmd {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Add a little padding to the answer sections of edit question forms. */
|
||||||
|
.path-question-type.editing #id_answerhdr .fitem .fitemtitle,
|
||||||
|
.path-question-type.editing #id_answerhdr .fitem .felement {
|
||||||
|
margin-left: 6px;
|
||||||
|
margin-right: 6px;
|
||||||
|
}
|
||||||
|
.path-question-type.editing #id_answerhdr .fitem_feditor .felement {
|
||||||
|
margin-left: 0px;
|
||||||
|
margin-right: 0px;
|
||||||
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue