Working on IR 1.0 update

This commit is contained in:
Sacha Greif 2014-11-17 11:01:37 +09:00
parent 570fca6fcb
commit 73cb59a088
14 changed files with 476 additions and 404 deletions

View file

@ -18,7 +18,7 @@ accounts-ui
# Atmosphere Packages
iron:router@1.0.1
iron:router
meteorhacks:fast-render
meteorhacks:subs-manager
@ -65,8 +65,9 @@ telescope-module-embedly
telescope-newsletter
telescope-daily
telescope-update-prompt
telescope-notifications
telescope-kadira
# telescope-notifications
# Accounts Templates
useraccounts:unstyled

View file

@ -39,17 +39,19 @@ html-tools@1.0.2
htmljs@1.0.2
http@1.0.8
id-map@1.0.1
iron:core@0.3.4
iron:dynamic-template@0.4.1
iron:layout@0.4.1
iron:router@0.9.4
iron:controller@1.0.0
iron:core@1.0.0
iron:dynamic-template@1.0.0
iron:layout@1.0.0
iron:location@1.0.1
iron:middleware-stack@1.0.0
iron:router@1.0.1
iron:url@1.0.0
jparker:crypto-core@0.1.0
jparker:crypto-md5@0.1.1
jparker:gravatar@0.3.0
jquery@1.0.1
json@1.0.1
kestanous:herald-email@0.2.1
kestanous:herald@0.6.0
launch-screen@1.0.0
less@1.0.11
livedata@1.0.11
@ -92,12 +94,10 @@ sacha:spin@2.0.4
service-configuration@1.0.2
session@1.0.4
sha@1.0.1
softwarerero:accounts-t9n@1.0.0
softwarerero:accounts-t9n@1.0.2
spacebars-compiler@1.0.3
spacebars@1.0.3
spiderable@1.0.5
splendido:accounts-templates-core@0.11.0
splendido:accounts-templates-unstyled@0.11.0
srp@1.0.1
standard-app-packages@1.0.3
stylus@1.0.5
@ -111,7 +111,6 @@ telescope-lib@0.2.9
telescope-module-embedly@0.2.9
telescope-module-share@0.0.0
telescope-newsletter@0.1.0
telescope-notifications@0.1.0
telescope-rss@0.0.0
telescope-search@0.0.0
telescope-tags@0.0.0
@ -124,5 +123,7 @@ twitter@1.1.2
ui@1.0.4
underscore@1.0.1
url@1.0.2
useraccounts:core@1.2.3
useraccounts:unstyled@1.2.3
webapp-hashing@1.0.1
webapp@1.1.4

View file

@ -42,5 +42,6 @@ Statuses={
};
Avatar.options = {
emailHashProperty: 'email_hash'
emailHashProperty: 'email_hash',
defaultAvatarUrl: '/img/default-avatar.png',
};

View file

@ -75,9 +75,3 @@ AccountsTemplates.configure({
showPlaceholders: true,
*/
});
// Initialization
Meteor.startup(function(){
AccountsTemplates.init();
});

View file

