Skip to content

Commit

Permalink
Merge branch 'master' into 192_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
TMSWhite committed Apr 17, 2012
2 parents 78727e5 + 34b5df3 commit ef5ff13
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 12 deletions.
17 changes: 17 additions & 0 deletions classes/expressions/LimeExpressionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -3354,6 +3354,7 @@ static function StartSurvey($surveyid,$surveyMode='group',$options=NULL,$forceRe
$LEM->surveyOptions['anonymized'] = (isset($options['anonymized']) ? $options['anonymized'] : false);
$LEM->surveyOptions['assessments'] = (isset($options['assessments']) ? $options['assessments'] : false);
$LEM->surveyOptions['datestamp'] = (isset($options['datestamp']) ? $options['datestamp'] : false);
$LEM->surveyOptions['deletenonvalues'] = (isset($options['deletenonvalues']) ? ($options['deletenonvalues']=='1') : true);
$LEM->surveyOptions['hyperlinkSyntaxHighlighting'] = (isset($options['hyperlinkSyntaxHighlighting']) ? $options['hyperlinkSyntaxHighlighting'] : false);
$LEM->surveyOptions['ipaddr'] = (isset($options['ipaddr']) ? $options['ipaddr'] : false);
$LEM->surveyOptions['radix'] = (isset($options['radix']) ? $options['radix'] : '.');
Expand Down Expand Up @@ -3765,6 +3766,22 @@ private function _UpdateValuesInDatabase($updatedValues, $finished=false,$setSub
// Update these values in the database
global $connect;

if (!$this->surveyOptions['deletenonvalues'])
{
$nonNullValues = array();
foreach($updatedValues as $key=>$value)
{
if (!is_null($value))
{
if (isset($value['value']) && !is_null($value['value']))
{
$nonNullValues[$key] = $value;
}
}
}
$updatedValues = $nonNullValues;
}

$message = '';
$_SESSION['datestamp']=date_shift(date("Y-m-d H:i:s"), "Y-m-d H:i:s", $this->surveyOptions['timeadjust']);
if ($this->surveyOptions['active'] && !isset($_SESSION['srid']))
Expand Down
3 changes: 3 additions & 0 deletions classes/expressions/test/navigation_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<li><input type='checkbox' name='LEM_DEBUG_VALIDATION_SUMMARY' id='LEM_DEBUG_VALIDATION_SUMMARY' value='Y' checked="checked"/>Validation Summary</li>
<li><input type='checkbox' name='LEM_DEBUG_VALIDATION_DETAIL' id='LEM_DEBUG_VALIDATION_DETAIL' value='Y' checked="checked"/>Validation Detail (Validation Summary must also be checked to see detail)</li>
<li><input type='checkbox' name='LEM_PRETTY_PRINT_ALL_SYNTAX' id='LEM_PRETTY_PRINT_ALL_SYNTAX' value='Y' checked="checked"/>Pretty Print Syntax</li>
<li><input type='checkbox' name='deletenonvalues' id='deletenonvalues' value='Y' checked="checked"/>Delete Non-Values</li>
</ul></td>
</tr>
<tr><td colspan='2'><input type='submit'/></td></tr>
Expand Down Expand Up @@ -71,13 +72,15 @@
((isset($_POST['LEM_DEBUG_VALIDATION_DETAIL']) && $_POST['LEM_DEBUG_VALIDATION_DETAIL'] == 'Y') ? LEM_DEBUG_VALIDATION_DETAIL : 0) +
((isset($_POST['LEM_PRETTY_PRINT_ALL_SYNTAX']) && $_POST['LEM_PRETTY_PRINT_ALL_SYNTAX'] == 'Y') ? LEM_PRETTY_PRINT_ALL_SYNTAX : 0)
);
$deletenonvalues = ((isset($_POST['deletenonvalues']) && $_POST['deletenonvalues']=='Y') ? 1 : 0);

$surveyOptions = array(
'active'=>false,
'allowsave'=>true,
'anonymized'=>false,
'assessments'=>$assessments,
'datestamp'=>true,
'deletenonvalues'=>$deletenonvalues,
'hyperlinkSyntaxHighlighting'=>true,
'ipaddr'=>true,
'rooturl'=>'../../..',
Expand Down
3 changes: 3 additions & 0 deletions group.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@
$radix=getRadixPointData($thissurvey['surveyls_numberformat']);
$radix = $radix['seperator'];

global $deletenonvalues; // set in config-defaults.php

$surveyOptions = array(
'active'=>($thissurvey['active']=='Y'),
'allowsave'=>($thissurvey['allowsave']=='Y'),
'anonymized'=>($thissurvey['anonymized']!='N'),
'assessments'=>($thissurvey['assessments']=='Y'),
'datestamp'=>($thissurvey['datestamp']=='Y'),
'deletenonvalues'=>(isset($deletenonvalues)? $deletenonvalues: 1),
'hyperlinkSyntaxHighlighting'=>(($LEMdebugLevel & LEM_DEBUG_VALIDATION_SUMMARY) == LEM_DEBUG_VALIDATION_SUMMARY), // TODO set this to true if in admin mode but not if running a survey
'ipaddr'=>($thissurvey['ipaddr']=='Y'),
'radix'=>$radix,
Expand Down
2 changes: 1 addition & 1 deletion templates/basic/navigator.pstpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<tr>
<td class="clear-all" nowrap="nowrap" width="33%">{CLEARALL}</td>
<td class="save-all" nowrap="nowrap" width="33%">{SAVE}</td>
<td class="submit-buttons"nowrap="nowrap" width="33%">{NAVIGATOR}</td>
<td class="submit-buttons" nowrap="nowrap" width="33%">{NAVIGATOR}</td>
</tr>
</table>
12 changes: 6 additions & 6 deletions templates/basic/startpage.pstpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}ie_fix_6.css" />
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}ie_fix_7.css" />
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}ie_fix_8.css" />
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}ie_fix_7.css" />
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}ie_fix_8.css" />
<![endif]-->

