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

Simplifica escucha de eventos globales y limpia

Escucha a nivel global, haciendo uso del objeto globalThis y el método
actual para añadir escuchas (la otra alternativa ya era obsoleta en
Internet Explorer 11).

Limpia comprobaciones de versión destinadas a Internet Explorer y
versiones antiguas de Edge.
parent 102b8a49
Loading
Loading
Loading
Loading
+4 −17
Original line number Diff line number Diff line
@@ -92,30 +92,17 @@ define([
			//	tags:
			//		private

			var gCtx = globalThis,
				dCtx = gCtx.document,
				listenMethod, eventPrefix;

			if (gCtx.addEventListener) {
				listenMethod = dCtx.addEventListener;
				eventPrefix = '';
			} else {
				listenMethod = dCtx.attachEvent;
				eventPrefix = 'on';
			}

			listenMethod.call(dCtx, eventPrefix + 'click', lang.hitch(this, this._evaluateClickEvt));
			listenMethod.call(gCtx, eventPrefix + 'popstate', lang.hitch(this, this._evaluatePopStateEvt));
			globalThis.addEventListener.call(globalThis, 'click', lang.hitch(this, this._evaluateClickEvt));
			globalThis.addEventListener.call(globalThis, 'popstate', lang.hitch(this, this._evaluatePopStateEvt));
		},

		_evaluateClickEvt: function(evt) {
		_evaluateClickEvt: function(event) {
			//	summary:
			//		Recibe eventos de click y, en caso de detectar un enlace de navegación interno, lo captura
			//	tags:
			//		private

			var event = evt || globalThis.event,
				targets = this._getClickTargets(event);
			var targets = this._getClickTargets(event);

			for (var i = 0; i < targets.length; i++) {
				var target = targets[i],
+2 −11
Original line number Diff line number Diff line
define([
	'alertify/alertify.min'
	, "app/designs/base/_Main"
	"app/designs/base/_Main"
	, "app/designs/mapWithSideContent/Controller"
	, "app/designs/mapWithSideContent/layout/MapAndContentAndTopbar"
	, 'src/redmicConfig'
	, 'd3/d3.min'
	, "dojo/_base/declare"
	, "dojo/_base/lang"
	, "dojo/has"
	, 'moment/moment.min'
	, "put-selector/put"
	, "RWidgets/Utilities"
@@ -22,15 +20,13 @@ define([
	, "src/component/map/layer/TrackingLayerImpl"
	, "src/component/mapQuery/QueryOnMap"
], function(
	alertify
	, _Main
	_Main
	, Controller
	, Layout
	, redmicConfig
	, d3
	, declare
	, lang
	, has
	, moment
	, put
	, Utilities
@@ -104,11 +100,6 @@ define([
			};

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

			if (has("edge") || has("trident") || has("ie")) {
				alertify.alert(this.i18n.browserPartiallySupported, this.i18n.browserPartiallySupportedMsg1 + ". " +
					this.i18n.browserPartiallySupportedMsg2 + ".<br><br>" + this.i18n.recommendBrowser + ".");
			}
		},

		_setMainConfigurations: function() {
+0 −5
Original line number Diff line number Diff line
@@ -407,11 +407,6 @@ define({

	, "alertRestartAction": "Pulse aquí para deshacer la acción"

	, "browserPartiallySupported": "Navegador soportado parcialmente"
	, "browserPartiallySupportedMsg1": "Su navegador no soporta todas las características presentes en este módulo"
	, "browserPartiallySupportedMsg2": "Puede continuar a pesar de ello, o usar un navegador diferente"
	, "recommendBrowser": "Le recomendamos utilizar 'Google Chrome' o 'Mozilla Firefox' para tener un soporte completo"

	, "categorizeLayer": "Categorizar capa"
	, "addLayersCategory": "Añadir categoría de capas"
	, "editLayersCategory": "Editando categoría de capas"
+0 −5
Original line number Diff line number Diff line
@@ -407,11 +407,6 @@ define({

		, "alertRestartAction": "Click here to undo the action"

		, "browserPartiallySupported": "Browser partially supported"
		, "browserPartiallySupportedMsg1": "Your browser does not support all the features present in this module"
		, "browserPartiallySupportedMsg2": "You can continue despite this, or use a different browser"
		, "recommendBrowser": "We recommend using 'Google Chrome' or 'Mozilla Firefox' to get full support"

		, "categorizeLayer": "Categorize layer"
		, "addLayersCategory": "Add layers category"
		, "editLayersCategory": "Edit layers category"