- Posts: 5
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
survey permission
- limevives
- Topic Author
- Offline
- New Member
Less
More
7 months 30 minutes ago #250731
by limevives
survey permission was created by limevives
Please Log in to join the conversation.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
6 months 4 weeks ago #250752
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic survey permission
Create a custom admin theme and add a custom.js file to that theme -
manual.limesurvey.org/Custom_Admin_Theme...eating_a_new_theme_3
Place this in that custom.js file:
Place this in that custom.js file:
Code:
function sortSelect(thisSelect, firstOptSticky) { var selectOptions = $('option', thisSelect); if(firstOptSticky) { selectOptions = $('option:not(:first)', thisSelect); } selectOptions.detach().sort(function(a, b) { var at = $(a).text(); var bt = $(b).text(); return (at > bt) ? 1 : ((at < bt) ? -1 : 0); }); selectOptions.appendTo(thisSelect); } $(document).on('ready pjax:scriptcomplete',function(){ if($('#uidselect').length > 0) { sortSelect($('#uidselect'), true); } });
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Please Log in to join the conversation.
- limevives
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
6 months 3 weeks ago #250860
by limevives
Replied by limevives on topic survey permission
Dear,
Thank you very very much! It works!!
If I want to sort by 'full name' what I need to change?
Best regards
Rustam
Thank you very very much! It works!!
If I want to sort by 'full name' what I need to change?
Best regards
Rustam
Please Log in to join the conversation.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
6 months 3 weeks ago #250862
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic survey permission
Without hacking the core code, you can only sort by the values provided by LimeSurvey in the list.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Please Log in to join the conversation.
- limevives
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
6 months 3 weeks ago #250863
by limevives
Replied by limevives on topic survey permission
I mean what I have to write instead #uidselect to sort by 'full name'?
Please Log in to join the conversation.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
6 months 3 weeks ago #250864
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic survey permission
#uidselect is a selector for that dropdown. There is no dropdown containing only full names.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Please Log in to join the conversation.
- limevives
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
6 months 3 weeks ago #250865
by limevives
Replied by limevives on topic survey permission
ok, thanks
Please Log in to join the conversation.