View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
07514Feature requestsTheme editorpublic2013-08-09 11:20
Reporterlovepade Assigned Tosammousa  
PrioritynormalSeverityfeature 
Status assignedResolutionopen 
Summary07514: Custom styling disappears when survey is copied
Description

I often apply custom css styling to certain questions. I also often copy surveys (or base new ones on old ones).

The custom styling is dependant on the specific question_ID, like this:

#question2736 .answer_cell_001
background-color: #ff0000;

So when I copy a survey I must 1) copy the template, 2) assign a new template 3) change all #question classes to the new questionclass. As this is not trivial and can only be done by inspecting the stylesheet of both surveys, it would be really swell with a smart way of doing this.

Additional Information

A possible solution: maybe lesscss
less (http://lesscss.org/) allows for css variables.

Maybe this could be used to carry over the custom properties when copying a survey?

I don't know exactly how to do it though. Maybe the styling should be done under advanced question attributes, instead of manually in the style sheet?

I don't know the solution, but the problem is real :-)

TagsNo tags attached.
Bug heat6
Story point estimate
Users affected %

Users monitoring this issue

There are no users monitoring this issue.

Activities

Mazi

Mazi

2011-11-04 13:22

updater   ~24379

At Limesurvey 2.0 there will be an advanced export option which exports survey, template, token data and answer data as a ZIP file which can then be imported.
The according import could be extended to also replace question IDs at the CSS files when importing the template. This has to be an optional setting because usually you use one template for several surveys.

Another solution would be an CSS export/import feature which replaces IDs.

lovepade

lovepade

2011-11-08 15:10

reporter   ~24380

Both solutions seems good. And yes - I guess this should be optional.

I use this e.g. for some questions which have a e.g. a seven point answer scale. Then I user color gradients from green to red, as a visual aid to the respondent. (respondents give me really good feedback about this.)

Maybe this could be implemented as new custom questions types? This way I could e.g. create a specific question, save it as a new question type, with custom styling. Later I can choose this question type in new surveys...

What ever is the less hassle to implement :-)

DeveloperChris

DeveloperChris

2013-08-09 05:41

reporter   ~25943

Last edited: 2013-08-09 05:42

There is no need to implement a search and replace for css

Each group and question should have the ability to add a custom class to it that would be carried through on import and would prevent the need for writing the same class many times

For example I just created a moderate survey. to get the survey to look right I had to hide javascript into the description of every group to add the required classes to the appropriate question

I then saved the survey and imported it to create a second copy that was because both surveys were very similar (different target audience)

I was stunned to find the questions renumbered. Why? questions should be referenced by surveyid-question they should not be unique per survey!

Now I have to go through each group and redo the javascript - bummer dude.

A simple additional field could be used to add a css class to each of the required questions and this would not have been a problem. in fact it could be just a named custom field which could be inserted into the group or question using {CUSTOM-FIELDNAME} that way it would be totally flexible

I am going to report it as a feature request.

BTW lesscss would not solve the issue. you still need to identify the question somehow

Mazi

Mazi

2013-08-09 09:17

updater   ~25945

Last edited: 2013-08-09 11:20

I like the idea of being able to add additional CSS classes to questions. This could easily be done by an additional question attribute.

This might be implemented at the next Limesurvey 2.1 version.

Issue History

Date Modified Username Field Change
2013-08-09 05:41 DeveloperChris Note Added: 25943
2013-08-09 05:42 DeveloperChris Note Edited: 25943
2013-08-09 09:17 Mazi Note Added: 25945
2013-08-09 11:19 Mazi Assigned To => sammousa
2013-08-09 11:19 Mazi Status acknowledged => assigned
2013-08-09 11:20 Mazi Note Edited: 25945
2015-12-11 14:40 c_schmitz Category Templates => Theme editor