View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 03805 | Bug reports | Theme editor | public | 2009-10-31 00:07 | 2009-12-11 12:17 |
| Reporter | dynia | Assigned To | tpartner | ||
| Priority | normal | Severity | partial_block | ||
| Status | closed | Resolution | fixed | ||
| Product Version | 1.86 | ||||
| Summary | 03805: Assignment of class atributes to <td> tags in dual-scale questions | ||||
| Description | In dual-scale array questions unlike in other array questions (where class="answer_cell_xxx" are used) no class atributes are assigned to <td> tags containing answers' fields to be chosen. It makes imposible any change in a way such questions are shown (particularly by editing template's .css file). It may be seen rather as a feature request but I see it as a bug. | ||||
| Steps To Reproduce | |||||
| Additional Information | I'm using LimeService. | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Bug heat | 10 | ||||
| Complete LimeSurvey version number (& build) | 1.86 | ||||
| I will donate to the project if issue is resolved | |||||
| Browser | |||||
| Database type & version | ? | ||||
| Server OS (if known) | ? | ||||
| Webserver software & version (if known) | ? | ||||
| PHP Version | ? | ||||
| Git branch / Pull Request URL | |||||
|
@ dynia: can you provide a patch, which contains this class attributes and is tested on the most used browsers (IE6, IE7, IE8, FF2, FF3, Chrome, Safari)? |
|
|
Maybe I chose "Templates" as a category may be confusing. Problem concerns PHP code responsible for preparing HTML code of dual-scale array questions. It doesn't do one thing that code preparing "simple" array questions does - table cells tags in question table of "simple" array questions looks like: <td class="some_class_name"> while in dual-scale array questions like: <td> and that is the problem. The problem isn't browser-specific because having class attribute (<td class="class_name">) is interpreted in the same way by all browsers (excluding such rare and specific ones, like text browsers) - it simply allows you to change a way the tag content is shown by assigning css styles (in a manner: .class_name {styles_assigned}) but don't make any assumptions what styles would be assigned (what could be browser-specific). Problem requires adding few (I think) lines of PHP code in a part responsible for preparing HTML code of dual-scale questions (to make its HTML output similar to those of "simple" array questions with concern to assigning class atributes to <td> tags). I think a person more familiar with Lime's source code would be able to do it much faster and with much less effort than when I would try to do so. |
|
|
dynia, the code to display questions can be found in qanda.php. Each question has a function "do_questiontype()" where you can change this. Just give it a try if possible. |
|
|
O.K. I'll try. |
|
|
Here it is (qanda-build7697-20090930-dual_scale_class_patch.php). I added a little into lines 6017, 6035 and 6043: 6017 '$answer .= "\t\t\t<td>\n"' 6043 - just like 6017; it's analogous to code in line 4988 (function do_array_flexible() ); 6035 '$answer .= "\t\t\t<td> </td>\n";' I didn't test it, because at that moment I've got no Limesurvey I can change something to (using Limeservice - my home server failed to cooperate with Lime :( ). Though I think it should work properly, because changes are very minor. |
|
|
@ Evan: please review the posted modifications - Thx! |
|
|
Any progress? |
|
|
I've added class attributes to the answer <td> elements of all array question types except Array-Flexible-Labels (that type was already done). The result for non-dual-scale types will be something like: For dual scale something like: dynia, I think this will give the flexibility you require. ElMatador69, the fix was checked in at revision: 7843 |
|
|
Great! That is it. Only one question to be sure. Will the "separator" cell in dual-scale question have it's own class too? (Asking because You didn't mention about it - but it would be nice to can manage this cell view also) |
|
|
Is it possible this fix be contained in 1.87 release? |
|
|
Yup, the separator cell will be: I would imagine the fix will be in 1.87 but ElMatador69 would have to answer that for sure. In the meantime, this workaround may be of use: |
|
|
Hi Tony, Thank you! |
|
|
Hi Carsten, My understanding is that the classes .array1 and .array2 are applied to the rows to give them alternating backgrounds, not columns. This fix applies different classes to the columns in the <tbody> to facilitate styling. So, unless I'm missing something, the <thead> row should have the class .array1. |
|
|
Fixed in version 7843. |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2009-10-31 00:07 | dynia | New Issue | |
| 2009-10-31 00:07 | dynia | Status | new => assigned |
| 2009-10-31 00:07 | dynia | Assigned To | => user372 |
| 2009-10-31 00:07 | dynia | LimeSurvey build number | => 1.86 |
| 2009-10-31 00:07 | dynia | Database & DB-Version | => ? |
| 2009-10-31 00:07 | dynia | Operating System (Server) | => ? |
| 2009-10-31 00:07 | dynia | Webserver | => ? |
| 2009-10-31 00:07 | dynia | PHP Version | => ? |
| 2009-10-31 00:11 |
|
Note Added: 09927 | |
| 2009-10-31 00:13 |
|
Status | assigned => feedback |
| 2009-10-31 10:25 | dynia | Note Added: 09928 | |
| 2009-10-31 10:26 | dynia | Note Edited: 09928 | |
| 2009-10-31 10:27 | dynia | Note Edited: 09928 | |
| 2009-10-31 11:15 | Mazi | Note Added: 09930 | |
| 2009-10-31 13:05 | dynia | Note Added: 09931 | |
| 2009-10-31 15:31 | dynia | File Added: qanda-build7697-20090930-dual_scale_class_patch.php | |
| 2009-10-31 15:45 | dynia | Note Added: 09932 | |
| 2009-10-31 15:46 | dynia | Note Edited: 09932 | |
| 2009-11-02 08:23 |
|
Note Added: 09946 | |
| 2009-11-02 08:23 |
|
Status | feedback => assigned |
| 2009-11-02 08:23 |
|
Assigned To | user372 => Evan |
| 2009-11-05 17:59 | dynia | Note Added: 09978 | |
| 2009-11-05 20:00 |
|
Assigned To | Evan => tpartner |
| 2009-11-07 00:11 | tpartner | Note Added: 09984 | |
| 2009-11-07 10:18 | dynia | Note Added: 09985 | |
| 2009-11-07 10:21 | dynia | Note Added: 09986 | |
| 2009-11-07 12:21 | tpartner | Note Added: 09987 | |
| 2009-11-15 22:14 |
|
Summary | Assignment of class atributes to <td> tags in dual-scale questions => Assignment of class atributes to <td> tags in dual-scale questions |
| 2009-11-15 22:14 |
|
Description Updated | |
| 2009-11-15 22:14 |
|
Steps to Reproduce Updated | |
| 2009-11-15 22:15 | c_schmitz | Note Added: 10112 | |
| 2009-11-16 03:10 | tpartner | Note Added: 10114 | |
| 2009-12-03 14:24 | tpartner | Note Added: 10420 | |
| 2009-12-03 14:24 | tpartner | Status | assigned => resolved |
| 2009-12-03 14:24 | tpartner | Resolution | open => fixed |
| 2009-12-11 12:17 | c_schmitz | Status | resolved => closed |
| 2015-12-11 14:40 | c_schmitz | Category | Templates => Theme editor |