Commit 75ab8fe0 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Añade visor STAC y generaliza embed

Crea nuevo diseño genérico para elementos incrustados.

Agrega entrada para nuevo visor, con STAC browser incrustado a pantalla
completa. Hace uso del nuevo diseño y de una plantilla genérica para
incrustar objetos externos.

Emplea nuevo template de incrustado genérico también para los dashboards
de tiempo real.

Agrega nuevas traducciones.

Actualiza submódulos.

Fix #69.
parent cf054a55
Loading
Loading
Loading
Loading
+72 −0
Original line number Diff line number Diff line
define([
	'app/designs/base/_Controller'
	, 'dojo/_base/declare'
	, 'dojo/_base/lang'
	, 'redmic/modules/base/_Store'
	, 'redmic/modules/layout/templateDisplayer/TemplateDisplayer'
	, 'templates/DefaultEmbeddedContent'
], function (
	_Controller
	, declare
	, lang
	, _Store
	, TemplateDisplayer
	, EmbeddedContentTemplate
) {

	return declare([_Controller, _Store], {
		//	summary:
		//		Controlador de diseño para incrustar contenido.

		constructor: function(args) {

			this.config = {
				controllerEvents: {
				},
				controllerActions: {
				},

				embeddedContentType: 'text/html',
				embeddedContentClass: 'embeddedContent',
				embeddedContentUrl: null,

				_templateDisplayerTarget: 'embeddedContentTarget'
			};

			lang.mixin(this, this.config, args);
		},

		_initializeController: function() {

			this._templateDisplayer = new TemplateDisplayer({
				parentChannel: this.getChannel(),
				template: EmbeddedContentTemplate,
				target: this._templateDisplayerTarget
			});
		},

		postCreate: function() {

			this.inherited(arguments);

			this._publish(this._templateDisplayer.getChannel('SHOW'), {
				node: this._getNodeToShow()
			});

			this._updateEmbeddedContent(this.embeddedContentUrl);
		},

		_updateEmbeddedContent: function(embeddedContentUrl) {

			this._emitEvt('INJECT_ITEM', {
				data: {
					objectType: this.embeddedContentType,
					url: embeddedContentUrl,
					className: this.embeddedContentClass
				},
				target: this._templateDisplayerTarget
			});
		},

	});
});
+23 −0
Original line number Diff line number Diff line
define([
	'app/designs/base/_Layout'
	, 'dojo/_base/declare'
	, 'dojo/_base/lang'
], function(
	_Layout
	, declare
	, lang
) {

	return declare(_Layout, {
		//	summary:
		//		Layout de diseño para incrustar contenido

		constructor: function(args) {

			this.config = {
			};

			lang.mixin(this, this.config, args);
		}
	});
});
+2 −0
Original line number Diff line number Diff line
@@ -842,6 +842,7 @@ define({
	, "modeLabel": "Contenido de la cuadrícula"
	, "pressHere": "Pulse aquí"
	, "successResetting": "Recuperación de contraseña realizada con éxito"
	, "stac-browser": "STAC"

	, "monday": "lunes"
	, "mondayShort": "lun"
@@ -1400,6 +1401,7 @@ define({
	, "metaConfirmRecoverPasswordTitle": "Crear nueva contraseña"
	, "metaConfirmRecoverPasswordDescription": "Utilidad de asignación de nueva contraseña para usuarios registrados en REDMIC que lo han solicitado"

	, "missingEmbeddedContent": "Contenido incrustado no disponible"

	// Para capas que no se pueden cambiar las keys
	, "descript_1": "Descripción"
+2 −0
Original line number Diff line number Diff line
@@ -847,6 +847,7 @@ define({
		, "noCita": "No citations for this grid size"
		, "pressHere": "Press here"
		, "successResetting": "Password recovery completed successfully"
		, "stac-browser": "STAC"

		, "monday": "Monday"
		, "mondayShort": "Mon"
@@ -1404,6 +1405,7 @@ define({
		, "metaConfirmRecoverPasswordTitle": "Create new password"
		, "metaConfirmRecoverPasswordDescription": "Utility for assigning a new password for users registered in REDMIC who have requested it"

		, "missingEmbeddedContent": "Not available embedded content"

		//Para capas que no se pueden cambiar las keys
		, "descript_1": "Description"
+7 −5
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ define([
	, "redmic/modules/map/_PlaceNamesButton"
	, "templates/RealTimeInfo"
	, "templates/SitePopup"
	, "templates/SurveyStationDashboard"
	, "templates/DefaultEmbeddedContent"
], function(
	_Main
	, MultiWindRoseChartWithToolbar
@@ -41,7 +41,7 @@ define([
	, _PlaceNamesButton
	, RealTimeInfo
	, SitePopupTemplate
	, SurveyStationDashboardTemplate
	, EmbeddedContentTemplate
){
	return declare([Layout, Controller, _Main, _AddBasicTitle], {
		//	summary:
@@ -643,7 +643,7 @@ define([
					type: TemplateDisplayer,
					props: {
						title: this.i18n.dashboard,
						template: SurveyStationDashboardTemplate,
						template: EmbeddedContentTemplate,
						target: this.dashboardTarget
					}
				},
@@ -695,7 +695,7 @@ define([
		_refreshChildrenDataModules: function() {

			this._publish(this._widgets.dashboard.getChannel('CHANGE_TEMPLATE'), {
				template: SurveyStationDashboardTemplate
				template: EmbeddedContentTemplate
			});
		},

@@ -787,7 +787,9 @@ define([

			this._emitEvt('INJECT_ITEM', {
				data: {
					url: this.dashboardUrl
					objectType: 'text/html',
					url: this.dashboardUrl,
					className: 'kibana-dashboard'
				},
				target: this.dashboardTarget
			});
Loading