View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
10454Bug reportsSurvey takingpublic2016-04-25 13:54
Reporterphylu Assigned ToLouisGac 
PrioritylowSeverityminor 
Status closedResolutionfixed 
Product Version2.50.x 
Summary10454: Slider Label for multiple numeric input question not shown correctly
Description

When using a multiple numeric input question with a left/right separator (e.g. |), the labels are not shown correctly on the left/right side of the question. Instead there is one label above the slider that contains the whole text (including the |).

TagsNo tags attached.
Attached Files
slider_label.png (65,165 bytes)   
slider_label.png (65,165 bytes)   
leftright.jpg (12,249 bytes)   
leftright.jpg (12,249 bytes)   
slider_205.png (177,297 bytes)
slider_bugfix.png (47,751 bytes)   
slider_bugfix.png (47,751 bytes)   
Bug heat12
Complete LimeSurvey version number (& build)build160213
I will donate to the project if issue is resolvedNo
BrowserChromium / Firefox
Database type & versionmysql Ver 14.14 Distrib 5.5.47, for debian-linux-gnu (x86_64) using readline 6.3
Server OS (if known)Debian 8.3
Webserver software & version (if known)Apache/2.4.10
PHP VersionPHP Version 5.6.17-0+deb8u1

Users monitoring this issue

phylu, pkolodz

Activities

phylu

phylu

2016-02-15 16:14

reporter   ~35150

In addition, I just noticed that the setting "Slider starts at middle position" does not set the slider in the middle.

LouisGac

LouisGac

2016-02-17 14:21

developer   ~35312

well this display exactly as in 2.06.
I personnaly don't understand what should do the left/right separator.
I will correct the slider in the middle thing now (which can still be set by Slider initial value).

phylu

phylu

2016-02-17 14:29

reporter   ~35313

Unfortunately, that is not how it is supposed to look. I am just restoring my old limesurvey 2.05 version, to create a screenshot, how it is supposed to be.

LouisGac

LouisGac

2016-02-17 14:33

developer   ~35314

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=17477

LouisGac

LouisGac

2016-02-17 14:34

developer   ~35315

ok thanks, so I will understand what I have to change.

phylu

phylu

2016-02-17 14:47

reporter   ~35316

Last edited: 2016-02-17 14:53

Uploaded slider_205.png. Version is: Version 2.05+ Build 141113 (Otherwise same system.)

The separator in the question settings is the character, on where the question name is separated:

  • question name
  • left side label
  • right side label

So '|unerfreulich|erfreulich' as sub-question-text should lead to the first slider in the screenshot, when the separator is set to '|'

Feel free to use my survey to see how the HTML looked generated: https://limesurvey205.phynformatik.de/index.php/287186/lang-de-informal (Just use any numerical value for the first question)

LouisGac

LouisGac

2016-02-22 10:00

developer   ~35501

Ok I understand. Thank you for your effort. I'll correct it soon.

LouisGac

LouisGac

2016-02-22 13:38

developer   ~35532

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=17557

LouisGac

LouisGac

2016-02-22 13:40

developer   ~35533

don't hesitate to reopen the bug if you find anything else related.

phylu

phylu

2016-02-22 14:41

reporter   ~35535

Last edited: 2016-02-22 14:42

The bugfix splits the labels correctly. Thanks!

However the alginments do not yet fit. The length of the first word defines where the slider starts, but the sliders should be aligned below each other with the first label right aligned next to the slider. (Compare new screenshot with the one from version 2.05)

LouisGac

LouisGac

2016-02-22 15:23

developer   ~35537

ok, I will do that later.

tpartner

tpartner

2016-03-03 15:37

partner   ~35887

@LouisGac, just a note regarding your comment "which can still be set by Slider initial value". This is not exactly true :)

Setting "Slider starts at middle position" should initially place the handle in the middle but NOT record any data.

Setting "Slider initial value" should initially place the handle in the assigned position AND record that in the data.

LouisGac

LouisGac

2016-03-03 15:39

