Skip to content

Commit

Permalink
Fixed issue #6430 - Central Participant Database: List of participant…
Browse files Browse the repository at this point in the history
…s does not scale well with the number of attributes
  • Loading branch information
jcleeland committed Aug 5, 2012
1 parent 2db1ffe commit c5097ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Expand Up @@ -40,6 +40,7 @@
$langNames[] = $lang . $langnames;
/* Build the columnNames for the extra attributes */
/* and, build the columnModel */
$autowidth='true';
if (isset($attributes) && count($attributes) > 0)
{
foreach ($attributes as $row)
Expand All @@ -48,6 +49,7 @@
$uidNames[] = '{ "name": "' . $row['attribute_name'] . '", "index":"' . $row['attribute_id'] . '", "sorttype":"string", "sortable": true, "align":"center"}';
}
$columnNames = ',' . implode(",", $attnames) . ''; //Add to the end of the standard list of columnNames
if(count($attributes) > 5) $autowidth='false';
}
else
{
Expand Down Expand Up @@ -88,6 +90,7 @@
var dateInvitedColTxt="<?php $clang->eT("Last invited") ?>";
var dateCompletedColTxt="<?php $clang->eT("Submitted") ?>";
var surveylinkUrl = "<?php echo Yii::app()->getController()->createUrl("admin/participants/getSurveyInfo_json/pid/"); ?>";

/* Colnames and heading for attributes subgrid */
var attributesHeadingTxt="<?php $clang->eT("Participant's attribute information") ?>";
var actionsColTxt="<?php $clang->eT("Actions") ?>";
Expand Down Expand Up @@ -132,6 +135,7 @@
var jsonUrl = "<?php echo Yii::app()->getController()->createUrl("admin/participants/".$urlsearch); ?>";
var jsonSearchUrl = "<?php echo Yii::app()->getController()->createUrl("admin/participants/getParticipantsResults_json/search/"); ?>";
var editUrl = "<?php echo Yii::app()->getController()->createUrl("admin/participants/editParticipant"); ?>";
var autowidth = "<?php echo $autowidth ?>";
var getSearchIDs = "<?php echo Yii::app()->getController()->createUrl("admin/participants/getSearchIDs"); ?>";
var getaddtosurveymsg = "<?php echo Yii::app()->getController()->createUrl("admin/participants/getaddtosurveymsg"); ?>";
var minusbutton = "<?php echo Yii::app()->getConfig('adminimageurl') . "deleteanswer.png" ?>";
Expand Down
2 changes: 1 addition & 1 deletion scripts/admin/displayParticipant.js
Expand Up @@ -121,7 +121,7 @@ $(document).ready(function() {
rowNum: 25,
editable:true,
scrollOffset:0,
autowidth: true,
autowidth: autowidth,
sortable : true,
sortname: 'firstname',
sortorder: 'asc',
Expand Down

0 comments on commit c5097ea

Please sign in to comment.