Skip to content

Commit 65529f4

Browse files
committed
classname fix
1 parent 1c4ed6d commit 65529f4

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

asset/app/js/entities/node_entities.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,8 @@ DesignerApp.module("NodeEntities", function(NodeEntities, DesignerApp, Backbone,
343343
});
344344

345345
//on target table relation rename, change our reference and update overlay
346-
relation.listenTo(targetNodeContainer, "change:name", function(targetNode) {
347-
relation.set("relatedmodel", targetNode.get("name"), {
346+
relation.listenTo(targetNodeContainer, "change:classname", function(targetNode) {
347+
relation.set("relatedmodel", targetNode.get("classname"), {
348348
silent: true
349349
});
350350
raiseVent("rename");
@@ -379,7 +379,7 @@ DesignerApp.module("NodeEntities", function(NodeEntities, DesignerApp, Backbone,
379379
name: nodeContainer.get('name'),
380380
color: nodeContainer.get('color'),
381381
position: nodeContainer.get('position'),
382-
modelclass: nodeContainer.get('modelclass'),
382+
classname: nodeContainer.get('classname'),
383383
namespace: nodeContainer.get('namespace'),
384384

385385
increment: nodeContainer.get('increment'),

asset/app/js/node/node_modal_relation.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ DesignerApp.module("NodeModule.Modal", function(Modal, DesignerApp, Backbone, Ma
2121
var templatevar = {
2222
relationship: this.model.get('relation').toJSON(),
2323
relatedmodel: parent.toJSON(),
24-
title: "Create Relation in Table " + this.model.get('name')
24+
title: "Create Relation in Model " + this.model.get('classname')
2525
};
2626
//
2727
//
2828
if (this.target) {
29-
templatevar.title = "Create Relation Between " + this.model.get('name') + " and " + this.target;
29+
templatevar.title = "Create Relation Between " + this.model.get('classname') + " and " + this.target;
3030
}
3131
//
3232
//
@@ -38,7 +38,7 @@ DesignerApp.module("NodeModule.Modal", function(Modal, DesignerApp, Backbone, Ma
3838
this.$('#relation-relatedmodel').find('option[value=' + this.target + ']').attr('selected', 'selected'); //make destination selected by default
3939
}
4040

41-
this.$('#relation-relatedmodel').find('option[value=' + this.model.get('name') + ']').remove(); //remove self (model) from option list
41+
this.$('#relation-relatedmodel').find('option[value=' + this.model.get('classname') + ']').remove(); //remove self (model) from option list
4242
//
4343
return this.el;
4444
}
@@ -67,7 +67,7 @@ DesignerApp.module("NodeModule.Modal", function(Modal, DesignerApp, Backbone, Ma
6767
},
6868
render: function() {
6969
var templatevar = {
70-
title: 'Edit Relation in Table ' + this.container.get('name'),
70+
title: 'Edit Relation in Model ' + this.container.get('classname'),
7171
relationship: this.model.toJSON(),
7272
//todo: change to reqreq
7373
relatedmodel: DesignerApp.NodeEntities.getNodeCanvas().toJSON()
@@ -76,7 +76,7 @@ DesignerApp.module("NodeModule.Modal", function(Modal, DesignerApp, Backbone, Ma
7676
// console.log(this.parent);
7777
this.$('#relation-relatedmodel').find('option[value=' + this.model.get('relatedmodel') + ']').attr('selected', 'selected'); //make destination selected by default
7878
this.$('#relation-relationtype').find('option[value=' + this.model.get('relationtype') + ']').attr('selected', 'selected'); //make destination selected by default
79-
this.$('#relation-relatedmodel').find('option[value=' + this.container.get('name') + ']').remove(); //remove self (model) from option list
79+
this.$('#relation-relatedmodel').find('option[value=' + this.container.get('classname') + ']').remove(); //remove self (model) from option list
8080

8181
return this.el;
8282

index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@
351351
<div class="col-md-4">
352352
<select id="relation-relatedmodel" name="relatedmodel" class="form-control">
353353
<% _.each(relatedmodel, function(related) { %>
354-
<option value="<%=related.name%>" > <%=related.name%></option>
354+
<option value="<%=related.classname%>" > <%=related.classname%></option>
355355
<% }); %>
356356
</select>
357357
</div>

0 commit comments

Comments
 (0)