Commit 59c902a1 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Recupera selección mediante settings

Utiliza el target correcto (tras recuperar su valor con variables) para
evaluar el tipo de selección a usar.
Corrige construcción de path de los elementos al borrarlos desde el
listado secundario del Atlas.
parent 86fa7d7f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ define([
				target: [redmicConfig.services.atlasLayer, redmicConfig.services.atlasCategory],
				selectionTarget: redmicConfig.services.atlasLayerSelection,
				pathSeparator: ".",
				pathProperty: "path",
				parentProperty: "parent",
				layerIdSeparator: "_",
				themeSeparator: "-",
				showBrowserAnimationClass: "animated fadeIn",
@@ -771,7 +771,9 @@ define([
			if (btnId === "addLayer") {
				this._onAddLayerBrowserButtonClick(objReceived);
			} else if (btnId === "remove") {
				var path = objReceived.item.originalItem[this.pathProperty];
				var parentItem = item.originalItem[this.parentProperty],
					path = 'r' + this.pathSeparator + parentItem.id + this.pathSeparator + item.id;

				this._emitEvt('DESELECT', [path]);
			} else if (btnId === "legend") {
				this._showLayerLegend(this._createLayerId(item.originalItem));
+3 −3
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ define([
				selectionTarget = this._recoverSelectionTarget(receivedTarget),
				selectedIds;

			this._removeSelectionTarget(receivedTarget);
			this._removeSelectionTarget(selectionTarget);

			if (!data) {
				return;
@@ -197,10 +197,10 @@ define([
			var receivedTarget = resWrapper.target,
				selectionTarget = this._recoverSelectionTarget(receivedTarget);

			this._removeSelectionTarget(receivedTarget);
			this._removeSelectionTarget(selectionTarget);
			resWrapper.target = selectionTarget;

			if (this._isSettingsSelectionFormat(receivedTarget)) {
			if (this._isSettingsSelectionFormat(selectionTarget)) {
				this._afterSavedInSettingsFormat(res, resWrapper);
			} else {
				this._afterSavedInOldFormat(res, resWrapper);