developer   ~35889

ok, thanks for that feedback. For now, the middle position is restored, and the business code in quanda is just the same as before (few additions for new logic, but nothing removed).

Carsten told me you experienced problems with sliders ? But he couldn't tell me exactly what. Maybe you could open bugs about it ?

tpartner

tpartner

2016-03-03 15:50

partner   ~35893

My problem with the sliders is that they were (arbitrarily ?) changed from jQuery UI to Bootstrap in 2.5 (which was supposed to be a minor update). This will break many existing layouts and workarounds.

Having said that, it was made pretty clear to me in the dev meeting that nothing was going to be done about it so I don't see any point in opening a bug.

LouisGac

LouisGac

2016-03-03 16:29

developer   ~35898

Last edited: 2016-03-03 16:31

yep, 2.5 templates are using Bootstrap.

I don't take decision "arbitrarily" : I spent half a day trying to debug the sliders to keep them as they were before. But here the original code :
https://github.com/LimeSurvey/LimeSurvey/blob/5df45d48bbe74e534112d7a6e92bcda51fd4fdc4/scripts/numeric-slider.js

A Javascript file mixed with HTML (like it often happen in LimeSurvey); nested if statements; json mixed with strings and integers then parsed to text; DOM browsing based on nested find, parents, children, rather than selectors ; and all this in a single function. So clearly : a extremely hard code to read, understand, debug, maintain. So after few hours, I decided to rewrite it, using Bootstrap.

So now, it's using a view for the HTML (and no HTML injection from JavaScript) :
https://github.com/LimeSurvey/LimeSurvey/blob/master/application/views/survey/questions/multiplenumeric/item.php

It's using HTML5 data attribute to parse the datas to the slider component. So it needs a single line of javascript to work (instead of the huge unreadable file ) :
var mySlider = $("#answer<?php echo $myfname; ?>").bootstrapSlider();

HTML5 make JavaScript easier.

If you need to understand or discuss what I'm doing, feel free to ask me in the IRC chat, where I'm always available. I'm not doing choices "arbitrarily".

By the way, I've heard said that you was quiet good at JavaScript, so I'll be always happy if you critic and correct my code.

Could you please give me example of workarounds that are no more working with the new sliders ? Maybe opening a bug report ?

tpartner

tpartner

2016-03-03 17:37

partner   ~35908

@LouisGac, thank you for your explanation.

I don't have any specific examples but given the HTML differences any workaround involving the structure of the slider will likely be broken. Also differences in the Bootstrap slider API (getValue, setValue, setAttribute, etc.) may break workarounds using the API.

But, as I said, I don't see the point in reporting bugs on those.

phylu

phylu

2016-03-07 17:14

reporter   ~36094

My latest comment is still valid: The alignments of the words do not fit. The length of the first word defines where the slider starts, but the sliders should be aligned below each other with the first label right aligned next to the slider.

LouisGac

LouisGac

2016-03-07 17:35

developer   ~36097

sure phylu. But it's no more a bug, it's a display improvement. For now, we correct all the remaining bugs in the frontend side. When it will done (less than 2 weeks I guess), the new miltestone will to provide a true beautiful and fancy template, and that will be the right time to do this alignment thing.

phylu

phylu

2016-03-07 18:35

reporter   ~36100

KK. Just wanted to make sure, that you have not just missed that one.

c_schmitz

c_schmitz

2016-04-25 13:54

administrator   ~37777

Version 2.50+ Build 160425 released

Related Changesets

LimeSurvey: master bffa05f8

2016-02-17 13:33:39

LouisGac

Details Diff
Fixed issue 10454: restored slider middle start function Affected Issues
10454
mod - application/helpers/qanda_helper.php Diff File

LimeSurvey: master 40a6c876

2016-02-22 12:38:22

LouisGac

Details Diff
Fixed issue 10454: Slider Label for multiple numeric input question not shown correctly Affected Issues
10454
mod - application/helpers/qanda_helper.php Diff File
mod - application/views/survey/questions/multiplenumeric/item.php Diff File

