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

Convierte enlace de ir a catálogo en botón

Aplica nueva estructura y estilos para que el enlace que dirige desde la
vista detalle hacia el catálogo de la entidad se visualice como botón.

Actualiza submódulo.
parent b0a44056
Loading
Loading
Loading
Loading
+20 −14
Original line number Diff line number Diff line
@@ -134,7 +134,9 @@ define([
			}

			if (this.pathParent) {
				this._addParentTitle();
				this._addCatalogButton();
			} else {
				this._hideCatalogButton();
			}
		},

@@ -147,8 +149,12 @@ define([
			this._titleCenterNode = this.titleNode;

			this._titleButtonsNode = put(this.topNode, 'div.buttons');

			this._titleLeftNode = put(this._titleButtonsNode, "div.left");
			this._titleRightNode = put(this._titleButtonsNode, "div.right." + this.hiddenClass);

			this._titleRightContainer = put(this._titleButtonsNode, "div.rightContainer");
			this._titleRightCatalogContainerNode = put(this._titleRightContainer, 'div.goToCatalogContainer');
			this._titleRightNode = put(this._titleRightContainer, "div.right." + this.hiddenClass);
		},

		_addIdTitle: function() {
@@ -161,26 +167,26 @@ define([
			}
		},

		_addParentTitle: function() {

			// TODO convertir este enlace en un botón del grupo de la derecha!!
		_addCatalogButton: function() {

			var nodeTitle = query("h1", this._titleCenterNode);
			if (!this._titleRightCatalogNode) {
				this._titleRightCatalogNode = put(this._titleRightCatalogContainerNode, 'a.goToCatalogButton',
					this.i18n.goToCatalog);
			}

			if (nodeTitle.length !== 0) {
				nodeTitle = nodeTitle[0];
				var node = put(nodeTitle, "-a.titleParent");
			put(this._titleRightCatalogContainerNode, '!' + this.hiddenClass);
			this._titleRightCatalogNode.setAttribute('href', this.pathParent);
			this._titleRightCatalogNode.setAttribute('d-state-url', true);
		},

				put(node, "span", this.i18n[this.pathParent.split("/")[1]]);
		_hideCatalogButton: function() {

				node.setAttribute('href', this.pathParent);
				node.setAttribute('d-state-url', true);
			}
			put(this._titleRightCatalogContainerNode, '.' + this.hiddenClass);
		},

		_insertButtonsIcons: function(leftButtons, rightButtons) {

			var getIconNode = lang.hitch(this, this._getIconNode);
			var getIconNode = lang.hitch(this, this._getIconNode),
				leftButtonsNodes = leftButtons.map(getIconNode),
				rightButtonsNodes = rightButtons.map(getIconNode);

+1 −0
Original line number Diff line number Diff line
@@ -134,6 +134,7 @@ define({
	, "citationsAssociated": "Citas asociadas"
	, "unitsAssociated": "Unidades asociadas"
	, "unitsSelected": "Unidades seleccionadas"
	, "goToCatalog": "Ir al catálogo"
	, "speciesCatalogView": "Catálogo de especies"
	, "activityCatalogView": "Catálogo de actividades"
	, "animalCatalogView": "Catálogo de animales"
+1 −0
Original line number Diff line number Diff line
@@ -134,6 +134,7 @@ define({
		, "citationsAssociated": "Associated citations"
		, "unitsAssociated": "Associated units"
		, "unitsSelected": "Selected units"
		, "goToCatalog": "Go to catalog"
		, "speciesCatalogView": "Species catalog"
		, "activityCatalogView": "Activities catalog"
		, "animalCatalogView": "Animals catalog"
Compare 7e9d00af to f53afd80
Original line number Diff line number Diff line
Subproject commit 7e9d00afe2406bc28d03a36dfe44b6ca542a8a08
Subproject commit f53afd80ccba61243f7b8a66f4bf771351ca1e4a