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

Añade paginación y ordenación a listado de inicio

parent b3d950e5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -153,6 +153,7 @@ define([

			this._publish(this._getWidgetInstance('searchFastFilter').getChannel('SET_PROPS'), obj);
			this._publish(this._getWidgetInstance('searchFilter').getChannel('SET_PROPS'), obj);
			this._publish(this._getWidgetInstance('searchResults').getChannel('SET_PROPS'), obj);
		},

		_listenWidgets: function() {
+26 −1
Original line number Diff line number Diff line
@@ -2,8 +2,11 @@ define([
	'app/redmicConfig'
	, 'dojo/_base/declare'
	, 'dojo/_base/lang'
	, 'redmic/modules/base/_Filter'
	, 'redmic/modules/base/_Module'
	, 'redmic/modules/base/_Show'
	, 'redmic/modules/browser/bars/Order'
	, 'redmic/modules/browser/bars/Pagination'
	, 'redmic/modules/browser/bars/Total'
	, 'redmic/modules/browser/_ButtonsInRow'
	, 'redmic/modules/browser/_Framework'
@@ -13,8 +16,11 @@ define([
	redmicConfig
	, declare
	, lang
	, _Filter
	, _Module
	, _Show
	, Order
	, Pagination
	, Total
	, _ButtonsInRow
	, _Framework
@@ -45,9 +51,28 @@ define([
			this.browserConfig = this._merge([{
				parentChannel: this.getChannel(),
				target: this.target,
				queryChannel: this.queryChannel,
				template: ActivityList,
				bars: [{
					instance: Total
				},{
					instance: Order,
					config: {
						options: [
							{value: 'name'},
							{value: 'code'},
							{value: 'activityType.name', label: this.i18n.activityType},
							{value: 'startDate'},
							{value: 'endDate'},
							{value: 'updated'}
						]
					}
				},{
					instance: Pagination,
					config: {
						pageSizeOptions: [10],
						rowPerPage: 10,
					}
				}],
				rowConfig: {
					buttonsConfig: {
@@ -61,7 +86,7 @@ define([
				}
			}, this.browserConfig || {}]);

			var BrowserDefinition = declare([ListImpl, _Framework, _ButtonsInRow]);
			var BrowserDefinition = declare([ListImpl, _Framework, _ButtonsInRow, _Filter]);
			this.browser = new BrowserDefinition(this.browserConfig);
		},

+3 −6
Original line number Diff line number Diff line
@@ -229,13 +229,10 @@ define([
				bars: [{
					instance: Total
				},{
					instance: SelectionBox,
					config: 'selectionBoxConfig'
					instance: SelectionBox
				},{
					instance: Pagination
				}],
				selectionBoxConfig: {
				}
				}]
			}, this.browserConfig || {}]);

			this.treeConfig = this._merge([{