Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Pro

 AfterLogic Forum : AfterLogic WebMail Pro
Subject Topic: how to add JS link to the menu ? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
ghadah
Newbie
Newbie
Avatar

Joined: 03 April 2012
Location: Saudi Arabia
Online Status: Offline
Posts: 3
Posted: 03 April 2012 at 4:31am | IP Logged Quote ghadah

HI

how to add JS link to the menu ?
for example if i need to move the   (Manage Folders) link besides the calendar link.



Back to Top View ghadah's Profile Search for other posts by ghadah
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6089
Posted: 04 April 2012 at 12:47am | IP Logged Quote Igor

Adding the links to top menu of WebMail Pro is described here. Using "javascript:your_js_code" notation, you can add JavaScript link there as well. For instance, if you need a "Manage Folders" link, you should take the code from js/mail/folders-pane.js file, lines 216-223:

Code:
   SetHistoryHandler(
    {
     ScreenId: SCREEN_USER_SETTINGS,
     iEntity: PART_MANAGE_FOLDERS,
     iEditableAcctId: WebMail.Accounts.currId,
     bNewMode: false
    }
   );


and supply it in js/common/defines.js file:

Code:
var CustomTopLinks = [
{ Name: 'Manage Folders', Link: 'javascript:SetHistoryHandler({ScreenId: SCREEN_USER_SETTINGS,iEntity: PART_MANAGE_FOLDERS,iEditableAcctId: WebMail.Accounts.currId,bNewMode: false});' }
];


One more thing: links added this way have target="_blank" attribute which makes them open in new tab/window. With JavaScript links, however, this won't work, so you'll need to edit js/mail/webmail.js file (line ~1878):

Code:
a = CreateChild(div, 'a', [['href', topLink.Link], ['target', '_blank']]);


so that it looks like:

Code:
a = CreateChild(div, 'a', [['href', topLink.Link]]);


--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
ghadah
Newbie
Newbie
Avatar

Joined: 03 April 2012
Location: Saudi Arabia
Online Status: Offline
Posts: 3
Posted: 04 April 2012 at 3:19am | IP Logged Quote ghadah

Hi Igor,

Thanks for your help Your Great :)

I found code in the file js/common/webmail.js

Back to Top View ghadah's Profile Search for other posts by ghadah
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide