comparison mod_admin_web/admin_web/www_files/js/main.js @ 584:1c2fc3b845f2

mod_admin_web: Clear commands in all cases new ones are loaded (thanks Maranda)
author Florian Zeitz <florob@babelmonkeys.de>
date Thu, 26 Jan 2012 19:38:03 +0100
parents 950e23318bbc
children 40ab83736f6e
comparison
equal deleted inserted replaced
583:a634b116c694 584:1c2fc3b845f2
123 $('#host').append('<option>' + $(items[i]).text() + '</option>'); 123 $('#host').append('<option>' + $(items[i]).text() + '</option>');
124 } 124 }
125 showDisconnect(); 125 showDisconnect();
126 adminsubHost = $(items[0]).text(); 126 adminsubHost = $(items[0]).text();
127 adhocControl.checkFeatures(adminsubHost, 127 adhocControl.checkFeatures(adminsubHost,
128 function () { adhocControl.getCommandNodes(function (result) { $('#adhocDisplay').empty(); $('#adhocCommands').append(result); }) }, 128 function () { adhocControl.getCommandNodes(function (result) { $('#adhocDisplay').empty(); $('#adhocCommands').html(result); }) },
129 function () { $('#adhocCommands').empty(); $('#adhocDisplay').html('<p>This host does not support commands</p>'); }); 129 function () { $('#adhocCommands').empty(); $('#adhocDisplay').html('<p>This host does not support commands</p>'); });
130 connection.addHandler(_cbAdminSub, Strophe.NS.ADMINSUB + '#event', 'message'); 130 connection.addHandler(_cbAdminSub, Strophe.NS.ADMINSUB + '#event', 'message');
131 connection.send($iq({to: adminsubHost, type: 'set', id: connection.getUniqueId()}).c('adminsub', {xmlns: Strophe.NS.ADMINSUB}) 131 connection.send($iq({to: adminsubHost, type: 'set', id: connection.getUniqueId()}).c('adminsub', {xmlns: Strophe.NS.ADMINSUB})
132 .c('subscribe', {node: Strophe.NS.C2SSTREAM})); 132 .c('subscribe', {node: Strophe.NS.C2SSTREAM}));
133 connection.send($iq({to: adminsubHost, type: 'set', id: connection.getUniqueId()}).c('adminsub', {xmlns: Strophe.NS.ADMINSUB}) 133 connection.send($iq({to: adminsubHost, type: 'set', id: connection.getUniqueId()}).c('adminsub', {xmlns: Strophe.NS.ADMINSUB})