pagers = {\r
default: Locmare.ListGroupModule.LibModule.PagerModule.Default,\r
offset: Locmare.ListGroupModule.LibModule.PagerModule.Offset,\r
- unlimited: Locmare.ListGroupModule.LibModule.PagerModule.Unlimited\r
+ unlimited: Locmare.ListGroupModule.LibModule.PagerModule.Unlimited,\r
+ more: Locmare.ListGroupModule.LibModule.PagerModule.More\r
}\r
c = pagers[page_status.type]\r
return null if not page_status.total_page\r
content: () ->\r
'>>'\r
\r
+class Locmare.ListGroupModule.LibModule.PagerModule.More extends Backbone.View\r
+ tagName: 'div'\r
+ className: 'pagination'\r
+ \r
+ initialize: (options) ->\r
+ @params = options.params\r
+ \r
+ @controller = Manifest.manifest().controllers[@params['controller']]\r
+ @action = @controller.actions[@params['action']]\r
+ @action = @action.original if @action.original\r
+ \r
+ render: () ->\r
+ this.$el.html('')\r
+ linked_caption = new Tag.A({\r
+ attr: {href: '/' + @url()}, \r
+ content: 'More...'\r
+ })\r
+ @listenTo(linked_caption, 'click', @click)\r
+ this.$el.html(linked_caption.render().el)\r
+ this\r
+ \r
+ url: () ->\r
+ @action.url @params\r
+ \r
+ click: () ->\r
+ @trigger('http_get', @url())\r
+ \r