Author |
|
baskarp Newbie

Joined: 21 September 2007
Online Status: Offline Posts: 12
|
Posted: 26 September 2007 at 10:46am | IP Logged
|
|
|
I am trying to customise the WebMail. I need to have seperate change password tab to change the password in settings.
I was sucessfull in removing the properties for the default mail account.
Can you tell me how the new tab to be added
|
Back to Top |
|
|
Andrew AfterLogic Support

Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 27 September 2007 at 5:19am | IP Logged
|
|
|
1. Add the following code into _defines.js:
Code:
var PART_OTHER_SETTINGS = 6; |
|
|
right below the:
Code:
var PART_CONTACTS_SETTINGS = 5; |
|
|
2. File screen.user-settings.js. Declare the tab header and it's contents.
Add:
Code:
this._otherSettingsDiv = null; |
|
|
below the (line 54):
Code:
this._commonSettingsDiv = null; |
|
|
and the contents:
Code:
this._otherSettingsObj = null; |
|
|
3. Build the tab header in Build method. Below the line 562:
Code:
this._contactsSettingsDiv = div; |
|
|
Add the following code:
Code:
div = CreateChild(td, 'div');
nobr = CreateChild(div, 'nobr');
img = CreateChildWithAttrs(nobr, 'img', [['src', 'skins/' + this._skinName + '/settings/menu_contacts.gif']]);
a = CreateChildWithAttrs(nobr, 'a', [['href', '#']]);
a.onclick = function () {
SetHistoryHandler(
{
ScreenId: SCREEN_USER_SETTINGS,
SelectIdAcct: obj._idAcct,
Entity: PART_OTHER_SETTINGS,
NewMode: false
}
);
return false;
}
a.innerHTML = Lang.Other;
WebMail.LangChanger.Register('innerHTML', a, 'Other', '');
this._otherSettingsDiv = div; |
|
|
4. At the end of Build method (line 605):
Code:
this._contactsSettingsObj.Build(td); |
|
|
add the contents:
Code:
this._otherSettingsObj = CreateChild(td, 'div');
this._otherSettingsObj.className = 'wm_hide';
this._otherSettingsObj.innerHTML = 'ADD THE HTML CODE YOU NEED'; |
|
|
5. Create the method which displays your settings (between any of methods of the class, for instance, line 319):
Code:
ShowOtherSettings: function ()
{
this._commonSettingsDiv.className = '';
if (this._allowChangeSettings) {
this._accountsSettingsDiv.className = '';
} else {
this._accountsSettingsDiv.className = 'wm_hide';
}
this._contactsSettingsDiv.className = '';
this._otherSettingsDiv.className = 'wm_selected_settings_item';
this._settingsSwitcher.className = 'wm_hide';
this._addAccountTbl.className = 'wm_hide';
this._accountsListObj.Hide();
this._currPart.Hide();
this._otherSettingsObj.className = '';
}, |
|
|
6. Display your settings. Add the following code at the first line of RestoreFromHistory method (line 436):
Code:
this._otherSettingsObj.className = 'wm_hide'; |
|
|
Add the following section into the switch operator (line 463):
Code:
case PART_OTHER_SETTINGS:
this.ShowOtherSettings();
break; |
|
|
Best regards,
Andrew
|
Back to Top |
|
|
mok mok Newbie

Joined: 25 June 2011 Location: Tunisia
Online Status: Offline Posts: 3
|
Posted: 25 June 2011 at 5:03am | IP Logged
|
|
|
Hello,
How to do the same thing in webmailpro 6.2 (PHP)
Thanks
|
Back to Top |
|
|
Igor AfterLogic Support

Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6124
|
Posted: 26 June 2011 at 11:45pm | IP Logged
|
|
|
That's an interesting question, I guess we should add guidelines on this in WebMail Pro knowledge base, and we're going to do that in the nearest future.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|