neo4j-meta_model 0.3.5 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +16 -0
- data/app/assets/javascripts/ember-src.js +2086 -0
- data/app/assets/javascripts/meta_model.js.coffee +2 -225
- data/app/assets/javascripts/meta_model/app.js +2122 -0
- data/app/assets/javascripts/meta_model/app.map +1 -0
- data/app/assets/javascripts/meta_model/ember-src.map +1 -0
- data/app/assets/javascripts/meta_model/vendor.js +73754 -0
- data/app/assets/javascripts/meta_model/vendor.map +1 -0
- data/app/serializers/neo4j/meta_model/model_serializer.rb +1 -1
- data/lib/neo4j/meta_model/engine.rb +5 -4
- data/lib/neo4j/meta_model/version.rb +1 -1
- metadata +11 -59
- data/app/assets/javascripts/admin/models.js.coffee +0 -25
- data/app/assets/javascripts/router.js.coffee +0 -5
- data/app/assets/javascripts/store.js.coffee +0 -12
- data/app/assets/javascripts/templates/application.emblem +0 -3
- data/app/assets/javascripts/templates/components/has-association-diagram.emblem +0 -22
- data/app/assets/javascripts/templates/components/model-list-item.emblem +0 -6
- data/app/assets/javascripts/templates/components/model-list.emblem +0 -4
- data/app/assets/javascripts/templates/has_associations/index.emblem +0 -7
- data/app/assets/javascripts/templates/has_associations/new.emblem +0 -62
- data/app/assets/javascripts/templates/index.emblem +0 -6
- data/app/assets/javascripts/templates/models/edit.emblem +0 -44
- data/app/assets/javascripts/templates/models/hierarchy.emblem +0 -12
@@ -1,225 +1,2 @@
|
|
1
|
-
#= require
|
2
|
-
#= require
|
3
|
-
#= require jquery_ujs
|
4
|
-
#= require handlebars
|
5
|
-
#= require ember
|
6
|
-
#= require ember-data
|
7
|
-
|
8
|
-
|
9
|
-
#= require sightglass
|
10
|
-
#= require rivets
|
11
|
-
#= require backbone
|
12
|
-
#= require rivets-backbone
|
13
|
-
|
14
|
-
|
15
|
-
#= require ./store
|
16
|
-
#= require_tree ./templates
|
17
|
-
#= require ./router
|
18
|
-
#= require_self
|
19
|
-
|
20
|
-
mm_path = (path) ->
|
21
|
-
base_path = meta_model_root_path
|
22
|
-
|
23
|
-
base_path = base_path[0..-2] if base_path[-1..-1] is '/'
|
24
|
-
|
25
|
-
p = path
|
26
|
-
p = p[1..-1] if p[0] is '/'
|
27
|
-
|
28
|
-
base_path + '/' + p
|
29
|
-
|
30
|
-
ready = ->
|
31
|
-
if $('#ember-application').length
|
32
|
-
# for more details see: http://emberjs.com/guides/application/
|
33
|
-
window.MetaModel = Ember.Application.create(rootElement: '#ember-application')
|
34
|
-
|
35
|
-
MetaModel.ApplicationController = Ember.Controller.extend()
|
36
|
-
|
37
|
-
MetaModel.Model = DS.Model.extend()
|
38
|
-
|
39
|
-
console.log {path: mm_path('meta')[1..-1]}
|
40
|
-
MetaModel.MetaModelAdapter = DS.RESTAdapter.extend
|
41
|
-
namespace: mm_path('meta')[1..-1]
|
42
|
-
|
43
|
-
MetaModel.ModelAdapter = MetaModel.MetaModelAdapter.extend()
|
44
|
-
MetaModel.PropertyAdapter = MetaModel.MetaModelAdapter.extend()
|
45
|
-
|
46
|
-
MetaModel.HasAssociationAdapter = MetaModel.MetaModelAdapter.extend
|
47
|
-
buildURL: (type, id, record) ->
|
48
|
-
result = "/meta/has_associations"
|
49
|
-
result += "/#{id}" if id
|
50
|
-
mm_path result
|
51
|
-
|
52
|
-
|
53
|
-
MetaModel.Router.map ->
|
54
|
-
@route 'index', path: "/"
|
55
|
-
|
56
|
-
@resource 'models', path: '/models', ->
|
57
|
-
@route 'hierarchy', path: "/"
|
58
|
-
@route 'edit', path: "/:class_name/edit"
|
59
|
-
|
60
|
-
@resource 'has_associations', ->
|
61
|
-
@route 'index', path: '/'
|
62
|
-
@route 'new', path: '/new'
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
MetaModel.ApplicationAdapter = DS.ActiveModelAdapter.extend()
|
67
|
-
|
68
|
-
MetaModel.ApplicationSerializer = DS.ActiveModelSerializer.extend()
|
69
|
-
|
70
|
-
# Components
|
71
|
-
|
72
|
-
MetaModel.FocusInputComponent = Ember.TextField.extend
|
73
|
-
becomeFocused: (->
|
74
|
-
@$().focus()
|
75
|
-
).on('didInsertElement')
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
MetaModel.ModelListItemComponent = Ember.Component.extend
|
80
|
-
action: 'meta_model_clicked'
|
81
|
-
actions:
|
82
|
-
clicked: ->
|
83
|
-
@sendAction 'action', @get('model')
|
84
|
-
goto_metamodel: (model) ->
|
85
|
-
@sendAction 'action', model
|
86
|
-
|
87
|
-
MetaModel.ModelListComponent = Ember.Component.extend
|
88
|
-
action: 'goto_metamodel'
|
89
|
-
actions:
|
90
|
-
meta_model_clicked: (model) ->
|
91
|
-
@sendAction 'action', model
|
92
|
-
|
93
|
-
|
94
|
-
# Models
|
95
|
-
|
96
|
-
MetaModel.Property = DS.Model.extend
|
97
|
-
name: DS.attr 'string'
|
98
|
-
type: DS.attr 'string'
|
99
|
-
model: DS.belongsTo 'Model', inverse: 'properties'
|
100
|
-
|
101
|
-
MetaModel.Model = DS.Model.extend
|
102
|
-
class_name: DS.attr 'string'
|
103
|
-
superclass_model: DS.belongsTo 'Model'
|
104
|
-
#superclass_model: DS.attr 'string'
|
105
|
-
properties: DS.hasMany 'Property'
|
106
|
-
id_property: DS.belongsTo 'Property'
|
107
|
-
source_has_associations: DS.hasMany 'HasAssociation', inverse: 'to_model'
|
108
|
-
destination_has_associations: DS.hasMany 'HasAssociation', inverse: 'from_model'
|
109
|
-
|
110
|
-
MetaModel.HasAssociation = DS.Model.extend
|
111
|
-
join_type: DS.attr 'string'
|
112
|
-
name: DS.attr 'string'
|
113
|
-
opposite_name: DS.attr 'string'
|
114
|
-
relationship_type: DS.attr 'string'
|
115
|
-
from_model: DS.belongsTo 'Model', async: true
|
116
|
-
to_model: DS.belongsTo 'Model', async: true
|
117
|
-
|
118
|
-
source_join_type: (->
|
119
|
-
@get('join_type')?.split('_to_')[0]
|
120
|
-
).property('join_type')
|
121
|
-
|
122
|
-
destination_join_type: (->
|
123
|
-
@get('join_type')?.split('_to_')[1]
|
124
|
-
).property('join_type')
|
125
|
-
|
126
|
-
source_is_defined: (->
|
127
|
-
@get('source_join_type') and @get('from_model')
|
128
|
-
).property('source_join_type', 'from_model')
|
129
|
-
|
130
|
-
destination_is_defined: (->
|
131
|
-
@get('destination_join_type') and @get('to_model')
|
132
|
-
).property('destination_join_type', 'to_model')
|
133
|
-
|
134
|
-
models_are_defined: (->
|
135
|
-
@get('from_model') and @get('to_model')
|
136
|
-
).property('from_model', 'to_model')
|
137
|
-
|
138
|
-
|
139
|
-
standardize_name: (->
|
140
|
-
@set 'name', @standardized_name @get('name')
|
141
|
-
).observes('name')
|
142
|
-
|
143
|
-
standardize_opposite_name: (->
|
144
|
-
@set 'opposite_name', @standardized_name @get('opposite_name')
|
145
|
-
).observes('opposite_name')
|
146
|
-
|
147
|
-
standardized_name: (name) ->
|
148
|
-
name.replace(/^[\s0-9]/, '').replace(/[^a-zA-Z0-9]+/g, '_').toLowerCase()
|
149
|
-
|
150
|
-
standardize_relationship_type: (->
|
151
|
-
@set 'relationship_type', @get('relationship_type').replace(/[^a-zA-Z0-9]+/g, '_')
|
152
|
-
).observes('relationship_type')
|
153
|
-
|
154
|
-
|
155
|
-
# Routes / Controllers
|
156
|
-
|
157
|
-
|
158
|
-
MetaModel.ModelsHierarchyRoute = Ember.Route.extend
|
159
|
-
model: ->
|
160
|
-
Ember.$.getJSON(mm_path '/meta/models/hierarchy.json').then (data) ->
|
161
|
-
data.models
|
162
|
-
actions:
|
163
|
-
goto_metamodel: (model) ->
|
164
|
-
@transitionTo 'models.edit', model.class_name
|
165
|
-
|
166
|
-
|
167
|
-
MetaModel.ModelsHierarchyController = Ember.Controller.extend
|
168
|
-
new_model_name: ''
|
169
|
-
|
170
|
-
actions:
|
171
|
-
add_model: (class_name) ->
|
172
|
-
@store.createRecord('model', class_name: @new_model_name).save().then (record) =>
|
173
|
-
console.log {queryParams: class_name: record.get('class_name')}
|
174
|
-
@transitionToRoute 'models.edit', record.get('class_name')
|
175
|
-
|
176
|
-
|
177
|
-
MetaModel.ModelsEditRoute = Ember.Route.extend
|
178
|
-
model: (params) ->
|
179
|
-
Ember.RSVP.hash
|
180
|
-
model: @store.find 'model', params.class_name
|
181
|
-
models: @store.find 'model'
|
182
|
-
property_types: ['String', 'DateTime']
|
183
|
-
|
184
|
-
actions:
|
185
|
-
add_property: (model) ->
|
186
|
-
property = model.get('properties').createRecord name: '', type: 'String', model_id: model.id
|
187
|
-
property.save()
|
188
|
-
|
189
|
-
delete_property: (property) ->
|
190
|
-
property.destroyRecord()
|
191
|
-
|
192
|
-
save: (model) ->
|
193
|
-
model.save() #if model.get 'isDirty'
|
194
|
-
model.get('properties').forEach (property) ->
|
195
|
-
property.save() if property.get 'isDirty'
|
196
|
-
|
197
|
-
delete: (model) ->
|
198
|
-
model.destroyRecord().then =>
|
199
|
-
@transitionTo 'models.hierarchy'
|
200
|
-
|
201
|
-
MetaModel.HasAssociationsIndexRoute = Ember.Route.extend
|
202
|
-
model: (params) ->
|
203
|
-
@store.find 'has_association'
|
204
|
-
|
205
|
-
actions:
|
206
|
-
delete: (has_association) ->
|
207
|
-
has_association.destroyRecord()
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
MetaModel.HasAssociationsNewRoute = Ember.Route.extend
|
212
|
-
model: (params) ->
|
213
|
-
Ember.RSVP.hash
|
214
|
-
has_association: @store.createRecord 'has_association'
|
215
|
-
models: @store.find 'model'
|
216
|
-
join_types: ['one_to_many', 'many_to_one', 'many_to_many']
|
217
|
-
|
218
|
-
actions:
|
219
|
-
create: (has_association) ->
|
220
|
-
has_association.save().then (record) =>
|
221
|
-
@transitionTo 'has_associations.index'
|
222
|
-
|
223
|
-
|
224
|
-
$(document).ready ready
|
225
|
-
$(document).on 'page:load', ready
|
1
|
+
#= require ./meta_model/vendor
|
2
|
+
#= require ./meta_model/app
|
@@ -0,0 +1,2122 @@
|
|
1
|
+
/* jshint ignore:start */
|
2
|
+
|
3
|
+
/* jshint ignore:end */
|
4
|
+
|
5
|
+
define('ember-src/adapters/application', ['exports', 'ember-data'], function (exports, DS) {
|
6
|
+
|
7
|
+
'use strict';
|
8
|
+
|
9
|
+
var ApplicationAdapter;
|
10
|
+
|
11
|
+
ApplicationAdapter = DS['default'].ActiveModelAdapter.extend();
|
12
|
+
|
13
|
+
exports['default'] = ApplicationAdapter;
|
14
|
+
|
15
|
+
});
|
16
|
+
define('ember-src/adapters/has-association', ['exports', 'ember-src/adapters/meta-model'], function (exports, MetaModelAdapter) {
|
17
|
+
|
18
|
+
'use strict';
|
19
|
+
|
20
|
+
var HasAssociationAdapter;
|
21
|
+
|
22
|
+
HasAssociationAdapter = MetaModelAdapter['default'].extend({
|
23
|
+
buildURL: function(type, id, record) {
|
24
|
+
var result;
|
25
|
+
result = "/meta/has_associations";
|
26
|
+
if (id) {
|
27
|
+
result += "/" + id;
|
28
|
+
}
|
29
|
+
return mm_path(result);
|
30
|
+
}
|
31
|
+
});
|
32
|
+
|
33
|
+
exports['default'] = HasAssociationAdapter;
|
34
|
+
|
35
|
+
});
|
36
|
+
define('ember-src/adapters/meta-model', ['exports', 'ember-src/adapters/application'], function (exports, ApplicationAdapter) {
|
37
|
+
|
38
|
+
'use strict';
|
39
|
+
|
40
|
+
var MetaModelAdapter;
|
41
|
+
|
42
|
+
MetaModelAdapter = DS.RESTAdapter.extend({
|
43
|
+
namespace: mm_path('meta').slice(1)
|
44
|
+
});
|
45
|
+
|
46
|
+
exports['default'] = MetaModelAdapter;
|
47
|
+
|
48
|
+
});
|
49
|
+
define('ember-src/adapters/model', ['exports', 'ember-src/adapters/meta-model'], function (exports, MetaModelAdapter) {
|
50
|
+
|
51
|
+
'use strict';
|
52
|
+
|
53
|
+
var ModelAdapter;
|
54
|
+
|
55
|
+
ModelAdapter = MetaModelAdapter['default'].extend();
|
56
|
+
|
57
|
+
exports['default'] = ModelAdapter;
|
58
|
+
|
59
|
+
});
|
60
|
+
define('ember-src/adapters/property', ['exports', 'ember-src/adapters/meta-model'], function (exports, MetaModelAdapter) {
|
61
|
+
|
62
|
+
'use strict';
|
63
|
+
|
64
|
+
var PropertyAdapter;
|
65
|
+
|
66
|
+
PropertyAdapter = MetaModelAdapter['default'].extend();
|
67
|
+
|
68
|
+
exports['default'] = PropertyAdapter;
|
69
|
+
|
70
|
+
});
|
71
|
+
define('ember-src/app', ['exports', 'ember', 'ember/resolver', 'ember/load-initializers', 'ember-src/config/environment'], function (exports, Ember, Resolver, loadInitializers, config) {
|
72
|
+
|
73
|
+
'use strict';
|
74
|
+
|
75
|
+
var MetaModelApp;
|
76
|
+
|
77
|
+
window.mm_path = function(path) {
|
78
|
+
var base_path, p;
|
79
|
+
base_path = meta_model_root_path;
|
80
|
+
if (base_path.slice(-1) === '/') {
|
81
|
+
base_path = base_path.slice(0, -1);
|
82
|
+
}
|
83
|
+
p = path;
|
84
|
+
if (p[0] === '/') {
|
85
|
+
p = p.slice(1);
|
86
|
+
}
|
87
|
+
return base_path + '/' + p;
|
88
|
+
};
|
89
|
+
|
90
|
+
$(function() {
|
91
|
+
var token;
|
92
|
+
token = $('meta[name="csrf-token"]').attr('content');
|
93
|
+
return $.ajaxPrefilter(function(options, originalOptions, xhr) {
|
94
|
+
return xhr.setRequestHeader('X-CSRF-Token', token);
|
95
|
+
});
|
96
|
+
});
|
97
|
+
|
98
|
+
Ember['default'].MODEL_FACTORY_INJECTIONS = true;
|
99
|
+
|
100
|
+
MetaModelApp = Ember['default'].Application.extend({
|
101
|
+
modulePrefix: config['default'].modulePrefix,
|
102
|
+
podModulePrefix: config['default'].podModulePrefix,
|
103
|
+
Resolver: Resolver['default'],
|
104
|
+
rootElement: "#ember-application"
|
105
|
+
});
|
106
|
+
|
107
|
+
loadInitializers['default'](MetaModelApp, config['default'].modulePrefix);
|
108
|
+
|
109
|
+
exports['default'] = MetaModelApp;
|
110
|
+
|
111
|
+
});
|
112
|
+
define('ember-src/components/focus-input', ['exports', 'ember'], function (exports, Ember) {
|
113
|
+
|
114
|
+
'use strict';
|
115
|
+
|
116
|
+
var FocusInputComponent;
|
117
|
+
|
118
|
+
FocusInputComponent = Ember['default'].TextField.extend({
|
119
|
+
becomeFocused: (function() {
|
120
|
+
return this.$().focus();
|
121
|
+
}).on('didInsertElement')
|
122
|
+
});
|
123
|
+
|
124
|
+
exports['default'] = FocusInputComponent;
|
125
|
+
|
126
|
+
});
|
127
|
+
define('ember-src/components/model-list-item', ['exports', 'ember'], function (exports, Ember) {
|
128
|
+
|
129
|
+
'use strict';
|
130
|
+
|
131
|
+
var ModelListItemComponent;
|
132
|
+
|
133
|
+
ModelListItemComponent = Ember['default'].Component.extend({
|
134
|
+
action: 'meta_model_clicked',
|
135
|
+
actions: {
|
136
|
+
clicked: function() {
|
137
|
+
return this.sendAction('action', this.get('model'));
|
138
|
+
},
|
139
|
+
goto_metamodel: function(model) {
|
140
|
+
return this.sendAction('action', model);
|
141
|
+
}
|
142
|
+
}
|
143
|
+
});
|
144
|
+
|
145
|
+
exports['default'] = ModelListItemComponent;
|
146
|
+
|
147
|
+
});
|
148
|
+
define('ember-src/components/model-list', ['exports', 'ember'], function (exports, Ember) {
|
149
|
+
|
150
|
+
'use strict';
|
151
|
+
|
152
|
+
var ModelListComponent;
|
153
|
+
|
154
|
+
ModelListComponent = Ember['default'].Component.extend({
|
155
|
+
action: 'goto_metamodel',
|
156
|
+
actions: {
|
157
|
+
meta_model_clicked: function(model) {
|
158
|
+
return this.sendAction('action', model);
|
159
|
+
}
|
160
|
+
}
|
161
|
+
});
|
162
|
+
|
163
|
+
exports['default'] = ModelListComponent;
|
164
|
+
|
165
|
+
});
|
166
|
+
define('ember-src/controllers/application', ['exports', 'ember'], function (exports, Ember) {
|
167
|
+
|
168
|
+
'use strict';
|
169
|
+
|
170
|
+
var ApplicationController;
|
171
|
+
|
172
|
+
ApplicationController = Ember['default'].Controller.extend();
|
173
|
+
|
174
|
+
exports['default'] = ApplicationController;
|
175
|
+
|
176
|
+
});
|
177
|
+
define('ember-src/controllers/models/hierarchy', ['exports', 'ember'], function (exports, Ember) {
|
178
|
+
|
179
|
+
'use strict';
|
180
|
+
|
181
|
+
var ModelsHierarchyController;
|
182
|
+
|
183
|
+
ModelsHierarchyController = Ember['default'].Controller.extend({
|
184
|
+
new_model_name: '',
|
185
|
+
actions: {
|
186
|
+
add_model: function() {
|
187
|
+
return this.store.createRecord('model', {
|
188
|
+
class_name: this.new_model_name
|
189
|
+
}).save().then((function(_this) {
|
190
|
+
return function(record) {
|
191
|
+
console.log({
|
192
|
+
queryParams: {
|
193
|
+
class_name: record.get('class_name')
|
194
|
+
}
|
195
|
+
});
|
196
|
+
return _this.transitionToRoute('models.edit', record.get('class_name'));
|
197
|
+
};
|
198
|
+
})(this));
|
199
|
+
}
|
200
|
+
}
|
201
|
+
});
|
202
|
+
|
203
|
+
exports['default'] = ModelsHierarchyController;
|
204
|
+
|
205
|
+
});
|
206
|
+
define('ember-src/initializers/app-version', ['exports', 'ember-src/config/environment', 'ember'], function (exports, config, Ember) {
|
207
|
+
|
208
|
+
'use strict';
|
209
|
+
|
210
|
+
var classify = Ember['default'].String.classify;
|
211
|
+
var registered = false;
|
212
|
+
|
213
|
+
exports['default'] = {
|
214
|
+
name: 'App Version',
|
215
|
+
initialize: function initialize(container, application) {
|
216
|
+
if (!registered) {
|
217
|
+
var appName = classify(application.toString());
|
218
|
+
Ember['default'].libraries.register(appName, config['default'].APP.version);
|
219
|
+
registered = true;
|
220
|
+
}
|
221
|
+
}
|
222
|
+
};
|
223
|
+
|
224
|
+
});
|
225
|
+
define('ember-src/initializers/export-application-global', ['exports', 'ember', 'ember-src/config/environment'], function (exports, Ember, config) {
|
226
|
+
|
227
|
+
'use strict';
|
228
|
+
|
229
|
+
exports.initialize = initialize;
|
230
|
+
|
231
|
+
function initialize(container, application) {
|
232
|
+
var classifiedName = Ember['default'].String.classify(config['default'].modulePrefix);
|
233
|
+
|
234
|
+
if (config['default'].exportApplicationGlobal && !window[classifiedName]) {
|
235
|
+
window[classifiedName] = application;
|
236
|
+
}
|
237
|
+
}
|
238
|
+
|
239
|
+
;
|
240
|
+
|
241
|
+
exports['default'] = {
|
242
|
+
name: 'export-application-global',
|
243
|
+
|
244
|
+
initialize: initialize
|
245
|
+
};
|
246
|
+
|
247
|
+
});
|
248
|
+
define('ember-src/meta_model', function () {
|
249
|
+
|
250
|
+
'use strict';
|
251
|
+
|
252
|
+
|
253
|
+
/*
|
254
|
+
|
255
|
+
#= require_tree ./templates
|
256
|
+
|
257
|
+
ready = ->
|
258
|
+
if $('#ember-application').length
|
259
|
+
## for more details see: http://emberjs.com/guides/application/
|
260
|
+
* window.MetaModelApp = Ember.Application.create(rootElement: '#ember-application')
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
$(document).ready ready
|
267
|
+
$(document).on 'page:load', ready
|
268
|
+
*/
|
269
|
+
var mm_path;
|
270
|
+
|
271
|
+
mm_path = function() {
|
272
|
+
var base_path, p;
|
273
|
+
base_path = meta_model_root_path;
|
274
|
+
if (base_path.slice(-1) === '/') {
|
275
|
+
base_path = base_path.slice(0, -1);
|
276
|
+
}
|
277
|
+
p = path;
|
278
|
+
if (p[0] === '/') {
|
279
|
+
p = p.slice(1);
|
280
|
+
}
|
281
|
+
return base_path + '/' + p;
|
282
|
+
};
|
283
|
+
|
284
|
+
});
|
285
|
+
define('ember-src/models/has-association', ['exports', 'ember-data'], function (exports, DS) {
|
286
|
+
|
287
|
+
'use strict';
|
288
|
+
|
289
|
+
var HasAssociation;
|
290
|
+
|
291
|
+
HasAssociation = DS['default'].Model.extend({
|
292
|
+
join_type: DS['default'].attr('string'),
|
293
|
+
name: DS['default'].attr('string'),
|
294
|
+
opposite_name: DS['default'].attr('string'),
|
295
|
+
relationship_type: DS['default'].attr('string'),
|
296
|
+
from_model: DS['default'].belongsTo('Model', {
|
297
|
+
async: true
|
298
|
+
}),
|
299
|
+
to_model: DS['default'].belongsTo('Model', {
|
300
|
+
async: true
|
301
|
+
}),
|
302
|
+
source_join_type: (function() {
|
303
|
+
var ref;
|
304
|
+
return (ref = this.get('join_type')) != null ? ref.split('_to_')[0] : void 0;
|
305
|
+
}).property('join_type'),
|
306
|
+
destination_join_type: (function() {
|
307
|
+
var ref;
|
308
|
+
return (ref = this.get('join_type')) != null ? ref.split('_to_')[1] : void 0;
|
309
|
+
}).property('join_type'),
|
310
|
+
source_is_defined: (function() {
|
311
|
+
return this.get('source_join_type') && this.get('from_model');
|
312
|
+
}).property('source_join_type', 'from_model'),
|
313
|
+
destination_is_defined: (function() {
|
314
|
+
return this.get('destination_join_type') && this.get('to_model');
|
315
|
+
}).property('destination_join_type', 'to_model'),
|
316
|
+
models_are_defined: (function() {
|
317
|
+
return this.get('from_model') && this.get('to_model');
|
318
|
+
}).property('from_model', 'to_model'),
|
319
|
+
standardize_name: (function() {
|
320
|
+
return this.set('name', this.standardized_name(this.get('name')));
|
321
|
+
}).observes('name'),
|
322
|
+
standardize_opposite_name: (function() {
|
323
|
+
return this.set('opposite_name', this.standardized_name(this.get('opposite_name')));
|
324
|
+
}).observes('opposite_name'),
|
325
|
+
standardized_name: function(name) {
|
326
|
+
return name.replace(/^[\s0-9]/, '').replace(/[^a-zA-Z0-9]+/g, '_').toLowerCase();
|
327
|
+
},
|
328
|
+
standardize_relationship_type: (function() {
|
329
|
+
return this.set('relationship_type', this.get('relationship_type').replace(/[^a-zA-Z0-9]+/g, '_'));
|
330
|
+
}).observes('relationship_type')
|
331
|
+
});
|
332
|
+
|
333
|
+
exports['default'] = HasAssociation;
|
334
|
+
|
335
|
+
});
|
336
|
+
define('ember-src/models/model', ['exports', 'ember-data'], function (exports, DS) {
|
337
|
+
|
338
|
+
'use strict';
|
339
|
+
|
340
|
+
var Model;
|
341
|
+
|
342
|
+
Model = DS['default'].Model.extend({
|
343
|
+
class_name: DS['default'].attr('string'),
|
344
|
+
superclass_model: DS['default'].belongsTo('Model'),
|
345
|
+
properties: DS['default'].hasMany('Property'),
|
346
|
+
id_property: DS['default'].belongsTo('Property'),
|
347
|
+
source_has_associations: DS['default'].hasMany('HasAssociation', {
|
348
|
+
inverse: 'to_model'
|
349
|
+
}),
|
350
|
+
destination_has_associations: DS['default'].hasMany('HasAssociation', {
|
351
|
+
inverse: 'from_model'
|
352
|
+
})
|
353
|
+
});
|
354
|
+
|
355
|
+
exports['default'] = Model;
|
356
|
+
|
357
|
+
});
|
358
|
+
define('ember-src/models/property', ['exports', 'ember-data'], function (exports, DS) {
|
359
|
+
|
360
|
+
'use strict';
|
361
|
+
|
362
|
+
var Property;
|
363
|
+
|
364
|
+
Property = DS['default'].Model.extend({
|
365
|
+
name: DS['default'].attr('string'),
|
366
|
+
type: DS['default'].attr('string'),
|
367
|
+
model: DS['default'].belongsTo('Model', {
|
368
|
+
inverse: 'properties'
|
369
|
+
})
|
370
|
+
});
|
371
|
+
|
372
|
+
exports['default'] = Property;
|
373
|
+
|
374
|
+
});
|
375
|
+
define('ember-src/router', ['exports', 'ember', 'ember-src/config/environment'], function (exports, Ember, config) {
|
376
|
+
|
377
|
+
'use strict';
|
378
|
+
|
379
|
+
var Router, map_fn;
|
380
|
+
|
381
|
+
Router = Ember['default'].Router.extend();
|
382
|
+
|
383
|
+
map_fn = function() {
|
384
|
+
this.route('index', {
|
385
|
+
path: "/"
|
386
|
+
});
|
387
|
+
console.log('defined index');
|
388
|
+
this.resource('models', {
|
389
|
+
path: '/models'
|
390
|
+
}, function() {
|
391
|
+
this.route('hierarchy', {
|
392
|
+
path: "/"
|
393
|
+
});
|
394
|
+
return this.route('edit', {
|
395
|
+
path: "/:class_name/edit"
|
396
|
+
});
|
397
|
+
});
|
398
|
+
return this.resource('has_associations', function() {
|
399
|
+
this.route('index', {
|
400
|
+
path: '/'
|
401
|
+
});
|
402
|
+
return this.route('new', {
|
403
|
+
path: '/new'
|
404
|
+
});
|
405
|
+
});
|
406
|
+
};
|
407
|
+
|
408
|
+
exports['default'] = Router.map(map_fn);;
|
409
|
+
|
410
|
+
});
|
411
|
+
define('ember-src/routes/has-associations/index', ['exports', 'ember'], function (exports, Ember) {
|
412
|
+
|
413
|
+
'use strict';
|
414
|
+
|
415
|
+
var HasAssociationsIndexRoute;
|
416
|
+
|
417
|
+
HasAssociationsIndexRoute = Ember['default'].Route.extend({
|
418
|
+
model: function(params) {
|
419
|
+
return this.store.find('has_association');
|
420
|
+
},
|
421
|
+
actions: {
|
422
|
+
"delete": function(has_association) {
|
423
|
+
return has_association.destroyRecord();
|
424
|
+
}
|
425
|
+
}
|
426
|
+
});
|
427
|
+
|
428
|
+
exports['default'] = HasAssociationsIndexRoute;
|
429
|
+
|
430
|
+
});
|
431
|
+
define('ember-src/routes/has-associations/new', ['exports', 'ember'], function (exports, Ember) {
|
432
|
+
|
433
|
+
'use strict';
|
434
|
+
|
435
|
+
var HasAssociationsNewRoute;
|
436
|
+
|
437
|
+
HasAssociationsNewRoute = Ember['default'].Route.extend({
|
438
|
+
model: function(params) {
|
439
|
+
return Ember['default'].RSVP.hash({
|
440
|
+
has_association: this.store.createRecord('has_association'),
|
441
|
+
models: this.store.find('model'),
|
442
|
+
join_types: ['one_to_many', 'many_to_one', 'many_to_many']
|
443
|
+
});
|
444
|
+
},
|
445
|
+
actions: {
|
446
|
+
create: function(has_association) {
|
447
|
+
return has_association.save().then((function(_this) {
|
448
|
+
return function(record) {
|
449
|
+
return _this.transitionTo('has_associations.index');
|
450
|
+
};
|
451
|
+
})(this));
|
452
|
+
}
|
453
|
+
}
|
454
|
+
});
|
455
|
+
|
456
|
+
exports['default'] = HasAssociationsNewRoute;
|
457
|
+
|
458
|
+
});
|
459
|
+
define('ember-src/routes/models/edit', ['exports', 'ember'], function (exports, Ember) {
|
460
|
+
|
461
|
+
'use strict';
|
462
|
+
|
463
|
+
var ModelsEditRoute;
|
464
|
+
|
465
|
+
ModelsEditRoute = Ember['default'].Route.extend({
|
466
|
+
model: function(params) {
|
467
|
+
return Ember['default'].RSVP.hash({
|
468
|
+
model: this.store.find('model', params.class_name),
|
469
|
+
models: this.store.find('model'),
|
470
|
+
property_types: ['String', 'DateTime']
|
471
|
+
});
|
472
|
+
},
|
473
|
+
actions: {
|
474
|
+
add_property: function(model) {
|
475
|
+
var property;
|
476
|
+
property = model.get('properties').createRecord({
|
477
|
+
name: '',
|
478
|
+
type: 'String',
|
479
|
+
model_id: model.id
|
480
|
+
});
|
481
|
+
return property.save();
|
482
|
+
},
|
483
|
+
delete_property: function(property) {
|
484
|
+
return property.destroyRecord();
|
485
|
+
},
|
486
|
+
save: function(model) {
|
487
|
+
model.save();
|
488
|
+
return model.get('properties').forEach(function(property) {
|
489
|
+
if (property.get('isDirty')) {
|
490
|
+
return property.save();
|
491
|
+
}
|
492
|
+
});
|
493
|
+
},
|
494
|
+
"delete": function(model) {
|
495
|
+
return model.destroyRecord().then((function(_this) {
|
496
|
+
return function() {
|
497
|
+
return _this.transitionTo('models.hierarchy');
|
498
|
+
};
|
499
|
+
})(this));
|
500
|
+
}
|
501
|
+
}
|
502
|
+
});
|
503
|
+
|
504
|
+
exports['default'] = ModelsEditRoute;
|
505
|
+
|
506
|
+
});
|
507
|
+
define('ember-src/routes/models/hierarchy', ['exports', 'ember'], function (exports, Ember) {
|
508
|
+
|
509
|
+
'use strict';
|
510
|
+
|
511
|
+
var ModelsHierarchyRoute;
|
512
|
+
|
513
|
+
ModelsHierarchyRoute = Ember['default'].Route.extend({
|
514
|
+
model: function() {
|
515
|
+
return $.getJSON(mm_path('/meta/models/hierarchy.json')).then(function(data) {
|
516
|
+
return data.models;
|
517
|
+
});
|
518
|
+
},
|
519
|
+
actions: {
|
520
|
+
goto_metamodel: function(model) {
|
521
|
+
return this.transitionTo('models.edit', model.class_name);
|
522
|
+
}
|
523
|
+
}
|
524
|
+
});
|
525
|
+
|
526
|
+
exports['default'] = ModelsHierarchyRoute;
|
527
|
+
|
528
|
+
});
|
529
|
+
define('ember-src/serializers/application', ['exports', 'ember-data'], function (exports, DS) {
|
530
|
+
|
531
|
+
'use strict';
|
532
|
+
|
533
|
+
var ApplicationSerializer;
|
534
|
+
|
535
|
+
ApplicationSerializer = DS['default'].ActiveModelSerializer.extend();
|
536
|
+
|
537
|
+
exports['default'] = ApplicationSerializer;
|
538
|
+
|
539
|
+
});
|
540
|
+
define('ember-src/templates/application', ['exports'], function (exports) {
|
541
|
+
|
542
|
+
'use strict';
|
543
|
+
|
544
|
+
exports['default'] = Ember.HTMLBars.template((function() {
|
545
|
+
return {
|
546
|
+
isHTMLBars: true,
|
547
|
+
revision: "Ember@1.11.1",
|
548
|
+
blockParams: 0,
|
549
|
+
cachedFragment: null,
|
550
|
+
hasRendered: false,
|
551
|
+
build: function build(dom) {
|
552
|
+
var el0 = dom.createDocumentFragment();
|
553
|
+
var el1 = dom.createElement("div");
|
554
|
+
dom.setAttribute(el1,"class","container");
|
555
|
+
var el2 = dom.createComment("");
|
556
|
+
dom.appendChild(el1, el2);
|
557
|
+
dom.appendChild(el0, el1);
|
558
|
+
return el0;
|
559
|
+
},
|
560
|
+
render: function render(context, env, contextualElement) {
|
561
|
+
var dom = env.dom;
|
562
|
+
var hooks = env.hooks, content = hooks.content;
|
563
|
+
dom.detectNamespace(contextualElement);
|
564
|
+
var fragment;
|
565
|
+
if (env.useFragmentCache && dom.canClone) {
|
566
|
+
if (this.cachedFragment === null) {
|
567
|
+
fragment = this.build(dom);
|
568
|
+
if (this.hasRendered) {
|
569
|
+
this.cachedFragment = fragment;
|
570
|
+
} else {
|
571
|
+
this.hasRendered = true;
|
572
|
+
}
|
573
|
+
}
|
574
|
+
if (this.cachedFragment) {
|
575
|
+
fragment = dom.cloneNode(this.cachedFragment, true);
|
576
|
+
}
|
577
|
+
} else {
|
578
|
+
fragment = this.build(dom);
|
579
|
+
}
|
580
|
+
var morph0 = dom.createMorphAt(dom.childAt(fragment, [0]),0,0);
|
581
|
+
content(env, morph0, context, "outlet");
|
582
|
+
return fragment;
|
583
|
+
}
|
584
|
+
};
|
585
|
+
}()));
|
586
|
+
|
587
|
+
});
|
588
|
+
define('ember-src/templates/components/has-association-diagram', ['exports'], function (exports) {
|
589
|
+
|
590
|
+
'use strict';
|
591
|
+
|
592
|
+
exports['default'] = Ember.HTMLBars.template((function() {
|
593
|
+
return {
|
594
|
+
isHTMLBars: true,
|
595
|
+
revision: "Ember@1.11.1",
|
596
|
+
blockParams: 0,
|
597
|
+
cachedFragment: null,
|
598
|
+
hasRendered: false,
|
599
|
+
build: function build(dom) {
|
600
|
+
var el0 = dom.createDocumentFragment();
|
601
|
+
var el1 = dom.createElement("div");
|
602
|
+
dom.setAttribute(el1,"class","row has-associations-row");
|
603
|
+
var el2 = dom.createComment("");
|
604
|
+
dom.appendChild(el1, el2);
|
605
|
+
var el2 = dom.createElement("div");
|
606
|
+
dom.setAttribute(el2,"class","relationship");
|
607
|
+
var el3 = dom.createElement("span");
|
608
|
+
dom.setAttribute(el3,"class","source-join-type");
|
609
|
+
var el4 = dom.createComment("");
|
610
|
+
dom.appendChild(el3, el4);
|
611
|
+
dom.appendChild(el2, el3);
|
612
|
+
var el3 = dom.createElement("span");
|
613
|
+
dom.setAttribute(el3,"class","source-association-name");
|
614
|
+
var el4 = dom.createComment("");
|
615
|
+
dom.appendChild(el3, el4);
|
616
|
+
dom.appendChild(el2, el3);
|
617
|
+
var el3 = dom.createTextNode(":");
|
618
|
+
dom.appendChild(el2, el3);
|
619
|
+
var el3 = dom.createComment("");
|
620
|
+
dom.appendChild(el2, el3);
|
621
|
+
var el3 = dom.createElement("span");
|
622
|
+
dom.setAttribute(el3,"class","destination-join-type");
|
623
|
+
var el4 = dom.createComment("");
|
624
|
+
dom.appendChild(el3, el4);
|
625
|
+
dom.appendChild(el2, el3);
|
626
|
+
var el3 = dom.createElement("span");
|
627
|
+
dom.setAttribute(el3,"class","destination-association-name");
|
628
|
+
var el4 = dom.createComment("");
|
629
|
+
dom.appendChild(el3, el4);
|
630
|
+
dom.appendChild(el2, el3);
|
631
|
+
dom.appendChild(el1, el2);
|
632
|
+
var el2 = dom.createElement("i");
|
633
|
+
dom.setAttribute(el2,"class","glyphicon glyphicon-triangle-right");
|
634
|
+
dom.appendChild(el1, el2);
|
635
|
+
var el2 = dom.createComment("");
|
636
|
+
dom.appendChild(el1, el2);
|
637
|
+
var el2 = dom.createComment("");
|
638
|
+
dom.appendChild(el1, el2);
|
639
|
+
dom.appendChild(el0, el1);
|
640
|
+
return el0;
|
641
|
+
},
|
642
|
+
render: function render(context, env, contextualElement) {
|
643
|
+
var dom = env.dom;
|
644
|
+
var hooks = env.hooks, content = hooks.content;
|
645
|
+
dom.detectNamespace(contextualElement);
|
646
|
+
var fragment;
|
647
|
+
if (env.useFragmentCache && dom.canClone) {
|
648
|
+
if (this.cachedFragment === null) {
|
649
|
+
fragment = this.build(dom);
|
650
|
+
if (this.hasRendered) {
|
651
|
+
this.cachedFragment = fragment;
|
652
|
+
} else {
|
653
|
+
this.hasRendered = true;
|
654
|
+
}
|
655
|
+
}
|
656
|
+
if (this.cachedFragment) {
|
657
|
+
fragment = dom.cloneNode(this.cachedFragment, true);
|
658
|
+
}
|
659
|
+
} else {
|
660
|
+
fragment = this.build(dom);
|
661
|
+
}
|
662
|
+
var element0 = dom.childAt(fragment, [0]);
|
663
|
+
var element1 = dom.childAt(element0, [1]);
|
664
|
+
var morph0 = dom.createMorphAt(element0,0,0);
|
665
|
+
var morph1 = dom.createMorphAt(dom.childAt(element1, [0]),0,0);
|
666
|
+
var morph2 = dom.createMorphAt(dom.childAt(element1, [1]),0,0);
|
667
|
+
var morph3 = dom.createMorphAt(element1,3,3);
|
668
|
+
var morph4 = dom.createMorphAt(dom.childAt(element1, [4]),0,0);
|
669
|
+
var morph5 = dom.createMorphAt(dom.childAt(element1, [5]),0,0);
|
670
|
+
var morph6 = dom.createMorphAt(element0,3,3);
|
671
|
+
var morph7 = dom.createMorphAt(element0,4,4);
|
672
|
+
content(env, morph0, context, "has_association.from_model.class_name");
|
673
|
+
content(env, morph1, context, "has_association.source_join_type");
|
674
|
+
content(env, morph2, context, "has_association.name");
|
675
|
+
content(env, morph3, context, "has_association.relationship_type");
|
676
|
+
content(env, morph4, context, "has_association.destination_join_type");
|
677
|
+
content(env, morph5, context, "has_association.opposite_name");
|
678
|
+
content(env, morph6, context, "has_association.to_model.class_name");
|
679
|
+
content(env, morph7, context, "yield");
|
680
|
+
return fragment;
|
681
|
+
}
|
682
|
+
};
|
683
|
+
}()));
|
684
|
+
|
685
|
+
});
|
686
|
+
define('ember-src/templates/components/model-list-item', ['exports'], function (exports) {
|
687
|
+
|
688
|
+
'use strict';
|
689
|
+
|
690
|
+
exports['default'] = Ember.HTMLBars.template((function() {
|
691
|
+
return {
|
692
|
+
isHTMLBars: true,
|
693
|
+
revision: "Ember@1.11.1",
|
694
|
+
blockParams: 0,
|
695
|
+
cachedFragment: null,
|
696
|
+
hasRendered: false,
|
697
|
+
build: function build(dom) {
|
698
|
+
var el0 = dom.createDocumentFragment();
|
699
|
+
var el1 = dom.createElement("a");
|
700
|
+
dom.setAttribute(el1,"class","list-group-item");
|
701
|
+
var el2 = dom.createComment("");
|
702
|
+
dom.appendChild(el1, el2);
|
703
|
+
var el2 = dom.createComment("");
|
704
|
+
dom.appendChild(el1, el2);
|
705
|
+
dom.appendChild(el0, el1);
|
706
|
+
var el1 = dom.createComment("");
|
707
|
+
dom.appendChild(el0, el1);
|
708
|
+
return el0;
|
709
|
+
},
|
710
|
+
render: function render(context, env, contextualElement) {
|
711
|
+
var dom = env.dom;
|
712
|
+
var hooks = env.hooks, element = hooks.element, content = hooks.content, get = hooks.get, inline = hooks.inline;
|
713
|
+
dom.detectNamespace(contextualElement);
|
714
|
+
var fragment;
|
715
|
+
if (env.useFragmentCache && dom.canClone) {
|
716
|
+
if (this.cachedFragment === null) {
|
717
|
+
fragment = this.build(dom);
|
718
|
+
if (this.hasRendered) {
|
719
|
+
this.cachedFragment = fragment;
|
720
|
+
} else {
|
721
|
+
this.hasRendered = true;
|
722
|
+
}
|
723
|
+
}
|
724
|
+
if (this.cachedFragment) {
|
725
|
+
fragment = dom.cloneNode(this.cachedFragment, true);
|
726
|
+
}
|
727
|
+
} else {
|
728
|
+
fragment = this.build(dom);
|
729
|
+
}
|
730
|
+
var element0 = dom.childAt(fragment, [0]);
|
731
|
+
var morph0 = dom.createMorphAt(element0,0,0);
|
732
|
+
var morph1 = dom.createMorphAt(element0,1,1);
|
733
|
+
var morph2 = dom.createMorphAt(fragment,1,1,contextualElement);
|
734
|
+
dom.insertBoundary(fragment, null);
|
735
|
+
element(env, element0, context, "action", ["clicked"], {"on": "click"});
|
736
|
+
content(env, morph0, context, "model.class_name");
|
737
|
+
content(env, morph1, context, "model.level");
|
738
|
+
inline(env, morph2, context, "model-list", [], {"node": get(env, context, "sub_hierarchy")});
|
739
|
+
return fragment;
|
740
|
+
}
|
741
|
+
};
|
742
|
+
}()));
|
743
|
+
|
744
|
+
});
|
745
|
+
define('ember-src/templates/components/model-list', ['exports'], function (exports) {
|
746
|
+
|
747
|
+
'use strict';
|
748
|
+
|
749
|
+
exports['default'] = Ember.HTMLBars.template((function() {
|
750
|
+
var child0 = (function() {
|
751
|
+
return {
|
752
|
+
isHTMLBars: true,
|
753
|
+
revision: "Ember@1.11.1",
|
754
|
+
blockParams: 0,
|
755
|
+
cachedFragment: null,
|
756
|
+
hasRendered: false,
|
757
|
+
build: function build(dom) {
|
758
|
+
var el0 = dom.createDocumentFragment();
|
759
|
+
var el1 = dom.createTextNode(" ");
|
760
|
+
dom.appendChild(el0, el1);
|
761
|
+
var el1 = dom.createComment("");
|
762
|
+
dom.appendChild(el0, el1);
|
763
|
+
var el1 = dom.createTextNode("\n");
|
764
|
+
dom.appendChild(el0, el1);
|
765
|
+
return el0;
|
766
|
+
},
|
767
|
+
render: function render(context, env, contextualElement) {
|
768
|
+
var dom = env.dom;
|
769
|
+
var hooks = env.hooks, get = hooks.get, inline = hooks.inline;
|
770
|
+
dom.detectNamespace(contextualElement);
|
771
|
+
var fragment;
|
772
|
+
if (env.useFragmentCache && dom.canClone) {
|
773
|
+
if (this.cachedFragment === null) {
|
774
|
+
fragment = this.build(dom);
|
775
|
+
if (this.hasRendered) {
|
776
|
+
this.cachedFragment = fragment;
|
777
|
+
} else {
|
778
|
+
this.hasRendered = true;
|
779
|
+
}
|
780
|
+
}
|
781
|
+
if (this.cachedFragment) {
|
782
|
+
fragment = dom.cloneNode(this.cachedFragment, true);
|
783
|
+
}
|
784
|
+
} else {
|
785
|
+
fragment = this.build(dom);
|
786
|
+
}
|
787
|
+
var morph0 = dom.createMorphAt(fragment,1,1,contextualElement);
|
788
|
+
inline(env, morph0, context, "model-list-item", [], {"model": get(env, context, "child.0"), "sub_hierarchy": get(env, context, "child.1")});
|
789
|
+
return fragment;
|
790
|
+
}
|
791
|
+
};
|
792
|
+
}());
|
793
|
+
return {
|
794
|
+
isHTMLBars: true,
|
795
|
+
revision: "Ember@1.11.1",
|
796
|
+
blockParams: 0,
|
797
|
+
cachedFragment: null,
|
798
|
+
hasRendered: false,
|
799
|
+
build: function build(dom) {
|
800
|
+
var el0 = dom.createDocumentFragment();
|
801
|
+
var el1 = dom.createElement("div");
|
802
|
+
dom.setAttribute(el1,"class","list-group");
|
803
|
+
var el2 = dom.createTextNode("\n");
|
804
|
+
dom.appendChild(el1, el2);
|
805
|
+
var el2 = dom.createComment("");
|
806
|
+
dom.appendChild(el1, el2);
|
807
|
+
dom.appendChild(el0, el1);
|
808
|
+
var el1 = dom.createTextNode("\n");
|
809
|
+
dom.appendChild(el0, el1);
|
810
|
+
return el0;
|
811
|
+
},
|
812
|
+
render: function render(context, env, contextualElement) {
|
813
|
+
var dom = env.dom;
|
814
|
+
var hooks = env.hooks, get = hooks.get, block = hooks.block;
|
815
|
+
dom.detectNamespace(contextualElement);
|
816
|
+
var fragment;
|
817
|
+
if (env.useFragmentCache && dom.canClone) {
|
818
|
+
if (this.cachedFragment === null) {
|
819
|
+
fragment = this.build(dom);
|
820
|
+
if (this.hasRendered) {
|
821
|
+
this.cachedFragment = fragment;
|
822
|
+
} else {
|
823
|
+
this.hasRendered = true;
|
824
|
+
}
|
825
|
+
}
|
826
|
+
if (this.cachedFragment) {
|
827
|
+
fragment = dom.cloneNode(this.cachedFragment, true);
|
828
|
+
}
|
829
|
+
} else {
|
830
|
+
fragment = this.build(dom);
|
831
|
+
}
|
832
|
+
var morph0 = dom.createMorphAt(dom.childAt(fragment, [0]),1,1);
|
833
|
+
block(env, morph0, context, "each", [get(env, context, "node")], {"keyword": "child"}, child0, null);
|
834
|
+
return fragment;
|
835
|
+
}
|
836
|
+
};
|
837
|
+
}()));
|
838
|
+
|
839
|
+
});
|
840
|
+
define('ember-src/templates/has-associations/index', ['exports'], function (exports) {
|
841
|
+
|
842
|
+
'use strict';
|
843
|
+
|
844
|
+
exports['default'] = Ember.HTMLBars.template((function() {
|
845
|
+
var child0 = (function() {
|
846
|
+
return {
|
847
|
+
isHTMLBars: true,
|
848
|
+
revision: "Ember@1.11.1",
|
849
|
+
blockParams: 0,
|
850
|
+
cachedFragment: null,
|
851
|
+
hasRendered: false,
|
852
|
+
build: function build(dom) {
|
853
|
+
var el0 = dom.createDocumentFragment();
|
854
|
+
var el1 = dom.createTextNode("New Association");
|
855
|
+
dom.appendChild(el0, el1);
|
856
|
+
return el0;
|
857
|
+
},
|
858
|
+
render: function render(context, env, contextualElement) {
|
859
|
+
var dom = env.dom;
|
860
|
+
dom.detectNamespace(contextualElement);
|
861
|
+
var fragment;
|
862
|
+
if (env.useFragmentCache && dom.canClone) {
|
863
|
+
if (this.cachedFragment === null) {
|
864
|
+
fragment = this.build(dom);
|
865
|
+
if (this.hasRendered) {
|
866
|
+
this.cachedFragment = fragment;
|
867
|
+
} else {
|
868
|
+
this.hasRendered = true;
|
869
|
+
}
|
870
|
+
}
|
871
|
+
if (this.cachedFragment) {
|
872
|
+
fragment = dom.cloneNode(this.cachedFragment, true);
|
873
|
+
}
|
874
|
+
} else {
|
875
|
+
fragment = this.build(dom);
|
876
|
+
}
|
877
|
+
return fragment;
|
878
|
+
}
|
879
|
+
};
|
880
|
+
}());
|
881
|
+
var child1 = (function() {
|
882
|
+
var child0 = (function() {
|
883
|
+
return {
|
884
|
+
isHTMLBars: true,
|
885
|
+
revision: "Ember@1.11.1",
|
886
|
+
blockParams: 0,
|
887
|
+
cachedFragment: null,
|
888
|
+
hasRendered: false,
|
889
|
+
build: function build(dom) {
|
890
|
+
var el0 = dom.createDocumentFragment();
|
891
|
+
var el1 = dom.createElement("a");
|
892
|
+
dom.setAttribute(el1,"class","btn btn-danger pull-right");
|
893
|
+
var el2 = dom.createTextNode("DELETE");
|
894
|
+
dom.appendChild(el1, el2);
|
895
|
+
dom.appendChild(el0, el1);
|
896
|
+
return el0;
|
897
|
+
},
|
898
|
+
render: function render(context, env, contextualElement) {
|
899
|
+
var dom = env.dom;
|
900
|
+
var hooks = env.hooks, get = hooks.get, element = hooks.element;
|
901
|
+
dom.detectNamespace(contextualElement);
|
902
|
+
var fragment;
|
903
|
+
if (env.useFragmentCache && dom.canClone) {
|
904
|
+
if (this.cachedFragment === null) {
|
905
|
+
fragment = this.build(dom);
|
906
|
+
if (this.hasRendered) {
|
907
|
+
this.cachedFragment = fragment;
|
908
|
+
} else {
|
909
|
+
this.hasRendered = true;
|
910
|
+
}
|
911
|
+
}
|
912
|
+
if (this.cachedFragment) {
|
913
|
+
fragment = dom.cloneNode(this.cachedFragment, true);
|
914
|
+
}
|
915
|
+
} else {
|
916
|
+
fragment = this.build(dom);
|
917
|
+
}
|
918
|
+
var element0 = dom.childAt(fragment, [0]);
|
919
|
+
element(env, element0, context, "action", ["delete", get(env, context, "has_association")], {"on": "click"});
|
920
|
+
return fragment;
|
921
|
+
}
|
922
|
+
};
|
923
|
+
}());
|
924
|
+
return {
|
925
|
+
isHTMLBars: true,
|
926
|
+
revision: "Ember@1.11.1",
|
927
|
+
blockParams: 0,
|
928
|
+
cachedFragment: null,
|
929
|
+
hasRendered: false,
|
930
|
+
build: function build(dom) {
|
931
|
+
var el0 = dom.createDocumentFragment();
|
932
|
+
var el1 = dom.createComment("");
|
933
|
+
dom.appendChild(el0, el1);
|
934
|
+
return el0;
|
935
|
+
},
|
936
|
+
render: function render(context, env, contextualElement) {
|
937
|
+
var dom = env.dom;
|
938
|
+
var hooks = env.hooks, get = hooks.get, block = hooks.block;
|
939
|
+
dom.detectNamespace(contextualElement);
|
940
|
+
var fragment;
|
941
|
+
if (env.useFragmentCache && dom.canClone) {
|
942
|
+
if (this.cachedFragment === null) {
|
943
|
+
fragment = this.build(dom);
|
944
|
+
if (this.hasRendered) {
|
945
|
+
this.cachedFragment = fragment;
|
946
|
+
} else {
|
947
|
+
this.hasRendered = true;
|
948
|
+
}
|
949
|
+
}
|
950
|
+
if (this.cachedFragment) {
|
951
|
+
fragment = dom.cloneNode(this.cachedFragment, true);
|
952
|
+
}
|
953
|
+
} else {
|
954
|
+
fragment = this.build(dom);
|
955
|
+
}
|
956
|
+
var morph0 = dom.createMorphAt(fragment,0,0,contextualElement);
|
957
|
+
dom.insertBoundary(fragment, null);
|
958
|
+
dom.insertBoundary(fragment, 0);
|
959
|
+
block(env, morph0, context, "has-association-diagram", [], {"has_association": get(env, context, "has_association")}, child0, null);
|
960
|
+
return fragment;
|
961
|
+
}
|
962
|
+
};
|
963
|
+
}());
|
964
|
+
return {
|
965
|
+
isHTMLBars: true,
|
966
|
+
revision: "Ember@1.11.1",
|
967
|
+
blockParams: 0,
|
968
|
+
cachedFragment: null,
|
969
|
+
hasRendered: false,
|
970
|
+
build: function build(dom) {
|
971
|
+
var el0 = dom.createDocumentFragment();
|
972
|
+
var el1 = dom.createElement("div");
|
973
|
+
dom.setAttribute(el1,"class","row");
|
974
|
+
var el2 = dom.createComment("");
|
975
|
+
dom.appendChild(el1, el2);
|
976
|
+
dom.appendChild(el0, el1);
|
977
|
+
var el1 = dom.createElement("div");
|
978
|
+
dom.setAttribute(el1,"class","has-association-list");
|
979
|
+
var el2 = dom.createComment("");
|
980
|
+
dom.appendChild(el1, el2);
|
981
|
+
dom.appendChild(el0, el1);
|
982
|
+
return el0;
|
983
|
+
},
|
984
|
+
render: function render(context, env, contextualElement) {
|
985
|
+
var dom = env.dom;
|
986
|
+
var hooks = env.hooks, block = hooks.block, get = hooks.get;
|
987
|
+
dom.detectNamespace(contextualElement);
|
988
|
+
var fragment;
|
989
|
+
if (env.useFragmentCache && dom.canClone) {
|
990
|
+
if (this.cachedFragment === null) {
|
991
|
+
fragment = this.build(dom);
|
992
|
+
if (this.hasRendered) {
|
993
|
+
this.cachedFragment = fragment;
|
994
|
+
} else {
|
995
|
+
this.hasRendered = true;
|
996
|
+
}
|
997
|
+
}
|
998
|
+
if (this.cachedFragment) {
|
999
|
+
fragment = dom.cloneNode(this.cachedFragment, true);
|
1000
|
+
}
|
1001
|
+
} else {
|
1002
|
+
fragment = this.build(dom);
|
1003
|
+
}
|
1004
|
+
var morph0 = dom.createMorphAt(dom.childAt(fragment, [0]),0,0);
|
1005
|
+
var morph1 = dom.createMorphAt(dom.childAt(fragment, [1]),0,0);
|
1006
|
+
block(env, morph0, context, "link-to", ["has_associations.new"], {"class": "btn btn-primary"}, child0, null);
|
1007
|
+
block(env, morph1, context, "each", [get(env, context, "model")], {"keyword": "has_association"}, child1, null);
|
1008
|
+
return fragment;
|
1009
|
+
}
|
1010
|
+
};
|
1011
|
+
}()));
|
1012
|
+
|
1013
|
+
});
|
1014
|
+
define('ember-src/templates/has-associations/new', ['exports'], function (exports) {
|
1015
|
+
|
1016
|
+
'use strict';
|
1017
|
+
|
1018
|
+
exports['default'] = Ember.HTMLBars.template((function() {
|
1019
|
+
var child0 = (function() {
|
1020
|
+
return {
|
1021
|
+
isHTMLBars: true,
|
1022
|
+
revision: "Ember@1.11.1",
|
1023
|
+
blockParams: 0,
|
1024
|
+
cachedFragment: null,
|
1025
|
+
hasRendered: false,
|
1026
|
+
build: function build(dom) {
|
1027
|
+
var el0 = dom.createDocumentFragment();
|
1028
|
+
var el1 = dom.createElement("span");
|
1029
|
+
dom.setAttribute(el1,"class","help-block");
|
1030
|
+
var el2 = dom.createComment("");
|
1031
|
+
dom.appendChild(el1, el2);
|
1032
|
+
var el2 = dom.createTextNode(" has ");
|
1033
|
+
dom.appendChild(el1, el2);
|
1034
|
+
var el2 = dom.createComment("");
|
1035
|
+
dom.appendChild(el1, el2);
|
1036
|
+
var el2 = dom.createTextNode("...");
|
1037
|
+
dom.appendChild(el1, el2);
|
1038
|
+
dom.appendChild(el0, el1);
|
1039
|
+
return el0;
|
1040
|
+
},
|
1041
|
+
render: function render(context, env, contextualElement) {
|
1042
|
+
var dom = env.dom;
|
1043
|
+
var hooks = env.hooks, content = hooks.content;
|
1044
|
+
dom.detectNamespace(contextualElement);
|
1045
|
+
var fragment;
|
1046
|
+
if (env.useFragmentCache && dom.canClone) {
|
1047
|
+
if (this.cachedFragment === null) {
|
1048
|
+
fragment = this.build(dom);
|
1049
|
+
if (this.hasRendered) {
|
1050
|
+
this.cachedFragment = fragment;
|
1051
|
+
} else {
|
1052
|
+
this.hasRendered = true;
|
1053
|
+
}
|
1054
|
+
}
|
1055
|
+
if (this.cachedFragment) {
|
1056
|
+
fragment = dom.cloneNode(this.cachedFragment, true);
|
1057
|
+
}
|
1058
|
+
} else {
|
1059
|
+
fragment = this.build(dom);
|
1060
|
+
}
|
1061
|
+
var element2 = dom.childAt(fragment, [0]);
|
1062
|
+
var morph0 = dom.createMorphAt(element2,0,0);
|
1063
|
+
var morph1 = dom.createMorphAt(element2,2,2);
|
1064
|
+
content(env, morph0, context, "model.has_association.from_model.class_name");
|
1065
|
+
content(env, morph1, context, "model.has_association.source_join_type");
|
1066
|
+
return fragment;
|
1067
|
+
}
|
1068
|
+
};
|
1069
|
+
}());
|
1070
|
+
var child1 = (function() {
|
1071
|
+
return {
|
1072
|
+
isHTMLBars: true,
|
1073
|
+
revision: "Ember@1.11.1",
|
1074
|
+
blockParams: 0,
|
1075
|
+
cachedFragment: null,
|
1076
|
+
hasRendered: false,
|
1077
|
+
build: function build(dom) {
|
1078
|
+
var el0 = dom.createDocumentFragment();
|
1079
|
+
var el1 = dom.createElement("span");
|
1080
|
+
dom.setAttribute(el1,"class","help-block");
|
1081
|
+
var el2 = dom.createComment("");
|
1082
|
+
dom.appendChild(el1, el2);
|
1083
|
+
var el2 = dom.createTextNode(" has ");
|
1084
|
+
dom.appendChild(el1, el2);
|
1085
|
+
var el2 = dom.createComment("");
|
1086
|
+
dom.appendChild(el1, el2);
|
1087
|
+
var el2 = dom.createTextNode("...");
|
1088
|
+
dom.appendChild(el1, el2);
|
1089
|
+
dom.appendChild(el0, el1);
|
1090
|
+
return el0;
|
1091
|
+
},
|
1092
|
+
render: function render(context, env, contextualElement) {
|
1093
|
+
var dom = env.dom;
|
1094
|
+
var hooks = env.hooks, content = hooks.content;
|
1095
|
+
dom.detectNamespace(contextualElement);
|
1096
|
+
var fragment;
|
1097
|
+
if (env.useFragmentCache && dom.canClone) {
|
1098
|
+
if (this.cachedFragment === null) {
|
1099
|
+
fragment = this.build(dom);
|
1100
|
+
if (this.hasRendered) {
|
1101
|
+
this.cachedFragment = fragment;
|
1102
|
+
} else {
|
1103
|
+
this.hasRendered = true;
|
1104
|
+
}
|
1105
|
+
}
|
1106
|
+
if (this.cachedFragment) {
|
1107
|
+
fragment = dom.cloneNode(this.cachedFragment, true);
|
1108
|
+
}
|
1109
|
+
} else {
|
1110
|
+
fragment = this.build(dom);
|
1111
|
+
}
|
1112
|
+
var element1 = dom.childAt(fragment, [0]);
|
1113
|
+
var morph0 = dom.createMorphAt(element1,0,0);
|
1114
|
+
var morph1 = dom.createMorphAt(element1,2,2);
|
1115
|
+
content(env, morph0, context, "model.has_association.to_model.class_name");
|
1116
|
+
content(env, morph1, context, "model.has_association.destination_join_type");
|
1117
|
+
return fragment;
|
1118
|
+
}
|
1119
|
+
};
|
1120
|
+
}());
|
1121
|
+
var child2 = (function() {
|
1122
|
+
return {
|
1123
|
+
isHTMLBars: true,
|
1124
|
+
revision: "Ember@1.11.1",
|
1125
|
+
blockParams: 0,
|
1126
|
+
cachedFragment: null,
|
1127
|
+
hasRendered: false,
|
1128
|
+
build: function build(dom) {
|
1129
|
+
var el0 = dom.createDocumentFragment();
|
1130
|
+
var el1 = dom.createElement("span");
|
1131
|
+
dom.setAttribute(el1,"class","help-block");
|
1132
|
+
var el2 = dom.createComment("");
|
1133
|
+
dom.appendChild(el1, el2);
|
1134
|
+
var el2 = dom.createTextNode(" ... ");
|
1135
|
+
dom.appendChild(el1, el2);
|
1136
|
+
var el2 = dom.createComment("");
|
1137
|
+
dom.appendChild(el1, el2);
|
1138
|
+
dom.appendChild(el0, el1);
|
1139
|
+
return el0;
|
1140
|
+
},
|
1141
|
+
render: function render(context, env, contextualElement) {
|
1142
|
+
var dom = env.dom;
|
1143
|
+
var hooks = env.hooks, content = hooks.content;
|
1144
|
+
dom.detectNamespace(contextualElement);
|
1145
|
+
var fragment;
|
1146
|
+
if (env.useFragmentCache && dom.canClone) {
|
1147
|
+
if (this.cachedFragment === null) {
|
1148
|
+
fragment = this.build(dom);
|
1149
|
+
if (this.hasRendered) {
|
1150
|
+
this.cachedFragment = fragment;
|
1151
|
+
} else {
|
1152
|
+
this.hasRendered = true;
|
1153
|
+
}
|
1154
|
+
}
|
1155
|
+
if (this.cachedFragment) {
|
1156
|
+
fragment = dom.cloneNode(this.cachedFragment, true);
|
1157
|
+
}
|
1158
|
+
} else {
|
1159
|
+
fragment = this.build(dom);
|
1160
|
+
}
|
1161
|
+
var element0 = dom.childAt(fragment, [0]);
|
1162
|
+
var morph0 = dom.createMorphAt(element0,0,0);
|
1163
|
+
var morph1 = dom.createMorphAt(element0,2,2);
|
1164
|
+
content(env, morph0, context, "model.has_association.from_model.class_name");
|
1165
|
+
content(env, morph1, context, "model.has_association.to_model.class_name");
|
1166
|
+
return fragment;
|
1167
|
+
}
|
1168
|
+
};
|
1169
|
+
}());
|
1170
|
+
return {
|
1171
|
+
isHTMLBars: true,
|
1172
|
+
revision: "Ember@1.11.1",
|
1173
|
+
blockParams: 0,
|
1174
|
+
cachedFragment: null,
|
1175
|
+
hasRendered: false,
|
1176
|
+
build: function build(dom) {
|
1177
|
+
var el0 = dom.createDocumentFragment();
|
1178
|
+
var el1 = dom.createElement("div");
|
1179
|
+
dom.setAttribute(el1,"class","well well-sm");
|
1180
|
+
var el2 = dom.createElement("p");
|
1181
|
+
var el3 = dom.createTextNode("Here you can define an association between two models.");
|
1182
|
+
dom.appendChild(el2, el3);
|
1183
|
+
dom.appendChild(el1, el2);
|
1184
|
+
var el2 = dom.createElement("p");
|
1185
|
+
var el3 = dom.createTextNode("First choose the join type and the ");
|
1186
|
+
dom.appendChild(el2, el3);
|
1187
|
+
var el3 = dom.createElement("strong");
|
1188
|
+
var el4 = dom.createTextNode("source and destination");
|
1189
|
+
dom.appendChild(el3, el4);
|
1190
|
+
dom.appendChild(el2, el3);
|
1191
|
+
var el3 = dom.createTextNode(".");
|
1192
|
+
dom.appendChild(el2, el3);
|
1193
|
+
dom.appendChild(el1, el2);
|
1194
|
+
var el2 = dom.createElement("p");
|
1195
|
+
var el3 = dom.createTextNode("Then give names to the associations. These should finish the sentence \"SOURCE/DESTINATION MODEL has one/many...\" (e.g. Person has many ");
|
1196
|
+
dom.appendChild(el2, el3);
|
1197
|
+
var el3 = dom.createElement("strong");
|
1198
|
+
var el4 = dom.createTextNode("comments");
|
1199
|
+
dom.appendChild(el3, el4);
|
1200
|
+
dom.appendChild(el2, el3);
|
1201
|
+
var el3 = dom.createTextNode(" / Comment has one ");
|
1202
|
+
dom.appendChild(el2, el3);
|
1203
|
+
var el3 = dom.createElement("strong");
|
1204
|
+
var el4 = dom.createTextNode("person");
|
1205
|
+
dom.appendChild(el3, el4);
|
1206
|
+
dom.appendChild(el2, el3);
|
1207
|
+
var el3 = dom.createTextNode(")");
|
1208
|
+
dom.appendChild(el2, el3);
|
1209
|
+
dom.appendChild(el1, el2);
|
1210
|
+
var el2 = dom.createElement("p");
|
1211
|
+
var el3 = dom.createTextNode("Lastly give a relationship type. This should complete the sentence \"SOURCE MODEL ... DESTINATION MODEL\" (e.g. Person ");
|
1212
|
+
dom.appendChild(el2, el3);
|
1213
|
+
var el3 = dom.createElement("strong");
|
1214
|
+
var el4 = dom.createTextNode("wrote_comment");
|
1215
|
+
dom.appendChild(el3, el4);
|
1216
|
+
dom.appendChild(el2, el3);
|
1217
|
+
var el3 = dom.createTextNode(" Comment)");
|
1218
|
+
dom.appendChild(el2, el3);
|
1219
|
+
dom.appendChild(el1, el2);
|
1220
|
+
var el2 = dom.createElement("p");
|
1221
|
+
var el3 = dom.createTextNode("Rules");
|
1222
|
+
dom.appendChild(el2, el3);
|
1223
|
+
dom.appendChild(el1, el2);
|
1224
|
+
var el2 = dom.createElement("ul");
|
1225
|
+
var el3 = dom.createElement("li");
|
1226
|
+
var el4 = dom.createTextNode("For name, opposite name, and relationship type spaces will be converted to underscores (_)");
|
1227
|
+
dom.appendChild(el3, el4);
|
1228
|
+
dom.appendChild(el2, el3);
|
1229
|
+
var el3 = dom.createElement("li");
|
1230
|
+
var el4 = dom.createTextNode("Name and opposite name cannot start with numbers and cannot be upper case");
|
1231
|
+
dom.appendChild(el3, el4);
|
1232
|
+
dom.appendChild(el2, el3);
|
1233
|
+
dom.appendChild(el1, el2);
|
1234
|
+
dom.appendChild(el0, el1);
|
1235
|
+
var el1 = dom.createElement("form");
|
1236
|
+
dom.setAttribute(el1,"class","form-horizontal");
|
1237
|
+
var el2 = dom.createElement("div");
|
1238
|
+
dom.setAttribute(el2,"class","form-group");
|
1239
|
+
var el3 = dom.createElement("label");
|
1240
|
+
var el4 = dom.createElement("div");
|
1241
|
+
dom.setAttribute(el4,"class","col-sm-2 control-label");
|
1242
|
+
var el5 = dom.createTextNode("Join Type");
|
1243
|
+
dom.appendChild(el4, el5);
|
1244
|
+
dom.appendChild(el3, el4);
|
1245
|
+
var el4 = dom.createElement("div");
|
1246
|
+
dom.setAttribute(el4,"class","col-sm-4");
|
1247
|
+
var el5 = dom.createComment("");
|
1248
|
+
dom.appendChild(el4, el5);
|
1249
|
+
dom.appendChild(el3, el4);
|
1250
|
+
var el4 = dom.createElement("div");
|
1251
|
+
dom.setAttribute(el4,"class","col-sm-6");
|
1252
|
+
var el5 = dom.createComment("");
|
1253
|
+
dom.appendChild(el4, el5);
|
1254
|
+
dom.appendChild(el3, el4);
|
1255
|
+
dom.appendChild(el2, el3);
|
1256
|
+
dom.appendChild(el1, el2);
|
1257
|
+
var el2 = dom.createElement("div");
|
1258
|
+
dom.setAttribute(el2,"class","form-group");
|
1259
|
+
var el3 = dom.createElement("label");
|
1260
|
+
var el4 = dom.createElement("div");
|
1261
|
+
dom.setAttribute(el4,"class","col-sm-2 control-label");
|
1262
|
+
var el5 = dom.createTextNode("Source Model");
|
1263
|
+
dom.appendChild(el4, el5);
|
1264
|
+
dom.appendChild(el3, el4);
|
1265
|
+
var el4 = dom.createElement("div");
|
1266
|
+
dom.setAttribute(el4,"class","col-sm-10");
|
1267
|
+
var el5 = dom.createComment("");
|
1268
|
+
dom.appendChild(el4, el5);
|
1269
|
+
dom.appendChild(el3, el4);
|
1270
|
+
dom.appendChild(el2, el3);
|
1271
|
+
dom.appendChild(el1, el2);
|
1272
|
+
var el2 = dom.createElement("div");
|
1273
|
+
dom.setAttribute(el2,"class","form-group");
|
1274
|
+
var el3 = dom.createElement("label");
|
1275
|
+
var el4 = dom.createElement("div");
|
1276
|
+
dom.setAttribute(el4,"class","col-sm-2 control-label");
|
1277
|
+
var el5 = dom.createTextNode("Destination Model");
|
1278
|
+
dom.appendChild(el4, el5);
|
1279
|
+
dom.appendChild(el3, el4);
|
1280
|
+
var el4 = dom.createElement("div");
|
1281
|
+
dom.setAttribute(el4,"class","col-sm-10");
|
1282
|
+
var el5 = dom.createComment("");
|
1283
|
+
dom.appendChild(el4, el5);
|
1284
|
+
dom.appendChild(el3, el4);
|
1285
|
+
dom.appendChild(el2, el3);
|
1286
|
+
dom.appendChild(el1, el2);
|
1287
|
+
var el2 = dom.createElement("div");
|
1288
|
+
dom.setAttribute(el2,"class","form-group");
|
1289
|
+
var el3 = dom.createElement("label");
|
1290
|
+
var el4 = dom.createElement("div");
|
1291
|
+
dom.setAttribute(el4,"class","col-sm-2 control-label");
|
1292
|
+
var el5 = dom.createTextNode("Name");
|
1293
|
+
dom.appendChild(el4, el5);
|
1294
|
+
var el5 = dom.createComment("");
|
1295
|
+
dom.appendChild(el4, el5);
|
1296
|
+
dom.appendChild(el3, el4);
|
1297
|
+
var el4 = dom.createElement("div");
|
1298
|
+
dom.setAttribute(el4,"class","col-sm-10");
|
1299
|
+
var el5 = dom.createComment("");
|
1300
|
+
dom.appendChild(el4, el5);
|
1301
|
+
dom.appendChild(el3, el4);
|
1302
|
+
dom.appendChild(el2, el3);
|
1303
|
+
dom.appendChild(el1, el2);
|
1304
|
+
var el2 = dom.createElement("div");
|
1305
|
+
dom.setAttribute(el2,"class","form-group");
|
1306
|
+
var el3 = dom.createElement("label");
|
1307
|
+
var el4 = dom.createElement("div");
|
1308
|
+
dom.setAttribute(el4,"class","col-sm-2 control-label");
|
1309
|
+
var el5 = dom.createTextNode("Opposite Name");
|
1310
|
+
dom.appendChild(el4, el5);
|
1311
|
+
var el5 = dom.createComment("");
|
1312
|
+
dom.appendChild(el4, el5);
|
1313
|
+
dom.appendChild(el3, el4);
|
1314
|
+
var el4 = dom.createElement("div");
|
1315
|
+
dom.setAttribute(el4,"class","col-sm-10");
|
1316
|
+
var el5 = dom.createComment("");
|
1317
|
+
dom.appendChild(el4, el5);
|
1318
|
+
dom.appendChild(el3, el4);
|
1319
|
+
dom.appendChild(el2, el3);
|
1320
|
+
dom.appendChild(el1, el2);
|
1321
|
+
var el2 = dom.createElement("div");
|
1322
|
+
dom.setAttribute(el2,"class","form-group");
|
1323
|
+
var el3 = dom.createElement("label");
|
1324
|
+
var el4 = dom.createElement("div");
|
1325
|
+
dom.setAttribute(el4,"class","col-sm-2 control-label");
|
1326
|
+
var el5 = dom.createTextNode("Relationship Type");
|
1327
|
+
dom.appendChild(el4, el5);
|
1328
|
+
var el5 = dom.createComment("");
|
1329
|
+
dom.appendChild(el4, el5);
|
1330
|
+
dom.appendChild(el3, el4);
|
1331
|
+
var el4 = dom.createElement("div");
|
1332
|
+
dom.setAttribute(el4,"class","col-sm-10");
|
1333
|
+
var el5 = dom.createComment("");
|
1334
|
+
dom.appendChild(el4, el5);
|
1335
|
+
dom.appendChild(el3, el4);
|
1336
|
+
dom.appendChild(el2, el3);
|
1337
|
+
dom.appendChild(el1, el2);
|
1338
|
+
dom.appendChild(el0, el1);
|
1339
|
+
var el1 = dom.createElement("div");
|
1340
|
+
dom.setAttribute(el1,"class","form-group");
|
1341
|
+
var el2 = dom.createElement("button");
|
1342
|
+
dom.setAttribute(el2,"class","btn btn-primary");
|
1343
|
+
var el3 = dom.createTextNode("Create Association");
|
1344
|
+
dom.appendChild(el2, el3);
|
1345
|
+
dom.appendChild(el1, el2);
|
1346
|
+
dom.appendChild(el0, el1);
|
1347
|
+
return el0;
|
1348
|
+
},
|
1349
|
+
render: function render(context, env, contextualElement) {
|
1350
|
+
var dom = env.dom;
|
1351
|
+
var hooks = env.hooks, get = hooks.get, inline = hooks.inline, block = hooks.block, element = hooks.element;
|
1352
|
+
dom.detectNamespace(contextualElement);
|
1353
|
+
var fragment;
|
1354
|
+
if (env.useFragmentCache && dom.canClone) {
|
1355
|
+
if (this.cachedFragment === null) {
|
1356
|
+
fragment = this.build(dom);
|
1357
|
+
if (this.hasRendered) {
|
1358
|
+
this.cachedFragment = fragment;
|
1359
|
+
} else {
|
1360
|
+
this.hasRendered = true;
|
1361
|
+
}
|
1362
|
+
}
|
1363
|
+
if (this.cachedFragment) {
|
1364
|
+
fragment = dom.cloneNode(this.cachedFragment, true);
|
1365
|
+
}
|
1366
|
+
} else {
|
1367
|
+
fragment = this.build(dom);
|
1368
|
+
}
|
1369
|
+
var element3 = dom.childAt(fragment, [1]);
|
1370
|
+
var element4 = dom.childAt(element3, [0, 0]);
|
1371
|
+
var element5 = dom.childAt(element3, [3, 0]);
|
1372
|
+
var element6 = dom.childAt(element3, [4, 0]);
|
1373
|
+
var element7 = dom.childAt(element3, [5, 0]);
|
1374
|
+
var element8 = dom.childAt(fragment, [2, 0]);
|
1375
|
+
var morph0 = dom.createMorphAt(dom.childAt(element4, [1]),0,0);
|
1376
|
+
var morph1 = dom.createMorphAt(dom.childAt(element4, [2]),0,0);
|
1377
|
+
var morph2 = dom.createMorphAt(dom.childAt(element3, [1, 0, 1]),0,0);
|
1378
|
+
var morph3 = dom.createMorphAt(dom.childAt(element3, [2, 0, 1]),0,0);
|
1379
|
+
var morph4 = dom.createMorphAt(dom.childAt(element5, [0]),1,1);
|
1380
|
+
var morph5 = dom.createMorphAt(dom.childAt(element5, [1]),0,0);
|
1381
|
+
var morph6 = dom.createMorphAt(dom.childAt(element6, [0]),1,1);
|
1382
|
+
var morph7 = dom.createMorphAt(dom.childAt(element6, [1]),0,0);
|
1383
|
+
var morph8 = dom.createMorphAt(dom.childAt(element7, [0]),1,1);
|
1384
|
+
var morph9 = dom.createMorphAt(dom.childAt(element7, [1]),0,0);
|
1385
|
+
inline(env, morph0, context, "view", ["select"], {"content": get(env, context, "model.join_types"), "selectionBinding": "model.has_association.join_type", "prompt": "Please Select", "class": "form-control"});
|
1386
|
+
inline(env, morph1, context, "has-association-diagram", [], {"has_association": get(env, context, "model.has_association")});
|
1387
|
+
inline(env, morph2, context, "view", ["select"], {"content": get(env, context, "model.models"), "optionValuePath": "content.id", "optionLabelPath": "content.class_name", "selectionBinding": "model.has_association.from_model", "prompt": "Please Select", "class": "form-control"});
|
1388
|
+
inline(env, morph3, context, "view", ["select"], {"content": get(env, context, "model.models"), "optionValuePath": "content.id", "optionLabelPath": "content.class_name", "selectionBinding": "model.has_association.to_model", "prompt": "Please Select", "class": "form-control"});
|
1389
|
+
block(env, morph4, context, "if", [get(env, context, "model.has_association.source_is_defined")], {}, child0, null);
|
1390
|
+
inline(env, morph5, context, "input", [], {"valueBinding": "model.has_association.name", "class": "form-control"});
|
1391
|
+
block(env, morph6, context, "if", [get(env, context, "model.has_association.destination_is_defined")], {}, child1, null);
|
1392
|
+
inline(env, morph7, context, "input", [], {"valueBinding": "model.has_association.opposite_name", "class": "form-control"});
|
1393
|
+
block(env, morph8, context, "if", [get(env, context, "model.has_association.models_are_defined")], {}, child2, null);
|
1394
|
+
inline(env, morph9, context, "input", [], {"valueBinding": "model.has_association.relationship_type", "class": "form-control"});
|
1395
|
+
element(env, element8, context, "action", ["create", get(env, context, "model.has_association")], {"on": "click"});
|
1396
|
+
return fragment;
|
1397
|
+
}
|
1398
|
+
};
|
1399
|
+
}()));
|
1400
|
+
|
1401
|
+
});
|
1402
|
+
define('ember-src/templates/index', ['exports'], function (exports) {
|
1403
|
+
|
1404
|
+
'use strict';
|
1405
|
+
|
1406
|
+
exports['default'] = Ember.HTMLBars.template((function() {
|
1407
|
+
return {
|
1408
|
+
isHTMLBars: true,
|
1409
|
+
revision: "Ember@1.11.1",
|
1410
|
+
blockParams: 0,
|
1411
|
+
cachedFragment: null,
|
1412
|
+
hasRendered: false,
|
1413
|
+
build: function build(dom) {
|
1414
|
+
var el0 = dom.createDocumentFragment();
|
1415
|
+
var el1 = dom.createElement("ul");
|
1416
|
+
dom.setAttribute(el1,"class","list-group");
|
1417
|
+
var el2 = dom.createElement("li");
|
1418
|
+
dom.setAttribute(el2,"class","list-group-item");
|
1419
|
+
var el3 = dom.createComment("");
|
1420
|
+
dom.appendChild(el2, el3);
|
1421
|
+
dom.appendChild(el1, el2);
|
1422
|
+
var el2 = dom.createElement("li");
|
1423
|
+
dom.setAttribute(el2,"class","list-group-item");
|
1424
|
+
var el3 = dom.createComment("");
|
1425
|
+
dom.appendChild(el2, el3);
|
1426
|
+
dom.appendChild(el1, el2);
|
1427
|
+
dom.appendChild(el0, el1);
|
1428
|
+
return el0;
|
1429
|
+
},
|
1430
|
+
render: function render(context, env, contextualElement) {
|
1431
|
+
var dom = env.dom;
|
1432
|
+
var hooks = env.hooks, inline = hooks.inline;
|
1433
|
+
dom.detectNamespace(contextualElement);
|
1434
|
+
var fragment;
|
1435
|
+
if (env.useFragmentCache && dom.canClone) {
|
1436
|
+
if (this.cachedFragment === null) {
|
1437
|
+
fragment = this.build(dom);
|
1438
|
+
if (this.hasRendered) {
|
1439
|
+
this.cachedFragment = fragment;
|
1440
|
+
} else {
|
1441
|
+
this.hasRendered = true;
|
1442
|
+
}
|
1443
|
+
}
|
1444
|
+
if (this.cachedFragment) {
|
1445
|
+
fragment = dom.cloneNode(this.cachedFragment, true);
|
1446
|
+
}
|
1447
|
+
} else {
|
1448
|
+
fragment = this.build(dom);
|
1449
|
+
}
|
1450
|
+
var element0 = dom.childAt(fragment, [0]);
|
1451
|
+
var morph0 = dom.createMorphAt(dom.childAt(element0, [0]),0,0);
|
1452
|
+
var morph1 = dom.createMorphAt(dom.childAt(element0, [1]),0,0);
|
1453
|
+
inline(env, morph0, context, "link-to", ["Models", "models.hierarchy"], {});
|
1454
|
+
inline(env, morph1, context, "link-to", ["Associations", "has_associations.index"], {});
|
1455
|
+
return fragment;
|
1456
|
+
}
|
1457
|
+
};
|
1458
|
+
}()));
|
1459
|
+
|
1460
|
+
});
|
1461
|
+
define('ember-src/templates/models/edit', ['exports'], function (exports) {
|
1462
|
+
|
1463
|
+
'use strict';
|
1464
|
+
|
1465
|
+
exports['default'] = Ember.HTMLBars.template((function() {
|
1466
|
+
var child0 = (function() {
|
1467
|
+
return {
|
1468
|
+
isHTMLBars: true,
|
1469
|
+
revision: "Ember@1.11.1",
|
1470
|
+
blockParams: 0,
|
1471
|
+
cachedFragment: null,
|
1472
|
+
hasRendered: false,
|
1473
|
+
build: function build(dom) {
|
1474
|
+
var el0 = dom.createDocumentFragment();
|
1475
|
+
var el1 = dom.createElement("div");
|
1476
|
+
var el2 = dom.createElement("i");
|
1477
|
+
dom.setAttribute(el2,"class","glyphicon glyphicon-remove-circle close pull-right");
|
1478
|
+
dom.appendChild(el1, el2);
|
1479
|
+
var el2 = dom.createElement("label");
|
1480
|
+
var el3 = dom.createElement("div");
|
1481
|
+
dom.setAttribute(el3,"class","col-sm-2 control-label");
|
1482
|
+
var el4 = dom.createTextNode("Name");
|
1483
|
+
dom.appendChild(el3, el4);
|
1484
|
+
dom.appendChild(el2, el3);
|
1485
|
+
var el3 = dom.createElement("div");
|
1486
|
+
dom.setAttribute(el3,"class","col-sm-10");
|
1487
|
+
var el4 = dom.createComment("");
|
1488
|
+
dom.appendChild(el3, el4);
|
1489
|
+
dom.appendChild(el2, el3);
|
1490
|
+
dom.appendChild(el1, el2);
|
1491
|
+
var el2 = dom.createElement("label");
|
1492
|
+
var el3 = dom.createElement("div");
|
1493
|
+
dom.setAttribute(el3,"class","col-sm-2 control-label");
|
1494
|
+
var el4 = dom.createTextNode("Type");
|
1495
|
+
dom.appendChild(el3, el4);
|
1496
|
+
dom.appendChild(el2, el3);
|
1497
|
+
var el3 = dom.createElement("div");
|
1498
|
+
dom.setAttribute(el3,"class","col-sm-10");
|
1499
|
+
var el4 = dom.createComment("");
|
1500
|
+
dom.appendChild(el3, el4);
|
1501
|
+
dom.appendChild(el2, el3);
|
1502
|
+
dom.appendChild(el1, el2);
|
1503
|
+
dom.appendChild(el0, el1);
|
1504
|
+
return el0;
|
1505
|
+
},
|
1506
|
+
render: function render(context, env, contextualElement) {
|
1507
|
+
var dom = env.dom;
|
1508
|
+
var hooks = env.hooks, element = hooks.element, get = hooks.get, inline = hooks.inline;
|
1509
|
+
dom.detectNamespace(contextualElement);
|
1510
|
+
var fragment;
|
1511
|
+
if (env.useFragmentCache && dom.canClone) {
|
1512
|
+
if (this.cachedFragment === null) {
|
1513
|
+
fragment = this.build(dom);
|
1514
|
+
if (this.hasRendered) {
|
1515
|
+
this.cachedFragment = fragment;
|
1516
|
+
} else {
|
1517
|
+
this.hasRendered = true;
|
1518
|
+
}
|
1519
|
+
}
|
1520
|
+
if (this.cachedFragment) {
|
1521
|
+
fragment = dom.cloneNode(this.cachedFragment, true);
|
1522
|
+
}
|
1523
|
+
} else {
|
1524
|
+
fragment = this.build(dom);
|
1525
|
+
}
|
1526
|
+
var element0 = dom.childAt(fragment, [0]);
|
1527
|
+
var element1 = dom.childAt(element0, [0]);
|
1528
|
+
var morph0 = dom.createMorphAt(dom.childAt(element0, [1, 1]),0,0);
|
1529
|
+
var morph1 = dom.createMorphAt(dom.childAt(element0, [2, 1]),0,0);
|
1530
|
+
element(env, element0, context, "bind-attr", [], {"class": ":well :property :col-sm-6 property.isDirty:has-warning:"});
|
1531
|
+
element(env, element1, context, "action", ["delete_property", get(env, context, "property")], {"on": "click"});
|
1532
|
+
inline(env, morph0, context, "focus-input", [], {"valueBinding": "property.name", "class": "form-control"});
|
1533
|
+
inline(env, morph1, context, "view", ["select"], {"content": get(env, context, "property_types"), "valueBinding": "property.type", "class": "form-control"});
|
1534
|
+
return fragment;
|
1535
|
+
}
|
1536
|
+
};
|
1537
|
+
}());
|
1538
|
+
return {
|
1539
|
+
isHTMLBars: true,
|
1540
|
+
revision: "Ember@1.11.1",
|
1541
|
+
blockParams: 0,
|
1542
|
+
cachedFragment: null,
|
1543
|
+
hasRendered: false,
|
1544
|
+
build: function build(dom) {
|
1545
|
+
var el0 = dom.createDocumentFragment();
|
1546
|
+
var el1 = dom.createElement("div");
|
1547
|
+
dom.setAttribute(el1,"class","form-group");
|
1548
|
+
var el2 = dom.createElement("label");
|
1549
|
+
var el3 = dom.createElement("div");
|
1550
|
+
dom.setAttribute(el3,"class","col-sm-2 control-label");
|
1551
|
+
var el4 = dom.createTextNode("Class Name");
|
1552
|
+
dom.appendChild(el3, el4);
|
1553
|
+
dom.appendChild(el2, el3);
|
1554
|
+
var el3 = dom.createElement("div");
|
1555
|
+
dom.setAttribute(el3,"class","col-sm-10");
|
1556
|
+
var el4 = dom.createComment("");
|
1557
|
+
dom.appendChild(el3, el4);
|
1558
|
+
dom.appendChild(el2, el3);
|
1559
|
+
dom.appendChild(el1, el2);
|
1560
|
+
dom.appendChild(el0, el1);
|
1561
|
+
var el1 = dom.createElement("div");
|
1562
|
+
dom.setAttribute(el1,"class","form-group");
|
1563
|
+
var el2 = dom.createElement("label");
|
1564
|
+
var el3 = dom.createElement("div");
|
1565
|
+
dom.setAttribute(el3,"class","col-sm-2 control-label");
|
1566
|
+
var el4 = dom.createTextNode("Inherits from");
|
1567
|
+
dom.appendChild(el3, el4);
|
1568
|
+
dom.appendChild(el2, el3);
|
1569
|
+
var el3 = dom.createElement("div");
|
1570
|
+
dom.setAttribute(el3,"class","col-sm-10");
|
1571
|
+
var el4 = dom.createComment("");
|
1572
|
+
dom.appendChild(el3, el4);
|
1573
|
+
dom.appendChild(el2, el3);
|
1574
|
+
dom.appendChild(el1, el2);
|
1575
|
+
dom.appendChild(el0, el1);
|
1576
|
+
var el1 = dom.createElement("div");
|
1577
|
+
dom.setAttribute(el1,"class","properties row");
|
1578
|
+
var el2 = dom.createElement("h2");
|
1579
|
+
var el3 = dom.createTextNode("Properties ");
|
1580
|
+
dom.appendChild(el2, el3);
|
1581
|
+
var el3 = dom.createElement("a");
|
1582
|
+
dom.setAttribute(el3,"class","add btn btn-default");
|
1583
|
+
var el4 = dom.createTextNode("Add Property");
|
1584
|
+
dom.appendChild(el3, el4);
|
1585
|
+
dom.appendChild(el2, el3);
|
1586
|
+
dom.appendChild(el1, el2);
|
1587
|
+
var el2 = dom.createElement("div");
|
1588
|
+
dom.setAttribute(el2,"class","form-group");
|
1589
|
+
var el3 = dom.createElement("label");
|
1590
|
+
var el4 = dom.createElement("div");
|
1591
|
+
dom.setAttribute(el4,"class","col-sm-2 control-label");
|
1592
|
+
var el5 = dom.createTextNode("ID Property");
|
1593
|
+
dom.appendChild(el4, el5);
|
1594
|
+
dom.appendChild(el3, el4);
|
1595
|
+
var el4 = dom.createElement("div");
|
1596
|
+
dom.setAttribute(el4,"class","col-sm-10");
|
1597
|
+
var el5 = dom.createComment("");
|
1598
|
+
dom.appendChild(el4, el5);
|
1599
|
+
dom.appendChild(el3, el4);
|
1600
|
+
dom.appendChild(el2, el3);
|
1601
|
+
dom.appendChild(el1, el2);
|
1602
|
+
var el2 = dom.createComment("");
|
1603
|
+
dom.appendChild(el1, el2);
|
1604
|
+
dom.appendChild(el0, el1);
|
1605
|
+
var el1 = dom.createElement("div");
|
1606
|
+
dom.setAttribute(el1,"class","form-group");
|
1607
|
+
var el2 = dom.createElement("button");
|
1608
|
+
dom.setAttribute(el2,"class","btn btn-danger pull-right");
|
1609
|
+
var el3 = dom.createTextNode("DELETE!");
|
1610
|
+
dom.appendChild(el2, el3);
|
1611
|
+
dom.appendChild(el1, el2);
|
1612
|
+
dom.appendChild(el0, el1);
|
1613
|
+
var el1 = dom.createElement("div");
|
1614
|
+
dom.setAttribute(el1,"class","form-group");
|
1615
|
+
var el2 = dom.createElement("button");
|
1616
|
+
dom.setAttribute(el2,"class","btn btn-primary");
|
1617
|
+
var el3 = dom.createTextNode("Update");
|
1618
|
+
dom.appendChild(el2, el3);
|
1619
|
+
dom.appendChild(el1, el2);
|
1620
|
+
dom.appendChild(el0, el1);
|
1621
|
+
return el0;
|
1622
|
+
},
|
1623
|
+
render: function render(context, env, contextualElement) {
|
1624
|
+
var dom = env.dom;
|
1625
|
+
var hooks = env.hooks, inline = hooks.inline, get = hooks.get, element = hooks.element, block = hooks.block;
|
1626
|
+
dom.detectNamespace(contextualElement);
|
1627
|
+
var fragment;
|
1628
|
+
if (env.useFragmentCache && dom.canClone) {
|
1629
|
+
if (this.cachedFragment === null) {
|
1630
|
+
fragment = this.build(dom);
|
1631
|
+
if (this.hasRendered) {
|
1632
|
+
this.cachedFragment = fragment;
|
1633
|
+
} else {
|
1634
|
+
this.hasRendered = true;
|
1635
|
+
}
|
1636
|
+
}
|
1637
|
+
if (this.cachedFragment) {
|
1638
|
+
fragment = dom.cloneNode(this.cachedFragment, true);
|
1639
|
+
}
|
1640
|
+
} else {
|
1641
|
+
fragment = this.build(dom);
|
1642
|
+
}
|
1643
|
+
var element2 = dom.childAt(fragment, [2]);
|
1644
|
+
var element3 = dom.childAt(element2, [0, 1]);
|
1645
|
+
var element4 = dom.childAt(fragment, [3, 0]);
|
1646
|
+
var element5 = dom.childAt(fragment, [4, 0]);
|
1647
|
+
var morph0 = dom.createMorphAt(dom.childAt(fragment, [0, 0, 1]),0,0);
|
1648
|
+
var morph1 = dom.createMorphAt(dom.childAt(fragment, [1, 0, 1]),0,0);
|
1649
|
+
var morph2 = dom.createMorphAt(dom.childAt(element2, [1, 0, 1]),0,0);
|
1650
|
+
var morph3 = dom.createMorphAt(element2,2,2);
|
1651
|
+
inline(env, morph0, context, "input", [], {"valueBinding": "model.model.class_name", "class": "form-control"});
|
1652
|
+
inline(env, morph1, context, "view", ["select"], {"content": get(env, context, "model.models"), "optionValuePath": "content.id", "optionLabelPath": "content.class_name", "selectionBinding": "model.model.superclass_model", "class": "form-control"});
|
1653
|
+
element(env, element3, context, "action", ["add_property", get(env, context, "model.model")], {"on": "click"});
|
1654
|
+
inline(env, morph2, context, "view", ["select"], {"content": get(env, context, "model.model.properties"), "selectionBinding": "model.model.id_property", "optionValuePath": "content.id", "optionLabelPath": "content.name", "prompt": "Auto", "class": "form-control"});
|
1655
|
+
block(env, morph3, context, "each", [get(env, context, "model.model.properties")], {"keyword": "property"}, child0, null);
|
1656
|
+
element(env, element4, context, "action", ["delete", get(env, context, "model.model")], {"on": "click"});
|
1657
|
+
element(env, element5, context, "action", ["save", get(env, context, "model.model")], {"on": "click"});
|
1658
|
+
return fragment;
|
1659
|
+
}
|
1660
|
+
};
|
1661
|
+
}()));
|
1662
|
+
|
1663
|
+
});
|
1664
|
+
define('ember-src/templates/models/hierarchy', ['exports'], function (exports) {
|
1665
|
+
|
1666
|
+
'use strict';
|
1667
|
+
|
1668
|
+
exports['default'] = Ember.HTMLBars.template((function() {
|
1669
|
+
return {
|
1670
|
+
isHTMLBars: true,
|
1671
|
+
revision: "Ember@1.11.1",
|
1672
|
+
blockParams: 0,
|
1673
|
+
cachedFragment: null,
|
1674
|
+
hasRendered: false,
|
1675
|
+
build: function build(dom) {
|
1676
|
+
var el0 = dom.createDocumentFragment();
|
1677
|
+
var el1 = dom.createElement("div");
|
1678
|
+
dom.setAttribute(el1,"class","well well-sm");
|
1679
|
+
var el2 = dom.createElement("p");
|
1680
|
+
var el3 = dom.createTextNode("Here you can create new models and edit existing models.");
|
1681
|
+
dom.appendChild(el2, el3);
|
1682
|
+
dom.appendChild(el1, el2);
|
1683
|
+
var el2 = dom.createElement("p");
|
1684
|
+
var el3 = dom.createTextNode("To create a model, enter the model name in the box below and click the button");
|
1685
|
+
dom.appendChild(el2, el3);
|
1686
|
+
dom.appendChild(el1, el2);
|
1687
|
+
var el2 = dom.createElement("p");
|
1688
|
+
var el3 = dom.createTextNode("To edit a model, simply click on a model from the list");
|
1689
|
+
dom.appendChild(el2, el3);
|
1690
|
+
dom.appendChild(el1, el2);
|
1691
|
+
dom.appendChild(el0, el1);
|
1692
|
+
var el1 = dom.createElement("div");
|
1693
|
+
dom.setAttribute(el1,"class","row");
|
1694
|
+
var el2 = dom.createElement("div");
|
1695
|
+
dom.setAttribute(el2,"class","col-sm-11");
|
1696
|
+
var el3 = dom.createComment("");
|
1697
|
+
dom.appendChild(el2, el3);
|
1698
|
+
dom.appendChild(el1, el2);
|
1699
|
+
var el2 = dom.createElement("a");
|
1700
|
+
dom.setAttribute(el2,"class","btn btn-default add-model-btn col-sm-1");
|
1701
|
+
var el3 = dom.createTextNode("+");
|
1702
|
+
dom.appendChild(el2, el3);
|
1703
|
+
dom.appendChild(el1, el2);
|
1704
|
+
dom.appendChild(el0, el1);
|
1705
|
+
var el1 = dom.createComment("");
|
1706
|
+
dom.appendChild(el0, el1);
|
1707
|
+
return el0;
|
1708
|
+
},
|
1709
|
+
render: function render(context, env, contextualElement) {
|
1710
|
+
var dom = env.dom;
|
1711
|
+
var hooks = env.hooks, get = hooks.get, inline = hooks.inline, element = hooks.element;
|
1712
|
+
dom.detectNamespace(contextualElement);
|
1713
|
+
var fragment;
|
1714
|
+
if (env.useFragmentCache && dom.canClone) {
|
1715
|
+
if (this.cachedFragment === null) {
|
1716
|
+
fragment = this.build(dom);
|
1717
|
+
if (this.hasRendered) {
|
1718
|
+
this.cachedFragment = fragment;
|
1719
|
+
} else {
|
1720
|
+
this.hasRendered = true;
|
1721
|
+
}
|
1722
|
+
}
|
1723
|
+
if (this.cachedFragment) {
|
1724
|
+
fragment = dom.cloneNode(this.cachedFragment, true);
|
1725
|
+
}
|
1726
|
+
} else {
|
1727
|
+
fragment = this.build(dom);
|
1728
|
+
}
|
1729
|
+
var element0 = dom.childAt(fragment, [1]);
|
1730
|
+
var element1 = dom.childAt(element0, [1]);
|
1731
|
+
var morph0 = dom.createMorphAt(dom.childAt(element0, [0]),0,0);
|
1732
|
+
var morph1 = dom.createMorphAt(fragment,2,2,contextualElement);
|
1733
|
+
dom.insertBoundary(fragment, null);
|
1734
|
+
inline(env, morph0, context, "input", [], {"value": get(env, context, "new_model_name"), "placeholder": "Model Name", "class": "form-control"});
|
1735
|
+
element(env, element1, context, "action", ["add_model"], {"on": "click"});
|
1736
|
+
inline(env, morph1, context, "model-list", [], {"node": get(env, context, "model"), "id": "model-list", "class": "nested-list-group"});
|
1737
|
+
return fragment;
|
1738
|
+
}
|
1739
|
+
};
|
1740
|
+
}()));
|
1741
|
+
|
1742
|
+
});
|
1743
|
+
define('ember-src/tests/helpers/resolver', ['exports', 'ember/resolver', 'ember-src/config/environment'], function (exports, Resolver, config) {
|
1744
|
+
|
1745
|
+
'use strict';
|
1746
|
+
|
1747
|
+
var resolver = Resolver['default'].create();
|
1748
|
+
|
1749
|
+
resolver.namespace = {
|
1750
|
+
modulePrefix: config['default'].modulePrefix,
|
1751
|
+
podModulePrefix: config['default'].podModulePrefix
|
1752
|
+
};
|
1753
|
+
|
1754
|
+
exports['default'] = resolver;
|
1755
|
+
|
1756
|
+
});
|
1757
|
+
define('ember-src/tests/helpers/resolver.jshint', function () {
|
1758
|
+
|
1759
|
+
'use strict';
|
1760
|
+
|
1761
|
+
module('JSHint - helpers');
|
1762
|
+
test('helpers/resolver.js should pass jshint', function() {
|
1763
|
+
ok(true, 'helpers/resolver.js should pass jshint.');
|
1764
|
+
});
|
1765
|
+
|
1766
|
+
});
|
1767
|
+
define('ember-src/tests/helpers/start-app', ['exports', 'ember', 'ember-src/app', 'ember-src/router', 'ember-src/config/environment'], function (exports, Ember, Application, Router, config) {
|
1768
|
+
|
1769
|
+
'use strict';
|
1770
|
+
|
1771
|
+
|
1772
|
+
|
1773
|
+
exports['default'] = startApp;
|
1774
|
+
function startApp(attrs) {
|
1775
|
+
var application;
|
1776
|
+
|
1777
|
+
var attributes = Ember['default'].merge({}, config['default'].APP);
|
1778
|
+
attributes = Ember['default'].merge(attributes, attrs); // use defaults, but you can override;
|
1779
|
+
|
1780
|
+
Ember['default'].run(function () {
|
1781
|
+
application = Application['default'].create(attributes);
|
1782
|
+
application.setupForTesting();
|
1783
|
+
application.injectTestHelpers();
|
1784
|
+
});
|
1785
|
+
|
1786
|
+
return application;
|
1787
|
+
}
|
1788
|
+
|
1789
|
+
});
|
1790
|
+
define('ember-src/tests/helpers/start-app.jshint', function () {
|
1791
|
+
|
1792
|
+
'use strict';
|
1793
|
+
|
1794
|
+
module('JSHint - helpers');
|
1795
|
+
test('helpers/start-app.js should pass jshint', function() {
|
1796
|
+
ok(true, 'helpers/start-app.js should pass jshint.');
|
1797
|
+
});
|
1798
|
+
|
1799
|
+
});
|
1800
|
+
define('ember-src/tests/test-helper', ['ember-src/tests/helpers/resolver', 'ember-qunit'], function (resolver, ember_qunit) {
|
1801
|
+
|
1802
|
+
'use strict';
|
1803
|
+
|
1804
|
+
ember_qunit.setResolver(resolver['default']);
|
1805
|
+
|
1806
|
+
});
|
1807
|
+
define('ember-src/tests/test-helper.jshint', function () {
|
1808
|
+
|
1809
|
+
'use strict';
|
1810
|
+
|
1811
|
+
module('JSHint - .');
|
1812
|
+
test('test-helper.js should pass jshint', function() {
|
1813
|
+
ok(true, 'test-helper.js should pass jshint.');
|
1814
|
+
});
|
1815
|
+
|
1816
|
+
});
|
1817
|
+
define('ember-src/tests/unit/adapters/application-test', ['ember-qunit'], function (ember_qunit) {
|
1818
|
+
|
1819
|
+
'use strict';
|
1820
|
+
|
1821
|
+
ember_qunit.moduleFor('adapter:application', 'ApplicationAdapter', {});
|
1822
|
+
|
1823
|
+
ember_qunit.test('it exists', function(assert) {
|
1824
|
+
var adapter;
|
1825
|
+
adapter = this.subject();
|
1826
|
+
return assert.ok(adapter);
|
1827
|
+
});
|
1828
|
+
|
1829
|
+
});
|
1830
|
+
define('ember-src/tests/unit/adapters/association-test', ['ember-qunit'], function (ember_qunit) {
|
1831
|
+
|
1832
|
+
'use strict';
|
1833
|
+
|
1834
|
+
ember_qunit.moduleFor('adapter:association', 'AssociationAdapter', {});
|
1835
|
+
|
1836
|
+
ember_qunit.test('it exists', function(assert) {
|
1837
|
+
var adapter;
|
1838
|
+
adapter = this.subject();
|
1839
|
+
return assert.ok(adapter);
|
1840
|
+
});
|
1841
|
+
|
1842
|
+
});
|
1843
|
+
define('ember-src/tests/unit/adapters/meta-model-test', ['ember-qunit'], function (ember_qunit) {
|
1844
|
+
|
1845
|
+
'use strict';
|
1846
|
+
|
1847
|
+
ember_qunit.moduleFor('adapter:meta-model', 'MetaModelAdapter', {});
|
1848
|
+
|
1849
|
+
ember_qunit.test('it exists', function(assert) {
|
1850
|
+
var adapter;
|
1851
|
+
adapter = this.subject();
|
1852
|
+
return assert.ok(adapter);
|
1853
|
+
});
|
1854
|
+
|
1855
|
+
});
|
1856
|
+
define('ember-src/tests/unit/adapters/model-test', ['ember-qunit'], function (ember_qunit) {
|
1857
|
+
|
1858
|
+
'use strict';
|
1859
|
+
|
1860
|
+
ember_qunit.moduleFor('adapter:model', 'ModelAdapter', {});
|
1861
|
+
|
1862
|
+
ember_qunit.test('it exists', function(assert) {
|
1863
|
+
var adapter;
|
1864
|
+
adapter = this.subject();
|
1865
|
+
return assert.ok(adapter);
|
1866
|
+
});
|
1867
|
+
|
1868
|
+
});
|
1869
|
+
define('ember-src/tests/unit/adapters/property-test', ['ember-qunit'], function (ember_qunit) {
|
1870
|
+
|
1871
|
+
'use strict';
|
1872
|
+
|
1873
|
+
ember_qunit.moduleFor('adapter:property', 'PropertyAdapter', {});
|
1874
|
+
|
1875
|
+
ember_qunit.test('it exists', function(assert) {
|
1876
|
+
var adapter;
|
1877
|
+
adapter = this.subject();
|
1878
|
+
return assert.ok(adapter);
|
1879
|
+
});
|
1880
|
+
|
1881
|
+
});
|
1882
|
+
define('ember-src/tests/unit/components/focus-input-test', ['ember-qunit'], function (ember_qunit) {
|
1883
|
+
|
1884
|
+
'use strict';
|
1885
|
+
|
1886
|
+
ember_qunit.moduleForComponent('focus-input', {});
|
1887
|
+
|
1888
|
+
ember_qunit.test('it renders', function(assert) {
|
1889
|
+
var component;
|
1890
|
+
assert.expect(2);
|
1891
|
+
component = this.subject();
|
1892
|
+
assert.equal(component._state, 'preRender');
|
1893
|
+
this.render();
|
1894
|
+
return assert.equal(component._state, 'inDOM');
|
1895
|
+
});
|
1896
|
+
|
1897
|
+
});
|
1898
|
+
define('ember-src/tests/unit/components/model-list-item-test', ['ember-qunit'], function (ember_qunit) {
|
1899
|
+
|
1900
|
+
'use strict';
|
1901
|
+
|
1902
|
+
ember_qunit.moduleForComponent('model-list-item', {});
|
1903
|
+
|
1904
|
+
ember_qunit.test('it renders', function(assert) {
|
1905
|
+
var component;
|
1906
|
+
assert.expect(2);
|
1907
|
+
component = this.subject();
|
1908
|
+
assert.equal(component._state, 'preRender');
|
1909
|
+
this.render();
|
1910
|
+
return assert.equal(component._state, 'inDOM');
|
1911
|
+
});
|
1912
|
+
|
1913
|
+
});
|
1914
|
+
define('ember-src/tests/unit/components/model-list-test', ['ember-qunit'], function (ember_qunit) {
|
1915
|
+
|
1916
|
+
'use strict';
|
1917
|
+
|
1918
|
+
ember_qunit.moduleForComponent('model-list', {});
|
1919
|
+
|
1920
|
+
ember_qunit.test('it renders', function(assert) {
|
1921
|
+
var component;
|
1922
|
+
assert.expect(2);
|
1923
|
+
component = this.subject();
|
1924
|
+
assert.equal(component._state, 'preRender');
|
1925
|
+
this.render();
|
1926
|
+
return assert.equal(component._state, 'inDOM');
|
1927
|
+
});
|
1928
|
+
|
1929
|
+
});
|
1930
|
+
define('ember-src/tests/unit/controllers/application-test', ['ember-qunit'], function (ember_qunit) {
|
1931
|
+
|
1932
|
+
'use strict';
|
1933
|
+
|
1934
|
+
ember_qunit.moduleFor('controller:application', {});
|
1935
|
+
|
1936
|
+
ember_qunit.test('it exists', function(assert) {
|
1937
|
+
var controller;
|
1938
|
+
controller = this.subject();
|
1939
|
+
return assert.ok(controller);
|
1940
|
+
});
|
1941
|
+
|
1942
|
+
});
|
1943
|
+
define('ember-src/tests/unit/controllers/models-edit-test', ['ember-qunit'], function (ember_qunit) {
|
1944
|
+
|
1945
|
+
'use strict';
|
1946
|
+
|
1947
|
+
ember_qunit.moduleFor('controller:models-edit', {});
|
1948
|
+
|
1949
|
+
ember_qunit.test('it exists', function(assert) {
|
1950
|
+
var controller;
|
1951
|
+
controller = this.subject();
|
1952
|
+
return assert.ok(controller);
|
1953
|
+
});
|
1954
|
+
|
1955
|
+
});
|
1956
|
+
define('ember-src/tests/unit/controllers/models-hierarchy-test', ['ember-qunit'], function (ember_qunit) {
|
1957
|
+
|
1958
|
+
'use strict';
|
1959
|
+
|
1960
|
+
ember_qunit.moduleFor('controller:models-hierarchy', {});
|
1961
|
+
|
1962
|
+
ember_qunit.test('it exists', function(assert) {
|
1963
|
+
var controller;
|
1964
|
+
controller = this.subject();
|
1965
|
+
return assert.ok(controller);
|
1966
|
+
});
|
1967
|
+
|
1968
|
+
});
|
1969
|
+
define('ember-src/tests/unit/controllers/models-test', ['ember-qunit'], function (ember_qunit) {
|
1970
|
+
|
1971
|
+
'use strict';
|
1972
|
+
|
1973
|
+
ember_qunit.moduleFor('controller:models', {});
|
1974
|
+
|
1975
|
+
ember_qunit.test('it exists', function(assert) {
|
1976
|
+
var controller;
|
1977
|
+
controller = this.subject();
|
1978
|
+
return assert.ok(controller);
|
1979
|
+
});
|
1980
|
+
|
1981
|
+
});
|
1982
|
+
define('ember-src/tests/unit/helpers/mm-path-test', ['ember-src/helpers/mm-path', 'qunit'], function (mm_path, qunit) {
|
1983
|
+
|
1984
|
+
'use strict';
|
1985
|
+
|
1986
|
+
qunit.module('MmPathHelper');
|
1987
|
+
|
1988
|
+
qunit.test('it works', function(assert) {
|
1989
|
+
var result;
|
1990
|
+
result = mm_path.mmPath(42);
|
1991
|
+
return assert.ok(result);
|
1992
|
+
});
|
1993
|
+
|
1994
|
+
});
|
1995
|
+
define('ember-src/tests/unit/models/has-association-test', ['ember-qunit'], function (ember_qunit) {
|
1996
|
+
|
1997
|
+
'use strict';
|
1998
|
+
|
1999
|
+
ember_qunit.moduleForModel('has-association', {
|
2000
|
+
needs: []
|
2001
|
+
});
|
2002
|
+
|
2003
|
+
ember_qunit.test('it exists', function(assert) {
|
2004
|
+
var model;
|
2005
|
+
model = this.subject();
|
2006
|
+
return assert.ok(!!model);
|
2007
|
+
});
|
2008
|
+
|
2009
|
+
});
|
2010
|
+
define('ember-src/tests/unit/models/model-test', ['ember-qunit'], function (ember_qunit) {
|
2011
|
+
|
2012
|
+
'use strict';
|
2013
|
+
|
2014
|
+
ember_qunit.moduleForModel('model', {
|
2015
|
+
needs: []
|
2016
|
+
});
|
2017
|
+
|
2018
|
+
ember_qunit.test('it exists', function(assert) {
|
2019
|
+
var model;
|
2020
|
+
model = this.subject();
|
2021
|
+
return assert.ok(!!model);
|
2022
|
+
});
|
2023
|
+
|
2024
|
+
});
|
2025
|
+
define('ember-src/tests/unit/models/property-test', ['ember-qunit'], function (ember_qunit) {
|
2026
|
+
|
2027
|
+
'use strict';
|
2028
|
+
|
2029
|
+
ember_qunit.moduleForModel('property', {
|
2030
|
+
needs: []
|
2031
|
+
});
|
2032
|
+
|
2033
|
+
ember_qunit.test('it exists', function(assert) {
|
2034
|
+
var model;
|
2035
|
+
model = this.subject();
|
2036
|
+
return assert.ok(!!model);
|
2037
|
+
});
|
2038
|
+
|
2039
|
+
});
|
2040
|
+
define('ember-src/tests/unit/routes/has-association-index-test', ['ember-qunit'], function (ember_qunit) {
|
2041
|
+
|
2042
|
+
'use strict';
|
2043
|
+
|
2044
|
+
ember_qunit.moduleFor('route:has-association-index', {});
|
2045
|
+
|
2046
|
+
ember_qunit.test('it exists', function(assert) {
|
2047
|
+
var route;
|
2048
|
+
route = this.subject();
|
2049
|
+
return assert.ok(route);
|
2050
|
+
});
|
2051
|
+
|
2052
|
+
});
|
2053
|
+
define('ember-src/tests/unit/routes/has-associations-new-test', ['ember-qunit'], function (ember_qunit) {
|
2054
|
+
|
2055
|
+
'use strict';
|
2056
|
+
|
2057
|
+
ember_qunit.moduleFor('route:has-associations-new', {});
|
2058
|
+
|
2059
|
+
ember_qunit.test('it exists', function(assert) {
|
2060
|
+
var route;
|
2061
|
+
route = this.subject();
|
2062
|
+
return assert.ok(route);
|
2063
|
+
});
|
2064
|
+
|
2065
|
+
});
|
2066
|
+
define('ember-src/tests/unit/routes/models-edit-test', ['ember-qunit'], function (ember_qunit) {
|
2067
|
+
|
2068
|
+
'use strict';
|
2069
|
+
|
2070
|
+
ember_qunit.moduleFor('route:models-edit', {});
|
2071
|
+
|
2072
|
+
ember_qunit.test('it exists', function(assert) {
|
2073
|
+
var route;
|
2074
|
+
route = this.subject();
|
2075
|
+
return assert.ok(route);
|
2076
|
+
});
|
2077
|
+
|
2078
|
+
});
|
2079
|
+
define('ember-src/tests/unit/routes/models-hierarchy-test', ['ember-qunit'], function (ember_qunit) {
|
2080
|
+
|
2081
|
+
'use strict';
|
2082
|
+
|
2083
|
+
ember_qunit.moduleFor('route:models-hierarchy', {});
|
2084
|
+
|
2085
|
+
ember_qunit.test('it exists', function(assert) {
|
2086
|
+
var route;
|
2087
|
+
route = this.subject();
|
2088
|
+
return assert.ok(route);
|
2089
|
+
});
|
2090
|
+
|
2091
|
+
});
|
2092
|
+
define('ember-src/tests/unit/serializers/application-test', ['ember-qunit'], function (ember_qunit) {
|
2093
|
+
|
2094
|
+
'use strict';
|
2095
|
+
|
2096
|
+
ember_qunit.moduleFor('serializer:application', {});
|
2097
|
+
|
2098
|
+
ember_qunit.test('it exists', function(assert) {
|
2099
|
+
var serializer;
|
2100
|
+
serializer = this.subject();
|
2101
|
+
return assert.ok(serializer);
|
2102
|
+
});
|
2103
|
+
|
2104
|
+
});
|
2105
|
+
/* jshint ignore:start */
|
2106
|
+
|
2107
|
+
/* jshint ignore:end */
|
2108
|
+
|
2109
|
+
/* jshint ignore:start */
|
2110
|
+
|
2111
|
+
define('ember-src/config/environment', ['ember'], function(Ember) {
|
2112
|
+
return { 'default': {"modulePrefix":"ember-src","environment":"development","baseURL":"/","locationType":"auto","EmberENV":{"FEATURES":{}},"APP":{"name":"ember-src","version":"0.0.0.8254ab9c"},"contentSecurityPolicyHeader":"Content-Security-Policy-Report-Only","contentSecurityPolicy":{"default-src":"'none'","script-src":"'self' 'unsafe-eval'","font-src":"'self'","connect-src":"'self'","img-src":"'self'","style-src":"'self'","media-src":"'self'"},"exportApplicationGlobal":true}};
|
2113
|
+
});
|
2114
|
+
|
2115
|
+
if (runningTests) {
|
2116
|
+
require("ember-src/tests/test-helper");
|
2117
|
+
} else {
|
2118
|
+
require("ember-src/app")["default"].create({"name":"ember-src","version":"0.0.0.8254ab9c"});
|
2119
|
+
}
|
2120
|
+
|
2121
|
+
/* jshint ignore:end */
|
2122
|
+
//# sourceMappingURL=ember-src.map
|