Commit 3d9faa3f authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Desglosa info de activity, project y program

En lugar de mostrar un panel con pestañas, independiza cada pestaña en
un nuevo panel. Actualiza referencias y refactoriza para adaptarse a
este nuevo esquema.

Actualiza submódulos.
parent 47f8f7bb
Loading
Loading
Loading
Loading
+4 −40
Original line number Diff line number Diff line
@@ -2,25 +2,19 @@ define([
	"app/redmicConfig"
	, "dojo/_base/declare"
	, "dojo/_base/lang"
	, "redmic/modules/layout/TabsDisplayer"
	, "redmic/modules/layout/templateDisplayer/TemplateDisplayer"
	, "redmic/modules/map/_ImportWkt"
	, "redmic/modules/map/LeafletImpl"
	, "redmic/modules/map/Map"
	, "templates/ActivityInfo"
	, "templates/ActivityInfoHelp"
	, "./_ActivityBase"
], function(
	redmicConfig
	, declare
	, lang
	, TabsDisplayer
	, TemplateDisplayer
	, _ImportWkt
	, LeafletImpl
	, Map
	, TemplateInfo
	, TemplateInfoHelp
	, _ActivityBase
) {

@@ -40,17 +34,6 @@ define([
		_setMainConfigurations: function() {

			this.widgetConfigs = this._merge([{
				helpText: {
					width: 6,
					height: 1,
					type: TemplateDisplayer,
					props: {
						title: this.i18n.dataDownload,
						template: TemplateInfoHelp,
						"class": "templateInfo",
						target: "helpTextActivity"
					}
				},
				info: this._infoConfig({
					height: 5,
					template: TemplateInfo
@@ -70,20 +53,10 @@ define([
						measureTools: false
					}
				},
				additionalInfo: {
					width: 3,
					height: 5,
					type: TabsDisplayer,
					props: {
						title: this.i18n.additionalInfo,
						childTabs: [
							this._organisationsConfig(),
							this._platformsConfig(),
							this._contactsConfig(),
							this._documentsConfig()
						]
					}
				}
				organisationList: this._organisationsConfig(),
				platformList: this._platformsConfig(),
				contactList: this._contactsConfig(),
				documentList: this._documentsConfig()
			}, this.widgetConfigs || {}]);
		},

@@ -94,15 +67,6 @@ define([

		_refreshModules: function() {

			var object = {};

			object.info = this.i18n.helpTextActivityDetails;

			this._emitEvt('INJECT_ITEM', {
				data: object,
				target: "helpTextActivity"
			});

			this.inherited(arguments);
		},

+6 −17
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@ define([
	"app/redmicConfig"
	, "dojo/_base/declare"
	, "dojo/_base/lang"
	, "redmic/modules/layout/TabsDisplayer"
	, "templates/ProjectInfo"
	, "templates/ProjectList"
	, "./_ActivityBase"
@@ -10,7 +9,6 @@ define([
	redmicConfig
	, declare
	, lang
	, TabsDisplayer
	, TemplateInfo
	, TemplateProjects
	, _ActivityBase
@@ -37,21 +35,12 @@ define([
				info: this._infoConfig({
					template: TemplateInfo
				}),
				additionalInfo: {
					width: 3,
					height: 6,
					type: TabsDisplayer,
					props: {
						title: this.i18n.additionalInfo,
						childTabs: [
							this._organisationsConfig(),
							this._platformsConfig(),
							this._contactsConfig(),
							this._documentsConfig(),
							this._setAdditionalConfig(this.i18n.projects, TemplateProjects, this.viewPathsWidgets.projects)
						]
					}
				}
				additionalInfo: this._setAdditionalConfig(this.i18n.projects, TemplateProjects,
					this.viewPathsWidgets.projects),
				organisationList: this._organisationsConfig(),
				platformList: this._platformsConfig(),
				contactList: this._contactsConfig(),
				documentList: this._documentsConfig()
			}, this.widgetConfigs || {}]);
		}
	});
+7 −21
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@ define([
	"app/redmicConfig"
	, "dojo/_base/declare"
	, "dojo/_base/lang"
	, "redmic/modules/layout/TabsDisplayer"
	, "templates/ActivityList"
	, "templates/ProjectInfo"
	, "./_ActivityBase"
@@ -10,7 +9,6 @@ define([
	redmicConfig
	, declare
	, lang
	, TabsDisplayer
	, TemplateActivities
	, TemplateInfo
	, _ActivityBase
@@ -37,25 +35,13 @@ define([
				info: this._infoConfig({
					template: TemplateInfo
				}),
				additionalInfo: {
					width: 3,
					height: 6,
					type: TabsDisplayer,
					props: {
						title: this.i18n.additionalInfo,
						childTabs: [
							this._organisationsConfig(),
							this._platformsConfig(),
							this._contactsConfig(),
							this._documentsConfig(),
							this._setAdditionalConfig(
								this.i18n.activities,
								TemplateActivities,
				additionalInfo: this._setAdditionalConfig(this.i18n.activities, TemplateActivities,
					this.viewPathsWidgets.activities
							)
						]
					}
				}
				),
				organisationList: this._organisationsConfig(),
				platformList: this._platformsConfig(),
				contactList: this._contactsConfig(),
				documentList: this._documentsConfig()
			}, this.widgetConfigs || {}]);
		}
	});
+23 −15
Original line number Diff line number Diff line
@@ -59,9 +59,11 @@ define([
		_organisationsConfig: function() {

			return {
				title: this.i18n.organisations,
				width: 3,
				height: 2,
				type: declare([ListImpl, _Framework, _ButtonsInRow]),
				props: {
					title: this.i18n.organisations,
					target: this.organisationTarget,
					template: TemplateOrganisation,
					bars: [{
@@ -85,9 +87,11 @@ define([
		_platformsConfig: function() {

			return {
				title: this.i18n.platforms,
				width: 3,
				height: 2,
				type: declare([ListImpl, _Framework, _ButtonsInRow]),
				props: {
					title: this.i18n.platforms,
					target: this.platformTarget,
					template: TemplatePlatform,
					bars: [{
@@ -111,9 +115,11 @@ define([
		_contactsConfig: function() {

			return {
				title: this.i18n.contacts,
				width: 3,
				height: 2,
				type: declare([ListImpl, _Framework]),
				props: {
					title: this.i18n.contacts,
					target: this.contactTarget,
					template: TemplateContacts,
					bars: [{
@@ -126,9 +132,11 @@ define([
		_documentsConfig: function() {

			return {
				title: this.i18n.documents,
				width: 3,
				height: 2,
				type: declare([ListImpl, _Framework, _ButtonsInRow]),
				props: {
					title: this.i18n.documents,
					target: this.documentTarget,
					template: TemplateDocuments,
					bars: [{
@@ -157,9 +165,11 @@ define([
		_setAdditionalConfig: function(title, template, href) {

			return {
				title: title,
				width: 3,
				height: 2,
				type: declare([ListImpl, _Framework, _ButtonsInRow, _Filter]),
				props: {
					title: title,
					bars: [{
						instance: Total
					},{
@@ -200,13 +210,11 @@ define([

		_clearModules: function() {

			this._publish(this._widgets.info.getChannel("CLEAR"));

			var items = this.widgetConfigs.additionalInfo.props.childTabs.length;

			for (var i = 0; i < items; i++) {
				this._publish(this._widgets.additionalInfo.getChildChannel("childInstances." + i, "CLEAR"));
			}
			this._publish(this._getWidgetInstance('info').getChannel('CLEAR'));
			this._publish(this._getWidgetInstance('organisationList').getChannel('CLEAR'));
			this._publish(this._getWidgetInstance('contactList').getChannel('CLEAR'));
			this._publish(this._getWidgetInstance('platformList').getChannel('CLEAR'));
			this._publish(this._getWidgetInstance('documentList').getChannel('CLEAR'));
		},

		_refreshModules: function() {
@@ -227,13 +235,13 @@ define([
			var target = lang.replace(this._targetListRank, {
					id: this.pathVariableId
				}),
				pathChild = 'childInstances.' + this._indexListRank;
				widgetInstance = this._getWidgetInstance('additionalInfo');

			this._publish(this._widgets.additionalInfo.getChildChannel(pathChild, "UPDATE_TARGET"), {
			this._publish(widgetInstance.getChannel("UPDATE_TARGET"), {
				target: target
			});

			this._publish(this._widgets.additionalInfo.getChildChannel(pathChild + ".filter", "REFRESH"));
			this._publish(widgetInstance.getChildChannel("filter", "REFRESH"));
		},

		_itemAvailable: function(res) {
+0 −1
Original line number Diff line number Diff line
@@ -272,7 +272,6 @@ define({
	, "medium": "Media"
	, "high": "Alta"

	, "helpTextActivityDetails": "Actualmente, la descarga de datos desde REDMIC no está disponible. Sin embargo, los datos son públicos y puede solicitarlos a través del "
	, "zoomLevelTooLowForCurrentMode": "Aumente el zoom para mostrar información en el modo actual"
	, "noLegendAvailable": "Esta capa no tiene leyenda disponible"

Loading