Commit f74a704f authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Retoca elementos de topbar, añade texto al logo

parent ac85f938
Loading
Loading
Loading
Loading
+18 −5
Original line number Diff line number Diff line
@@ -23,7 +23,11 @@ define([

			this.config = {
				region: "top",
				"class": "topbar",
				'class': "topbar",
				logoClass: 'topbarLogo',
				logoHref: '/home',
				logoImgSrc: '/resources/images/logos/logo.svg',
				logoTextContent: 'REDMIC',
				doLayout: false,
				show: {
					left: true,
@@ -40,10 +44,7 @@ define([
			this._collapseNode = put(this.domNode, "div.collapseSidebarButton");
			this._collapseNode.onclick = lang.hitch(this, this._onCollapseClicked);

			this.logoNode = put(this.domNode, "div.topbarLogo", {
				innerHTML: '<a href="/home" d-state-url="true" title="' + this.i18n.home +
					'"><img class="logo" src="/resources/images/logos/logo.svg"></a>'
			});
			this._createLogoNode();

			var envDfd = window.env;

@@ -63,6 +64,18 @@ define([
			}, this.leftNode);
		},

		_createLogoNode: function() {

			var classAttr = '.' + this.logoClass,
				hrefAttr = '[href="' + this.logoHref + '"]',
				singlePageAttr = '[d-state-url="true"]',
				titleAttr = '[title="' + this.i18n.home + '"]',
				logoNode = put(this.domNode, 'a' + classAttr + hrefAttr + singlePageAttr + titleAttr);

			put(logoNode, 'img[src="' + this.logoImgSrc + '"]');
			put(logoNode, 'span', this.logoTextContent);
		},

		_onCollapseClicked: function() {

			// TODO hacerlo en this en lugar de this.manager cuando topbar sea módulo
+3 −4
Original line number Diff line number Diff line
@@ -122,13 +122,12 @@ define([
			this.inherited(arguments);

			put(this.domNode, ".notification");
			this.containerNode = put(this.domNode, "div");
			this.iconNode = put(this.containerNode, "i.fa.fa-bell-o");
			this.spanNode = put(this.containerNode, "span.hidden", 0);
			this.iconNode = put(this.domNode, "i.fa.fa-bell");
			this.spanNode = put(this.domNode, "span.hidden", 0);

			this.iconNode.addEventListener('animationend', lang.hitch(this, this._removeAnimated));

			this.containerNode.onclick = lang.hitch(this, this._clickNotification);
			this.domNode.onclick = lang.hitch(this, this._clickNotification);

			this.closeNotificationSidebarHandler = on.pausable(this.ownerDocumentBody, "click",
				lang.hitch(this, this._onCloseNotificationSidebar));
Compare cb0a0d39 to 34ede586
Original line number Diff line number Diff line
Subproject commit cb0a0d396104e5d41d8f7856f8ba3fc76e0eadd7
Subproject commit 34ede586a492ce80f3e79742b647e531f52c83cd