\r
initialize: (options) ->\r
@page_status = options.page_status\r
- @counter = @page_status.counter\r
+ @count = @page_status.count\r
@current_page = @page_status.current_page\r
@per_page = @page_status.per_page\r
@window_size = @page_status.window_size\r
@params = @page_status.params\r
@parts = []\r
- _this = this\r
- @counter.fetch().done ->\r
- _this.total = _this.counter.get('count')\r
- _this.total_page = Math.floor(_this.total / _this.per_page) + 1\r
- if _this.total_page > 1\r
- _this.render()\r
+ @total = @count\r
+ @total_page = Math.floor(@total / @per_page) + 1\r
+ if @total_page > 1\r
+ @render()\r
\r
render: () ->\r
@parts = []\r
this.$el.html('')\r
_.each @parts, (part) ->\r
_this.$el.append(part.render().el)\r
- rb = new Pettanr.Tag.Div({class_name: 'row_break', content: ''})\r
+ rb = new Tag.RowBreak()\r
this.$el.append(rb.render().el)\r
this\r
\r
_.extend(my_params, @params)\r
my_params['page'] = 1\r
url = Pettanr.url(my_params['controller'], my_params['action'], my_params)\r
- linked_caption = new Pettanr.Tag.A({\r
+ linked_caption = new Tag.A({\r
attr: {href: '/' + url}, \r
handler_name: url,\r
content: '<<'\r
_.extend(my_params, @params)\r
my_params['page'] = @current_page - 1\r
url = Pettanr.url(my_params['controller'], my_params['action'], my_params)\r
- linked_caption = new Pettanr.Tag.A({\r
+ linked_caption = new Tag.A({\r
attr: {href: '/' + url}, \r
handler_name: url,\r
content: '<'\r
_.extend(my_params, @params)\r
my_params['page'] = @page\r
url = Pettanr.url(my_params['controller'], my_params['action'], my_params)\r
- linked_caption = new Pettanr.Tag.A({\r
+ linked_caption = new Tag.A({\r
attr: {href: '/' + url}, \r
handler_name: url,\r
content: @page\r
_.extend(my_params, @params)\r
my_params['page'] = @current_page + 1\r
url = Pettanr.url(my_params['controller'], my_params['action'], my_params)\r
- linked_caption = new Pettanr.Tag.A({\r
+ linked_caption = new Tag.A({\r
attr: {href: '/' + url}, \r
handler_name: url,\r
content: '>'\r
_.extend(my_params, @params)\r
my_params['page'] = @pager.total_page\r
url = Pettanr.url(my_params['controller'], my_params['action'], my_params)\r
- linked_caption = new Pettanr.Tag.A({\r
+ linked_caption = new Tag.A({\r
attr: {href: '/' + url}, \r
handler_name: url,\r
content: '>>'\r