View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
04953 | Bug reports | Conditions | public | 2011-02-13 17:21 | 2011-05-04 19:48 |
Reporter | c_schmitz | Assigned To | lemeur | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 1.91RC3 | ||||
Fixed in Version | 1.91 | ||||
Summary | 04953: GSOC - Usability improvements when copying conditions | ||||
Description | I noticed a couple things that could be improved when using the 'Copy conditions' feature:
| ||||
Tags | No tags attached. | ||||
Attached Files | condition.patch (1,529 bytes)
Index: conditionshandling.php =================================================================== --- conditionshandling.php (revision 9909) +++ conditionshandling.php (working copy) @@ -426,10 +426,6 @@ { $message .= $clang->gT("No condition selected to copy from","js").". "; } - if (!isset($copyconditionsto)) - { - $message .= $clang->gT("No question selected to copy condition to","js")."."; - } $conditionsoutput_action_error .= "<script type=\"text/javascript\">\n<!--\nalert('$message');\n//-->\n</script>\n"; } } @@ -1668,7 +1664,7 @@ ."\t});\n" ."}\n" ."</script>\n"; - + } else { Index: scripts/conditions.js =================================================================== --- scripts/conditions.js (revision 9909) +++ scripts/conditions.js (working copy) @@ -1,3 +1,12 @@ +$('#copyconditions').submit(function() { + if (!$("#copytomultiselect option:selected").length) + { + alert("Please select atleast one question for copying condition"); + return false; + + } + }); + function jquery_goodchars(e, goods) { var key, keychar; @@ -23,7 +32,8 @@ $(document).ready(function(){ - $('#languagetabs').tabs(); + +$('#languagetabs').tabs(); $('#radiototal,#radiogroup').change( function() { @@ -51,6 +61,7 @@ } ) } + ); conditionhandling.patch (2,427 bytes)
Index: conditionshandling.php =================================================================== --- conditionshandling.php (revision 9911) +++ conditionshandling.php (working copy) @@ -419,20 +419,7 @@ $CopyConditionsMessage = "<div class='warningheader'>(".$clang->gT("No conditions could be copied (due to duplicates)").")</div>"; } } - else - { - $message = $clang->gT("Did not copy questions","js").": "; - if (!isset($copyconditionsfrom)) - { - $message .= $clang->gT("No condition selected to copy from","js").". "; - } - if (!isset($copyconditionsto)) - { - $message .= $clang->gT("No question selected to copy condition to","js")."."; - } - $conditionsoutput_action_error .= "<script type=\"text/javascript\">\n<!--\nalert('$message');\n//-->\n</script>\n"; } -} //END PROCESS ACTIONS @@ -1371,6 +1358,7 @@ . "\t<input type='checkbox' name='aConditionFromScenario{$scenarionr['scenario']}' id='cbox{$rows['cid']}' value='{$rows['cid']}' checked='checked'/>\n" . "</td>\n"; } + $conditionsoutput_main_content .= "" ."<td valign='middle' align='right' width='40%'>\n" ."\t<font size='1' face='verdana'>\n"; @@ -1655,7 +1643,10 @@ ."<input type='hidden' name='gid' value='$gid' />\n" ."<input type='hidden' name='qid' value='$qid' />\n" ."</div>\n"; - + $conditionsoutput_main_content .= "<script type='text/javascript'> $('#copyconditions').submit(function() { + if (!$('input[@id=cbox{$rows['cid']}]:checked').length) { alert(\"".$clang->gT("Please select alteast one condition to copy from","js")."\");return false; } + if (!$('#copytomultiselect option:selected').length) { alert(\"".$clang->gT("Please select alteast one question to copy condition to","js")."\");return false; }}); ;</script>"; + $conditionsoutput_main_content .= "<script type=\"text/javascript\">\n" ."function prepareCopyconditions()\n" ."{\n" @@ -1668,7 +1659,7 @@ ."\t});\n" ."}\n" ."</script>\n"; - + } else { | ||||
Bug heat | 6 | ||||
Complete LimeSurvey version number (& build) | 9785 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | . | ||||
Server OS (if known) | . | ||||
Webserver software & version (if known) | . | ||||
PHP Version | . | ||||
Hi Thibault, could you please take a look at these issues and maybe discuss these? Carsten |
|
|
|
mark-all checkbox fixed in 9793. |
|
points 1 and 2 implemented in rev 9796. |
|
point 4 implemented in rev 9868 and 9869 |
|
point 3 requires more Jquery work... I think I'll be lazy on this one... Another thing: it would be great to use the new "status messaging system" instead of displaying "XXX conditions were copied, others were duplicates..." directly in the page. Does it accept HTML with Font colors ? |
|
I propose that a GSoC applicant have a look at point 3:
|
|
Patch uploaded, please review. |
|
@anishseth, Your patch doesn't cope with the "No condition selected to copy from" case. TIA, |
|
Hey Lemeur, I have added the above said condition. I am on the current stable branch with rev 9911. Please review the patch, and if you are satisfied with the patch i will commit. |
|
Anish, although the patch is basically fine, we should refrain from using inline JS code. Please move the code to a separate JS file (can also be an existing one, maybe conditions.js?). Whatever |
|
fixed and committed . |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2011-02-13 17:21 | c_schmitz | New Issue | |
2011-02-13 17:21 | c_schmitz | Status | new => assigned |
2011-02-13 17:21 | c_schmitz | Assigned To | => lemeur |
2011-02-13 17:22 | c_schmitz | Note Added: 14182 | |
2011-02-15 21:31 | lemeur | Note Added: 14190 | |
2011-02-15 22:46 | lemeur | Note Added: 14191 | |
2011-02-15 23:36 | lemeur | Note Added: 14192 | |
2011-03-08 18:56 | lemeur | Note Added: 14347 | |
2011-03-08 18:56 | lemeur | Note Edited: 14347 | |
2011-03-08 18:56 | lemeur | Note Edited: 14347 | |
2011-03-08 18:58 | lemeur | Note Added: 14348 | |
2011-03-08 18:58 | lemeur | Status | assigned => feedback |
2011-03-20 07:50 | lemeur | Summary | Usability improvements when copying conditions => GSOC - Usability improvements when copying conditions |
2011-03-20 07:50 | lemeur | Description Updated | |
2011-03-20 07:52 | lemeur | Note Edited: 14348 | |
2011-03-20 07:53 | lemeur | Note Added: 14470 | |
2011-03-20 07:53 | lemeur | Description Updated | |
2011-03-25 21:15 |
|
File Added: condition.patch | |
2011-03-25 21:16 |
|
Note Added: 14538 | |
2011-03-25 21:16 |
|
Note Edited: 14538 | |
2011-03-26 08:14 | lemeur | Note Added: 14547 | |
2011-03-26 12:38 |
|
Note Added: 14549 | |
2011-03-26 12:38 |
|
File Added: conditionhandling.patch | |
2011-03-26 17:41 | Mazi | Status | feedback => assigned |
2011-03-29 20:24 | c_schmitz | Note Added: 14608 | |
2011-04-15 06:40 |
|
Note Added: 14817 | |
2011-04-15 06:41 |
|
Status | assigned => resolved |
2011-04-15 06:41 |
|
Resolution | open => fixed |
2011-05-04 19:48 | c_schmitz | Status | resolved => closed |
2011-05-04 19:48 | c_schmitz | Fixed in Version | => 1.91 |