Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

Minor change #461

Merged
merged 1 commit into from Oct 30, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 12 additions & 5 deletions lib/abaaso.js
Expand Up @@ -6,7 +6,7 @@
* @license BSD-3 <https://raw.github.com/avoidwork/abaaso/master/LICENSE>
* @link http://abaaso.com
* @module abaaso
* @version 3.10.31
* @version 3.10.32
*/
( function ( global ) {

Expand Down Expand Up @@ -4240,6 +4240,7 @@ function DataList ( element, store, template ) {
this.placeholder = "";
this.order = "";
this.records = [];
this.current = [];
this.template = template;
this.total = 0;
this.store = store;
Expand Down Expand Up @@ -4511,7 +4512,7 @@ DataList.prototype.refresh = function ( redraw, create ) {
}
});

// Exposting records & total count of items in the list
// Setting state
this.records = items;
this.total = items.length;

Expand All @@ -4527,9 +4528,15 @@ DataList.prototype.refresh = function ( redraw, create ) {
// Paginating the items
else if ( this.total > 0 ) {
limit = datalist.range.call( this );
items = items.limit( limit[0], limit[1] );
items = array.limit( items, limit[0], limit[1] );

// Exposing "current" items, visible in the list
this.current = array.limit( consumed, limit[0], limit[1] );
}
}
else {
this.current = consumed;
}

// Preparing the target element
if ( redraw ) {
Expand Down Expand Up @@ -10067,7 +10074,7 @@ var xhr = function () {
XMLHttpRequest, headers, handler, handlerError, state;

headers = {
"User-Agent" : "abaaso/3.10.31 node.js/" + process.versions.node.replace( /^v/, "" ) + " (" + string.capitalize( process.platform ) + " V8/" + process.versions.v8 + " )",
"User-Agent" : "abaaso/3.10.32 node.js/" + process.versions.node.replace( /^v/, "" ) + " (" + string.capitalize( process.platform ) + " V8/" + process.versions.v8 + " )",
"Content-Type" : "text/plain",
"Accept" : "*/*"
};
Expand Down Expand Up @@ -11208,7 +11215,7 @@ return {
update : element.update,
uuid : utility.uuid,
validate : validate.test,
version : "3.10.31",
version : "3.10.32",
walk : utility.walk,
when : utility.when
};
Expand Down
4 changes: 2 additions & 2 deletions lib/abaaso.map

Large diffs are not rendered by default.