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

Corrige aparición de restos tras ocultar vistas

A causa de emplear 'this.containerNode' como nodo a mostrar para los
módulos que reciben categoría de vistas, algunos de ellos dejaban tras
de si su nodo de nivel superior, 'this.domNode'.
Esto producía que se entremezclaran algunos contenidos, e impedía que
los módulos se pudieran extender con '_View' en cualquier orden
(posición dentro del array que recibe 'declare'). Ahora se puede añadir
la extensión por la derecha sin problema.
parent 92f43349
Loading
Loading
Loading
Loading
+3 −18
Original line number Diff line number Diff line
@@ -16,25 +16,18 @@ define([

	return declare([_ListenRequestError, _ViewHandle, _SettingsHandler], {
		//	summary:
		//		Base común para todas los módulos usados como vistas.

		//	region: String
		//		Región del ContentPane.
		//	baseClass: String
		//		Clase base del ContentPane.
		//		Extensión común para todas los módulos usados como vistas. Se adjunta automáticamente cuando la
		//		navegación a través de la app requiere un módulo como contenido principal a mostrar.

		constructor: function(args) {

			this.config = {
				ownChannel: "view",
				viewActions: {
					PUT_META_TAGS: "putMetaTags"
				},
				viewEvents: {
					PUT_META_TAGS: "putMetaTags"
				},

				title: 'View'
				}
			};

			lang.mixin(this, this.config, args);
@@ -74,9 +67,6 @@ define([

		_afterShowView: function(request) {

			//this.startup();
			//this.resize();
			//this._publish(this._buildChannel(this.loadingChannel, this.actions.LOADED));
			this._putMetaTags();
		},

@@ -96,11 +86,6 @@ define([
			}
		},

		_getNodeToShow: function() {

			return this.containerNode;
		},

		_goTo404: function() {

			window.location.href = "/404";
+2 −2
Original line number Diff line number Diff line
@@ -318,10 +318,10 @@ define([
			require(["app" + moduleItem.internPath + "View"], lang.hitch(this, function(ModuleView) {

				// Creamos el módulo
				var moduleInstance = new declare([_View, ModuleView])({
					perms: moduleItem.perms,
				var moduleInstance = new declare([ModuleView, _View])({
					parentChannel: this.parentChannel,
					ownChannel: this.viewSeparator + moduleItem.id,
					perms: moduleItem.perms,
					pathVariableId: this.pathVariableId !== "$1" ? this.pathVariableId : null
				});