To modify the slider handle shape (multiple numerical input question type)

Plus d'informations
il y a 2 mois 1 semaine #168480 par Albinux
Albinux a créé le sujet : To modify the slider handle shape (multiple numerical input question type)
Hi everyone,

First of all, I would like to thank all the active members of this forum for their valuable work.

My LimeSurvey version is 2.72.6+171207.

In the question type "multiple numerical input", it is possible to use a continuum with a cursor/slider. By default, this slider can take three different shapes: a circle, a square or a triangle. There is also an option "custom". When I check this option, I get a little man-shaped slider instead of the three other shapes mentioned above.

What I would like is to have a short vertical line as a slider.


Do you know what I have to do to get such a slider ?

Thank you very much in advance.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 mois 1 semaine - il y a 2 mois 1 semaine #168529 par Joffm
Joffm a répondu au sujet : To modify the slider handle shape (multiple numerical input question type)
My idea,
use the "square" and
1. minimize the width.
2. adapt the position of tooltip

So put this at the end of your "template,css"
.slider-handle {
    height:28px;
    width:2px;
/* Change the color if desired
    background-color: #C18D00;
    background-image: -webkit-linear-gradient(top, #C18D00 0%, #C18D00 100%);
    background-image: -o-linear-gradient(top, #C18D00 0%, #C18D00 100%);
    background-image: linear-gradient(to bottom, #C18D00 0%, #C18D00 100%);
*/    
}
.slider .tooltip.tooltip-main {
    margin-left:-20px !important;
  }



To hide the tooltip add:
.slider .tooltip.top {
    display: none !important;
}
.slider .tooltip-main .top {
        display: none !important;
}

Best regards
Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Pièces jointes :
Dernière édition: il y a 2 mois 1 semaine par Joffm.
Les utilisateur(s) suivant ont remercié: Albinux

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 mois 1 semaine #168530 par Albinux
Albinux a répondu au sujet : To modify the slider handle shape (multiple numerical input question type)
Hello Joffm,

Your idea fits perfectly, thank you very much!

However, two small problems are emerging:

1) The slider is not centered vertically with the horizontal continuum (it is slightly too low).
I solved the problem by adding top: -0.30em; to the portion of code you suggested:
.slider-handle {
    height:28px;
    width:4px;
    top: -0.30em;
/* Change the color if desired
    background-color: #C18D00;
    background-image: -webkit-linear-gradient(top, #C18D00 0%, #C18D00 100%);
    background-image: -o-linear-gradient(top, #C18D00 0%, #C18D00 100%);
    background-image: linear-gradient(to bottom, #C18D00 0%, #C18D00 100%);
*/    
}

2) The initial position of the slider is slightly shifted to the left from the start of the horizontal continuum. The slider is therefore outside the horizontal continuum. Furthermore, it is not possible to move the slider to the right end of the continuum. The slider stops slightly to the left of this end.
Concerning this problem, I did not find the code to add to fix it.
Do you still have a good idea in stock? :)

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 mois 1 semaine #168532 par Joffm
Joffm a répondu au sujet : To modify the slider handle shape (multiple numerical input question type)
Hi, albinux,
you have to adapt the css, of course.
Use a webdeveloper tool which is included in your webbrowser and examine and change the values.

But there are two more options.

1. The very easy way:
Use the "custom" option. Here you enter the code of the fontawesome icon. http://astronautweb.co/snippet/font-awesome/
Only the four characters "f...".



2. The more sophisticated way:
Use this script. You have to create your own png.
https://www.limesurvey.org/forum/design-issues/113075-how-to-personnalize-sliders-design#161148



Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Pièces jointes :
Les utilisateur(s) suivant ont remercié: tpartner, Albinux

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 mois 1 semaine #168555 par Albinux
Albinux a répondu au sujet : To modify the slider handle shape (multiple numerical input question type)

you have to adapt the css, of course.
Use a webdeveloper tool which is included in your webbrowser and examine and change the values.


This is the way I chose. This way led me to add to the template.css file the following line of code: margin-left: -0.10em !important;. More specifically, I included it in the code portion cited in my previous message:
.slider-handle {
    height: 28px;
    width: 4px;
    top: -0.30em;
    margin-left: -0.10em !important;
}

And it works perfectly! :)

Thank you again Joffm !

Best regards

Albinux

Connexion ou Créer un compte pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!