Skip to content
Snippets Groups Projects
Commit 88609038 authored by gnaegi's avatar gnaegi
Browse files

OO-1068 fix layout issues in QTI node edit form, text-shadow in buttons in realistic theme

parent 5ed6141e
No related branches found
No related tags found
No related merge requests found
......@@ -159,7 +159,7 @@ public class IQ12EditForm extends FormBasicController {
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
limitAttempts = uifactory.addCheckboxesVertical("limitAttempts", "qti.form.limit.attempts", formLayout, new String[]{"xx"}, new String[]{null}, 1);
limitAttempts = uifactory.addCheckboxesHorizontal("limitAttempts", "qti.form.limit.attempts", formLayout, new String[]{"xx"}, new String[]{null});
Integer confAttempts = (Integer) modConfig.get(IQEditController.CONFIG_KEY_ATTEMPTS);
if (confAttempts == null) confAttempts = new Integer(0);
......@@ -169,7 +169,7 @@ public class IQ12EditForm extends FormBasicController {
attempts.setMaxValueCheck(20, null);
//add it
blockAfterSuccess = uifactory.addCheckboxesVertical("blockAfterSuccess", "qti.form.block.afterSuccess", formLayout, new String[]{"xx"}, new String[]{null}, 1);
blockAfterSuccess = uifactory.addCheckboxesHorizontal("blockAfterSuccess", "qti.form.block.afterSuccess", formLayout, new String[]{"xx"}, new String[]{null});
Boolean block = (Boolean) modConfig.get(IQEditController.CONFIG_KEY_BLOCK_AFTER_SUCCESS);
blockAfterSuccess.select("xx", block == null ? false : block.booleanValue() );
......@@ -188,16 +188,16 @@ public class IQ12EditForm extends FormBasicController {
}
Boolean fullWindow = (Boolean) modConfig.get(IQEditController.CONFIG_FULLWINDOW);
fullWindowEl = uifactory.addCheckboxesVertical("fullwindow", "qti.form.fullwindow", formLayout, new String[]{"fullwindow"}, new String[]{null}, 1);
fullWindowEl = uifactory.addCheckboxesHorizontal("fullwindow", "qti.form.fullwindow", formLayout, new String[]{"fullwindow"}, new String[]{null});
fullWindowEl.select("fullwindow", fullWindow == null ? true : fullWindow.booleanValue());
Boolean CdisplayMenu = (Boolean)modConfig.get(IQEditController.CONFIG_KEY_DISPLAYMENU);
displayMenu = uifactory.addCheckboxesVertical("qti_displayMenu", "qti.form.menudisplay", formLayout, new String[]{"xx"}, new String[]{null}, 1);
displayMenu = uifactory.addCheckboxesHorizontal("qti_displayMenu", "qti.form.menudisplay", formLayout, new String[]{"xx"}, new String[]{null});
displayMenu.select("xx", CdisplayMenu == null ? true : CdisplayMenu );
displayMenu.addActionListener(FormEvent.ONCLICK);
Boolean CenableMenu = (Boolean)modConfig.get(IQEditController.CONFIG_KEY_ENABLEMENU);
enableMenu = uifactory.addCheckboxesVertical("qti_enableMenu", "qti.form.menuenable", formLayout, new String[]{"xx"}, new String[]{null}, 1);
enableMenu = uifactory.addCheckboxesHorizontal("qti_enableMenu", "qti.form.menuenable", formLayout, new String[]{"xx"}, new String[]{null});
enableMenu.select("xx", CenableMenu == null ? true : CenableMenu);
menuRenderOptions = uifactory.addRadiosVertical("qti_form_menurenderoption", "qti.form.menurender", formLayout, menuRenderOptKeys, menuRenderOptValues);
......@@ -226,33 +226,33 @@ public class IQ12EditForm extends FormBasicController {
Boolean bDisplayQuestionTitle = (Boolean)modConfig.get(IQEditController.CONFIG_KEY_QUESTIONTITLE);
boolean confDisplayQuestionTitle = (bDisplayQuestionTitle != null) ? bDisplayQuestionTitle.booleanValue() : true;
displayQuestionTitle = uifactory.addCheckboxesVertical("qti_displayQuestionTitle", "qti.form.questiontitle", formLayout, new String[]{"xx"}, new String[]{null}, 1);
displayQuestionTitle = uifactory.addCheckboxesHorizontal("qti_displayQuestionTitle", "qti.form.questiontitle", formLayout, new String[]{"xx"}, new String[]{null});
displayQuestionTitle.select("xx", confDisplayQuestionTitle);
//display automatic enumetation of choice options
Boolean bAutoEnum = (Boolean)modConfig.get(IQEditController.CONFIG_KEY_AUTOENUM_CHOICES);
boolean confAutoEnum = (bAutoEnum != null) ? bAutoEnum.booleanValue() : false;
autoEnumerateChoices = uifactory.addCheckboxesVertical("qti_AutoEnumChoices", "qti.form.auto.enumerate.choices", formLayout, new String[]{"xx"}, new String[]{null}, 1);
autoEnumerateChoices = uifactory.addCheckboxesHorizontal("qti_AutoEnumChoices", "qti.form.auto.enumerate.choices", formLayout, new String[]{"xx"}, new String[]{null});
autoEnumerateChoices.select("xx", confAutoEnum);
//provide memo field
Boolean bMemo = (Boolean)modConfig.get(IQEditController.CONFIG_KEY_MEMO);
boolean confMemo = (bMemo != null) ? bMemo.booleanValue() : false;
provideMemoField = uifactory.addCheckboxesVertical("qti_provideMemoField", "qti.form.auto.memofield", formLayout, new String[]{"xx"}, new String[]{null}, 1);
provideMemoField = uifactory.addCheckboxesHorizontal("qti_provideMemoField", "qti.form.auto.memofield", formLayout, new String[]{"xx"}, new String[]{null});
provideMemoField.select("xx", confMemo);
// question progress
Boolean bEnableQuestionProgress = (Boolean)modConfig.get(IQEditController.CONFIG_KEY_QUESTIONPROGRESS);
boolean confEnableQuestionProgress = (bEnableQuestionProgress != null) ? bEnableQuestionProgress.booleanValue() : true;
displayQuestionProgress = uifactory.addCheckboxesVertical("qti_enableQuestionProgress", "qti.form.questionprogress", formLayout, new String[]{"xx"}, new String[]{null}, 1);
displayQuestionProgress = uifactory.addCheckboxesHorizontal("qti_enableQuestionProgress", "qti.form.questionprogress", formLayout, new String[]{"xx"}, new String[]{null});
displayQuestionProgress.select("xx", confEnableQuestionProgress);
displayQuestionProgress.setVisible(!isSurvey);
// score progress
Boolean bEnableScoreProgress = (Boolean)modConfig.get(IQEditController.CONFIG_KEY_SCOREPROGRESS);
boolean confEnableScoreProgress = (bEnableScoreProgress != null) ? bEnableScoreProgress.booleanValue() : true;
displayScoreProgress = uifactory.addCheckboxesVertical("resultTitle", "qti.form.scoreprogress", formLayout, new String[]{"xx"}, new String[]{null}, 1);
displayScoreProgress = uifactory.addCheckboxesHorizontal("resultTitle", "qti.form.scoreprogress", formLayout, new String[]{"xx"}, new String[]{null});
if (isAssessment || isSelfTest) {
displayScoreProgress.select("xx", confEnableScoreProgress);
......@@ -274,7 +274,7 @@ public class IQ12EditForm extends FormBasicController {
if (configKeyType != null && configKeyType.equals(AssessmentInstance.QMD_ENTRY_TYPE_ASSESS))
confEnableCancel = false;
}
enableCancel = uifactory.addCheckboxesVertical("qti_enableCancel", "qti.form.enablecancel", formLayout, new String[]{"xx"}, new String[]{null}, 1);
enableCancel = uifactory.addCheckboxesHorizontal("qti_enableCancel", "qti.form.enablecancel", formLayout, new String[]{"xx"}, new String[]{null});
enableCancel.select("xx", confEnableCancel);
if (isSelfTest) {
......@@ -286,7 +286,7 @@ public class IQ12EditForm extends FormBasicController {
// enable suspend
Boolean bEnableSuspend = (Boolean)modConfig.get(IQEditController.CONFIG_KEY_ENABLESUSPEND);
boolean confEnableSuspend = (bEnableSuspend != null) ? bEnableSuspend.booleanValue() : false;
enableSuspend = uifactory.addCheckboxesVertical("qti_enableSuspend", "qti.form.enablesuspend", formLayout, new String[]{"xx"}, new String[]{null}, 1);
enableSuspend = uifactory.addCheckboxesHorizontal("qti_enableSuspend", "qti.form.enablesuspend", formLayout, new String[]{"xx"}, new String[]{null});
enableSuspend.select("xx", confEnableSuspend);
uifactory.addSpacerElement("s2", formLayout, true);
......@@ -294,7 +294,7 @@ public class IQ12EditForm extends FormBasicController {
//Show score infos on start page
Boolean bEnableScoreInfos = (Boolean)modConfig.get(IQEditController.CONFIG_KEY_ENABLESCOREINFO);
boolean enableScoreInfos = (bEnableScoreInfos != null) ? bEnableScoreInfos.booleanValue() : true;
scoreInfo = uifactory.addCheckboxesVertical("qti_scoreInfo", "qti.form.scoreinfo", formLayout, new String[]{"xx"}, new String[]{null}, 1);
scoreInfo = uifactory.addCheckboxesHorizontal("qti_scoreInfo", "qti.form.scoreinfo", formLayout, new String[]{"xx"}, new String[]{null});
scoreInfo.select("xx", enableScoreInfos);
if (isAssessment || isSelfTest) {
scoreInfo.select("xx", enableScoreInfos);
......@@ -313,7 +313,7 @@ public class IQ12EditForm extends FormBasicController {
Boolean showResultOnHomePage = (Boolean) modConfig.get(IQEditController.CONFIG_KEY_RESULT_ON_HOME_PAGE);
boolean confEnableShowResultOnHomePage = (showResultOnHomePage != null) ? showResultOnHomePage.booleanValue() : false;
confEnableShowResultOnHomePage = !noSummary && confEnableShowResultOnHomePage;
showResultsOnHomePage = uifactory.addCheckboxesVertical("qti_enableResultsOnHomePage", "qti.form.results.onhomepage", formLayout, new String[]{"xx"}, new String[]{null}, 1);
showResultsOnHomePage = uifactory.addCheckboxesHorizontal("qti_enableResultsOnHomePage", "qti.form.results.onhomepage", formLayout, new String[]{"xx"}, new String[]{null});
showResultsOnHomePage.select("xx", confEnableShowResultOnHomePage);
showResultsOnHomePage.addActionListener(FormEvent.ONCLICK);
showResultsOnHomePage.setVisible(!isSurvey);
......@@ -324,7 +324,7 @@ public class IQ12EditForm extends FormBasicController {
showResultsDateDependent = showResultsActive.booleanValue();
}
showResultsDateDependentButton = uifactory.addCheckboxesVertical("qti_showresult", "qti.form.show.results", formLayout, new String[]{"xx"}, new String[]{null}, 1);
showResultsDateDependentButton = uifactory.addCheckboxesHorizontal("qti_showresult", "qti.form.show.results", formLayout, new String[]{"xx"}, new String[]{null});
if (isAssessment || isSelfTest) {
showResultsDateDependentButton.select("xx", showResultsDateDependent);
showResultsDateDependentButton.addActionListener(FormEvent.ONCLICK);
......@@ -346,7 +346,7 @@ public class IQ12EditForm extends FormBasicController {
Boolean showResultOnFinish = (Boolean) modConfig.get(IQEditController.CONFIG_KEY_RESULT_ON_FINISH);
boolean confEnableShowResultOnFinish = (showResultOnFinish != null) ? showResultOnFinish.booleanValue() : true;
confEnableShowResultOnFinish = !noSummary && confEnableShowResultOnFinish;
showResultsAfterFinishTest = uifactory.addCheckboxesVertical("qti_enableResultsOnFinish", "qti.form.results.onfinish", formLayout, new String[]{"xx"}, new String[]{null}, 1);
showResultsAfterFinishTest = uifactory.addCheckboxesHorizontal("qti_enableResultsOnFinish", "qti.form.results.onfinish", formLayout, new String[]{"xx"}, new String[]{null});
showResultsAfterFinishTest.select("xx", confEnableShowResultOnFinish);
showResultsAfterFinishTest.addActionListener(FormEvent.ONCLICK);
showResultsAfterFinishTest.setVisible(!isSurvey);
......
......@@ -21,11 +21,11 @@
#if($r.available("command.editRepFile"))
$r.render("command.editRepFile")
#end
<br />
#if ($showOutcomes)
<div class="o_block">
#o_togglebox_start("o_course_node_outcomes" $r.translate("outcomes.title"))
<table>
<table class="table table-condensed table-striped">
<tbody>
#foreach($key in $outcomes.keySet())
<tr><td>$key:</td><td>$outcomes.get($key)</td></tr>
......@@ -33,20 +33,23 @@
</tbody>
</table>
#o_togglebox_end()
</div>
#else
<table>
<tbody>
#if ($minscore)
<tr><td>$r.translate("score.min"):</td><td>$minscore</td></tr>
#end
#if ($maxscore)
<tr><td>$r.translate("score.max"):</td><td>$maxscore</td></tr>
#end
#if ($cutvalue)
<tr><td>$r.translate("score.cut"):</td><td>$cutvalue</td></tr>
#end
</tbody>
</table>
<div class="o_block">
<table class="table table-condensed table-striped">
<tbody>
#if ($minscore)
<tr><td>$r.translate("score.min"):</td><td>$minscore</td></tr>
#end
#if ($maxscore)
<tr><td>$r.translate("score.max"):</td><td>$maxscore</td></tr>
#end
#if ($cutvalue)
<tr><td>$r.translate("score.cut"):</td><td>$cutvalue</td></tr>
#end
</tbody>
</table>
</div>
#end
#else
<p>
......@@ -55,7 +58,7 @@
$r.render("command.chooseRepFile")
#end
</fieldset>
<div class="o_block">
<div class="o_block_large">
$r.render("filechoosecreateedit")
</div>
<fieldset>
......
......@@ -312,6 +312,8 @@ $fa-css-prefix: "o_icon" !default;
.o_forum_status_visible_icon:before { content: $fa-var-eye; color: $state-success-text}
/* tests icons */
.o_mi_qpool_import:before { content: $fa-var-database; }
.o_mi_qtisection:before { content: $fa-var-cubes; }
.o_mi_qtisc:before { content: $fa-var-dot-circle-o; }
.o_mi_qtimc:before { content: $fa-var-check-square-o; }
.o_mi_qtikprim:before { content: $fa-var-check-square; }
......
......@@ -10,8 +10,9 @@ td.o_qti_item_kprim_input, th.o_qti_item_kprim_input {
}
}
.o_qti_item_mattext {
line-height:2.5em;
/* space in menu between sections */
div.o_qti_menu_section {
margin-top: $padding-large-vertical;
}
div.o_qti_item_itemfeedback {
......
......@@ -12,12 +12,27 @@
/* Buttons */
.o_button_dirty {
text-shadow: 0 -1px 0 rgba(0,0,0,.2);
$shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);
@include box-shadow($shadow);
// Reset the shadow
&:active,
&.active {
@include box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
}
@include btn-styles($o-button-dirty-bg);
}
/* remove text-shadow, barely readable because of small font */
.o_login_providers .btn-default {
text-shadow: none;
/* remove text-shadow on default buttons in conjunction with other button styles */
.btn-default {
&.btn-success,
&.btn-info,
&.btn-warning,
&.btn-danger,
&.btn-primary,
&.o_button_dirty {
text-shadow: none;
}
}
......
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment