Loading public/javascript/app/home/views/HomeView.js +45 −51 Original line number Diff line number Diff line Loading @@ -37,62 +37,45 @@ define([ constructor: function(args) { this.config = { noScroll: true, propsWidget: { } }; this.widgetConfigs = { searchBar: { width: 3, width: 6, height: 1, type: SearchBarWidget, props: { omitTitleBar: true } }, social: { width: 3, height: 1, type: SocialWidget, props: { title: this.i18n.followUs omitTitleBar: true, resizable: false } }, searchFilter: { width: 6, height: 2, height: 3, type: SearchFilterWidget, hidden: true, props: { "class": "containerDetails" windowTitle: 'advancedFilters', } }, searchFastFilter: { width: 2, height: 4, type: SearchFastFilterWidget, hidden: true, props: { "class": "containerDetails" windowTitle: 'fastFilters', omitTitleCloseButton: true } }, searchResults: { width: 4, height: 4, type: SearchResultsWidget, hidden: true, props: { "class": "containerDetails" } }, favourites: { width: 3, height: 5, type: WidgetFavourites, props: { title: this.i18n.favourites, "class": "containerDetails" windowTitle: 'starredActivities', omitTitleCloseButton: true } }, info: { Loading @@ -100,18 +83,35 @@ define([ height: 1, type: TemplateDisplayer, props: { title: this.i18n.info, windowTitle: 'info', template: TemplateInfo, "class": "mediumSolidContainer.borderRadiusBottom", target: "initial_info" } }, social: { width: 3, height: 1, type: SocialWidget, props: { windowTitle: 'followUs' } }, favourites: { width: 3, height: 5, type: WidgetFavourites, props: { windowTitle: 'favourites', "class": "containerDetails" } }, lastActivities: { width: 3, height: 4, height: 5, type: WidgetLastActivity, props: { title: this.i18n.lastActivities, windowTitle: 'lastActivities', template: TemplateInfo, "class": "containerDetails" } Loading @@ -131,20 +131,19 @@ define([ _afterShow: function(request) { //this.startup(); this._listenWidgets(); }, _listenWidgets: function() { this._setSubscriptions([{ channel: this._widgets.searchBar.getChannel('SHOW_SEARCH_RESULTS'), channel: this._getWidgetInstance('searchBar').getChannel('SHOW_SEARCH_RESULTS'), callback: lang.hitch(this, this._showSearchResults) },{ channel: this._widgets.searchBar.getChannel('HIDE_SEARCH_RESULTS'), channel: this._getWidgetInstance('searchBar').getChannel('HIDE_SEARCH_RESULTS'), callback: lang.hitch(this, this._hideSearchResults) },{ channel: this._widgets.searchBar.getChannel('TOGGLE_ADVANCED_SEARCH'), channel: this._getWidgetInstance('searchBar').getChannel('TOGGLE_ADVANCED_SEARCH'), callback: lang.hitch(this, this._toggleAdvancedSearch) }]); }, Loading @@ -156,51 +155,46 @@ define([ queryChannel: searchDefinition.queryChannel }; this._publish(this._widgets.searchResults.getChannel('SET_PROPS'), obj); this._publish(this._widgets.searchFastFilter.getChannel('SET_PROPS'), obj); this._publish(this._widgets.searchFilter.getChannel('SET_PROPS'), obj); this._publish(this._getWidgetInstance('searchResults').getChannel('SET_PROPS'), lang.mixin({ windowTitle: 'searchResults' }, obj)); this._showWidget('searchFastFilter'); this._showWidget('searchResults'); this._reloadInteractive(); this._updateInteractive(); this._publish(this._getWidgetInstance('searchFastFilter').getChannel('SET_PROPS'), obj); this._publish(this._getWidgetInstance('searchFilter').getChannel('SET_PROPS'), obj); }, _hideSearchResults: function(searchDefinition) { this._publish(this._widgets.searchResults.getChannel('CLEAR_DATA'), searchDefinition); var resultsWidget = this._getWidgetInstance('searchResults'); this._publish(resultsWidget.getChannel('CLEAR_DATA'), searchDefinition); this._publish(resultsWidget.getChannel('SET_PROPS'), { windowTitle: 'starredActivities' }); this._hideWidget('searchFilter'); this._hideWidget('searchFastFilter'); this._hideWidget('searchResults'); this._reloadInteractive(); this._updateInteractive(); }, _toggleAdvancedSearch: function(searchDefinition) { if (!this._advancedSearchShown) { if (this._advancedSearchShown === undefined) { this._publish(this._widgets.searchFilter.getChannel('SET_PROPS'), { this._publish(this._getWidgetInstance('searchFilter').getChannel('SET_PROPS'), { target: searchDefinition.target, queryChannel: searchDefinition.queryChannel }); } this._advancedSearchShown = true; this._showWidget('searchFilter'); this._reloadInteractive(); this._updateInteractive(); } else { this._advancedSearchShown = false; this._hideWidget('searchFilter'); this._reloadInteractive(); this._updateInteractive(); } }, _clearModules: function() { this._publish(this._widgets.info.getChannel("CLEAR")); this._publish(this._getWidgetInstance('info').getChannel("CLEAR")); }, _refreshModules: function() { Loading public/javascript/app/home/views/SearchBarWidget.js +2 −4 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ define([ 'TOGGLE_ADVANCED_SEARCH': 'toggleAdvancedSearch' }, target: redmicConfig.services.activity, className: 'searchBarPanel' class: 'searchBarPanel' }; lang.mixin(this, this.config, args); Loading Loading @@ -88,9 +88,7 @@ define([ return; } this._addClass(this.className); this._publish(this.textSearch.getChannel("SHOW"), { this._publish(this.textSearch.getChannel('SHOW'), { node: this.domNode }); }, Loading public/javascript/app/home/views/SearchFastFilterWidget.js +6 −14 Original line number Diff line number Diff line define([ 'app/home/views/_DashboardItem' , 'dojo/_base/declare' 'dojo/_base/declare' , 'dojo/_base/lang' , 'put-selector/put' , 'redmic/modules/base/_Module' , 'redmic/modules/base/_Show' , 'redmic/modules/base/_Store' , 'redmic/modules/search/FacetsImpl' ], function( _DashboardItem , declare declare , lang , put , _Module , _Show , _Store , FacetsImpl ) { return declare([_Module, _Show], { // summary: // Widget contenedor de resultados de búsqueda sobre actividades // Widget contenedor de filtros rápidos de búsqueda sobre actividades constructor: function(args) { this.config = { ownChannel: 'searchFastFilterWidget', className: 'facets' class: 'facets' }; lang.mixin(this, this.config, args); Loading Loading @@ -60,10 +54,8 @@ define([ return; } var facetsSearchNode = put(this.domNode, 'div.' + this.className); this._publish(this.facetsSearch.getChannel("SHOW"), { node: facetsSearchNode this._publish(this.facetsSearch.getChannel('SHOW'), { node: this.domNode }); }, Loading public/javascript/app/home/views/SearchFilterWidget.js +6 −14 Original line number Diff line number Diff line define([ 'app/home/views/_DashboardItem' , 'dojo/_base/declare' 'dojo/_base/declare' , 'dojo/_base/lang' , 'put-selector/put' , 'redmic/modules/base/_Module' , 'redmic/modules/base/_Show' , 'redmic/modules/base/_Store' , 'redmic/modules/search/CompositeImpl' ], function( _DashboardItem , declare declare , lang , put , _Module , _Show , _Store , CompositeImpl ) { return declare([_Module, _Show], { // summary: // Widget contenedor de resultados de búsqueda sobre actividades // Widget contenedor de filtros avanzados de búsqueda sobre actividades constructor: function(args) { this.config = { ownChannel: 'searchFilterWidget', className: 'composite' class: 'composite' }; lang.mixin(this, this.config, args); Loading @@ -47,10 +41,8 @@ define([ return; } var compositeSearchNode = put(this.domNode, 'div.' + this.className); this._publish(this.compositeSearch.getChannel("SHOW"), { node: compositeSearchNode this._publish(this.compositeSearch.getChannel('SHOW'), { node: this.domNode }); }, Loading public/javascript/app/home/views/SearchResultsWidget.js +12 −16 Original line number Diff line number Diff line define([ 'app/home/views/_DashboardItem' , 'app/redmicConfig' 'app/redmicConfig' , 'dojo/_base/declare' , 'dojo/_base/lang' , 'put-selector/put' , 'redmic/modules/base/_Store' , 'redmic/modules/base/_Module' , 'redmic/modules/base/_Show' , 'redmic/modules/browser/bars/Total' , 'redmic/modules/browser/_ButtonsInRow' , 'redmic/modules/browser/_Framework' , 'redmic/modules/browser/ListImpl' , 'templates/ActivityList' ], function( _DashboardItem , redmicConfig redmicConfig , declare , lang , put , _Store , _Module , _Show , Total , _ButtonsInRow , _Framework Loading @@ -24,7 +22,7 @@ define([ , ActivityList ) { return declare([_DashboardItem, _Store], { return declare([_Module, _Show], { // summary: // Widget contenedor de resultados de búsqueda sobre actividades Loading @@ -36,7 +34,7 @@ define([ 'CLEAR_DATA': 'clearData' }, target: redmicConfig.services.activity, className: 'listZone' class: 'listZone' }; lang.mixin(this, this.config, args); Loading Loading @@ -77,14 +75,12 @@ define([ _afterShow: function() { if (!this._getPreviouslyShown()) { // TODO retocar contenedores de por encima, igual no extender de la base de ahora put(this.containerNode, '.flex'); this._browserNode = put(this.containerNode, 'div.' + this.className); if (this._getPreviouslyShown()) { return; } this._publish(this.browser.getChannel("SHOW"), { node: this._browserNode this._publish(this.browser.getChannel('SHOW'), { node: this.domNode }); }, Loading Loading
public/javascript/app/home/views/HomeView.js +45 −51 Original line number Diff line number Diff line Loading @@ -37,62 +37,45 @@ define([ constructor: function(args) { this.config = { noScroll: true, propsWidget: { } }; this.widgetConfigs = { searchBar: { width: 3, width: 6, height: 1, type: SearchBarWidget, props: { omitTitleBar: true } }, social: { width: 3, height: 1, type: SocialWidget, props: { title: this.i18n.followUs omitTitleBar: true, resizable: false } }, searchFilter: { width: 6, height: 2, height: 3, type: SearchFilterWidget, hidden: true, props: { "class": "containerDetails" windowTitle: 'advancedFilters', } }, searchFastFilter: { width: 2, height: 4, type: SearchFastFilterWidget, hidden: true, props: { "class": "containerDetails" windowTitle: 'fastFilters', omitTitleCloseButton: true } }, searchResults: { width: 4, height: 4, type: SearchResultsWidget, hidden: true, props: { "class": "containerDetails" } }, favourites: { width: 3, height: 5, type: WidgetFavourites, props: { title: this.i18n.favourites, "class": "containerDetails" windowTitle: 'starredActivities', omitTitleCloseButton: true } }, info: { Loading @@ -100,18 +83,35 @@ define([ height: 1, type: TemplateDisplayer, props: { title: this.i18n.info, windowTitle: 'info', template: TemplateInfo, "class": "mediumSolidContainer.borderRadiusBottom", target: "initial_info" } }, social: { width: 3, height: 1, type: SocialWidget, props: { windowTitle: 'followUs' } }, favourites: { width: 3, height: 5, type: WidgetFavourites, props: { windowTitle: 'favourites', "class": "containerDetails" } }, lastActivities: { width: 3, height: 4, height: 5, type: WidgetLastActivity, props: { title: this.i18n.lastActivities, windowTitle: 'lastActivities', template: TemplateInfo, "class": "containerDetails" } Loading @@ -131,20 +131,19 @@ define([ _afterShow: function(request) { //this.startup(); this._listenWidgets(); }, _listenWidgets: function() { this._setSubscriptions([{ channel: this._widgets.searchBar.getChannel('SHOW_SEARCH_RESULTS'), channel: this._getWidgetInstance('searchBar').getChannel('SHOW_SEARCH_RESULTS'), callback: lang.hitch(this, this._showSearchResults) },{ channel: this._widgets.searchBar.getChannel('HIDE_SEARCH_RESULTS'), channel: this._getWidgetInstance('searchBar').getChannel('HIDE_SEARCH_RESULTS'), callback: lang.hitch(this, this._hideSearchResults) },{ channel: this._widgets.searchBar.getChannel('TOGGLE_ADVANCED_SEARCH'), channel: this._getWidgetInstance('searchBar').getChannel('TOGGLE_ADVANCED_SEARCH'), callback: lang.hitch(this, this._toggleAdvancedSearch) }]); }, Loading @@ -156,51 +155,46 @@ define([ queryChannel: searchDefinition.queryChannel }; this._publish(this._widgets.searchResults.getChannel('SET_PROPS'), obj); this._publish(this._widgets.searchFastFilter.getChannel('SET_PROPS'), obj); this._publish(this._widgets.searchFilter.getChannel('SET_PROPS'), obj); this._publish(this._getWidgetInstance('searchResults').getChannel('SET_PROPS'), lang.mixin({ windowTitle: 'searchResults' }, obj)); this._showWidget('searchFastFilter'); this._showWidget('searchResults'); this._reloadInteractive(); this._updateInteractive(); this._publish(this._getWidgetInstance('searchFastFilter').getChannel('SET_PROPS'), obj); this._publish(this._getWidgetInstance('searchFilter').getChannel('SET_PROPS'), obj); }, _hideSearchResults: function(searchDefinition) { this._publish(this._widgets.searchResults.getChannel('CLEAR_DATA'), searchDefinition); var resultsWidget = this._getWidgetInstance('searchResults'); this._publish(resultsWidget.getChannel('CLEAR_DATA'), searchDefinition); this._publish(resultsWidget.getChannel('SET_PROPS'), { windowTitle: 'starredActivities' }); this._hideWidget('searchFilter'); this._hideWidget('searchFastFilter'); this._hideWidget('searchResults'); this._reloadInteractive(); this._updateInteractive(); }, _toggleAdvancedSearch: function(searchDefinition) { if (!this._advancedSearchShown) { if (this._advancedSearchShown === undefined) { this._publish(this._widgets.searchFilter.getChannel('SET_PROPS'), { this._publish(this._getWidgetInstance('searchFilter').getChannel('SET_PROPS'), { target: searchDefinition.target, queryChannel: searchDefinition.queryChannel }); } this._advancedSearchShown = true; this._showWidget('searchFilter'); this._reloadInteractive(); this._updateInteractive(); } else { this._advancedSearchShown = false; this._hideWidget('searchFilter'); this._reloadInteractive(); this._updateInteractive(); } }, _clearModules: function() { this._publish(this._widgets.info.getChannel("CLEAR")); this._publish(this._getWidgetInstance('info').getChannel("CLEAR")); }, _refreshModules: function() { Loading
public/javascript/app/home/views/SearchBarWidget.js +2 −4 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ define([ 'TOGGLE_ADVANCED_SEARCH': 'toggleAdvancedSearch' }, target: redmicConfig.services.activity, className: 'searchBarPanel' class: 'searchBarPanel' }; lang.mixin(this, this.config, args); Loading Loading @@ -88,9 +88,7 @@ define([ return; } this._addClass(this.className); this._publish(this.textSearch.getChannel("SHOW"), { this._publish(this.textSearch.getChannel('SHOW'), { node: this.domNode }); }, Loading
public/javascript/app/home/views/SearchFastFilterWidget.js +6 −14 Original line number Diff line number Diff line define([ 'app/home/views/_DashboardItem' , 'dojo/_base/declare' 'dojo/_base/declare' , 'dojo/_base/lang' , 'put-selector/put' , 'redmic/modules/base/_Module' , 'redmic/modules/base/_Show' , 'redmic/modules/base/_Store' , 'redmic/modules/search/FacetsImpl' ], function( _DashboardItem , declare declare , lang , put , _Module , _Show , _Store , FacetsImpl ) { return declare([_Module, _Show], { // summary: // Widget contenedor de resultados de búsqueda sobre actividades // Widget contenedor de filtros rápidos de búsqueda sobre actividades constructor: function(args) { this.config = { ownChannel: 'searchFastFilterWidget', className: 'facets' class: 'facets' }; lang.mixin(this, this.config, args); Loading Loading @@ -60,10 +54,8 @@ define([ return; } var facetsSearchNode = put(this.domNode, 'div.' + this.className); this._publish(this.facetsSearch.getChannel("SHOW"), { node: facetsSearchNode this._publish(this.facetsSearch.getChannel('SHOW'), { node: this.domNode }); }, Loading
public/javascript/app/home/views/SearchFilterWidget.js +6 −14 Original line number Diff line number Diff line define([ 'app/home/views/_DashboardItem' , 'dojo/_base/declare' 'dojo/_base/declare' , 'dojo/_base/lang' , 'put-selector/put' , 'redmic/modules/base/_Module' , 'redmic/modules/base/_Show' , 'redmic/modules/base/_Store' , 'redmic/modules/search/CompositeImpl' ], function( _DashboardItem , declare declare , lang , put , _Module , _Show , _Store , CompositeImpl ) { return declare([_Module, _Show], { // summary: // Widget contenedor de resultados de búsqueda sobre actividades // Widget contenedor de filtros avanzados de búsqueda sobre actividades constructor: function(args) { this.config = { ownChannel: 'searchFilterWidget', className: 'composite' class: 'composite' }; lang.mixin(this, this.config, args); Loading @@ -47,10 +41,8 @@ define([ return; } var compositeSearchNode = put(this.domNode, 'div.' + this.className); this._publish(this.compositeSearch.getChannel("SHOW"), { node: compositeSearchNode this._publish(this.compositeSearch.getChannel('SHOW'), { node: this.domNode }); }, Loading
public/javascript/app/home/views/SearchResultsWidget.js +12 −16 Original line number Diff line number Diff line define([ 'app/home/views/_DashboardItem' , 'app/redmicConfig' 'app/redmicConfig' , 'dojo/_base/declare' , 'dojo/_base/lang' , 'put-selector/put' , 'redmic/modules/base/_Store' , 'redmic/modules/base/_Module' , 'redmic/modules/base/_Show' , 'redmic/modules/browser/bars/Total' , 'redmic/modules/browser/_ButtonsInRow' , 'redmic/modules/browser/_Framework' , 'redmic/modules/browser/ListImpl' , 'templates/ActivityList' ], function( _DashboardItem , redmicConfig redmicConfig , declare , lang , put , _Store , _Module , _Show , Total , _ButtonsInRow , _Framework Loading @@ -24,7 +22,7 @@ define([ , ActivityList ) { return declare([_DashboardItem, _Store], { return declare([_Module, _Show], { // summary: // Widget contenedor de resultados de búsqueda sobre actividades Loading @@ -36,7 +34,7 @@ define([ 'CLEAR_DATA': 'clearData' }, target: redmicConfig.services.activity, className: 'listZone' class: 'listZone' }; lang.mixin(this, this.config, args); Loading Loading @@ -77,14 +75,12 @@ define([ _afterShow: function() { if (!this._getPreviouslyShown()) { // TODO retocar contenedores de por encima, igual no extender de la base de ahora put(this.containerNode, '.flex'); this._browserNode = put(this.containerNode, 'div.' + this.className); if (this._getPreviouslyShown()) { return; } this._publish(this.browser.getChannel("SHOW"), { node: this._browserNode this._publish(this.browser.getChannel('SHOW'), { node: this.domNode }); }, Loading