Updated application.
This commit is contained in:
@@ -80,8 +80,12 @@
|
||||
value = customer.address;
|
||||
value && value.length ? this.lblCompanyAddress.text(value) : this.lblCompanyAddress.parents("tr").addClass("hidden");
|
||||
(value = customer.mail) && value.length ? this.lblCompanyMail.attr("href", "mailto:" + value).text(value) : this.lblCompanyMail.parents("tr").addClass("hidden");
|
||||
(value = customer.www) && value.length ? this.lblCompanyUrl.attr("href", "http://" + value).text(value) : this.lblCompanyUrl.parents("tr").addClass("hidden");
|
||||
(value = customer.info) && value.length ? this.lblCompanyLic.text(value) : this.lblCompanyLic.parents("tr").addClass("hidden");
|
||||
if ((value = customer.www) && value.length) {
|
||||
var http = !/^https?:\/{2}/i.test(value) ? "http://": "";
|
||||
this.lblCompanyUrl.attr("href", http + value).text(value);
|
||||
} else {
|
||||
this.lblCompanyUrl.parents("tr").addClass("hidden");
|
||||
} (value = customer.info) && value.length ? this.lblCompanyLic.text(value) : this.lblCompanyLic.parents("tr").addClass("hidden");
|
||||
(value = customer.logo) && value.length ? this.divCompanyLogo.html('<img src="' + value + '" />') : this.divCompanyLogo.parents("tr").addClass("hidden");
|
||||
} else {
|
||||
this.cntLicenseeInfo.addClass("hidden");
|
||||
|
||||
@@ -45,7 +45,8 @@ define(["backbone", "text!common/main/lib/template/Header.template", "core"], fu
|
||||
template: _.template(headerTemplate),
|
||||
events: {
|
||||
"click #header-logo": function (e) {
|
||||
var newDocumentPage = window.open("http://www.onlyoffice.com");
|
||||
var _url = !!this.branding && !!this.branding.logo && !!this.branding.logo.url ? this.branding.logo.url : "http://www.onlyoffice.com";
|
||||
var newDocumentPage = window.open(_url);
|
||||
newDocumentPage && newDocumentPage.focus();
|
||||
}
|
||||
},
|
||||
@@ -70,10 +71,10 @@ define(["backbone", "text!common/main/lib/template/Header.template", "core"], fu
|
||||
setBranding: function (value) {
|
||||
var element;
|
||||
this.branding = value;
|
||||
if (value && value.logoUrl) {
|
||||
if (value && value.logo && value.logo.image) {
|
||||
element = $("#header-logo");
|
||||
if (element) {
|
||||
element.css("background-image", 'url("' + value.logoUrl + '")');
|
||||
element.css("background-image", 'url("' + value.logo.image + '")');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user