Skip to content

Commit

Permalink
Meteor 1.3 update
Browse files Browse the repository at this point in the history
  • Loading branch information
alethes committed Apr 1, 2016
1 parent f666386 commit 8168af0
Show file tree
Hide file tree
Showing 18 changed files with 109 additions and 89 deletions.
13 changes: 1 addition & 12 deletions client/controllers.coffee
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
global = @

th = Template::helpers
@_TemplateHelpers = {}
Template::helpers = (dict) ->
global._TemplateHelpers[@viewName.substr 9] = dict
th.apply @, arguments

te = Template::events
@_TemplateEvents = {}
Template::events = (dict) ->
global._TemplateEvents[@viewName.substr 9] = dict
te.apply @, arguments

Template._pagesPageCont.helpers
divWrapper: (self) ->
!self.table and self.divWrapper
Expand Down Expand Up @@ -58,6 +46,7 @@ Template._pagesPage.helpers

Template._pagesNav.helpers
show: ->
console.log Template.parentData(), Template.instance()
@fastRender or (not @infinite and 1 < @sess "totalPages")
link: ->
self = @_p
Expand Down
4 changes: 0 additions & 4 deletions client/templates.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
<template name="pages">
</template>
<template name="pagesNav">
</template>
<template name="_pagesLoading">
<div class="pagesLoadingDefaultCont">
<div class="pagesLoadingDefault"><img src="/packages/alethes_pages/public/loader.gif"/></div>
Expand Down
6 changes: 6 additions & 0 deletions examples/basic/.meteor/.finished-upgraders
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@
notices-for-0.9.0
notices-for-0.9.1
0.9.4-platform-file
notices-for-facebook-graph-api-2
1.2.0-standard-minifiers-package
1.2.0-meteor-platform-split
1.2.0-cordova-changes
1.2.0-breaking-changes
1.3.0-split-minifiers-package
16 changes: 15 additions & 1 deletion examples/basic/.meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

meteor-platform
coffeescript
alethes:pages
meteor-base
mobile-experience
mongo
blaze-html-templates
session
jquery
tracker
logging
reload
random
ejson
spacebars
check
standard-minifier-css
standard-minifier-js
2 changes: 1 addition & 1 deletion examples/basic/.meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
METEOR@1.0.3.1
METEOR@1.3
121 changes: 71 additions & 50 deletions examples/basic/.meteor/versions
Original file line number Diff line number Diff line change
@@ -1,50 +1,71 @@
alethes:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
alethes:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
1 change: 0 additions & 1 deletion examples/basic/packages/alethes:pages

This file was deleted.

1 change: 0 additions & 1 deletion examples/changePerPage/packages/alethes:pages

This file was deleted.

1 change: 0 additions & 1 deletion examples/grounddb/packages/alethes:pages

This file was deleted.

1 change: 0 additions & 1 deletion examples/infinite/packages/alethes:pages

This file was deleted.

1 change: 0 additions & 1 deletion examples/iron-router/packages/alethes:pages

This file was deleted.

1 change: 0 additions & 1 deletion examples/multi-collection/packages/alethes:pages

This file was deleted.

1 change: 0 additions & 1 deletion examples/table/packages/alethes:pages

This file was deleted.

1 change: 0 additions & 1 deletion examples/test/packages/meteor-cucumber
Submodule meteor-cucumber deleted from 90a724
1 change: 0 additions & 1 deletion examples/test/packages/meteor-webdriver
Submodule meteor-webdriver deleted from 25352e
17 changes: 9 additions & 8 deletions lib/pages.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
divWrapper: [true, Match.OneOf(
Match.Optional(String)
Match.Optional(Boolean)
), "pagesCont"] #If defined, should be a name of the wrapper's CSS classname
), "pagesCont"] #If defined, should be the wrapper's CSS classname
fields: [true, Object, {}]
filters: [true, Object, {}]
itemTemplate: [true, String, "_pagesItemDefault"]
Expand Down Expand Up @@ -164,6 +164,7 @@
Meteor.userId?()
@countPages()
@reload()
@templateName ?= @name
Template[@templateName].onRendered =>
@setInfiniteTrigger() if @infinite

Expand Down Expand Up @@ -428,7 +429,7 @@

# Create a collection based on the instance's unique id

#@PaginatedCollection = new Mongo.Collection @id
# @PaginatedCollection = new Mongo.Collection @id

linkTo: (page)->
if Router.current()?.params
Expand Down Expand Up @@ -507,15 +508,15 @@
if @table and @itemTemplate is "_pagesItemDefault"
@itemTemplate = @tableItemTemplate

# Create a set of template prefixed by the unique id of this pagination instance
# The helper and events are set to those of the base versions of those templates (captured by controllers.coffee)

for i in [@navTemplate, @pageTemplate, @itemTemplate, @tableTemplate]
tn = @id + i
Template[tn] = new Blaze.Template "Template.#{tn}", Template[i].renderFunction
Template[tn].helpers _TemplateHelpers[i]
Template[tn].events _TemplateEvents[i]
Template[tn].helpers pagesData: @
Template[tn].__eventMaps = Template[tn].__eventMaps.concat Template[i].__eventMaps
helpers = pagesData: @
_.each Template[i].__helpers, (helper, name) =>
if name[0] is " "
helpers[name.slice(1)] = _.bind helper, @
Template[tn].helpers helpers

# Set our helpers on the main template set for this pagination

Expand Down
9 changes: 6 additions & 3 deletions package.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package.describe({
"name": "alethes:pages",
"summary": "State of the art, out of the box Meteor pagination",
"version": "1.8.4",
"version": "1.8.5",
"git": "https://github.com/alethes/meteor-pages"
});

Expand Down Expand Up @@ -32,9 +32,12 @@ Package.onUse(function(api){
api.addFiles([
"client/templates.html",
"client/controllers.coffee",
"client/main.css",
"public/loader.gif"
"client/main.css"
], "client");

api.addAssets([
"public/loader.gif"
], ["client"]);
});

Package.onTest(function(api){
Expand Down
1 change: 0 additions & 1 deletion pages

This file was deleted.

0 comments on commit 8168af0

Please sign in to comment.