-
AuthorPosts
-
amir00251 Friend
amir00251
- Join date:
- January 2011
- Posts:
- 113
- Downloads:
- 38
- Uploads:
- 13
- Thanks:
- 13
- Thanked:
- 11 times in 1 posts
August 21, 2013 at 8:39 pm #189929Hello,
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.phpbut 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 ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
August 22, 2013 at 4:29 am #503093Yes, 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 Friendamir00251
- Join date:
- January 2011
- Posts:
- 113
- Downloads:
- 38
- Uploads:
- 13
- Thanks:
- 13
- Thanked:
- 11 times in 1 posts
August 22, 2013 at 9:06 pm #503187Sorry It did not help and did not have any effect.
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
August 23, 2013 at 12:17 pm #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 user says Thank You to Ninja Lead for this useful post
amir00251 Friendamir00251
- Join date:
- January 2011
- Posts:
- 113
- Downloads:
- 38
- Uploads:
- 13
- Thanks:
- 13
- Thanked:
- 11 times in 1 posts
August 23, 2013 at 2:54 pm #503299Hello 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 Friendamir00251
- Join date:
- January 2011
- Posts:
- 113
- Downloads:
- 38
- Uploads:
- 13
- Thanks:
- 13
- Thanked:
- 11 times in 1 posts
August 24, 2013 at 1:46 am #503331Ok, 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
1 user says Thank You to amir00251 for this useful post
s4reea Friends4reea
- Join date:
- August 2013
- Posts:
- 42
- Downloads:
- 0
- Uploads:
- 6
- Thanks:
- 26
- Thanked:
- 2 times in 1 posts
September 3, 2013 at 5:50 pm #504436Hello,
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 ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
September 4, 2013 at 7:43 am #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 filetimeoutcorner Friendtimeoutcorner
- Join date:
- April 2014
- Posts:
- 93
- Downloads:
- 12
- Uploads:
- 26
- Thanks:
- 26
- Thanked:
- 1 times in 1 posts
April 28, 2015 at 12:16 am #568590Hello,
Is there away to turn off the data-altkey?
timeoutcorner Friendtimeoutcorner
- Join date:
- April 2014
- Posts:
- 93
- Downloads:
- 12
- Uploads:
- 26
- Thanks:
- 26
- Thanked:
- 1 times in 1 posts
April 28, 2015 at 12:16 am #733684Hello,
Is there away to turn off the data-altkey?
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
April 28, 2015 at 9:32 am #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: {}
1 user says Thank You to Ninja Lead for this useful post
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
April 28, 2015 at 9:32 am #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: {}
1 user says Thank You to Ninja Lead for this useful post
timeoutcorner Friendtimeoutcorner
- Join date:
- April 2014
- Posts:
- 93
- Downloads:
- 12
- Uploads:
- 26
- Thanks:
- 26
- Thanked:
- 1 times in 1 posts
April 28, 2015 at 8:20 pm #568731Edited the lines as mentioned but it still seems as if the altkeys still work.
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
April 29, 2015 at 5:05 am #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 ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
April 29, 2015 at 5:05 am #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.
-
AuthorPosts
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