Skip to content

Commit c126238

Browse files
committed
Renamed functions for converting between line numbers and HTML-tags.
1 parent 7e12523 commit c126238

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

code_comments/htdocs/code-comments.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ var underscore = _.noConflict();
114114
if (!this.viewPerLine[line]) {
115115
this.viewPerLine[line] = new CommentsForALineView( { line: line } );
116116

117-
var $tr = $( Rows.getTrByLineNumber( line ) );
117+
var $tr = $( Rows.getTrByLineNumberInDiff( line ) );
118118
$tr.after(this.viewPerLine[line].render().el).addClass('with-comments');
119119
}
120120
this.viewPerLine[line].addOne(comment);
@@ -275,10 +275,10 @@ var underscore = _.noConflict();
275275
// wrap TH content in spans so we can hide/show them
276276
this.wrapTHsInSpans();
277277
},
278-
getLineByTR: function( tr ) {
278+
getLineNumberInDiffByTr: function( tr ) {
279279
return $.inArray( tr, this.$rows ) + 1;
280280
},
281-
getTrByLineNumber: function( line ) {
281+
getTrByLineNumberInDiff: function( line ) {
282282
return this.$rows[line - 1];
283283
},
284284
wrapTHsInSpans: function() {
@@ -311,7 +311,7 @@ var underscore = _.noConflict();
311311
return this.$el.parents( 'li' ).find( 'h2>a:first' ).text();
312312
},
313313
getLineNumberInDiff: function() {
314-
return Rows.getLineByTR( this.el );
314+
return Rows.getLineNumberInDiffByTr( this.el );
315315
},
316316
getLineNumberInFile: function() {
317317
// Get the linenumber within the file of this row. If the row is deleted, return it negated.

0 commit comments

Comments
 (0)