Skip to content

Commit 6a35c02

Browse files
committed
Use CodeComments.page instead of CodeComments.type
There was no attribute type, because we only set the page when we pass data from the backend to the frontend.
1 parent 19ba6af commit 6a35c02

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

code_comments/htdocs/code-comments.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
data: {
3333
path: CodeComments.path || undefined,
3434
revision: CodeComments.revision,
35-
type: CodeComments.type,
35+
type: CodeComments.page,
3636
}
3737
};
3838
params.data[lineQuery] = 0;
@@ -136,7 +136,7 @@
136136
template: _.template(CodeComments.templates.comments_for_a_line),
137137
templateData: {},
138138
initialize: function(attrs) {
139-
this.templateData.colspan = ( 'changeset' === CodeComments.type ) ? 2 : 1;
139+
this.templateData.colspan = ( 'changeset' === CodeComments.page ) ? 2 : 1;
140140
},
141141
events: {
142142
'click button': 'showAddCommentDialog'
@@ -214,7 +214,7 @@
214214
self.$el.dialog('close');
215215
}
216216
};
217-
this.collection.create({text: text, author: CodeComments.username, path: this.path, revision: CodeComments.revision, line: line, type: CodeComments.type}, options);
217+
this.collection.create({text: text, author: CodeComments.username, path: this.path, revision: CodeComments.revision, line: line, type: CodeComments.page}, options);
218218
},
219219
previewThrottled: $.throttle(1500, function(e) { return this.preview(e); }),
220220
preview: function(e) {

0 commit comments

Comments
 (0)