Index: lams_central/web/ckeditor/plugins/confighelper/plugin.js
===================================================================
diff -u -rc2dd5ccedb6cfa8bb4df16752c99c2c2d13478a0 -r78ae88b9a7c79f31eb1f795d084be7d283963885
--- lams_central/web/ckeditor/plugins/confighelper/plugin.js (.../plugin.js) (revision c2dd5ccedb6cfa8bb4df16752c99c2c2d13478a0)
+++ lams_central/web/ckeditor/plugins/confighelper/plugin.js (.../plugin.js) (revision 78ae88b9a7c79f31eb1f795d084be7d283963885)
@@ -176,6 +176,7 @@
editor.on('mode', addPlaceholder, null, placeholder);
editor.on('contentDom', addPlaceholder, null, placeholder);
+ //**LAMS** commented out the following line
editor.on('focus', removePlaceholder);
editor.on('key', removePlaceholder);
editor.on('beforeModeUnload', removePlaceholder);
Index: lams_central/web/includes/javascript/ckconfig_custom.js
===================================================================
diff -u -ra6c94a5454507a7c6502caf4c054000f36cc6778 -r78ae88b9a7c79f31eb1f795d084be7d283963885
--- lams_central/web/includes/javascript/ckconfig_custom.js (.../ckconfig_custom.js) (revision a6c94a5454507a7c6502caf4c054000f36cc6778)
+++ lams_central/web/includes/javascript/ckconfig_custom.js (.../ckconfig_custom.js) (revision 78ae88b9a7c79f31eb1f795d084be7d283963885)
@@ -146,15 +146,19 @@
// Hides editor instaces until they are fully initialized
CKEDITOR.on('instanceCreated', function(e){
- e.editor.element.$.style.display = 'none';
+ //e.editor.element.$.style.display = 'none';
});
CKEDITOR.on('instanceReady', function(e){
//add custom classes
var classes = e.editor.config.classes;
if (classes) {
- e.editor._.editable.$.classList.add(classes);
+ for (classIter of classes.split(' ')) {
+ if (classIter) {
+ e.editor._.editable.$.classList.add(classIter);
+ }
+ }
}
var height = e.editor.config.height;
@@ -180,4 +184,16 @@
f.data.dataValue = tempDiv.innerHTML;
});
+
+ //add cke_filled class, when editor gets filled
+ e.editor.on('change', function(event) {
+ var ckeditorData = event.editor.getData();
+
+ var isEmpty = (ckeditorData == null) || (ckeditorData.replace(/ | |
|\s|
|<\/p>|\xa0/g, "").length == 0);
+ if (isEmpty) {
+ event.editor._.editable.$.classList.remove("cke_filled");
+ } else {
+ event.editor._.editable.$.classList.add("cke_filled");
+ }
+ });
});
Index: lams_tool_assessment/web/WEB-INF/tags/CKEditor.tag
===================================================================
diff -u -r8a65083cf102509e0ca486f636746f56a600c514 -r78ae88b9a7c79f31eb1f795d084be7d283963885
--- lams_tool_assessment/web/WEB-INF/tags/CKEditor.tag (.../CKEditor.tag) (revision 8a65083cf102509e0ca486f636746f56a600c514)
+++ lams_tool_assessment/web/WEB-INF/tags/CKEditor.tag (.../CKEditor.tag) (revision 78ae88b9a7c79f31eb1f795d084be7d283963885)
@@ -6,6 +6,7 @@
<%@ attribute name="placeholder" required="false" rtexprvalue="true"%>
<%@ attribute name="value" required="true" rtexprvalue="true"%>
<%@ attribute name="toolbarSet" required="false" rtexprvalue="true"%>
+<%@ attribute name="classes" required="false" rtexprvalue="true"%>
<%@ attribute name="height" required="false" rtexprvalue="true"%>
<%@ attribute name="width" required="false" rtexprvalue="true"%>
<%@ attribute name="contentFolderID" required="false" rtexprvalue="true"%>
@@ -40,8 +41,18 @@
-
+
+
+
+
+
+
+
+
+
+
+
/lams/ckeditor/
@@ -70,6 +81,7 @@
width : "${width}",
height : "${height}",
toolbar : "${toolbarSet}",
+ classes : "${classes}",
language : "${language}",
defaultLangugage : "en",
toolbarStartupExpanded : ${displayExpanded},
Index: lams_tool_assessment/web/includes/css/addQuestion.scss
===================================================================
diff -u -r8da56e9b473a1e97a58043ebaec2c4cadb7d5129 -r78ae88b9a7c79f31eb1f795d084be7d283963885
--- lams_tool_assessment/web/includes/css/addQuestion.scss (.../addQuestion.scss) (revision 8da56e9b473a1e97a58043ebaec2c4cadb7d5129)
+++ lams_tool_assessment/web/includes/css/addQuestion.scss (.../addQuestion.scss) (revision 78ae88b9a7c79f31eb1f795d084be7d283963885)
@@ -17,7 +17,7 @@
padding-left: 0;
}
.short-input-text {
- width:10% !important;
+ max-width: 100px;
}
#max-words-limit-checkbox, #min-words-limit-checkbox {
@@ -37,8 +37,17 @@
#hasOptionFilled-error {
display: table;
}
+i.fa-asterisk.text-danger {
+ vertical-align: super;
+}
/* overwriting bootstrap values */
+.checkbox + .checkbox, .radio + .radio {
+ margin-top: 0;
+}
+.checkbox, .radio {
+ margin-bottom: 15px;
+}
.panel {
margin-bottom: 0 !important;
}
@@ -133,14 +142,6 @@
visibility:visible;
}
-/* hover effect for options area */
-.delete-button, .settings-on-hover-hidden{
- visibility:hidden;
-}
-#option-table.hover-active tr:hover .delete-button, #option-table.hover-active tr:hover .settings-on-hover-hidden {
- visibility:visible;
-}
-
/* Overwrite default CKEditor style */
div[contenteditable] {
display: block;
@@ -220,11 +221,12 @@
/*----------SLIDER----------------*/
.ui-widget-content.ui-slider {
- border: 0.03em solid #bdc3c7;
+ border: 0.02em solid #bdc3c7;
background: #e1e1e1;
color: #222222;
- margin-top: -0.03em;
+ margin-top: -0.02em;
padding: 0.08em;
+ opacity:0.8;
}
.ui-state-default, .ui-widget-content.ui-slider .ui-state-default{
@@ -287,4 +289,32 @@
.grade-slider>div:first-child {
margin-top: -7px;
padding: 0;
+}
+
+/*----------CKEDITOR FLOATING LABEL----------------*/
+
+.cke-div {
+ position: relative;
+}
+
+/*
+div[contenteditable].placeholder-shown {
+ margin-top: 22px;
+}*/
+
+.cke-label-floating {
+ will-change: left,top,contents;
+ margin: 0;
+ line-height: 1.4;
+ font-weight: 400;
+ position: absolute;
+ pointer-events: none;
+ transition: all .3s ease;
+ color: #999 !important;
+ top: 0;
+}
+div[contenteditable]:focus + .cke-label-floating, div[contenteditable].cke_filled + .cke-label-floating {
+ top: -1rem;
+ left: 0;
+ font-size: .9rem;
}
\ No newline at end of file
Index: lams_tool_assessment/web/includes/css/assessment.scss
===================================================================
diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r78ae88b9a7c79f31eb1f795d084be7d283963885
--- lams_tool_assessment/web/includes/css/assessment.scss (.../assessment.scss) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80)
+++ lams_tool_assessment/web/includes/css/assessment.scss (.../assessment.scss) (revision 78ae88b9a7c79f31eb1f795d084be7d283963885)
@@ -1,10 +1,5 @@
@import "_lams_variables.scss";
-#overall-feedback {
- margin-left: 23px;
- margin-top: 10px;
-}
-
.innerforms {
border: 0px;
font-size: small;
Index: lams_tool_assessment/web/includes/javascript/authoring-options.js
===================================================================
diff -u -r8a65083cf102509e0ca486f636746f56a600c514 -r78ae88b9a7c79f31eb1f795d084be7d283963885
--- lams_tool_assessment/web/includes/javascript/authoring-options.js (.../authoring-options.js) (revision 8a65083cf102509e0ca486f636746f56a600c514)
+++ lams_tool_assessment/web/includes/javascript/authoring-options.js (.../authoring-options.js) (revision 78ae88b9a7c79f31eb1f795d084be7d283963885)
@@ -60,7 +60,6 @@
}
function initializeAnswers() {
-
//check if jquery-ui.slider.js library is loaded
if (typeof(jQuery.ui.slider) != 'undefined'){
@@ -112,14 +111,14 @@
direction: 'vertical',
onStart: function (evt) {
//stop answers' hover effect, once element dragging started
- $("#option-table").removeClass("hover-active");
+ //$("#option-table").removeClass("hover-active");
},
onEnd: function (evt) {
//activate answers' hover effect, once element dragging ended
- $("#option-table").delay(50).queue(function(next){
- $(this).addClass("hover-active");
- next();
- });
+ //$("#option-table").delay(50).queue(function(next){
+ // $(this).addClass("hover-active");
+ // next();
+ //});
},
store: {
set: function (sortable) {
Index: lams_tool_assessment/web/pages/authoring/parts/addessay.jsp
===================================================================
diff -u -r8da56e9b473a1e97a58043ebaec2c4cadb7d5129 -r78ae88b9a7c79f31eb1f795d084be7d283963885
--- lams_tool_assessment/web/pages/authoring/parts/addessay.jsp (.../addessay.jsp) (revision 8da56e9b473a1e97a58043ebaec2c4cadb7d5129)
+++ lams_tool_assessment/web/pages/authoring/parts/addessay.jsp (.../addessay.jsp) (revision 78ae88b9a7c79f31eb1f795d084be7d283963885)
@@ -131,7 +131,7 @@
placeholder="${TITLE_LABEL}"/>
-