Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Customize help menu items

  • dtosun
  • dtosun's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 months 1 week ago #250508 by dtosun
Customize help menu items was created by dtosun
Please help us help you and fill where relevant:
Your LimeSurvey version: 6.2.7
Own server or LimeSurvey hosting: My own Server
Survey theme/template: Admin
==================
Hello,

I need to change Help menu items. I have script to do it but after upgrade, it doesn't work. How to do it again with new version?
\upload\admintheme\TS\scripts\custom.js

$(document).on('ready pjax:scriptcomplete',function(){
 
    // Remove the core links
    $('#help-dropdown li').remove();
 
    // Insert some new links
    $('#help-dropdown').append('<li>\
            <a href=" manual.limesurvey.org/LimeSurvey_Manual " target="_blank">\
                LimeSurvey Yardım\
                <i class="fa fa-external-link  pull-right"></i>\
            </a>\
        </li>\
        ');
 
});

Please Log in to join the conversation.

  • dtosun
  • dtosun's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 months 1 week ago #250544 by dtosun
Replied by dtosun on topic Customize help menu items
Any idea?

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 months 1 week ago - 7 months 1 week ago #250548 by tpartner
Replied by tpartner on topic Customize help menu items
If you look at the source of the page, you will see that that element no longer has an id attribute.

Try changing "#help-dropdown" to ".dropdown-menu[aria-labelledby="helpDropdown"]".

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 7 months 1 week ago by tpartner.

Please Log in to join the conversation.

  • dtosun
  • dtosun's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 months 1 week ago #250553 by dtosun
Replied by dtosun on topic Customize help menu items

If you look at the source of the page, you will see that that element no longer has an id attribute.

Try changing "#help-dropdown" to ".dropdown-menu[aria-labelledby="helpDropdown"]".
 
Hello,

Thank you for response.
I tried with like this and clear assets cache, nothing was changed. 
\limesurvey\upload\admintheme\TS\scripts\custom.js
Code:
$(document).on('ready pjax:scriptcomplete',function(){
 
    // Remove the core links
    $('.dropdown-menu[aria-labelledby="helpDropdown"]').remove();
 
    // Insert some new links
    $('.dropdown-menu[aria-labelledby="helpDropdown"]').append('<li>\
            <a href="https://manual.limesurvey.org/LimeSurvey_Manual" target="_blank">\
                LimeSurvey Yardım\
                <i class="fa fa-external-link  pull-right"></i>\
            </a>\
        </li>\
        ');
 
});

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 months 1 week ago #250556 by Joffm
Replied by Joffm on topic Customize help menu items
And you still can do this
[url] forums.limesurvey.org/index.php/forum/de...ink-help-menu#233090 [/url]

See
 
Code:
    <ul class="dropdown-menu larger-dropdown" aria-labelledby="helpDropdown">
        <?php $this->renderPartial( "/admin/super/_tutorial_menu", []); ?>
        <li class="dropdown-divider"></li>
        <li>
            <a href="http://manual.limesurvey.org/" target="_blank" class="dropdown-item">
                <i class="ri-question-fill"></i>
<!--
                <?php eT('LimeSurvey Manual');?>
-->
                LimeSurvey Yardım
                <i class=" ri-external-link-fill  float-end"></i>
            </a>
        </li>
        <li>
            <a href="https://forums.limesurvey.org" target="_blank" class="dropdown-item">
                <span class="fa-stack halfed">
                    <span class="ri-chat-3-fill fa-stack-1x" ></span>
                    <span class="ri-group-fill fa-inverse fa-stack-1x halfed" ></span>
                </span>
                <?php eT('LimeSurvey Forums');?>
                <i class=" ri-external-link-fill  float-end"></i>
            </a>
        </li>

Furthermore you see here how to address it, if you want to use havascript.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • dtosun
  • dtosun's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 months 6 days ago #250562 by dtosun
Replied by dtosun on topic Customize help menu items

And you still can do this
[url] forums.limesurvey.org/index.php/forum/de...ink-help-menu#233090 [/url]

See
 

Code:
    <ul class="dropdown-menu larger-dropdown" aria-labelledby="helpDropdown">
        <?php $this->renderPartial( "/admin/super/_tutorial_menu", ); ?>
        <li class="dropdown-divider"></li>
        <li>
            <a href="http://manual.limesurvey.org/" target="_blank" class="dropdown-item">
                <i class="ri-question-fill"></i>
<!--
                <?php eT('LimeSurvey Manual');?>
-->
                LimeSurvey Yardım
                <i class=" ri-external-link-fill  float-end"></i>
            </a>
        </li>
        <li>
            <a href="https://forums.limesurvey.org" target="_blank" class="dropdown-item">
                <span class="fa-stack halfed">
                    <span class="ri-chat-3-fill fa-stack-1x" ></span>
                    <span class="ri-group-fill fa-inverse fa-stack-1x halfed" ></span>
                </span>
                <?php eT('LimeSurvey Forums');?>
                <i class=" ri-external-link-fill  float-end"></i>
            </a>
        </li>


Furthermore you see here how to address it, if you want to use havascript.

Joffm
But everything will be overwritten by an update :(

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 months 5 days ago - 7 months 5 days ago #250591 by tpartner
Replied by tpartner on topic Customize help menu items
This works when placed in a custom.js file in a version 6.x custom admin theme:

Code:
$(document).on('ready pjax:scriptcomplete',function(){
 
  // Remove the core links
  $('.dropdown-menu[aria-labelledby="helpDropdown"] li').remove();
 
  // Insert some new links
  $('.dropdown-menu[aria-labelledby="helpDropdown"]').append('<li>\
            <a href="http://google.com/" target="_blank" class="dropdown-item">\
                My link text\
                <i class=" ri-external-link-fill  float-end"></i>\
            </a>\
        </li>');
 
});

 

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 7 months 5 days ago by tpartner.
The following user(s) said Thank You: dtosun

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose