Improve formatting

This commit is contained in:
Marc Delisle
2011-03-07 08:34:56 -05:00
parent db276b0657
commit 896a6e0883

View File

@@ -435,22 +435,22 @@ $(document).ready(function() {
var $this_hide = $(this).parent(); var $this_hide = $(this).parent();
$this_hide.removeClass("inline_edit_active hover").addClass("inline_edit_anchor"); $this_hide.removeClass("inline_edit_active hover").addClass("inline_edit_anchor");
var last_column = $this_hide.siblings().length; var last_column = $this_hide.siblings().length;
var txt=[]; var txt = [];
var blob_index=[]; var blob_index = [];
var k=0; var k = 0;
for(var i=4; i < last_column; i++){ for(var i = 4; i < last_column; i++){
if($this_hide.siblings("td:eq(" + i + ")").children('a:eq(0)').length ){ if($this_hide.siblings("td:eq(" + i + ")").children('a:eq(0)').length ){
blob_index[k]=i; blob_index[k] = i;
k=k+1; k++;
continue; continue;
} }
txt[i-4] = $this_hide.siblings("td:eq(" + i + ")").children(' .original_data').html(); txt[i - 4] = $this_hide.siblings("td:eq(" + i + ")").children(' .original_data').html();
} }
k=0; k = 0;
for (var i=4; i < last_column; i++){ for (var i = 4; i < last_column; i++){
if ( blob_index[k]==i){ if ( blob_index[k] == i){
k=k+1; k++;
continue; continue;
} }
if($this_hide.siblings("td:eq(" + i + ")").children().length !=0){ if($this_hide.siblings("td:eq(" + i + ")").children().length !=0){
$this_hide.siblings("td:eq(" + i + ")").empty(); $this_hide.siblings("td:eq(" + i + ")").empty();
@@ -485,24 +485,24 @@ $(document).ready(function() {
$this_row.siblings("tr:eq(3) td:eq(" + pos + ")").removeClass("even edit_row_anchor row_" + pos + " vpointer vmarker inline_edit_active hover").addClass("even edit_row_anchor row_" + pos + " vpointer vmarker inline_edit_anchor"); $this_row.siblings("tr:eq(3) td:eq(" + pos + ")").removeClass("even edit_row_anchor row_" + pos + " vpointer vmarker inline_edit_active hover").addClass("even edit_row_anchor row_" + pos + " vpointer vmarker inline_edit_anchor");
} }
var blob_index=[]; var blob_index = [];
var k=0; var k = 0;
for( var i=6;i<=rows+2;i++){ for( var i = 6; i <= rows + 2; i++){
if( $this_row.siblings("tr:eq(" + i + ") td:eq(" + pos + ") a:eq(0)").length !=0 ){ if( $this_row.siblings("tr:eq(" + i + ") td:eq(" + pos + ") a:eq(0)").length !=0 ){
blob_index[k]=i; blob_index[k] = i;
k=k+1; k++;
continue; continue;
} }
txt[i-6]=$this_row.siblings("tr:eq(" + i + ") td:eq("+pos+") span.original_data").html(); txt[i - 6] = $this_row.siblings("tr:eq(" + i + ") td:eq("+pos+") span.original_data").html();
} }
k=0; k = 0;
for (var i=6;i<=rows+2;i++){ for (var i = 6; i <= rows + 2; i++){
if(blob_index[k]==i){ if(blob_index[k] == i){
k=k+1; k++;
continue; continue;
} }
$this_row.siblings("tr:eq("+i+") td:eq("+pos+")").empty(); $this_row.siblings("tr:eq("+i+") td:eq("+pos+")").empty();
$this_row.siblings("tr:eq("+i+") td:eq("+pos+")").append(txt[i-6]); $this_row.siblings("tr:eq("+i+") td:eq("+pos+")").append(txt[ i - 6]);
} }
$(this).prev().remove(); $(this).prev().remove();
$(this).prev().remove(); $(this).prev().remove();