From: Aleksander Ɓukasz Date: Wed, 6 Aug 2014 14:03:16 +0000 (+0200) Subject: editor: edumed exercises - visual tweaks X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/ac50cae92710f684c801ad933b924de2bec2b460?ds=inline editor: edumed exercises - visual tweaks --- diff --git a/src/editor/plugins/core/edumed/choice/choiceBase.js b/src/editor/plugins/core/edumed/choice/choiceBase.js index eaf1c7c..aeafed4 100644 --- a/src/editor/plugins/core/edumed/choice/choiceBase.js +++ b/src/editor/plugins/core/edumed/choice/choiceBase.js @@ -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; diff --git a/src/editor/plugins/core/edumed/choice/list.js b/src/editor/plugins/core/edumed/choice/list.js index e3fbd84..9174710 100644 --- a/src/editor/plugins/core/edumed/choice/list.js +++ b/src/editor/plugins/core/edumed/choice/list.js @@ -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), diff --git a/src/editor/plugins/core/edumed/edumed.less b/src/editor/plugins/core/edumed/edumed.less index b78f792..fc79e39 100644 --- a/src/editor/plugins/core/edumed/edumed.less +++ b/src/editor/plugins/core/edumed/edumed.less @@ -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 { diff --git a/src/editor/plugins/core/edumed/gaps/element.js b/src/editor/plugins/core/edumed/gaps/element.js index 294ac0a..db8d0c5 100644 --- a/src/editor/plugins/core/edumed/gaps/element.js +++ b/src/editor/plugins/core/edumed/gaps/element.js @@ -16,6 +16,7 @@ _.extend(OrderExerciceElement, { this._container().append(view); this.createContainer(this.wlxmlNode.contents(), { + resetBackground: true, manages: function() { return true; }, diff --git a/src/editor/plugins/core/edumed/order/element.js b/src/editor/plugins/core/edumed/order/element.js index b113199..a81155e 100644 --- a/src/editor/plugins/core/edumed/order/element.js +++ b/src/editor/plugins/core/edumed/order/element.js @@ -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; diff --git a/src/editor/plugins/core/edumed/order/order.less b/src/editor/plugins/core/edumed/order/order.less index b407259..67de8bc 100644 --- a/src/editor/plugins/core/edumed/order/order.less +++ b/src/editor/plugins/core/edumed/order/order.less @@ -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 diff --git a/src/editor/plugins/core/edumed/order/view.js b/src/editor/plugins/core/edumed/order/view.js index 2b824cf..8905e7a 100644 --- a/src/editor/plugins/core/edumed/order/view.js +++ b/src/editor/plugins/core/edumed/order/view.js @@ -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); }, diff --git a/src/editor/plugins/core/edumed/replace/element.js b/src/editor/plugins/core/edumed/replace/element.js index 128fe50..f4157d2 100644 --- a/src/editor/plugins/core/edumed/replace/element.js +++ b/src/editor/plugins/core/edumed/replace/element.js @@ -49,6 +49,7 @@ _.extend(ReplaceExerciseElement, { ); this.createContainer(this.wlxmlNode.contents(), { + resetBackground: true, manages: function() { return true; },