Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Bold current question or add a check mark when answered

Bold current question or add a check mark when answered 2 years 9 months ago #105829

  • katgatita
  • katgatita's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 10
  • Karma: 0
Hello Tony,

It's Kat again (I'm unable to access my old account). Is there a way to also make the "ranking" type questions change colors when any item is moved? I've tried to figure it out but to no avail. Thank you so much!

Kat
The administrator has disabled public write access.

Bold current question or add a check mark when answered 2 years 9 months ago #105832

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6574
  • Thank you received: 1477
  • Karma: 579
Hi Kat,

Add something like this to the end of templates.css.

.dragDropTable ul.dragDropChoiceList li.ui-sortable-helper, 
.dragDropTable ol.dragDropRankList li.ui-sortable-helper {
	background: pink;
	font-weight: bold;
	color: #CC0000;
}

.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.
The following user(s) said Thank You: katgatita

Bold current question or add a check mark when answered 2 years 9 months ago #105836

  • katgatita
  • katgatita's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 10
  • Karma: 0
Thank you for your prompt response Tony! I added the text as recommend but I may be missing something because it didn't work.

Here is a sample survey:
limesurvey.Partners.org/limesurvey/index.php/864121/lang-en

Thank you!

Kat
The administrator has disabled public write access.

Bold current question or add a check mark when answered 2 years 9 months ago #105839

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6574
  • Thank you received: 1477
  • Karma: 579
Please clear your cache and refresh.

Here is what I see when dragging:

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.
The following user(s) said Thank You: katgatita

Bold current question or add a check mark when answered 2 years 9 months ago #105874

  • katgatita
  • katgatita's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 10
  • Karma: 0
Hi Tony,

Thank you again for your response! I see that it does that in Internet explorer but not in Chrome (although that's not the real issue). What I'm really trying to do is to get the ranking questions to change color when answered, please see my example of the other question types here:

limesurvey.Partners.org/limesurvey/index.php/864121/lang-en

Thank you so much!

Kat
The administrator has disabled public write access.

Bold current question or add a check mark when answered 2 years 9 months ago #105875

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6574
  • Thank you received: 1477
  • Karma: 579
Oh, I get it now.

Can you attach that sample survey and template?


.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.
The following user(s) said Thank You: katgatita

Bold current question or add a check mark when answered 2 years 9 months ago #105883

  • katgatita
  • katgatita's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 10
  • Karma: 0
Hi Tony,

Please see attached. Thank you!

Kat
Attachments:
The administrator has disabled public write access.

Bold current question or add a check mark when answered 2 years 9 months ago #105886

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6574
  • Thank you received: 1477
  • Karma: 579
And you template please? You can export it from the template manager.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.

Bold current question or add a check mark when answered 2 years 9 months ago #105889

  • katgatita
  • katgatita's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 10
  • Karma: 0
Hi Tony,

Should I do the Template.js or template-rtl.css? Thank you!

Kat
The administrator has disabled public write access.

Bold current question or add a check mark when answered 2 years 9 months ago #105890

  • katgatita
  • katgatita's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 10
  • Karma: 0
Hi Tony,

I'm attaching both below. Thank you!

Kat :)
The administrator has disabled public write access.

Bold current question or add a check mark when answered 2 years 9 months ago #105892

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6574
  • Thank you received: 1477
  • Karma: 579
Export the complete template and attache the zip file.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 2 years 9 months ago by tpartner.
The administrator has disabled public write access.
The following user(s) said Thank You: katgatita

Bold current question or add a check mark when answered 2 years 9 months ago #105894

  • katgatita
  • katgatita's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 10
  • Karma: 0
Hi Tony,

Please see attached. Thank you!

Kat
Attachments:
The administrator has disabled public write access.

Bold current question or add a check mark when answered 2 years 9 months ago #105895

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6574
  • Thank you received: 1477
  • Karma: 579
Add this to the end of template.js:

	$(document).ready(function() { 
 
		$('.ranking.dragDropRanking .ui-sortable').sortable('option', 'stop', function(event, ui) {
			var qID = $(this).closest('.ranking.dragDropRanking').attr('id').split('question')[1];
			$('#sortable-choice-'+qID+'').sortable('refresh');
			$('#sortable-rank-'+qID+'').sortable('refresh');
			updateDragDropRank(qID);
			if($('#sortable-rank-'+qID+' li.choice').length > 0) {
				markAnswered($('#question'+qID));
			}
			else {
				markUnanswered($('#question'+qID));
			}
		});
	});

Here is your template back with that change incorporated and renamed to "PREP_Bold_2.0_TP":

File Attachment:

File Name: PREP_Bold_2.0_TP.zip
File Size:118 KB
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.
The following user(s) said Thank You: katgatita

Bold current question or add a check mark when answered 2 years 9 months ago #105897

  • katgatita
  • katgatita's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 10
  • Karma: 0
Hi Tony!

It is perfect! Thank you so much for your help! You rock!

Kat :laugh:
The administrator has disabled public write access.
Time to create page: 0.309 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form