Commit 152dbab1 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Unifica y limpia catálogo de servicios OGC

parent 6cd5e2f8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -93,8 +93,8 @@ define({
		"description": "{i18n.metaAtlasDescription}."
	},
	"/service-ogc-catalog": {
		"title": "{i18n.metaServiceOgcCatalogTitle}",
		"description": "{i18n.metaServiceOgcCatalogDescription}."
		"title": "{i18n.metaOgcServiceCatalogTitle}",
		"description": "{i18n.metaOgcServiceCatalogDescription}."
	},
	"/service-ogc-catalog/service-ogc-info/{id}": {
		"title": "{i18n.metaServiceOgcCatalogServiceOgcInfoIdTitle} '{title}'",
+15 −14
Original line number Diff line number Diff line
define([
	"app/base/views/extensions/_OnShownAndRefresh"
	, "app/designs/base/_Main"
	, "app/designs/base/_ServiceOGC"
	, "app/designs/textSearchList/Controller"
	, "app/designs/textSearchList/layout/BasicTopZone"
	, "dojo/_base/declare"
	, "dojo/_base/lang"
	, "src/component/browser/HierarchicalImpl"
	, "templates/ServiceOGCList"
	'app/base/views/extensions/_OnShownAndRefresh'
	, 'app/designs/base/_Main'
	, 'src/catalog/ogcService/_OgcService'
	, 'app/designs/textSearchList/Controller'
	, 'app/designs/textSearchList/layout/BasicTopZone'
	, 'dojo/_base/declare'
	, 'dojo/_base/lang'
	, 'src/component/browser/HierarchicalImpl'
	, 'templates/ServiceOGCList'
], function(
	_OnShownAndRefresh
	, _Main
	, _ServiceOGC
	, _OgcService
	, Controller
	, Layout
	, declare
@@ -19,14 +19,15 @@ define([
	, HierarchicalImpl
	, templateList
) {
	return declare([Layout, Controller, _Main, _ServiceOGC, _OnShownAndRefresh], {

	return declare([Layout, Controller, _Main, _OgcService, _OnShownAndRefresh], {
		//	summary:
		//		Vista principal de ServiceOGC bajo este diseño.
		//		Vista de catálogo de servicios OGC con diseño reducido (sin filtro por facets).

		constructor: function(args) {

			this.config = {
				ownChannel: "catalogOGC",
				ownChannel: 'catalogOGC',
				title: this.i18n.layersCatalog
			};

+110 −0
Original line number Diff line number Diff line
define([
	"app/designs/base/_Main"
	, "app/designs/base/_ServiceOGC"
	'app/designs/base/_Main'
	, 'src/catalog/ogcService/_OgcService'
	, 'app/base/views/extensions/_AddCompositeSearchInTooltipFromTextSearch'
	, "app/designs/textSearchFacetsList/Controller"
	, "app/designs/textSearchFacetsList/Layout"
	, 'app/designs/textSearchFacetsList/Controller'
	, 'app/designs/textSearchFacetsList/Layout'
	, 'src/redmicConfig'
	, "dojo/_base/declare"
	, "dojo/_base/lang"
	, "src/component/browser/HierarchicalImpl"
	, "src/component/browser/bars/Order"
	, "templates/ServiceOGCList"
	, 'dojo/_base/declare'
	, 'dojo/_base/lang'
	, 'src/component/browser/HierarchicalImpl'
	, 'src/component/browser/bars/Order'
	, 'templates/ServiceOGCList'
], function(
	_Main
	, _ServiceOGC
	, _OgcService
	, _AddComposite
	, Controller
	, Layout
@@ -23,22 +23,51 @@ define([
	, Order
	, templateList
) {
	return declare([Layout, Controller, _Main, _ServiceOGC, _AddComposite], {

	return declare([Layout, Controller, _Main, _OgcService, _AddComposite], {
		//	summary:
		//		Extensión para establecer la configuración de las vistas de .
		//	description:
		//
		//		Vista de catálogo de servicios OGC.

		constructor: function(args) {

			this.config = {
				title: this.i18n["service-ogc"],
				title: this.i18n.ogcServiceCatalogView,
				ownChannel: 'serviceOGCCatalog',
				target: redmicConfig.services.atlasLayer
			};

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

		_setConfigurations: function() {

			this.browserConfig = this._merge([{
				rowConfig: {
					buttonsConfig: {
						listButton: [{
							icon: 'fa-info-circle',
							btnId: 'details',
							href: this.viewPaths.serviceOGCCatalogDetails,
							condition: 'urlSource',
							title: 'info'
						}]
					}
				},
				bars: []
			}, this.browserConfig || {}]);

			this.filterConfig = this._merge([{
				initQuery: {
					size: null,
					from: null/*,
					sorts: [{
						field: 'alias',
						order: 'ASC'
					}]*/
				}
			}, this.filterConfig || {}]);
		},

		_setMainConfigurations: function() {

			this.inherited(arguments);
@@ -60,11 +89,11 @@ define([
				}],
				orderConfig: {
					options: [
						{value: "name"},
						{value: "title"},
						{value: "themeInspire"},
						{value: "protocols"}/*,
						{value: "updated"}*/
						{value: 'name'},
						{value: 'title'},
						{value: 'themeInspire'},
						{value: 'protocols'}/*,
						{value: 'updated'}*/
					]
				}
			}, this.browserConfig || {}]);
+37 −38
Original line number Diff line number Diff line
define([
	"app/base/views/extensions/_EditionWizardView"
	, "app/base/views/extensions/_FormInDialogView"
	'app/base/views/extensions/_EditionWizardView'
	, 'app/base/views/extensions/_FormInDialogView'
	, 'src/redmicConfig'
	, "dojo/_base/declare"
	, "dojo/_base/lang"
	, "dojo/aspect"
	, 'dojo/_base/declare'
	, 'dojo/_base/lang'
	, 'dojo/aspect'
], function(
	_EditionWizardView
	, _FormInDialogView
@@ -13,63 +13,62 @@ define([
	, lang
	, aspect
) {

	return declare([_EditionWizardView, _FormInDialogView], {
		//	summary:
		//		Extensión para las vistas de edición de datos relativos a capas.
		//	description:
		//		Añade funcionalidades de edición a la vista.
		//		Ha de declararse junto con una extensión que aporte los métodos
		//		en los que se apoya.
		//		Extensión de vista de catálogo de servicios OGC para añadir funcionalidad relativa a la edición de
		//		registros.

		constructor: function(args) {

			this.config = {
				addPath: this.viewPaths.ogcServiceAdd,
				editionLayerEvents: {
					UPDATE: "update"
					UPDATE: 'update'
				},
				editionLayerActions: {}
			};

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

			aspect.before(this, "_mixEventsAndActions", lang.hitch(this, this._mixEditionLayerEventsAndActions));
			aspect.before(this, "_afterSetConfigurations", lang.hitch(this, this._setEditionLayerConfigurations));
			aspect.before(this, '_mixEventsAndActions', lang.hitch(this, this._mixEditionLayerEventsAndActions));
			aspect.before(this, '_afterSetConfigurations', lang.hitch(this, this._setEditionLayerConfigurations));
		},

		_setEditionLayerConfigurations: function() {

			this.formConfig = this._merge([{
				template: "maintenance/views/templates/forms/CategoryLayer",
				template: 'maintenance/views/templates/forms/CategoryLayer',
				modelTarget: redmicConfig.services.atlasCategoryEdition
			}, this.formConfig || {}]);

			this.listButtonsEdition = [{
				groupId: "edition",
				groupId: 'edition',
				icons:[{
					icon: "fa-refresh",
					btnId: "update",
					title: "update",
					icon: 'fa-refresh',
					btnId: 'update',
					title: 'update',
					returnItem: true,
					option: "default",
					condition: "urlSource"
					option: 'default',
					condition: 'urlSource'
				},{
					icon: "fa-edit",
					btnId: "edit",
					title: "edit",
					icon: 'fa-edit',
					btnId: 'edit',
					title: 'edit',
					href: this.viewPaths.serviceOGCEdit,
					option: "default",
					condition: "urlSource"
					option: 'default',
					condition: 'urlSource'
				},{
					icon: "fa-edit",
					btnId: "categoryEdit",
					title: "edit",
					icon: 'fa-edit',
					btnId: 'categoryEdit',
					title: 'edit',
					returnItem: true,
					option: "default",
					option: 'default',
					condition: this._checkItemIsCategory
				},{
					icon: "fa-trash-o",
					btnId: "remove",
					title: "remove",
					icon: 'fa-trash-o',
					btnId: 'remove',
					title: 'remove',
					returnItem: true
				}]
			}];
@@ -90,8 +89,8 @@ define([

			if (this.editor) {
				this.subscriptionsConfig.push({
					channel: this.editor.getChannel("SUBMITTED"),
					callback: "_subSubmitted"
					channel: this.editor.getChannel('SUBMITTED'),
					callback: '_subSubmitted'
				});
			}
		},
@@ -103,10 +102,10 @@ define([
			if (this.editor) {
				this.publicationsConfig.push({
					event: 'SAVED',
					channel: this.editor.getChannel("SAVED")
					channel: this.editor.getChannel('SAVED')
				},{
					event: 'SHOW_FORM',
					channel: this.editor.getChannel("SHOW")
					channel: this.editor.getChannel('SHOW')
				});
			}
		},
+7 −7
Original line number Diff line number Diff line
define([
	"dojo/_base/declare"
	, "dojo/_base/lang"
	, "src/component/store/RequestJoiner/AtlasDataImpl"
	'dojo/_base/declare'
	, 'dojo/_base/lang'
	, 'src/component/store/RequestJoiner/AtlasDataImpl'
	, 'templates/FilterServiceOGCForm'
], function(
	declare
@@ -12,13 +12,13 @@ define([

	return declare(null, {
		//	summary:
		//		Base de vistas principales de ServiceOGC (varios diseños).
		//		Base de vistas principales de servicios OGC (varios diseños).

		constructor: function(args) {

			this.config = {
				pathProperty: "path",
				pathSeparator: ".",
				pathProperty: 'path',
				pathSeparator: '.',
				_atlasDataTarget: 'atlasData',

				compositeConfig: {
@@ -71,7 +71,7 @@ define([

		_requestAtlasDataOnRefresh: function() {

			this._publish(this._buildChannel(this.queryChannel, "serialize"));
			this._publish(this._buildChannel(this.queryChannel, 'serialize'));
		},

		_requestAtlasData: function(queryObj) {
Loading