Loading public/javascript/app/_app.js +2 −45 Original line number Diff line number Diff line Loading @@ -3,14 +3,12 @@ define([ , 'redmic/modules/base/_Show' , 'dojo/_base/declare' , 'dojo/_base/lang' , 'dojo/has' , './_appItfc' ], function( _Module , _Show , declare , lang , has , _appItfc ){ return declare([_Module, _Show, _appItfc], { Loading @@ -25,13 +23,11 @@ define([ this.config = { ownChannel: 'app', events: { WINDOW_RESIZE: 'windowResize', MODULE_SHOWN: 'moduleShown' }, actions: { SHOW_MODULE: 'showModule', MODULE_SHOWN: 'moduleShown', WINDOW_RESIZE: 'windowResize' MODULE_SHOWN: 'moduleShown' } }; Loading @@ -43,9 +39,6 @@ define([ this.subscriptionsConfig.push({ channel: this.getChannel('SHOW_MODULE'), callback: '_subShowModule' },{ channel: this.getChannel('RESIZE_VIEW'), callback: '_subResizeView' }); }, Loading @@ -54,41 +47,12 @@ define([ this.publicationsConfig.push({ event: 'MODULE_SHOWN', channel: this.getChannel('MODULE_SHOWN') },{ event: 'WINDOW_RESIZE', channel: this.getChannel('WINDOW_RESIZE') }); }, _doEvtFacade: function() { this._getGlobalContext().onresize = lang.hitch(this, this._groupEventArgs, 'WINDOW_RESIZE'); }, _setOwnCallbacksForEvents: function() { this._onceEvt('SHOW', lang.hitch(this, this._onFirstShow)); }, _onFirstShow: function() { this.startup(); }, _getGlobalContext: function() { if (has('host-browser')) { return window; } else if (has('host-node')) { return global; } else { console.error('Environment not supported'); } }, _subResizeView: function(req) { this._doResize(); this._onEvt('HIDE', lang.hitch(this, this._onAppHide)); }, _subShowModule: function(req) { Loading @@ -106,16 +70,9 @@ define([ _onModuleShown: function(moduleKey, res) { this._doResize(); this._emitEvt('MODULE_SHOWN', { key: moduleKey }); }, _getNodeToShow: function() { return this.domNode; } }); }); public/javascript/app/_appItfc.js +2 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,8 @@ define([ return lang.mixin(this.inherited(arguments), { "_doResize": {}, "_getNode": {} "_getNode": {}, "_onAppHide": {} }); } }); Loading public/javascript/app/base/views/EditorLayerWithVariableForm.js +0 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,6 @@ define([ }, this.selectInputConfig || {}]); this.formConfig = this._merge([{ classContainer: '.mediumTexturedContainer', buttonsConfig: { reset: { noActive: false Loading public/javascript/app/base/views/Module.js +21 −16 Original line number Diff line number Diff line define([ "dojo/_base/declare" , "dijit/_WidgetBase" , "dijit/_TemplatedMixin" , "dojo/_base/lang" , 'put-selector/put' ], function( declare , _WidgetBase , _TemplatedMixin , lang ) { return declare([_WidgetBase, _TemplatedMixin], { , put ) { return declare(null, { // summary: // Widget para la creación de un elemento boton // Loading @@ -33,23 +33,28 @@ define([ // Url del módulo url: null, // cols: String // Clases correspondientes al griding por columnas cols: "col-xs-12 col-sm-6 col-md-4 col-lg-4", constructor: function(args) { lang.mixin(this, args); var item; if (this.domain) { this.templateString = "<a class='" + this.cols + " boxButton' href='" + this.url + "' d-state-url=true>" + "<div class='name mediumTexturedContainer colorWhite'>" + this.name + "</div></a>"; this.moduleNode = put('a.boxButton[href="' + this.url + '"][d-state-url=true]'); item = put(this.moduleNode, 'div.name.mediumSolidContainer.colorWhite'); put(item, 'span', this.name); } else { this.templateString = "<a title='" + this.name + "' class='col-xs-12 col-sm-6 col-md-6 col-lg-3 module' href='" + this.url + "' d-state-url=true>" + "<div class='button mediumTexturedContainer colorWhite'>" + "<i class='" + this.icon + " iconModule'></i><div class='name'>" + this.name + "</div></div></a>"; this.moduleNode = put('a.module[title="' + this.name + '"][href="' + this.url + '"][d-state-url=true]'); item = put(this.moduleNode, 'div.button.mediumSolidContainer.colorWhite'); put(item, 'i.iconModule.' + this.icon.replace(/\ /g, '.')); put(item, 'div.name', this.name); } }, // TODO reemplazo de método de Dijit, eliminar si deja de usarse placeAt: function(node) { put(node, this.moduleNode); } }); }); public/javascript/app/base/views/_View.js +3 −9 Original line number Diff line number Diff line define([ "dijit/layout/ContentPane" , "dojo/_base/declare" "dojo/_base/declare" , "dojo/_base/lang" , "dojo/aspect" , "redmic/modules/base/_Module" , "redmic/modules/base/_Show" , "app/base/views/_ListenRequestError" , "app/base/views/_ViewHandle" // QUITAR ], function( ContentPane , declare declare , lang , aspect , _Module , _Show , _ListenRequestError , _ViewHandle // QUITAR ){ return declare([_ListenRequestError, _ViewHandle, ContentPane, _Module, _Show], { return declare([_ListenRequestError, _ViewHandle], { // summary: // Base común para todas los módulos usados como vistas. Loading Loading
public/javascript/app/_app.js +2 −45 Original line number Diff line number Diff line Loading @@ -3,14 +3,12 @@ define([ , 'redmic/modules/base/_Show' , 'dojo/_base/declare' , 'dojo/_base/lang' , 'dojo/has' , './_appItfc' ], function( _Module , _Show , declare , lang , has , _appItfc ){ return declare([_Module, _Show, _appItfc], { Loading @@ -25,13 +23,11 @@ define([ this.config = { ownChannel: 'app', events: { WINDOW_RESIZE: 'windowResize', MODULE_SHOWN: 'moduleShown' }, actions: { SHOW_MODULE: 'showModule', MODULE_SHOWN: 'moduleShown', WINDOW_RESIZE: 'windowResize' MODULE_SHOWN: 'moduleShown' } }; Loading @@ -43,9 +39,6 @@ define([ this.subscriptionsConfig.push({ channel: this.getChannel('SHOW_MODULE'), callback: '_subShowModule' },{ channel: this.getChannel('RESIZE_VIEW'), callback: '_subResizeView' }); }, Loading @@ -54,41 +47,12 @@ define([ this.publicationsConfig.push({ event: 'MODULE_SHOWN', channel: this.getChannel('MODULE_SHOWN') },{ event: 'WINDOW_RESIZE', channel: this.getChannel('WINDOW_RESIZE') }); }, _doEvtFacade: function() { this._getGlobalContext().onresize = lang.hitch(this, this._groupEventArgs, 'WINDOW_RESIZE'); }, _setOwnCallbacksForEvents: function() { this._onceEvt('SHOW', lang.hitch(this, this._onFirstShow)); }, _onFirstShow: function() { this.startup(); }, _getGlobalContext: function() { if (has('host-browser')) { return window; } else if (has('host-node')) { return global; } else { console.error('Environment not supported'); } }, _subResizeView: function(req) { this._doResize(); this._onEvt('HIDE', lang.hitch(this, this._onAppHide)); }, _subShowModule: function(req) { Loading @@ -106,16 +70,9 @@ define([ _onModuleShown: function(moduleKey, res) { this._doResize(); this._emitEvt('MODULE_SHOWN', { key: moduleKey }); }, _getNodeToShow: function() { return this.domNode; } }); });
public/javascript/app/_appItfc.js +2 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,8 @@ define([ return lang.mixin(this.inherited(arguments), { "_doResize": {}, "_getNode": {} "_getNode": {}, "_onAppHide": {} }); } }); Loading
public/javascript/app/base/views/EditorLayerWithVariableForm.js +0 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,6 @@ define([ }, this.selectInputConfig || {}]); this.formConfig = this._merge([{ classContainer: '.mediumTexturedContainer', buttonsConfig: { reset: { noActive: false Loading
public/javascript/app/base/views/Module.js +21 −16 Original line number Diff line number Diff line define([ "dojo/_base/declare" , "dijit/_WidgetBase" , "dijit/_TemplatedMixin" , "dojo/_base/lang" , 'put-selector/put' ], function( declare , _WidgetBase , _TemplatedMixin , lang ) { return declare([_WidgetBase, _TemplatedMixin], { , put ) { return declare(null, { // summary: // Widget para la creación de un elemento boton // Loading @@ -33,23 +33,28 @@ define([ // Url del módulo url: null, // cols: String // Clases correspondientes al griding por columnas cols: "col-xs-12 col-sm-6 col-md-4 col-lg-4", constructor: function(args) { lang.mixin(this, args); var item; if (this.domain) { this.templateString = "<a class='" + this.cols + " boxButton' href='" + this.url + "' d-state-url=true>" + "<div class='name mediumTexturedContainer colorWhite'>" + this.name + "</div></a>"; this.moduleNode = put('a.boxButton[href="' + this.url + '"][d-state-url=true]'); item = put(this.moduleNode, 'div.name.mediumSolidContainer.colorWhite'); put(item, 'span', this.name); } else { this.templateString = "<a title='" + this.name + "' class='col-xs-12 col-sm-6 col-md-6 col-lg-3 module' href='" + this.url + "' d-state-url=true>" + "<div class='button mediumTexturedContainer colorWhite'>" + "<i class='" + this.icon + " iconModule'></i><div class='name'>" + this.name + "</div></div></a>"; this.moduleNode = put('a.module[title="' + this.name + '"][href="' + this.url + '"][d-state-url=true]'); item = put(this.moduleNode, 'div.button.mediumSolidContainer.colorWhite'); put(item, 'i.iconModule.' + this.icon.replace(/\ /g, '.')); put(item, 'div.name', this.name); } }, // TODO reemplazo de método de Dijit, eliminar si deja de usarse placeAt: function(node) { put(node, this.moduleNode); } }); });
public/javascript/app/base/views/_View.js +3 −9 Original line number Diff line number Diff line define([ "dijit/layout/ContentPane" , "dojo/_base/declare" "dojo/_base/declare" , "dojo/_base/lang" , "dojo/aspect" , "redmic/modules/base/_Module" , "redmic/modules/base/_Show" , "app/base/views/_ListenRequestError" , "app/base/views/_ViewHandle" // QUITAR ], function( ContentPane , declare declare , lang , aspect , _Module , _Show , _ListenRequestError , _ViewHandle // QUITAR ){ return declare([_ListenRequestError, _ViewHandle, ContentPane, _Module, _Show], { return declare([_ListenRequestError, _ViewHandle], { // summary: // Base común para todas los módulos usados como vistas. Loading