fix bug that was preventing predictable column change

This commit is contained in:
ali asaria 2014-08-18 14:05:14 -04:00
parent 5f1988fd25
commit 1c83ca056c

View file

@ -424,11 +424,23 @@ function onColumnChange( id, text )
{ {
var names = Array(); var names = Array();
//Get the names of all the columns right from the DOM (ignore what was sent in function) //console.log(id + " " + text );
//Get the names of all the columns right from the DOM
$('.col').each(function() { $('.col').each(function() {
names.push(
$(this).text() //get ID of current column we are traversing over
); var thisID = $(this).children("h2").attr('id');
if (id == thisID)
{
names.push( text );
}
else
{
names.push( $(this).text() );
}
}); });
updateColumns(names); updateColumns(names);