index.js
function (options, callback) {
			// build dataSource based with options
			var resp = {
				count: data.repeater.listData.length,
				items: [],
				page: options.pageIndex
			};

			// get start and end limits for JSON
			var i, l;
			resp.pages = Math.ceil(resp.count / (options.pageSize || 50));

			i = options.pageIndex * (options.pageSize || 50);
			l = i + (options.pageSize || 50);
			l = (l <= resp.count) ? l : resp.count;
			resp.start = i + 1;
			resp.end = l;

			// setup columns for list view
			resp.columns = [
				{
					label: 'Common Name',
					property: 'commonName',
					sortable: true,
					width: 600
				},
				{
					label: 'Latin Name',
					property: 'latinName',
					sortable: true,
					width: 600
				},
				{
					label: 'Appearance',
					property: 'appearance',
					sortable: true
				},
				{
					label: 'Sound',
					property: 'sound',
					sortable: true
				}
			];

			// add sample items to datasource
			for (i; i < l; i++) {
				// from data.js
				resp.items.push(data.repeater.listData[i]);
			}

			resp.items = sort(resp.items, options.sortProperty, options.sortDirection);

			// call and simulate latency
			setTimeout(function () {
				callback(resp);
			}, loadDelays[Math.floor(Math.random() * 4)]);
		}
function (options, callback) {
			// build dataSource based with options
			var resp = {
				count: data.repeater.listData.length,
				items: [],
				page: options.pageIndex
			};

			// get start and end limits for JSON
			var i, l;
			resp.pages = Math.ceil(resp.count / (options.pageSize || 50));

			i = options.pageIndex * (options.pageSize || 50);
			l = i + (options.pageSize || 50);
			l = (l <= resp.count) ? l : resp.count;
			resp.start = i + 1;
			resp.end = l;

			// setup columns for list view
			resp.columns = [
				{
					label: 'Common Name',
					property: 'commonName',
					sortable: true,
					width: 600
				},
				{
					label: 'Latin Name',
					property: 'latinName',
					sortable: true,
					width: 600
				},
				{
					label: 'Appearance',
					property: 'appearance',
					sortable: true
				},
				{
					label: 'Sound',
					property: 'sound',
					sortable: true
				}
			];

			// add sample items to datasource
			for (i; i < l; i++) {
				// from data.js
				resp.items.push(data.repeater.listData[i]);
			}

			resp.items = sort(resp.items, options.sortProperty, options.sortDirection);

			// call and simulate latency
			setTimeout(function () {
				callback(resp);
			}, loadDelays[Math.floor(Math.random() * 4)]);
		}
function ( options , callback ) { // build dataSource based with options var resp = { count : data . repeater . listData . length , items : [ ] , page : options . pageIndex } ; // get start and end limits for JSON var i , l ; resp . pages = Math . ceil ( resp . count / ( options . pageSize || 50 ) ) ; i = options . pageIndex * ( options . pageSize || 50 ) ; l = i + ( options . pageSize || 50 ) ; l = ( l <= resp . count ) ? l : resp . count ; resp . start = i + 1 ; resp . end = l ; // setup columns for list view resp . columns = [ { label : 'Common Name' , property : 'commonName' , sortable : true , width : 600 } , { label : 'Latin Name' , property : 'latinName' , sortable : true , width : 600 } , { label : 'Appearance' , property : 'appearance' , sortable : true } , { label : 'Sound' , property : 'sound' , sortable : true } ] ; // add sample items to datasource for ( i ; i < l ; i ++ ) { // from data.js resp . items . push ( data . repeater . listData [ i ] ) ; } resp . items = sort ( resp . items , options . sortProperty , options . sortDirection ) ; // call and simulate latency setTimeout ( function ( ) { callback ( resp ) ; } , loadDelays [ Math . floor ( Math . random ( ) * 4 ) ] ) ; }
list view setup
list view setup