Loading public/javascript/app/innerApp.js +1 −2 Original line number Diff line number Diff line Loading @@ -223,8 +223,7 @@ define([ _createListeners: function() { this._appClickHandler = on.pausable(this.ownerDocumentBody, 'click', lang.hitch(this, this._onAppClicked)); this._appClickHandler = this._listenGlobalClicks(lang.hitch(this, this._onAppClicked)); this._appClickHandler.pause(); }, Loading public/javascript/redmic/modules/base/_ManageClickEvent.js +14 −0 Original line number Diff line number Diff line define([ 'dojo/_base/declare' , 'dojo/on' ], function( declare , on ) { return declare(null, { // summary: // Base de utilidades para gestionar los eventos de click recibidos por los módulos. _listenGlobalClicks: function(callback) { if (!callback) { console.error('Callback not provided to listen global clicks at module "%s"', this.getChannel()); return; } this._listenGlobalClicksHandler = on.pausable(this.ownerDocumentBody, 'click', callback); return this._listenGlobalClicksHandler; }, _getClickTargets: function(event) { var targetPath = event.path || (event.composedPath && event.composedPath()) || [], Loading public/javascript/redmic/modules/notification/Notification.js +5 −6 Original line number Diff line number Diff line Loading @@ -126,12 +126,11 @@ define([ this.domNode.onclick = lang.hitch(this, this._clickNotification); this.closeNotificationSidebarHandler = on.pausable(this.ownerDocumentBody, "click", lang.hitch(this, this._onCloseNotificationSidebar)); this.closeNotificationSidebarHandler.pause(); this._globalClicksHandler = this._listenGlobalClicks(lang.hitch(this, this._evaluateToCloseSidebar)); this._globalClicksHandler.pause(); }, _onCloseNotificationSidebar: function(evt) { _evaluateToCloseSidebar: function(evt) { var nodeBelongsToNotificationButton = this._checkClickBelongsToNode(evt, this.domNode), nodeBelongsToNotificationSidebar = this._checkClickBelongsToNode(evt, this.notificationSidebarNode); Loading @@ -149,10 +148,10 @@ define([ if (this.statusNotificationSidebarShown) { this.statusNotificationSidebarShown = false; this.closeNotificationSidebarHandler.pause(); this._globalClicksHandler.pause(); eventPublication = 'HIDE_NOTIFICATION_SIDEBAR'; } else { this.closeNotificationSidebarHandler.resume(); this._globalClicksHandler.resume(); this.statusNotificationSidebarShown = true; eventPublication = 'SHOW_NOTIFICATION_SIDEBAR'; Loading Loading
public/javascript/app/innerApp.js +1 −2 Original line number Diff line number Diff line Loading @@ -223,8 +223,7 @@ define([ _createListeners: function() { this._appClickHandler = on.pausable(this.ownerDocumentBody, 'click', lang.hitch(this, this._onAppClicked)); this._appClickHandler = this._listenGlobalClicks(lang.hitch(this, this._onAppClicked)); this._appClickHandler.pause(); }, Loading
public/javascript/redmic/modules/base/_ManageClickEvent.js +14 −0 Original line number Diff line number Diff line define([ 'dojo/_base/declare' , 'dojo/on' ], function( declare , on ) { return declare(null, { // summary: // Base de utilidades para gestionar los eventos de click recibidos por los módulos. _listenGlobalClicks: function(callback) { if (!callback) { console.error('Callback not provided to listen global clicks at module "%s"', this.getChannel()); return; } this._listenGlobalClicksHandler = on.pausable(this.ownerDocumentBody, 'click', callback); return this._listenGlobalClicksHandler; }, _getClickTargets: function(event) { var targetPath = event.path || (event.composedPath && event.composedPath()) || [], Loading
public/javascript/redmic/modules/notification/Notification.js +5 −6 Original line number Diff line number Diff line Loading @@ -126,12 +126,11 @@ define([ this.domNode.onclick = lang.hitch(this, this._clickNotification); this.closeNotificationSidebarHandler = on.pausable(this.ownerDocumentBody, "click", lang.hitch(this, this._onCloseNotificationSidebar)); this.closeNotificationSidebarHandler.pause(); this._globalClicksHandler = this._listenGlobalClicks(lang.hitch(this, this._evaluateToCloseSidebar)); this._globalClicksHandler.pause(); }, _onCloseNotificationSidebar: function(evt) { _evaluateToCloseSidebar: function(evt) { var nodeBelongsToNotificationButton = this._checkClickBelongsToNode(evt, this.domNode), nodeBelongsToNotificationSidebar = this._checkClickBelongsToNode(evt, this.notificationSidebarNode); Loading @@ -149,10 +148,10 @@ define([ if (this.statusNotificationSidebarShown) { this.statusNotificationSidebarShown = false; this.closeNotificationSidebarHandler.pause(); this._globalClicksHandler.pause(); eventPublication = 'HIDE_NOTIFICATION_SIDEBAR'; } else { this.closeNotificationSidebarHandler.resume(); this._globalClicksHandler.resume(); this.statusNotificationSidebarShown = true; eventPublication = 'SHOW_NOTIFICATION_SIDEBAR'; Loading