From 571ca5db06e381ab7a5dbfb93c97ab1ed80fe41d Mon Sep 17 00:00:00 2001 From: Patrick Donelan Date: Thu, 9 Apr 2009 07:57:37 +0000 Subject: [PATCH] Fixed small bug in Survey validation where invalid branch expressions wouldn't be shown Improved and i18n'ed Survey validation warning container --- docs/changelog/7.x.x.txt | 1 + .../root_import_survey_default-survey-edit.wgpkg | Bin 0 -> 1703 bytes lib/WebGUI/Asset/Wobject/Survey/SurveyJSON.pm | 5 +---- lib/WebGUI/i18n/English/Asset_Survey.pm | 8 ++++++-- www/extras/wobject/Survey/editsurvey.js | 12 ++++++++++-- www/extras/wobject/Survey/surveyedit.css | 10 ++++++++++ 6 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 docs/upgrades/packages-7.7.3/root_import_survey_default-survey-edit.wgpkg diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 54ab2d8c4..5a7fe3f2d 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -4,6 +4,7 @@ - Survey summaries now added. In the Survey edit, select quiz mode, and a summary will be shown to the user at the end of the survey. - fixed #10110: Matrix 2.0 - "Data Error" on Pending Product Listing Updates - rfe #9965: matrix/pls reverse dropped event variables + - fixed install of Passive Analytics settings for new sites 7.7.2 - fixed #10056: YUI javascripts included while adminOff (BNC) - fixed a bug that required you to hit "update cart" before the checkout diff --git a/docs/upgrades/packages-7.7.3/root_import_survey_default-survey-edit.wgpkg b/docs/upgrades/packages-7.7.3/root_import_survey_default-survey-edit.wgpkg new file mode 100644 index 0000000000000000000000000000000000000000..bcf746dbf33a96777a7bbc53ff2d11c308c66055 GIT binary patch literal 1703 zcmV;Y23YwYiwFP!000001MOH_Z`(E$&U1eS=Le?+BGd9Eo*g$smL_emBukrQ*)XpK zEzvd`iBw6-uG{s$?~s%%#ZJ}^vw;nW9%Pw^{LY;`hqbNEKlOUO({68V)$4wzT`zvo z;;C=>zQ5aP`n&MnLcZT__*)2;Z2n1=CK5zTh*k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cOl(d#~%FGt~B5(iw#;RMGx*);rB5(?Q)I`iq z__2_&vqtGE!kj3OZGkg`b0fa%Mri5eJkb~T0BbVNu261XzW#81Mq5;d^@~H_|8&Zy zH?u+nrY`3SE-getGotoTargets(); - my $goodTargets; + my $goodTargets = {}; my $duplicateTargets; for my $g (@{$gotoTargets}) { $goodTargets->{$g}++; diff --git a/lib/WebGUI/i18n/English/Asset_Survey.pm b/lib/WebGUI/i18n/English/Asset_Survey.pm index 302a2a986..5e4efd943 100644 --- a/lib/WebGUI/i18n/English/Asset_Survey.pm +++ b/lib/WebGUI/i18n/English/Asset_Survey.pm @@ -67,6 +67,10 @@ our $I18N = { message => q|Delete|, lastUpdated => 1224686319 }, + 'warnings' => { + message => q|Warnings|, + lastUpdated => 0 + }, 'section number' => { message => q|Section Number:|, lastUpdated => 1224686319 @@ -355,9 +359,9 @@ our $I18N = { lastUpdated => 0 }, 'jump expression description' => { - message => q|An expression used to control complex branching based user responses to previous questions.|, + message => q|An expression used to control complex branching based user responses to previous questions. Ignored unless enableSurveyExpressionEngine enabled in your site config file.|, context => q|Description of the 'jump expression' field, used as hoverhelp in the edit answer dialog.|, - lastUpdated => 0 + lastUpdated => 1239259550 }, 'text answer' => { message => q|TextArea|, diff --git a/www/extras/wobject/Survey/editsurvey.js b/www/extras/wobject/Survey/editsurvey.js index bad386699..509e231f6 100644 --- a/www/extras/wobject/Survey/editsurvey.js +++ b/www/extras/wobject/Survey/editsurvey.js @@ -56,9 +56,17 @@ Survey.Data = (function(){ focus = d.address;//What is the current highlighted item. var warnings = ""; for(var w in d.warnings){ - warnings = warnings + "
" + d.warnings[w]; + warnings += "
" + d.warnings[w] + "
"; + } + if (document.getElementById('warnings')) { + if (warnings !== "") { + document.getElementById('warnings').innerHTML = warnings; + YAHOO.util.Dom.setStyle('warnings-outer', 'display', 'block'); + } + else { + YAHOO.util.Dom.setStyle('warnings-outer', 'display', 'none'); + } } - document.getElementById('warnings').innerHTML = warnings; var showEdit = 1; if (lastId.toString() === d.address.toString()) { showEdit = 0; diff --git a/www/extras/wobject/Survey/surveyedit.css b/www/extras/wobject/Survey/surveyedit.css index c9853549d..1740e13a4 100644 --- a/www/extras/wobject/Survey/surveyedit.css +++ b/www/extras/wobject/Survey/surveyedit.css @@ -171,3 +171,13 @@ li.newAnswer { width:15em; margin-top:0.5em; } + +#warnings-outer { + margin: 5px; + padding: 0 5px; + border: 1px solid; + color: red; +} +#warnings { + color: red; +}