Commit f418acaf authored by CarlosGC1989's avatar CarlosGC1989
Browse files

Soluciona issues con seleción de listado

Arregla errores con la selección del listado.
Soluciona peticiones repetidas de Atlas, ya que dependia de la selección.

Fix #12
Fix #14
parent 92ee1a21
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@ define([
	, "redmic/modules/base/_Module"
	, "redmic/modules/base/_Show"
	, "redmic/modules/browser/bars/Total"
	, "redmic/modules/browser/_Select"
	, "app/base/views/extensions/_LocalSelectionView"
], function (
	_Controller
@@ -20,7 +19,6 @@ define([
	, _Module
	, _Show
	, Total
	, _Select
	, _LocalSelectionView
){
	return declare([_Module, _Controller, _Show, _LocalSelectionView, _Store], {
@@ -53,10 +51,8 @@ define([
			});

			this.browserLeftConfig = this._merge([this.browserConfig, {
				browserExts: [_Select],
				title: this.title,
				browserConfig: {
					simpleSelection: true,
					noDataMessage: null
				}
			}, this.browserLeftConfig || {}]);
+1 −1
Original line number Diff line number Diff line
@@ -164,7 +164,7 @@ define([
		_subRefresh: function(res) {

			if (res && res.initData && this._initData) {
				this._dataAvailable(lang.clone(this._initData));
				this._addData(lang.clone(this._initData));
			}
		},

+11 −1
Original line number Diff line number Diff line
@@ -127,6 +127,8 @@ define([
				return;
			}

			this._selection[idProperty] = true;

			this._emitEvt('SELECTED_ROW', {
				idProperty: idProperty
			});
@@ -146,6 +148,8 @@ define([
				return;
			}

			delete this._selection[idProperty];

			this._emitEvt('DESELECTED_ROW', {
				idProperty: idProperty
			});
@@ -174,7 +178,7 @@ define([

			this._emitEvt('CLEAR_SELECTION_ROWS');

			this._getSelections();
			this._selection = {};
		},

		_getItemToSelect: function(ids) {
@@ -211,6 +215,10 @@ define([
			var selections = req.selections,
				selection = selections && selections[this._getSelectionTarget()] || {};

			if (!selections) {
				return;
			}

			this._selection = selection.items || {};
		},

@@ -218,6 +226,8 @@ define([

			var idProperty = args[0];

			console.log(this._selection);

			if (this._selection[idProperty]) {
				this._selectRow(idProperty);
			}
+1 −6
Original line number Diff line number Diff line
@@ -71,11 +71,6 @@ define([
			}, this.selectionBoxConfig || {}]);
		},

		_setShowOwnCallbacksForEvents: function () {

			this._onEvt('ANCESTOR_SHOW', lang.hitch(this, this._ancestorShownSelectionBox));
		},

		_subSelectedRow: function(res) {

		},
@@ -171,7 +166,7 @@ define([
			!this.omitShowSelectedOnly && this._createSelect();
		},

		_ancestorShownSelectionBox: function(request) {
		_afterShow: function(request) {

			var target = this.selectionTarget ? this.selectionTarget : this.target;