From: Aleksander Ɓukasz Date: Wed, 6 Aug 2014 12:30:29 +0000 (+0200) Subject: editor: Missing names of exercises on a canvas X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/c654f07dd8b596abc328f1f57beef06bffa63149?hp=88afe908cdc2cd584c551730a98d1b312df48958 editor: Missing names of exercises on a canvas --- diff --git a/src/editor/plugins/core/edumed/choice/choiceBase.js b/src/editor/plugins/core/edumed/choice/choiceBase.js index 3bd6ed5..eaf1c7c 100644 --- a/src/editor/plugins/core/edumed/choice/choiceBase.js +++ b/src/editor/plugins/core/edumed/choice/choiceBase.js @@ -12,7 +12,7 @@ var choiceBase = Object.create(elementBase); _.extend(choiceBase, { init: function() { elementBase.init.call(this); - this.view = $(_.template(template)({type: this.type})); + this.view = $(_.template(template)({type: this.type, name: this.name})); this._container().append(this.view); this.createContainer(this.wlxmlNode.contents().filter(function(n) {return !n.is('list');}), { diff --git a/src/editor/plugins/core/edumed/choice/choiceMulti.js b/src/editor/plugins/core/edumed/choice/choiceMulti.js index a05346c..0983930 100644 --- a/src/editor/plugins/core/edumed/choice/choiceMulti.js +++ b/src/editor/plugins/core/edumed/choice/choiceMulti.js @@ -13,6 +13,7 @@ var $ = require('libs/jquery'), var choiceMulti = Object.create(choiceBase); _.extend(choiceMulti, { type: 'multi', + name: gettext('Multiple Choice'), createListView: function(listNode) { return new ListView(this, listNode, { onItemViewAdded: function(itemView) { diff --git a/src/editor/plugins/core/edumed/choice/choiceSingle.js b/src/editor/plugins/core/edumed/choice/choiceSingle.js index 9346363..6824d44 100644 --- a/src/editor/plugins/core/edumed/choice/choiceSingle.js +++ b/src/editor/plugins/core/edumed/choice/choiceSingle.js @@ -13,6 +13,7 @@ var $ = require('libs/jquery'), var choiceSingle = Object.create(choiceBase); _.extend(choiceSingle, { type: 'single', + name: gettext('Single Choice'), init: function() { this._comboName = _.uniqueId('edumed_exercise_hash_'); choiceBase.init.call(this); diff --git a/src/editor/plugins/core/edumed/choice/choiceTrueOrFalse.js b/src/editor/plugins/core/edumed/choice/choiceTrueOrFalse.js index 7ac0470..86fe809 100644 --- a/src/editor/plugins/core/edumed/choice/choiceTrueOrFalse.js +++ b/src/editor/plugins/core/edumed/choice/choiceTrueOrFalse.js @@ -14,6 +14,7 @@ var $ = require('libs/jquery'), var trueOrFalse = Object.create(choiceBase); _.extend(trueOrFalse, { type: 'true-or-false', + name: 'True or False', createListView: function(listNode) { return new ListView(this, listNode, { onItemViewAdded: function(itemView) { diff --git a/src/editor/plugins/core/edumed/choice/element.html b/src/editor/plugins/core/edumed/choice/element.html index ba4bdd0..665d957 100644 --- a/src/editor/plugins/core/edumed/choice/element.html +++ b/src/editor/plugins/core/edumed/choice/element.html @@ -1,5 +1,5 @@
-
<%= gettext('Exercise') %>: <%= type %>
+
<%= gettext('Exercise') %>: <%= name %>
\ No newline at end of file diff --git a/src/editor/plugins/core/edumed/gaps/view.html b/src/editor/plugins/core/edumed/gaps/view.html index bd1552e..7d4210b 100644 --- a/src/editor/plugins/core/edumed/gaps/view.html +++ b/src/editor/plugins/core/edumed/gaps/view.html @@ -1,4 +1,4 @@
-
<%= gettext('Exercise') %>
+
<%= gettext('Exercise') %>: <%= gettext('Gaps') %>
\ No newline at end of file diff --git a/src/editor/plugins/core/edumed/order/view.html b/src/editor/plugins/core/edumed/order/view.html index 492b8f4..561de89 100644 --- a/src/editor/plugins/core/edumed/order/view.html +++ b/src/editor/plugins/core/edumed/order/view.html @@ -1,5 +1,5 @@
-
<%= gettext('Exercise') %>
+
<%= gettext('Exercise') %>: <%= gettext('Order') %>