summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimur Sufiev <tsufiev@mirantis.com>2015-07-29 15:12:01 +0300
committerTimur Sufiev <tsufiev@mirantis.com>2015-08-05 10:12:20 +0000
commit950164bbc168077dfa265a16e15e6f88d3199dc3 (patch)
tree14aa38815d58f58c4f99ca53c0bd1df37f519aba
parentb9e6ccb3eae763f88e8dc800cbe25bd7f748769c (diff)
Remove obsolete 'group' mixin files and references
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:38:53 +0000 Reviewed-on: https://review.openstack.org/209234 Project: stackforge/merlin Branch: refs/heads/master
-rw-r--r--merlin/static/merlin/js/merlin.field.models.js13
-rw-r--r--merlin/static/merlin/js/merlin.panel.models.js52
-rw-r--r--merlin/templates/merlin/base.html1
3 files changed, 2 insertions, 64 deletions
diff --git a/merlin/static/merlin/js/merlin.field.models.js b/merlin/static/merlin/js/merlin.field.models.js
index 2d1cf08..b31a27c 100644
--- a/merlin/static/merlin/js/merlin.field.models.js
+++ b/merlin/static/merlin/js/merlin.field.models.js
@@ -6,9 +6,9 @@
6 .module('merlin') 6 .module('merlin')
7 .factory('merlin.field.models', merlinFieldModels); 7 .factory('merlin.field.models', merlinFieldModels);
8 8
9 merlinFieldModels.$inject = ['merlin.utils', 'merlin.panel.models', '$http']; 9 merlinFieldModels.$inject = ['merlin.utils'];
10 10
11 function merlinFieldModels(utils, panels, $http) { 11 function merlinFieldModels(utils) {
12 var wildcardMixin = Barricade.Blueprint.create(function() { 12 var wildcardMixin = Barricade.Blueprint.create(function() {
13 return this; 13 return this;
14 }); 14 });
@@ -134,12 +134,6 @@
134 return this; 134 return this;
135 }); 135 });
136 136
137 function meldGroup() {
138 if ( utils.getMeta(this, 'group') ) {
139 panels.groupmixin.call(this);
140 }
141 }
142
143 var stringModel = Barricade.Primitive.extend({ 137 var stringModel = Barricade.Primitive.extend({
144 create: function(json, parameters) { 138 create: function(json, parameters) {
145 var self = Barricade.Primitive.create.call(this, json, parameters); 139 var self = Barricade.Primitive.create.call(this, json, parameters);
@@ -170,7 +164,6 @@
170 self.add = function() { 164 self.add = function() {
171 self.push(undefined, parameters); 165 self.push(undefined, parameters);
172 }; 166 };
173 meldGroup.call(self);
174 plainStructureMixin.call(self); 167 plainStructureMixin.call(self);
175 return self; 168 return self;
176 } 169 }
@@ -181,7 +174,6 @@
181 var self = Barricade.ImmutableObject.create.call(this, json, parameters); 174 var self = Barricade.ImmutableObject.create.call(this, json, parameters);
182 175
183 modelMixin.call(self, 'frozendict'); 176 modelMixin.call(self, 'frozendict');
184 meldGroup.call(self);
185 plainStructureMixin.call(self); 177 plainStructureMixin.call(self);
186 return self; 178 return self;
187 } 179 }
@@ -245,7 +237,6 @@
245 self.removeItem = function(key) { 237 self.removeItem = function(key) {
246 self.remove(self.getPosByID(key)); 238 self.remove(self.getPosByID(key));
247 }; 239 };
248 meldGroup.call(self);
249 return self; 240 return self;
250 } 241 }
251 }, {'@type': Object}); 242 }, {'@type': Object});
diff --git a/merlin/static/merlin/js/merlin.panel.models.js b/merlin/static/merlin/js/merlin.panel.models.js
deleted file mode 100644
index b37ca43..0000000
--- a/merlin/static/merlin/js/merlin.panel.models.js
+++ /dev/null
@@ -1,52 +0,0 @@
1/**
2 * Created by tsufiev on 2/24/15.
3 */
4(function() {
5 'use strict';
6
7 angular
8 .module('merlin')
9 .factory('merlin.panel.models', merlinPanelModels);
10
11 merlinPanelModels.$inject = ['merlin.utils'];
12
13 function merlinPanelModels(utils) {
14 var groupMixin = Barricade.Blueprint.create(function() {
15 var self = this;
16 var additive = utils.getMeta(self, 'additive');
17 var removable = utils.getMeta(self, 'removable');
18
19 if ( angular.isUndefined(additive) ) {
20 additive = true;
21 }
22 self.isAdditive = function() {
23 return additive;
24 };
25
26 if ( angular.isUndefined(removable) ) {
27 removable = false;
28 }
29 self.isRemovable = function() {
30 return removable;
31 };
32
33 if ( removable ) { // conditionally override common .title()
34 self.title = function() {
35 if ( arguments.length ) {
36 self.setID(arguments[0]);
37 } else {
38 return self.getID();
39 }
40 };
41 }
42
43 self.setType('group');
44
45 return self;
46 });
47
48 return {
49 groupmixin: groupMixin
50 };
51 }
52})();
diff --git a/merlin/templates/merlin/base.html b/merlin/templates/merlin/base.html
index 785b0ad..c0f8afd 100644
--- a/merlin/templates/merlin/base.html
+++ b/merlin/templates/merlin/base.html
@@ -11,7 +11,6 @@
11 <script type="text/javascript" src="{{ STATIC_URL }}merlin/js/merlin.filters.js"></script> 11 <script type="text/javascript" src="{{ STATIC_URL }}merlin/js/merlin.filters.js"></script>
12 <script type="text/javascript" src="{{ STATIC_URL }}merlin/js/merlin.directives.js"></script> 12 <script type="text/javascript" src="{{ STATIC_URL }}merlin/js/merlin.directives.js"></script>
13 <script type="text/javascript" src="{{ STATIC_URL }}merlin/js/merlin.field.models.js"></script> 13 <script type="text/javascript" src="{{ STATIC_URL }}merlin/js/merlin.field.models.js"></script>
14 <script type="text/javascript" src="{{ STATIC_URL }}merlin/js/merlin.panel.models.js"></script>
15 <script type="text/javascript" src="{{ STATIC_URL }}merlin/js/merlin.utils.js"></script> 14 <script type="text/javascript" src="{{ STATIC_URL }}merlin/js/merlin.utils.js"></script>
16 {% block merlin-js %}{% endblock %} 15 {% block merlin-js %}{% endblock %}
17{% endblock %} 16{% endblock %}