Skip to content
Permalink
Browse files

Add default row value for jqgrids, config "jq_grid_default_row"

See BT#15270
  • Loading branch information...
jmontoyaa committed Feb 5, 2019
1 parent 7024207 commit eca05ce736396738b1c80717722428fe5564548a
Showing with 11 additions and 2 deletions.
  1. +8 −2 main/inc/lib/display.lib.php
  2. +3 −0 main/install/configuration.dist.php
@@ -1321,6 +1321,9 @@ public static function grid_js(
$obj->viewrecords = 'true';
$all_value = 10000000;
// Sets how many records we want to view in the grid
$obj->rowNum = 20;
// Default row quantity
if (!isset($extra_params['rowList'])) {
$extra_params['rowList'] = [20, 50, 100, 500, 1000, $all_value];
@@ -1332,6 +1335,11 @@ public static function grid_js(
$extra_params['rowList'] = $rowList;
}
$defaultRow = api_get_configuration_value('jq_grid_default_row');
if (!empty($defaultRow)) {
$obj->rowNum = (int) $defaultRow;
}
$json = '';
if (!empty($extra_params['datatype'])) {
$obj->datatype = $extra_params['datatype'];
@@ -1355,8 +1363,6 @@ public static function grid_js(
$obj->rowList = $extra_params['rowList'];
}
// Sets how many records we want to view in the grid
$obj->rowNum = 20;
if (!empty($extra_params['rowNum'])) {
$obj->rowNum = $extra_params['rowNum'];
} else {
@@ -1090,6 +1090,9 @@
// Changes the row list when using jqgrid
//$_configuration['jq_grid_row_list'] = ['options' => [50, 100, 200, 500]];
// Default selected row in jqgrid
//$_configuration['jq_grid_default_row'] = 50;
// ------ Custom DB changes (keep this at the end)
// Add user activation by confirmation email
// This option prevents the new user to login in the platform if your account is not confirmed via email

0 comments on commit eca05ce

Please sign in to comment.
You can’t perform that action at this time.