Loading public/javascript/app/_app.js +11 −8 Original line number Diff line number Diff line Loading @@ -30,8 +30,7 @@ define([ }, actions: { SHOW_MODULE: 'showModule', MODULE_SHOWN: 'moduleShown', WINDOW_RESIZE: 'windowResize' MODULE_SHOWN: 'moduleShown' } }; Loading @@ -43,9 +42,9 @@ define([ this.subscriptionsConfig.push({ channel: this.getChannel('SHOW_MODULE'), callback: '_subShowModule' },{ /*},{ channel: this.getChannel('RESIZE_VIEW'), callback: '_subResizeView' callback: '_subResizeView'*/ }); }, Loading @@ -62,7 +61,10 @@ define([ _doEvtFacade: function() { this._getGlobalContext().onresize = lang.hitch(this, this._groupEventArgs, 'WINDOW_RESIZE'); // TODO puede que no sea necesario, se puede eliminar de aquí y de '_Show' si no se va a usar, // o bien implementarse directamente en _Show sin necesidad de publicar (todos los módulos pueden acceder // al elemento window) //this._getGlobalContext().onresize = lang.hitch(this, this._groupEventArgs, 'WINDOW_RESIZE'); }, _setOwnCallbacksForEvents: function() { Loading @@ -86,10 +88,10 @@ define([ } }, _subResizeView: function(req) { /*_subResizeView: function(req) { this._doResize(); }, },*/ _subShowModule: function(req) { Loading @@ -106,7 +108,8 @@ define([ _onModuleShown: function(moduleKey, res) { this._doResize(); // TODO cuando no sea contenedor dijit, no hará falta //this._doResize(); this._emitEvt('MODULE_SHOWN', { key: moduleKey Loading public/javascript/app/base/views/_View.js +1 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ define([ , _ListenRequestError , _ViewHandle // QUITAR ){ return declare([_ListenRequestError, _ViewHandle, ContentPane, _Module, _Show], { return declare([_ListenRequestError, _ViewHandle/*, ContentPane*/, _Module, _Show], { // summary: // Base común para todas los módulos usados como vistas. Loading public/javascript/app/components/ModuleStore.js +1 −0 Original line number Diff line number Diff line Loading @@ -319,6 +319,7 @@ define([ var dfd = new Deferred(); require(["app" + moduleItem.internPath + "View"], lang.hitch(this, function(ModuleView) { // Creamos el módulo var moduleInstance = new ModuleView({ perms: moduleItem.perms, Loading public/javascript/app/designs/base/_Layout.js 0 → 100644 +68 −0 Original line number Diff line number Diff line define([ 'dojo/_base/declare' , 'dojo/_base/lang' , 'put-selector/put' , './_LayoutItfc' ], function( declare , lang , put , _LayoutItfc ) { return declare(_LayoutItfc, { // summary: // Base para los layout. constructor: function(args) { this.config = { layoutClass: 'designLayoutContainer' }; lang.mixin(this, this.config, args); }, postCreate: function() { this.inherited(arguments); this._createLayoutContainer(); }, _createLayoutContainer: function() { var classNames = this.layoutClass; if (this.layoutAdditionalClasses) { classNames += ' ' + this.layoutAdditionalClasses; } classNames = classNames.replace(/\ /g, '.'); this._layoutContainer = put('div.' + classNames); }, _addNodeToLayout: function(child) { if (!child) { console.error('Tried to add invalid child to layout: "%s"', this.getChannel()); return; } var childNode = child.domNode || child; put(this._layoutContainer, childNode); }, // TODO sustituto de método de dijit, cuando se resuelvan todas las dependencias, eliminar y usar el interno addChild: function(child) { this._addNodeToLayout(child); }, _getNodeToShow: function() { return this._layoutContainer; } }); }); public/javascript/app/designs/base/_LayoutItfc.js 0 → 100644 +23 −0 Original line number Diff line number Diff line define([ "dojo/_base/declare" , "dojo/_base/lang" , "redmic/modules/base/_Itfc" ], function( declare , lang , _Itfc ){ return declare(_Itfc, { // summary: // Interfaz de _Layout. // description: // Define los métodos que debe poseer el módulo o la implementación. _getMethodsToImplement: function() { return lang.mixin(this.inherited(arguments), { }); } }); }); Loading
public/javascript/app/_app.js +11 −8 Original line number Diff line number Diff line Loading @@ -30,8 +30,7 @@ define([ }, actions: { SHOW_MODULE: 'showModule', MODULE_SHOWN: 'moduleShown', WINDOW_RESIZE: 'windowResize' MODULE_SHOWN: 'moduleShown' } }; Loading @@ -43,9 +42,9 @@ define([ this.subscriptionsConfig.push({ channel: this.getChannel('SHOW_MODULE'), callback: '_subShowModule' },{ /*},{ channel: this.getChannel('RESIZE_VIEW'), callback: '_subResizeView' callback: '_subResizeView'*/ }); }, Loading @@ -62,7 +61,10 @@ define([ _doEvtFacade: function() { this._getGlobalContext().onresize = lang.hitch(this, this._groupEventArgs, 'WINDOW_RESIZE'); // TODO puede que no sea necesario, se puede eliminar de aquí y de '_Show' si no se va a usar, // o bien implementarse directamente en _Show sin necesidad de publicar (todos los módulos pueden acceder // al elemento window) //this._getGlobalContext().onresize = lang.hitch(this, this._groupEventArgs, 'WINDOW_RESIZE'); }, _setOwnCallbacksForEvents: function() { Loading @@ -86,10 +88,10 @@ define([ } }, _subResizeView: function(req) { /*_subResizeView: function(req) { this._doResize(); }, },*/ _subShowModule: function(req) { Loading @@ -106,7 +108,8 @@ define([ _onModuleShown: function(moduleKey, res) { this._doResize(); // TODO cuando no sea contenedor dijit, no hará falta //this._doResize(); this._emitEvt('MODULE_SHOWN', { key: moduleKey Loading
public/javascript/app/base/views/_View.js +1 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ define([ , _ListenRequestError , _ViewHandle // QUITAR ){ return declare([_ListenRequestError, _ViewHandle, ContentPane, _Module, _Show], { return declare([_ListenRequestError, _ViewHandle/*, ContentPane*/, _Module, _Show], { // summary: // Base común para todas los módulos usados como vistas. Loading
public/javascript/app/components/ModuleStore.js +1 −0 Original line number Diff line number Diff line Loading @@ -319,6 +319,7 @@ define([ var dfd = new Deferred(); require(["app" + moduleItem.internPath + "View"], lang.hitch(this, function(ModuleView) { // Creamos el módulo var moduleInstance = new ModuleView({ perms: moduleItem.perms, Loading
public/javascript/app/designs/base/_Layout.js 0 → 100644 +68 −0 Original line number Diff line number Diff line define([ 'dojo/_base/declare' , 'dojo/_base/lang' , 'put-selector/put' , './_LayoutItfc' ], function( declare , lang , put , _LayoutItfc ) { return declare(_LayoutItfc, { // summary: // Base para los layout. constructor: function(args) { this.config = { layoutClass: 'designLayoutContainer' }; lang.mixin(this, this.config, args); }, postCreate: function() { this.inherited(arguments); this._createLayoutContainer(); }, _createLayoutContainer: function() { var classNames = this.layoutClass; if (this.layoutAdditionalClasses) { classNames += ' ' + this.layoutAdditionalClasses; } classNames = classNames.replace(/\ /g, '.'); this._layoutContainer = put('div.' + classNames); }, _addNodeToLayout: function(child) { if (!child) { console.error('Tried to add invalid child to layout: "%s"', this.getChannel()); return; } var childNode = child.domNode || child; put(this._layoutContainer, childNode); }, // TODO sustituto de método de dijit, cuando se resuelvan todas las dependencias, eliminar y usar el interno addChild: function(child) { this._addNodeToLayout(child); }, _getNodeToShow: function() { return this._layoutContainer; } }); });
public/javascript/app/designs/base/_LayoutItfc.js 0 → 100644 +23 −0 Original line number Diff line number Diff line define([ "dojo/_base/declare" , "dojo/_base/lang" , "redmic/modules/base/_Itfc" ], function( declare , lang , _Itfc ){ return declare(_Itfc, { // summary: // Interfaz de _Layout. // description: // Define los métodos que debe poseer el módulo o la implementación. _getMethodsToImplement: function() { return lang.mixin(this.inherited(arguments), { }); } }); });