* finish task #1971,1961.
This commit is contained in:
@@ -47,7 +47,14 @@ $(document).on('click', '.chosen-with-drop', function()
|
||||
if($(select).val() == 'ditto')
|
||||
{
|
||||
var index = $(select).parents('td').index();
|
||||
var value = $(select).parents('tr').prev('tr').find('td').eq(index).find('select').val();
|
||||
var row = $(select).parents('tr').index();
|
||||
var table = $(select).parents('tr').parent();
|
||||
var value = '';
|
||||
for(i = row - 1; i >= 0; i--)
|
||||
{
|
||||
value = $(table).find('tr').eq(i).find('td').eq(index).find('select').val();
|
||||
if(value != 'ditto') break;
|
||||
}
|
||||
$(select).val(value);
|
||||
$(select).trigger("chosen:updated");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user