| | |
| | | //渲染TABLE |
| | | opt.table.elem = "#"+tableName; |
| | | opt.table.id = tableName; |
| | | //若没有where表示为前端分页 |
| | | //若没有url表示为前端分页 |
| | | if (opt.table.url != undefined) { |
| | | opt.table.where['sWhere'] = opt.sWhere |
| | | } else { |
| | |
| | | if (tr.length == 0) { |
| | | tableElem.find('tr:first').children('td').eq(0).click(); |
| | | } else { |
| | | tr.children('td').click(); |
| | | tr['prev']().children('td').click(); |
| | | tr.children('td').eq(0).click(); |
| | | tr['prev']().children('td').eq(0).click(); |
| | | } |
| | | break; |
| | | case "ArrowDown"://下键 |
| | | if (tr.length == 0) { |
| | | tr = tableElem.find('tr:first').children('td').eq(0).click(); |
| | | tableElem.find('tr:first').children('td').eq(0).click(); |
| | | } else { |
| | | tr.children('td').click(); |
| | | tr['next']().children('td').click(); |
| | | tr.children('td').eq(0).click(); |
| | | tr['next']().children('td').eq(0).click(); |
| | | } |
| | | break; |
| | | case "Enter"://回车 |
| | |
| | | //按钮选中 |
| | | tableBox.find('.tableSelect_btn_select').on('click', function() { |
| | | var checkStatus = table.checkStatus(tableName); |
| | | selectDone(checkStatus); |
| | | if (checkStatus.data.length > 0) { |
| | | selectDone(checkStatus); |
| | | } else { |
| | | tableBox.remove(); |
| | | delete table.cache[tableName]; |
| | | } |
| | | |
| | | }) |
| | | |
| | | //写值回调和关闭 |