From 4b7b80b8879e5c875d3f8cc4d664075806a3d5a6 Mon Sep 17 00:00:00 2001 From: Michael Ziegler Date: Wed, 4 Aug 2010 22:50:10 +0200 Subject: [PATCH] hide the "Welcome message" paragraph if the motd is not set --- pyweb/mumble/media/js/rendermumbleserver.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pyweb/mumble/media/js/rendermumbleserver.js b/pyweb/mumble/media/js/rendermumbleserver.js index fc0f932..eb2f4e7 100644 --- a/pyweb/mumble/media/js/rendermumbleserver.js +++ b/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( '
  • '+buf[i]+'
  • ' ); res.push( '

    ' ); - res.push( String.format( '{0}:
    ', gettext("Welcome message") ) ); - res.push( String.format( '
    {0}
    ', server.motd ) ); + if( server.motd ){ + res.push( String.format( '{0}:
    ', gettext("Welcome message") ) ); + res.push( String.format( '
    {0}
    ', server.motd ) ); + } res.push( '' ); return res.join(''); }