<!-- The following CSS hides visual elements of the progress bar from screen readers. -->
<style type="text/css" media="aural tty">
Expand Down
10 changes: 5 additions & 5 deletions templates/citronade/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ function focusFirst(Event)
function autoDisabledComment(){
$(".answers-wrapper li input.checkbox").each(function(){
if($(this).attr('checked')){
$(this).closest('li').find('input:text').attr('disabled','');
$(this).closest('li').find('input:text').attr('readonly','');
}else{
$(this).closest('li').find('input:text').val('');
$(this).closest('li').find('input:text').attr('disabled','disabled');
$(this).closest('li').find('input:text').attr('readonly','readonly');
}
});
$(".answers-wrapper li input.checkbox").click(function(){
if($(this).attr('checked')){
$(this).closest('li').find('input:text').attr('disabled','');
$(this).closest('li').find('input:text').attr('readonly','');
$(this).closest('li').find('input:text').focus();
}else{
$(this).closest('li').find('input:text').val('');
$(this).closest('li').find('input:text').attr('disabled','disabled');
$(this).closest('li').find('input:text').attr('readonly','readonly');
}
});
}
Expand Down Expand Up @@ -102,8 +102,8 @@ function jalert(text) {

$(document).ready(function(){
// focusFirst(); /** Uncomment if you want to use the focusFirst function **/
autoDisabledComment();
addClassEmpty();
autoDisabledComment();
//$(".help-wrapper > span,.help-wrapper > div").not(".error-wrapper").not(":empty").css('display','block');
//$(".help-wrapper .error-wrapper > span,.help-wrapper .error-wrapper > div").not(".error-wrapper").not(":empty").css('display','block');
})
Expand Down

0 comments on commit ef5ff13

Please sign in to comment.