editor: edumed exercises - visual tweaks
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Wed, 6 Aug 2014 14:03:16 +0000 (16:03 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Thu, 14 Aug 2014 14:26:14 +0000 (16:26 +0200)
src/editor/plugins/core/edumed/choice/choiceBase.js
src/editor/plugins/core/edumed/choice/list.js
src/editor/plugins/core/edumed/edumed.less
src/editor/plugins/core/edumed/gaps/element.js
src/editor/plugins/core/edumed/order/element.js
src/editor/plugins/core/edumed/order/order.less
src/editor/plugins/core/edumed/order/view.js
src/editor/plugins/core/edumed/replace/element.js

index eaf1c7c..aeafed4 100644 (file)
@@ -16,6 +16,7 @@ _.extend(choiceBase, {
         this._container().append(this.view);
 
         this.createContainer(this.wlxmlNode.contents().filter(function(n) {return !n.is('list');}), {
+            resetBackground: true,
             manages: function(node, removedFrom) {
                 if(node.is('list.orderable')) {
                     return false;
index e3fbd84..9174710 100644 (file)
@@ -74,6 +74,7 @@ var ItemView = function(node, exerciseView) {
     this.dom = $(_.template(viewItemTemplate)());
 
     this.container = exerciseView.element.createContainer(node.contents(), {
+        resetBackground: true,
         manages: function(node, originaParent) {
             return this.node.sameNode(node.parent() || originaParent);
         }.bind(this),
index b78f792..fc79e39 100644 (file)
@@ -4,7 +4,7 @@
 @import 'choice/choice.less';
 
 .edumed-exercise {
-
+    background-color: @grayLighter;
     border: 1px lighten(#000, 35%) dashed;
     margin: 15px 0;
     padding: 10px;
@@ -13,6 +13,7 @@
         font-weight: bold;
         font-variant: small-caps;
         margin-bottom: 10px;
+        background-color: @grayLighter;;
     }
 
     .btn {
index 294ac0a..db8d0c5 100644 (file)
@@ -16,6 +16,7 @@ _.extend(OrderExerciceElement, {
         this._container().append(view);
 
         this.createContainer(this.wlxmlNode.contents(), {
+            resetBackground: true,
             manages: function() {
                 return true;
             },
index b113199..a81155e 100644 (file)
@@ -55,6 +55,7 @@ _.extend(OrderExerciceElement, {
 
         var exerciseNode = this.wlxmlNode;
         this.createContainer(this.wlxmlNode.object.getDescription(), {
+            resetBackground: true,
             manages: function(node, removedFrom) {
                 if(node.is('list.orderable')) {
                     return false;
index b407259..67de8bc 100644 (file)
@@ -1,3 +1,4 @@
+@exercise-order-gray: darken(#ddd, 15%);
 .exercise-order {
     
     overflow-x: hidden;
@@ -29,7 +30,7 @@
         vertical-align: middle;
         display: table-cell;
         width: 20px;
-        background-color: darken(#ddd, 15%);
+        background-color: @exercise-order-gray;
         text-align: center;
         border-radius: 0 5px 5px 0;
         padding: 10px 10px;
@@ -43,7 +44,7 @@
     .placeholder {
         height: 10px;
         transition: height 0.05s;
-        background-color: white;
+        background-color: transparent;
         &.active {
             height: 60px;
             transition: height 0.05s;
@@ -63,4 +64,8 @@
             opacity: 0.6;
         }
     }
+
+    .nav-tabs > .active > a {
+        background-color: @exercise-order-gray;
+    }
 }
\ No newline at end of file
index 2b824cf..8905e7a 100644 (file)
@@ -189,6 +189,7 @@ var ItemView = function(item, exerciseView) {
 
     var content = this.content;
     this.container = exerciseView.element.createContainer(item.node.contents(), {
+        resetBackground: true,
         manages: function(node, originaParent) {
             return item.node.sameNode(node.parent() || originaParent);
         },
index 128fe50..f4157d2 100644 (file)
@@ -49,6 +49,7 @@ _.extend(ReplaceExerciseElement, {
         );
 
         this.createContainer(this.wlxmlNode.contents(), {
+            resetBackground: true,
             manages: function() {
                 return true;
             },