comparison mod_admin_web/admin_web/www_files/js/main.js @ 574:950e23318bbc

mod_admin_web: Replace command list instead of appending
author Florian Zeitz <florob@babelmonkeys.de>
date Wed, 18 Jan 2012 15:51:38 +0100
parents c9955858dc7e
children 1c2fc3b845f2
comparison
equal deleted inserted replaced
573:c9955858dc7e 574:950e23318bbc
200 .c('unsubscribe', {node: Strophe.NS.C2SSTREAM})); 200 .c('unsubscribe', {node: Strophe.NS.C2SSTREAM}));
201 connection.send($iq({to: adminsubHost, type: 'set', id: connection.getUniqueId()}).c('adminsub', {xmlns: Strophe.NS.ADMINSUB}) 201 connection.send($iq({to: adminsubHost, type: 'set', id: connection.getUniqueId()}).c('adminsub', {xmlns: Strophe.NS.ADMINSUB})
202 .c('unsubscribe', {node: Strophe.NS.S2SSTREAM})); 202 .c('unsubscribe', {node: Strophe.NS.S2SSTREAM}));
203 adminsubHost = $(this).val(); 203 adminsubHost = $(this).val();
204 adhocControl.checkFeatures(adminsubHost, 204 adhocControl.checkFeatures(adminsubHost,
205 function () { adhocControl.getCommandNodes(function (result) { $('#adhocDisplay').empty(); $('#adhocCommands').append(result); }) }, 205 function () { adhocControl.getCommandNodes(function (result) { $('#adhocDisplay').empty(); $('#adhocCommands').html(result); }) },
206 function () { $('#adhocCommands').empty(); $('#adhocDisplay').html('<p>This host does not support commands</p>'); }); 206 function () { $('#adhocCommands').empty(); $('#adhocDisplay').html('<p>This host does not support commands</p>'); });
207 $('#s2sin').empty(); 207 $('#s2sin').empty();
208 $('#s2sout').empty(); 208 $('#s2sout').empty();
209 $('#c2s').empty(); 209 $('#c2s').empty();
210 connection.send($iq({to: adminsubHost, type: 'set', id: connection.getUniqueId()}).c('adminsub', {xmlns: Strophe.NS.ADMINSUB}) 210 connection.send($iq({to: adminsubHost, type: 'set', id: connection.getUniqueId()}).c('adminsub', {xmlns: Strophe.NS.ADMINSUB})