@ -6,7 +6,7 @@ getCurrentTemplate = function() {
return Router.current().lookupTemplate();
};
getCurrentRoute = function() {
return Router._currentController.path;
return Router.current().url;
};
t=function(message){
var d=new Date();

View file

@ -124,6 +124,11 @@ Router._filters = {
}
},
clearSeenErrors: function () {
clearSeenErrors();
this.next();
},
resetScroll: function () {
var scrollTo = window.currentScroll || 0;
var $body = $('body');
@ -255,8 +260,8 @@ if(Meteor.isClient){
// Before Hooks
// Router.onBeforeAction(filters.isReady);
Router.onBeforeAction(clearSeenErrors);
Router.onBeforeAction(filters.isReady);
Router.onBeforeAction(filters.clearSeenErrors);
Router.onBeforeAction(filters.canView, {except: ['atSignIn', 'atSignUp', 'atForgotPwd', 'atResetPwd', 'signOut']});
Router.onBeforeAction(filters.hasCompletedProfile);
Router.onBeforeAction(filters.isLoggedIn, {only: ['post_submit']});
@ -288,7 +293,7 @@ if(Meteor.isClient){
PostsListController = FastRender.RouteController.extend({
template: getTemplate('posts_list'),
onBeforeAction: function () {
subscriptions: function () {
// take the first segment of the path to get the view, unless it's '/' in which case the view default to 'top'
// note: most of the time this.params.slug will be empty
this._terms = {
@ -302,10 +307,7 @@ PostsListController = FastRender.RouteController.extend({
}
this.postsListSub = coreSubscriptions.subscribe('postsList', this._terms);
return [
this.postsListSub,
coreSubscriptions.subscribe('postsListUsers', this._terms)
];
this.postsListUsersSub = coreSubscriptions.subscribe('postsListUsers', this._terms);
},
data: function () {
this._terms = {
@ -402,6 +404,9 @@ PostsDigestController = FastRender.RouteController.extend({
// Controller for post pages
PostPageController = FastRender.RouteController.extend({
template: getTemplate('post_page'),
waitOn: function() {
this.postSubscription = coreSubscriptions.subscribe('singlePost', this.params._id);
this.postUsersSubscription = coreSubscriptions.subscribe('postUsers', this.params._id);
@ -497,8 +502,6 @@ var getDefaultViewController = function () {
//--------------------------------------------------------------------------------------------------//
Meteor.startup(function () {
Router.map(function() {
// -------------------------------------------- Post Lists -------------------------------------------- //
Router.route('/', {
@ -545,7 +548,7 @@ Meteor.startup(function () {
});
Router.route('/digest', {
name: 'posts_digest',
name: 'posts_digest_default',
controller: PostsDigestController
});
@ -556,13 +559,11 @@ Meteor.startup(function () {
Router.route('/posts/:_id', {
name: 'post_page',
template: getTemplate('post_page'),
controller: PostPageController
});
Router.route('/posts/:_id/comment/:commentId', {
name: 'post_page',
template: getTemplate('post_page'),
name: 'post_page_comment',
controller: PostPageController,
onAfterAction: function () {
// TODO: scroll to comment position
@ -813,8 +814,6 @@ Meteor.startup(function () {
});
});
});
// adding common subscriptions that's need to be loaded on all the routes
// notification does not included here since it is not much critical and
// it might have considerable amount of docs

View file

@ -72,21 +72,37 @@
"id-map",
"1.0.1"
],
[
"iron:controller",
"1.0.0"
],
[
"iron:core",
"0.3.4"
"1.0.0"
],
[
"iron:dynamic-template",
"0.4.1"
"1.0.0"
],
[
"iron:layout",
"0.4.1"
"1.0.0"
],
[
"iron:location",
"1.0.1"
],
[
"iron:middleware-stack",
"1.0.0"
],
[
"iron:router",
"0.9.4"
"1.0.1"
],
[
"iron:url",
"1.0.0"
],
[
"jquery",

View file

@ -76,21 +76,37 @@
"id-map",
"1.0.1"
],
[
"iron:controller",
"1.0.0"
],
[
"iron:core",
"0.3.4"
"1.0.0"
],
[
"iron:dynamic-template",
"0.4.1"
"1.0.0"
],
[
"iron:layout",
"0.4.1"
"1.0.0"
],
[
"iron:location",
"1.0.1"
],
[
"iron:middleware-stack",
"1.0.0"
],
[
"iron:router",
"0.9.4"
"1.0.1"
],
[
"iron:url",
"1.0.0"
],
[
"jquery",

View file

@ -10,8 +10,8 @@ Package.onUse(function (api) {
'telescope-lib',
'telescope-base',
'telescope-email',
'kestanous:herald@0.6.0',
'kestanous:herald-email@0.2.1'
'kestanous:herald',
'kestanous:herald-email'
], ['client', 'server']);
api.use([

View file

@ -1,12 +1,16 @@
{
"dependencies": [
[
"accounts-base",
"1.1.2"
],
[
"application-configuration",
"1.0.3"
],
[
"autoupdate",
"1.1.3"
"artwells:queue",
"0.0.3"
],
[
"base64",
@ -52,10 +56,6 @@
"ejson",
"1.0.4"
],
[
"fastclick",
"1.0.1"
],
[
"follower-livedata",
"1.0.2"
@ -76,29 +76,41 @@
"htmljs",
"1.0.2"
],
[
"http",
"1.0.8"
],
[
"id-map",
"1.0.1"
],
[
"iron:controller",
"1.0.0"
],
[
"iron:core",
"0.3.4"
"1.0.0"
],
[
"iron:dynamic-template",
"0.4.1"
"1.0.0"
],
[
"iron:layout",
"0.4.1"
"1.0.0"
],
[
"iron:location",
"1.0.1"
],
[
"iron:middleware-stack",
"1.0.0"
],
[
"iron:router",
"0.9.4"
"1.0.1"
],
[
"iron:url",
"1.0.0"
],
[
"jquery",
@ -110,20 +122,20 @@
],
[
"kestanous:herald",
"0.6.0"
"1.1.3"
],
[
"kestanous:herald-email",
"0.2.1"
],
[
"launch-screen",
"1.0.0"
"0.4.2"
],
[
"livedata",
"1.0.11"
],
[
"localstorage",
"1.0.1"
],
[
"logging",
"1.0.5"
@ -132,10 +144,6 @@
"meteor",
"1.1.3"
],
[
"meteor-platform",
"1.2.0"
],
[
"minifiers",
"1.1.2"
@ -144,14 +152,14 @@
"minimongo",
"1.0.5"
],
[
"mobile-status-bar",
"1.0.1"
],
[
"mongo",
"1.0.8"
],
[
"mongo-livedata",
"1.0.6"
],
[
"observe-sequence",
"1.0.3"
@ -172,10 +180,6 @@
"reactive-var",
"1.0.3"
],
[
"reload",
"1.1.1"
],
[
"retry",
"1.0.1"
@ -185,8 +189,8 @@
"1.0.2"
],
[
"session",
"1.0.4"
"service-configuration",
"1.0.2"
],
[
"spacebars",
@ -196,10 +200,6 @@
"spacebars-compiler",
"1.0.3"
],
[
"standard-app-packages",
"1.0.3"
],
[
"telescope-base",
"0.0.0"
@ -232,10 +232,6 @@
"underscore",
"1.0.1"
],
[
"url",
"1.0.2"
],
[
"webapp",
"1.1.4"

View file

@ -68,21 +68,37 @@
"id-map",
"1.0.1"
],
[
"iron:controller",
"1.0.0"
],
[
"iron:core",
"0.3.4"
"1.0.0"
],
[
"iron:dynamic-template",
"0.4.1"
"1.0.0"
],
[
"iron:layout",
"0.4.1"
"1.0.0"
],
[
"iron:location",
"1.0.1"
],
[
"iron:middleware-stack",
"1.0.0"
],
[
"iron:router",
"0.9.4"
"1.0.1"
],
[
"iron:url",
"1.0.0"
],
[
"jquery",

View file

@ -68,21 +68,37 @@
"id-map",
"1.0.1"
],
[
"iron:controller",
"1.0.0"
],
[
"iron:core",
"0.3.4"
"1.0.0"
],
[
"iron:dynamic-template",
"0.4.1"
"1.0.0"
],
[
"iron:layout",
"0.4.1"
"1.0.0"
],
[
"iron:location",
"1.0.1"
],
[
"iron:middleware-stack",
"1.0.0"
],
[
"iron:router",
"0.9.4"
"1.0.1"
],
[
"iron:url",
"1.0.0"
],
[
"jquery",

View file

@ -68,21 +68,37 @@
"id-map",
"1.0.1"
],
[
"iron:controller",
"1.0.0"
],
[
"iron:core",
"0.3.4"
"1.0.0"
],
[
"iron:dynamic-template",
"0.4.1"
"1.0.0"
],
[
"iron:layout",
"0.4.1"
"1.0.0"
],
[
"iron:location",
"1.0.1"
],
[
"iron:middleware-stack",
"1.0.0"
],
[
"iron:router",
"0.9.4"
"1.0.1"
],
[
"iron:url",
"1.0.0"
],
[
"jquery",

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB