Skip to content

Commit

Permalink
Merge branch 'master' into olle_tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed May 5, 2016
2 parents 08c6cac + 862abcc commit faba5ef
Show file tree
Hide file tree
Showing 34 changed files with 323 additions and 380 deletions.
2 changes: 1 addition & 1 deletion application/controllers/admin/conditionsaction.php
Expand Up @@ -1747,7 +1747,7 @@ function index($subaction, $iSurveyID=null, $gid=null, $qid=null)
."</div>\n";

// Source token Tab
$aViewUrls['output'] .= "<div id='SRCTOKENATTRS' class='tab-pane fade in'><select class='form-control' name='csrctoken' id='csrctoken' size='".($qcount+1)."' >\n";
$aViewUrls['output'] .= "<div id='SRCTOKENATTRS' class='tab-pane fade in'><select class='form-control' name='csrctoken' id='csrctoken' >\n";
foreach (getTokenFieldsAndNames($iSurveyID) as $tokenattr => $tokenattrName)
{
// Check to select
Expand Down
18 changes: 10 additions & 8 deletions application/controllers/admin/responses.php
Expand Up @@ -410,7 +410,7 @@ public function browse($iSurveyId)
'width'=>'100',
'resizable' => true,
'align'=>'right',
'label'=>viewHelper::getFieldText($fields['id']),
'title'=>viewHelper::getFieldText($fields['id']),
'hidedlg'=>true,
);
$column_model[] = array(
Expand All @@ -421,7 +421,7 @@ public function browse($iSurveyId)
'width'=>'100',
'resizable' => true,// Strangely : don't work
'align'=>'right',
'label'=>viewHelper::getFieldText($fields['lastpage']),
'title'=>viewHelper::getFieldText($fields['lastpage']),
);

$bHidden=false;
Expand All @@ -446,7 +446,7 @@ public function browse($iSurveyId)
'hidden'=>$bHidden,
'width'=>'100',
'align'=>'left',
'label' => gT("Completed"),
'title' => gT("Completed"),
);

// defaultSearch is the default search done before send request in json. Actually : completed and token only. Can be extended ( js is ready) ?
Expand All @@ -472,7 +472,7 @@ public function browse($iSurveyId)
'sorttype'=>'string',
'sortable'=>true, 'width'=>'150',
'align'=>'left',
'label'=>gT('Token')
'title'=>gT('Token')
);
$column_model[] = array(
'name'=>'firstname',
Expand All @@ -481,7 +481,7 @@ public function browse($iSurveyId)
'sortable'=>true,
'width'=>'150',
'align'=>'left',
'label'=>gT('First name'),
'title'=>gT('First name'),
);
$column_model[] = array(
'name'=>'lastname',
Expand All @@ -490,7 +490,7 @@ public function browse($iSurveyId)
'sortable'=>true,
'width'=>'150',
'align'=>'left',
'label'=>gT('Last Name'),
'title'=>gT('Last Name'),
);
$column_model[] = array(
'name'=>'email',
Expand All @@ -499,7 +499,7 @@ public function browse($iSurveyId)
'sortable'=>true,
'width'=>'150',
'align'=>'left',
'label'=>gT('Email')
'title'=>gT('Email')
);
// If token exist, test if token is set in params, add it to defaultSearch
if($sTokenSearch= Yii::app()->request->getQuery('token'))
Expand All @@ -515,7 +515,7 @@ public function browse($iSurveyId)
'width'=>'50',
'resizable' => true,// Strangely : don't work
'align'=>'left',
'label'=>viewHelper::getFieldText($fields['startlanguage']),
'title'=>viewHelper::getFieldText($fields['startlanguage']),
);

// All other columns are based on the questions.
Expand Down Expand Up @@ -1525,6 +1525,8 @@ private function _zipFiles($iSurveyID, $responseIds, $zipfilename)
protected function _renderWrappedTemplate($sAction='', $aViewUrls = array(), $aData = array())
{
$this->registerScriptFile( 'ADMIN_SCRIPT_PATH', 'browse.js');
App()->getClientScript()->registerCssFile(Yii::app()->getConfig('styleurl') . 'browse.css');// Don't find the way to register a css file in /styles/ (global css)

$iSurveyId = $aData['iSurveyId'];
$aData['display']['menu_bars'] = false;
$aData['display']['menu_bars']['browse'] = gT('Browse responses'); // browse is independent of the above
Expand Down

0 comments on commit faba5ef

Please sign in to comment.