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

Reorganiza Sidebar en el mismo nodo

parent fb6d8a33
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ define([
			this.addChild(this.topbar);

			this._publish(this.sidebar.getChannel('SHOW'), {
				node: this.sidebarNode
				node: this.domNode
			});

			// TODO esto es un abuso, no deberíamos acceder a los nodos de un módulo desde fuera. Crear canal para
@@ -172,8 +172,6 @@ define([

		_handleListenersOnToggleSidebar: function() {

			var	appIsOnReducedWidth = domClass.contains(this.ownerDocumentBody, this.reducedWidthClass);

			if (!this._getLowWidth()) {
				return;
			}
@@ -327,10 +325,6 @@ define([
			domClass.add(this.ownerDocumentBody, this.reducedWidthClass);

			this._collapseMainSidebar();

			this._publish(this.sidebar.getChannel('SHOW'), {
				node: this.domNode
			});
		},

		_unsetReducedWidth: function() {
@@ -338,10 +332,6 @@ define([
			domClass.remove(this.ownerDocumentBody, this.reducedWidthClass);

			this._uncollapseMainSidebar();

			this._publish(this.sidebar.getChannel('SHOW'), {
				node: this.sidebarNode
			});
		},

		_collapseMainSidebar: function() {
+3 −2
Original line number Diff line number Diff line
@@ -46,7 +46,8 @@ define([
					AVAILABLE_ALLOWED_MODULES: "availableAllowedModules"
				},

				'class': "main-nav primarySidebar",
				'class': 'main-nav',
				primaryClass: 'primarySidebar',
				primaryActiveItem: null,
				suffixI18n: '',
				items: null
@@ -140,7 +141,7 @@ define([
				return;
			}

			this.primaryNavNode = put(this.domNode, 'nav');
			this.primaryNavNode = put(this.domNode, 'nav.' + this.primaryClass);
			this.primaryNavMenuNode = put(this.primaryNavNode, "ul");
		},

+4 −4
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ define([
		constructor: function(args) {

			this.config = {
				secondaryClass: 'main-nav.secondarySidebar.retiring',
				secondaryClass: 'secondarySidebar.retiring',
				secondaryActiveItem: null,
				clickToCloseSecondaryListener: null,
				subitems: 'modules'
@@ -50,11 +50,11 @@ define([
			this._createSecondaryNavMenu();
		},

		startup: function() {
		postCreate: function() {

			this.inherited(arguments);

			this.clickToCloseSecondaryListener = on.pausable(document.body, 'click', lang.hitch(this,
			this.clickToCloseSecondaryListener = on.pausable(this.ownerDocumentBody, 'click', lang.hitch(this,
				this._onCloseSecNav));

			this.clickToCloseSecondaryListener.pause();
@@ -97,7 +97,7 @@ define([

			var secondaryNav = "nav." + this.secondaryClass;

			this.secondaryNavNode = put(this.ownerDocumentBody, secondaryNav);
			this.secondaryNavNode = put(this.domNode, secondaryNav);
			this.secondaryNavMenuNode = put(this.secondaryNavNode, "ul");
		},

Compare 57d29265 to 7a2b3df6
Original line number Diff line number Diff line
Subproject commit 57d2926559a558fd97e12c2e8b5b6c01dd0bbaad
Subproject commit 7a2b3df621b8d2eda87c36fd948b73275f5afbb4