Browse Source

add "var" keywords before some variables

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
831e5d97b9
  1. 10
      htdocs/js/channelviewer.js

10
htdocs/js/channelviewer.js

@ -29,8 +29,8 @@ Ext.extend( Ext.ux.MumbleChannelViewer, Ext.tree.TreePanel, {
url: this.source_url, url: this.source_url,
scope: this, scope: this,
success: function( resp, opt ){ success: function( resp, opt ){
respdata = Ext.decode( resp.responseText );
root = {
var respdata = Ext.decode( resp.responseText );
var root = {
text: respdata.name, text: respdata.name,
id: "mumbroot", id: "mumbroot",
leaf: false, leaf: false,
@ -38,9 +38,9 @@ Ext.extend( Ext.ux.MumbleChannelViewer, Ext.tree.TreePanel, {
children: [], children: [],
}; };
function populateNode( node, json ){ function populateNode( node, json ){
subchan_users = 0;
var subchan_users = 0;
for( var i = 0; i < json.channels.length; i++ ){ for( var i = 0; i < json.channels.length; i++ ){
child = {
var child = {
text: json.channels[i].name, text: json.channels[i].name,
id: ("channel_" + json.channels[i].id), id: ("channel_" + json.channels[i].id),
leaf: false, leaf: false,
@ -51,7 +51,7 @@ Ext.extend( Ext.ux.MumbleChannelViewer, Ext.tree.TreePanel, {
subchan_users += populateNode( child, json.channels[i] ); subchan_users += populateNode( child, json.channels[i] );
} }
for( var i = 0; i < json.users.length; i++ ){ for( var i = 0; i < json.users.length; i++ ){
child = {
var child = {
text: json.users[i].name, text: json.users[i].name,
id: ("user_" + json.users[i].id), id: ("user_" + json.users[i].id),
leaf: true, leaf: true,

Loading…
Cancel
Save