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

Mehr
2 Wochen 4 Tage her #168480 von Albinux
Albinux erstellte das Thema 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.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
2 Wochen 2 Tage her - 2 Wochen 2 Tage her #168529 von Joffm
Joffm antwortete auf das Thema: 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
Anhang:
Letzte Änderung: 2 Wochen 2 Tage her von Joffm.
Folgende Benutzer bedankten sich: Albinux

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
2 Wochen 2 Tage her #168530 von Albinux
Albinux antwortete auf das Thema: 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? :)

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
2 Wochen 2 Tage her #168532 von Joffm
Joffm antwortete auf das Thema: 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
Anhang:
Folgende Benutzer bedankten sich: tpartner, Albinux

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
2 Wochen 2 Tage her #168555 von Albinux
Albinux antwortete auf das Thema: 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

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha