summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimur Sufiev <tsufiev@mirantis.com>2015-07-29 17:52:33 +0300
committerTimur Sufiev <tsufiev@mirantis.com>2015-08-05 10:12:31 +0000
commitc25b7d85076a574198ca91b1fbd13070c73618f9 (patch)
tree9f725fb4b8d7c6852c1a79d042f15580296650ac
parent950164bbc168077dfa265a16e15e6f88d3199dc3 (diff)
Use standard modelMixin instead of fields.wildcard
Call it fields.generic in exports - it has the same meaning for merlin code (any field that Merlin provides), less code the better. Change-Id: Id2eb8fbfa477c014f6e6eebdd9fb0e4298bb029c
Notes
Notes (review): Verified+2: Jenkins Code-Review+2: Timur Sufiev <tsufiev@mirantis.com> Workflow+1: Timur Sufiev <tsufiev@mirantis.com> Submitted-by: Jenkins Submitted-at: Wed, 05 Aug 2015 10:41:25 +0000 Reviewed-on: https://review.openstack.org/209235 Project: stackforge/merlin Branch: refs/heads/master
-rw-r--r--extensions/mistral/static/mistral/js/mistral.workbook.models.js2
-rw-r--r--merlin/static/merlin/js/merlin.field.models.js7
2 files changed, 2 insertions, 7 deletions
diff --git a/extensions/mistral/static/mistral/js/mistral.workbook.models.js b/extensions/mistral/static/mistral/js/mistral.workbook.models.js
index 5f403eb..e11089d 100644
--- a/extensions/mistral/static/mistral/js/mistral.workbook.models.js
+++ b/extensions/mistral/static/mistral/js/mistral.workbook.models.js
@@ -84,7 +84,7 @@
84 }) 84 })
85 }, 85 },
86 'value': { 86 'value': {
87 '@class': fields.wildcard, 87 '@class': fields.generic,
88 '@factory': varlistValueFactory 88 '@factory': varlistValueFactory
89 } 89 }
90 }) 90 })
diff --git a/merlin/static/merlin/js/merlin.field.models.js b/merlin/static/merlin/js/merlin.field.models.js
index b31a27c..0951b59 100644
--- a/merlin/static/merlin/js/merlin.field.models.js
+++ b/merlin/static/merlin/js/merlin.field.models.js
@@ -9,10 +9,6 @@
9 merlinFieldModels.$inject = ['merlin.utils']; 9 merlinFieldModels.$inject = ['merlin.utils'];
10 10
11 function merlinFieldModels(utils) { 11 function merlinFieldModels(utils) {
12 var wildcardMixin = Barricade.Blueprint.create(function() {
13 return this;
14 });
15
16 var viewChoicesMixin = Barricade.Blueprint.create(function() { 12 var viewChoicesMixin = Barricade.Blueprint.create(function() {
17 var self = this; 13 var self = this;
18 var dropDownLimit = this._dropDownLimit || 5; 14 var dropDownLimit = this._dropDownLimit || 5;
@@ -127,7 +123,6 @@
127 } 123 }
128 return title; 124 return title;
129 }; 125 };
130 wildcardMixin.call(this);
131 if ( this.getEnumValues ) { 126 if ( this.getEnumValues ) {
132 viewChoicesMixin.call(this); 127 viewChoicesMixin.call(this);
133 } 128 }
@@ -290,7 +285,7 @@
290 linkedcollection: linkedCollectionModel, 285 linkedcollection: linkedCollectionModel,
291 dictionary: dictionaryModel, 286 dictionary: dictionaryModel,
292 frozendict: frozendictModel, 287 frozendict: frozendictModel,
293 wildcard: wildcardMixin // use for most general type-checks 288 generic: modelMixin // use for most general type-checks
294 }; 289 };
295 } 290 }
296})(); 291})();