Skip to content
Browse files

Fixed IE9 compatibility problem with Scripting.Dictionary (thanks to …

…Hironobu Koura!)
  • Loading branch information...
1 parent 1350297 commit 0084278b0e9432848b4a4b823657caa018ef5940 @cbas cbas committed Feb 27, 2011
Showing with 454 additions and 454 deletions.
  1. +16 −16 Client/src/main/ChatSession.js
  2. +30 −30 Client/src/main/ClientBrowse.js
  3. +27 −27 Client/src/main/ClientPlugin.js
  4. +140 −140 Client/src/main/ClientRoster.js
  5. +12 −12 Client/src/main/ClientRosterSearch.js
  6. +1 −1 Client/src/main/CommandLine.js
  7. +10 −10 Client/src/main/ConferenceSession.js
  8. +27 −27 Client/src/main/ContainerCode.js
  9. +8 −8 Client/src/main/Emoticon.js
  10. +1 −1 Client/src/main/Headline.js
  11. +5 −5 Client/src/main/LoadProfile.js
  12. +11 −11 Client/src/main/MenuBar.js
  13. +28 −28 Client/src/main/OnLogin.js
  14. +1 −1 Client/src/main/Reconnect.js
  15. +2 −2 Client/src/main/SaveCommonProfile.js
  16. +2 −2 Client/src/main/SettingsSave.js
  17. +2 −2 Client/src/main/Tray.js
  18. +11 −11 Client/src/main/XHTML-IM.js
  19. +1 −1 Client/src/main/XMPPOnConnected.js
  20. +3 −3 Client/src/main/XMPPOnDisconnected.js
  21. +8 −8 Client/src/main/XMPPOnDocumentStart.js
  22. +4 −4 Client/src/main/XMPPOnIQ.js
  23. +15 −15 Client/src/main/XMPPOnMessage.js
  24. +9 −9 Client/src/main/XMPPOnPresence.js
  25. +8 −8 Client/src/main/XMPPOnStream.js
  26. +3 −3 Client/src/main/dial_block.js
  27. +2 −2 Client/src/main/dial_chat.js
  28. +4 −4 Client/src/main/dial_conference.js
  29. +2 −2 Client/src/main/dial_contacts_export.js
  30. +7 −7 Client/src/main/dial_contacts_import.js
  31. +1 −1 Client/src/main/dial_file.js
  32. +2 −2 Client/src/main/dial_font.js
  33. +1 −1 Client/src/main/dial_history.js
  34. +1 −1 Client/src/main/dial_login.js
  35. +2 −2 Client/src/main/dial_mode.js
  36. +1 −1 Client/src/main/dial_service_register.js
  37. +3 −3 Client/src/main/dial_userinfo.js
  38. +1 −1 Client/src/main/dial_vcard_edit.js
  39. +1 −1 Client/src/main/dial_webbrowser.js
  40. +1 −1 Client/src/main/file2hash.js
  41. +1 −1 Client/src/main/hash2file.js
  42. +2 −2 Client/src/main/history_add.js
  43. +6 −6 Client/src/main/init.js
  44. +1 −1 Client/src/main/login.js
  45. +1 −1 Client/src/main/mode_new.js
  46. +19 −19 Client/src/main/mousemenu.js
  47. +1 −1 Client/src/main/outnit.js
  48. +5 −5 Client/src/main/vcard.js
  49. +2 −2 Client/src/plugin_list.html
  50. +2 −2 Client/src/transport_list.html
