Commit 181942c3 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Limita items iniciales en listados de diseño

Añade paginación también al diseño List a secas, y en los 3 diseños de
listado agrega un size inicial a la query, así como modifica el valor de
paginación por defecto a 25 por página.
parent 4f96b409
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ define([
					perms: this.perms,
					selectorChannel: this.selectorChannel,
					browserChannel: this.browser.getChannel()
				}, this[item.config] || {}]);
				}, item.config || {}]);

				var instance = new Definition(config);

+24 −3
Original line number Diff line number Diff line
@@ -3,19 +3,29 @@ define([
	, "app/designs/base/_Controller"
	, "dojo/_base/declare"
	, "dojo/_base/lang"
	, "redmic/modules/browser/bars/Pagination"
], function(
	_Browser
	, _Controller
	, declare
	, lang
	, Pagination
) {

	return declare([_Controller, _Browser], {
		//	summary:
		//		Layout para vistas que contienen un buscador de texto y un listado.

		constructor: function() {

			this.config = {};
			this.config = {
				browserBars: [{
					definition: Pagination,
					config: {
						rowPerPage: 25
					}
				}]
			};

			lang.mixin(this, this.config);
		},
@@ -28,6 +38,17 @@ define([
			});
		},

		postCreate: function() {

			this.inherited(arguments);

			this._emitEvt('ADD_TO_QUERY', {
				query: {
					size: 25
				}
			});
		},

		_subUpdateTarget: function(req) {

			this._emitEvt("UPDATE_TARGET", req);
+10 −1
Original line number Diff line number Diff line
@@ -39,7 +39,10 @@ define([
					GET_REPORT: "getReport"
				},
				browserBars: [{
					definition: Pagination
					definition: Pagination,
					config: {
						rowPerPage: 25
					}
				}]
			};

@@ -92,6 +95,12 @@ define([
				node: this.textSearchNode
			});

			this._emitEvt('ADD_TO_QUERY', {
				query: {
					size: 25
				}
			});

			this._publish(this.facets.getChannel("SHOW"), {
				node: this.facetsNode
			});
+10 −1
Original line number Diff line number Diff line
@@ -26,7 +26,10 @@ define([
			this.config = {
				viewPaths: redmicConfig.viewPaths,
				browserBars: [{
					definition: Pagination
					definition: Pagination,
					config: {
						rowPerPage: 25
					}
				}]
			};

@@ -50,6 +53,12 @@ define([

			this.inherited(arguments);

			this._emitEvt('ADD_TO_QUERY', {
				query: {
					size: 25
				}
			});

			this._publish(this.textSearch.getChannel("SHOW"), {
				node: this.textSearchNode
			});