* finish task #1953.

This commit is contained in:
wangyidong
2014-07-24 09:17:13 +00:00
parent 0c610eb33f
commit 0418dbe71c
12 changed files with 186 additions and 16 deletions

View File

@@ -59,3 +59,19 @@ $(document).on('click', '.chosen-with-drop', function()
$(select).trigger("chosen:updated");
}
})
$(document).on('mousedown', 'select', function()
{
if($(this).val() == 'ditto')
{
var index = $(this).parents('td').index();
var row = $(this).parents('tr').index();
var table = $(this).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;
}
$(this).val(value);
}
})