View
32 Client/src/main/ChatSession.js
@@ -46,14 +46,14 @@ function ChatSessionPool ()
/* Parse the event right now
*/
if ( this.Trackers.Exists( ShortAddress ) )
- this.Trackers( ShortAddress ).DispatchEvent( Event );
+ this.Trackers.Item( ShortAddress ).DispatchEvent( Event );
/* Queue the event
*/
else if ( Event.Type == 'message' && Event.Payload.Body.length )
{
if ( this.Events.Exists( ShortAddress ) )
- this.Events( ShortAddress ).push( Event );
+ this.Events.Item( ShortAddress ).push( Event );
else
this.Events.Add( ShortAddress, new Array( Event ) );
@@ -63,8 +63,8 @@ function ChatSessionPool ()
/* Play a sound notification for the incoming message.
*/
- if ( external.globals( 'cfg' )( 'soundmessage' ).toString() == 'true' )
- sound_play( external.globals( 'cfg' )( 'soundmessagefile' ), false );
+ if ( external.globals( 'cfg' ).Item( 'soundmessage' ).toString() == 'true' )
+ sound_play( external.globals( 'cfg' ).Item( 'soundmessagefile' ), false );
}
}
@@ -74,16 +74,16 @@ function ChatSessionPool ()
/* Replay last messages
*/
- if ( external.globals( 'cfg' )( 'history_store' ).toString() == 'true' )
+ if ( external.globals( 'cfg' ).Item( 'history_store' ).toString() == 'true' )
{
var Buffer = new Array();
var Filename = ( new MD5() ).digest( ShortAddress );
var Limit = 10;
var Messages = new Array();
- var Path = external.globals( 'usersdir' ) + 'Profiles\\' + external.globals( 'cfg' )( 'username' ) + '@' + external.globals( 'cfg' )( 'server' ) + '\\';
+ var Path = external.globals( 'usersdir' ) + 'Profiles\\' + external.globals( 'cfg' ).Item( 'username' ) + '@' + external.globals( 'cfg' ).Item( 'server' ) + '\\';
if ( this.Events.Exists( ShortAddress ) )
- Limit += this.Events( ShortAddress ).length;
+ Limit += this.Events.Item( ShortAddress ).length;
/* Load last messages from cache
*/
@@ -143,7 +143,7 @@ function ChatSessionPool ()
/* Do not show queued messages in the history
*/
if ( this.Events.Exists( ShortAddress ) )
- Limit = Buffer.length - this.Events( ShortAddress ).length;
+ Limit = Buffer.length - this.Events.Item( ShortAddress ).length;
while ( Buffer.length > Limit )
Buffer.pop();
@@ -163,7 +163,7 @@ function ChatSessionPool ()
Message.Time = new Date( Buffer[i].substr( 0, 4 ), Buffer[i].substr( 4, 2 ) - 1, Buffer[i].substr( 6, 2 ), Buffer[i].substr( 9, 2 ), Buffer[i].substr( 12, 2 ), Buffer[i].substr( 15, 2 ) );
if ( Buffer[i].substr( 18, 3 ) == 'out' )
{
- Message.From = external.globals( 'cfg' )( 'username' ) + '@' + external.globals( 'cfg' )( 'server' );
+ Message.From = external.globals( 'cfg' ).Item( 'username' ) + '@' + external.globals( 'cfg' ).Item( 'server' );
Message.Body = unescape( Buffer[i].substr( 22 ) );
}
else
@@ -196,18 +196,18 @@ function ChatSessionPool ()
{
/* Temporarily disable sound notification
*/
- var PlaySounds = external.globals( 'cfg' )( 'soundmessage' );
- external.globals( 'cfg' )( 'soundmessage' ) = false;
+ var PlaySounds = external.globals( 'cfg' ).Item( 'soundmessage' );
+ external.globals( 'cfg' ).Item( 'soundmessage' ) = false;
/* Dispatch the messages
*/
- for ( var i = 0; i < this.Events( ShortAddress ).length; ++i )
- Tracker.DispatchEvent( this.Events( ShortAddress )[i] );
+ for ( var i = 0; i < this.Events.Item( ShortAddress ).length; ++i )
+ Tracker.DispatchEvent( this.Events.Item( ShortAddress )[i] );
this.Events.Remove( ShortAddress );
/* Reset the sound notification
*/
- external.globals( 'cfg' )( 'soundmessage' ) = PlaySounds;
+ external.globals( 'cfg' ).Item( 'soundmessage' ) = PlaySounds;
}
/* Remove the tracker address from the undo-close tab list
@@ -223,7 +223,7 @@ function ChatSessionPool ()
function GetTracker ( Address )
{
var ShortAddress = Address.ShortAddress();
- return this.Trackers.Exists( ShortAddress ) ? this.Trackers( ShortAddress ) : null;
+ return this.Trackers.Exists( ShortAddress ) ? this.Trackers.Item( ShortAddress ) : null;
}
function DeleteTracker ( Tracker )
@@ -262,7 +262,7 @@ function ChatSessionPool ()
setIcon( external.globals( 'cwd' ) + '..\\images\\chat-container\\bubble.ico' );
MinWidth = 180;
MinHeight = 210;
- setAOT( external.globals( 'cfg' )( 'aotchat' ).toString() == 'true' );
+ setAOT( external.globals( 'cfg' ).Item( 'aotchat' ).toString() == 'true' );
}
}
}
View
60 Client/src/main/ClientBrowse.js
@@ -31,7 +31,7 @@ function ClientBrowseServer ()
for ( var i = 0; i < Identities.length; ++i )
{
if ( Identities.item(i).getAttribute( 'name' ) )
- this.Services( jid ).Name = Identities.item(i).getAttribute( 'name' );
+ this.Services.Item( jid ).Name = Identities.item(i).getAttribute( 'name' );
var IDCategory = Identities.item(i).getAttribute( 'category' );
var IDType = Identities.item(i).getAttribute( 'type' );
@@ -40,32 +40,32 @@ function ClientBrowseServer ()
{
switch ( IDType )
{
- case 'aim': this.Services( jid ).Options |= 0x0001 | 0x0008; break;
- case 'tlen': this.Services( jid ).Options |= 0x0001 | 0x8000; break;
- case 'x-tlen': this.Services( jid ).Options |= 0x0001 | 0x8000; break;
- case 'gadu-gadu': this.Services( jid ).Options |= 0x0001 | 0x0800; break;
- case 'icq': this.Services( jid ).Options |= 0x0001 | 0x0004; break;
- case 'msn': this.Services( jid ).Options |= 0x0001 | 0x0002; break;
- case 'sms': this.Services( jid ).Options |= 0x0001 | 0x2000; break;
- case 'smtp': this.Services( jid ).Options |= 0x0001 | 0x1008; break;
- case 'yahoo': this.Services( jid ).Options |= 0x0001 | 0x0010; break;
- default: this.Services( jid ).Options |= 0x0001;
+ case 'aim': this.Services.Item( jid ).Options |= 0x0001 | 0x0008; break;
+ case 'tlen': this.Services.Item( jid ).Options |= 0x0001 | 0x8000; break;
+ case 'x-tlen': this.Services.Item( jid ).Options |= 0x0001 | 0x8000; break;
+ case 'gadu-gadu': this.Services.Item( jid ).Options |= 0x0001 | 0x0800; break;
+ case 'icq': this.Services.Item( jid ).Options |= 0x0001 | 0x0004; break;
+ case 'msn': this.Services.Item( jid ).Options |= 0x0001 | 0x0002; break;
+ case 'sms': this.Services.Item( jid ).Options |= 0x0001 | 0x2000; break;
+ case 'smtp': this.Services.Item( jid ).Options |= 0x0001 | 0x1008; break;
+ case 'yahoo': this.Services.Item( jid ).Options |= 0x0001 | 0x0010; break;
+ default: this.Services.Item( jid ).Options |= 0x0001;
}
}
else if ( IDCategory == 'conference' )
{
- this.Services( jid ).Options |= 0x0020;
+ this.Services.Item( jid ).Options |= 0x0020;
if ( IDType == 'text' )
- this.Services( jid ).Options |= 0x0040 | 0x0080;
+ this.Services.Item( jid ).Options |= 0x0040 | 0x0080;
}
}
if ( iq.XMLDOM.selectSingleNode( '/iq/*[@xmlns="http://jabber.org/protocol/disco#info"]/feature[@var="jabber:iq:search"]' ) )
- this.Services( jid ).Options |= 0x0100;
+ this.Services.Item( jid ).Options |= 0x0100;
if ( iq.XMLDOM.selectSingleNode( '/iq/*[@xmlns="http://jabber.org/protocol/disco#info"]/feature[@var="jabber:iq:register"]' ) )
- this.Services( jid ).Options |= 0x0200;
+ this.Services.Item( jid ).Options |= 0x0200;
}
/* Parse the XML with jabber:iq:agents
@@ -82,7 +82,7 @@ function ClientBrowseServer ()
var jid = item.getAttribute( 'jid' ).toLowerCase();
if ( ! this.Services.Exists( jid ) )
this.Services.Add( jid, new ClientBrowseService( jid ) );
- with ( this.Services( jid ) )
+ with ( this.Services.Item( jid ) )
{
if ( item.selectSingleNode( 'name' ) )
Name = item.selectSingleNode( 'name' ).text;
@@ -137,7 +137,7 @@ function ClientBrowseServer ()
var jid = item.getAttribute( 'jid' ).toLowerCase();
if ( ! this.Services.Exists( jid ) )
this.Services.Add( jid, new ClientBrowseService( jid ) );
- with ( this.Services( jid ) )
+ with ( this.Services.Item( jid ) )
{
if ( item.getAttribute( 'name' ) )
Name = item.getAttribute( 'name' );
@@ -180,19 +180,19 @@ function ClientBrowseServer ()
var jid = fulljid.toLowerCase();
if ( jid.indexOf( '/' ) != -1 )
jid = jid.substr( 0, jid.indexOf( '/' ) );
- if ( this.Services.Exists( jid ) && this.Services( jid ).Options & 0x001 )
+ if ( this.Services.Exists( jid ) && this.Services.Item( jid ).Options & 0x001 )
{
var subscription = contact.getAttribute( 'subscription' );
if ( subscription == 'remove' )
{
- this.Services( jid ).TransportMode = 0;
- this.Services( jid ).TransportRosterJID = '';
+ this.Services.Item( jid ).TransportMode = 0;
+ this.Services.Item( jid ).TransportRosterJID = '';
}
else
{
- this.Services( jid ).TransportRosterJID = fulljid;
- if ( this.Services( jid ).TransportMode == 0 && ( subscription == 'from' || subscription == 'both' ) )
- this.Services( jid ).TransportMode = -1;
+ this.Services.Item( jid ).TransportRosterJID = fulljid;
+ if ( this.Services.Item( jid ).TransportMode == 0 && ( subscription == 'from' || subscription == 'both' ) )
+ this.Services.Item( jid ).TransportMode = -1;
}
if ( external.windows.Exists( 'transport_list' ) )
external.windows( 'transport_list' ).Do( 'transport_refresh', jid );
@@ -206,13 +206,13 @@ function ClientBrowseServer ()
var jid = presence.FromAddress.ShortAddress();
if ( ! this.Services.Exists( jid ) )
this.Services.Add( jid, new ClientBrowseService( jid ) );
- this.Services( jid ).Options |= 0x001;
+ this.Services.Item( jid ).Options |= 0x001;
if ( presence.Type == 'error' )
- this.Services( jid ).TransportMode = -1;
+ this.Services.Item( jid ).TransportMode = -1;
else if ( presence.Type == 'unavailable' )
- this.Services( jid ).TransportMode = 0;
+ this.Services.Item( jid ).TransportMode = 0;
else
- this.Services( jid ).TransportMode = 1;
+ this.Services.Item( jid ).TransportMode = 1;
if ( external.windows.Exists( 'transport_list' ) )
external.windows( 'transport_list' ).Do( 'transport_refresh', jid );
}
@@ -233,8 +233,8 @@ function ClientBrowseServer ()
var retval = new Array();
var jids = ( new VBArray( this.Services.Keys() ) ).toArray();
for ( var i = 0; i < jids.length; ++i )
- if ( ( this.Services( jids[i] ).Options & match ) == match )
- retval.push( this.Services( jids[i] ) );
+ if ( ( this.Services.Item( jids[i] ).Options & match ) == match )
+ retval.push( this.Services.Item( jids[i] ) );
return retval;
}
@@ -245,7 +245,7 @@ function ClientBrowseServer ()
if ( ! this.Services.Exists( jid ) )
{
this.Services.Add( jid, new ClientBrowseService( jid ) );
- this.Services( jid ).Options = options;
+ this.Services.Item( jid ).Options = options;
if ( ( options & 0x0001 ) && external.windows.Exists( 'transport_list' ) )
external.windows( 'transport_list' ).Do( 'transport_refresh', null );
}
View
54 Client/src/main/ClientPlugin.js
@@ -103,7 +103,7 @@ function ClientPluginTab ( plugin )
var names = ( new VBArray( this.PluginCore.Container.Plugins.Keys() ) ).toArray();
for ( var i = 0; i < names.length; ++i )
{
- var tab = this.PluginCore.Container.Plugins( names[i] ).ClientPluginTab;
+ var tab = this.PluginCore.Container.Plugins.Item( names[i] ).ClientPluginTab;
if ( tab && tab.IsActive )
{
tab.IsActive = false;
@@ -266,7 +266,7 @@ function ClientPluginContainer ()
else if ( file && file.text.length > 0 && file.text.length < 216 && file.text.search( /\\\/\:\*\?\"\<\>\|/ ) == -1 )
pluginevent.File = file.text;
- plugin.Events( getAttribute( 'for' ) ).push( pluginevent );
+ plugin.Events.Item( getAttribute( 'for' ) ).push( pluginevent );
}
if ( ! plugin.Events.Count )
return warn( 'Plug-in contains no events\n' + path );
@@ -288,7 +288,7 @@ function ClientPluginContainer ()
data.Value = option.selectSingleNode( 'value' ).text;
if ( option.getAttribute( 'onlineonly' ) == 'yes' )
data.OnlineOnly = true;
- plugin.Menus( menuname ).push( data );
+ plugin.Menus.Item( menuname ).push( data );
}
}
@@ -379,19 +379,19 @@ function ClientPluginContainer ()
context.Add( 'plugin', name );
this.DispatchEvent( context );
- if ( this.Plugins( name ).ClientPluginTab )
+ if ( this.Plugins.Item( name ).ClientPluginTab )
{
- if ( this.Plugins( name ).ClientPluginTab.IsActive )
- this.Plugins( '/roster' ).ClientPluginTab.Activate();
- this.Plugins( name ).ClientPluginTab.HTMLArea.removeNode( true );
- this.Plugins( name ).ClientPluginTab.HTMLButton.removeNode( true );
+ if ( this.Plugins.Item( name ).ClientPluginTab.IsActive )
+ this.Plugins.Item( '/roster' ).ClientPluginTab.Activate();
+ this.Plugins.Item( name ).ClientPluginTab.HTMLArea.removeNode( true );
+ this.Plugins.Item( name ).ClientPluginTab.HTMLButton.removeNode( true );
document.getElementById( 'tab-bar-row' ).style.display = this.HTMLTabBar.children.length > 1 ? 'block' : 'none';
}
try
{
- if ( external.Directory.Exists( this.Plugins( name ).Path ) )
- external.Directory.Delete( this.Plugins( name ).Path );
+ if ( external.Directory.Exists( this.Plugins.Item( name ).Path ) )
+ external.Directory.Delete( this.Plugins.Item( name ).Path );
if ( external.FileExists( external.globals( 'usersdir' ) + 'Plugins\\' + name ) )
external.File( external.globals( 'usersdir' ) + 'Plugins\\' + name ).Delete();
@@ -432,34 +432,34 @@ function ClientPluginContainer ()
*/
function DispatchEvent ( context )
{
- if ( ! context.Exists( 'name' ) || context( 'name' ).length == 0 )
+ if ( ! context.Exists( 'name' ) || context.Item( 'name' ).length == 0 )
return false;
var names = ( new VBArray( this.Plugins.Keys() ) ).toArray();
for ( var i = 0; i < names.length; ++i )
- if ( this.Plugins( names[i] ).Events.Exists( context( 'name' ) ) )
+ if ( this.Plugins.Item( names[i] ).Events.Exists( context.Item( 'name' ) ) )
{
- if ( context.Exists( 'plugin' ) && context( 'plugin' ) != names[i] )
+ if ( context.Exists( 'plugin' ) && context.Item( 'plugin' ) != names[i] )
continue;
- var handlers = this.Plugins( names[i] ).Events( context( 'name' ) );
+ var handlers = this.Plugins.Item( names[i] ).Events.Item( context.Item( 'name' ) );
for ( var j = 0; j < handlers.length; ++j )
{
- if ( handlers[j].XPath && ! ( context.Exists( 'xmldom' ) && context( 'xmldom' ).selectSingleNode( handlers[j].XPath ) ) )
+ if ( handlers[j].XPath && ! ( context.Exists( 'xmldom' ) && context.Item( 'xmldom' ).selectSingleNode( handlers[j].XPath ) ) )
continue;
with ( handlers[j] )
{
- if ( this.Plugins( names[i] ).Type == 'tab-iframe' )
+ if ( this.Plugins.Item( names[i] ).Type == 'tab-iframe' )
{
if ( typeof URL == 'string' )
- this.Plugins( names[i] ).ClientPluginTab.HTMLArea.src = this.ParseURL( URL );
+ this.Plugins.Item( names[i] ).ClientPluginTab.HTMLArea.src = this.ParseURL( URL );
else if ( typeof File == 'string' )
- this.Plugins( names[i] ).ClientPluginTab.HTMLArea.src = this.Plugins( names[i] ).Path + File;
+ this.Plugins.Item( names[i] ).ClientPluginTab.HTMLArea.src = this.Plugins.Item( names[i] ).Path + File;
}
if ( typeof JScript == 'function' )
{
- if ( JScript.call( this.Plugins( names[i] ), context ) )
+ if ( JScript.call( this.Plugins.Item( names[i] ), context ) )
return true;
}
}
@@ -480,15 +480,15 @@ function ClientPluginContainer ()
var substitutes = {
'softwarename': function () { return encodeURIComponent( external.globals( 'softwarename' ) ) },
'softwareversion': function () { return encodeURIComponent( external.globals( 'softwareversion' ) ) },
- 'username': function () { return encodeURIComponent( external.globals( 'cfg' )( 'username' ) ) },
- 'server': function () { return encodeURIComponent( external.globals( 'cfg' )( 'server' ) ) },
- 'resource': function () { return encodeURIComponent( external.globals( 'cfg' )( 'resource' ) ) },
- 'password': function () { return encodeURIComponent( external.globals( 'cfg' )( 'password' ) ) },
+ 'username': function () { return encodeURIComponent( external.globals( 'cfg' ).Item( 'username' ) ) },
+ 'server': function () { return encodeURIComponent( external.globals( 'cfg' ).Item( 'server' ) ) },
+ 'resource': function () { return encodeURIComponent( external.globals( 'cfg' ).Item( 'resource' ) ) },
+ 'password': function () { return encodeURIComponent( external.globals( 'cfg' ).Item( 'password' ) ) },
'random': function () { return encodeURIComponent( random ) },
- 'username-sha1': function () { return external.StringToSHA1( random + external.globals( 'cfg' )( 'username' ) ) },
- 'server-sha1': function () { return external.StringToSHA1( random + external.globals( 'cfg' )( 'server' ) ) },
- 'resource-sha1': function () { return external.StringToSHA1( random + external.globals( 'cfg' )( 'resource' ) ) },
- 'password-sha1': function () { return external.StringToSHA1( random + external.globals( 'cfg' )( 'password' ) ) }
+ 'username-sha1': function () { return external.StringToSHA1( random + external.globals( 'cfg' ).Item( 'username' ) ) },
+ 'server-sha1': function () { return external.StringToSHA1( random + external.globals( 'cfg' ).Item( 'server' ) ) },
+ 'resource-sha1': function () { return external.StringToSHA1( random + external.globals( 'cfg' ).Item( 'resource' ) ) },
+ 'password-sha1': function () { return external.StringToSHA1( random + external.globals( 'cfg' ).Item( 'password' ) ) }
};
return url.replace(
/\${([^}]+)}/g,
View
280 Client/src/main/ClientRoster.js
@@ -5,11 +5,11 @@ function ClientRosterAvatarVCard ( iq )
var ShortAddress = iq.FromAddress.ShortAddress();
if ( external.globals( 'ClientRoster' ).Items.Exists( ShortAddress ) )
{
- var RosterItem = external.globals( 'ClientRoster' ).Items( ShortAddress );
+ var RosterItem = external.globals( 'ClientRoster' ).Items.Item( ShortAddress );
var Resources = ( new VBArray( RosterItem.Resources.Keys() ) ).toArray();
for ( var i = 0; i < Resources.length; ++i )
{
- var RosterResource = RosterItem.Resources( Resources[i] );
+ var RosterResource = RosterItem.Resources.Item( Resources[i] );
if ( iq.Id == RosterResource.LoadingAvatarId )
{
var Node = null;
@@ -20,7 +20,7 @@ function ClientRosterAvatarVCard ( iq )
external.File( external.globals( 'usersdir' ) + 'Avatars\\' + RosterResource.LoadingAvatarHash ).WriteBase64( Node.text );
RosterResource.Avatar = RosterResource.LoadingAvatarHash;
for ( var j = 0; j < RosterItem.Groups.length; ++j )
- RosterResource.Redraw( RosterItem.Roster.Groups( RosterItem.Groups[j] ) );
+ RosterResource.Redraw( RosterItem.Roster.Groups.Item( RosterItem.Groups[j] ) );
RosterItem.UpdateTracker();
}
RosterResource.LoadingAvatarHash = '';
@@ -34,7 +34,7 @@ function ClientRosterAvatarVCard ( iq )
external.File( external.globals( 'usersdir' ) + 'Avatars\\' + RosterResource.LoadingAvatarHash ).WriteBase64( Node.text );
RosterResource.Avatar = RosterResource.LoadingAvatarHash;
for ( var j = 0; j < RosterItem.Groups.length; ++j )
- RosterResource.Redraw( RosterItem.Roster.Groups( RosterItem.Groups[j] ) );
+ RosterResource.Redraw( RosterItem.Roster.Groups.Item( RosterItem.Groups[j] ) );
RosterItem.UpdateTracker();
}
RosterResource.LoadingAvatarHash = '';
@@ -67,11 +67,11 @@ function ClientRosterAvatarStorage ( iq )
var ShortAddress = iq.FromAddress.ShortAddress();
if ( external.globals( 'ClientRoster' ).Items.Exists( ShortAddress ) )
{
- var RosterItem = external.globals( 'ClientRoster' ).Items( ShortAddress );
+ var RosterItem = external.globals( 'ClientRoster' ).Items.Item( ShortAddress );
var Resources = ( new VBArray( RosterItem.Resources.Keys() ) ).toArray();
for ( var i = 0; i < Resources.length; ++i )
{
- var RosterResource = RosterItem.Resources( Resources[i] );
+ var RosterResource = RosterItem.Resources.Item( Resources[i] );
if ( iq.Id == RosterResource.LoadingAvatarId )
{
if ( iq.XMLDOM.selectSingleNode( '/iq[@type = "result"]/query[@xmlns = "storage:client:avatar"]/data' ) )
@@ -81,7 +81,7 @@ function ClientRosterAvatarStorage ( iq )
external.File( external.globals( 'usersdir' ) + 'Avatars\\' + RosterResource.LoadingAvatarHash ).WriteBase64( iq.XMLDOM.selectSingleNode( '/iq/query/data' ).text );
RosterResource.Avatar = RosterResource.LoadingAvatarHash;
for ( var j = 0; j < RosterItem.Groups.length; ++j )
- RosterResource.Redraw( RosterItem.Roster.Groups( RosterItem.Groups[j] ) );
+ RosterResource.Redraw( RosterItem.Roster.Groups.Item( RosterItem.Groups[j] ) );
RosterItem.UpdateTracker();
}
RosterResource.LoadingAvatarHash = '';
@@ -116,16 +116,16 @@ function ClientRosterAvatarDirect ( iq )
var ShortAddress = iq.FromAddress.ShortAddress();
if ( external.globals( 'ClientRoster' ).Items.Exists( ShortAddress ) )
{
- var RosterItem = external.globals( 'ClientRoster' ).Items( ShortAddress );
+ var RosterItem = external.globals( 'ClientRoster' ).Items.Item( ShortAddress );
if ( RosterItem.Resources.Exists( iq.FromAddress.Resource ) )
{
- var RosterResource = RosterItem.Resources( iq.FromAddress.Resource );
+ var RosterResource = RosterItem.Resources.Item( iq.FromAddress.Resource );
if ( RosterResource.LoadingAvatarHash.length == 40 && ! external.FileExists( external.globals( 'usersdir' ) + 'Avatars\\' + RosterResource.LoadingAvatarHash ) )
{
external.File( external.globals( 'usersdir' ) + 'Avatars\\' + RosterResource.LoadingAvatarHash ).WriteBase64( iq.XMLDOM.selectSingleNode( '/iq/query/data' ).text );
RosterResource.Avatar = RosterResource.LoadingAvatarHash;
for ( var i = 0; i < RosterItem.Groups.length; ++i )
- RosterResource.Redraw( RosterItem.Roster.Groups( RosterItem.Groups[i] ) );
+ RosterResource.Redraw( RosterItem.Roster.Groups.Item( RosterItem.Groups[i] ) );
RosterItem.UpdateTracker();
}
RosterResource.LoadingAvatarHash = '';
@@ -144,8 +144,8 @@ function ClientRosterVcard ( iq )
if ( iq.Namespace == 'vcard-temp' && iq.Type == 'result' &&
external.globals( 'ClientRoster' ).Items.Exists( ShortAddress ) &&
(
- external.globals( 'ClientRoster' ).Items( ShortAddress ).Name == iq.FromAddress.CleanAddress() ||
- external.globals( 'ClientRoster' ).Items( ShortAddress ).Name == ShortAddress
+ external.globals( 'ClientRoster' ).Items.Item( ShortAddress ).Name == iq.FromAddress.CleanAddress() ||
+ external.globals( 'ClientRoster' ).Items.Item( ShortAddress ).Name == ShortAddress
)
)
{
@@ -164,8 +164,8 @@ function ClientRosterVcard ( iq )
show = firstname;
else if ( nickname.length )
show = nickname;
- if ( show.length && show != external.globals( 'ClientRoster' ).Items( ShortAddress ).Name )
- external.globals( 'ClientRoster' ).Items( ShortAddress ).SetName( show );
+ if ( show.length && show != external.globals( 'ClientRoster' ).Items.Item( ShortAddress ).Name )
+ external.globals( 'ClientRoster' ).Items.Item( ShortAddress ).SetName( show );
}
}
@@ -184,16 +184,16 @@ function ClientRosterVersion ( iq )
return;
if ( ! external.globals( 'ClientRoster' ).Items.Exists( ShortAddress ) )
return;
- var rosteritem = external.globals( 'ClientRoster' ).Items( ShortAddress );
+ var rosteritem = external.globals( 'ClientRoster' ).Items.Item( ShortAddress );
if ( ! rosteritem.Resources.Exists( iq.FromAddress.Resource ) )
return;
- var rosterresource = rosteritem.Resources( iq.FromAddress.Resource );
+ var rosterresource = rosteritem.Resources.Item( iq.FromAddress.Resource );
if ( rosterresource.Avatar.length )
return;
rosterresource.Avatar = external.globals( 'ClientRoster' ).GetAvatar( name, ShortAddress );
if ( rosterresource.Avatar.length )
for ( var i = 0; i < rosteritem.Groups.length; ++i )
- rosterresource.Redraw( rosteritem.Roster.Groups( rosteritem.Groups[i] ) );
+ rosterresource.Redraw( rosteritem.Roster.Groups.Item( rosteritem.Groups[i] ) );
rosteritem.UpdateTracker();
}
}
@@ -234,7 +234,7 @@ function ClientRosterContextMenu ()
cfg( 'contactlistdisplay' ) = 'detailed';
var TrackerNames = ( new VBArray( external.globals( 'ConferenceSessionPool' ).Trackers.Keys() ) ).toArray();
for ( var i = 0; i < TrackerNames.length; ++i )
- external.globals( 'ConferenceSessionPool' ).Trackers( TrackerNames[i] ).RefreshOccupants();
+ external.globals( 'ConferenceSessionPool' ).Trackers.Item( TrackerNames[i] ).RefreshOccupants();
external.globals( 'ClientRoster' ).RefreshAll();
}
MenuBarUpdate( 'tools' );
@@ -245,7 +245,7 @@ function ClientRosterContextMenu ()
cfg( 'contactlistdisplay' ) = 'compact';
var TrackerNames = ( new VBArray( external.globals( 'ConferenceSessionPool' ).Trackers.Keys() ) ).toArray();
for ( var i = 0; i < TrackerNames.length; ++i )
- external.globals( 'ConferenceSessionPool' ).Trackers( TrackerNames[i] ).RefreshOccupants();
+ external.globals( 'ConferenceSessionPool' ).Trackers.Item( TrackerNames[i] ).RefreshOccupants();
external.globals( 'ClientRoster' ).RefreshAll();
}
MenuBarUpdate( 'tools' );
@@ -371,7 +371,7 @@ function ClientRoster ()
{
var itemnames = ( new VBArray( this.Items.Keys() ) ).toArray();
for ( var i = 0; i < itemnames.length; ++i )
- this.Items( itemnames[i] ).RefreshAll();
+ this.Items.Item( itemnames[i] ).RefreshAll();
}
/* Parses the XML in search of an avatar
@@ -385,13 +385,13 @@ function ClientRoster ()
*/
for ( var i = str.length; i > 1; i-- )
if ( AvatarMap.Exists( str.substr( 0, i ) ) )
- return AvatarMap( str.substr( 0, i ) ) + '.gif';
+ return AvatarMap.Item( str.substr( 0, i ) ) + '.gif';
/* Transport contact
*/
var domain = jid.indexOf( '@' ) > -1 ? jid.substr( jid.indexOf( '@' ) + 1 ) : jid;
- if ( external.globals( 'ClientServices' ).Services.Exists( domain ) && external.globals( 'ClientServices' ).Services( domain ).Options & 0x0001 )
- switch ( external.globals( 'ClientServices' ).Services( domain ).Options & 0xF81E )
+ if ( external.globals( 'ClientServices' ).Services.Exists( domain ) && external.globals( 'ClientServices' ).Services.Item( domain ).Options & 0x0001 )
+ switch ( external.globals( 'ClientServices' ).Services.Item( domain ).Options & 0xF81E )
{
case 0x0002: return 'msn.gif';
case 0x0004: return 'icq.gif';
@@ -462,9 +462,9 @@ function ClientRoster ()
var presence = new XMPPPresence();
presence.Type = 'unavailable';
for ( var i = 0; i < itemnames.length; ++i )
- if ( this.Items( itemnames[i] ).Resources.Count )
+ if ( this.Items.Item( itemnames[i] ).Resources.Count )
{
- var theItem = this.Items( itemnames[i] );
+ var theItem = this.Items.Item( itemnames[i] );
var resources = ( new VBArray( theItem.Resources.Keys() ) ).toArray();
for ( var j = 0; j < resources.length; ++j )
theItem.ReceivePresence( theItem.JID, resources[j], presence );
@@ -477,11 +477,11 @@ function ClientRoster ()
{
var itemnames = ( new VBArray( this.Items.Keys() ) ).toArray();
for ( var i = 0; i < itemnames.length; ++i )
- this.Items( itemnames[i] ).Clear();
+ this.Items.Item( itemnames[i] ).Clear();
this.Items.RemoveAll();
var groupnames = ( new VBArray( this.Groups.Keys() ) ).toArray();
for ( var i = 0; i < groupnames.length; ++i )
- this.Groups( groupnames[i] ).Clear();
+ this.Groups.Item( groupnames[i] ).Clear();
this.Groups.RemoveAll();
}
@@ -498,30 +498,30 @@ function ClientRoster ()
{
/* Play notification sounds and show toaster
*/
- if ( external.globals( 'cfg' )( 'lastmode' ) < 2 || external.globals( 'cfg' )( 'lastmode' ) == 5 )
- for ( var i = 0; i < this.Items( ShortAddress ).Groups.length; i++ )
- if ( this.Groups( this.Items( ShortAddress ).Groups[i] ).ShowAll )
+ if ( external.globals( 'cfg' ).Item( 'lastmode' ) < 2 || external.globals( 'cfg' ).Item( 'lastmode' ) == 5 )
+ for ( var i = 0; i < this.Items.Item( ShortAddress ).Groups.length; i++ )
+ if ( this.Groups.Item( this.Items.Item( ShortAddress ).Groups[i] ).ShowAll )
{
- if ( Presence.Type == 'unavailable' && external.globals( 'cfg' )( 'soundoffline' ).toString() == 'true' && this.Items( ShortAddress ).Resources.Count )
- sound_play( external.globals( 'cfg' )( 'soundofflinefile' ), false );
- else if ( Presence.Type == 'available' && external.globals( 'cfg' )( 'soundonline' ).toString() == 'true' && ! this.Items( ShortAddress ).Resources.Count )
- sound_play( external.globals( 'cfg' )( 'soundonlinefile' ), false );
- if ( Presence.Type == 'available' && external.globals( 'cfg' )( 'alertonline' ).toString() == 'true' && ! this.Items( ShortAddress ).Resources.Count && external.globals( 'connecttime' ) + 30000 < ( new Date() ).getTime() )
+ if ( Presence.Type == 'unavailable' && external.globals( 'cfg' ).Item( 'soundoffline' ).toString() == 'true' && this.Items.Item( ShortAddress ).Resources.Count )
+ sound_play( external.globals( 'cfg' ).Item( 'soundofflinefile' ), false );
+ else if ( Presence.Type == 'available' && external.globals( 'cfg' ).Item( 'soundonline' ).toString() == 'true' && ! this.Items.Item( ShortAddress ).Resources.Count )
+ sound_play( external.globals( 'cfg' ).Item( 'soundonlinefile' ), false );
+ if ( Presence.Type == 'available' && external.globals( 'cfg' ).Item( 'alertonline' ).toString() == 'true' && ! this.Items.Item( ShortAddress ).Resources.Count && external.globals( 'connecttime' ) + 30000 < ( new Date() ).getTime() )
{
var Toaster = new Headline();
Toaster.Archive = false;
Toaster.ShowOptions = true;
Toaster.OpenConversation = Presence.FromAddress;
Toaster.Address = Presence.FromAddress;
- Toaster.Title = this.Items( ShortAddress ).Name;
- Toaster.Message = external.globals( 'Translator' ).Translate( 'main', 'user_online', [ this.Items( ShortAddress ).Name ] );
+ Toaster.Title = this.Items.Item( ShortAddress ).Name;
+ Toaster.Message = external.globals( 'Translator' ).Translate( 'main', 'user_online', [ this.Items.Item( ShortAddress ).Name ] );
Toaster.Show();
}
break;
}
/* Pass the presence on to the item
*/
- this.Items( ShortAddress ).ReceivePresence( ShortAddress, Presence.FromAddress.Resource, Presence );
+ this.Items.Item( ShortAddress ).ReceivePresence( ShortAddress, Presence.FromAddress.Resource, Presence );
}
}
}
@@ -548,9 +548,9 @@ function ClientRoster ()
if ( subscription == 'remove' )
{
if ( roster.Items.Exists( jid ) )
- roster.Items( jid ).Clear();
+ roster.Items.Item( jid ).Clear();
if ( roster.Items.Exists( jid ) )
- roster.Items( jid ).UpdateTracker();
+ roster.Items.Item( jid ).UpdateTracker();
return;
}
@@ -612,19 +612,19 @@ function ClientRoster ()
if ( ! GroupExists )
Groups.push( groups[j] );
- if ( roster.Groups( groups[j] ).Items.Count == 1 )
- roster.Groups( groups[j] ).Draw();
- else if ( roster.Groups( groups[j] ).ShowOffline )
- Draw( roster.Groups( groups[j] ) );
+ if ( roster.Groups.Item( groups[j] ).Items.Count == 1 )
+ roster.Groups.Item( groups[j] ).Draw();
+ else if ( roster.Groups.Item( groups[j] ).ShowOffline )
+ Draw( roster.Groups.Item( groups[j] ) );
/* Hide the "display offline contacts" button
*/
- var itemnames = ( new VBArray( roster.Groups( groups[j] ).Items.Keys() ) ).toArray();
+ var itemnames = ( new VBArray( roster.Groups.Item( groups[j] ).Items.Keys() ) ).toArray();
var o;
for ( o = 0; o < itemnames.length; ++o )
- if ( ! roster.Items( itemnames[o] ).Resources.Count )
+ if ( ! roster.Items.Item( itemnames[o] ).Resources.Count )
break;
if ( o < itemnames.length )
- roster.Groups( groups[j] ).HTMLShowAll.style.display = 'inline';
+ roster.Groups.Item( groups[j] ).HTMLShowAll.style.display = 'inline';
}
}
}
@@ -633,7 +633,7 @@ function ClientRoster ()
*/
else if ( subscription == 'to' || subscription == 'both' )
{
- var theItem = roster.Items( jid );
+ var theItem = roster.Items.Item( jid );
/* Get a new list of all groups this contact is in, or add to default group
*/
var newgroups = new ActiveXObject( 'Scripting.Dictionary' );
@@ -653,14 +653,14 @@ function ClientRoster ()
for ( var m = 0; m < theItem.Groups.length; ++m )
if ( ! newgroups.Exists( theItem.Groups[m] ) )
{
- var theGroup = roster.Groups( theItem.Groups[m] );
+ var theGroup = roster.Groups.Item( theItem.Groups[m] );
if ( theItem.Resources.Count )
{
/* Remove online resources
*/
var resources = ( new VBArray( theItem.Resources.Keys() ) ).toArray();
for ( var o = 0; o < resources.length; ++o )
- theItem.Resources( resources[o] ).Hide( theGroup );
+ theItem.Resources.Item( resources[o] ).Hide( theGroup );
theGroup.Items.Remove( jid );
if ( theGroup.Items.Count )
theGroup.HTMLOnline.firstChild.style.display = theGroup.HTMLOnline.children.length > 1 ? 'none' : 'block';
@@ -688,7 +688,7 @@ function ClientRoster ()
var itemnames = ( new VBArray( theGroup.Items.Keys() ) ).toArray();
var q;
for ( q = 0; q < itemnames.length; ++q )
- if ( ! roster.Items( itemnames[q] ).Resources.Count )
+ if ( ! roster.Items.Item( itemnames[q] ).Resources.Count )
break;
if ( q >= itemnames.length )
theGroup.HTMLShowAll.style.display = 'none';
@@ -715,7 +715,7 @@ function ClientRoster ()
var resources = ( new VBArray( theItem.Resources.Keys() ) ).toArray();
for ( var p = 0; p < resources.length; ++p )
{
- theResource = theItem.Resources( resources[p] );
+ theResource = theItem.Resources.Item( resources[p] );
if ( theResource.HTMLElements.Exists( theGroup.Name ) )
theResource.Redraw( theGroup );
else
@@ -729,7 +729,7 @@ function ClientRoster ()
var itemnames = ( new VBArray( theGroup.Items.Keys() ) ).toArray();
var q;
for ( q = 0; q < itemnames.length; ++q )
- if ( ! roster.Items( itemnames[q] ).Resources.Count )
+ if ( ! roster.Items.Item( itemnames[q] ).Resources.Count )
break;
if ( q >= itemnames.length )
theGroup.HTMLShowAll.style.display = 'none';
@@ -765,12 +765,12 @@ function ClientRoster ()
*/
else
{
- var theItem = roster.Items( jid );
+ var theItem = roster.Items.Item( jid );
/* Delete the resources.
*/
var resources = ( new VBArray( theItem.Resources.Keys() ) ).toArray();
for ( var j = 0; j < resources.length; ++j )
- theItem.Resources( resources[j] ).Clear();
+ theItem.Resources.Item( resources[j] ).Clear();
theItem.Resources.RemoveAll();
/* Get a new list of all groups this contact is in, or add to default group
*/
@@ -791,7 +791,7 @@ function ClientRoster ()
for ( var m = 0; m < theItem.Groups.length; ++m )
if ( ! newgroups.Exists( theItem.Groups[m] ) )
{
- var theGroup = roster.Groups( theItem.Groups[m] );
+ var theGroup = roster.Groups.Item( theItem.Groups[m] );
theItem.Hide( theGroup );
theGroup.Items.Remove( jid );
if ( ! theGroup.Items.Count )
@@ -811,7 +811,7 @@ function ClientRoster ()
var itemnames = ( new VBArray( theGroup.Items.Keys() ) ).toArray();
var o;
for ( o = 0; o < itemnames.length; ++o )
- if ( ! roster.Items( itemnames[o] ).Resources.Count )
+ if ( ! roster.Items.Item( itemnames[o] ).Resources.Count )
break;
if ( o >= itemnames.length )
theGroup.HTMLShowAll.style.display = 'none';
@@ -848,7 +848,7 @@ function ClientRoster ()
/* Update conversation window
*/
if ( roster.Items.Exists( jid ) )
- roster.Items( jid ).UpdateTracker();
+ roster.Items.Item( jid ).UpdateTracker();
}
/* Parses roster-updates
@@ -860,7 +860,7 @@ function ClientRoster ()
{
var contact = contacts.item(i);
var jid = contact.getAttribute( 'jid' ).toLowerCase();
- if ( contact.getAttribute( 'subscription' ) != 'remove' && ( ! jid.length || jid.indexOf( '/' ) != -1 || external.globals( 'ClientServices' ).PendingDisco.Exists( jid ) || ( external.globals( 'ClientServices' ).Services.Exists( jid ) && ( external.globals( 'ClientServices' ).Services( jid ).Options & 0x001 == 0x001 ) ) ) )
+ if ( contact.getAttribute( 'subscription' ) != 'remove' && ( ! jid.length || jid.indexOf( '/' ) != -1 || external.globals( 'ClientServices' ).PendingDisco.Exists( jid ) || ( external.globals( 'ClientServices' ).Services.Exists( jid ) && ( external.globals( 'ClientServices' ).Services.Item( jid ).Options & 0x001 == 0x001 ) ) ) )
external.globals( 'ClientServices' ).FromIQRoster( contact );
else
ParseXMLItem( this, jid, contact );
@@ -877,7 +877,7 @@ function ClientRoster ()
for ( var i = 0; i < contacts.length; i++ )
{
var jid = contacts.item(i).getAttribute( 'jid' ).toLowerCase();
- if ( ! jid.length || jid.indexOf( '/' ) != -1 || external.globals( 'ClientServices' ).PendingDisco.Exists( jid ) || ( external.globals( 'ClientServices' ).Services.Exists( jid ) && ( external.globals( 'ClientServices' ).Services( jid ).Options & 0x001 == 0x001 ) ) )
+ if ( ! jid.length || jid.indexOf( '/' ) != -1 || external.globals( 'ClientServices' ).PendingDisco.Exists( jid ) || ( external.globals( 'ClientServices' ).Services.Exists( jid ) && ( external.globals( 'ClientServices' ).Services.Item( jid ).Options & 0x001 == 0x001 ) ) )
{
external.globals( 'ClientServices' ).FromIQRoster( contacts.item(i) );
continue;
@@ -888,7 +888,7 @@ function ClientRoster ()
}
for ( var j = 0; j < oldjids.length; ++j )
if ( ! newjids.Exists( oldjids[j] ) )
- this.Items( oldjids[j] ).Clear();
+ this.Items.Item( oldjids[j] ).Clear();
}
/* Parses IQ packets
@@ -901,7 +901,7 @@ function ClientRoster ()
{
var contact = items.item( i );
var jid = contact.getAttribute( 'jid' ).toLowerCase();
- if ( ! jid.length || jid.indexOf( '/' ) != -1 || external.globals( 'ClientServices' ).PendingDisco.Exists( jid ) || ( external.globals( 'ClientServices' ).Services.Exists( jid ) && ( external.globals( 'ClientServices' ).Services( jid ).Options & 0x001 == 0x001 ) ) )
+ if ( ! jid.length || jid.indexOf( '/' ) != -1 || external.globals( 'ClientServices' ).PendingDisco.Exists( jid ) || ( external.globals( 'ClientServices' ).Services.Exists( jid ) && ( external.globals( 'ClientServices' ).Services.Item( jid ).Options & 0x001 == 0x001 ) ) )
{
external.globals( 'ClientServices' ).FromIQRoster( contact );
continue;
@@ -967,7 +967,7 @@ function ClientRoster ()
*/
var groupnames = ( new VBArray( this.Groups.Keys() ) ).toArray().sort( function(a,b){var c=a.toLowerCase();var d=b.toLowerCase();return c==d?0:c<d?-1:1} );
for ( var i = 0; i < groupnames.length; ++i )
- this.Groups( groupnames[i] ).Draw();
+ this.Groups.Item( groupnames[i] ).Draw();
return this.Items.Count > 0;
}
@@ -979,7 +979,7 @@ function ClientRoster ()
{
if ( ! this.Groups.Exists( name ) )
this.Groups.Add( name, new ClientRosterGroup( this, name ) );
- return this.Groups( name );
+ return this.Groups.Item( name );
}
}
@@ -1051,7 +1051,7 @@ function ClientRosterGroup ( roster, name )
if ( external.globals( 'ClientRoster' ).Search.Query.length )
return;
- external.globals( 'ClientRoster' ).Groups( event.srcElement.GroupName ).ToggleOnline();
+ external.globals( 'ClientRoster' ).Groups.Item( event.srcElement.GroupName ).ToggleOnline();
}
);
this.HTMLHeader.attachEvent(
@@ -1065,7 +1065,7 @@ function ClientRosterGroup ( roster, name )
var connected = external.globals( 'XMPPConnected' );
var cfg = external.globals( 'cfg' );
var list = cfg( 'contactlistdisplay' ) == 'detailed';
- var Group = external.globals( 'ClientRoster' ).Groups( event.srcElement.GroupName );
+ var Group = external.globals( 'ClientRoster' ).Groups.Item( event.srcElement.GroupName );
var none = ! Group.ShowAll;
var on = Group.ShowAll && ! Group.ShowOffline;
@@ -1101,7 +1101,7 @@ function ClientRosterGroup ( roster, name )
submenu_rooms.AddItem( true, false, false, false, 0, rooms[i].substr( 0, 30 ), 101 + i );
menu.AddItem( connected, false, false, false, 0, external.globals( 'Translator' ).Translate( 'main', 'cl_group_message' ), 2 );
- menu.AddItem( connected && external.globals( 'ClientRoster' ).Groups( event.srcElement.GroupName ).HTMLOnline.children.length > 1, false, false, false, submenu_rooms.Handle, external.globals( 'Translator' ).Translate( 'main', 'cl_room_invite' ), 0 );
+ menu.AddItem( connected && external.globals( 'ClientRoster' ).Groups.Item( event.srcElement.GroupName ).HTMLOnline.children.length > 1, false, false, false, submenu_rooms.Handle, external.globals( 'Translator' ).Translate( 'main', 'cl_room_invite' ), 0 );
menu.AddSeparator();
menu.AddItem( connected, false, false, false, 0, external.globals( 'Translator' ).Translate( 'main', 'cl_group_rename' ), 3 );
menu.AddItem( connected && groups.length, false, false, false, submenu_merge.Handle, external.globals( 'Translator' ).Translate( 'main', 'menu_group_merge' ), 0 );
@@ -1121,7 +1121,7 @@ function ClientRosterGroup ( roster, name )
cfg( 'contactlistdisplay' ) = 'detailed';
var TrackerNames = ( new VBArray( external.globals( 'ConferenceSessionPool' ).Trackers.Keys() ) ).toArray();
for ( var i = 0; i < TrackerNames.length; ++i )
- external.globals( 'ConferenceSessionPool' ).Trackers( TrackerNames[i] ).RefreshOccupants();
+ external.globals( 'ConferenceSessionPool' ).Trackers.Item( TrackerNames[i] ).RefreshOccupants();
external.globals( 'ClientRoster' ).RefreshAll();
}
MenuBarUpdate( 'tools' );
@@ -1132,7 +1132,7 @@ function ClientRosterGroup ( roster, name )
cfg( 'contactlistdisplay' ) = 'compact';
var TrackerNames = ( new VBArray( external.globals( 'ConferenceSessionPool' ).Trackers.Keys() ) ).toArray();
for ( var i = 0; i < TrackerNames.length; ++i )
- external.globals( 'ConferenceSessionPool' ).Trackers( TrackerNames[i] ).RefreshOccupants();
+ external.globals( 'ConferenceSessionPool' ).Trackers.Item( TrackerNames[i] ).RefreshOccupants();
external.globals( 'ClientRoster' ).RefreshAll();
}
MenuBarUpdate( 'tools' );
@@ -1157,7 +1157,7 @@ function ClientRosterGroup ( roster, name )
dial_groupmessage( event.srcElement.GroupName );
break;
case 3:
- external.globals( 'ClientRoster' ).Groups( event.srcElement.GroupName ).ChangeName();
+ external.globals( 'ClientRoster' ).Groups.Item( event.srcElement.GroupName ).ChangeName();
break;
case 100:
dial_conference_create( '', event.srcElement.GroupName );
@@ -1166,10 +1166,10 @@ function ClientRosterGroup ( roster, name )
if ( menu.Choice > 100 && menu.Choice - 101 < rooms.length )
{
if ( external.globals( 'ConferenceSessionPool' ).Trackers.Exists( rooms[ menu.Choice - 101 ] ) )
- dial_conference_invite( external.globals( 'ConferenceSessionPool' ).Trackers( rooms[ menu.Choice - 101 ] ), '', event.srcElement.GroupName );
+ dial_conference_invite( external.globals( 'ConferenceSessionPool' ).Trackers.Item( rooms[ menu.Choice - 101 ] ), '', event.srcElement.GroupName );
}
else if ( menu.Choice > 200 && menu.Choice - 201 < groups.length )
- external.globals( 'ClientRoster' ).Groups( event.srcElement.GroupName ).SetName( groups[ menu.Choice - 201 ] );
+ external.globals( 'ClientRoster' ).Groups.Item( event.srcElement.GroupName ).SetName( groups[ menu.Choice - 201 ] );
}
}
);
@@ -1181,7 +1181,7 @@ function ClientRosterGroup ( roster, name )
{
event.returnValue = false;
event.dataTransfer.dropEffect = 'move';
- external.globals( 'ClientRoster' ).Groups( event.srcElement.GroupName ).HTMLHeader.style.color = 'orange';
+ external.globals( 'ClientRoster' ).Groups.Item( event.srcElement.GroupName ).HTMLHeader.style.color = 'orange';
}
}
);
@@ -1200,7 +1200,7 @@ function ClientRosterGroup ( roster, name )
'ondragleave',
function ()
{
- external.globals( 'ClientRoster' ).Groups( event.srcElement.GroupName ).HTMLHeader.style.color = '';
+ external.globals( 'ClientRoster' ).Groups.Item( event.srcElement.GroupName ).HTMLHeader.style.color = '';
}
);
this.HTMLHeader.attachEvent(
@@ -1210,7 +1210,7 @@ function ClientRosterGroup ( roster, name )
if ( external.globals( 'ClientRoster' ).Items.Exists( event.dataTransfer.getData( 'Text' ) ) )
{
if ( external.globals( 'ClientRoster' ).DragNDropOrigin != event.srcElement.GroupName )
- external.globals( 'ClientRoster' ).Items( event.dataTransfer.getData( 'Text' ) ).CC( ( event.ctrlKey ? '' : external.globals( 'ClientRoster' ).DragNDropOrigin ), event.srcElement.GroupName );
+ external.globals( 'ClientRoster' ).Items.Item( event.dataTransfer.getData( 'Text' ) ).CC( ( event.ctrlKey ? '' : external.globals( 'ClientRoster' ).DragNDropOrigin ), event.srcElement.GroupName );
}
}
);
@@ -1226,7 +1226,7 @@ function ClientRosterGroup ( roster, name )
'onclick',
function ()
{
- external.globals( 'ClientRoster' ).Groups( event.srcElement.GroupName ).ToggleOffline();
+ external.globals( 'ClientRoster' ).Groups.Item( event.srcElement.GroupName ).ToggleOffline();
event.cancelBubble = true;
}
);
@@ -1277,14 +1277,14 @@ function ClientRosterGroup ( roster, name )
}
/* Restore toggle state
*/
- var groupnames = external.globals( 'cfg' )( 'hiddengroupsoffline' ).split( '\n' );
+ var groupnames = external.globals( 'cfg' ).Item( 'hiddengroupsoffline' ).split( '\n' );
for ( var i = 0; i < groupnames.length; ++i )
if ( groupnames[i] == this.Name )
{
this.ToggleOffline();
continue;
}
- groupnames = external.globals( 'cfg' )( 'hiddengroups' ).split( '\n' );
+ groupnames = external.globals( 'cfg' ).Item( 'hiddengroups' ).split( '\n' );
for ( var i = 0; i < groupnames.length; ++i )
if ( groupnames[i] == this.Name )
{
@@ -1317,7 +1317,7 @@ function ClientRosterGroup ( roster, name )
var itemnames = ( new VBArray( this.Items.Keys() ) ).toArray();
var i;
for ( i = 0; i < itemnames.length; ++i )
- if ( ! this.Roster.Items( itemnames[i] ).Resources.Count )
+ if ( ! this.Roster.Items.Item( itemnames[i] ).Resources.Count )
break;
if ( i < itemnames.length )
this.HTMLShowAll.style.display = 'inline';
@@ -1334,17 +1334,17 @@ function ClientRosterGroup ( roster, name )
{
var jids = ( new VBArray( this.Items.Keys() ) ).toArray();
for ( var i = 0; i < jids.length; ++i )
- if ( ! this.Roster.Items( jids[i] ).Resources.Count )
- this.Roster.Items( jids[i] ).Hide( this );
+ if ( ! this.Roster.Items.Item( jids[i] ).Resources.Count )
+ this.Roster.Items.Item( jids[i] ).Hide( this );
this.HTMLShowAll.className = 'roster-group-toggle-expand';
this.HTMLShowAll.title = external.globals( 'Translator' ).Translate( 'main', 'cl_group_expand' );
}
else
{
- var jids = ( new VBArray( this.Items.Keys() ) ).toArray().sort( function(a,b){var c=external.globals( 'ClientRoster' ).Items(a).Name.toLowerCase();var d=external.globals( 'ClientRoster' ).Items(b).Name.toLowerCase();return c==d?0:c<d?-1:1} );
+ var jids = ( new VBArray( this.Items.Keys() ) ).toArray().sort( function(a,b){var c=external.globals( 'ClientRoster' ).Items.Item(a).Name.toLowerCase();var d=external.globals( 'ClientRoster' ).Items.Item(b).Name.toLowerCase();return c==d?0:c<d?-1:1} );
for ( var i = 0; i < jids.length; ++i )
- if ( ! this.Roster.Items( jids[i] ).Resources.Count )
- this.Roster.Items( jids[i] ).Draw( this );
+ if ( ! this.Roster.Items.Item( jids[i] ).Resources.Count )
+ this.Roster.Items.Item( jids[i] ).Draw( this );
this.HTMLShowAll.className = 'roster-group-toggle-compact';
this.HTMLShowAll.title = external.globals( 'Translator' ).Translate( 'main', 'cl_group_compact' );
}
@@ -1389,7 +1389,7 @@ function ClientRosterGroup ( roster, name )
{
for ( var i = 0; i < contacts.length; ++i )
{
- var contact = this.Roster.Items( contacts[i] );
+ var contact = this.Roster.Items.Item( contacts[i] );
var item = dom.createElement( 'item' );
item.setAttribute( 'jid', contacts[i] );
if ( contact.Name.length && contact.Name != contact.JID )
@@ -1431,7 +1431,7 @@ function ClientRosterGroup ( roster, name )
this.Roster.Items.Add( jid, new ClientRosterItem( this.Roster, jid ) );
if ( ! this.Items.Exists( jid ) )
this.Items.Add( jid, null );
- return this.Roster.Items( jid );
+ return this.Roster.Items.Item( jid );
}
}
@@ -1484,10 +1484,10 @@ function ClientRosterItem ( roster, jid )
*/
for ( var i = 0; i < this.Groups.length; ++i )
{
- var theGroup = this.Roster.Groups( this.Groups[i] );
+ var theGroup = this.Roster.Groups.Item( this.Groups[i] );
var resources = ( new VBArray( this.Resources.Keys() ) ).toArray();
for ( var j = 0; j < resources.length; ++j )
- this.Resources( resources[j] ).Redraw( theGroup );
+ this.Resources.Item( resources[j] ).Redraw( theGroup );
if ( this.HTMLElements.Exists( this.Groups[i] ) )
this.Update( theGroup );
}
@@ -1527,32 +1527,32 @@ function ClientRosterItem ( roster, jid )
for ( var i = 0; i < this.Groups.length; ++i )
{
if ( this.HTMLElements.Exists( this.Groups[i] ) )
- this.HTMLElements( this.Groups[i] ).removeNode( true );
- this.Roster.Groups( this.Groups[i] ).Items.Remove( this.JID );
- if ( this.Roster.Groups( this.Groups[i] ).Items.Count )
+ this.HTMLElements.Item( this.Groups[i] ).removeNode( true );
+ this.Roster.Groups.Item( this.Groups[i] ).Items.Remove( this.JID );
+ if ( this.Roster.Groups.Item( this.Groups[i] ).Items.Count )
{
/* Hide the "display offline contacts" button
*/
- var itemnames = ( new VBArray( this.Roster.Groups( this.Groups[i] ).Items.Keys() ) ).toArray();
+ var itemnames = ( new VBArray( this.Roster.Groups.Item( this.Groups[i] ).Items.Keys() ) ).toArray();
var j;
for ( j = 0; j < itemnames.length; ++j )
- if ( ! this.Roster.Items( itemnames[j] ).Resources.Count )
+ if ( ! this.Roster.Items.Item( itemnames[j] ).Resources.Count )
break;
if ( j >= itemnames.length )
- this.Roster.Groups( this.Groups[i] ).HTMLShowAll.style.display = 'none';
+ this.Roster.Groups.Item( this.Groups[i] ).HTMLShowAll.style.display = 'none';
}
else
{
/* Delete the empty group
*/
- this.Roster.Groups( this.Groups[i] ).Clear();
+ this.Roster.Groups.Item( this.Groups[i] ).Clear();
this.Roster.Groups.Remove( this.Groups[i] );
}
}
this.HTMLElements.RemoveAll();
var resources = ( new VBArray( this.Resources.Keys() ) ).toArray();
for ( var i = 0; i < resources.length; ++i )
- this.Resources( resources[i] ).Clear();
+ this.Resources.Item( resources[i] ).Clear();
this.Resources.RemoveAll();
this.Roster.Items.Remove( this.JID );
this.UpdateTracker();
@@ -1573,19 +1573,19 @@ function ClientRosterItem ( roster, jid )
{
/* Delete the resource from the group
*/
- this.Resources( resource ).Hide( this.Roster.Groups( this.Groups[i] ) );
+ this.Resources.Item( resource ).Hide( this.Roster.Groups.Item( this.Groups[i] ) );
/* If there are no more resources, add the item to the offline section
*/
- if ( this.Resources.Count == 1 && this.Roster.Groups( this.Groups[i] ).ShowOffline )
- this.Draw( this.Roster.Groups( this.Groups[i] ) );
+ if ( this.Resources.Count == 1 && this.Roster.Groups.Item( this.Groups[i] ).ShowOffline )
+ this.Draw( this.Roster.Groups.Item( this.Groups[i] ) );
/* Show the "no one is online" text
*/
- if ( this.Roster.Groups( this.Groups[i] ).HTMLOnline.children.length < 2 )
- this.Roster.Groups( this.Groups[i] ).HTMLOnline.firstChild.style.display = 'block';
+ if ( this.Roster.Groups.Item( this.Groups[i] ).HTMLOnline.children.length < 2 )
+ this.Roster.Groups.Item( this.Groups[i] ).HTMLOnline.firstChild.style.display = 'block';
/* Show the "display offline contacts" button
*/
- if ( this.Roster.Groups( this.Groups[i] ).ShowAll && this.Resources.Count == 1 )
- this.Roster.Groups( this.Groups[i] ).HTMLShowAll.style.display = 'inline';
+ if ( this.Roster.Groups.Item( this.Groups[i] ).ShowAll && this.Resources.Count == 1 )
+ this.Roster.Groups.Item( this.Groups[i] ).HTMLShowAll.style.display = 'inline';
}
this.Resources.Remove( resource );
}
@@ -1594,7 +1594,7 @@ function ClientRosterItem ( roster, jid )
*/
else
{
- var userresource = this.Resources.Exists( resource ) ? this.Resources( resource ) : new ClientRosterResource( this, resource );
+ var userresource = this.Resources.Exists( resource ) ? this.Resources.Item( resource ) : new ClientRosterResource( this, resource );
this.Status = '';
@@ -1679,16 +1679,16 @@ function ClientRosterItem ( roster, jid )
if ( this.Resources.Exists( resource ) )
{
for ( var i = 0; i < this.Groups.length; ++i )
- userresource.Redraw( this.Roster.Groups( this.Groups[i] ) );
+ userresource.Redraw( this.Roster.Groups.Item( this.Groups[i] ) );
}
else
{
this.Resources.Add( resource, userresource )
for ( var i = 0; i < this.Groups.length; ++i )
{
- var theGroup = this.Roster.Groups( this.Groups[i] );
+ var theGroup = this.Roster.Groups.Item( this.Groups[i] );
this.Hide( theGroup );
- this.Resources( resource ).Draw( theGroup );
+ this.Resources.Item( resource ).Draw( theGroup );
/* Hide the "no one is online" text
*/
theGroup.HTMLOnline.firstChild.style.display = 'none';
@@ -1697,7 +1697,7 @@ function ClientRosterItem ( roster, jid )
var itemnames = ( new VBArray( theGroup.Items.Keys() ) ).toArray();
var j;
for ( j = 0; j < itemnames.length; ++j )
- if ( ! this.Roster.Items( itemnames[j] ).Resources.Count )
+ if ( ! this.Roster.Items.Item( itemnames[j] ).Resources.Count )
break;
if ( j >= itemnames.length )
theGroup.HTMLShowAll.style.display = 'none';
@@ -1716,25 +1716,25 @@ function ClientRosterItem ( roster, jid )
{
if ( ! this.HTMLElements.Exists( group.Name ) )
return;
- this.HTMLElements( group.Name ).removeNode( true );
+ this.HTMLElements.Item( group.Name ).removeNode( true );
this.HTMLElements.Remove( group.Name );
}
/* Refreshes the displayed name and status message in the specified group
*/
function Update ( group )
{
- this.HTMLElements( group.Name ).style.paddingBottom = external.globals( 'cfg' )( 'contactlistdisplay' ) == 'detailed' ? '' : '5px';
- this.HTMLElements( group.Name ).style[ external.globals( 'Translator' ).Direction ? 'marginRight' : 'marginLeft' ] = external.globals( 'cfg' )( 'contactlistdisplay' ) == 'detailed' ? '29px' : '21px';
- this.HTMLElements( group.Name ).title = external.globals( 'Translator' ).Translate( 'main', 'cl_tooltip_offline', [ this.Address.CleanAddress() ] );
+ this.HTMLElements.Item( group.Name ).style.paddingBottom = external.globals( 'cfg' ).Item( 'contactlistdisplay' ) == 'detailed' ? '' : '5px';
+ this.HTMLElements.Item( group.Name ).style[ external.globals( 'Translator' ).Direction ? 'marginRight' : 'marginLeft' ] = external.globals( 'cfg' ).Item( 'contactlistdisplay' ) == 'detailed' ? '29px' : '21px';
+ this.HTMLElements.Item( group.Name ).title = external.globals( 'Translator' ).Translate( 'main', 'cl_tooltip_offline', [ this.Address.CleanAddress() ] );
if ( this.Status.length )
- this.HTMLElements( group.Name ).title += '\n' + this.Status;
- with ( this.HTMLElements( group.Name ).children )
+ this.HTMLElements.Item( group.Name ).title += '\n' + this.Status;
+ with ( this.HTMLElements.Item( group.Name ).children )
{
item(0).className = external.globals( 'block' ).Exists( this.JID ) ? 'roster-item-offline-name-blocked' : 'roster-item-offline-name';
item(0).innerText = this.Name + '\n';
item(1).className = 'roster-item-offline-msg';
- item(1).style.display = external.globals( 'cfg' )( 'contactlistdisplay' ) == 'detailed' ? '' : 'none';
+ item(1).style.display = external.globals( 'cfg' ).Item( 'contactlistdisplay' ) == 'detailed' ? '' : 'none';
if ( this.Subscription == 'to' || this.Subscription == 'both' )
{
item(1).innerText = external.globals( 'Translator' ).Translate( 'main', 'cl_status_offline' );
@@ -1761,8 +1761,8 @@ function ClientRosterItem ( roster, jid )
return;
var elem = document.createElement( 'NOBR' );
elem.className = 'roster-item-offline';
- elem.style.paddingBottom = external.globals( 'cfg' )( 'contactlistdisplay' ) == 'detailed' ? '' : '5px';
- elem.style[ external.globals( 'Translator' ).Direction ? 'marginRight' : 'marginLeft' ] = external.globals( 'cfg' )( 'contactlistdisplay' ) == 'detailed' ? '29px' : '21px';
+ elem.style.paddingBottom = external.globals( 'cfg' ).Item( 'contactlistdisplay' ) == 'detailed' ? '' : '5px';
+ elem.style[ external.globals( 'Translator' ).Direction ? 'marginRight' : 'marginLeft' ] = external.globals( 'cfg' ).Item( 'contactlistdisplay' ) == 'detailed' ? '29px' : '21px';
elem.JID = this.JID;
elem.GroupName = group.Name;
elem.attachEvent(
@@ -1826,7 +1826,7 @@ function ClientRosterItem ( roster, jid )
msg.innerText = external.globals( 'Translator' ).Translate( 'main', 'cl_status_awaiting' );
else
msg.innerText = external.globals( 'Translator' ).Translate( 'main', 'cl_status_unknown' );
- msg.style.display = external.globals( 'cfg' )( 'contactlistdisplay' ) == 'detailed' ? '' : 'none';
+ msg.style.display = external.globals( 'cfg' ).Item( 'contactlistdisplay' ) == 'detailed' ? '' : 'none';
elem.insertAdjacentElement( 'beforeEnd', msg );
elem.title = external.globals( 'Translator' ).Translate( 'main', 'cl_tooltip_offline', [ this.Address.CleanAddress() ] );
if ( this.Status.length )
@@ -1892,7 +1892,7 @@ function ClientRosterItem ( roster, jid )
*/
function Purge ( override, groupname )
{
- if ( this.Roster.Groups.Exists( groupname ) && this.Roster.Groups( groupname ).Items.Exists( this.JID ) && this.Groups.length > 1 )
+ if ( this.Roster.Groups.Exists( groupname ) && this.Roster.Groups.Item( groupname ).Items.Exists( this.JID ) && this.Groups.length > 1 )
{
/* Take it out of this group but leave it in the other ones
*/
@@ -1966,40 +1966,40 @@ function ClientRosterResource ( item, name )
{
var groupnames = ( new VBArray( this.HTMLElements.Keys() ) ).toArray();
for ( var i = 0; i < groupnames.length; ++i )
- this.HTMLElements( groupnames[i] ).removeNode( true );
+ this.HTMLElements.Item( groupnames[i] ).removeNode( true );
this.HTMLElements.RemoveAll();
}
/* Remove the resource from the specified group
*/
function Hide ( group )
{
- this.HTMLElements( group.Name ).removeNode( true );
+ this.HTMLElements.Item( group.Name ).removeNode( true );
this.HTMLElements.Remove( group.Name );
}
/* Update the resource's information in the specified group
*/
function Redraw ( group )
{
- this.HTMLElements( group.Name ).style.paddingBottom = external.globals( 'cfg' )( 'contactlistdisplay' ) == 'detailed' ? '' : '5px';
- this.HTMLElements( group.Name ).title = this.ResourceName.length ? external.globals( 'Translator' ).Translate( 'main', 'cl_tooltip_online', [ this.RosterItem.Address.CleanAddress(), this.ResourceName ] ) : external.globals( 'Translator' ).Translate( 'main', 'cl_tooltip_offline', [ this.RosterItem.Address.CleanAddress() ] );
+ this.HTMLElements.Item( group.Name ).style.paddingBottom = external.globals( 'cfg' ).Item( 'contactlistdisplay' ) == 'detailed' ? '' : '5px';
+ this.HTMLElements.Item( group.Name ).title = this.ResourceName.length ? external.globals( 'Translator' ).Translate( 'main', 'cl_tooltip_online', [ this.RosterItem.Address.CleanAddress(), this.ResourceName ] ) : external.globals( 'Translator' ).Translate( 'main', 'cl_tooltip_offline', [ this.RosterItem.Address.CleanAddress() ] );
if ( this.Status.length )
- this.HTMLElements( group.Name ).title += '\n' + this.Status;
- with ( this.HTMLElements( group.Name ).children )
+ this.HTMLElements.Item( group.Name ).title += '\n' + this.Status;
+ with ( this.HTMLElements.Item( group.Name ).children )
{
- var img = item(0).tagName == 'IMG' ? item(0) : this.HTMLElements( group.Name ).insertAdjacentElement( 'afterBegin', document.createElement( 'IMG' ) );
+ var img = item(0).tagName == 'IMG' ? item(0) : this.HTMLElements.Item( group.Name ).insertAdjacentElement( 'afterBegin', document.createElement( 'IMG' ) );
img.className = 'roster-resource-avatar';
img.align = external.globals( 'Translator' ).Direction ? 'right' : 'left';
if ( this.Avatar.length == 0 )
img.src = '..\\images\\clients\\unknown-soldier.gif';
else if ( this.Avatar.length == 40 )
img.src = external.globals( 'usersdir' ) + 'Avatars\\' + this.Avatar;
- else if ( external.globals( 'cfg' )( 'contactlistdisplay' ) == 'compact' && external.FileExists( external.globals( 'cwd' ) + '..\\images\\clients\\small\\' + this.Avatar ) )
+ else if ( external.globals( 'cfg' ).Item( 'contactlistdisplay' ) == 'compact' && external.FileExists( external.globals( 'cwd' ) + '..\\images\\clients\\small\\' + this.Avatar ) )
img.src = external.globals( 'cwd' ) + '..\\images\\clients\\small\\' + this.Avatar;
else
img.src = external.globals( 'cwd' ) + '..\\images\\clients\\' + this.Avatar;
- img.height = img.width = external.globals( 'cfg' )( 'contactlistdisplay' ) == 'detailed' ? 24 : 16;
+ img.height = img.width = external.globals( 'cfg' ).Item( 'contactlistdisplay' ) == 'detailed' ? 24 : 16;
switch ( this.Show )
{
@@ -2010,7 +2010,7 @@ function ClientRosterResource ( item, name )
}
item(1).className = external.globals( 'block' ).Exists( this.RosterItem.JID ) ? 'roster-resource-name-blocked' : 'roster-resource-name';
item(1).innerText = this.RosterItem.Name + ( this.RosterItem.Resources.Count > 1 ? ' - ' + this.ResourceName : '' );
- item(1).style.fontWeight = external.globals( 'cfg' )( 'contactlistdisplay' ) == 'detailed' ? '' : 'normal';
+ item(1).style.fontWeight = external.globals( 'cfg' ).Item( 'contactlistdisplay' ) == 'detailed' ? '' : 'normal';
item(3).className = 'roster-resource-msg';
item(3).innerText = '';
@@ -2067,15 +2067,15 @@ function ClientRosterResource ( item, name )
else
item(3).innerText = this.Status + '\n';
- item(3).style.display = external.globals( 'cfg' )( 'contactlistdisplay' ) == 'detailed' ? '' : 'none';
+ item(3).style.display = external.globals( 'cfg' ).Item( 'contactlistdisplay' ) == 'detailed' ? '' : 'none';
}
- if ( this.HTMLElements( group.Name ).UserName != this.RosterItem.Name )
+ if ( this.HTMLElements.Item( group.Name ).UserName != this.RosterItem.Name )
{
- this.HTMLElements( group.Name ).UserName = this.RosterItem.Name;
- group.HTMLOffline.insertAdjacentElement( 'beforeEnd', this.HTMLElements( group.Name ) );
+ this.HTMLElements.Item( group.Name ).UserName = this.RosterItem.Name;
+ group.HTMLOffline.insertAdjacentElement( 'beforeEnd', this.HTMLElements.Item( group.Name ) );
/* Find the correct location to display the resource in this group
*/
- var name = this.HTMLElements( group.Name ).UserName.toLowerCase();
+ var name = this.HTMLElements.Item( group.Name ).UserName.toLowerCase();
var list = group.HTMLOnline.children;
var a = 0;
var z = list.length;
@@ -2091,7 +2091,7 @@ function ClientRosterResource ( item, name )
}
}
var node = list.item( a );
- node.insertAdjacentElement( 'afterEnd', this.HTMLElements( group.Name ) );
+ node.insertAdjacentElement( 'afterEnd', this.HTMLElements.Item( group.Name ) );
}
}
@@ -2106,7 +2106,7 @@ function ClientRosterResource ( item, name )
*/
var elem = document.createElement( 'NOBR' );
elem.className = 'roster-resource';
- elem.style.paddingBottom = external.globals( 'cfg' )( 'contactlistdisplay' ) == 'detailed' ? '' : '5px';
+ elem.style.paddingBottom = external.globals( 'cfg' ).Item( 'contactlistdisplay' ) == 'detailed' ? '' : '5px';
elem.GroupName = group.Name;
elem.UserName = this.RosterItem.Name;
elem.Resource = this.ResourceName;
@@ -2174,16 +2174,16 @@ function ClientRosterResource ( item, name )
img.src = '..\\images\\clients\\unknown-soldier.gif';
else if ( this.Avatar.length == 40 )
img.src = external.globals( 'usersdir' ) + 'Avatars\\' + this.Avatar;
- else if ( external.globals( 'cfg' )( 'contactlistdisplay' ) == 'compact' && external.FileExists( external.globals( 'cwd' ) + '..\\images\\clients\\small\\' + this.Avatar ) )
+ else if ( external.globals( 'cfg' ).Item( 'contactlistdisplay' ) == 'compact' && external.FileExists( external.globals( 'cwd' ) + '..\\images\\clients\\small\\' + this.Avatar ) )
img.src = external.globals( 'cwd' ) + '..\\images\\clients\\small\\' + this.Avatar;
else
img.src = external.globals( 'cwd' ) + '..\\images\\clients\\' + this.Avatar;
- img.height = img.width = external.globals( 'cfg' )( 'contactlistdisplay' ) == 'detailed' ? 24 : 16;
+ img.height = img.width = external.globals( 'cfg' ).Item( 'contactlistdisplay' ) == 'detailed' ? 24 : 16;
elem.insertAdjacentElement( 'beforeEnd', img );
var name = document.createElement( 'SPAN' );
name.className = external.globals( 'block' ).Exists( this.RosterItem.JID ) ? 'roster-resource-name-blocked' : 'roster-resource-name';
- name.style.fontWeight = external.globals( 'cfg' )( 'contactlistdisplay' ) == 'detailed' ? '' : 'normal';
+ name.style.fontWeight = external.globals( 'cfg' ).Item( 'contactlistdisplay' ) == 'detailed' ? '' : 'normal';
name.innerText = this.RosterItem.Name + ( this.RosterItem.Resources.Count > 1 ? ' - ' + this.ResourceName : '' );
elem.insertAdjacentElement( 'beforeEnd', name );
switch ( this.Show )
@@ -2248,7 +2248,7 @@ function ClientRosterResource ( item, name )
else
msg.innerText = this.Status + '\n';
- msg.style.display = external.globals( 'cfg' )( 'contactlistdisplay' ) == 'detailed' ? '' : 'none';
+ msg.style.display = external.globals( 'cfg' ).Item( 'contactlistdisplay' ) == 'detailed' ? '' : 'none';
elem.title = this.ResourceName.length ? external.globals( 'Translator' ).Translate( 'main', 'cl_tooltip_online', [ this.RosterItem.Address.CleanAddress(), this.ResourceName ] ) : external.globals( 'Translator' ).Translate( 'main', 'cl_tooltip_offline', [ this.RosterItem.Address.CleanAddress() ] );
if ( this.Status.length )
elem.title += '\n' + this.Status;
View
24 Client/src/main/ClientRosterSearch.js
@@ -183,19 +183,19 @@ function ClientRosterSearch ()
var groups = (new VBArray(external.globals("ClientRoster").Groups.Keys())).toArray();
for (var i in groups)
displayGroup(
- external.globals("ClientRoster").Groups(groups[i]),
+ external.globals("ClientRoster").Groups.Item(groups[i]),
true,
- external.globals("ClientRoster").Groups(groups[i]).ShowAll,
- external.globals("ClientRoster").Groups(groups[i]).ShowOffline,
- external.globals("ClientRoster").Groups(groups[i]).ShowAll
+ external.globals("ClientRoster").Groups.Item(groups[i]).ShowAll,
+ external.globals("ClientRoster").Groups.Item(groups[i]).ShowOffline,
+ external.globals("ClientRoster").Groups.Item(groups[i]).ShowAll
);
}
function restoreContacts ()
{
var contacts = (new VBArray(external.globals("ClientRoster").Items.Keys())).toArray();
for (var i in contacts)
- displayContact(external.globals("ClientRoster").Items(contacts[i]), true);
+ displayContact(external.globals("ClientRoster").Items.Item(contacts[i]), true);
}
function displayGroup (Group, ShowHeader, ShowAll, ShowOffline, ShowToggle)
@@ -213,41 +213,41 @@ function ClientRosterSearch ()
if (Visible)
{
if (!Contact.HTMLElements.Exists(Contact.Groups[i]))
- Contact.Draw(external.globals("ClientRoster").Groups(Contact.Groups[i]));
+ Contact.Draw(external.globals("ClientRoster").Groups.Item(Contact.Groups[i]));
}
else
{
if (Contact.HTMLElements.Exists(Contact.Groups[i]))
- Contact.Hide(external.globals("ClientRoster").Groups(Contact.Groups[i]));
+ Contact.Hide(external.globals("ClientRoster").Groups.Item(Contact.Groups[i]));
}
var resources = (new VBArray(Contact.Resources.Keys())).toArray();
for (var i in resources)
{
- var groups = (new VBArray(Contact.Resources(resources[i]).HTMLElements.Keys())).toArray()
+ var groups = (new VBArray(Contact.Resources.Item(resources[i]).HTMLElements.Keys())).toArray()
for (var j in groups)
- Contact.Resources(resources[i]).HTMLElements(groups[j]).style.display = Visible ? "block" : "none";
+ Contact.Resources.Item(resources[i]).HTMLElements.Item(groups[j]).style.display = Visible ? "block" : "none";
}
}
function hideGroups ()
{
var groups = (new VBArray(external.globals("ClientRoster").Groups.Keys())).toArray();
for (var i in groups)
- displayGroup(external.globals("ClientRoster").Groups(groups[i]), false, false, false, false);
+ displayGroup(external.globals("ClientRoster").Groups.Item(groups[i]), false, false, false, false);
}
function scanContacts ()
{
var contacts = (new VBArray(external.globals("ClientRoster").Items.Keys())).toArray();
for (var i in contacts)
{
- var contact = external.globals("ClientRoster").Items(contacts[i]);
+ var contact = external.globals("ClientRoster").Items.Item(contacts[i]);
if (matchContact(contact))
{
displayContact(contact, true);
for (var j in contact.Groups)
- displayGroup(external.globals("ClientRoster").Groups(contact.Groups[j]), true, true, true, false);
+ displayGroup(external.globals("ClientRoster").Groups.Item(contact.Groups[j]), true, true, true, false);
}
else
displayContact(contact, false);
View
2 Client/src/main/CommandLine.js
@@ -167,7 +167,7 @@ function CommandLineShift ()
for ( var i = 0; i < Directories.length; ++i )
if ( ! Styles.Exists( Directories[i].Name ) )
{
- external.globals( 'cfg' )( 'emoticonset' ) = Directories[i].Name;
+ external.globals( 'cfg' ).Item( 'emoticonset' ) = Directories[i].Name;
if ( external.windows.Exists( 'emoticon_list' ) )
external.windows( 'emoticon_list' ).Do( 'emoticon_refresh', null );
if ( external.windows.Exists( 'emoticon_download' ) )
View
20 Client/src/main/ConferenceSession.js
@@ -45,19 +45,19 @@ function ConferenceSessionPool ()
/* Parse the event right now
*/
if ( this.Trackers.Exists( ShortAddress ) )
- this.Trackers( ShortAddress ).DispatchEvent( Event );
+ this.Trackers.Item( ShortAddress ).DispatchEvent( Event );
/* Queue the event
*/
else if ( this.TrackersLoading.Exists( ShortAddress ) )
{
if ( this.Events.Exists( ShortAddress ) )
- this.Events( ShortAddress ).push( Event );
+ this.Events.Item( ShortAddress ).push( Event );
else
this.Events.Add( ShortAddress, new Array( Event ) );
- if ( external.globals( 'cfg' )( 'soundmessage' ).toString() == 'true' && Event.Type == 'message' && Event.Payload.Body.length && ( external.globals( 'cfg' )( 'lastmode' ) < 2 || external.globals( 'cfg' )( 'lastmode' ) == 5 ) )
- sound_play( external.globals( 'cfg' )( 'soundmessagefile' ), false );
+ if ( external.globals( 'cfg' ).Item( 'soundmessage' ).toString() == 'true' && Event.Type == 'message' && Event.Payload.Body.length && ( external.globals( 'cfg' ).Item( 'lastmode' ) < 2 || external.globals( 'cfg' ).Item( 'lastmode' ) == 5 ) )
+ sound_play( external.globals( 'cfg' ).Item( 'soundmessagefile' ), false );
}
}
@@ -77,25 +77,25 @@ function ConferenceSessionPool ()
{
/* Temporarily disable sound notification
*/
- var PlaySounds = external.globals( 'cfg' )( 'soundmessage' );
- external.globals( 'cfg' )( 'soundmessage' ) = false;
+ var PlaySounds = external.globals( 'cfg' ).Item( 'soundmessage' );
+ external.globals( 'cfg' ).Item( 'soundmessage' ) = false;
/* Dispatch the messages
*/
- for ( var i = 0; i < this.Events( ShortAddress ).length; ++i )
- Tracker.DispatchEvent( this.Events( ShortAddress )[i] );
+ for ( var i = 0; i < this.Events.Item( ShortAddress ).length; ++i )
+ Tracker.DispatchEvent( this.Events.Item( ShortAddress )[i] );
this.Events.Remove( ShortAddress );
/* Reset the sound notification
*/
- external.globals( 'cfg' )( 'soundmessage' ) = PlaySounds;
+ external.globals( 'cfg' ).Item( 'soundmessage' ) = PlaySounds;
}
}
function GetTracker ( Address )
{
var ShortAddress = Address.ShortAddress();
- return this.Trackers.Exists( ShortAddress ) ? this.Trackers( ShortAddress ) : null;
+ return this.Trackers.Exists( ShortAddress ) ? this.Trackers.Item( ShortAddress ) : null;
}
function DeleteTracker ( Tracker )
View
54 Client/src/main/ContainerCode.js
@@ -65,7 +65,7 @@ function FlashTab ( Address, Times )
{
if ( gContainer.Trackers.Exists( Address ) )
{
- var Tracker = gContainer.Trackers( Address );
+ var Tracker = gContainer.Trackers.Item( Address );
var Name = Tracker.HTMLButton.children.item(0).style;
if ( Tracker.IsActive )
{
@@ -89,10 +89,10 @@ function FlashTab ( Address, Times )
*/
function ChooseEmoticons ()
{
- var AddressHost = gContainer.Trackers( gContainer.ActiveTrackerAddress ).Address.Host;
- var EmoticonStyle = external.globals( 'cfg' )( 'emoticonset' );
- if ( external.globals( 'ClientServices' ).Services.Exists( AddressHost ) && ( external.globals( 'ClientServices' ).Services( AddressHost ).Options & 0x0001 ) )
- switch ( external.globals( 'ClientServices' ).Services( AddressHost ).Options & 0x881E )
+ var AddressHost = gContainer.Trackers.Item( gContainer.ActiveTrackerAddress ).Address.Host;
+ var EmoticonStyle = external.globals( 'cfg' ).Item( 'emoticonset' );
+ if ( external.globals( 'ClientServices' ).Services.Exists( AddressHost ) && ( external.globals( 'ClientServices' ).Services.Item( AddressHost ).Options & 0x0001 ) )
+ switch ( external.globals( 'ClientServices' ).Services.Item( AddressHost ).Options & 0x881E )
{
case 0x0002: EmoticonStyle = 'msn_messenger'; break;
case 0x0004: EmoticonStyle = 'icq'; break;
@@ -105,7 +105,7 @@ function ChooseEmoticons ()
EmoticonStyle = 'wpkontakt';
if ( ! external.FileExists( external.globals( 'usersdir' ) + 'Emoticons\\' + EmoticonStyle + '\\icondef.xml' ) )
- EmoticonStyle = external.globals( 'cfg' )( 'emoticonset' );
+ EmoticonStyle = external.globals( 'cfg' ).Item( 'emoticonset' );
var Language = external.globals( 'language' );
if ( ! ( Language.length < 3 || Language.indexOf( 'i-' ) == 0 || Language.indexOf( 'x-' ) == 0 ) )
@@ -128,7 +128,7 @@ function ChooseEmoticons ()
/* Expand palette to show all emoticons
*/
var ShowExpand = Subset.Style.Actions.length > W * H;
- if ( Subset.Style.Actions.length > W * H && external.globals( 'cfg' )( 'emoticonviewall' ).toString() == 'true' )
+ if ( Subset.Style.Actions.length > W * H && external.globals( 'cfg' ).Item( 'emoticonviewall' ).toString() == 'true' )
{
W = Math.round( Math.pow( Subset.Style.Actions.length * W / H, 0.5 ) );
H = 100;