Commit 89cb773b authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Elimina acción REQUEST_FILTER relativa a Filter

El módulo Filter parecía replicar funcionalidades entre su acción
REQUEST_FILTER y SERIALIZED, puede que para contemplar casos en los que
no hubiera modelo que serializar previamente. Si esto es necesario,
revisar para hacer un bypass de la petición de serializar, pero ir por
el mismo camino que si hubiera modelo.
parent bbf7a6ae
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ define([
			lang.mixin(this, this.config, args);

			aspect.after(this, "_setConfigurations", lang.hitch(this, this._setTrackingByFilterConfigurations));
			aspect.after(this, "_defineSubscriptions", lang.hitch(this, this._defineTrackingByFilterSubscriptions));
			//aspect.after(this, "_defineSubscriptions", lang.hitch(this, this._defineTrackingByFilterSubscriptions));
		},

		_setTrackingByFilterConfigurations: function() {
@@ -38,13 +38,13 @@ define([
			}, this.filterConfig || {}]);
		},

		_defineTrackingByFilterSubscriptions: function () {
		/*_defineTrackingByFilterSubscriptions: function () {

			this.subscriptionsConfig.push({
				channel: this.filter.getChannel("REQUEST_FILTER"),
				callback: "_subRequestFilter"
			});
		},
		},*/

		postCreate: function() {

@@ -58,10 +58,10 @@ define([
			this._serializeFilter();
		},

		_subRequestFilter: function(obj) {
		/*_subRequestFilter: function(obj) {

			this._serializeFilter();
		},
		},*/

		_serializeFilter: function() {

+2 −2
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ define([
				channel: this.filter.getChannel("CHANGED_MODEL"),
				callback: "_subChangedModelFilter"
			},{
				channel: this.filter.getChannel("REQUEST_FILTER"),
				channel: this.filter.getChannel("SERIALIZE"),
				callback: "_subRequestFilter"
			});
		},
@@ -208,7 +208,7 @@ define([
		_subRequestFilter: function(obj) {

			for (var key in this._layerInstances)
				this._publish(this._layerInstances[key].getChildChannel('filter', "REQUEST_FILTER"), obj);
				this._publish(this._layerInstances[key].getChildChannel('filter', "SERIALIZE"), obj);
		},

		_select: function(item) {
+1 −1
Original line number Diff line number Diff line
@@ -158,7 +158,7 @@ define([
				channel: this.filter.getChannel("CHANGED_MODEL"),
				callback: "_subChangedModelFilter"
			},{
				channel: this.filter.getChannel("REQUEST_FILTER"),
				channel: this.filter.getChannel("SERIALIZED"),
				callback: "_subRequestFilter"
			});
		},
+6 −17
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ define([
				filterActions: {
					ADDED_TO_QUERY: 'addedToQuery',
					SERIALIZED: 'serialized',
					REQUEST_FILTER: 'requestFilter',
					//REQUEST_FILTER: 'requestFilter',
					ADD_TO_QUERY: 'addToQuery',
					REFRESH: 'refresh',
					UPDATE_TARGET: 'updateTarget'
@@ -43,7 +43,6 @@ define([
			aspect.before(this, '_beforeInitialize', lang.hitch(this, this._initializeFilter));
			aspect.after(this, '_defineSubscriptions', lang.hitch(this, this._defineFilterSubscriptions));
			aspect.after(this, '_definePublications', lang.hitch(this, this._defineFilterPublications));
			aspect.after(this, '_setOwnCallbacksForEvents', lang.hitch(this, this._setFilterOwnCallbacksForEvents));
		},

		_mixFilterEventsAndActions: function() {
@@ -86,9 +85,9 @@ define([
			},{
				channel: this._buildChannel(queryChannel, this.actions.SERIALIZED),
				callback: '_subFilterSerialized'
			},{ // TODO: REQUEST_FILTER parece lo mismo que SERIALIZE, hacer que todo vaya por SERIALIZE
			/*},{ // TODO: REQUEST_FILTER parece lo mismo que SERIALIZE, hacer que todo vaya por SERIALIZE
				channel: this._buildChannel(queryChannel, this.actions.REQUEST_FILTER),
				callback: '_subFilterSerialized'
				callback: '_subFilterSerialized'*/
			});
		},

@@ -114,11 +113,6 @@ define([
			});
		},

		_setFilterOwnCallbacksForEvents: function() {

			this._onEvt('QUERY_CHANNEL_SET', lang.hitch(this, this._onQueryChannelUpdated));
		},

		_subAddedToQuery: function(res) {

			this._emitEvt('ADDED_TO_QUERY', res);
@@ -145,23 +139,18 @@ define([
			this._emitEvt('UPDATE_TARGET', obj);
		},

		_onQueryChannelUpdated: function(obj) {
		_onQueryChannelPropSet: function(evt) {

			this._disconnectFromFilter(obj.oldValue);
			this._connectToFilter(obj.value);
		},

		_onQueryChannelPropSet: function(evt) {

			this._onQueryChannelUpdated(evt);
		},

		_disconnectFromFilter: function(oldQueryChannel) {

			this._removeSubscriptions([
				this._buildChannel(oldQueryChannel, this.actions.ADDED_TO_QUERY),
				this._buildChannel(oldQueryChannel, this.actions.SERIALIZED),
				this._buildChannel(oldQueryChannel, this.actions.REQUEST_FILTER)
				this._buildChannel(oldQueryChannel, this.actions.SERIALIZED)/*,
				this._buildChannel(oldQueryChannel, this.actions.REQUEST_FILTER)*/
			]);
			this._removePublications([
				this._buildChannel(oldQueryChannel, this.actions.ADD_TO_QUERY),
+5 −5
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ define([
					AVAILABLE_FACETS: "availableFacets",
					RESET: "reset",
					RESETTED: "resetted",
					REQUEST_FILTER: "requestFilter",
					//REQUEST_FILTER: "requestFilter",
					CHANGED_MODEL: "changedModel",
					DESERIALIZE: "deserialize",
					SERIALIZE: "serialize",
@@ -83,9 +83,9 @@ define([
			},{
				channel: this.getChannel("REFRESH"),
				callback: "_subRefresh"
			},{
			/*},{
				channel: this.getChannel("REQUEST_FILTER"),
				callback: "_subRequestFilter"
				callback: "_subRequestFilter"*/
			},{
				channel: this.getChannel("SERIALIZE"),
				callback: "_subSerialize"
@@ -309,10 +309,10 @@ define([
			this._request(req);
		},

		_subRequestFilter: function(req) {
		/*_subRequestFilter: function(req) {

			this._request(req);
		},
		},*/

		_request: function(req) {