Skip to content

Commit

Permalink
dev: Some fixes for statistics javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
mennodekker committed Jun 18, 2013
1 parent 0a13815 commit 9c45fe7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion application/helpers/admin/statistics_helper.php
Expand Up @@ -3085,7 +3085,10 @@ public function generate_statistics($surveyid, $allfields, $q2show='all', $usegr

elseif (!empty($newsql)) {$sql = $newsql;}

if (!isset($sql) || !$sql) {$sql="NULL";}
if (!isset($sql) || !$sql)
{
$sql= null;
}

//only continue if we have something to output
if ($results > 0)
Expand Down
10 changes: 5 additions & 5 deletions scripts/admin/statistics.js
Expand Up @@ -20,7 +20,7 @@ $(document).ready(function(){
}

});
$(".sortorder").live("click", function(e) {
$(".sortorder").click( function(e) {
var details=this.id.split('_');
var order='sortby/'+details[2]+'/sortmethod/'+details[3]+'/sorttype/'+details[4];
loadBrowse(details[1],order);
Expand All @@ -43,17 +43,17 @@ $(document).ready(function(){
if ($('#grapherror').length>0)
{
$('#grapherror').show();
$('#usegraph').attr('checked',false);
$('#usegraph').prop('checked',false);
}
});
$('#viewsummaryall').click( function(){
if ($('#viewsummaryall').attr('checked')==true)
if ($('#viewsummaryall').prop('checked')==true)
{
$('#filterchoices input[type=checkbox]').attr('checked', true);
$('#filterchoices input[type=checkbox]').prop('checked', true);
}
else
{
$('#filterchoices input[type=checkbox]').attr('checked', false);
$('#filterchoices input[type=checkbox]').prop('checked', false);

}
});
Expand Down

0 comments on commit 9c45fe7

Please sign in to comment.