Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into cint
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Aug 24, 2016
2 parents d6596c6 + 3d409aa commit 0faddb5
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 12 deletions.
2 changes: 1 addition & 1 deletion application/helpers/admin/export/ExcelWriter.php
Expand Up @@ -39,7 +39,7 @@ public function init(SurveyObj $survey, $sLanguageCode, FormattingOptions $oOpti
$this->workbook = new XLSXWriter();
$this->workbook->setTempDir(Yii::app()->getConfig('tempdir'));
$worksheetName = $survey->languageSettings['surveyls_title'];
$worksheetName=substr(str_replace(array('*', ':', '/', '\\', '?', '[', ']'),array(' '),$worksheetName),0,31); // Remove invalid characters
$worksheetName=mb_substr(str_replace(array('*', ':', '/', '\\', '?', '[', ']'),array(' '),$worksheetName),0,31,'utf-8'); // Remove invalid characters
if ($worksheetName=='')
{
$worksheetName='survey_'.$survey->id;
Expand Down
11 changes: 7 additions & 4 deletions application/helpers/qanda_helper.php
Expand Up @@ -3903,7 +3903,7 @@ function do_array_5point($ia)
}
else
{
$answerwidth = 50;
$answerwidth = 25;
}
$cellwidth = 5; // number of columns

Expand All @@ -3912,7 +3912,7 @@ function do_array_5point($ia)
++$cellwidth; // add another column
}

$cellwidth = round((( 100 - $answerwidth ) / $cellwidth) , 1); // convert number of columns to percentage of table width
$cellwidth = round((( 100 - ($answerwidth*2) ) / $cellwidth) , 1); // convert number of columns to percentage of table width

if ($aQuestionAttributes['random_order']==1)
{
Expand All @@ -3939,7 +3939,6 @@ function do_array_5point($ia)
$right_exists = true;
}
}

for ($xc=1; $xc<=5; $xc++)
{
$sColumns .= doRender('/survey/questions/arrays/5point/columns/col', array('cellwidth'=>$cellwidth), true);
Expand All @@ -3953,7 +3952,7 @@ function do_array_5point($ia)
// Column for suffix
if ($right_exists)
{
$sColumns .= doRender('/survey/questions/arrays/5point/columns/col', array('cellwidth'=>$cellwidth), true);
$sColumns .= doRender('/survey/questions/arrays/5point/columns/col', array('cellwidth'=>$answerwidth), true);
}

for ($xc=1; $xc<=5; $xc++)
Expand Down Expand Up @@ -4020,20 +4019,23 @@ function do_array_5point($ia)

// Suffix
$answertext2 = $ansrow['question'];
$textAlignClass = "";
if (strpos($answertext2,'|'))
{
$answertext2=substr($answertext2,strpos($answertext2,'|')+1);
$answer_tds .= doRender('/survey/questions/arrays/5point/rows/cells/answer_td_answertext', array(
'answerwidth'=>$answerwidth,
'answertext2'=>$answertext2,
), true);
$textAlignClass = "text-right";
}
elseif ($right_exists)
{
$answer_tds .= doRender('/survey/questions/arrays/5point/rows/cells/answer_td_answertext', array(
'answerwidth'=>$answerwidth,
'answertext2'=>'&nbsp;',
), true);
$textAlignClass = "text-right";
}

// ==>tds
Expand All @@ -4054,6 +4056,7 @@ function do_array_5point($ia)
'answer_tds' => $answer_tds,
'myfname' => $myfname,
'answerwidth' => $answerwidth,
'textAlignClass'=> $textAlignClass,
'answertext' => $answertext,
'value' => $value,
'error' => $error,
Expand Down
Expand Up @@ -12,7 +12,7 @@

<!-- answer_row -->
<tr id="javatbd<?php echo $myfname;?>" class="well answers-list radio-list array<?php echo $zebra; ?>" <?php echo $sDisplayStyle; ?>>
<th class="answertext" style="width: <?php echo $answerwidth;?>%;">
<th class="answertext <?php echo $textAlignClass;?>" style="width: <?php echo $answerwidth;?>%;">
<?php if($error): ?>
<div class="label label-danger" role="alert">
<?php echo $answertext;?>
Expand Down
2 changes: 1 addition & 1 deletion templates/default/css/template-rtl.css

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion templates/default/css/template.css
Expand Up @@ -523,9 +523,14 @@ table > tbody > tr > td.ddprefix {
display: block;
}

.no-more-tables tbody th,
.no-more-tables tbody td,
.no-more-tables tbody tr {
width: 100% !important;
}

.no-more-tables tr {
display: inline-block;
width: 100%;
}

.no-more-tables tbody {
Expand Down
2 changes: 1 addition & 1 deletion templates/news_paper/css/template-rtl.css

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion templates/news_paper/css/template.css
Expand Up @@ -523,9 +523,14 @@ table > tbody > tr > td.ddprefix {
display: block;
}

.no-more-tables tbody th,
.no-more-tables tbody td,
.no-more-tables tbody tr {
width: 100% !important;
}

.no-more-tables tr {
display: inline-block;
width: 100%;
}

.no-more-tables tbody {
Expand Down
2 changes: 1 addition & 1 deletion templates/ubuntu_orange/css/template-rtl.css

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion templates/ubuntu_orange/css/template.css
Expand Up @@ -523,9 +523,14 @@ table > tbody > tr > td.ddprefix {
display: block;
}

.no-more-tables tbody th,
.no-more-tables tbody td,
.no-more-tables tbody tr {
width: 100% !important;
}

.no-more-tables tr {
display: inline-block;
width: 100%;
}

.no-more-tables tbody {
Expand Down

0 comments on commit 0faddb5

Please sign in to comment.