Welcome, Guest
Username: Password: Remember me

TOPIC: Using pictures in ranking question

Re: Using pictures in ranking question 3 years 6 months ago #57559

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6318
  • Thank you received: 811
  • Karma: 242
tpartner : what do you think to replace actual ranking javascript by jquery-ui sortable .

If you'r OK, i put this in bug tracker/ feature request ;)
Last Edit: 3 years 6 months ago by DenisChenu.
The administrator has disabled public write access.

Re: Using pictures in ranking question 3 years 6 months ago #57561

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4185
  • Thank you received: 785
  • Karma: 359
what do you think to replace actual ranking javascript by jquery-ui sortable
Well, I think it's a better interface but don't you think there may be too many people using the old format that may be messed up when updating?
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Using pictures in ranking question 3 years 6 months ago #57579

  • paulfiner
  • paulfiner's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 92
  • Thank you received: 1
  • Karma: 1
Hi Tony

Your picture example looks great and is exactly what I needed. However, when setting up the workaround I'm not getting the new drag and drop question.
I thought I'd try and get it working without pictures first but I just have the original ranking question showing.

The first javascript file has been copied to template.js and I have added the second smaller file to the actual ranking question.

Here's a link to my survey: finersurveys.limequery.com/19197/lang-en
Last Edit: 3 years 6 months ago by paulfiner.
The administrator has disabled public write access.

Re: Using pictures in ranking question 3 years 6 months ago #57588

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6318
  • Thank you received: 811
  • Karma: 242
paulfiner I don't see the template.js link in the source of your template.

The link have to be set in starpage.pstpl, you can found it in default template.



To tpartner you're right :( , but we already made some modification woth some problems with old template .
The administrator has disabled public write access.

Re: Using pictures in ranking question 3 years 6 months ago #57634

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4185
  • Thank you received: 785
  • Karma: 359
Did you figure this out Paul?

As Shnoulle says, you need to add the following just before the </head> tag in startpage.pstpl:
<script type="text/javascript" src="{TEMPLATEURL}template.js"></script>
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 3 years 6 months ago by tpartner.
The administrator has disabled public write access.

Re: Using pictures in ranking question 3 years 6 months ago #57716

  • paulfiner
  • paulfiner's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 92
  • Thank you received: 1
  • Karma: 1
Hi Tony

I finally got some time to try your workaround and managed to get the first part sorted.
However, the images part doesn't seem to work and the 3 images I have tried just appear in the question text.

My example survey is still live so you can see what I mean.
The administrator has disabled public write access.

Re: Using pictures in ranking question 3 years 6 months ago #57723

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6318
  • Thank you received: 811
  • Karma: 242
Hello Paul,

For me it work ?
There are some disgracious but it's need some modification in template.css
#question2505 .dragDropTable li {
    background: none repeat scroll 0 50% transparent;
    border: 0 none;
    height: 80px;
    width: 80px;
}
#question2505 .dragDropTable .dragDropChoiceList, #question2505 .dragDropTable .dragDropRankList {
    min-height: 80px;
    min-width: 80px;
    width: auto;
}
Somethink like that :)
The administrator has disabled public write access.

Re: Using pictures in ranking question 3 years 6 months ago #57725

  • paulfiner
  • paulfiner's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 92
  • Thank you received: 1
  • Karma: 1
Hi

It seems to be working now. I added in your extra bit of CSS and everything works.
Thanks for all you help (and Tony!)

Cheers

Paul
The administrator has disabled public write access.

Re: Using pictures in ranking question 3 years 6 months ago #57730

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4185
  • Thank you received: 785
  • Karma: 359
but it's need some modification in template.css
Yep, thanks Shnoulle, you need to modify the CSS for the size of your images as stated in the workaround:
These styles are for the default template using 50x50px images (as in the demo) and may need to be modified for other templates or image sizes.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Using pictures in ranking question 3 years 6 months ago #57731

  • paulfiner
  • paulfiner's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 92
  • Thank you received: 1
  • Karma: 1
I have now added in all the images to complete the question and it looks good.

How difficult would it be to arrange the images into 2 or 3 columns?
In my actual question I have 24 brands on the left and the respondent must rate their top 12.
Having all 24 brands in a long list doesn't look too nice.

Cheers

Paul
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.137 seconds
Donation Image