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. 8
      pyweb/mumble/media/js/rendermumbleserver.js

8
pyweb/mumble/media/js/rendermumbleserver.js

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