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

Actualiza módulos, amplía info en inicio

Muestra un mensaje asociado a la barra de búsqueda inicial, incluyendo
el valor actualizable del número de actividades disponibles.
Provee desde el widget de estadísticas el valor para el mensaje
anterior.
Implementa actualización de datos a mostrar por el módulo DataDisplayer.
Retoca traducciones.
Corrige varios defectos visuales.
parent 2c1cd582
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -166,6 +166,9 @@ define([
			},{
				channel: this._getWidgetInstance('searchBar').getChannel('TOGGLE_ADVANCED_SEARCH'),
				callback: lang.hitch(this, this._toggleAdvancedSearch)
			},{
				channel: this._getWidgetInstance('stats').getChannel('TOTAL_ACTIVITIES'),
				callback: lang.hitch(this, this._subStatsTotalActivities)
			}]);
		},

@@ -213,6 +216,13 @@ define([
			}
		},

		_subStatsTotalActivities: function(res) {

			this._publish(this._getWidgetInstance('searchBar').getChannel('SET_PROPS'), {
				totalActivities: res.value
			});
		},

		_clearModules: function() {

			this._publish(this._getWidgetInstance('info').getChannel('CLEAR'));
+22 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ define([
	, 'redmic/modules/base/_Filter'
	, 'redmic/modules/base/_Module'
	, 'redmic/modules/base/_Show'
	, 'redmic/modules/layout/dataDisplayer/DataDisplayer'
	, 'redmic/modules/search/TextImpl'
], function(
	redmicConfig
@@ -13,6 +14,7 @@ define([
	, _Filter
	, _Module
	, _Show
	, DataDisplayer
	, TextImpl
) {

@@ -50,6 +52,12 @@ define([
			}, this.textSearchConfig || {}]);

			this.textSearch = new TextImpl(this.textSearchConfig);

			this._infoInstance = new DataDisplayer({
				parentChannel: this.getChannel(),
				data: this.i18n.findDataInActivitiesStart + ' ' + this.i18n.findDataInActivitiesEnd,
				'class': this.infoTooltipClass
			});
		},

		_defineSubscriptions: function() {
@@ -91,6 +99,10 @@ define([
			this._publish(this.textSearch.getChannel('SHOW'), {
				node: this.domNode
			});

			this._publish(this._infoInstance.getChannel('SHOW'), {
				node: this.domNode
			});
		},

		_handleFilterParams: function(filterParams) {
@@ -107,6 +119,16 @@ define([
				searchText: searchText,
				queryChannel: this.queryChannel
			});
		},

		_onTotalActivitiesPropSet: function(propEvt) {

			var newData = this.i18n.findDataInActivitiesStart + ' <b>' + propEvt.value + '</b> ' +
				this.i18n.findDataInActivitiesEnd;

			this._publish(this._infoInstance.getChannel('SET_PROPS'), {
				data: newData,
			});
		}
	});
});
+26 −2
Original line number Diff line number Diff line
@@ -31,6 +31,13 @@ define([
		constructor: function(args) {

			this.config = {
				ownChannel: 'statsWidget',
				events: {
					TOTAL_ACTIVITIES: 'totalActivities'
				},
				actions: {
					TOTAL_ACTIVITIES: 'totalActivities'
				},
				target: redmicConfig.services.administrativeStatistics,
				_browserTarget: 'statisticsBrowser',
				'class': 'statsPanel',
@@ -78,6 +85,14 @@ define([
			});
		},

		_definePublications: function() {

			this.publicationsConfig.push({
				event: 'TOTAL_ACTIVITIES',
				channel: this.getChannel('TOTAL_ACTIVITIES'),
			});
		},

		_subBrowserButtonEvent: function(res) {

			this._showStatsInfo(res.item, res.iconNode);
@@ -138,13 +153,22 @@ define([
				var specificStatsItem = specificStatsData[i],
					attachedKey = specificStatsItem.attachedKey,
					independentKey = specificStatsItem.independentKey,
					specificData = this._extractSpecificStats(data, attachedKey, independentKey);
					specificData = this._extractSpecificStats(data, attachedKey, independentKey),
					href = attachedKey;

				if (attachedKey === 'activity') {

					this._emitEvt('TOTAL_ACTIVITIES', {
						value: specificData.total
					})
					href = 'activities'; // TODO ruta incorrecta de vista
				}

				this._addStats({
					id: id,
					name: attachedKey,
					stats: specificData,
					href: attachedKey === 'activity' ? 'activities': attachedKey // TODO ruta incorrecta de vista
					href: href
				});

				id++;
+6 −3
Original line number Diff line number Diff line
@@ -276,7 +276,7 @@ define({
	, "zoomLevelTooLowForCurrentMode": "Aumente el zoom para mostrar información en el modo actual"
	, "noLegendAvailable": "Esta capa no tiene leyenda disponible"

	, "tracking": "Tracking"
	, "tracking": "Seguimiento"

	, "location": "Localización"

@@ -741,7 +741,7 @@ define({
	, "geometryAndClassifications": "Geometría y clasificaciones"
	, "censusing-status": "Fases del censo"
	, "service": "Servicios"
	, "charts": "Gráficas"
	, "charts": "Series temporales"
	, "species-catalog": "Especies"
	, "activities-catalog": "Actividades"
	, "project-catalog": "Proyectos"
@@ -1260,7 +1260,7 @@ define({
	, "trackingProductName": "Seguimiento"
	, "speciesDistributionProductName": "Distribución de especies"
	, "timeSeriesProductName": "Series temporales"
	, "trashCollectionProductName": "Recolección de basura"
	, "trashCollectionProductName": "Inventario de basura"
	, "realTimeProductName": "Datos en tiempo real"
	, "bibliographyProductName": "Bibliografía"
	, "speciesCatalogProductDescription": "Listado de especies sincronizado con WoRMS, pero centrado en la región de la Macaronesia. Incluye aquellas especies que se encuentran referenciadas en los datos recogidos en la plataforma."
@@ -1273,6 +1273,9 @@ define({
	, "realTimeProductDescription": "Visor interactivo de series de datos, que permite su consulta en tiempo real y del pasado reciente. Contiene en su mayoría datos meteorológicos, pudiendo visualizar diferentes parámetros por estación con sus respectivas representaciones gráficas."
	, "bibliographyProductDescription": "Listado de gran cantidad de publicaciones científicas relacionadas con el medio marino en su ámbito de actuación. También se pueden encontrar manuales, textos legislativos y otros documentos relacionados con actividades concretas. Algunos de estos documentos se pueden consultar directamente en el visor, para otros se proporciona un enlace externo o simplemente sirve de escaparate para conocer de su existencia."

	, "findDataInActivitiesStart": "Encuentra datos entre las"
	, "findDataInActivitiesEnd": "actividades disponibles"


	// Para capas que no se pueden cambiar las keys
	, "descript_1": "Descripción"
+6 −3
Original line number Diff line number Diff line
@@ -742,7 +742,7 @@ define({
		, "geometryAndClassifications": "Geometry & classifications"
		, "censusing-status": "Censusing status"
		, "service": "Services"
		, "charts": "Charts"
		, "charts": "Time series"
		, "species-catalog": "Species"
		, "activities-catalog": "Activities"
		, "project-catalog": "Projects"
@@ -889,7 +889,7 @@ define({
		, "goToDashboard": "Visualize data"
		, "dashboard": "Dashboard"

		, "trash-collection": "Trash survey"
		, "trash-collection": "Trash inventory"
		, "collect": "Collect"
		, "places": "Places"
		, "track": "Track"
@@ -1264,7 +1264,7 @@ define({
		, "trackingProductName": "Tracking"
		, "speciesDistributionProductName": "Species distribution"
		, "timeSeriesProductName": "Timeseries"
		, "trashCollectionProductName": "Trash collection"
		, "trashCollectionProductName": "Trash inventory"
		, "realTimeProductName": "Real-time data"
		, "bibliographyProductName": "Bibliography"
		, "speciesCatalogProductDescription": "Species list synchronized with WoRMS, but focused on the Macaronesia region. It includes those species that are referenced in the data collected on the platform."
@@ -1277,6 +1277,9 @@ define({
		, "realTimeProductDescription": "Interactive viewer of data series, which allows querying in real time and the recent past. It contains mostly meteorological data, being able to view different parameters per station with their respective graphic representations."
		, "bibliographyProductDescription": "List of a large number of scientific publications related to the marine environment in its field of action. You can also find manuals, legislative texts and other documents related to specific activities. Some of these documents can be consulted directly in the viewer, for others an external link is provided or simply serves as a showcase to find out about their existence."

		, "findDataInActivitiesStart": "Find data within the"
		, "findDataInActivitiesEnd": "available activities"


		//Para capas que no se pueden cambiar las keys
		, "descript_1": "Description"
Loading