From 7b775f8408f3f76d249ca938c17f1ac79886c649 Mon Sep 17 00:00:00 2001 From: jcleeland Date: Sun, 22 Jul 2012 11:51:04 +1000 Subject: [PATCH] Fixed issue #6363 Statistics repsonse filters don't display speaker icon, show question text twice New feature Statistics output screen cleaned up, placed inside collapsible divs --- .../views/admin/export/statistics_view.php | 263 ++++++++++-------- scripts/admin/statistics.js | 15 +- styles/gringegreen/adminstyle.css | 13 +- 3 files changed, 168 insertions(+), 123 deletions(-) diff --git a/application/views/admin/export/statistics_view.php b/application/views/admin/export/statistics_view.php index 98607dab8b2..b22252b6c82 100644 --- a/application/views/admin/export/statistics_view.php +++ b/application/views/admin/export/statistics_view.php @@ -10,131 +10,138 @@ var graphUrl="getController()->createUrl("admin/statistics/graph"); ?>";
-
eT("General filters"); ?>
-
- '.$clang->gT('You do not have the GD Library installed. Showing charts requires the GD library to function properly.'); - $error .= '
'.$clang->gT('visit http://us2.php.net/manual/en/ref.image.php for more information').'
'; - } - else if (!function_exists("imageftbbox")) { - $error .= '
'.$clang->gT('You do not have the Freetype Library installed. Showing charts requires the Freetype library to function properly.'); +
+
<?php $clang->eT("Maximize"); ?><?php $clang->eT("Minimize"); ?>
+ eT("General filters"); ?> +
+ + - -

- - ', '_top')" /> -

- +
<?php $clang->eT("Maximize"); ?><?php $clang->eT("Minimize"); ?>
eT("Response filters"); ?>
- + + - +
@@ -183,7 +190,8 @@ + || $flt[2]=='G' || $flt[2]=='I' || $flt[2]=='O' || $flt[2]=='Y' || $flt[2]=='!') + { ?> /> +
@@ -1251,22 +1260,36 @@

-
+
+ +
+
+
<?php $clang->eT("Maximize"); ?><?php $clang->eT("Minimize"); ?>
+ eT("Statistics"); ?> +
+ +
+
lang; - $sImageURL = Yii::app()->getConfig("imageurl"); + $sImageURL = Yii::app()->getConfig('adminimageurl'); if(!isset($maxchars)) { $maxchars = 100; } $htmlhinttext=str_replace("'",''',$hinttext); //the string is already HTML except for single quotes so we just replace these only - $jshinttext=javascriptEscape($hinttext,true,true); + $jshinttext=javascriptEscape($hinttext,true,true); //Build a javascript safe version of the string if(strlen($hinttext) > ($maxchars)) { @@ -1275,15 +1298,15 @@ function _showSpeaker($hinttext) $shortstring = htmlspecialchars(mb_strcut(html_entity_decode($shortstring,ENT_QUOTES,'UTF-8'), 0, $maxchars, 'UTF-8')); //output with hoover effect - $reshtml= "gT("Question","js").": $jshinttext')\">" ." \"$shortstring...\" " - ."$htmlhinttextgT("Question","js").": $jshinttext')\" />"; } else { - $reshtml= " \"$htmlhinttext\""; + $reshtml= " \"$htmlhinttext\""; } return $reshtml; } diff --git a/scripts/admin/statistics.js b/scripts/admin/statistics.js index dd278e75c35..76692f3ea5b 100644 --- a/scripts/admin/statistics.js +++ b/scripts/admin/statistics.js @@ -18,16 +18,29 @@ $(document).ready(function(){ } }) $('#hidefilter').click( function(){ + $('#statisticsresponsefilters').hide(1000); $('#filterchoices').hide(); $('#filterchoice_state').val('1'); $('#vertical_slide2').hide(); }) $('#showfilter').click( function(){ + $('#statisticsresponsefilters').show(1000); $('#filterchoices').show(); $('#filterchoice_state').val(''); $('#vertical_slide2').show(); }) - + $('#hidegfilter').click( function(){ + $('#statisticsgeneralfilters').hide(1000); + }) + $('#showgfilter').click( function(){ + $('#statisticsgeneralfilters').show(1000); + }) + $('#hidesfilter').click( function(){ + $('#statisticsoutput').hide(1000); + }) + $('#showsfilter').click( function(){ + $('#statisticsoutput').show(1000); + }) if (typeof aGMapData == "object") { for (var i in aGMapData) { gMapInit("statisticsmap_" + i, aGMapData[i]); diff --git a/styles/gringegreen/adminstyle.css b/styles/gringegreen/adminstyle.css index 6555d1261d3..df68966b0f2 100644 --- a/styles/gringegreen/adminstyle.css +++ b/styles/gringegreen/adminstyle.css @@ -493,8 +493,17 @@ th.admincell { .header_statistics { height:21px; - padding:1px; - padding-left:42px; + padding:1px 8px 1px 15px; + margin-bottom: 0; +} +.statisticsfilters { + width: 99%; + border: 1px solid #85BD00; + margin-bottom: 20px; +} +.scrollheight_400 { + height: 400px; + overflow: auto; } .btnaddanswer,