#369: rename variable

This commit is contained in:
Vokhmin Alexey V 2014-04-22 21:08:37 +04:00
parent eeb339ea43
commit 404a59777b
1 changed files with 7 additions and 9 deletions

View File

@ -40,12 +40,11 @@ $(document).ready(function() {
$('.add_line-comment').on('click', function() { $('.add_line-comment').on('click', function() {
function ProcessData(data) { function ProcessData(data) {
if(yield) { if (inline_comment) {
var str = "<tr class='inline-comments'><td class='line_numbers' colspan='2'></td>"+"<td>"+data+"</td></tr>"; var str = "<tr class='inline-comments'><td class='line_numbers' colspan='2'></td><td>"+data+"</td></tr>";
par.after(str); par.after(str);
par = par.next(); par = par.next();
} } else {
else {
par.find('td:last').append(data); par.find('td:last').append(data);
} }
par.find('#md_tabs.nav.nav-tabs').each(function(i) { par.find('#md_tabs.nav.nav-tabs').each(function(i) {
@ -55,19 +54,18 @@ $(document).ready(function() {
} }
var line = $(this); var line = $(this);
var tmp = line.parents('tr'); var tmp = line.parents('tr');
var yield = false; var inline_comment = false;
var par = null; var par = null;
if(tmp.hasClass('inline-comments')) { if (tmp.hasClass('inline-comments')) {
par = tmp; par = tmp;
} } else {
else {
par = tmp.next('tr.inline-comments'); par = tmp.next('tr.inline-comments');
} }
if(par.length == 0) { if(par.length == 0) {
par = tmp; par = tmp;
yield = true; inline_comment = true;
} }
// Hide visible new comment form // Hide visible new comment form