Issue History

Date Modified Username Field Change
2016-02-15 15:34 phylu New Issue
2016-02-15 15:34 phylu File Added: limesurvey_survey_285192.lss
2016-02-15 15:34 phylu Issue Monitored: phylu
2016-02-15 16:14 phylu Note Added: 35150
2016-02-15 16:14 phylu File Added: slider_label.png
2016-02-15 16:46 c_schmitz Priority normal => high
2016-02-15 17:49 LouisGac Assigned To => LouisGac
2016-02-15 17:49 LouisGac Status new => assigned
2016-02-17 14:20 LouisGac File Added: leftright.jpg
2016-02-17 14:21 LouisGac Note Added: 35312
2016-02-17 14:21 LouisGac Status assigned => resolved
2016-02-17 14:21 LouisGac Resolution open => fixed
2016-02-17 14:29 phylu Note Added: 35313
2016-02-17 14:29 phylu Status resolved => feedback
2016-02-17 14:29 phylu Resolution fixed => reopened
2016-02-17 14:33 LouisGac Changeset attached => LimeSurvey master bffa05f8
2016-02-17 14:33 LouisGac Note Added: 35314
2016-02-17 14:34 LouisGac Note Added: 35315
2016-02-17 14:39 phylu Issue End Monitor: phylu
2016-02-17 14:40 phylu File Added: slider_205.png
2016-02-17 14:47 phylu Note Added: 35316
2016-02-17 14:47 phylu Status feedback => assigned
2016-02-17 14:51 phylu Issue Monitored: phylu
2016-02-17 14:53 phylu Note Edited: 35316
2016-02-18 22:42 pkolodz Issue Monitored: pkolodz
2016-02-22 10:00 LouisGac Note Added: 35501
2016-02-22 10:00 LouisGac Status assigned => new
2016-02-22 10:01 LouisGac Status new => assigned
2016-02-22 13:38 LouisGac Changeset attached => LimeSurvey master 40a6c876
2016-02-22 13:38 LouisGac Note Added: 35532
2016-02-22 13:40 LouisGac Note Added: 35533
2016-02-22 13:40 LouisGac Status assigned => resolved
2016-02-22 13:40 LouisGac Resolution reopened => fixed
2016-02-22 14:41 phylu Note Added: 35535
2016-02-22 14:41 phylu Status resolved => feedback
2016-02-22 14:41 phylu Resolution fixed => reopened
2016-02-22 14:41 phylu File Added: slider_bugfix.png
2016-02-22 14:42 phylu Note Edited: 35535
2016-02-22 15:23 LouisGac Note Added: 35537
2016-03-03 13:17 LouisGac Priority high => normal
2016-03-03 15:37 tpartner Note Added: 35887
2016-03-03 15:39 LouisGac Note Added: 35889
2016-03-03 15:50 tpartner Note Added: 35893
2016-03-03 16:29 LouisGac Note Added: 35898
2016-03-03 16:31 LouisGac Note Edited: 35898
2016-03-03 17:37 tpartner Note Added: 35908
2016-03-03 19:09 LouisGac Priority normal => low
2016-03-07 15:53 LouisGac Status feedback => resolved
2016-03-07 15:53 LouisGac Resolution reopened => fixed
2016-03-07 17:14 phylu Note Added: 36094
2016-03-07 17:14 phylu Status resolved => feedback
2016-03-07 17:14 phylu Resolution fixed => reopened
2016-03-07 17:35 LouisGac Note Added: 36097
2016-03-07 18:35 phylu Note Added: 36100
2016-03-07 18:35 phylu Status feedback => assigned
2016-04-22 17:27 LouisGac Status assigned => resolved
2016-04-22 17:27 LouisGac Resolution reopened => fixed
2016-04-25 13:54 c_schmitz Note Added: 37777
2016-04-25 13:54 c_schmitz Status resolved => closed
2021-08-03 03:15 guest Bug heat 8 => 12