Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • amir00251 Friend
    #189929

    Hello,

    I want to change the keyboard shortcut for Social dropdown. At the moment if you press S it opens up. I want to change this to N.
    I found the below code in
    templates/ja_smashboard/tpls/blocks/header.php

    but if I change the “S” to “N”, it does not do the trick. Could someone please help on this modification.

    <?php if($this->countModules(‘followus’)) : ?>
    <li class=”dropdown parent nav-connect” data-altkey=”S”>
    <a tabindex=”-1″ href=”” data-toggle=”dropdown” class=”dropdown-toggle”>
    <i class=”icon-location-arrow”></i><?php echo JText::_(‘TPL_FOLLOWUS’) ?>
    </a>
    <div class=”nav-child dropdown-menu followus”>
    <div class=”dropdown-menu-inner”>
    <jdoc:include type=”modules” name=”<?php $this->_p(‘followus’) ?>” style=”T3Xhtml” />
    </div>
    </div>
    </li>

    many thanks,

    Ninja Lead Moderator
    #503093

    Yes, after you change from header.php file you need to change in JS file

    Open templates/ja_smashboard/js/script.js file

    Find

    .filter('[data-altkey="S"]').addClass('open')

    and change it to

    .filter('[data-altkey="N"]').addClass('open')

    Let me know if it helps

    amir00251 Friend
    #503187

    Sorry It did not help and did not have any effect.

    Ninja Lead Moderator
    #503285

    <em>@amir00251 386138 wrote:</em><blockquote>Sorry It did not help and did not have any effect.</blockquote>

    You can try to do this way again

    + Download and extract my attachment file

    + Copy it into templates/ja_smashboard/js/script.js file

    Let me know it helps


    1. script.zip
    amir00251 Friend
    #503299

    Hello Ninja Lead,

    Yes this solved the problem, could you please clarify what you did, because I need to put this in the log for future template updates.

    The file is too large to compare line by line.

    Thank you very much.

    amir00251 Friend
    #503331

    Ok, here is the change

    Line 97

    S: 83, /* S: Share / Social */ changed to N: 78, /* N: Share / Social */

    Line 1528

    if(keyCode == keys.F || keyCode == keys.S || keyCode == keys.U){ changed to

    if(keyCode == keys.F || keyCode == keys.N || keyCode == keys.U){

    Line 1601
    else if(keyCode == keys.S){ changed to else if(keyCode == keys.N){

    Line 1606
    .filter(”).addClass(‘open’) changed to .filter(”).addClass(‘open’)

    Thank you again, quite a few replacements

    s4reea Friend
    #504436

    Hello,
    I have a question:
    I have RTL website, the Left/Right button script didn’t convert to RTL also so i had to change it like this:

    //slide item
    if(!navfocus && iscroll && (keyCode == keys.LEFT || keyCode == keys.RIGHT)){
    if(!kbhid){

    kbhid = setTimeout(function(){
    kbhid = 0;
    }, kbhdelay);

    keyCode == keys.LEFT ? iscroll.next() : iscroll.prev();
    }

    return false;
    }

    Instead of

    keyCode == keys.LEFT ? iscroll.prev() : iscroll.next();

    And it works now…
    I wanted to make sure i didn’t do anything wrong 🙂
    Thanks !

    Ninja Lead Moderator
    #504496

    @s4reea: This is code as you mentioned does not effect RTL or LTR on your site
    @amir00251: Correct, that is what I changed on script.js file

    timeoutcorner Friend
    #568590

    Hello,

    Is there away to turn off the data-altkey?

    timeoutcorner Friend
    #733684

    Hello,

    Is there away to turn off the data-altkey?

    Ninja Lead Moderator
    #568643

    <em>@timeoutcorner 470726 wrote:</em><blockquote>Hello,

    Is there away to turn off the data-altkey?</blockquote>

    In this case, you have to do this

    Open templates/ja_smashboard/js/script.js file

    find and remove


    keys: {
    DOWN: 40,
    ENTER: 13,
    ESCAPE: 27,
    HOME: 36,
    LEFT: 37,
    PAGE_DOWN: 34,
    PAGE_UP: 33,
    RIGHT: 39,
    SPACE: 32,
    TAB: 9,
    UP: 38,

    F: 70, /* F: Search / Find */
    I: 73, /* I: Info (left column) */
    S: 83, /* S: Share / Social */
    U: 85, /* U: User login */
    Z: 90 /* Z: Zoom (fullscreen in signle content page)*/
    }

    to


    keys: {

    }

    Ninja Lead Moderator
    #733737

    <em>@timeoutcorner 470726 wrote:</em><blockquote>Hello,

    Is there away to turn off the data-altkey?</blockquote>

    In this case, you have to do this

    Open templates/ja_smashboard/js/script.js file

    find and remove


    keys: {
    DOWN: 40,
    ENTER: 13,
    ESCAPE: 27,
    HOME: 36,
    LEFT: 37,
    PAGE_DOWN: 34,
    PAGE_UP: 33,
    RIGHT: 39,
    SPACE: 32,
    TAB: 9,
    UP: 38,

    F: 70, /* F: Search / Find */
    I: 73, /* I: Info (left column) */
    S: 83, /* S: Share / Social */
    U: 85, /* U: User login */
    Z: 90 /* Z: Zoom (fullscreen in signle content page)*/
    }

    to


    keys: {

    }

    timeoutcorner Friend
    #568731

    Edited the lines as mentioned but it still seems as if the altkeys still work.

    Ninja Lead Moderator
    #568764

    <em>@timeoutcorner 470903 wrote:</em><blockquote>Edited the lines as mentioned but it still seems as if the altkeys still work.</blockquote>

    You can pm me URL of your site, admin access and FTP account. I will help you out.

    Ninja Lead Moderator
    #733857

    <em>@timeoutcorner 470903 wrote:</em><blockquote>Edited the lines as mentioned but it still seems as if the altkeys still work.</blockquote>

    You can pm me URL of your site, admin access and FTP account. I will help you out.

Viewing 15 posts - 1 through 15 (of 22 total)

This topic contains 22 replies, has 4 voices, and was last updated by  Ninja Lead 9 years, 6 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum