diff --git a/view/jqgrid.anubis b/view/jqgrid.anubis index 9dcf2b0..6a21f98 100644 --- a/view/jqgrid.anubis +++ b/view/jqgrid.anubis @@ -64,7 +64,7 @@ define String var el = document.createElement('input'); el.type='text'; el.value = value; - var myPicker = new jscolor.color(el, {}); + var myPicker = new jscolor(el); myPicker.fromString(value); return el; }, @@ -130,7 +130,7 @@ define String date(label,column_name,help) then "{ name: \""+column_name+"\", label: \""+_T(label)+"\", editable:true, autoResizable: true, formatter: \"date\", formatoptions: { newformat: \"Y-M-d\" }}", time(label,column_name,help) then "{ name: \""+column_name+"\", label: \""+_T(label)+"\", editable:true, autoResizable: true }", datetime(label,column_name,help) then "{ name: \""+column_name+"\", label: \""+_T(label)+"\", editable:true, autoResizable: true }", - color(label, column_name, help) then "{ name: \""+column_name+"\", label: \""+_T(label)+"\", width: 40, editable:true, autoResizable: true, formatter:formatColor, unformat:unformatColor, "+custom_edit_color+" }", + color(label, column_name, help) then "{ name: \""+column_name+"\", label: \""+_T(label)+"\", width: 40, editable:true, autoResizable: true, edittype: 'custom', formatter:formatColor, unformat:unformatColor, "+custom_edit_color+" }", phone(label,column_name, ph_type, help) then "{ name: \""+column_name+"\", label: \""+_T(label)+"\", editable:true, autoResizable: true, edittype: 'custom', formatter:formatPhone, unformat:unformatPhone, "+custom_edit_phone+"}", email(label,column_name, help) then "{ name: \""+column_name+"\", label: \""+_T(label)+"\", editable:true, autoResizable: true, edittype: 'custom', formatter:formatEmail, unformat:unformatEmail, "+custom_edit_email+"}", url(label, column_name, help) then "{ name: \""+column_name+"\", label: \""+_T(label)+"\", editable:true, autoResizable: true, "+search_options(column_name)+" }", diff --git a/view/view_table_renderer.anubis b/view/view_table_renderer.anubis index e2922db..c4ac904 100644 --- a/view/view_table_renderer.anubis +++ b/view/view_table_renderer.anubis @@ -437,15 +437,15 @@ url:'?aws_controller=hk_c&aws_action=grid_view&table_name="+rows.table_name+"&vi // rows.json_data_string+ jqGrid_options(uid, rows, _T)+ ",loadComplete: function () { - jscolor.installByClassName(\"jscolor\"); + } }).jqGrid(\"gridResize\"); function formatColor(cellValue, options, rowObject) { - var colorInput = \"\"; - return colorInput; + var color_container = \"
\"; + return color_container; } function unformatColor(cellValue, options, cellObject) { - return $(cellObject.html()).css(\"backgroundColor\").substring(1); + return $(cellObject).find('.jscolor').data('color'); } function formatPhone(cellValue, options, rowObject) { var phoneInput = '' + cellValue + ''; -- libgit2 0.21.4