Browse Source

hide the "Welcome message" paragraph if the motd is not set

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
4b7b80b887
  1. 4
      pyweb/mumble/media/js/rendermumbleserver.js

4
pyweb/mumble/media/js/rendermumbleserver.js

@ -1,3 +1,5 @@
// kate: space-indent on; indent-width 4; replace-tabs on;
function renderserverinfos( server ){ function renderserverinfos( server ){
var buf = []; var buf = [];
if( server.connecturl ){ if( server.connecturl ){
@ -25,8 +27,10 @@ function renderserverinfos( server ){
for( var i = 0; i < buf.length; i++ ) for( var i = 0; i < buf.length; i++ )
res.push( '<li>'+buf[i]+'</li>' ); res.push( '<li>'+buf[i]+'</li>' );
res.push( '</ul><br /><br />' ); res.push( '</ul><br /><br />' );
if( server.motd ){
res.push( String.format( '<b>{0}:</b><br />', gettext("Welcome message") ) ); res.push( String.format( '<b>{0}:</b><br />', gettext("Welcome message") ) );
res.push( String.format( '<div style="padding: 10px">{0}</div>', server.motd ) ); res.push( String.format( '<div style="padding: 10px">{0}</div>', server.motd ) );
}
res.push( '</div>' ); res.push( '</div>' );
return res.join(''); return res.join('');
} }
Loading…
Cancel
Save