Commit 82f98b43 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Corrige pequeños defectos

parent 2e578b50
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -243,13 +243,14 @@ define([
		_showRow: function(item) {

			var idProperty = item[this.idProperty],
				rowInstance = this._getRowInstance(idProperty);
				rowInstance = this._getRowInstance(idProperty),
				itemDoesNotBelongToRootLevel = !this._checkItemBelongRootLevel(item);

			if (!rowInstance || !this._checkItemBelongRootLevel(item)) {
			if (!rowInstance || itemDoesNotBelongToRootLevel) {
				return;
			}

			if (item[this.leavesProperty]) {
			if (itemDoesNotBelongToRootLevel) {
				this._pendingParentsToShow.push(idProperty);
				return;
			}
@@ -303,7 +304,7 @@ define([
				path = item[this.pathProperty],
				pathLength = path ? path.split(this.pathSeparator).length : null;

			return !(pathLength > this.pathLengthMinChildren || pathLength < this.pathLengthMinParent);
			return pathLength <= this.pathLengthMinChildren && pathLength >= this.pathLengthMinParent;
		},

		_addItemWithoutInstance: function(idProperty, item) {
+2 −3
Original line number Diff line number Diff line
@@ -193,12 +193,11 @@ define([

		_updateHierarchicalExpandCollapse: function(leaves) {

			put(this.expandCollapseIconNode, "!hidden");
			put(this.domNode, "!category");

			if (leaves) {
				put(this.expandCollapseIconNode, "!hidden");
				put(this.domNode, ".category");
			} else {
				put(this.domNode, "!category");
				put(this.expandCollapseIconNode, ".hidden");
			}
		}
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ define([
			this.config = {
				ownChannel: "addItemGateway",
				target: null,
				ouputTarget: null,
				outputTarget: null,
				btnToListen: "addItem"
			};

+6 −7
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ define([
				console.error("Callback '%s' for subscription is missing at '%s'", subCallbackName, this.getChannel());
			}

			if (typeof inputChannel !== "object") {
			if (!(inputChannel instanceof Array)) {
				inputChannel = [inputChannel];
			}

@@ -114,20 +114,19 @@ define([
			}
		},

		_addPublications: function (outputChannel, evtName) {
		_addPublications: function (outputChannel, evtValue) {

			evtName = evtName.replace(/([a-z])([A-Z])/g, "$1_$2");
			var evtName = evtValue.replace(/([a-z])([A-Z])/g, "$1_$2").toUpperCase();

			var inputActionAndEventName = evtName.toUpperCase();
			this.events[inputActionAndEventName] = evtName;
			this.events[evtName] = evtValue;

			if (typeof outputChannel !== "object") {
			if (!(outputChannel instanceof Array)) {
				outputChannel = [outputChannel];
			}

			for (var i = 0; i < outputChannel.length; i++) {
				this._setPublication({
					event: inputActionAndEventName,
					event: evtName,
					channel: outputChannel[i]
				});
			}