diff --git a/main/admin/careers.php b/main/admin/careers.php index cc7ae6f12f..21de5b030d 100644 --- a/main/admin/careers.php +++ b/main/admin/careers.php @@ -64,10 +64,10 @@ $action_links = 'function action_formatter(cellvalue, options, rowObject) { }'; ?> diff --git a/main/admin/promotions.php b/main/admin/promotions.php index 44ba1ecea2..d966eecf9a 100644 --- a/main/admin/promotions.php +++ b/main/admin/promotions.php @@ -58,9 +58,9 @@ $action_links = 'function action_formatter (cellvalue, options, rowObject) { ?> diff --git a/main/inc/lib/display.lib.php b/main/inc/lib/display.lib.php index fbfa7f6991..add6635811 100755 --- a/main/inc/lib/display.lib.php +++ b/main/inc/lib/display.lib.php @@ -838,7 +838,7 @@ class Display { * @return string the js code * */ - public static function grid_js($div_id, $url, $column_names, $column_model, $extra_params, $data = array(), $formatter = '') { + public static function grid_js($div_id, $url, $column_names, $column_model, $extra_params, $data = array(), $formatter = '', $width_fix = false) { $obj = new stdClass(); if (!empty($url)) @@ -908,8 +908,14 @@ class Display { //Fixing true/false js values that doesn't need the "" $json_encode = str_replace(':"true"',':true',$json_encode); $json_encode = str_replace(':"false"',':false',$json_encode); - $json_encode = str_replace('"formatter":"action_formatter"','formatter:action_formatter',$json_encode); + + if ($width_fix) { + //see BT#2020 + $json .= "$(window).bind('resize', function() { + $('#".$div_id."').setGridWidth($(window).width() - 150); + }).trigger('resize');"; + } //Creating the jqgrid element $json .= '$("#'.$div_id.'").jqGrid(';