我将如何将 Jquery-color-picker 实施到我的 Jtable 中以获取字段 colourCode。colourCode 是由 Json 字符串提供的十六进制代码。我对Jtable(输入)做了一些研究。但它把我带到了死胡同。
<script type="text/javascript">
$(document).ready(function () {
$('#EventTypeTableContainer').jtable({
title: 'Table of EventType',
columnResizable: false,
columnSelectable: false,
actions: {
listAction: 'Admin/GetEventTypeList',
createAction: 'Admin/CreateEventType',
updateAction: 'Admin/UpdateEventType',
deleteAction: 'Admin/DeleteEventType'
},
fields: {
EventTypeId: {
key: true,
list: false
},
EventTypeName: {
title: 'Event Type',
width: '40%'
},
colourCode: {
title: 'Event Color',
width: '40%',
input: $(function () { $('input').ColorPicker(options);}),
},
isSystemEventType: {
title: 'System Constraint',
width: '20%',
list: false,
create: false,
edit: false
}
}
});
$('#EventTypeTableContainer').jtable('load');
});
</script>