Permalink
Browse files

cleaning up fields, element naming for request paging example

  • Loading branch information...
1 parent 5646614 commit 7ddb6e5bac829a7e624008eb785909f29e4d669b @addyosmani addyosmani committed Mar 25, 2012
View
4 examples/netflix-client-paging/collections/tagsClient.js
@@ -23,8 +23,6 @@
// how many results to display per 'client page'
displayPerPage: '20',
- // maximum number of pages that can be queried from the server
- totalPages: '10',
// a default. This should be overridden in the collection's parse()
// sort direction
sortDirection: 'asc',
@@ -49,7 +47,7 @@
// Be sure to change this based on how your results
// are structured
var tags = response.d.results;
- //this.queryParams.totalPages = response.d.__count;
+ //this.totalPages = response.d.__count;
return tags;
}
View
4 examples/netflix-request-paging/collections/tagsRequest.js
@@ -19,8 +19,10 @@
// how many results to query from the service
perPage: 30,
- // maximum number of pages that can be queried from the server
+ // maximum number of pages that can be queried from the server (default)
+ // in case the server doesn't return a value.
totalPages: 10,
+
// a default. This should be overridden in the collection's parse()
// sort direction
sortDirection: 'asc',
View
4 examples/netflix-request-paging/index.html
@@ -19,10 +19,10 @@
<h3>NetFlix movies</h3>
- <ul id="content2">
+ <ul id="content">
</ul>
- <div id="pagination2">
+ <div id="pagination">
</div>
<div class="alert-message block-message warning">
View
2 examples/netflix-request-paging/views/TagsRequest.js
@@ -1,6 +1,6 @@
(function ( views ) {
views.TagsRequest = Backbone.View.extend({
- el : '#content2',
+ el : '#content',
initialize : function () {
_.bindAll (this, 'render', 'addAll', 'addOne');
View
2 examples/netflix-request-paging/views/requestPagination.js
@@ -18,7 +18,7 @@
this.collection.on('reset', this.render, this);
this.collection.on('change', this.render, this);
this.tmpl = _.template($('#tmpServerPagination').html());
- $(this.el).appendTo('#pagination2');
+ $(this.el).appendTo('#pagination');
},

0 comments on commit 7ddb6e5

Please sign in to comment.