(Retrofit from trunk) #1334 Portal : Sorting objects on BrowseBrick regarding the all classes' default order and not the first class' order only. (For example the services catalog might appear as sorted on the first column but not the second one)

SVN:2.3[4446]
This commit is contained in:
Guillaume Lajarige
2016-10-06 07:13:33 +00:00
parent e1c51d278e
commit 28fa99d976
3 changed files with 6 additions and 1 deletions

View File

@@ -281,7 +281,10 @@ class BrowseBrickController extends BrickController
}
}
$oSet->OptimizeColumnLoad($aColumnAttrs);
// Sorting objects through defined order (in DM)
$oSet->SetOrderByClasses();
// Retrieving results and organizing them for templating
$aItems = array();
while ($aCurrentRow = $oSet->FetchAssoc())

View File

@@ -326,6 +326,7 @@ class ManageBrickController extends BrickController
$oSet = new DBObjectSet($oQuery);
}
$oSet->OptimizeColumnLoad(array($oQuery->GetClassAlias() => $aColumnsAttrs));
$oSet->SetOrderByClasses();
$aSets[$sKey] = $oSet;
}
}

View File

@@ -239,6 +239,7 @@
"displayLength": {{ constant('Combodo\\iTop\\Portal\\Brick\\BrowseBrick::DEFAULT_COUNT_PER_PAGE_LIST') }},
"dom": '<"row"<"col-sm-6"l><"col-sm-6"<f><"visible-xs"p>>>t<"row"<"col-sm-6"i><"col-sm-6"p>>',
"columns": getColumnsDefinition(),
"order": [],
"drawCallback": function(settings){
// Tooltip has to been created here, as the render callback only returns a string, not an object.
$(this).find('[data-toggle="tooltip"]').tooltip({container: 'body', html: true, trigger: 'hover', placement: 'right'}); // container option is necessary when in a table