Adds another element existence check to avoid JS errors in welcome page.

This commit is contained in:
hristoterezov 2014-09-25 15:07:06 +03:00
parent 5e58327a3f
commit 507e58dab6
1 changed files with 7 additions and 6 deletions

3
app.js
View File

@ -1150,13 +1150,14 @@ $(document).ready(function () {
if (interfaceConfig.SHOW_BRAND_WATERMARK) {
var rightWatermarkDiv
= $("#welcome_page_header div[class='watermark rightwatermark']");
if(rightWatermarkDiv && rightWatermarkDiv.length > 0) {
rightWatermarkDiv.css({display: 'block'});
rightWatermarkDiv.parent().get(0).href
= interfaceConfig.BRAND_WATERMARK_LINK;
rightWatermarkDiv.get(0).style.backgroundImage
= "url(../images/rightwatermark.png)";
}
}
if (interfaceConfig.SHOW_POWERED_BY) {
$("#welcome_page_header>a[class='poweredby']")