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

Merge branch 'hotfix-MobileOptimizationBugs' into 'dev'

Hotfix mobile optimization bugs

See merge request redmic-project/client/web!72
parents 6b2a457f d9aad1fd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
{
  "name": "REDMIC",
  "version": "0.19.0",
  "version": "0.19.1",
  "author": "REDMIC",
  "homepage": "https://gitlab.com/redmic-project/client/web/blob/master/README.md",
  "description": "Integrated marine data repository of Canary Islands - Client",
+3 −74
Original line number Diff line number Diff line
define([
	"app/designs/mapWithSideContent/Controller"
	, "app/designs/mapWithSideContent/layout/MapAndContent"
	, "dijit/layout/ContentPane"
	, "dijit/layout/StackContainer"
	, "dojo/_base/declare"
	, "dojo/_base/lang"
	, "dojo/aspect"
	, "redmic/map/OpenLayers"
	, "redmic/modules/map/_LeafletDraw"
	, "redmic/modules/map/layer/WmsLayerImpl"
], function(
	Controller
	, Layout
	, ContentPane
	, StackContainer
	, declare
	, lang
	, aspect
	, OpenLayers
	, _LeafletDraw
	, WmsLayerImpl
) {

	return declare([Layout, Controller], {
		//	summary:
		//		Vista base para añadir geometría.
@@ -34,73 +25,16 @@ define([
				mapExts: [_LeafletDraw]
			};

			aspect.before(this, "_afterSetConfigurations", lang.hitch(this, this._setMainConfigurations));
			aspect.after(this, "_beforeInitialize", lang.hitch(this, this._initializeMain));
			aspect.before(this, "_beforeShow", lang.hitch(this, this._beforeShowStep));

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

		_setMainConfigurations: function() {

			this.batimetriasLayerConfig = this._merge([{
				parentChannel: this.getChannel(),
				layer: OpenLayers.build({
					type: "wms",
					url: "https://atlas.redmic.es/geoserver/el/wms",
					props: {
						layers: ["batimetriaGlobal"],
						format: "image/png",
						transparent: true,
						tiled: true
					}
				})
			}, this.batimetriasLayerConfig || {}]);
		},

		_initializeMain: function() {

			this.batimetriasLayerConfig.mapChannel = this.map.getChannel();

			this.batimetriasLayer = new WmsLayerImpl(this.batimetriasLayerConfig);
		},

		postCreate: function() {

			this.inherited(arguments);

			this._publish(this.map.getChannel("ADD_LAYER"), {
				layer: this.batimetriasLayer,
				layerId: "batimetrias",
				layerLabel: this.i18n.bathymetry,
				optional: true
			});

			this.leftContainer = new ContentPane({
				'class': 'rightZone',
				region: "center"
			});

			this.leftNode = new declare(StackContainer)({
				region: "left",
				'class': "mediumSolidContainer sideStackContainer"
			});

			this.addChild(this.leftNode);

			this.leftNode.addChild(this.leftContainer);

			this._loadForm();
		},

		_beforeShowStep: function() {

			this._publish(this.map.getChannel("SET_CENTER_AND_ZOOM"), {
				center: [28.5, -16.0],
				zoom: 7
			});
		},

		_instanceDataToResult: function(data) {

			this._publish(this.viewForm.getChannel("DATA_TO_RESULT"), {
@@ -108,11 +42,6 @@ define([
			});
		},

		_getNodeToShow: function() {

			return this.containerNode;
		},

		_doFlush: function() {

			this._publish(this.viewForm.getChannel("SUBMIT"));
@@ -152,7 +81,7 @@ define([
			this._once(this.viewForm.getChannel("SHOWN"), lang.hitch(this, this._onceFormShown));

			this._publish(this.viewForm.getChannel("SHOW"), {
				node: this.leftContainer
				node: this.contentNode
			});
		},

+1 −2
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@ define([

			this.config = {
				label: this.i18n.info,
				copy: SelectStationByActivity,

				ownChannel: "describeSite"
			};
@@ -146,7 +145,7 @@ define([
				}
			}, this.copyConfig || {}]);

			this.popupView = new declare([this.copy, _AddSelectionHandlerKeypad,
			this.popupView = new declare([SelectStationByActivity, _AddSelectionHandlerKeypad,
				_AdditionalKeyGetter]).extend(_ShowInPopup)(config);

			this._popupViewSubscription = this._setSubscription({
+4 −44
Original line number Diff line number Diff line
@@ -6,20 +6,16 @@ define([
	, "app/base/views/extensions/_LocalSelectionView"
	, "app/base/views/extensions/_OnShownAndRefresh"
	, "app/designs/mapWithSideContent/main/Geographic"
	, "dijit/layout/ContentPane"
	, "dijit/layout/TabContainer"
	, "dojo/_base/declare"
	, "dojo/_base/lang"
	, "dojo/aspect"
	, "redmic/modules/gateway/MapCenteringGatewayImpl"
	, "redmic/modules/browser/_Select"
	, "redmic/modules/browser/bars/Pagination"
	, "redmic/modules/layout/dataDisplayer/DataDisplayer"
	, "redmic/modules/map/Atlas"
	, "redmic/modules/map/layer/_Selectable"
	, "redmic/modules/map/layer/_SelectOnClick"
	, "redmic/modules/map/layer/GeoJsonLayerImpl"
	, "RWidgets/Utilities"
	//, "RWidgets/Utilities"
], function(
	_CompositeInTooltipFromIconKeypad
	, _EditionWizardView
@@ -28,21 +24,18 @@ define([
	, _LocalSelectionView
	, _OnShownAndRefresh
	, Geographic
	, ContentPane
	, TabContainer
	, declare
	, lang
	, aspect
	, MapCenteringGatewayImpl
	, _Select
	, Pagination
	, DataDisplayer
	, Atlas
	, _Selectable
	, _SelectOnClick
	, GeoJsonLayerImpl
	, Utilities
	//, Utilities
) {

	return declare([Geographic, _EditionWizardView, _CompositeInTooltipFromIconKeypad,
		_LocalSelectionView, _OnShownAndRefresh, _GetActivityData, _ListenActivityDataAndAccessByActivityCategory], {
		//	summary:
@@ -128,26 +121,6 @@ define([
			this.tabs.resize();
		},

		_createAtlas: function() {

			this.atlas = new Atlas({
				parentChannel: this.getChannel(),
				perms: this.perms,
				getMapChannel: lang.hitch(this.map, this.map.getChannel)
			});

			var cp = new ContentPane({
				title: this.i18n.themes,
				region:"center"
			});

			this._publish(this.atlas.getChannel("SHOW"), {
				node: cp.domNode
			});

			return cp;
		},

		_replaceVariablesInTargetAndPaths: function() {

			this.addPath = this._replaceVariablesInStringWithItem(this.addPath);
@@ -202,19 +175,6 @@ define([

			this.inherited(arguments);

			this.tabs = new TabContainer({
				tabPosition: "top",
				splitter: true,
				region: "left",
				'class': "mediumSolidContainer sideTabContainer borderRadiusTabContainer"
			});

			this.tabs.addChild(this.leftNode);
			this.tabs.addChild(this._createAtlas());

			this.tabs.placeAt(this.contentNode);
			this.tabs.startup();

			this._emitEvt('ADD_LAYER', {layer: this.geoJsonLayer});
		},

+5 −0
Original line number Diff line number Diff line
@@ -157,6 +157,11 @@ define([

		_onControllerShown: function() {

			if (this._getShown()) {
				this.packery.reloadItems();
				this._updateInteractive();
			}

			this._clearModules();
			this._refreshModules();
		},
Loading