From f4c4f9261f825cbc710340316f4cc19cd0c9deb3 Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Mon, 25 Jul 2016 10:46:43 +0900 Subject: [PATCH 01/60] test for postedAt (for pending posts) --- packages/nova-posts/lib/callbacks.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nova-posts/lib/callbacks.js b/packages/nova-posts/lib/callbacks.js index 333773a38..fad9f402c 100644 --- a/packages/nova-posts/lib/callbacks.js +++ b/packages/nova-posts/lib/callbacks.js @@ -224,7 +224,7 @@ Telescope.callbacks.add("posts.new.sync", PostsNewRequiredPropertiesCheck); * @summary Set the post's isFuture to true if necessary */ function PostsNewSetFuture (post, user) { - post.isFuture = post.postedAt.getTime() > post.createdAt.getTime() + 1000; // round up to the second + post.isFuture = post.postedAt && post.postedAt.getTime() > post.createdAt.getTime() + 1000; // round up to the second return post; } Telescope.callbacks.add("posts.new.sync", PostsNewSetFuture); @@ -331,7 +331,7 @@ Telescope.callbacks.add("posts.edit.sync", PostsEditForceStickyToFalse); */ function PostsEditSetIsFuture (modifier, post) { // if a post's postedAt date is in the future, set isFuture to true - modifier.$set.isFuture = modifier.$set.postedAt.getTime() > new Date().getTime() + 1000; + modifier.$set.isFuture = modifier.$set.postedAt && modifier.$set.postedAt.getTime() > new Date().getTime() + 1000; return modifier; } Telescope.callbacks.add("posts.edit.sync", PostsEditSetIsFuture); From fcdb1d89f81d164f3db00cd16c852eb7254b8c8c Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Tue, 26 Jul 2016 17:45:29 +0900 Subject: [PATCH 02/60] 1.4 upgrade --- .meteor/.finished-upgraders | 2 + .meteor/.gitignore | 1 + .meteor/release | 2 +- .meteor/versions | 134 +++++++++--------- packages/nova-base-styles/package.js | 2 +- packages/nova-debug/package.js | 2 +- packages/nova-embedly/package.js | 2 +- packages/nova-forms/package.js | 2 +- packages/nova-kadira/package.js | 2 +- .../nova-rss/.npm/package/npm-shrinkwrap.json | 12 +- 10 files changed, 86 insertions(+), 75 deletions(-) diff --git a/.meteor/.finished-upgraders b/.meteor/.finished-upgraders index dacc2c0d7..3e712bc5a 100644 --- a/.meteor/.finished-upgraders +++ b/.meteor/.finished-upgraders @@ -11,3 +11,5 @@ notices-for-facebook-graph-api-2 1.2.0-cordova-changes 1.2.0-breaking-changes 1.3.0-split-minifiers-package +1.3.5-remove-old-dev-bundle-link +1.4.0-remove-old-dev-bundle-link diff --git a/.meteor/.gitignore b/.meteor/.gitignore index 08150d000..7df9c115c 100644 --- a/.meteor/.gitignore +++ b/.meteor/.gitignore @@ -1,2 +1,3 @@ +dev_bundle local meteorite diff --git a/.meteor/release b/.meteor/release index 940e0b5d4..810628dc6 100644 --- a/.meteor/release +++ b/.meteor/release @@ -1 +1 @@ -METEOR@1.3.2.4 +METEOR@1.4 diff --git a/.meteor/versions b/.meteor/versions index 0782ca7d6..d41637fb2 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -1,74 +1,74 @@ -accounts-base@1.2.7 -accounts-password@1.1.8 +accounts-base@1.2.9 +accounts-password@1.1.13 aldeed:collection2@2.9.1 aldeed:collection2-core@1.1.1 aldeed:schema-deny@1.0.1 aldeed:schema-index@1.0.1 aldeed:simple-schema@1.5.3 -allow-deny@1.0.4 -autoupdate@1.2.9 -babel-compiler@6.6.4 -babel-runtime@0.1.8 -base64@1.0.8 -binary-heap@1.0.8 -blaze@2.1.7 -blaze-tools@1.0.8 -boilerplate-generator@1.0.8 -caching-compiler@1.0.4 -callback-hook@1.0.8 -check@1.2.1 +allow-deny@1.0.5 +autoupdate@1.2.11 +babel-compiler@6.9.0 +babel-runtime@0.1.10 +base64@1.0.9 +binary-heap@1.0.9 +blaze@2.1.8 +blaze-tools@1.0.9 +boilerplate-generator@1.0.9 +caching-compiler@1.0.6 +callback-hook@1.0.9 +check@1.2.3 chuangbo:cookie@1.1.0 -coffeescript@1.0.17 +coffeescript@1.1.4 dburles:collection-helpers@1.0.4 ddp@1.2.5 -ddp-client@1.2.7 -ddp-common@1.2.5 -ddp-rate-limiter@1.0.4 -ddp-server@1.2.6 +ddp-client@1.2.9 +ddp-common@1.2.6 +ddp-rate-limiter@1.0.5 +ddp-server@1.2.10 deps@1.0.12 -diff-sequence@1.0.5 -ecmascript@0.4.3 -ecmascript-runtime@0.2.10 -ejson@1.0.11 -email@1.0.12 +diff-sequence@1.0.6 +ecmascript@0.5.7 +ecmascript-runtime@0.3.12 +ejson@1.0.12 +email@1.0.16 fortawesome:fontawesome@4.5.0 -fourseven:scss@3.4.3 -geojson-utils@1.0.8 +fourseven:scss@3.8.0_1 +geojson-utils@1.0.9 hot-code-push@1.0.4 -html-tools@1.0.9 -htmljs@1.0.9 -http@1.1.5 -id-map@1.0.7 +html-tools@1.0.10 +htmljs@1.0.10 +http@1.1.8 +id-map@1.0.8 jparker:crypto-core@0.1.0 jparker:crypto-md5@0.1.1 jparker:gravatar@0.5.1 -jquery@1.11.8 +jquery@1.11.9 kadira:debug@3.2.2 kadira:runtime-dev@0.0.1 livedata@1.0.18 -localstorage@1.0.9 -logging@1.0.12 -matb33:collection-hooks@0.8.1 +localstorage@1.0.11 +logging@1.1.14 +matb33:collection-hooks@0.8.3 mdg:validation-error@0.2.0 -meteor@1.1.14 +meteor@1.2.16 meteor-base@1.0.4 meteorhacks:fast-render@2.14.0 meteorhacks:inject-data@2.0.0 meteorhacks:inject-initial@1.0.4 -meteorhacks:kadira@2.28.7 +meteorhacks:kadira@2.30.0 meteorhacks:kadira-binary-deps@1.4.0 meteorhacks:kadira-profiler@1.2.1 meteorhacks:meteorx@1.4.1 meteorhacks:picker@1.0.3 meteorhacks:subs-manager@1.6.4 meteorhacks:unblock@1.1.0 -minifier-css@1.1.11 -minifier-js@1.1.11 -minimongo@1.0.16 -modules@0.6.1 -modules-runtime@0.6.3 -mongo@1.1.7 -mongo-id@1.0.4 +minifier-css@1.1.13 +minifier-js@1.1.13 +minimongo@1.0.17 +modules@0.7.5 +modules-runtime@0.7.5 +mongo@1.1.10 +mongo-id@1.0.5 mongo-livedata@1.0.12 nova:api@0.26.5-nova nova:base-components@0.26.5-nova @@ -95,46 +95,46 @@ nova:search@0.26.5-nova nova:settings@0.26.5-nova nova:users@0.26.5-nova nova:voting@0.26.5-nova -npm-bcrypt@0.8.7 -npm-mongo@1.4.43 -observe-sequence@1.0.11 -ordered-dict@1.0.7 +npm-bcrypt@0.8.6_3 +npm-mongo@1.5.45 +observe-sequence@1.0.12 +ordered-dict@1.0.8 peerlibrary:assert@0.2.5 peerlibrary:fiber-utils@0.6.0 peerlibrary:reactive-mongo@0.1.1 peerlibrary:reactive-publish@0.2.0 peerlibrary:server-autorun@0.5.2 percolatestudio:synced-cron@1.1.0 -promise@0.6.7 +promise@0.8.3 raix:eventemitter@0.1.3 -random@1.0.9 -rate-limit@1.0.4 +random@1.0.10 +rate-limit@1.0.5 react-meteor-data@0.2.9 -reactive-dict@1.1.7 -reactive-var@1.0.9 +reactive-dict@1.1.5 +reactive-var@1.0.10 reactrouter:react-router-ssr@3.1.4 -reload@1.1.8 -retry@1.0.7 -routepolicy@1.0.10 -service-configuration@1.0.9 -session@1.1.5 -sha@1.0.7 +reload@1.1.10 +retry@1.0.8 +routepolicy@1.0.11 +service-configuration@1.0.10 +session@1.1.3 +sha@1.0.8 softwarerero:accounts-t9n@1.3.4 -spacebars@1.0.11 -spacebars-compiler@1.0.11 -srp@1.0.8 -standard-minifier-css@1.0.6 -standard-minifier-js@1.0.6 +spacebars@1.0.12 +spacebars-compiler@1.0.12 +srp@1.0.9 +standard-minifier-css@1.0.8 +standard-minifier-js@1.0.8 standard-minifiers@1.0.6 std:accounts-ui@1.2.6 tmeasday:check-npm-versions@0.3.1 tmeasday:publish-counts@0.7.3 -tracker@1.0.13 +tracker@1.1.0 ui@1.0.11 -underscore@1.0.8 -url@1.0.9 +underscore@1.0.9 +url@1.0.10 utilities:react-list-container@0.1.12 utilities:smart-methods@0.1.5 utilities:smart-publications@0.1.4 -webapp@1.2.8 +webapp@1.3.10 webapp-hashing@1.0.9 diff --git a/packages/nova-base-styles/package.js b/packages/nova-base-styles/package.js index 3e817b858..aa81d8726 100644 --- a/packages/nova-base-styles/package.js +++ b/packages/nova-base-styles/package.js @@ -11,7 +11,7 @@ Package.onUse(function (api) { api.use([ 'nova:core@0.26.5-nova', - 'fourseven:scss@3.4.1', + 'fourseven:scss@3.8.0_1', // 'juliancwirko:postcss@1.0.0-rc.4', // 'seba:minifiers-autoprefixer@0.0.1', // 'twbs:bootstrap@=4.0.0-alpha.2' diff --git a/packages/nova-debug/package.js b/packages/nova-debug/package.js index 5dadc23bf..588191417 100644 --- a/packages/nova-debug/package.js +++ b/packages/nova-debug/package.js @@ -11,7 +11,7 @@ Package.onUse(function (api) { api.use([ - 'fourseven:scss@3.4.1', + 'fourseven:scss@3.8.0_1', // Nova packages diff --git a/packages/nova-embedly/package.js b/packages/nova-embedly/package.js index e41bc5e60..93e7da5ed 100644 --- a/packages/nova-embedly/package.js +++ b/packages/nova-embedly/package.js @@ -13,7 +13,7 @@ Package.onUse( function(api) { 'nova:core@0.26.5-nova', 'nova:posts@0.26.5-nova', 'nova:users@0.26.5-nova', - 'fourseven:scss@3.4.1' + 'fourseven:scss@3.8.0_1' ]); api.addFiles([ diff --git a/packages/nova-forms/package.js b/packages/nova-forms/package.js index 2def62361..b6261ab07 100644 --- a/packages/nova-forms/package.js +++ b/packages/nova-forms/package.js @@ -14,7 +14,7 @@ Package.onUse(function(api) { 'check', 'aldeed:simple-schema@1.5.3', 'aldeed:collection2@2.8.0', - 'fourseven:scss@3.4.1' + 'fourseven:scss@3.8.0_1' ]); api.addFiles([ diff --git a/packages/nova-kadira/package.js b/packages/nova-kadira/package.js index 28267eb57..1d607a028 100644 --- a/packages/nova-kadira/package.js +++ b/packages/nova-kadira/package.js @@ -11,7 +11,7 @@ Package.onUse(function (api) { api.use([ 'nova:core@0.26.5-nova', - 'meteorhacks:kadira@2.28.5', + 'meteorhacks:kadira@2.30.0', 'kadira:debug@3.2.2', 'meteorhacks:kadira-profiler@1.2.1' ], ['client', 'server']); diff --git a/packages/nova-rss/.npm/package/npm-shrinkwrap.json b/packages/nova-rss/.npm/package/npm-shrinkwrap.json index 353d8f7c6..96d869564 100644 --- a/packages/nova-rss/.npm/package/npm-shrinkwrap.json +++ b/packages/nova-rss/.npm/package/npm-shrinkwrap.json @@ -2,17 +2,25 @@ "dependencies": { "rss": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/rss/-/rss-1.1.1.tgz", + "from": "rss@1.1.1", "dependencies": { "mime-types": { "version": "2.1.3", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.3.tgz", + "from": "mime-types@2.1.3", "dependencies": { "mime-db": { - "version": "1.15.0" + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.15.0.tgz", + "from": "mime-db@1.15.0" } } }, "xml": { - "version": "1.0.0" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.0.tgz", + "from": "xml@1.0.0" } } } From e81346ee1617ed1c34526b7b5eee150211d7e452 Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Tue, 26 Jul 2016 18:11:11 +0900 Subject: [PATCH 03/60] update kadira-binary-deps --- .meteor/versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.meteor/versions b/.meteor/versions index d41637fb2..b0975381f 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -56,7 +56,7 @@ meteorhacks:fast-render@2.14.0 meteorhacks:inject-data@2.0.0 meteorhacks:inject-initial@1.0.4 meteorhacks:kadira@2.30.0 -meteorhacks:kadira-binary-deps@1.4.0 +meteorhacks:kadira-binary-deps@1.5.0 meteorhacks:kadira-profiler@1.2.1 meteorhacks:meteorx@1.4.1 meteorhacks:picker@1.0.3 From 2cf061b28234f5682ec1b903b2683e6a5f33d73d Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Wed, 27 Jul 2016 13:06:57 +0900 Subject: [PATCH 04/60] fix missing daily route --- packages/nova-base-routes/lib/routes.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/nova-base-routes/lib/routes.jsx b/packages/nova-base-routes/lib/routes.jsx index 1ee617c50..ee4c52e37 100644 --- a/packages/nova-base-routes/lib/routes.jsx +++ b/packages/nova-base-routes/lib/routes.jsx @@ -14,6 +14,7 @@ Telescope.routes.indexRoute = { name: "posts.list", component: Telescope.compone Meteor.startup(() => { Telescope.routes.add([ + {name:"posts.daily", path:"daily", component:Telescope.components.PostsDaily}, {name:"posts.single", path:"posts/:_id(/:slug)", component:Telescope.components.PostsSingle}, {name:"users.single", path:"users/:slug", component:Telescope.components.UsersSingle}, {name:"users.account", path:"account", component:Telescope.components.UsersAccount}, From 83ec78ef39e23c21a0a8a9c793fe7a615ddaabc6 Mon Sep 17 00:00:00 2001 From: schabluk Date: Wed, 27 Jul 2016 10:38:43 +0200 Subject: [PATCH 05/60] simple refactoring --- .../lib/custom_fields.js | 67 +++++++++++++++ .../_nova-subscribe-to-posts/lib/methods.js | 86 +++++++++++++++++++ packages/_nova-subscribe-to-posts/package.js | 42 ++++----- 3 files changed, 175 insertions(+), 20 deletions(-) create mode 100644 packages/_nova-subscribe-to-posts/lib/custom_fields.js create mode 100644 packages/_nova-subscribe-to-posts/lib/methods.js diff --git a/packages/_nova-subscribe-to-posts/lib/custom_fields.js b/packages/_nova-subscribe-to-posts/lib/custom_fields.js new file mode 100644 index 000000000..8575cb9fe --- /dev/null +++ b/packages/_nova-subscribe-to-posts/lib/custom_fields.js @@ -0,0 +1,67 @@ +import PublicationUtils from 'meteor/utilities:smart-publications' +import Posts from "meteor/nova:posts" +import Users from "meteor/nova:users" + +// check if user can subscribe to post +const canSubscribe = user => Users.canDo(user, "posts.new"); + +Users.addField({ + fieldName: 'telescope.subscribedItems', + fieldSchema: { + type: Object, + optional: true, + blackbox: true, + autoform: { + omit: true + } + } +}); + +PublicationUtils.addToFields( + Users.publishedFields.list, ["telescope.subscribedItems"] +) + +Posts.addField( + { + fieldName: 'subscribers', + fieldSchema: { + type: [String], + control: "checkboxgroup", + optional: true, + insertableIf: canSubscribe, + autoform: { + // omit: true + noselect: true, + type: "bootstrap-category", + order: 50, + options: function () { + var subscribers = [{ + value: "123", + label: "razdwatrzy" + }]; + return subscribers; + } + }, + publish: true, + join: { + joinAs: "subscribersArray", + collection: () => Users + } + } + } +); + +Posts.addField({ + fieldName: 'subscriberCount', + fieldSchema: { + type: Number, + optional: true, + autoform: { + omit: true + } + } +}); + +PublicationUtils.addToFields( + Posts.publishedFields.list, ["subscribers", "subscriberCount"] +) diff --git a/packages/_nova-subscribe-to-posts/lib/methods.js b/packages/_nova-subscribe-to-posts/lib/methods.js new file mode 100644 index 000000000..8afdceeb6 --- /dev/null +++ b/packages/_nova-subscribe-to-posts/lib/methods.js @@ -0,0 +1,86 @@ +import Posts from "meteor/nova:posts"; +import Users from 'meteor/nova:users'; + +var hasSubscribedItem = function (item, user) { + return item.subscribers && item.subscribers.indexOf(user._id) != -1; +}; + +var addSubscribedItem = function (userId, item, collectionName) { + var field = 'telescope.subscribedItems.' + collectionName; + var add = {}; + add[field] = item; + Meteor.users.update({_id: userId}, { + $addToSet: add + }); +}; + +var removeSubscribedItem = function (userId, itemId, collectionName) { + var field = 'telescope.subscribedItems.' + collectionName; + var remove = {}; + remove[field] = {itemId: itemId}; + Meteor.users.update({_id: userId}, { + $pull: remove + }); +}; + +subscribeItem = function (collection, itemId, user) { + + var item = collection.findOne(itemId), + collectionName = collection._name.slice(0,1).toUpperCase() + collection._name.slice(1); + + if (!user || !item || hasSubscribedItem(item, user)) + return false; + + // author can't subscribe item + if (item.userId && item.userId === user._id) + return false + + // Subscribe + var result = collection.update({_id: itemId, subscribers: { $ne: user._id }}, { + $addToSet: {subscribers: user._id}, + $inc: {subscriberCount: 1} + }); + + if (result > 0) { + // Add item to list of subscribed items + var obj = { + itemId: item._id, + subscribedAt: new Date() + }; + addSubscribedItem(user._id, obj, collectionName); + } + + return true; +}; + +unsubscribeItem = function (collection, itemId, user) { + var user = Meteor.user(), + item = collection.findOne(itemId), + collectionName = collection._name.slice(0,1).toUpperCase()+collection._name.slice(1); + + if (!user || !item || !hasSubscribedItem(item, user)) + return false; + + // Unsubscribe + var result = collection.update({_id: itemId, subscribers: user._id }, { + $pull: {subscribers: user._id}, + $inc: {subscriberCount: -1} + }); + + if (result > 0) { + // Remove item from list of subscribed items + removeSubscribedItem(user._id, itemId, collectionName); + } + return true; +}; + +Meteor.methods({ + subscribePost: function(postId) { + check(postId, String); + return subscribeItem.call(this, Posts, postId, Meteor.user()); + }, + unsubscribePost: function(postId) { + check(postId, String); + return unsubscribeItem.call(this, Posts, postId, Meteor.user()); + } +}); diff --git a/packages/_nova-subscribe-to-posts/package.js b/packages/_nova-subscribe-to-posts/package.js index b946d9b3a..021ffce5e 100644 --- a/packages/_nova-subscribe-to-posts/package.js +++ b/packages/_nova-subscribe-to-posts/package.js @@ -20,24 +20,26 @@ Package.onUse(function (api) { // i18n config (must come first) - api.addFiles([ - 'package-tap.i18n' - ], ['client', 'server']); + // api.addFiles([ + // 'package-tap.i18n' + // ], ['client', 'server']); // both api.addFiles([ - 'lib/subscribe-to-posts.js', + // 'lib/subscribe-to-posts.js',', + 'lib/custom_fields.js', + 'lib/methods.js' ], ['client', 'server']); // client - api.addFiles([ - 'lib/client/templates/post_subscribe.html', - 'lib/client/templates/post_subscribe.js', - 'lib/client/templates/user_subscribed_posts.html', - 'lib/client/templates/user_subscribed_posts.js' - ], ['client']); + // api.addFiles([ + // 'lib/client/templates/post_subscribe.html', + // 'lib/client/templates/post_subscribe.js', + // 'lib/client/templates/user_subscribed_posts.html', + // 'lib/client/templates/user_subscribed_posts.js' + // ], ['client']); // server @@ -47,15 +49,15 @@ Package.onUse(function (api) { // i18n languages (must come last) - var languages = ["ar", "bg", "cs", "da", "de", "el", "en", "es", "et", "fr", "hu", "id", "it", "ja", "kk", "ko", "nl", "pl", "pt-BR", "ro", "ru", "sl", "sv", "th", "tr", "vi", "zh-CN"]; - var languagesPaths = languages.map(function (language) { - return "i18n/"+language+".i18n.json"; - }); - api.addFiles(languagesPaths, ["client", "server"]); - - api.export([ - 'subscribeItem', - 'unsubscribeItem' - ]); + // var languages = ["ar", "bg", "cs", "da", "de", "el", "en", "es", "et", "fr", "hu", "id", "it", "ja", "kk", "ko", "nl", "pl", "pt-BR", "ro", "ru", "sl", "sv", "th", "tr", "vi", "zh-CN"]; + // var languagesPaths = languages.map(function (language) { + // return "i18n/"+language+".i18n.json"; + // }); + // api.addFiles(languagesPaths, ["client", "server"]); + // + // api.export([ + // 'subscribeItem', + // 'unsubscribeItem' + // ]); }); From 54c1c1764323a2a2eb2565686f33724f76b6cfe3 Mon Sep 17 00:00:00 2001 From: schabluk Date: Wed, 27 Jul 2016 10:42:25 +0200 Subject: [PATCH 06/60] add observe button --- .../lib/components/CustomPostsItem.jsx | 78 ++++++++++++++++--- 1 file changed, 67 insertions(+), 11 deletions(-) diff --git a/packages/my-custom-package/lib/components/CustomPostsItem.jsx b/packages/my-custom-package/lib/components/CustomPostsItem.jsx index f078f9657..0e2d04398 100644 --- a/packages/my-custom-package/lib/components/CustomPostsItem.jsx +++ b/packages/my-custom-package/lib/components/CustomPostsItem.jsx @@ -1,6 +1,6 @@ import React, { PropTypes, Component } from 'react'; import { FormattedMessage, FormattedRelative } from 'react-intl'; -import { Button } from 'react-bootstrap'; +import { Button, Tooltip } from 'react-bootstrap'; import moment from 'moment'; import { ModalTrigger } from "meteor/nova:core"; import { Link } from 'react-router'; @@ -9,11 +9,64 @@ import Categories from "meteor/nova:categories"; class CustomPostsItem extends Telescope.components.PostsItem { + constructor(props, context) { + super(props, context); + + this.renderSubscribeButton = this.renderSubscribeButton.bind(this); + this.onSubscribe = this.onSubscribe.bind(this); + this.isSubscribed = this.isSubscribed.bind(this); + } + + isSubscribed(post, user) { + if (!post || !user) + return false; + return post.subscribers && post.subscribers.indexOf(user._id) != -1; + } + + renderSubscribeButton() { + const post = this.props.post; + const user = this.context.currentUser; + + let btnStyle = "default"; + + let isSubscribed = this.isSubscribed(post, user); + if( isSubscribed ) { + btnStyle = "info"; + } + + return ( + + ) + } + + onSubscribe() { + const post = this.props.post; + const user = this.context.currentUser; + + let callAction = 'subscribePost'; + + let isSubscribed = this.isSubscribed(post, user); + if( isSubscribed ) { + callAction = "unsubscribePost"; + } + + this.context.actions.call(callAction, post._id, (error, result) => { + if (result) + this.context.events.track(callAction, {'_id': post._id}); + }) + } + render() { const post = this.props.post; + const user = this.context.currentUser; - let postClass = "posts-item"; + let postClass = "posts-item"; if (post.sticky) postClass += " posts-sticky"; // ⭐ custom code starts here ⭐ @@ -24,22 +77,22 @@ class CustomPostsItem extends Telescope.components.PostsItem { return (
- +
- + {post.thumbnailUrl ? : null}
- +

{post.title} {this.renderCategories()}

- +
{post.user?
: null}
@@ -55,19 +108,22 @@ class CustomPostsItem extends Telescope.components.PostsItem {
{this.renderCommenters()} - - + + {(user && post.author !== user.username) ? this.renderSubscribeButton() : null} +
) } }; - + CustomPostsItem.propTypes = { post: React.PropTypes.object.isRequired } CustomPostsItem.contextTypes = { - currentUser: React.PropTypes.object + currentUser: React.PropTypes.object, + actions: React.PropTypes.object, + events: React.PropTypes.object }; -export default CustomPostsItem; \ No newline at end of file +export default CustomPostsItem; From d3bd93bb55318e49b281c5da44a9517bc7f8cbcd Mon Sep 17 00:00:00 2001 From: schabluk Date: Wed, 27 Jul 2016 10:42:36 +0200 Subject: [PATCH 07/60] simple refactoring --- .../_nova-subscribe-to-posts/lib/custom_fields.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/packages/_nova-subscribe-to-posts/lib/custom_fields.js b/packages/_nova-subscribe-to-posts/lib/custom_fields.js index 8575cb9fe..874889870 100644 --- a/packages/_nova-subscribe-to-posts/lib/custom_fields.js +++ b/packages/_nova-subscribe-to-posts/lib/custom_fields.js @@ -30,17 +30,7 @@ Posts.addField( optional: true, insertableIf: canSubscribe, autoform: { - // omit: true - noselect: true, - type: "bootstrap-category", - order: 50, - options: function () { - var subscribers = [{ - value: "123", - label: "razdwatrzy" - }]; - return subscribers; - } + omit: true }, publish: true, join: { From 20e6d447d64811fdfe4b3709f6d7e69bd7451dba Mon Sep 17 00:00:00 2001 From: schabluk Date: Wed, 27 Jul 2016 11:06:00 +0200 Subject: [PATCH 08/60] simple refactoring --- packages/_nova-subscribe-to-posts/lib/custom_fields.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/_nova-subscribe-to-posts/lib/custom_fields.js b/packages/_nova-subscribe-to-posts/lib/custom_fields.js index 874889870..aa0d69932 100644 --- a/packages/_nova-subscribe-to-posts/lib/custom_fields.js +++ b/packages/_nova-subscribe-to-posts/lib/custom_fields.js @@ -26,7 +26,6 @@ Posts.addField( fieldName: 'subscribers', fieldSchema: { type: [String], - control: "checkboxgroup", optional: true, insertableIf: canSubscribe, autoform: { From fd5da072011260ee0d50c2424f489fe0485b36b1 Mon Sep 17 00:00:00 2001 From: schabluk Date: Wed, 27 Jul 2016 10:42:25 +0200 Subject: [PATCH 09/60] Revert "add observe button" This reverts commit 54c1c1764323a2a2eb2565686f33724f76b6cfe3. --- .../lib/components/CustomPostsItem.jsx | 78 +++---------------- 1 file changed, 11 insertions(+), 67 deletions(-) diff --git a/packages/my-custom-package/lib/components/CustomPostsItem.jsx b/packages/my-custom-package/lib/components/CustomPostsItem.jsx index 0e2d04398..f078f9657 100644 --- a/packages/my-custom-package/lib/components/CustomPostsItem.jsx +++ b/packages/my-custom-package/lib/components/CustomPostsItem.jsx @@ -1,6 +1,6 @@ import React, { PropTypes, Component } from 'react'; import { FormattedMessage, FormattedRelative } from 'react-intl'; -import { Button, Tooltip } from 'react-bootstrap'; +import { Button } from 'react-bootstrap'; import moment from 'moment'; import { ModalTrigger } from "meteor/nova:core"; import { Link } from 'react-router'; @@ -9,64 +9,11 @@ import Categories from "meteor/nova:categories"; class CustomPostsItem extends Telescope.components.PostsItem { - constructor(props, context) { - super(props, context); - - this.renderSubscribeButton = this.renderSubscribeButton.bind(this); - this.onSubscribe = this.onSubscribe.bind(this); - this.isSubscribed = this.isSubscribed.bind(this); - } - - isSubscribed(post, user) { - if (!post || !user) - return false; - return post.subscribers && post.subscribers.indexOf(user._id) != -1; - } - - renderSubscribeButton() { - const post = this.props.post; - const user = this.context.currentUser; - - let btnStyle = "default"; - - let isSubscribed = this.isSubscribed(post, user); - if( isSubscribed ) { - btnStyle = "info"; - } - - return ( - - ) - } - - onSubscribe() { - const post = this.props.post; - const user = this.context.currentUser; - - let callAction = 'subscribePost'; - - let isSubscribed = this.isSubscribed(post, user); - if( isSubscribed ) { - callAction = "unsubscribePost"; - } - - this.context.actions.call(callAction, post._id, (error, result) => { - if (result) - this.context.events.track(callAction, {'_id': post._id}); - }) - } - render() { const post = this.props.post; - const user = this.context.currentUser; - let postClass = "posts-item"; + let postClass = "posts-item"; if (post.sticky) postClass += " posts-sticky"; // ⭐ custom code starts here ⭐ @@ -77,22 +24,22 @@ class CustomPostsItem extends Telescope.components.PostsItem { return (
- +
- + {post.thumbnailUrl ? : null}
- +

{post.title} {this.renderCategories()}

- +
{post.user?
: null}
@@ -108,22 +55,19 @@ class CustomPostsItem extends Telescope.components.PostsItem {
{this.renderCommenters()} - - {(user && post.author !== user.username) ? this.renderSubscribeButton() : null} - + +
) } }; - + CustomPostsItem.propTypes = { post: React.PropTypes.object.isRequired } CustomPostsItem.contextTypes = { - currentUser: React.PropTypes.object, - actions: React.PropTypes.object, - events: React.PropTypes.object + currentUser: React.PropTypes.object }; -export default CustomPostsItem; +export default CustomPostsItem; \ No newline at end of file From 50671c2c05b8b318761f6b9ba219ae1a681859d0 Mon Sep 17 00:00:00 2001 From: schabluk Date: Wed, 27 Jul 2016 18:00:40 +0200 Subject: [PATCH 10/60] fields cleanup & export components --- .../lib/components/SubscribeButton.jsx | 74 +++++++++++++++++++ .../lib/custom_fields.js | 36 ++++----- .../_nova-subscribe-to-posts/lib/export.js | 8 ++ .../_nova-subscribe-to-posts/lib/methods.js | 8 +- packages/_nova-subscribe-to-posts/package.js | 13 +++- 5 files changed, 111 insertions(+), 28 deletions(-) create mode 100644 packages/_nova-subscribe-to-posts/lib/components/SubscribeButton.jsx create mode 100644 packages/_nova-subscribe-to-posts/lib/export.js diff --git a/packages/_nova-subscribe-to-posts/lib/components/SubscribeButton.jsx b/packages/_nova-subscribe-to-posts/lib/components/SubscribeButton.jsx new file mode 100644 index 000000000..0756c7178 --- /dev/null +++ b/packages/_nova-subscribe-to-posts/lib/components/SubscribeButton.jsx @@ -0,0 +1,74 @@ +import React, { PropTypes, Component } from 'react'; + +class SubscribeButton extends Component { + + constructor(props, context) { + super(props, context); + + this.onSubscribe = this.onSubscribe.bind(this); + this.isSubscribed = this.isSubscribed.bind(this); + } + + onSubscribe() { + const post = this.props.post; + const user = this.context.currentUser; + + let callAction = 'subscribePost'; + + let isSubscribed = this.isSubscribed(post, user); + if( isSubscribed ) { + callAction = "unsubscribePost"; + } + + this.context.actions.call(callAction, post._id, (error, result) => { + if (result) + this.context.events.track(callAction, {'_id': post._id}); + }) + } + + isSubscribed(post, user) { + if (!post || !user) + return false; + return post.subscribers && post.subscribers.indexOf(user._id) != -1; + } + + render() { + const post = this.props.post; + const user = this.context.currentUser; + + // can't subscribe to own post (also validated on server side) + if(user && post.author === user.username) { + return null + } + + let btnStyle = "default"; + + let isSubscribed = this.isSubscribed(post, user); + if( isSubscribed ) { + btnStyle = "info"; + } + + return ( + + ) + } + +} + +SubscribeButton.propTypes = { + post: React.PropTypes.object.isRequired +} + +SubscribeButton.contextTypes = { + currentUser: React.PropTypes.object, + actions: React.PropTypes.object, + events: React.PropTypes.object +}; + +module.exports = SubscribeButton; +export default SubscribeButton; diff --git a/packages/_nova-subscribe-to-posts/lib/custom_fields.js b/packages/_nova-subscribe-to-posts/lib/custom_fields.js index aa0d69932..9880b50b0 100644 --- a/packages/_nova-subscribe-to-posts/lib/custom_fields.js +++ b/packages/_nova-subscribe-to-posts/lib/custom_fields.js @@ -2,9 +2,6 @@ import PublicationUtils from 'meteor/utilities:smart-publications' import Posts from "meteor/nova:posts" import Users from "meteor/nova:users" -// check if user can subscribe to post -const canSubscribe = user => Users.canDo(user, "posts.new"); - Users.addField({ fieldName: 'telescope.subscribedItems', fieldSchema: { @@ -17,17 +14,12 @@ Users.addField({ } }); -PublicationUtils.addToFields( - Users.publishedFields.list, ["telescope.subscribedItems"] -) - -Posts.addField( +Posts.addField([ { fieldName: 'subscribers', fieldSchema: { type: [String], optional: true, - insertableIf: canSubscribe, autoform: { omit: true }, @@ -37,20 +29,18 @@ Posts.addField( collection: () => Users } } - } -); - -Posts.addField({ - fieldName: 'subscriberCount', - fieldSchema: { - type: Number, - optional: true, - autoform: { - omit: true + }, + { + fieldName: 'subscriberCount', + fieldSchema: { + type: Number, + optional: true, + autoform: { + omit: true + } } } -}); +]); -PublicationUtils.addToFields( - Posts.publishedFields.list, ["subscribers", "subscriberCount"] -) +PublicationUtils.addToFields(Users.publishedFields.list, ["telescope.subscribedItems"]); +PublicationUtils.addToFields(Posts.publishedFields.list, ["subscribers", "subscriberCount"]); diff --git a/packages/_nova-subscribe-to-posts/lib/export.js b/packages/_nova-subscribe-to-posts/lib/export.js new file mode 100644 index 000000000..ef1bc86bf --- /dev/null +++ b/packages/_nova-subscribe-to-posts/lib/export.js @@ -0,0 +1,8 @@ +import {subscribeItem, unsubscribeItem} from './methods.js'; +import SubscribeButton from './components/SubscribeButton.jsx'; + +export { + subscribeItem, + unsubscribeItem, + SubscribeButton +} diff --git a/packages/_nova-subscribe-to-posts/lib/methods.js b/packages/_nova-subscribe-to-posts/lib/methods.js index 8afdceeb6..c275abc2a 100644 --- a/packages/_nova-subscribe-to-posts/lib/methods.js +++ b/packages/_nova-subscribe-to-posts/lib/methods.js @@ -23,7 +23,7 @@ var removeSubscribedItem = function (userId, itemId, collectionName) { }); }; -subscribeItem = function (collection, itemId, user) { +export var subscribeItem = function (collection, itemId, user) { var item = collection.findOne(itemId), collectionName = collection._name.slice(0,1).toUpperCase() + collection._name.slice(1); @@ -53,9 +53,9 @@ subscribeItem = function (collection, itemId, user) { return true; }; -unsubscribeItem = function (collection, itemId, user) { - var user = Meteor.user(), - item = collection.findOne(itemId), +export var unsubscribeItem = function (collection, itemId, user) { + + var item = collection.findOne(itemId), collectionName = collection._name.slice(0,1).toUpperCase()+collection._name.slice(1); if (!user || !item || !hasSubscribedItem(item, user)) diff --git a/packages/_nova-subscribe-to-posts/package.js b/packages/_nova-subscribe-to-posts/package.js index 021ffce5e..ac142f737 100644 --- a/packages/_nova-subscribe-to-posts/package.js +++ b/packages/_nova-subscribe-to-posts/package.js @@ -14,8 +14,17 @@ Package.onUse(function (api) { // automatic (let the package specify where it's needed) - api.use(['nova:core@0.26.5-nova']); + api.use([ + 'nova:core@0.26.5-nova', + 'nova:posts@0.26.5-nova', + 'nova:users@0.26.5-nova' + ]); + // api.use([ + // 'nova:notifications@0.26.5-nova', + // 'nova:email@0.26.5-nova' + // ], ['client', 'server'], {weak: true}); + // // ---------------------------------- 2. Files to include ---------------------------------- // i18n config (must come first) @@ -60,4 +69,6 @@ Package.onUse(function (api) { // 'unsubscribeItem' // ]); + api.mainModule("lib/export.js", ["client", "server"]); + }); From faf25b8710fd3f6f522bc4110d82975934263d77 Mon Sep 17 00:00:00 2001 From: schabluk Date: Thu, 28 Jul 2016 21:19:10 +0200 Subject: [PATCH 11/60] extendable subscribe, locale & deps --- .../lib/components/Subscribe.jsx | 71 +++++++++++++++++++ .../lib/components/SubscribeButton.jsx | 56 +++------------ .../_nova-subscribe-to-posts/lib/export.js | 2 + packages/_nova-subscribe-to-posts/package.js | 6 +- 4 files changed, 89 insertions(+), 46 deletions(-) create mode 100644 packages/_nova-subscribe-to-posts/lib/components/Subscribe.jsx diff --git a/packages/_nova-subscribe-to-posts/lib/components/Subscribe.jsx b/packages/_nova-subscribe-to-posts/lib/components/Subscribe.jsx new file mode 100644 index 000000000..1b439267f --- /dev/null +++ b/packages/_nova-subscribe-to-posts/lib/components/Subscribe.jsx @@ -0,0 +1,71 @@ +import React, { PropTypes, Component } from 'react'; +import { intlShape } from 'react-intl'; + +class Subscribe extends Component { + + constructor(props, context) { + super(props, context); + + this.onSubscribe = this.onSubscribe.bind(this); + this.isSubscribed = this.isSubscribed.bind(this); + } + + onSubscribe() { + const post = this.props.post; + const user = this.context.currentUser; + + let callAction = 'subscribePost'; + + let isSubscribed = this.isSubscribed(post, user); + if( isSubscribed ) { + callAction = "unsubscribePost"; + } + + this.context.actions.call(callAction, post._id, (error, result) => { + if (result) + this.context.events.track(callAction, {'_id': post._id}); + }) + } + + isSubscribed(post, user) { + if (!post || !user) + return false; + return post.subscribers && post.subscribers.indexOf(user._id) != -1; + } + + render() { + const post = this.props.post; + const user = this.context.currentUser; + + // can't subscribe to own post (also validated on server side) + if(user && post.author === user.username) { + return null; + } + + let btnTitle = "posts.subscribe"; + + let isSubscribed = this.isSubscribed(post, user); + if( isSubscribed ) { + btnTitle = "posts.unsubscribe"; + } + + return ( + {this.context.intl.formatMessage({id: btnTitle})} + ) + } + +} + +Subscribe.propTypes = { + post: React.PropTypes.object.isRequired +} + +Subscribe.contextTypes = { + currentUser: React.PropTypes.object, + actions: React.PropTypes.object, + events: React.PropTypes.object, + intl: intlShape +}; + +module.exports = Subscribe; +export default Subscribe; diff --git a/packages/_nova-subscribe-to-posts/lib/components/SubscribeButton.jsx b/packages/_nova-subscribe-to-posts/lib/components/SubscribeButton.jsx index 0756c7178..2406f297c 100644 --- a/packages/_nova-subscribe-to-posts/lib/components/SubscribeButton.jsx +++ b/packages/_nova-subscribe-to-posts/lib/components/SubscribeButton.jsx @@ -1,36 +1,8 @@ import React, { PropTypes, Component } from 'react'; +import { intlShape } from 'react-intl'; +import Subscribe from './Subscribe.jsx'; -class SubscribeButton extends Component { - - constructor(props, context) { - super(props, context); - - this.onSubscribe = this.onSubscribe.bind(this); - this.isSubscribed = this.isSubscribed.bind(this); - } - - onSubscribe() { - const post = this.props.post; - const user = this.context.currentUser; - - let callAction = 'subscribePost'; - - let isSubscribed = this.isSubscribed(post, user); - if( isSubscribed ) { - callAction = "unsubscribePost"; - } - - this.context.actions.call(callAction, post._id, (error, result) => { - if (result) - this.context.events.track(callAction, {'_id': post._id}); - }) - } - - isSubscribed(post, user) { - if (!post || !user) - return false; - return post.subscribers && post.subscribers.indexOf(user._id) != -1; - } +class SubscribeButton extends Subscribe { render() { const post = this.props.post; @@ -38,37 +10,31 @@ class SubscribeButton extends Component { // can't subscribe to own post (also validated on server side) if(user && post.author === user.username) { - return null + return null; } let btnStyle = "default"; + let btnTitle = "posts.subscribe"; + let btnIcon = "eye"; let isSubscribed = this.isSubscribed(post, user); if( isSubscribed ) { btnStyle = "info"; + btnTitle = "posts.unsubscribe"; + btnIcon = "eye-slash"; } return ( - ) } } -SubscribeButton.propTypes = { - post: React.PropTypes.object.isRequired -} - -SubscribeButton.contextTypes = { - currentUser: React.PropTypes.object, - actions: React.PropTypes.object, - events: React.PropTypes.object -}; - module.exports = SubscribeButton; export default SubscribeButton; diff --git a/packages/_nova-subscribe-to-posts/lib/export.js b/packages/_nova-subscribe-to-posts/lib/export.js index ef1bc86bf..28a144661 100644 --- a/packages/_nova-subscribe-to-posts/lib/export.js +++ b/packages/_nova-subscribe-to-posts/lib/export.js @@ -1,8 +1,10 @@ import {subscribeItem, unsubscribeItem} from './methods.js'; +import Subscribe from './components/Subscribe.jsx'; import SubscribeButton from './components/SubscribeButton.jsx'; export { subscribeItem, unsubscribeItem, + Subscribe, SubscribeButton } diff --git a/packages/_nova-subscribe-to-posts/package.js b/packages/_nova-subscribe-to-posts/package.js index ac142f737..a4ba2bbcc 100644 --- a/packages/_nova-subscribe-to-posts/package.js +++ b/packages/_nova-subscribe-to-posts/package.js @@ -17,7 +17,10 @@ Package.onUse(function (api) { api.use([ 'nova:core@0.26.5-nova', 'nova:posts@0.26.5-nova', - 'nova:users@0.26.5-nova' + 'nova:users@0.26.5-nova', + + // 3rd party + 'fortawesome:fontawesome@4.5.0' ]); // api.use([ @@ -37,6 +40,7 @@ Package.onUse(function (api) { api.addFiles([ // 'lib/subscribe-to-posts.js',', + // 'lib/callbacks.js', 'lib/custom_fields.js', 'lib/methods.js' ], ['client', 'server']); From 9e85c90556ef5dff247ae2941a2b010179426163 Mon Sep 17 00:00:00 2001 From: schabluk Date: Thu, 28 Jul 2016 21:20:03 +0200 Subject: [PATCH 12/60] locale for subscribe-to-posts --- packages/nova-i18n-en-us/lib/en_US.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/nova-i18n-en-us/lib/en_US.js b/packages/nova-i18n-en-us/lib/en_US.js index f5609f02c..dec8c4812 100644 --- a/packages/nova-i18n-en-us/lib/en_US.js +++ b/packages/nova-i18n-en-us/lib/en_US.js @@ -31,6 +31,9 @@ Telescope.strings.en = { "posts.rate_limit_error": "Please wait {details} seconds before posting again.", "posts.postedAt": "Posted at", "posts.dateNotDefined": "Date not defined", + "posts.subscribe": "Subscribe", + "posts.unsubscribe": "Unsubscribe", + "posts.subscribed_posts" : "Subscribed Posts", "comments.comments": "Comments", "comments.count": "{count, plural, =0 {No comments} one {# comment} other {# comments}}", @@ -111,19 +114,19 @@ Telescope.strings.en = { "settings.requirePostInvite": "Require Post Invite", "settings.requirePostsApproval": "Require Posts Approval", "settings.scoreUpdateInterval": "Score Update Interval", - + "app.loading": "Loading…", "app.404": "Sorry, we couldn't find what you were looking for.", "app.powered_by": "Powered by Telescope", "app.or": "Or", - "newsletter": "Newsletter", - "newsletter.subscribe": "Subscribe", - "newsletter.unsubscribe": "Unsubscribe", + "newsletter": "Newsletter", + "newsletter.subscribe": "Subscribe", + "newsletter.unsubscribe": "Unsubscribe", "newsletter.subscribe_prompt": "Subscribe to the newsletter", "newsletter.email": "Your email", "newsletter.success_message": "Thanks for subscribing!", "admin": "Admin", "notifications": "Notifications", -} \ No newline at end of file +} From 4f0b1c1bd364f484d2364a84853214ab157e66b6 Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Fri, 29 Jul 2016 10:29:50 +0900 Subject: [PATCH 13/60] fix user posts --- packages/nova-posts/lib/views.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nova-posts/lib/views.js b/packages/nova-posts/lib/views.js index 9f07b55ba..2007eeb62 100644 --- a/packages/nova-posts/lib/views.js +++ b/packages/nova-posts/lib/views.js @@ -100,7 +100,7 @@ Posts.views.add("userPosts", function (terms) { selector: { userId: terms.userId, status: Posts.config.STATUS_APPROVED, - isFuture: false + isFuture: {$ne: true} }, options: { limit: 5, From 0eaa43ebb447d6c544d44cc44f5e3544a602492e Mon Sep 17 00:00:00 2001 From: schabluk Date: Fri, 29 Jul 2016 11:15:42 +0200 Subject: [PATCH 14/60] prevent default event propagation --- .../_nova-subscribe-to-posts/lib/components/Subscribe.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/_nova-subscribe-to-posts/lib/components/Subscribe.jsx b/packages/_nova-subscribe-to-posts/lib/components/Subscribe.jsx index 1b439267f..765251c7e 100644 --- a/packages/_nova-subscribe-to-posts/lib/components/Subscribe.jsx +++ b/packages/_nova-subscribe-to-posts/lib/components/Subscribe.jsx @@ -10,7 +10,9 @@ class Subscribe extends Component { this.isSubscribed = this.isSubscribed.bind(this); } - onSubscribe() { + onSubscribe(e) { + e.preventDefault(); + const post = this.props.post; const user = this.context.currentUser; @@ -50,7 +52,7 @@ class Subscribe extends Component { } return ( - {this.context.intl.formatMessage({id: btnTitle})} + {this.context.intl.formatMessage({id: btnTitle})} ) } From a408134b4d09405a5a3dc57294f2174d7cf89435 Mon Sep 17 00:00:00 2001 From: schabluk Date: Fri, 29 Jul 2016 12:53:03 +0200 Subject: [PATCH 15/60] move subscribers notification from nova-comments --- .../_nova-subscribe-to-posts/lib/callbacks.js | 33 +++++++++++++++++++ packages/_nova-subscribe-to-posts/package.js | 2 +- packages/nova-comments/lib/callbacks.js | 17 ++-------- 3 files changed, 36 insertions(+), 16 deletions(-) create mode 100644 packages/_nova-subscribe-to-posts/lib/callbacks.js diff --git a/packages/_nova-subscribe-to-posts/lib/callbacks.js b/packages/_nova-subscribe-to-posts/lib/callbacks.js new file mode 100644 index 000000000..5e488c7ba --- /dev/null +++ b/packages/_nova-subscribe-to-posts/lib/callbacks.js @@ -0,0 +1,33 @@ +import Posts from "meteor/nova:posts"; +import Users from 'meteor/nova:users'; + +// Notify users subscribed to the thread + +function SubscribedCommentsNotifications (comment) { + if (typeof Telescope.notifications !== "undefined") { + // note: dummy content has disableNotifications set to true + if(Meteor.isServer && !comment.disableNotifications){ + + const post = Posts.findOne(comment.postId); + + let userIdsNotified = [], + notificationData = { + comment: _.pick(comment, '_id', 'userId', 'author', 'htmlBody', 'postId'), + post: _.pick(post, '_id', 'userId', 'title', 'url') + }; + + if (!!post.subscribers) { + // remove userIds of users that have already been notified + // and of comment author (they could be replying in a thread they're subscribed to) + let subscriberIdsToNotify = _.difference(post.subscribers, userIdsNotified, [comment.userId]); + Telescope.notifications.create(subscriberIdsToNotify, 'newCommentSubscribed', notificationData); + + userIdsNotified = userIdsNotified.concat(subscriberIdsToNotify); + } + + console.log('SubscribedCommentsNotifications', notificationData, userIdsNotified); + } + } +} + +Telescope.callbacks.add("comments.new.async", SubscribedCommentsNotifications); diff --git a/packages/_nova-subscribe-to-posts/package.js b/packages/_nova-subscribe-to-posts/package.js index a4ba2bbcc..8b0c5d5d8 100644 --- a/packages/_nova-subscribe-to-posts/package.js +++ b/packages/_nova-subscribe-to-posts/package.js @@ -40,7 +40,7 @@ Package.onUse(function (api) { api.addFiles([ // 'lib/subscribe-to-posts.js',', - // 'lib/callbacks.js', + 'lib/callbacks.js', 'lib/custom_fields.js', 'lib/methods.js' ], ['client', 'server']); diff --git a/packages/nova-comments/lib/callbacks.js b/packages/nova-comments/lib/callbacks.js index 94caf0e57..fdbeb10cb 100644 --- a/packages/nova-comments/lib/callbacks.js +++ b/packages/nova-comments/lib/callbacks.js @@ -124,7 +124,7 @@ Telescope.callbacks.add("comments.new.method", CommentsNewSubmittedPropertiesChe * @summary Check for required properties */ function CommentsNewRequiredPropertiesCheck (comment, user) { - + var userId = comment.userId; // at this stage, a userId is expected // Don't allow empty comments @@ -231,20 +231,7 @@ function CommentsNewNotifications (comment) { } } - - // 3. Notify users subscribed to the thread - // TODO: ideally this would be injected from the telescope-subscribe-to-posts package - if (!!post.subscribers) { - - // remove userIds of users that have already been notified - // and of comment author (they could be replying in a thread they're subscribed to) - var subscriberIdsToNotify = _.difference(post.subscribers, userIdsNotified, [comment.userId]); - Telescope.notifications.create(subscriberIdsToNotify, 'newCommentSubscribed', notificationData); - - userIdsNotified = userIdsNotified.concat(subscriberIdsToNotify); - - } - + } } } From 3c640c9f82129bd8ab0fdd5d2adcc4a6090447d7 Mon Sep 17 00:00:00 2001 From: schabluk Date: Fri, 29 Jul 2016 13:11:02 +0200 Subject: [PATCH 16/60] remove console --- packages/_nova-subscribe-to-posts/lib/callbacks.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/_nova-subscribe-to-posts/lib/callbacks.js b/packages/_nova-subscribe-to-posts/lib/callbacks.js index 5e488c7ba..bb42dd03c 100644 --- a/packages/_nova-subscribe-to-posts/lib/callbacks.js +++ b/packages/_nova-subscribe-to-posts/lib/callbacks.js @@ -25,7 +25,6 @@ function SubscribedCommentsNotifications (comment) { userIdsNotified = userIdsNotified.concat(subscriberIdsToNotify); } - console.log('SubscribedCommentsNotifications', notificationData, userIdsNotified); } } } From 5e6c553284b2fa57a3ba87d2b214567cca06cf3d Mon Sep 17 00:00:00 2001 From: xavcz Date: Sun, 31 Jul 2016 14:14:51 +0200 Subject: [PATCH 17/60] NovaForm custom components with boolean value: fix a bug on account edit + newsletter setting using autofilledValues --- packages/nova-forms/lib/NovaForm.jsx | 4 +- packages/nova-lib/lib/utils.js | 16 ++++---- .../lib/components/NewsletterSubscribe.jsx | 39 +++++++++++++++---- packages/nova-newsletter/lib/custom_fields.js | 1 + 4 files changed, 42 insertions(+), 18 deletions(-) diff --git a/packages/nova-forms/lib/NovaForm.jsx b/packages/nova-forms/lib/NovaForm.jsx index a08c558fb..92e3f6880 100644 --- a/packages/nova-forms/lib/NovaForm.jsx +++ b/packages/nova-forms/lib/NovaForm.jsx @@ -307,8 +307,8 @@ class NovaForm extends Component{ submitForm(data) { this.setState({disabled: true}); - // mutate data with values not caught by formsy submit handler (ex: datetimepicker) - data = {...data, ...this.state.currentValues}; + // complete the data with values not caught by formsy submit handler (ex: Datetimepicker or NewsletterSubcribe components) + data = {...data, ...this.state.currentValues, ...this.state.autofilledValues}; const fields = this.getFieldNames(); diff --git a/packages/nova-lib/lib/utils.js b/packages/nova-lib/lib/utils.js index ec4301adc..4a947c220 100644 --- a/packages/nova-lib/lib/utils.js +++ b/packages/nova-lib/lib/utils.js @@ -277,14 +277,14 @@ Telescope.getNestedProperty = function (obj, desc) { // see http://stackoverflow.com/a/14058408/649299 _.mixin({ - compactObject : function(o) { - var clone = _.clone(o); - _.each(clone, function(v, k) { - if(!v) { - delete clone[k]; - } - }); - return clone; + compactObject : function(object) { + var clone = _.clone(object); + _.each(clone, function(value, key) { + if(!value && typeof value !== "boolean") { + delete clone[key]; + } + }); + return clone; } }); diff --git a/packages/nova-newsletter/lib/components/NewsletterSubscribe.jsx b/packages/nova-newsletter/lib/components/NewsletterSubscribe.jsx index 727e62601..f8976b33f 100644 --- a/packages/nova-newsletter/lib/components/NewsletterSubscribe.jsx +++ b/packages/nova-newsletter/lib/components/NewsletterSubscribe.jsx @@ -1,18 +1,41 @@ import React, { PropTypes, Component } from 'react'; -const NewsletterSubscribe = (props, context) => { - return ( -
- -
- context.messages.flash("Newsletter subscription updated", "success")}/> +// this component is used as a custom controller in user's account edit (cf. ./custom_fields.js) +class NewsletterSubscribe extends Component { + + // initiate NovaForm with the newsletter setting value + // note: forced boolean value because NovaForm's falsy value are empty double quotes. + componentWillMount() { + this.context.addToAutofilledValues({[this.props.name]: !!this.props.value}); + } + + componentWillReceiveProps(nextProps, nextContext) { + // if the user is editing her profile & subscribed to the newsletter from the banner, send the update to NovaForm + if (!!nextProps.value !== !!this.props.value) { + this.context.addToAutofilledValues({[this.props.name]: !!nextProps.value}); + } + } + + render() { + return ( +
+ +
+ { + this.context.messages.flash("Newsletter subscription updated", "success") + }} + /> +
-
- ) + ) + } } NewsletterSubscribe.contextTypes = { messages: React.PropTypes.object, + addToAutofilledValues: React.PropTypes.func, }; module.exports = NewsletterSubscribe; diff --git a/packages/nova-newsletter/lib/custom_fields.js b/packages/nova-newsletter/lib/custom_fields.js index db28b7bc5..ed02e42d9 100644 --- a/packages/nova-newsletter/lib/custom_fields.js +++ b/packages/nova-newsletter/lib/custom_fields.js @@ -23,6 +23,7 @@ Users.addField([ type: Boolean, optional: true, publish: true, + defaultValue: false, insertableIf: canInsert, editableIf: canEdit, control: NewsletterSubscribe, From 0aa7bc4b11c5dd88101952b3d094f260d0a9a77f Mon Sep 17 00:00:00 2001 From: schabluk Date: Mon, 1 Aug 2016 19:57:40 +0200 Subject: [PATCH 18/60] remove SubscribeButton and 3rd party deps --- .../lib/components/SubscribeButton.jsx | 40 ------------------- .../_nova-subscribe-to-posts/lib/export.js | 4 +- packages/_nova-subscribe-to-posts/package.js | 5 +-- 3 files changed, 2 insertions(+), 47 deletions(-) delete mode 100644 packages/_nova-subscribe-to-posts/lib/components/SubscribeButton.jsx diff --git a/packages/_nova-subscribe-to-posts/lib/components/SubscribeButton.jsx b/packages/_nova-subscribe-to-posts/lib/components/SubscribeButton.jsx deleted file mode 100644 index 2406f297c..000000000 --- a/packages/_nova-subscribe-to-posts/lib/components/SubscribeButton.jsx +++ /dev/null @@ -1,40 +0,0 @@ -import React, { PropTypes, Component } from 'react'; -import { intlShape } from 'react-intl'; -import Subscribe from './Subscribe.jsx'; - -class SubscribeButton extends Subscribe { - - render() { - const post = this.props.post; - const user = this.context.currentUser; - - // can't subscribe to own post (also validated on server side) - if(user && post.author === user.username) { - return null; - } - - let btnStyle = "default"; - let btnTitle = "posts.subscribe"; - let btnIcon = "eye"; - - let isSubscribed = this.isSubscribed(post, user); - if( isSubscribed ) { - btnStyle = "info"; - btnTitle = "posts.unsubscribe"; - btnIcon = "eye-slash"; - } - - return ( - - ) - } - -} - -module.exports = SubscribeButton; -export default SubscribeButton; diff --git a/packages/_nova-subscribe-to-posts/lib/export.js b/packages/_nova-subscribe-to-posts/lib/export.js index 28a144661..dbacdb602 100644 --- a/packages/_nova-subscribe-to-posts/lib/export.js +++ b/packages/_nova-subscribe-to-posts/lib/export.js @@ -1,10 +1,8 @@ import {subscribeItem, unsubscribeItem} from './methods.js'; import Subscribe from './components/Subscribe.jsx'; -import SubscribeButton from './components/SubscribeButton.jsx'; export { subscribeItem, unsubscribeItem, - Subscribe, - SubscribeButton + Subscribe } diff --git a/packages/_nova-subscribe-to-posts/package.js b/packages/_nova-subscribe-to-posts/package.js index 8b0c5d5d8..34a8ae4fe 100644 --- a/packages/_nova-subscribe-to-posts/package.js +++ b/packages/_nova-subscribe-to-posts/package.js @@ -17,10 +17,7 @@ Package.onUse(function (api) { api.use([ 'nova:core@0.26.5-nova', 'nova:posts@0.26.5-nova', - 'nova:users@0.26.5-nova', - - // 3rd party - 'fortawesome:fontawesome@4.5.0' + 'nova:users@0.26.5-nova' ]); // api.use([ From ce48b0c58d863f6c0b01c99045507b83b04b5383 Mon Sep 17 00:00:00 2001 From: schabluk Date: Thu, 4 Aug 2016 10:47:19 +0200 Subject: [PATCH 19/60] udpate to 4.0.0-alpha.3 --- .../lib/stylesheets/bootstrap.css | 2769 +++++++++-------- 1 file changed, 1474 insertions(+), 1295 deletions(-) diff --git a/packages/nova-base-styles/lib/stylesheets/bootstrap.css b/packages/nova-base-styles/lib/stylesheets/bootstrap.css index a563aec84..79742bda3 100644 --- a/packages/nova-base-styles/lib/stylesheets/bootstrap.css +++ b/packages/nova-base-styles/lib/stylesheets/bootstrap.css @@ -1,13 +1,14 @@ /*! - * Bootstrap v4.0.0-alpha.2 (http://getbootstrap.com) - * Copyright 2011-2015 Twitter, Inc. + * Bootstrap v4.0.0-alpha.3 (http://getbootstrap.com) + * Copyright 2011-2016 The Bootstrap Authors + * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ -/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ +/*! normalize.css v4.0.0 | MIT License | github.com/necolas/normalize.css */ html { font-family: sans-serif; + -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; } body { @@ -21,7 +22,6 @@ figcaption, figure, footer, header, -hgroup, main, menu, nav, @@ -35,7 +35,6 @@ canvas, progress, video { display: inline-block; - vertical-align: baseline; } audio:not([controls]) { @@ -43,8 +42,12 @@ audio:not([controls]) { height: 0; } -[hidden], -template { +progress { + vertical-align: baseline; +} + +template, +[hidden] { display: none; } @@ -52,21 +55,25 @@ a { background-color: transparent; } -a:active { - outline: 0; -} - +a:active, a:hover { - outline: 0; + outline-width: 0; } abbr[title] { - border-bottom: 1px dotted; + border-bottom: none; + text-decoration: underline; + text-decoration: underline dotted; } b, strong { - font-weight: bold; + font-weight: inherit; +} + +b, +strong { + font-weight: bolder; } dfn { @@ -74,13 +81,13 @@ dfn { } h1 { - margin: .67em 0; font-size: 2em; + margin: 0.67em 0; } mark { + background-color: #ff0; color: #000; - background: #ff0; } small { @@ -89,42 +96,28 @@ small { sub, sup { - position: relative; font-size: 75%; line-height: 0; + position: relative; vertical-align: baseline; } -sup { - top: -.5em; +sub { + bottom: -0.25em; } -sub { - bottom: -.25em; +sup { + top: -0.5em; } img { - border: 0; + border-style: none; } svg:not(:root) { overflow: hidden; } -figure { - margin: 1em 40px; -} - -hr { - height: 0; - -webkit-box-sizing: content-box; - box-sizing: content-box; -} - -pre { - overflow: auto; -} - code, kbd, pre, @@ -133,18 +126,39 @@ samp { font-size: 1em; } +figure { + margin: 1em 40px; +} + +hr { + -webkit-box-sizing: content-box; + box-sizing: content-box; + height: 0; + overflow: visible; +} + +button, +input, +select, +textarea { + font: inherit; +} + +optgroup { + font-weight: bold; +} + +button, +input, +select { + overflow: visible; +} + button, input, -optgroup, select, textarea { margin: 0; - font: inherit; - color: inherit; -} - -button { - overflow: visible; } button, @@ -153,84 +167,81 @@ select { } button, -html input[type="button"], -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; +[type="button"], +[type="reset"], +[type="submit"] { cursor: pointer; } -button[disabled], -html input[disabled] { +[disabled] { cursor: default; } +button, +html [type="button"], +[type="reset"], +[type="submit"] { + -webkit-appearance: button; +} + button::-moz-focus-inner, input::-moz-focus-inner { - padding: 0; border: 0; -} - -input { - line-height: normal; -} - -input[type="checkbox"], -input[type="radio"] { - -webkit-box-sizing: border-box; - box-sizing: border-box; padding: 0; } -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -input[type="search"] { - -webkit-box-sizing: content-box; - box-sizing: content-box; - -webkit-appearance: textfield; -} - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; +button:-moz-focusring, +input:-moz-focusring { + outline: 1px dotted ButtonText; } fieldset { - padding: .35em .625em .75em; - margin: 0 2px; border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; } legend { + -webkit-box-sizing: border-box; + box-sizing: border-box; + color: inherit; + display: table; + max-width: 100%; padding: 0; - border: 0; + white-space: normal; } textarea { overflow: auto; } -optgroup { - font-weight: bold; -} - -table { - border-spacing: 0; - border-collapse: collapse; -} - -td, -th { +[type="checkbox"], +[type="radio"] { + -webkit-box-sizing: border-box; + box-sizing: border-box; padding: 0; } +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +[type="search"] { + -webkit-appearance: textfield; +} + +[type="search"]::-webkit-search-cancel-button, +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + @media print { *, *::before, - *::after { + *::after, + *::first-letter, + *::first-line { text-shadow: none !important; -webkit-box-shadow: none !important; box-shadow: none !important; @@ -245,7 +256,6 @@ th { pre, blockquote { border: 1px solid #999; - page-break-inside: avoid; } thead { @@ -255,9 +265,6 @@ th { img { page-break-inside: avoid; } - img { - max-width: 100% !important; - } p, h2, h3 { @@ -275,7 +282,7 @@ th { .dropup > .btn > .caret { border-top-color: #000 !important; } - .label { + .tag { border: 1px solid #000; } .table { @@ -303,30 +310,18 @@ html { box-sizing: inherit; } -@-moz-viewport { - width: device-width; -} - @-ms-viewport { width: device-width; } -@-webkit-viewport { - width: device-width; -} - -@viewport { - width: device-width; -} - html { font-size: 16px; - + -ms-overflow-style: scrollbar; -webkit-tap-highlight-color: transparent; } body { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 1rem; line-height: 1.5; color: #373a3c; @@ -397,14 +392,28 @@ a:focus, a:hover { } a:focus { - outline: thin dotted; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } +a:not([href]):not([tabindex]) { + color: inherit; + text-decoration: none; +} + +a:not([href]):not([tabindex]):focus, a:not([href]):not([tabindex]):hover { + color: inherit; + text-decoration: none; +} + +a:not([href]):not([tabindex]):focus { + outline: none; +} + pre { margin-top: 0; margin-bottom: 1rem; + overflow: auto; } figure { @@ -433,12 +442,13 @@ textarea { } table { + border-collapse: collapse; background-color: transparent; } caption { - padding-top: .75rem; - padding-bottom: .75rem; + padding-top: 0.75rem; + padding-bottom: 0.75rem; color: #818a91; text-align: left; caption-side: bottom; @@ -467,6 +477,18 @@ textarea { border-radius: 0; } +input[type="radio"]:disabled, +input[type="checkbox"]:disabled { + cursor: not-allowed; +} + +input[type="date"], +input[type="time"], +input[type="datetime-local"], +input[type="month"] { + -webkit-appearance: listbox; +} + textarea { resize: vertical; } @@ -488,8 +510,6 @@ legend { } input[type="search"] { - -webkit-box-sizing: inherit; - box-sizing: inherit; -webkit-appearance: none; } @@ -503,58 +523,34 @@ output { h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { - margin-bottom: .5rem; + margin-bottom: 0.5rem; font-family: inherit; font-weight: 500; line-height: 1.1; color: inherit; } -h1 { +h1, .h1 { font-size: 2.5rem; } -h2 { +h2, .h2 { font-size: 2rem; } -h3 { +h3, .h3 { font-size: 1.75rem; } -h4 { +h4, .h4 { font-size: 1.5rem; } -h5 { +h5, .h5 { font-size: 1.25rem; } -h6 { - font-size: 1rem; -} - -.h1 { - font-size: 2.5rem; -} - -.h2 { - font-size: 2rem; -} - -.h3 { - font-size: 1.75rem; -} - -.h4 { - font-size: 1.5rem; -} - -.h5 { - font-size: 1.25rem; -} - -.h6 { +h6, .h6 { font-size: 1rem; } @@ -587,7 +583,7 @@ hr { margin-top: 1rem; margin-bottom: 1rem; border: 0; - border-top: 1px solid rgba(0, 0, 0, .1); + border-top: 1px solid rgba(0, 0, 0, 0.1); } small, @@ -598,7 +594,7 @@ small, mark, .mark { - padding: .2em; + padding: 0.2em; background-color: #fcf8e3; } @@ -620,33 +616,21 @@ mark, margin-right: 5px; } -.dl-horizontal { - margin-right: -1.875rem; - margin-left: -1.875rem; -} - -.dl-horizontal::after { - display: table; - clear: both; - content: ""; -} - .initialism { font-size: 90%; text-transform: uppercase; } .blockquote { - padding: .5rem 1rem; + padding: 0.5rem 1rem; margin-bottom: 1rem; font-size: 1.25rem; - border-left: .25rem solid #eceeef; + border-left: 0.25rem solid #eceeef; } .blockquote-footer { display: block; font-size: 80%; - line-height: 1.5; color: #818a91; } @@ -658,7 +642,7 @@ mark, padding-right: 1rem; padding-left: 0; text-align: right; - border-right: .25rem solid #eceeef; + border-right: 0.25rem solid #eceeef; border-left: 0; } @@ -670,6 +654,10 @@ mark, content: "\00A0 \2014"; } +dl.row > dd + dt { + clear: left; +} + .img-fluid, .carousel-inner > .carousel-item > img, .carousel-inner > .carousel-item > a > img { display: block; @@ -678,21 +666,20 @@ mark, } .img-rounded { - border-radius: .3rem; + border-radius: 0.3rem; } .img-thumbnail { + padding: 0.25rem; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 0.25rem; + -webkit-transition: all .2s ease-in-out; + -o-transition: all .2s ease-in-out; + transition: all .2s ease-in-out; display: inline-block; max-width: 100%; height: auto; - padding: .25rem; - line-height: 1.5; - background-color: #fff; - border: 1px solid #ddd; - border-radius: .25rem; - -webkit-transition: all .2s ease-in-out; - -o-transition: all .2s ease-in-out; - transition: all .2s ease-in-out; } .img-circle { @@ -704,7 +691,7 @@ mark, } .figure-img { - margin-bottom: .5rem; + margin-bottom: 0.5rem; line-height: 1; } @@ -717,23 +704,23 @@ code, kbd, pre, samp { - font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + font-family: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; } code { - padding: .2rem .4rem; + padding: 0.2rem 0.4rem; font-size: 90%; color: #bd4147; background-color: #f7f7f9; - border-radius: .25rem; + border-radius: 0.25rem; } kbd { - padding: .2rem .4rem; + padding: 0.2rem 0.4rem; font-size: 90%; color: #fff; background-color: #333; - border-radius: .2rem; + border-radius: 0.2rem; } kbd kbd { @@ -747,7 +734,6 @@ pre { margin-top: 0; margin-bottom: 1rem; font-size: 90%; - line-height: 1.5; color: #373a3c; } @@ -765,16 +751,16 @@ pre code { } .container { - padding-right: .9375rem; - padding-left: .9375rem; - margin-right: auto; margin-left: auto; + margin-right: auto; + padding-left: 15px; + padding-right: 15px; } .container::after { + content: ""; display: table; clear: both; - content: ""; } @media (min-width: 544px) { @@ -802,878 +788,902 @@ pre code { } .container-fluid { - padding-right: .9375rem; - padding-left: .9375rem; - margin-right: auto; margin-left: auto; + margin-right: auto; + padding-left: 15px; + padding-right: 15px; } .container-fluid::after { + content: ""; display: table; clear: both; - content: ""; } .row { - margin-right: -.9375rem; - margin-left: -.9375rem; + margin-left: -15px; + margin-right: -15px; } .row::after { + content: ""; display: table; clear: both; - content: ""; } .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12, .col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12 { position: relative; min-height: 1px; - padding-right: .9375rem; - padding-left: .9375rem; -} - -.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { - float: left; + padding-right: 15px; + padding-left: 15px; } .col-xs-1 { + float: left; width: 8.333333%; } .col-xs-2 { + float: left; width: 16.666667%; } .col-xs-3 { + float: left; width: 25%; } .col-xs-4 { + float: left; width: 33.333333%; } .col-xs-5 { + float: left; width: 41.666667%; } .col-xs-6 { + float: left; width: 50%; } .col-xs-7 { + float: left; width: 58.333333%; } .col-xs-8 { + float: left; width: 66.666667%; } .col-xs-9 { + float: left; width: 75%; } .col-xs-10 { + float: left; width: 83.333333%; } .col-xs-11 { + float: left; width: 91.666667%; } .col-xs-12 { + float: left; width: 100%; } -.col-xs-pull-0 { +.pull-xs-0 { right: auto; } -.col-xs-pull-1 { +.pull-xs-1 { right: 8.333333%; } -.col-xs-pull-2 { +.pull-xs-2 { right: 16.666667%; } -.col-xs-pull-3 { +.pull-xs-3 { right: 25%; } -.col-xs-pull-4 { +.pull-xs-4 { right: 33.333333%; } -.col-xs-pull-5 { +.pull-xs-5 { right: 41.666667%; } -.col-xs-pull-6 { +.pull-xs-6 { right: 50%; } -.col-xs-pull-7 { +.pull-xs-7 { right: 58.333333%; } -.col-xs-pull-8 { +.pull-xs-8 { right: 66.666667%; } -.col-xs-pull-9 { +.pull-xs-9 { right: 75%; } -.col-xs-pull-10 { +.pull-xs-10 { right: 83.333333%; } -.col-xs-pull-11 { +.pull-xs-11 { right: 91.666667%; } -.col-xs-pull-12 { +.pull-xs-12 { right: 100%; } -.col-xs-push-0 { +.push-xs-0 { left: auto; } -.col-xs-push-1 { +.push-xs-1 { left: 8.333333%; } -.col-xs-push-2 { +.push-xs-2 { left: 16.666667%; } -.col-xs-push-3 { +.push-xs-3 { left: 25%; } -.col-xs-push-4 { +.push-xs-4 { left: 33.333333%; } -.col-xs-push-5 { +.push-xs-5 { left: 41.666667%; } -.col-xs-push-6 { +.push-xs-6 { left: 50%; } -.col-xs-push-7 { +.push-xs-7 { left: 58.333333%; } -.col-xs-push-8 { +.push-xs-8 { left: 66.666667%; } -.col-xs-push-9 { +.push-xs-9 { left: 75%; } -.col-xs-push-10 { +.push-xs-10 { left: 83.333333%; } -.col-xs-push-11 { +.push-xs-11 { left: 91.666667%; } -.col-xs-push-12 { +.push-xs-12 { left: 100%; } -.col-xs-offset-0 { - margin-left: 0; -} - -.col-xs-offset-1 { +.offset-xs-1 { margin-left: 8.333333%; } -.col-xs-offset-2 { +.offset-xs-2 { margin-left: 16.666667%; } -.col-xs-offset-3 { +.offset-xs-3 { margin-left: 25%; } -.col-xs-offset-4 { +.offset-xs-4 { margin-left: 33.333333%; } -.col-xs-offset-5 { +.offset-xs-5 { margin-left: 41.666667%; } -.col-xs-offset-6 { +.offset-xs-6 { margin-left: 50%; } -.col-xs-offset-7 { +.offset-xs-7 { margin-left: 58.333333%; } -.col-xs-offset-8 { +.offset-xs-8 { margin-left: 66.666667%; } -.col-xs-offset-9 { +.offset-xs-9 { margin-left: 75%; } -.col-xs-offset-10 { +.offset-xs-10 { margin-left: 83.333333%; } -.col-xs-offset-11 { +.offset-xs-11 { margin-left: 91.666667%; } -.col-xs-offset-12 { - margin-left: 100%; -} - @media (min-width: 544px) { - .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { - float: left; - } .col-sm-1 { + float: left; width: 8.333333%; } .col-sm-2 { + float: left; width: 16.666667%; } .col-sm-3 { + float: left; width: 25%; } .col-sm-4 { + float: left; width: 33.333333%; } .col-sm-5 { + float: left; width: 41.666667%; } .col-sm-6 { + float: left; width: 50%; } .col-sm-7 { + float: left; width: 58.333333%; } .col-sm-8 { + float: left; width: 66.666667%; } .col-sm-9 { + float: left; width: 75%; } .col-sm-10 { + float: left; width: 83.333333%; } .col-sm-11 { + float: left; width: 91.666667%; } .col-sm-12 { + float: left; width: 100%; } - .col-sm-pull-0 { + .pull-sm-0 { right: auto; } - .col-sm-pull-1 { + .pull-sm-1 { right: 8.333333%; } - .col-sm-pull-2 { + .pull-sm-2 { right: 16.666667%; } - .col-sm-pull-3 { + .pull-sm-3 { right: 25%; } - .col-sm-pull-4 { + .pull-sm-4 { right: 33.333333%; } - .col-sm-pull-5 { + .pull-sm-5 { right: 41.666667%; } - .col-sm-pull-6 { + .pull-sm-6 { right: 50%; } - .col-sm-pull-7 { + .pull-sm-7 { right: 58.333333%; } - .col-sm-pull-8 { + .pull-sm-8 { right: 66.666667%; } - .col-sm-pull-9 { + .pull-sm-9 { right: 75%; } - .col-sm-pull-10 { + .pull-sm-10 { right: 83.333333%; } - .col-sm-pull-11 { + .pull-sm-11 { right: 91.666667%; } - .col-sm-pull-12 { + .pull-sm-12 { right: 100%; } - .col-sm-push-0 { + .push-sm-0 { left: auto; } - .col-sm-push-1 { + .push-sm-1 { left: 8.333333%; } - .col-sm-push-2 { + .push-sm-2 { left: 16.666667%; } - .col-sm-push-3 { + .push-sm-3 { left: 25%; } - .col-sm-push-4 { + .push-sm-4 { left: 33.333333%; } - .col-sm-push-5 { + .push-sm-5 { left: 41.666667%; } - .col-sm-push-6 { + .push-sm-6 { left: 50%; } - .col-sm-push-7 { + .push-sm-7 { left: 58.333333%; } - .col-sm-push-8 { + .push-sm-8 { left: 66.666667%; } - .col-sm-push-9 { + .push-sm-9 { left: 75%; } - .col-sm-push-10 { + .push-sm-10 { left: 83.333333%; } - .col-sm-push-11 { + .push-sm-11 { left: 91.666667%; } - .col-sm-push-12 { + .push-sm-12 { left: 100%; } - .col-sm-offset-0 { - margin-left: 0; + .offset-sm-0 { + margin-left: 0%; } - .col-sm-offset-1 { + .offset-sm-1 { margin-left: 8.333333%; } - .col-sm-offset-2 { + .offset-sm-2 { margin-left: 16.666667%; } - .col-sm-offset-3 { + .offset-sm-3 { margin-left: 25%; } - .col-sm-offset-4 { + .offset-sm-4 { margin-left: 33.333333%; } - .col-sm-offset-5 { + .offset-sm-5 { margin-left: 41.666667%; } - .col-sm-offset-6 { + .offset-sm-6 { margin-left: 50%; } - .col-sm-offset-7 { + .offset-sm-7 { margin-left: 58.333333%; } - .col-sm-offset-8 { + .offset-sm-8 { margin-left: 66.666667%; } - .col-sm-offset-9 { + .offset-sm-9 { margin-left: 75%; } - .col-sm-offset-10 { + .offset-sm-10 { margin-left: 83.333333%; } - .col-sm-offset-11 { + .offset-sm-11 { margin-left: 91.666667%; } - .col-sm-offset-12 { - margin-left: 100%; - } } @media (min-width: 768px) { - .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { - float: left; - } .col-md-1 { + float: left; width: 8.333333%; } .col-md-2 { + float: left; width: 16.666667%; } .col-md-3 { + float: left; width: 25%; } .col-md-4 { + float: left; width: 33.333333%; } .col-md-5 { + float: left; width: 41.666667%; } .col-md-6 { + float: left; width: 50%; } .col-md-7 { + float: left; width: 58.333333%; } .col-md-8 { + float: left; width: 66.666667%; } .col-md-9 { + float: left; width: 75%; } .col-md-10 { + float: left; width: 83.333333%; } .col-md-11 { + float: left; width: 91.666667%; } .col-md-12 { + float: left; width: 100%; } - .col-md-pull-0 { + .pull-md-0 { right: auto; } - .col-md-pull-1 { + .pull-md-1 { right: 8.333333%; } - .col-md-pull-2 { + .pull-md-2 { right: 16.666667%; } - .col-md-pull-3 { + .pull-md-3 { right: 25%; } - .col-md-pull-4 { + .pull-md-4 { right: 33.333333%; } - .col-md-pull-5 { + .pull-md-5 { right: 41.666667%; } - .col-md-pull-6 { + .pull-md-6 { right: 50%; } - .col-md-pull-7 { + .pull-md-7 { right: 58.333333%; } - .col-md-pull-8 { + .pull-md-8 { right: 66.666667%; } - .col-md-pull-9 { + .pull-md-9 { right: 75%; } - .col-md-pull-10 { + .pull-md-10 { right: 83.333333%; } - .col-md-pull-11 { + .pull-md-11 { right: 91.666667%; } - .col-md-pull-12 { + .pull-md-12 { right: 100%; } - .col-md-push-0 { + .push-md-0 { left: auto; } - .col-md-push-1 { + .push-md-1 { left: 8.333333%; } - .col-md-push-2 { + .push-md-2 { left: 16.666667%; } - .col-md-push-3 { + .push-md-3 { left: 25%; } - .col-md-push-4 { + .push-md-4 { left: 33.333333%; } - .col-md-push-5 { + .push-md-5 { left: 41.666667%; } - .col-md-push-6 { + .push-md-6 { left: 50%; } - .col-md-push-7 { + .push-md-7 { left: 58.333333%; } - .col-md-push-8 { + .push-md-8 { left: 66.666667%; } - .col-md-push-9 { + .push-md-9 { left: 75%; } - .col-md-push-10 { + .push-md-10 { left: 83.333333%; } - .col-md-push-11 { + .push-md-11 { left: 91.666667%; } - .col-md-push-12 { + .push-md-12 { left: 100%; } - .col-md-offset-0 { - margin-left: 0; + .offset-md-0 { + margin-left: 0%; } - .col-md-offset-1 { + .offset-md-1 { margin-left: 8.333333%; } - .col-md-offset-2 { + .offset-md-2 { margin-left: 16.666667%; } - .col-md-offset-3 { + .offset-md-3 { margin-left: 25%; } - .col-md-offset-4 { + .offset-md-4 { margin-left: 33.333333%; } - .col-md-offset-5 { + .offset-md-5 { margin-left: 41.666667%; } - .col-md-offset-6 { + .offset-md-6 { margin-left: 50%; } - .col-md-offset-7 { + .offset-md-7 { margin-left: 58.333333%; } - .col-md-offset-8 { + .offset-md-8 { margin-left: 66.666667%; } - .col-md-offset-9 { + .offset-md-9 { margin-left: 75%; } - .col-md-offset-10 { + .offset-md-10 { margin-left: 83.333333%; } - .col-md-offset-11 { + .offset-md-11 { margin-left: 91.666667%; } - .col-md-offset-12 { - margin-left: 100%; - } } @media (min-width: 992px) { - .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { - float: left; - } .col-lg-1 { + float: left; width: 8.333333%; } .col-lg-2 { + float: left; width: 16.666667%; } .col-lg-3 { + float: left; width: 25%; } .col-lg-4 { + float: left; width: 33.333333%; } .col-lg-5 { + float: left; width: 41.666667%; } .col-lg-6 { + float: left; width: 50%; } .col-lg-7 { + float: left; width: 58.333333%; } .col-lg-8 { + float: left; width: 66.666667%; } .col-lg-9 { + float: left; width: 75%; } .col-lg-10 { + float: left; width: 83.333333%; } .col-lg-11 { + float: left; width: 91.666667%; } .col-lg-12 { + float: left; width: 100%; } - .col-lg-pull-0 { + .pull-lg-0 { right: auto; } - .col-lg-pull-1 { + .pull-lg-1 { right: 8.333333%; } - .col-lg-pull-2 { + .pull-lg-2 { right: 16.666667%; } - .col-lg-pull-3 { + .pull-lg-3 { right: 25%; } - .col-lg-pull-4 { + .pull-lg-4 { right: 33.333333%; } - .col-lg-pull-5 { + .pull-lg-5 { right: 41.666667%; } - .col-lg-pull-6 { + .pull-lg-6 { right: 50%; } - .col-lg-pull-7 { + .pull-lg-7 { right: 58.333333%; } - .col-lg-pull-8 { + .pull-lg-8 { right: 66.666667%; } - .col-lg-pull-9 { + .pull-lg-9 { right: 75%; } - .col-lg-pull-10 { + .pull-lg-10 { right: 83.333333%; } - .col-lg-pull-11 { + .pull-lg-11 { right: 91.666667%; } - .col-lg-pull-12 { + .pull-lg-12 { right: 100%; } - .col-lg-push-0 { + .push-lg-0 { left: auto; } - .col-lg-push-1 { + .push-lg-1 { left: 8.333333%; } - .col-lg-push-2 { + .push-lg-2 { left: 16.666667%; } - .col-lg-push-3 { + .push-lg-3 { left: 25%; } - .col-lg-push-4 { + .push-lg-4 { left: 33.333333%; } - .col-lg-push-5 { + .push-lg-5 { left: 41.666667%; } - .col-lg-push-6 { + .push-lg-6 { left: 50%; } - .col-lg-push-7 { + .push-lg-7 { left: 58.333333%; } - .col-lg-push-8 { + .push-lg-8 { left: 66.666667%; } - .col-lg-push-9 { + .push-lg-9 { left: 75%; } - .col-lg-push-10 { + .push-lg-10 { left: 83.333333%; } - .col-lg-push-11 { + .push-lg-11 { left: 91.666667%; } - .col-lg-push-12 { + .push-lg-12 { left: 100%; } - .col-lg-offset-0 { - margin-left: 0; + .offset-lg-0 { + margin-left: 0%; } - .col-lg-offset-1 { + .offset-lg-1 { margin-left: 8.333333%; } - .col-lg-offset-2 { + .offset-lg-2 { margin-left: 16.666667%; } - .col-lg-offset-3 { + .offset-lg-3 { margin-left: 25%; } - .col-lg-offset-4 { + .offset-lg-4 { margin-left: 33.333333%; } - .col-lg-offset-5 { + .offset-lg-5 { margin-left: 41.666667%; } - .col-lg-offset-6 { + .offset-lg-6 { margin-left: 50%; } - .col-lg-offset-7 { + .offset-lg-7 { margin-left: 58.333333%; } - .col-lg-offset-8 { + .offset-lg-8 { margin-left: 66.666667%; } - .col-lg-offset-9 { + .offset-lg-9 { margin-left: 75%; } - .col-lg-offset-10 { + .offset-lg-10 { margin-left: 83.333333%; } - .col-lg-offset-11 { + .offset-lg-11 { margin-left: 91.666667%; } - .col-lg-offset-12 { - margin-left: 100%; - } } @media (min-width: 1200px) { - .col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12 { - float: left; - } .col-xl-1 { + float: left; width: 8.333333%; } .col-xl-2 { + float: left; width: 16.666667%; } .col-xl-3 { + float: left; width: 25%; } .col-xl-4 { + float: left; width: 33.333333%; } .col-xl-5 { + float: left; width: 41.666667%; } .col-xl-6 { + float: left; width: 50%; } .col-xl-7 { + float: left; width: 58.333333%; } .col-xl-8 { + float: left; width: 66.666667%; } .col-xl-9 { + float: left; width: 75%; } .col-xl-10 { + float: left; width: 83.333333%; } .col-xl-11 { + float: left; width: 91.666667%; } .col-xl-12 { + float: left; width: 100%; } - .col-xl-pull-0 { + .pull-xl-0 { right: auto; } - .col-xl-pull-1 { + .pull-xl-1 { right: 8.333333%; } - .col-xl-pull-2 { + .pull-xl-2 { right: 16.666667%; } - .col-xl-pull-3 { + .pull-xl-3 { right: 25%; } - .col-xl-pull-4 { + .pull-xl-4 { right: 33.333333%; } - .col-xl-pull-5 { + .pull-xl-5 { right: 41.666667%; } - .col-xl-pull-6 { + .pull-xl-6 { right: 50%; } - .col-xl-pull-7 { + .pull-xl-7 { right: 58.333333%; } - .col-xl-pull-8 { + .pull-xl-8 { right: 66.666667%; } - .col-xl-pull-9 { + .pull-xl-9 { right: 75%; } - .col-xl-pull-10 { + .pull-xl-10 { right: 83.333333%; } - .col-xl-pull-11 { + .pull-xl-11 { right: 91.666667%; } - .col-xl-pull-12 { + .pull-xl-12 { right: 100%; } - .col-xl-push-0 { + .push-xl-0 { left: auto; } - .col-xl-push-1 { + .push-xl-1 { left: 8.333333%; } - .col-xl-push-2 { + .push-xl-2 { left: 16.666667%; } - .col-xl-push-3 { + .push-xl-3 { left: 25%; } - .col-xl-push-4 { + .push-xl-4 { left: 33.333333%; } - .col-xl-push-5 { + .push-xl-5 { left: 41.666667%; } - .col-xl-push-6 { + .push-xl-6 { left: 50%; } - .col-xl-push-7 { + .push-xl-7 { left: 58.333333%; } - .col-xl-push-8 { + .push-xl-8 { left: 66.666667%; } - .col-xl-push-9 { + .push-xl-9 { left: 75%; } - .col-xl-push-10 { + .push-xl-10 { left: 83.333333%; } - .col-xl-push-11 { + .push-xl-11 { left: 91.666667%; } - .col-xl-push-12 { + .push-xl-12 { left: 100%; } - .col-xl-offset-0 { - margin-left: 0; + .offset-xl-0 { + margin-left: 0%; } - .col-xl-offset-1 { + .offset-xl-1 { margin-left: 8.333333%; } - .col-xl-offset-2 { + .offset-xl-2 { margin-left: 16.666667%; } - .col-xl-offset-3 { + .offset-xl-3 { margin-left: 25%; } - .col-xl-offset-4 { + .offset-xl-4 { margin-left: 33.333333%; } - .col-xl-offset-5 { + .offset-xl-5 { margin-left: 41.666667%; } - .col-xl-offset-6 { + .offset-xl-6 { margin-left: 50%; } - .col-xl-offset-7 { + .offset-xl-7 { margin-left: 58.333333%; } - .col-xl-offset-8 { + .offset-xl-8 { margin-left: 66.666667%; } - .col-xl-offset-9 { + .offset-xl-9 { margin-left: 75%; } - .col-xl-offset-10 { + .offset-xl-10 { margin-left: 83.333333%; } - .col-xl-offset-11 { + .offset-xl-11 { margin-left: 91.666667%; } - .col-xl-offset-12 { - margin-left: 100%; - } } .table { @@ -1684,8 +1694,7 @@ pre code { .table th, .table td { - padding: .75rem; - line-height: 1.5; + padding: 0.75rem; vertical-align: top; border-top: 1px solid #eceeef; } @@ -1705,7 +1714,7 @@ pre code { .table-sm th, .table-sm td { - padding: .3rem; + padding: 0.3rem; } .table-bordered { @@ -1723,26 +1732,26 @@ pre code { } .table-striped tbody tr:nth-of-type(odd) { - background-color: #f9f9f9; + background-color: rgba(0, 0, 0, 0.05); } .table-hover tbody tr:hover { - background-color: #f5f5f5; + background-color: rgba(0, 0, 0, 0.075); } .table-active, .table-active > th, .table-active > td { - background-color: #f5f5f5; + background-color: rgba(0, 0, 0, 0.075); } .table-hover .table-active:hover { - background-color: #e8e8e8; + background-color: rgba(0, 0, 0, 0.075); } .table-hover .table-active:hover > td, .table-hover .table-active:hover > th { - background-color: #e8e8e8; + background-color: rgba(0, 0, 0, 0.075); } .table-success, @@ -1805,13 +1814,6 @@ pre code { background-color: #ebcccc; } -.table-responsive { - display: block; - width: 100%; - min-height: .01%; - overflow-x: auto; -} - .thead-inverse th { color: #fff; background-color: #373a3c; @@ -1827,16 +1829,23 @@ pre code { background-color: #373a3c; } -.table-inverse.table-bordered { - border: 0; -} - .table-inverse th, .table-inverse td, .table-inverse thead th { border-color: #55595c; } +.table-inverse.table-bordered { + border: 0; +} + +.table-responsive { + display: block; + width: 100%; + min-height: .01%; + overflow-x: auto; +} + .table-reflow thead { float: left; } @@ -1879,14 +1888,16 @@ pre code { .form-control { display: block; width: 100%; - padding: .375rem .75rem; + padding: 0.5rem 0.75rem; font-size: 1rem; - line-height: 1.5; + line-height: 1.25; color: #55595c; background-color: #fff; background-image: none; - border: 1px solid #ccc; - border-radius: .25rem; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid rgba(0, 0, 0, 0.15); + border-radius: 0.25rem; } .form-control::-ms-expand { @@ -1895,6 +1906,8 @@ pre code { } .form-control:focus { + color: #55595c; + background-color: #fff; border-color: #66afe9; outline: none; } @@ -1928,55 +1941,49 @@ pre code { cursor: not-allowed; } +select.form-control:not([size]):not([multiple]) { + height: 2.5rem; +} + +select.form-control:focus::-ms-value { + color: #55595c; + background-color: #fff; +} + .form-control-file, .form-control-range { display: block; } -.form-control-label { - padding: .375rem .75rem; +.col-form-label { + padding-top: 0.5rem; + padding-bottom: 0.5rem; margin-bottom: 0; } -@media screen and (-webkit-min-device-pixel-ratio: 0) { - input[type="date"].form-control, - input[type="time"].form-control, - input[type="datetime-local"].form-control, - input[type="month"].form-control { - line-height: 2.25rem; - } - input[type="date"].input-sm, - .input-group-sm input[type="date"].form-control, - input[type="time"].input-sm, - .input-group-sm - input[type="time"].form-control, - input[type="datetime-local"].input-sm, - .input-group-sm - input[type="datetime-local"].form-control, - input[type="month"].input-sm, - .input-group-sm - input[type="month"].form-control { - line-height: 1.8625rem; - } - input[type="date"].input-lg, - .input-group-lg input[type="date"].form-control, - input[type="time"].input-lg, - .input-group-lg - input[type="time"].form-control, - input[type="datetime-local"].input-lg, - .input-group-lg - input[type="datetime-local"].form-control, - input[type="month"].input-lg, - .input-group-lg - input[type="month"].form-control { - line-height: 3.166667rem; - } +.col-form-label-lg { + padding-top: 0.75rem; + padding-bottom: 0.75rem; + font-size: 1.25rem; +} + +.col-form-label-sm { + padding-top: 0.25rem; + padding-bottom: 0.25rem; + font-size: 0.875rem; +} + +.col-form-legend { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + margin-bottom: 0; + font-size: 1rem; } .form-control-static { - min-height: 2.25rem; - padding-top: .375rem; - padding-bottom: .375rem; + min-height: 2.5rem; + padding-top: 0.5rem; + padding-bottom: 0.5rem; margin-bottom: 0; } @@ -1992,90 +1999,90 @@ pre code { .form-control-sm, .input-group-sm > .form-control, .input-group-sm > .input-group-addon, .input-group-sm > .input-group-btn > .btn { - padding: .275rem .75rem; - font-size: .875rem; - line-height: 1.5; - border-radius: .2rem; + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + border-radius: 0.2rem; +} + +select.form-control-sm:not([size]):not([multiple]), .input-group-sm > select.form-control:not([size]):not([multiple]), +.input-group-sm > select.input-group-addon:not([size]):not([multiple]), +.input-group-sm > .input-group-btn > select.btn:not([size]):not([multiple]) { + height: 1.8125rem; } .form-control-lg, .input-group-lg > .form-control, .input-group-lg > .input-group-addon, .input-group-lg > .input-group-btn > .btn { - padding: .75rem 1.25rem; + padding: 0.75rem 1.5rem; font-size: 1.25rem; - line-height: 1.333333; - border-radius: .3rem; + border-radius: 0.3rem; +} + +select.form-control-lg:not([size]):not([multiple]), .input-group-lg > select.form-control:not([size]):not([multiple]), +.input-group-lg > select.input-group-addon:not([size]):not([multiple]), +.input-group-lg > .input-group-btn > select.btn:not([size]):not([multiple]) { + height: 3.166667rem; } .form-group { margin-bottom: 1rem; } -.radio, -.checkbox { - position: relative; +.form-text { display: block; - margin-bottom: .75rem; + margin-top: 0.25rem; } -.radio label, -.checkbox label { +.form-check { + position: relative; + display: block; + margin-bottom: 0.75rem; +} + +.form-check + .form-check { + margin-top: -.25rem; +} + +.form-check.disabled .form-check-label { + color: #818a91; + cursor: not-allowed; +} + +.form-check-label { padding-left: 1.25rem; margin-bottom: 0; - font-weight: normal; cursor: pointer; } -.radio label input:only-child, -.checkbox label input:only-child { - position: static; -} - -.radio input[type="radio"], -.radio-inline input[type="radio"], -.checkbox input[type="checkbox"], -.checkbox-inline input[type="checkbox"] { +.form-check-input { position: absolute; margin-top: .25rem; margin-left: -1.25rem; } -.radio + .radio, -.checkbox + .checkbox { - margin-top: -.25rem; +.form-check-input:only-child { + position: static; } -.radio-inline, -.checkbox-inline { +.form-check-inline { position: relative; display: inline-block; padding-left: 1.25rem; margin-bottom: 0; - font-weight: normal; vertical-align: middle; cursor: pointer; } -.radio-inline + .radio-inline, -.checkbox-inline + .checkbox-inline { - margin-top: 0; +.form-check-inline + .form-check-inline { margin-left: .75rem; } -input[type="radio"]:disabled, input[type="radio"].disabled, -input[type="checkbox"]:disabled, -input[type="checkbox"].disabled { +.form-check-inline.disabled { cursor: not-allowed; } -.radio-inline.disabled, -.checkbox-inline.disabled { - cursor: not-allowed; -} - -.radio.disabled label, -.checkbox.disabled label { - cursor: not-allowed; +.form-control-feedback { + margin-top: 0.25rem; } .form-control-success, @@ -2083,12 +2090,12 @@ input[type="checkbox"].disabled { .form-control-danger { padding-right: 2.25rem; background-repeat: no-repeat; - background-position: center right .5625rem; - -webkit-background-size: 1.4625rem 1.4625rem; - background-size: 1.4625rem 1.4625rem; + background-position: center right 0.625rem; + -webkit-background-size: 1.25rem 1.25rem; + background-size: 1.25rem 1.25rem; } -.has-success .text-help, +.has-success .form-control-feedback, .has-success .form-control-label, .has-success .radio, .has-success .checkbox, @@ -2097,7 +2104,8 @@ input[type="checkbox"].disabled { .has-success.radio label, .has-success.checkbox label, .has-success.radio-inline label, -.has-success.checkbox-inline label { +.has-success.checkbox-inline label, +.has-success .custom-control { color: #5cb85c; } @@ -2107,8 +2115,8 @@ input[type="checkbox"].disabled { .has-success .input-group-addon { color: #5cb85c; - background-color: #eaf6ea; border-color: #5cb85c; + background-color: #eaf6ea; } .has-success .form-control-feedback { @@ -2116,10 +2124,10 @@ input[type="checkbox"].disabled { } .has-success .form-control-success { - background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2MTIgNzkyIj48cGF0aCBmaWxsPSIjNWNiODVjIiBkPSJNMjMzLjggNjEwYy0xMy4zIDAtMjYtNi0zNC0xNi44TDkwLjUgNDQ4LjhDNzYuMyA0MzAgODAgNDAzLjMgOTguOCAzODljMTguOC0xNC4yIDQ1LjUtMTAuNCA1OS44IDguNGw3MiA5NUw0NTEuMyAyNDJjMTIuNS0yMCAzOC44LTI2LjIgNTguOC0xMy43IDIwIDEyLjQgMjYgMzguNyAxMy43IDU4LjhMMjcwIDU5MGMtNy40IDEyLTIwLjIgMTkuNC0zNC4zIDIwaC0yeiIvPjwvc3ZnPg=="); + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%235cb85c' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3E%3C/svg%3E"); } -.has-warning .text-help, +.has-warning .form-control-feedback, .has-warning .form-control-label, .has-warning .radio, .has-warning .checkbox, @@ -2128,7 +2136,8 @@ input[type="checkbox"].disabled { .has-warning.radio label, .has-warning.checkbox label, .has-warning.radio-inline label, -.has-warning.checkbox-inline label { +.has-warning.checkbox-inline label, +.has-warning .custom-control { color: #f0ad4e; } @@ -2138,8 +2147,8 @@ input[type="checkbox"].disabled { .has-warning .input-group-addon { color: #f0ad4e; - background-color: white; border-color: #f0ad4e; + background-color: white; } .has-warning .form-control-feedback { @@ -2147,10 +2156,10 @@ input[type="checkbox"].disabled { } .has-warning .form-control-warning { - background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2MTIgNzkyIj48cGF0aCBmaWxsPSIjZjBhZDRlIiBkPSJNNjAzIDY0MC4ybC0yNzguNS01MDljLTMuOC02LjYtMTAuOC0xMC42LTE4LjUtMTAuNnMtMTQuNyA0LTE4LjUgMTAuNkw5IDY0MC4yYy0zLjcgNi41LTMuNiAxNC40LjIgMjAuOCAzLjggNi41IDEwLjggMTAuNCAxOC4zIDEwLjRoNTU3YzcuNiAwIDE0LjYtNCAxOC40LTEwLjQgMy41LTYuNCAzLjYtMTQuNCAwLTIwLjh6bS0yNjYuNC0zMGgtNjEuMlY1NDloNjEuMnY2MS4yem0wLTEwN2gtNjEuMlYzMDRoNjEuMnYxOTl6Ii8+PC9zdmc+"); + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23f0ad4e' d='M4.4 5.324h-.8v-2.46h.8zm0 1.42h-.8V5.89h.8zM3.76.63L.04 7.075c-.115.2.016.425.26.426h7.397c.242 0 .372-.226.258-.426C6.726 4.924 5.47 2.79 4.253.63c-.113-.174-.39-.174-.494 0z'/%3E%3C/svg%3E"); } -.has-danger .text-help, +.has-danger .form-control-feedback, .has-danger .form-control-label, .has-danger .radio, .has-danger .checkbox, @@ -2159,7 +2168,8 @@ input[type="checkbox"].disabled { .has-danger.radio label, .has-danger.checkbox label, .has-danger.radio-inline label, -.has-danger.checkbox-inline label { +.has-danger.checkbox-inline label, +.has-danger .custom-control { color: #d9534f; } @@ -2169,8 +2179,8 @@ input[type="checkbox"].disabled { .has-danger .input-group-addon { color: #d9534f; - background-color: #fdf7f7; border-color: #d9534f; + background-color: #fdf7f7; } .has-danger .form-control-feedback { @@ -2178,7 +2188,7 @@ input[type="checkbox"].disabled { } .has-danger .form-control-danger { - background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2MTIgNzkyIj48cGF0aCBmaWxsPSIjZDk1MzRmIiBkPSJNNDQ3IDU0NC40Yy0xNC40IDE0LjQtMzcuNiAxNC40LTUyIDBsLTg5LTkyLjctODkgOTIuN2MtMTQuNSAxNC40LTM3LjcgMTQuNC01MiAwLTE0LjQtMTQuNC0xNC40LTM3LjYgMC01Mmw5Mi40LTk2LjMtOTIuNC05Ni4zYy0xNC40LTE0LjQtMTQuNC0zNy42IDAtNTJzMzcuNi0xNC4zIDUyIDBsODkgOTIuOCA4OS4yLTkyLjdjMTQuNC0xNC40IDM3LjYtMTQuNCA1MiAwIDE0LjMgMTQuNCAxNC4zIDM3LjYgMCA1MkwzNTQuNiAzOTZsOTIuNCA5Ni40YzE0LjQgMTQuNCAxNC40IDM3LjYgMCA1MnoiLz48L3N2Zz4="); + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23d9534f' viewBox='-2 -2 7 7'%3E%3Cpath stroke='%23d9534f' d='M0 0l3 3m0-3L0 3'/%3E%3Ccircle r='.5'/%3E%3Ccircle cx='3' r='.5'/%3E%3Ccircle cy='3' r='.5'/%3E%3Ccircle cx='3' cy='3' r='.5'/%3E%3C/svg%3E"); } @media (min-width: 544px) { @@ -2211,19 +2221,16 @@ input[type="checkbox"].disabled { margin-bottom: 0; vertical-align: middle; } - .form-inline .radio, - .form-inline .checkbox { + .form-inline .form-check { display: inline-block; margin-top: 0; margin-bottom: 0; vertical-align: middle; } - .form-inline .radio label, - .form-inline .checkbox label { + .form-inline .form-check-label { padding-left: 0; } - .form-inline .radio input[type="radio"], - .form-inline .checkbox input[type="checkbox"] { + .form-inline .form-check-input { position: relative; margin-left: 0; } @@ -2234,10 +2241,8 @@ input[type="checkbox"].disabled { .btn { display: inline-block; - padding: .375rem 1rem; - font-size: 1rem; font-weight: normal; - line-height: 1.5; + line-height: 1.25; text-align: center; white-space: nowrap; vertical-align: middle; @@ -2247,11 +2252,12 @@ input[type="checkbox"].disabled { -ms-user-select: none; user-select: none; border: 1px solid transparent; - border-radius: .25rem; + padding: 0.5rem 1rem; + font-size: 1rem; + border-radius: 0.25rem; } .btn:focus, .btn.focus, .btn:active:focus, .btn:active.focus, .btn.active:focus, .btn.active.focus { - outline: thin dotted; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } @@ -2301,8 +2307,8 @@ fieldset[disabled] a.btn { .open > .btn-primary.dropdown-toggle { color: #fff; background-color: #025aa5; - background-image: none; border-color: #01549b; + background-image: none; } .btn-primary:active:hover, .btn-primary:active:focus, .btn-primary:active.focus, .btn-primary.active:hover, .btn-primary.active:focus, .btn-primary.active.focus, @@ -2346,8 +2352,8 @@ fieldset[disabled] a.btn { .open > .btn-secondary.dropdown-toggle { color: #373a3c; background-color: #e6e6e6; - background-image: none; border-color: #adadad; + background-image: none; } .btn-secondary:active:hover, .btn-secondary:active:focus, .btn-secondary:active.focus, .btn-secondary.active:hover, .btn-secondary.active:focus, .btn-secondary.active.focus, @@ -2391,8 +2397,8 @@ fieldset[disabled] a.btn { .open > .btn-info.dropdown-toggle { color: #fff; background-color: #31b0d5; - background-image: none; border-color: #2aabd2; + background-image: none; } .btn-info:active:hover, .btn-info:active:focus, .btn-info:active.focus, .btn-info.active:hover, .btn-info.active:focus, .btn-info.active.focus, @@ -2436,8 +2442,8 @@ fieldset[disabled] a.btn { .open > .btn-success.dropdown-toggle { color: #fff; background-color: #449d44; - background-image: none; border-color: #419641; + background-image: none; } .btn-success:active:hover, .btn-success:active:focus, .btn-success:active.focus, .btn-success.active:hover, .btn-success.active:focus, .btn-success.active.focus, @@ -2481,8 +2487,8 @@ fieldset[disabled] a.btn { .open > .btn-warning.dropdown-toggle { color: #fff; background-color: #ec971f; - background-image: none; border-color: #eb9316; + background-image: none; } .btn-warning:active:hover, .btn-warning:active:focus, .btn-warning:active.focus, .btn-warning.active:hover, .btn-warning.active:focus, .btn-warning.active.focus, @@ -2526,8 +2532,8 @@ fieldset[disabled] a.btn { .open > .btn-danger.dropdown-toggle { color: #fff; background-color: #c9302c; - background-image: none; border-color: #c12e2a; + background-image: none; } .btn-danger:active:hover, .btn-danger:active:focus, .btn-danger:active.focus, .btn-danger.active:hover, .btn-danger.active:focus, .btn-danger.active.focus, @@ -2549,171 +2555,261 @@ fieldset[disabled] a.btn { border-color: #d9534f; } -.btn-primary-outline { +.btn-outline-primary { color: #0275d8; - background-color: transparent; background-image: none; + background-color: transparent; border-color: #0275d8; } -.btn-primary-outline:focus, .btn-primary-outline.focus, .btn-primary-outline:active, .btn-primary-outline.active, -.open > .btn-primary-outline.dropdown-toggle { +.btn-outline-primary:hover { color: #fff; background-color: #0275d8; border-color: #0275d8; } -.btn-primary-outline:hover { +.btn-outline-primary:focus, .btn-outline-primary.focus { color: #fff; background-color: #0275d8; border-color: #0275d8; } -.btn-primary-outline.disabled:focus, .btn-primary-outline.disabled.focus, .btn-primary-outline:disabled:focus, .btn-primary-outline:disabled.focus { +.btn-outline-primary:active, .btn-outline-primary.active, +.open > .btn-outline-primary.dropdown-toggle { + color: #fff; + background-color: #0275d8; + border-color: #0275d8; +} + +.btn-outline-primary:active:hover, .btn-outline-primary:active:focus, .btn-outline-primary:active.focus, .btn-outline-primary.active:hover, .btn-outline-primary.active:focus, .btn-outline-primary.active.focus, +.open > .btn-outline-primary.dropdown-toggle:hover, +.open > .btn-outline-primary.dropdown-toggle:focus, +.open > .btn-outline-primary.dropdown-toggle.focus { + color: #fff; + background-color: #014682; + border-color: #01315a; +} + +.btn-outline-primary.disabled:focus, .btn-outline-primary.disabled.focus, .btn-outline-primary:disabled:focus, .btn-outline-primary:disabled.focus { border-color: #43a7fd; } -.btn-primary-outline.disabled:hover, .btn-primary-outline:disabled:hover { +.btn-outline-primary.disabled:hover, .btn-outline-primary:disabled:hover { border-color: #43a7fd; } -.btn-secondary-outline { +.btn-outline-secondary { color: #ccc; - background-color: transparent; background-image: none; + background-color: transparent; border-color: #ccc; } -.btn-secondary-outline:focus, .btn-secondary-outline.focus, .btn-secondary-outline:active, .btn-secondary-outline.active, -.open > .btn-secondary-outline.dropdown-toggle { +.btn-outline-secondary:hover { color: #fff; background-color: #ccc; border-color: #ccc; } -.btn-secondary-outline:hover { +.btn-outline-secondary:focus, .btn-outline-secondary.focus { color: #fff; background-color: #ccc; border-color: #ccc; } -.btn-secondary-outline.disabled:focus, .btn-secondary-outline.disabled.focus, .btn-secondary-outline:disabled:focus, .btn-secondary-outline:disabled.focus { +.btn-outline-secondary:active, .btn-outline-secondary.active, +.open > .btn-outline-secondary.dropdown-toggle { + color: #fff; + background-color: #ccc; + border-color: #ccc; +} + +.btn-outline-secondary:active:hover, .btn-outline-secondary:active:focus, .btn-outline-secondary:active.focus, .btn-outline-secondary.active:hover, .btn-outline-secondary.active:focus, .btn-outline-secondary.active.focus, +.open > .btn-outline-secondary.dropdown-toggle:hover, +.open > .btn-outline-secondary.dropdown-toggle:focus, +.open > .btn-outline-secondary.dropdown-toggle.focus { + color: #fff; + background-color: #a1a1a1; + border-color: #8c8c8c; +} + +.btn-outline-secondary.disabled:focus, .btn-outline-secondary.disabled.focus, .btn-outline-secondary:disabled:focus, .btn-outline-secondary:disabled.focus { border-color: white; } -.btn-secondary-outline.disabled:hover, .btn-secondary-outline:disabled:hover { +.btn-outline-secondary.disabled:hover, .btn-outline-secondary:disabled:hover { border-color: white; } -.btn-info-outline { +.btn-outline-info { color: #5bc0de; - background-color: transparent; background-image: none; + background-color: transparent; border-color: #5bc0de; } -.btn-info-outline:focus, .btn-info-outline.focus, .btn-info-outline:active, .btn-info-outline.active, -.open > .btn-info-outline.dropdown-toggle { +.btn-outline-info:hover { color: #fff; background-color: #5bc0de; border-color: #5bc0de; } -.btn-info-outline:hover { +.btn-outline-info:focus, .btn-outline-info.focus { color: #fff; background-color: #5bc0de; border-color: #5bc0de; } -.btn-info-outline.disabled:focus, .btn-info-outline.disabled.focus, .btn-info-outline:disabled:focus, .btn-info-outline:disabled.focus { +.btn-outline-info:active, .btn-outline-info.active, +.open > .btn-outline-info.dropdown-toggle { + color: #fff; + background-color: #5bc0de; + border-color: #5bc0de; +} + +.btn-outline-info:active:hover, .btn-outline-info:active:focus, .btn-outline-info:active.focus, .btn-outline-info.active:hover, .btn-outline-info.active:focus, .btn-outline-info.active.focus, +.open > .btn-outline-info.dropdown-toggle:hover, +.open > .btn-outline-info.dropdown-toggle:focus, +.open > .btn-outline-info.dropdown-toggle.focus { + color: #fff; + background-color: #269abc; + border-color: #1f7e9a; +} + +.btn-outline-info.disabled:focus, .btn-outline-info.disabled.focus, .btn-outline-info:disabled:focus, .btn-outline-info:disabled.focus { border-color: #b0e1ef; } -.btn-info-outline.disabled:hover, .btn-info-outline:disabled:hover { +.btn-outline-info.disabled:hover, .btn-outline-info:disabled:hover { border-color: #b0e1ef; } -.btn-success-outline { +.btn-outline-success { color: #5cb85c; - background-color: transparent; background-image: none; + background-color: transparent; border-color: #5cb85c; } -.btn-success-outline:focus, .btn-success-outline.focus, .btn-success-outline:active, .btn-success-outline.active, -.open > .btn-success-outline.dropdown-toggle { +.btn-outline-success:hover { color: #fff; background-color: #5cb85c; border-color: #5cb85c; } -.btn-success-outline:hover { +.btn-outline-success:focus, .btn-outline-success.focus { color: #fff; background-color: #5cb85c; border-color: #5cb85c; } -.btn-success-outline.disabled:focus, .btn-success-outline.disabled.focus, .btn-success-outline:disabled:focus, .btn-success-outline:disabled.focus { +.btn-outline-success:active, .btn-outline-success.active, +.open > .btn-outline-success.dropdown-toggle { + color: #fff; + background-color: #5cb85c; + border-color: #5cb85c; +} + +.btn-outline-success:active:hover, .btn-outline-success:active:focus, .btn-outline-success:active.focus, .btn-outline-success.active:hover, .btn-outline-success.active:focus, .btn-outline-success.active.focus, +.open > .btn-outline-success.dropdown-toggle:hover, +.open > .btn-outline-success.dropdown-toggle:focus, +.open > .btn-outline-success.dropdown-toggle.focus { + color: #fff; + background-color: #398439; + border-color: #2d672d; +} + +.btn-outline-success.disabled:focus, .btn-outline-success.disabled.focus, .btn-outline-success:disabled:focus, .btn-outline-success:disabled.focus { border-color: #a3d7a3; } -.btn-success-outline.disabled:hover, .btn-success-outline:disabled:hover { +.btn-outline-success.disabled:hover, .btn-outline-success:disabled:hover { border-color: #a3d7a3; } -.btn-warning-outline { +.btn-outline-warning { color: #f0ad4e; - background-color: transparent; background-image: none; + background-color: transparent; border-color: #f0ad4e; } -.btn-warning-outline:focus, .btn-warning-outline.focus, .btn-warning-outline:active, .btn-warning-outline.active, -.open > .btn-warning-outline.dropdown-toggle { +.btn-outline-warning:hover { color: #fff; background-color: #f0ad4e; border-color: #f0ad4e; } -.btn-warning-outline:hover { +.btn-outline-warning:focus, .btn-outline-warning.focus { color: #fff; background-color: #f0ad4e; border-color: #f0ad4e; } -.btn-warning-outline.disabled:focus, .btn-warning-outline.disabled.focus, .btn-warning-outline:disabled:focus, .btn-warning-outline:disabled.focus { +.btn-outline-warning:active, .btn-outline-warning.active, +.open > .btn-outline-warning.dropdown-toggle { + color: #fff; + background-color: #f0ad4e; + border-color: #f0ad4e; +} + +.btn-outline-warning:active:hover, .btn-outline-warning:active:focus, .btn-outline-warning:active.focus, .btn-outline-warning.active:hover, .btn-outline-warning.active:focus, .btn-outline-warning.active.focus, +.open > .btn-outline-warning.dropdown-toggle:hover, +.open > .btn-outline-warning.dropdown-toggle:focus, +.open > .btn-outline-warning.dropdown-toggle.focus { + color: #fff; + background-color: #d58512; + border-color: #b06d0f; +} + +.btn-outline-warning.disabled:focus, .btn-outline-warning.disabled.focus, .btn-outline-warning:disabled:focus, .btn-outline-warning:disabled.focus { border-color: #f8d9ac; } -.btn-warning-outline.disabled:hover, .btn-warning-outline:disabled:hover { +.btn-outline-warning.disabled:hover, .btn-outline-warning:disabled:hover { border-color: #f8d9ac; } -.btn-danger-outline { +.btn-outline-danger { color: #d9534f; - background-color: transparent; background-image: none; + background-color: transparent; border-color: #d9534f; } -.btn-danger-outline:focus, .btn-danger-outline.focus, .btn-danger-outline:active, .btn-danger-outline.active, -.open > .btn-danger-outline.dropdown-toggle { +.btn-outline-danger:hover { color: #fff; background-color: #d9534f; border-color: #d9534f; } -.btn-danger-outline:hover { +.btn-outline-danger:focus, .btn-outline-danger.focus { color: #fff; background-color: #d9534f; border-color: #d9534f; } -.btn-danger-outline.disabled:focus, .btn-danger-outline.disabled.focus, .btn-danger-outline:disabled:focus, .btn-danger-outline:disabled.focus { +.btn-outline-danger:active, .btn-outline-danger.active, +.open > .btn-outline-danger.dropdown-toggle { + color: #fff; + background-color: #d9534f; + border-color: #d9534f; +} + +.btn-outline-danger:active:hover, .btn-outline-danger:active:focus, .btn-outline-danger:active.focus, .btn-outline-danger.active:hover, .btn-outline-danger.active:focus, .btn-outline-danger.active.focus, +.open > .btn-outline-danger.dropdown-toggle:hover, +.open > .btn-outline-danger.dropdown-toggle:focus, +.open > .btn-outline-danger.dropdown-toggle.focus { + color: #fff; + background-color: #ac2925; + border-color: #8b211e; +} + +.btn-outline-danger.disabled:focus, .btn-outline-danger.disabled.focus, .btn-outline-danger:disabled:focus, .btn-outline-danger:disabled.focus { border-color: #eba5a3; } -.btn-danger-outline.disabled:hover, .btn-danger-outline:disabled:hover { +.btn-outline-danger.disabled:hover, .btn-outline-danger:disabled:hover { border-color: #eba5a3; } @@ -2747,17 +2843,15 @@ fieldset[disabled] a.btn { } .btn-lg, .btn-group-lg > .btn { - padding: .75rem 1.25rem; + padding: 0.75rem 1.5rem; font-size: 1.25rem; - line-height: 1.333333; - border-radius: .3rem; + border-radius: 0.3rem; } .btn-sm, .btn-group-sm > .btn { - padding: .25rem .75rem; - font-size: .875rem; - line-height: 1.5; - border-radius: .2rem; + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + border-radius: 0.2rem; } .btn-block { @@ -2766,7 +2860,7 @@ fieldset[disabled] a.btn { } .btn-block + .btn-block { - margin-top: 5px; + margin-top: 0.5rem; } input[type="submit"].btn-block, @@ -2778,8 +2872,8 @@ input[type="button"].btn-block { .fade { opacity: 0; -webkit-transition: opacity .15s linear; - -o-transition: opacity .15s linear; - transition: opacity .15s linear; + -o-transition: opacity .15s linear; + transition: opacity .15s linear; } .fade.in { @@ -2805,8 +2899,8 @@ input[type="button"].btn-block { -o-transition-duration: .35s; transition-duration: .35s; -webkit-transition-property: height; - -o-transition-property: height; - transition-property: height; + -o-transition-property: height; + transition-property: height; } .dropup, @@ -2818,13 +2912,12 @@ input[type="button"].btn-block { display: inline-block; width: 0; height: 0; - margin-right: .25rem; - margin-left: .25rem; + margin-left: 0.3em; vertical-align: middle; content: ""; - border-top: .3em solid; - border-right: .3em solid transparent; - border-left: .3em solid transparent; + border-top: 0.3em solid; + border-right: 0.3em solid transparent; + border-left: 0.3em solid transparent; } .dropdown-toggle:focus { @@ -2833,7 +2926,7 @@ input[type="button"].btn-block { .dropup .dropdown-toggle::after { border-top: 0; - border-bottom: .3em solid; + border-bottom: 0.3em solid; } .dropdown-menu { @@ -2853,13 +2946,13 @@ input[type="button"].btn-block { background-color: #fff; -webkit-background-clip: padding-box; background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, .15); - border-radius: .25rem; + border: 1px solid rgba(0, 0, 0, 0.15); + border-radius: 0.25rem; } .dropdown-divider { height: 1px; - margin: .5rem 0; + margin: 0.5rem 0; overflow: hidden; background-color: #e5e5e5; } @@ -2870,7 +2963,6 @@ input[type="button"].btn-block { padding: 3px 20px; clear: both; font-weight: normal; - line-height: 1.5; color: #373a3c; text-align: inherit; white-space: nowrap; @@ -2923,9 +3015,8 @@ input[type="button"].btn-block { .dropdown-header { display: block; - padding: 3px 20px; - font-size: .875rem; - line-height: 1.5; + padding: 5px 20px; + font-size: 0.875rem; color: #818a91; white-space: nowrap; } @@ -2939,16 +3030,11 @@ input[type="button"].btn-block { z-index: 990; } -.pull-right > .dropdown-menu { - right: 0; - left: auto; -} - .dropup .caret, .navbar-fixed-bottom .dropdown .caret { content: ""; border-top: 0; - border-bottom: .3em solid; + border-bottom: 0.3em solid; } .dropup .dropdown-menu, @@ -2991,13 +3077,13 @@ input[type="button"].btn-block { } .btn-toolbar { - margin-left: -5px; + margin-left: -0.5rem; } .btn-toolbar::after { + content: ""; display: table; clear: both; - content: ""; } .btn-toolbar .btn-group, @@ -3008,7 +3094,7 @@ input[type="button"].btn-block { .btn-toolbar > .btn, .btn-toolbar > .btn-group, .btn-toolbar > .input-group { - margin-left: 5px; + margin-left: 0.5rem; } .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { @@ -3020,14 +3106,14 @@ input[type="button"].btn-block { } .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { - border-top-right-radius: 0; border-bottom-right-radius: 0; + border-top-right-radius: 0; } .btn-group > .btn:last-child:not(:first-child), .btn-group > .dropdown-toggle:not(:first-child) { - border-top-left-radius: 0; border-bottom-left-radius: 0; + border-top-left-radius: 0; } .btn-group > .btn-group { @@ -3040,13 +3126,13 @@ input[type="button"].btn-block { .btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child, .btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle { - border-top-right-radius: 0; border-bottom-right-radius: 0; + border-top-right-radius: 0; } .btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { - border-top-left-radius: 0; border-bottom-left-radius: 0; + border-top-left-radius: 0; } .btn-group .dropdown-toggle:active, @@ -3054,14 +3140,23 @@ input[type="button"].btn-block { outline: 0; } -.btn-group > .btn + .dropdown-toggle { - padding-right: 8px; - padding-left: 8px; +.btn + .dropdown-toggle-split { + padding-right: 0.75rem; + padding-left: 0.75rem; } -.btn-group > .btn-lg + .dropdown-toggle, .btn-group-lg.btn-group > .btn + .dropdown-toggle { - padding-right: 12px; - padding-left: 12px; +.btn + .dropdown-toggle-split::after { + margin-left: 0; +} + +.btn-sm + .dropdown-toggle-split, .btn-group-sm > .btn + .dropdown-toggle-split { + padding-right: 0.375rem; + padding-left: 0.375rem; +} + +.btn-lg + .dropdown-toggle-split, .btn-group-lg > .btn + .dropdown-toggle-split { + padding-right: 1.125rem; + padding-left: 1.125rem; } .btn .caret { @@ -3069,12 +3164,12 @@ input[type="button"].btn-block { } .btn-lg .caret, .btn-group-lg > .btn .caret { - border-width: .3em .3em 0; + border-width: 0.3em 0.3em 0; border-bottom-width: 0; } .dropup .btn-lg .caret, .dropup .btn-group-lg > .btn .caret { - border-width: 0 .3em .3em; + border-width: 0 0.3em 0.3em; } .btn-group-vertical > .btn, @@ -3087,9 +3182,9 @@ input[type="button"].btn-block { } .btn-group-vertical > .btn-group::after { + content: ""; display: table; clear: both; - content: ""; } .btn-group-vertical > .btn-group > .btn { @@ -3109,15 +3204,13 @@ input[type="button"].btn-block { } .btn-group-vertical > .btn:first-child:not(:last-child) { - border-top-right-radius: .25rem; border-bottom-right-radius: 0; border-bottom-left-radius: 0; } .btn-group-vertical > .btn:last-child:not(:first-child) { - border-top-left-radius: 0; border-top-right-radius: 0; - border-bottom-left-radius: .25rem; + border-top-left-radius: 0; } .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { @@ -3131,8 +3224,8 @@ input[type="button"].btn-block { } .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { - border-top-left-radius: 0; border-top-right-radius: 0; + border-top-left-radius: 0; } [data-toggle="buttons"] > .btn input[type="radio"], @@ -3146,6 +3239,7 @@ input[type="button"].btn-block { .input-group { position: relative; + width: 100%; display: table; border-collapse: separate; } @@ -3182,31 +3276,32 @@ input[type="button"].btn-block { } .input-group-addon { - padding: .375rem .75rem; + padding: 0.5rem 0.75rem; + margin-bottom: 0; font-size: 1rem; font-weight: normal; - line-height: 1; + line-height: 1.25; color: #55595c; text-align: center; background-color: #eceeef; - border: 1px solid #ccc; - border-radius: .25rem; + border: 1px solid rgba(0, 0, 0, 0.15); + border-radius: 0.25rem; } .input-group-addon.form-control-sm, .input-group-sm > .input-group-addon, .input-group-sm > .input-group-btn > .input-group-addon.btn { - padding: .275rem .75rem; - font-size: .875rem; - border-radius: .2rem; + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + border-radius: 0.2rem; } .input-group-addon.form-control-lg, .input-group-lg > .input-group-addon, .input-group-lg > .input-group-btn > .input-group-addon.btn { - padding: .75rem 1.25rem; + padding: 0.75rem 1.5rem; font-size: 1.25rem; - border-radius: .3rem; + border-radius: 0.3rem; } .input-group-addon input[type="radio"], @@ -3214,33 +3309,33 @@ input[type="button"].btn-block { margin-top: 0; } -.input-group .form-control:first-child, -.input-group-addon:first-child, -.input-group-btn:first-child > .btn, -.input-group-btn:first-child > .btn-group > .btn, -.input-group-btn:first-child > .dropdown-toggle, -.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), -.input-group-btn:last-child > .btn-group:not(:last-child) > .btn { - border-top-right-radius: 0; +.input-group .form-control:not(:last-child), +.input-group-addon:not(:last-child), +.input-group-btn:not(:last-child) > .btn, +.input-group-btn:not(:last-child) > .btn-group > .btn, +.input-group-btn:not(:last-child) > .dropdown-toggle, +.input-group-btn:not(:first-child) > .btn:not(:last-child):not(.dropdown-toggle), +.input-group-btn:not(:first-child) > .btn-group:not(:last-child) > .btn { border-bottom-right-radius: 0; + border-top-right-radius: 0; } -.input-group-addon:first-child { +.input-group-addon:not(:last-child) { border-right: 0; } -.input-group .form-control:last-child, -.input-group-addon:last-child, -.input-group-btn:last-child > .btn, -.input-group-btn:last-child > .btn-group > .btn, -.input-group-btn:last-child > .dropdown-toggle, -.input-group-btn:first-child > .btn:not(:first-child), -.input-group-btn:first-child > .btn-group:not(:first-child) > .btn { - border-top-left-radius: 0; +.input-group .form-control:not(:first-child), +.input-group-addon:not(:first-child), +.input-group-btn:not(:first-child) > .btn, +.input-group-btn:not(:first-child) > .btn-group > .btn, +.input-group-btn:not(:first-child) > .dropdown-toggle, +.input-group-btn:not(:last-child) > .btn:not(:first-child), +.input-group-btn:not(:last-child) > .btn-group:not(:first-child) > .btn { border-bottom-left-radius: 0; + border-top-left-radius: 0; } -.input-group-addon:last-child { +.form-control + .input-group-addon:not(:first-child) { border-left: 0; } @@ -3262,173 +3357,187 @@ input[type="button"].btn-block { z-index: 3; } -.input-group-btn:first-child > .btn, -.input-group-btn:first-child > .btn-group { +.input-group-btn:not(:last-child) > .btn, +.input-group-btn:not(:last-child) > .btn-group { margin-right: -1px; } -.input-group-btn:last-child > .btn, -.input-group-btn:last-child > .btn-group { +.input-group-btn:not(:first-child) > .btn, +.input-group-btn:not(:first-child) > .btn-group { z-index: 2; margin-left: -1px; } -.input-group-btn:last-child > .btn:focus, .input-group-btn:last-child > .btn:active, .input-group-btn:last-child > .btn:hover, -.input-group-btn:last-child > .btn-group:focus, -.input-group-btn:last-child > .btn-group:active, -.input-group-btn:last-child > .btn-group:hover { +.input-group-btn:not(:first-child) > .btn:focus, .input-group-btn:not(:first-child) > .btn:active, .input-group-btn:not(:first-child) > .btn:hover, +.input-group-btn:not(:first-child) > .btn-group:focus, +.input-group-btn:not(:first-child) > .btn-group:active, +.input-group-btn:not(:first-child) > .btn-group:hover { z-index: 3; } -.c-input { +.custom-control { position: relative; display: inline; padding-left: 1.5rem; - color: #555; cursor: pointer; } -.c-input > input { +.custom-control + .custom-control { + margin-left: 1rem; +} + +.custom-control-input { position: absolute; z-index: -1; opacity: 0; } -.c-input > input:checked ~ .c-indicator { +.custom-control-input:checked ~ .custom-control-indicator { color: #fff; background-color: #0074d9; } -.c-input > input:focus ~ .c-indicator { - -webkit-box-shadow: 0 0 0 .075rem #fff, 0 0 0 .2rem #0074d9; - box-shadow: 0 0 0 .075rem #fff, 0 0 0 .2rem #0074d9; +.custom-control-input:focus ~ .custom-control-indicator { + -webkit-box-shadow: 0 0 0 0.075rem #fff, 0 0 0 0.2rem #0074d9; + box-shadow: 0 0 0 0.075rem #fff, 0 0 0 0.2rem #0074d9; } -.c-input > input:active ~ .c-indicator { +.custom-control-input:active ~ .custom-control-indicator { color: #fff; background-color: #84c6ff; } -.c-input + .c-input { - margin-left: 1rem; +.custom-control-input:disabled ~ .custom-control-indicator { + cursor: not-allowed; + background-color: #eee; } -.c-indicator { +.custom-control-input:disabled ~ .custom-control-description { + color: #767676; + cursor: not-allowed; +} + +.custom-control-indicator { position: absolute; - top: 0; + top: .0625rem; left: 0; display: block; width: 1rem; height: 1rem; - font-size: 65%; - line-height: 1rem; - color: #eee; - text-align: center; + pointer-events: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; - background-color: #eee; + background-color: #ddd; background-repeat: no-repeat; background-position: center center; -webkit-background-size: 50% 50%; background-size: 50% 50%; } -.c-checkbox .c-indicator { - border-radius: .25rem; +.custom-checkbox .custom-control-indicator { + border-radius: 0.25rem; } -.c-checkbox input:checked ~ .c-indicator { - background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgOCA4IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA4IDgiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTYuNCwxTDUuNywxLjdMMi45LDQuNUwyLjEsMy43TDEuNCwzTDAsNC40bDAuNywwLjdsMS41LDEuNWwwLjcsMC43bDAuNy0wLjdsMy41LTMuNWwwLjctMC43TDYuNCwxTDYuNCwxeiINCgkvPg0KPC9zdmc+DQo=); +.custom-checkbox .custom-control-input:checked ~ .custom-control-indicator { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E"); } -.c-checkbox input:indeterminate ~ .c-indicator { +.custom-checkbox .custom-control-input:indeterminate ~ .custom-control-indicator { background-color: #0074d9; - background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iOHB4IiBoZWlnaHQ9IjhweCIgdmlld0JveD0iMCAwIDggOCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgOCA4IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik0wLDN2Mmg4VjNIMHoiLz4NCjwvc3ZnPg0K); + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Cpath stroke='%23fff' d='M0 2h4'/%3E%3C/svg%3E"); } -.c-radio .c-indicator { +.custom-radio .custom-control-indicator { border-radius: 50%; } -.c-radio input:checked ~ .c-indicator { - background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgOCA4IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA4IDgiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTQsMUMyLjMsMSwxLDIuMywxLDRzMS4zLDMsMywzczMtMS4zLDMtM1M1LjcsMSw0LDF6Ii8+DQo8L3N2Zz4NCg==); +.custom-radio .custom-control-input:checked ~ .custom-control-indicator { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23fff'/%3E%3C/svg%3E"); } -.c-inputs-stacked .c-input { +.custom-controls-stacked .custom-control { display: inline; } -.c-inputs-stacked .c-input::after { +.custom-controls-stacked .custom-control::after { display: block; - margin-bottom: .25rem; + margin-bottom: 0.25rem; content: ""; } -.c-inputs-stacked .c-input + .c-input { +.custom-controls-stacked .custom-control + .custom-control { margin-left: 0; } -.c-select { +.custom-select { display: inline-block; max-width: 100%; - -webkit-appearance: none; - padding: .375rem 1.75rem .375rem .75rem; - padding-right: .75rem \9; + padding: 0.375rem 1.75rem 0.375rem 0.75rem; + padding-right: 0.75rem \9; color: #55595c; vertical-align: middle; - background: #fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAUCAMAAACzvE1FAAAADFBMVEUzMzMzMzMzMzMzMzMKAG/3AAAAA3RSTlMAf4C/aSLHAAAAPElEQVR42q3NMQ4AIAgEQTn//2cLdRKppSGzBYwzVXvznNWs8C58CiussPJj8h6NwgorrKRdTvuV9v16Afn0AYFOB7aYAAAAAElFTkSuQmCC) no-repeat right .75rem center; + background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23333' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right 0.75rem center; background-image: none \9; -webkit-background-size: 8px 10px; background-size: 8px 10px; - border: 1px solid #ccc; - - -moz-appearance: none; + border: 1px solid rgba(0, 0, 0, 0.15); + border-radius: 0.25rem; + -moz-appearance: none; + -webkit-appearance: none; } -.c-select:focus { +.custom-select:focus { border-color: #51a7e8; outline: none; } -.c-select::-ms-expand { +.custom-select:focus::-ms-value { + color: #55595c; + background-color: #fff; +} + +.custom-select:disabled { + color: #818a91; + cursor: not-allowed; + background-color: #eceeef; +} + +.custom-select::-ms-expand { opacity: 0; } -.c-select-sm { - padding-top: 3px; - padding-bottom: 3px; - font-size: 12px; +.custom-select-sm { + padding-top: 0.375rem; + padding-bottom: 0.375rem; + font-size: 75%; } -.c-select-sm:not([multiple]) { - height: 26px; - min-height: 26px; -} - -.file { +.custom-file { position: relative; display: inline-block; + max-width: 100%; height: 2.5rem; cursor: pointer; } -.file input { +.custom-file-input { min-width: 14rem; + max-width: 100%; margin: 0; filter: alpha(opacity=0); opacity: 0; } -.file-custom { +.custom-file-control { position: absolute; top: 0; right: 0; left: 0; z-index: 5; height: 2.5rem; - padding: .5rem 1rem; + padding: 0.5rem 1rem; line-height: 1.5; color: #555; -webkit-user-select: none; @@ -3437,28 +3546,31 @@ input[type="button"].btn-block { user-select: none; background-color: #fff; border: 1px solid #ddd; - border-radius: .25rem; + border-radius: 0.25rem; } -.file-custom::after { +.custom-file-control:lang(en)::after { content: "Choose file..."; } -.file-custom::before { +.custom-file-control::before { position: absolute; - top: -.075rem; - right: -.075rem; - bottom: -.075rem; + top: -1px; + right: -1px; + bottom: -1px; z-index: 6; display: block; height: 2.5rem; - padding: .5rem 1rem; + padding: 0.5rem 1rem; line-height: 1.5; color: #555; - content: "Browse"; background-color: #eee; border: 1px solid #ddd; - border-radius: 0 .25rem .25rem 0; + border-radius: 0 0.25rem 0.25rem 0; +} + +.custom-file-control:lang(en)::before { + content: "Browse"; } .nav { @@ -3499,9 +3611,9 @@ input[type="button"].btn-block { } .nav-tabs::after { + content: ""; display: table; clear: both; - content: ""; } .nav-tabs .nav-item { @@ -3510,14 +3622,15 @@ input[type="button"].btn-block { } .nav-tabs .nav-item + .nav-item { - margin-left: .2rem; + margin-left: 0.2rem; } .nav-tabs .nav-link { display: block; - padding: .5em 1em; + padding: 0.5em 1em; border: 1px solid transparent; - border-radius: .25rem .25rem 0 0; + border-top-right-radius: 0.25rem; + border-top-left-radius: 0.25rem; } .nav-tabs .nav-link:focus, .nav-tabs .nav-link:hover { @@ -3539,10 +3652,16 @@ input[type="button"].btn-block { border-color: #ddd #ddd transparent; } +.nav-tabs .dropdown-menu { + margin-top: -1px; + border-top-right-radius: 0; + border-top-left-radius: 0; +} + .nav-pills::after { + content: ""; display: table; clear: both; - content: ""; } .nav-pills .nav-item { @@ -3550,13 +3669,13 @@ input[type="button"].btn-block { } .nav-pills .nav-item + .nav-item { - margin-left: .2rem; + margin-left: 0.2rem; } .nav-pills .nav-link { display: block; - padding: .5em 1em; - border-radius: .25rem; + padding: 0.5em 1em; + border-radius: 0.25rem; } .nav-pills .nav-link.active, .nav-pills .nav-link.active:focus, .nav-pills .nav-link.active:hover, @@ -3574,7 +3693,7 @@ input[type="button"].btn-block { } .nav-stacked .nav-item + .nav-item { - margin-top: .2rem; + margin-top: 0.2rem; margin-left: 0; } @@ -3586,26 +3705,20 @@ input[type="button"].btn-block { display: block; } -.nav-tabs .dropdown-menu { - margin-top: -1px; - border-top-left-radius: 0; - border-top-right-radius: 0; -} - .navbar { position: relative; - padding: .5rem 1rem; + padding: 0.5rem 1rem; } .navbar::after { + content: ""; display: table; clear: both; - content: ""; } @media (min-width: 544px) { .navbar { - border-radius: .25rem; + border-radius: 0.25rem; } } @@ -3644,7 +3757,7 @@ input[type="button"].btn-block { .navbar-sticky-top { position: -webkit-sticky; - position: sticky; + position: sticky; top: 0; z-index: 1030; width: 100%; @@ -3658,8 +3771,8 @@ input[type="button"].btn-block { .navbar-brand { float: left; - padding-top: .25rem; - padding-bottom: .25rem; + padding-top: 0.25rem; + padding-bottom: 0.25rem; margin-right: 1rem; font-size: 1.25rem; } @@ -3692,31 +3805,13 @@ input[type="button"].btn-block { line-height: 1; background: none; border: 1px solid transparent; - border-radius: .25rem; + border-radius: 0.25rem; } .navbar-toggler:focus, .navbar-toggler:hover { text-decoration: none; } -@media (min-width: 544px) { - .navbar-toggleable-xs { - display: block !important; - } -} - -@media (min-width: 768px) { - .navbar-toggleable-sm { - display: block !important; - } -} - -@media (min-width: 992px) { - .navbar-toggleable-md { - display: block !important; - } -} - .navbar-nav .nav-item { float: left; } @@ -3736,19 +3831,19 @@ input[type="button"].btn-block { } .navbar-light .navbar-brand { - color: rgba(0, 0, 0, .8); + color: rgba(0, 0, 0, 0.8); } .navbar-light .navbar-brand:focus, .navbar-light .navbar-brand:hover { - color: rgba(0, 0, 0, .8); + color: rgba(0, 0, 0, 0.8); } .navbar-light .navbar-nav .nav-link { - color: rgba(0, 0, 0, .3); + color: rgba(0, 0, 0, 0.3); } .navbar-light .navbar-nav .nav-link:focus, .navbar-light .navbar-nav .nav-link:hover { - color: rgba(0, 0, 0, .6); + color: rgba(0, 0, 0, 0.6); } .navbar-light .navbar-nav .open > .nav-link, .navbar-light .navbar-nav .open > .nav-link:focus, .navbar-light .navbar-nav .open > .nav-link:hover, @@ -3761,11 +3856,11 @@ input[type="button"].btn-block { .navbar-light .navbar-nav .nav-link.active, .navbar-light .navbar-nav .nav-link.active:focus, .navbar-light .navbar-nav .nav-link.active:hover { - color: rgba(0, 0, 0, .8); + color: rgba(0, 0, 0, 0.8); } .navbar-light .navbar-divider { - background-color: rgba(0, 0, 0, .075); + background-color: rgba(0, 0, 0, 0.075); } .navbar-dark .navbar-brand { @@ -3777,11 +3872,11 @@ input[type="button"].btn-block { } .navbar-dark .navbar-nav .nav-link { - color: rgba(255, 255, 255, .5); + color: rgba(255, 255, 255, 0.5); } .navbar-dark .navbar-nav .nav-link:focus, .navbar-dark .navbar-nav .nav-link:hover { - color: rgba(255, 255, 255, .75); + color: rgba(255, 255, 255, 0.75); } .navbar-dark .navbar-nav .open > .nav-link, .navbar-dark .navbar-nav .open > .nav-link:focus, .navbar-dark .navbar-nav .open > .nav-link:hover, @@ -3798,28 +3893,91 @@ input[type="button"].btn-block { } .navbar-dark .navbar-divider { - background-color: rgba(255, 255, 255, .075); + background-color: rgba(255, 255, 255, 0.075); +} + +.navbar-toggleable-xs::after { + content: ""; + display: table; + clear: both; +} + +@media (max-width: 543px) { + .navbar-toggleable-xs .navbar-nav .nav-item { + float: none; + margin-left: 0; + } +} + +@media (min-width: 544px) { + .navbar-toggleable-xs { + display: block !important; + } +} + +.navbar-toggleable-sm::after { + content: ""; + display: table; + clear: both; +} + +@media (max-width: 767px) { + .navbar-toggleable-sm .navbar-nav .nav-item { + float: none; + margin-left: 0; + } +} + +@media (min-width: 768px) { + .navbar-toggleable-sm { + display: block !important; + } +} + +.navbar-toggleable-md::after { + content: ""; + display: table; + clear: both; +} + +@media (max-width: 991px) { + .navbar-toggleable-md .navbar-nav .nav-item { + float: none; + margin-left: 0; + } +} + +@media (min-width: 992px) { + .navbar-toggleable-md { + display: block !important; + } } .card { position: relative; display: block; - margin-bottom: .75rem; + margin-bottom: 0.75rem; background-color: #fff; - border: 1px solid #e5e5e5; - border-radius: .25rem; + border-radius: 0.25rem; + border: 1px solid rgba(0, 0, 0, 0.125); } .card-block { padding: 1.25rem; } +.card-block::after { + content: ""; + display: table; + clear: both; +} + .card-title { - margin-bottom: .75rem; + margin-bottom: 0.75rem; } .card-subtitle { - margin-top: -.375rem; + margin-top: -0.375rem; margin-bottom: 0; } @@ -3836,31 +3994,57 @@ input[type="button"].btn-block { } .card > .list-group:first-child .list-group-item:first-child { - border-radius: .25rem .25rem 0 0; + border-top-right-radius: 0.25rem; + border-top-left-radius: 0.25rem; } .card > .list-group:last-child .list-group-item:last-child { - border-radius: 0 0 .25rem .25rem; + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; } .card-header { - padding: .75rem 1.25rem; + padding: 0.75rem 1.25rem; background-color: #f5f5f5; - border-bottom: 1px solid #e5e5e5; + border-bottom: 1px solid rgba(0, 0, 0, 0.125); +} + +.card-header::after { + content: ""; + display: table; + clear: both; } .card-header:first-child { - border-radius: .25rem .25rem 0 0; + border-radius: 0.25rem 0.25rem 0 0; } .card-footer { - padding: .75rem 1.25rem; + padding: 0.75rem 1.25rem; background-color: #f5f5f5; - border-top: 1px solid #e5e5e5; + border-top: 1px solid rgba(0, 0, 0, 0.125); +} + +.card-footer::after { + content: ""; + display: table; + clear: both; } .card-footer:last-child { - border-radius: 0 0 .25rem .25rem; + border-radius: 0 0 0.25rem 0.25rem; +} + +.card-header-tabs { + margin-right: -0.625rem; + margin-bottom: -0.75rem; + margin-left: -0.625rem; + border-bottom: 0; +} + +.card-header-pills { + margin-right: -0.625rem; + margin-left: -0.625rem; } .card-primary { @@ -3868,59 +4052,84 @@ input[type="button"].btn-block { border-color: #0275d8; } +.card-primary .card-header, +.card-primary .card-footer { + background-color: transparent; +} + .card-success { background-color: #5cb85c; border-color: #5cb85c; } +.card-success .card-header, +.card-success .card-footer { + background-color: transparent; +} + .card-info { background-color: #5bc0de; border-color: #5bc0de; } +.card-info .card-header, +.card-info .card-footer { + background-color: transparent; +} + .card-warning { background-color: #f0ad4e; border-color: #f0ad4e; } +.card-warning .card-header, +.card-warning .card-footer { + background-color: transparent; +} + .card-danger { background-color: #d9534f; border-color: #d9534f; } -.card-primary-outline { +.card-danger .card-header, +.card-danger .card-footer { + background-color: transparent; +} + +.card-outline-primary { background-color: transparent; border-color: #0275d8; } -.card-secondary-outline { +.card-outline-secondary { background-color: transparent; border-color: #ccc; } -.card-info-outline { +.card-outline-info { background-color: transparent; border-color: #5bc0de; } -.card-success-outline { +.card-outline-success { background-color: transparent; border-color: #5cb85c; } -.card-warning-outline { +.card-outline-warning { background-color: transparent; border-color: #f0ad4e; } -.card-danger-outline { +.card-outline-danger { background-color: transparent; border-color: #d9534f; } .card-inverse .card-header, .card-inverse .card-footer { - border-bottom: 1px solid rgba(255, 255, 255, .2); + border-color: rgba(255, 255, 255, 0.2); } .card-inverse .card-header, @@ -3932,8 +4141,9 @@ input[type="button"].btn-block { .card-inverse .card-link, .card-inverse .card-text, -.card-inverse .card-blockquote > footer { - color: rgba(255, 255, 255, .65); +.card-inverse .card-subtitle, +.card-inverse .card-blockquote .blockquote-footer { + color: rgba(255, 255, 255, 0.65); } .card-inverse .card-link:focus, .card-inverse .card-link:hover { @@ -3947,7 +4157,7 @@ input[type="button"].btn-block { } .card-img { - border-radius: .25rem; + border-radius: 0.25rem; } .card-img-overlay { @@ -3960,22 +4170,26 @@ input[type="button"].btn-block { } .card-img-top { - border-radius: .25rem .25rem 0 0; + border-top-right-radius: 0.25rem; + border-top-left-radius: 0.25rem; } .card-img-bottom { - border-radius: 0 0 .25rem .25rem; + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; } @media (min-width: 544px) { .card-deck { display: table; + width: 100%; + margin-bottom: 0.75rem; table-layout: fixed; border-spacing: 1.25rem 0; } .card-deck .card { display: table-cell; - width: 1%; + margin-bottom: 0; vertical-align: top; } .card-deck-wrapper { @@ -3999,8 +4213,8 @@ input[type="button"].btn-block { border-left: 0; } .card-group .card:first-child { - border-top-right-radius: 0; border-bottom-right-radius: 0; + border-top-right-radius: 0; } .card-group .card:first-child .card-img-top { border-top-right-radius: 0; @@ -4009,8 +4223,8 @@ input[type="button"].btn-block { border-bottom-right-radius: 0; } .card-group .card:last-child { - border-top-left-radius: 0; border-bottom-left-radius: 0; + border-top-left-radius: 0; } .card-group .card:last-child .card-img-top { border-top-left-radius: 0; @@ -4043,31 +4257,40 @@ input[type="button"].btn-block { } .breadcrumb { - padding: .75rem 1rem; + padding: 0.75rem 1rem; margin-bottom: 1rem; list-style: none; background-color: #eceeef; - border-radius: .25rem; + border-radius: 0.25rem; } .breadcrumb::after { + content: ""; display: table; clear: both; - content: ""; } -.breadcrumb > li { +.breadcrumb-item { float: left; } -.breadcrumb > li + li::before { - padding-right: .5rem; - padding-left: .5rem; +.breadcrumb-item + .breadcrumb-item::before { + display: inline-block; + padding-right: 0.5rem; + padding-left: 0.5rem; color: #818a91; content: "/"; } -.breadcrumb > .active { +.breadcrumb-item + .breadcrumb-item:hover::before { + text-decoration: underline; +} + +.breadcrumb-item + .breadcrumb-item:hover::before { + text-decoration: none; +} + +.breadcrumb-item.active { color: #818a91; } @@ -4076,7 +4299,7 @@ input[type="button"].btn-block { padding-left: 0; margin-top: 1rem; margin-bottom: 1rem; - border-radius: .25rem; + border-radius: 0.25rem; } .page-item { @@ -4085,13 +4308,13 @@ input[type="button"].btn-block { .page-item:first-child .page-link { margin-left: 0; - border-top-left-radius: .25rem; - border-bottom-left-radius: .25rem; + border-bottom-left-radius: 0.25rem; + border-top-left-radius: 0.25rem; } .page-item:last-child .page-link { - border-top-right-radius: .25rem; - border-bottom-right-radius: .25rem; + border-bottom-right-radius: 0.25rem; + border-top-right-radius: 0.25rem; } .page-item.active .page-link, .page-item.active .page-link:focus, .page-item.active .page-link:hover { @@ -4104,6 +4327,7 @@ input[type="button"].btn-block { .page-item.disabled .page-link, .page-item.disabled .page-link:focus, .page-item.disabled .page-link:hover { color: #818a91; + pointer-events: none; cursor: not-allowed; background-color: #fff; border-color: #ddd; @@ -4112,9 +4336,8 @@ input[type="button"].btn-block { .page-link { position: relative; float: left; - padding: .5rem .75rem; + padding: 0.5rem 0.75rem; margin-left: -1px; - line-height: 1.5; color: #0275d8; text-decoration: none; background-color: #fff; @@ -4128,94 +4351,38 @@ input[type="button"].btn-block { } .pagination-lg .page-link { - padding: .75rem 1.5rem; + padding: 0.75rem 1.5rem; font-size: 1.25rem; - line-height: 1.333333; } .pagination-lg .page-item:first-child .page-link { - border-top-left-radius: .3rem; - border-bottom-left-radius: .3rem; + border-bottom-left-radius: 0.3rem; + border-top-left-radius: 0.3rem; } .pagination-lg .page-item:last-child .page-link { - border-top-right-radius: .3rem; - border-bottom-right-radius: .3rem; + border-bottom-right-radius: 0.3rem; + border-top-right-radius: 0.3rem; } .pagination-sm .page-link { - padding: .275rem .75rem; - font-size: .875rem; - line-height: 1.5; + padding: 0.275rem 0.75rem; + font-size: 0.875rem; } .pagination-sm .page-item:first-child .page-link { - border-top-left-radius: .2rem; - border-bottom-left-radius: .2rem; + border-bottom-left-radius: 0.2rem; + border-top-left-radius: 0.2rem; } .pagination-sm .page-item:last-child .page-link { - border-top-right-radius: .2rem; - border-bottom-right-radius: .2rem; + border-bottom-right-radius: 0.2rem; + border-top-right-radius: 0.2rem; } -.pager { - padding-left: 0; - margin-top: 1rem; - margin-bottom: 1rem; - text-align: center; - list-style: none; -} - -.pager::after { - display: table; - clear: both; - content: ""; -} - -.pager li { - display: inline; -} - -.pager li > a, -.pager li > span { +.tag { display: inline-block; - padding: 5px 14px; - background-color: #fff; - border: 1px solid #ddd; - border-radius: 15px; -} - -.pager li > a:focus, .pager li > a:hover { - text-decoration: none; - background-color: #eceeef; -} - -.pager .disabled > a, .pager .disabled > a:focus, .pager .disabled > a:hover { - color: #818a91; - cursor: not-allowed; - background-color: #fff; -} - -.pager .disabled > span { - color: #818a91; - cursor: not-allowed; - background-color: #fff; -} - -.pager-next > a, -.pager-next > span { - float: right; -} - -.pager-prev > a, -.pager-prev > span { - float: left; -} - -.label { - display: inline-block; - padding: .25em .4em; + padding: 0.25em 0.4em; font-size: 75%; font-weight: bold; line-height: 1; @@ -4223,75 +4390,75 @@ input[type="button"].btn-block { text-align: center; white-space: nowrap; vertical-align: baseline; - border-radius: .25rem; + border-radius: 0.25rem; } -.label:empty { +.tag:empty { display: none; } -.btn .label { +.btn .tag { position: relative; top: -1px; } -a.label:focus, a.label:hover { +a.tag:focus, a.tag:hover { color: #fff; text-decoration: none; cursor: pointer; } -.label-pill { - padding-right: .6em; - padding-left: .6em; +.tag-pill { + padding-right: 0.6em; + padding-left: 0.6em; border-radius: 10rem; } -.label-default { +.tag-default { background-color: #818a91; } -.label-default[href]:focus, .label-default[href]:hover { +.tag-default[href]:focus, .tag-default[href]:hover { background-color: #687077; } -.label-primary { +.tag-primary { background-color: #0275d8; } -.label-primary[href]:focus, .label-primary[href]:hover { +.tag-primary[href]:focus, .tag-primary[href]:hover { background-color: #025aa5; } -.label-success { +.tag-success { background-color: #5cb85c; } -.label-success[href]:focus, .label-success[href]:hover { +.tag-success[href]:focus, .tag-success[href]:hover { background-color: #449d44; } -.label-info { +.tag-info { background-color: #5bc0de; } -.label-info[href]:focus, .label-info[href]:hover { +.tag-info[href]:focus, .tag-info[href]:hover { background-color: #31b0d5; } -.label-warning { +.tag-warning { background-color: #f0ad4e; } -.label-warning[href]:focus, .label-warning[href]:hover { +.tag-warning[href]:focus, .tag-warning[href]:hover { background-color: #ec971f; } -.label-danger { +.tag-danger { background-color: #d9534f; } -.label-danger[href]:focus, .label-danger[href]:hover { +.tag-danger[href]:focus, .tag-danger[href]:hover { background-color: #c9302c; } @@ -4299,7 +4466,7 @@ a.label:focus, a.label:hover { padding: 2rem 1rem; margin-bottom: 2rem; background-color: #eceeef; - border-radius: .3rem; + border-radius: 0.3rem; } @media (min-width: 544px) { @@ -4322,16 +4489,7 @@ a.label:focus, a.label:hover { padding: 15px; margin-bottom: 1rem; border: 1px solid transparent; - border-radius: .25rem; -} - -.alert > p, -.alert > ul { - margin-bottom: 0; -} - -.alert > p + p { - margin-top: 5px; + border-radius: 0.25rem; } .alert-heading { @@ -4354,9 +4512,9 @@ a.label:focus, a.label:hover { } .alert-success { - color: #3c763d; background-color: #dff0d8; border-color: #d0e9c6; + color: #3c763d; } .alert-success hr { @@ -4368,9 +4526,9 @@ a.label:focus, a.label:hover { } .alert-info { - color: #31708f; background-color: #d9edf7; border-color: #bcdff1; + color: #31708f; } .alert-info hr { @@ -4382,9 +4540,9 @@ a.label:focus, a.label:hover { } .alert-warning { - color: #8a6d3b; background-color: #fcf8e3; border-color: #faf2cc; + color: #8a6d3b; } .alert-warning hr { @@ -4396,9 +4554,9 @@ a.label:focus, a.label:hover { } .alert-danger { - color: #a94442; background-color: #f2dede; border-color: #ebcccc; + color: #a94442; } .alert-danger hr { @@ -4444,76 +4602,93 @@ a.label:focus, a.label:hover { } .progress[value] { - -webkit-appearance: none; - color: #0074d9; + background-color: #eee; border: 0; - + -webkit-appearance: none; -moz-appearance: none; appearance: none; + border-radius: 0.25rem; } -.progress[value]::-webkit-progress-bar { - background-color: #eee; - border-radius: .25rem; +.progress[value]::-ms-fill { + background-color: #0074d9; + border: 0; } -.progress[value]::-webkit-progress-value::before { - content: attr(value); +.progress[value]::-moz-progress-bar { + background-color: #0074d9; + border-bottom-left-radius: 0.25rem; + border-top-left-radius: 0.25rem; } .progress[value]::-webkit-progress-value { background-color: #0074d9; - border-top-left-radius: .25rem; - border-bottom-left-radius: .25rem; + border-bottom-left-radius: 0.25rem; + border-top-left-radius: 0.25rem; +} + +.progress[value="100"]::-moz-progress-bar { + border-bottom-right-radius: 0.25rem; + border-top-right-radius: 0.25rem; } .progress[value="100"]::-webkit-progress-value { - border-top-right-radius: .25rem; - border-bottom-right-radius: .25rem; + border-bottom-right-radius: 0.25rem; + border-top-right-radius: 0.25rem; +} + +.progress[value]::-webkit-progress-bar { + background-color: #eee; + border-radius: 0.25rem; +} + +base::-moz-progress-bar, +.progress[value] { + background-color: #eee; + border-radius: 0.25rem; } @media screen and (min-width: 0\0) { .progress { background-color: #eee; - border-radius: .25rem; + border-radius: 0.25rem; } .progress-bar { display: inline-block; height: 1rem; text-indent: -999rem; background-color: #0074d9; - border-top-left-radius: .25rem; - border-bottom-left-radius: .25rem; - } - .progress[width^="0"] { - min-width: 2rem; - color: #818a91; - background-color: transparent; - background-image: none; + border-bottom-left-radius: 0.25rem; + border-top-left-radius: 0.25rem; } .progress[width="100%"] { - border-top-right-radius: .25rem; - border-bottom-right-radius: .25rem; + border-bottom-right-radius: 0.25rem; + border-top-right-radius: 0.25rem; } } .progress-striped[value]::-webkit-progress-value { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -webkit-background-size: 1rem 1rem; background-size: 1rem 1rem; } .progress-striped[value]::-moz-progress-bar { - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-size: 1rem 1rem; +} + +.progress-striped[value]::-ms-fill { + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-size: 1rem 1rem; } @media screen and (min-width: 0\0) { .progress-bar-striped { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -webkit-background-size: 1rem 1rem; background-size: 1rem 1rem; } @@ -4544,6 +4719,10 @@ a.label:focus, a.label:hover { background-color: #5cb85c; } +.progress-success[value]::-ms-fill { + background-color: #5cb85c; +} + @media screen and (min-width: 0\0) { .progress-success .progress-bar { background-color: #5cb85c; @@ -4558,6 +4737,10 @@ a.label:focus, a.label:hover { background-color: #5bc0de; } +.progress-info[value]::-ms-fill { + background-color: #5bc0de; +} + @media screen and (min-width: 0\0) { .progress-info .progress-bar { background-color: #5bc0de; @@ -4572,6 +4755,10 @@ a.label:focus, a.label:hover { background-color: #f0ad4e; } +.progress-warning[value]::-ms-fill { + background-color: #f0ad4e; +} + @media screen and (min-width: 0\0) { .progress-warning .progress-bar { background-color: #f0ad4e; @@ -4586,6 +4773,10 @@ a.label:focus, a.label:hover { background-color: #d9534f; } +.progress-danger[value]::-ms-fill { + background-color: #d9534f; +} + @media screen and (min-width: 0\0) { .progress-danger .progress-bar { background-color: #d9534f; @@ -4603,7 +4794,6 @@ a.label:focus, a.label:hover { .media, .media-body { overflow: hidden; - zoom: 1; } .media-body { @@ -4659,54 +4849,21 @@ a.label:focus, a.label:hover { .list-group-item { position: relative; display: block; - padding: .75rem 1.25rem; + padding: 0.75rem 1.25rem; margin-bottom: -1px; background-color: #fff; border: 1px solid #ddd; } .list-group-item:first-child { - border-top-left-radius: .25rem; - border-top-right-radius: .25rem; + border-top-right-radius: 0.25rem; + border-top-left-radius: 0.25rem; } .list-group-item:last-child { margin-bottom: 0; - border-bottom-right-radius: .25rem; - border-bottom-left-radius: .25rem; -} - -.list-group-flush .list-group-item { - border-width: 1px 0; - border-radius: 0; -} - -.list-group-flush:first-child .list-group-item:first-child { - border-top: 0; -} - -.list-group-flush:last-child .list-group-item:last-child { - border-bottom: 0; -} - -a.list-group-item, -button.list-group-item { - width: 100%; - color: #555; - text-align: inherit; -} - -a.list-group-item .list-group-item-heading, -button.list-group-item .list-group-item-heading { - color: #333; -} - -a.list-group-item:focus, a.list-group-item:hover, -button.list-group-item:focus, -button.list-group-item:hover { - color: #555; - text-decoration: none; - background-color: #f5f5f5; + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; } .list-group-item.disabled, .list-group-item.disabled:focus, .list-group-item.disabled:hover { @@ -4726,6 +4883,7 @@ button.list-group-item:hover { .list-group-item.active, .list-group-item.active:focus, .list-group-item.active:hover { z-index: 2; color: #fff; + text-decoration: none; background-color: #0275d8; border-color: #0275d8; } @@ -4744,6 +4902,26 @@ button.list-group-item:hover { color: #a8d6fe; } +.list-group-flush .list-group-item { + border-radius: 0; +} + +.list-group-item-action { + width: 100%; + color: #555; + text-align: inherit; +} + +.list-group-item-action .list-group-item-heading { + color: #333; +} + +.list-group-item-action:focus, .list-group-item-action:hover { + color: #555; + text-decoration: none; + background-color: #f5f5f5; +} + .list-group-item-success { color: #3c763d; background-color: #dff0d8; @@ -4934,11 +5112,11 @@ button.list-group-item-danger.active:hover { } button.close { - -webkit-appearance: none; padding: 0; cursor: pointer; background: transparent; border: 0; + -webkit-appearance: none; } .modal-open { @@ -4954,16 +5132,16 @@ button.close { z-index: 1050; display: none; overflow: hidden; - -webkit-overflow-scrolling: touch; outline: 0; + -webkit-overflow-scrolling: touch; } .modal.fade .modal-dialog { -webkit-transition: -webkit-transform .3s ease-out; - -o-transition: transform .3s ease-out, -o-transform .3s ease-out; - transition: -webkit-transform .3s ease-out; - transition: transform .3s ease-out; - transition: transform .3s ease-out, -webkit-transform .3s ease-out, -o-transform .3s ease-out; + transition: -webkit-transform .3s ease-out; + -o-transition: transform .3s ease-out, -o-transform .3s ease-out; + transition: transform .3s ease-out; + transition: transform .3s ease-out, -webkit-transform .3s ease-out, -o-transform .3s ease-out; -webkit-transform: translate(0, -25%); -ms-transform: translate(0, -25%); -o-transform: translate(0, -25%); @@ -4993,8 +5171,8 @@ button.close { background-color: #fff; -webkit-background-clip: padding-box; background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, .2); - border-radius: .3rem; + border: 1px solid rgba(0, 0, 0, 0.2); + border-radius: 0.3rem; outline: 0; } @@ -5013,7 +5191,7 @@ button.close { } .modal-backdrop.in { - opacity: .5; + opacity: 0.5; } .modal-header { @@ -5022,9 +5200,9 @@ button.close { } .modal-header::after { + content: ""; display: table; clear: both; - content: ""; } .modal-header .close { @@ -5048,22 +5226,9 @@ button.close { } .modal-footer::after { + content: ""; display: table; clear: both; - content: ""; -} - -.modal-footer .btn + .btn { - margin-bottom: 0; - margin-left: 5px; -} - -.modal-footer .btn-group .btn + .btn { - margin-left: -1px; -} - -.modal-footer .btn-block + .btn-block { - margin-left: 0; } .modal-scrollbar-measure { @@ -5076,17 +5241,17 @@ button.close { @media (min-width: 544px) { .modal-dialog { - width: 600px; + max-width: 600px; margin: 30px auto; } .modal-sm { - width: 300px; + max-width: 300px; } } -@media (min-width: 768px) { +@media (min-width: 992px) { .modal-lg { - width: 900px; + max-width: 900px; } } @@ -5094,28 +5259,27 @@ button.close { position: absolute; z-index: 1070; display: block; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: .875rem; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-style: normal; font-weight: normal; + letter-spacing: normal; + line-break: auto; line-height: 1.5; text-align: left; text-align: start; text-decoration: none; text-shadow: none; text-transform: none; - letter-spacing: normal; + white-space: normal; word-break: normal; word-spacing: normal; - word-wrap: normal; - white-space: normal; + font-size: 0.875rem; + word-wrap: break-word; opacity: 0; - - line-break: auto; } .tooltip.in { - opacity: .9; + opacity: 0.9; } .tooltip.tooltip-top, .tooltip.bs-tether-element-attached-bottom { @@ -5176,7 +5340,7 @@ button.close { color: #fff; text-align: center; background-color: #000; - border-radius: .25rem; + border-radius: 0.25rem; } .tooltip-arrow { @@ -5195,28 +5359,27 @@ button.close { display: block; max-width: 276px; padding: 1px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: .875rem; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-style: normal; font-weight: normal; + letter-spacing: normal; + line-break: auto; line-height: 1.5; text-align: left; text-align: start; text-decoration: none; text-shadow: none; text-transform: none; - letter-spacing: normal; + white-space: normal; word-break: normal; word-spacing: normal; - word-wrap: normal; - white-space: normal; + font-size: 0.875rem; + word-wrap: break-word; background-color: #fff; -webkit-background-clip: padding-box; background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, .2); - border-radius: .3rem; - - line-break: auto; + border: 1px solid rgba(0, 0, 0, 0.2); + border-radius: 0.3rem; } .popover.popover-top, .popover.bs-tether-element-attached-bottom { @@ -5227,7 +5390,7 @@ button.close { bottom: -11px; left: 50%; margin-left: -11px; - border-top-color: rgba(0, 0, 0, .25); + border-top-color: rgba(0, 0, 0, 0.25); border-bottom-width: 0; } @@ -5247,7 +5410,7 @@ button.close { top: 50%; left: -11px; margin-top: -11px; - border-right-color: rgba(0, 0, 0, .25); + border-right-color: rgba(0, 0, 0, 0.25); border-left-width: 0; } @@ -5268,7 +5431,7 @@ button.close { left: 50%; margin-left: -11px; border-top-width: 0; - border-bottom-color: rgba(0, 0, 0, .25); + border-bottom-color: rgba(0, 0, 0, 0.25); } .popover.popover-bottom .popover-arrow::after, .popover.bs-tether-element-attached-top .popover-arrow::after { @@ -5288,7 +5451,7 @@ button.close { right: -11px; margin-top: -11px; border-right-width: 0; - border-left-color: rgba(0, 0, 0, .25); + border-left-color: rgba(0, 0, 0, 0.25); } .popover.popover-left .popover-arrow::after, .popover.bs-tether-element-attached-right .popover-arrow::after { @@ -5305,7 +5468,11 @@ button.close { font-size: 1rem; background-color: #f7f7f7; border-bottom: 1px solid #ebebeb; - border-radius: -.7rem -.7rem 0 0; + border-radius: 0.2375rem 0.2375rem 0 0; +} + +.popover-title:empty { + display: none; } .popover-content { @@ -5344,8 +5511,8 @@ button.close { position: relative; display: none; -webkit-transition: .6s ease-in-out left; - -o-transition: .6s ease-in-out left; - transition: .6s ease-in-out left; + -o-transition: .6s ease-in-out left; + transition: .6s ease-in-out left; } .carousel-inner > .carousel-item > img, @@ -5356,11 +5523,10 @@ button.close { @media all and (transform-3d), (-webkit-transform-3d) { .carousel-inner > .carousel-item { -webkit-transition: -webkit-transform .6s ease-in-out; - -o-transition: transform .6s ease-in-out, -o-transform .6s ease-in-out; - transition: -webkit-transform .6s ease-in-out; - transition: transform .6s ease-in-out; - transition: transform .6s ease-in-out, -webkit-transform .6s ease-in-out, -o-transform .6s ease-in-out; - + transition: -webkit-transform .6s ease-in-out; + -o-transition: transform .6s ease-in-out, -o-transform .6s ease-in-out; + transition: transform .6s ease-in-out; + transition: transform .6s ease-in-out, -webkit-transform .6s ease-in-out, -o-transform .6s ease-in-out; -webkit-backface-visibility: hidden; backface-visibility: hidden; -webkit-perspective: 1000px; @@ -5430,28 +5596,28 @@ button.close { font-size: 20px; color: #fff; text-align: center; - text-shadow: 0 1px 2px rgba(0, 0, 0, .6); - opacity: .5; + text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); + opacity: 0.5; } .carousel-control.left { - background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001))); - background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); - background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); - background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); + background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.0001))); + background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%); + background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%); + background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%); background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); } .carousel-control.right { right: 0; left: auto; - background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5))); - background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); - background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); - background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); + background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.0001)), to(rgba(0, 0, 0, 0.5))); + background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%); + background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%); + background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%); background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); } .carousel-control:focus, .carousel-control:hover { @@ -5533,7 +5699,7 @@ button.close { padding-bottom: 20px; color: #fff; text-align: center; - text-shadow: 0 1px 2px rgba(0, 0, 0, .6); + text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); } .carousel-caption .btn { @@ -5564,16 +5730,75 @@ button.close { } } -.clearfix::after { - display: table; - clear: both; - content: ""; +.bg-inverse { + background-color: #373a3c; } -.center-block { - display: block; - margin-right: auto; - margin-left: auto; +.bg-faded { + background-color: #f7f7f9; +} + +.bg-primary { + color: #fff !important; + background-color: #0275d8 !important; +} + +a.bg-primary:focus, a.bg-primary:hover { + background-color: #025aa5 !important; +} + +.bg-success { + color: #fff !important; + background-color: #5cb85c !important; +} + +a.bg-success:focus, a.bg-success:hover { + background-color: #449d44 !important; +} + +.bg-info { + color: #fff !important; + background-color: #5bc0de !important; +} + +a.bg-info:focus, a.bg-info:hover { + background-color: #31b0d5 !important; +} + +.bg-warning { + color: #fff !important; + background-color: #f0ad4e !important; +} + +a.bg-warning:focus, a.bg-warning:hover { + background-color: #ec971f !important; +} + +.bg-danger { + color: #fff !important; + background-color: #d9534f !important; +} + +a.bg-danger:focus, a.bg-danger:hover { + background-color: #c9302c !important; +} + +.clearfix::after { + content: ""; + display: table; + clear: both; +} + +.d-block { + display: block !important; +} + +.d-inline-block { + display: inline-block !important; +} + +.d-inline { + display: inline !important; } .pull-xs-left { @@ -5656,212 +5881,8 @@ button.close { clip: auto; } -.invisible { - visibility: hidden !important; -} - -.text-hide { - font: "0/0" a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} - -.text-justify { - text-align: justify !important; -} - -.text-nowrap { - white-space: nowrap !important; -} - -.text-truncate { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.text-xs-left { - text-align: left !important; -} - -.text-xs-right { - text-align: right !important; -} - -.text-xs-center { - text-align: center !important; -} - -@media (min-width: 544px) { - .text-sm-left { - text-align: left !important; - } - .text-sm-right { - text-align: right !important; - } - .text-sm-center { - text-align: center !important; - } -} - -@media (min-width: 768px) { - .text-md-left { - text-align: left !important; - } - .text-md-right { - text-align: right !important; - } - .text-md-center { - text-align: center !important; - } -} - -@media (min-width: 992px) { - .text-lg-left { - text-align: left !important; - } - .text-lg-right { - text-align: right !important; - } - .text-lg-center { - text-align: center !important; - } -} - -@media (min-width: 1200px) { - .text-xl-left { - text-align: left !important; - } - .text-xl-right { - text-align: right !important; - } - .text-xl-center { - text-align: center !important; - } -} - -.text-lowercase { - text-transform: lowercase !important; -} - -.text-uppercase { - text-transform: uppercase !important; -} - -.text-capitalize { - text-transform: capitalize !important; -} - -.font-weight-normal { - font-weight: normal; -} - -.font-weight-bold { - font-weight: bold; -} - -.font-italic { - font-style: italic; -} - -.text-muted { - color: #818a91; -} - -.text-primary { - color: #0275d8 !important; -} - -a.text-primary:focus, a.text-primary:hover { - color: #025aa5; -} - -.text-success { - color: #5cb85c !important; -} - -a.text-success:focus, a.text-success:hover { - color: #449d44; -} - -.text-info { - color: #5bc0de !important; -} - -a.text-info:focus, a.text-info:hover { - color: #31b0d5; -} - -.text-warning { - color: #f0ad4e !important; -} - -a.text-warning:focus, a.text-warning:hover { - color: #ec971f; -} - -.text-danger { - color: #d9534f !important; -} - -a.text-danger:focus, a.text-danger:hover { - color: #c9302c; -} - -.bg-inverse { - color: #eceeef; - background-color: #373a3c; -} - -.bg-faded { - background-color: #f7f7f9; -} - -.bg-primary { - color: #fff !important; - background-color: #0275d8 !important; -} - -a.bg-primary:focus, a.bg-primary:hover { - background-color: #025aa5; -} - -.bg-success { - color: #fff !important; - background-color: #5cb85c !important; -} - -a.bg-success:focus, a.bg-success:hover { - background-color: #449d44; -} - -.bg-info { - color: #fff !important; - background-color: #5bc0de !important; -} - -a.bg-info:focus, a.bg-info:hover { - background-color: #31b0d5; -} - -.bg-warning { - color: #fff !important; - background-color: #f0ad4e !important; -} - -a.bg-warning:focus, a.bg-warning:hover { - background-color: #ec971f; -} - -.bg-danger { - color: #fff !important; - background-color: #d9534f !important; -} - -a.bg-danger:focus, a.bg-danger:hover { - background-color: #c9302c; +.w-100 { + width: 100% !important; } .m-x-auto { @@ -6117,6 +6138,164 @@ a.bg-danger:focus, a.bg-danger:hover { z-index: 1030; } +.text-justify { + text-align: justify !important; +} + +.text-nowrap { + white-space: nowrap !important; +} + +.text-truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.text-xs-left { + text-align: left !important; +} + +.text-xs-right { + text-align: right !important; +} + +.text-xs-center { + text-align: center !important; +} + +@media (min-width: 544px) { + .text-sm-left { + text-align: left !important; + } + .text-sm-right { + text-align: right !important; + } + .text-sm-center { + text-align: center !important; + } +} + +@media (min-width: 768px) { + .text-md-left { + text-align: left !important; + } + .text-md-right { + text-align: right !important; + } + .text-md-center { + text-align: center !important; + } +} + +@media (min-width: 992px) { + .text-lg-left { + text-align: left !important; + } + .text-lg-right { + text-align: right !important; + } + .text-lg-center { + text-align: center !important; + } +} + +@media (min-width: 1200px) { + .text-xl-left { + text-align: left !important; + } + .text-xl-right { + text-align: right !important; + } + .text-xl-center { + text-align: center !important; + } +} + +.text-lowercase { + text-transform: lowercase !important; +} + +.text-uppercase { + text-transform: uppercase !important; +} + +.text-capitalize { + text-transform: capitalize !important; +} + +.font-weight-normal { + font-weight: normal; +} + +.font-weight-bold { + font-weight: bold; +} + +.font-italic { + font-style: italic; +} + +.text-muted { + color: #818a91 !important; +} + +a.text-muted:focus, a.text-muted:hover { + color: #687077; +} + +.text-primary { + color: #0275d8 !important; +} + +a.text-primary:focus, a.text-primary:hover { + color: #025aa5; +} + +.text-success { + color: #5cb85c !important; +} + +a.text-success:focus, a.text-success:hover { + color: #449d44; +} + +.text-info { + color: #5bc0de !important; +} + +a.text-info:focus, a.text-info:hover { + color: #31b0d5; +} + +.text-warning { + color: #f0ad4e !important; +} + +a.text-warning:focus, a.text-warning:hover { + color: #ec971f; +} + +.text-danger { + color: #d9534f !important; +} + +a.text-danger:focus, a.text-danger:hover { + color: #c9302c; +} + +.text-hide { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} + +.invisible { + visibility: hidden !important; +} + .hidden-xs-up { display: none !important; } @@ -6208,4 +6387,4 @@ a.bg-danger:focus, a.bg-danger:hover { display: none !important; } } -/*# sourceMappingURL=bootstrap.css.map */ +/*# sourceMappingURL=bootstrap.css.map */ \ No newline at end of file From 2f58e4ef8036337a742ba385bc486389bd9fddea Mon Sep 17 00:00:00 2001 From: xavcz Date: Thu, 4 Aug 2016 10:50:03 +0200 Subject: [PATCH 20/60] draft a CanDo reusable component and test it on PostsItem, PostsNewForm & UsersEdit --- .../nova-base-components/lib/components.js | 1 + .../lib/permissions/CanDo.jsx | 59 +++++++++++++++++++ .../lib/posts/PostsItem.jsx | 16 ++--- .../lib/posts/PostsNewForm.jsx | 8 ++- .../lib/users/UsersEdit.jsx | 8 ++- packages/nova-i18n-en-us/lib/en_US.js | 1 + 6 files changed, 81 insertions(+), 12 deletions(-) create mode 100644 packages/nova-base-components/lib/permissions/CanDo.jsx diff --git a/packages/nova-base-components/lib/components.js b/packages/nova-base-components/lib/components.js index 0258c0fb3..e430a2b95 100644 --- a/packages/nova-base-components/lib/components.js +++ b/packages/nova-base-components/lib/components.js @@ -60,6 +60,7 @@ Telescope.registerComponent("CategoriesNewForm", require('./categories/Catego // permissions +Telescope.registerComponent("CanDo", require('./permissions/CanDo.jsx')); Telescope.registerComponent("CanCreatePost", require('./permissions/CanCreatePost.jsx')); Telescope.registerComponent("CanEditPost", require('./permissions/CanEditPost.jsx')); Telescope.registerComponent("CanView", require('./permissions/CanView.jsx')); diff --git a/packages/nova-base-components/lib/permissions/CanDo.jsx b/packages/nova-base-components/lib/permissions/CanDo.jsx new file mode 100644 index 000000000..7d442af03 --- /dev/null +++ b/packages/nova-base-components/lib/permissions/CanDo.jsx @@ -0,0 +1,59 @@ +import React, { PropTypes } from 'react'; +import { FormattedMessage } from 'react-intl'; +import Users from 'meteor/nova:users'; + +const CanDo = (props, context) => { + // no user login, display the login form + if (!context.currentUser && props.displayNoPermissionMessage) { + return ( +
+

+ +
+ ); + } + + // default permission, is the user allowed to perform this action? + let permission = Users.canDo(context.currentUser, props.action); + + // the permission is about viewing a document, check if the user is allowed + if (props.document && props.action.indexOf('view') > -1) { + // use the permission shortcut canView on the current user and requested document + permission = Users.canView(context.currentUser, props.document); + } + + // the permission is about editing a document, check if the user is allowed + if (props.document && props.action.indexOf('edit') > -1) { + // use the permission shortcut canEdit on the current user and requested document + permission = Users.canEdit(context.currentUser, props.document); + } + + // the user can perform the intented action in the component: display the component, + // else: display a not allowed message + if (permission) { + return props.children; + } else { + return props.displayNoPermissionMessage ?

: null; + } +}; + +CanDo.contextTypes = { + currentUser: React.PropTypes.object +}; + +CanDo.propTypes = { + action: React.PropTypes.string.isRequired, + document: React.PropTypes.object, + noPermissionMessage: React.PropTypes.string, + displayNoPermissionMessage: React.PropTypes.bool, +}; + +CanDo.defaultProps = { + noPermissionMessage: 'app.noPermission', + displayNoPermissionMessage: false, +}; + +CanDo.displayName = "CanDo"; + +module.exports = CanDo; +export default CanDo; \ No newline at end of file diff --git a/packages/nova-base-components/lib/posts/PostsItem.jsx b/packages/nova-base-components/lib/posts/PostsItem.jsx index 6f820425a..6d6ed4a1b 100644 --- a/packages/nova-base-components/lib/posts/PostsItem.jsx +++ b/packages/nova-base-components/lib/posts/PostsItem.jsx @@ -18,16 +18,16 @@ class PostsItem extends Component { } renderActions() { - - const component = ( - }> - - - ); - return (
- {Users.canEdit(this.context.currentUser, this.props.post) ? component : ""} + + }> + + +
) } diff --git a/packages/nova-base-components/lib/posts/PostsNewForm.jsx b/packages/nova-base-components/lib/posts/PostsNewForm.jsx index e7e82a8b1..de41bc22d 100644 --- a/packages/nova-base-components/lib/posts/PostsNewForm.jsx +++ b/packages/nova-base-components/lib/posts/PostsNewForm.jsx @@ -9,7 +9,11 @@ const PostsNewForm = (props, context) => { const router = props.router; return ( - +
{ }} />
-
+ ) } diff --git a/packages/nova-base-components/lib/users/UsersEdit.jsx b/packages/nova-base-components/lib/users/UsersEdit.jsx index 59c43fb8f..6cf7738f4 100644 --- a/packages/nova-base-components/lib/users/UsersEdit.jsx +++ b/packages/nova-base-components/lib/users/UsersEdit.jsx @@ -13,7 +13,11 @@ const UsersEdit = (props, context) => { //const label = `Edit profile for ${Users.getDisplayName(user)}`; return ( - +

{ }} />
-
+ ) }; diff --git a/packages/nova-i18n-en-us/lib/en_US.js b/packages/nova-i18n-en-us/lib/en_US.js index f5609f02c..b0c6f65c6 100644 --- a/packages/nova-i18n-en-us/lib/en_US.js +++ b/packages/nova-i18n-en-us/lib/en_US.js @@ -116,6 +116,7 @@ Telescope.strings.en = { "app.404": "Sorry, we couldn't find what you were looking for.", "app.powered_by": "Powered by Telescope", "app.or": "Or", + "app.noPermission": "Sorry, you do not have the permission to do this at this time.", "newsletter": "Newsletter", "newsletter.subscribe": "Subscribe", From 96571b5077ecf0904c5a119a54732f5a56e9943e Mon Sep 17 00:00:00 2001 From: schabluk Date: Thu, 4 Aug 2016 21:54:33 +0200 Subject: [PATCH 21/60] added SubscribedPosts component --- .../lib/components/SubscribedPosts.jsx | 29 +++++++++++++++++++ .../_nova-subscribe-to-posts/lib/export.js | 4 ++- .../_nova-subscribe-to-posts/lib/views.js | 15 ++++++++++ packages/_nova-subscribe-to-posts/package.js | 3 +- 4 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 packages/_nova-subscribe-to-posts/lib/components/SubscribedPosts.jsx create mode 100644 packages/_nova-subscribe-to-posts/lib/views.js diff --git a/packages/_nova-subscribe-to-posts/lib/components/SubscribedPosts.jsx b/packages/_nova-subscribe-to-posts/lib/components/SubscribedPosts.jsx new file mode 100644 index 000000000..5357897bc --- /dev/null +++ b/packages/_nova-subscribe-to-posts/lib/components/SubscribedPosts.jsx @@ -0,0 +1,29 @@ +import React, { PropTypes, Component } from 'react'; +import { ListContainer } from "meteor/utilities:react-list-container"; +import Posts from "meteor/nova:posts"; + +class SubscribedPosts extends Component { + + render() { + + const params = {view: 'userSubscribedPosts', userId: Meteor.userId(), listId: "posts.list.subscribed"}; + const {selector, options} = Posts.parameters.get(params); + + return ( + + ) + } +}; + +module.exports = SubscribedPosts; diff --git a/packages/_nova-subscribe-to-posts/lib/export.js b/packages/_nova-subscribe-to-posts/lib/export.js index dbacdb602..199b01bd3 100644 --- a/packages/_nova-subscribe-to-posts/lib/export.js +++ b/packages/_nova-subscribe-to-posts/lib/export.js @@ -1,8 +1,10 @@ import {subscribeItem, unsubscribeItem} from './methods.js'; import Subscribe from './components/Subscribe.jsx'; +import SubscribedPosts from './components/SubscribedPosts.jsx'; export { subscribeItem, unsubscribeItem, - Subscribe + Subscribe, + SubscribedPosts } diff --git a/packages/_nova-subscribe-to-posts/lib/views.js b/packages/_nova-subscribe-to-posts/lib/views.js new file mode 100644 index 000000000..3e36e9f94 --- /dev/null +++ b/packages/_nova-subscribe-to-posts/lib/views.js @@ -0,0 +1,15 @@ +import Posts from "meteor/nova:posts"; + +Posts.views.add("userSubscribedPosts", function (terms) { + var user = Meteor.users.findOne(terms.userId), + postsIds = []; + + if (user && user.telescope.subscribedItems && user.telescope.subscribedItems.Posts) { + postsIds = _.pluck(user.telescope.subscribedItems.Posts, "itemId"); + } + + return { + selector: {_id: {$in: postsIds}}, + options: {limit: 5, sort: {postedAt: -1}} + }; +}); diff --git a/packages/_nova-subscribe-to-posts/package.js b/packages/_nova-subscribe-to-posts/package.js index 34a8ae4fe..0f8510df1 100644 --- a/packages/_nova-subscribe-to-posts/package.js +++ b/packages/_nova-subscribe-to-posts/package.js @@ -39,7 +39,8 @@ Package.onUse(function (api) { // 'lib/subscribe-to-posts.js',', 'lib/callbacks.js', 'lib/custom_fields.js', - 'lib/methods.js' + 'lib/methods.js', + 'lib/views.js' ], ['client', 'server']); // client From 830d6015ad804ad5b1f69807408a1604b759c15c Mon Sep 17 00:00:00 2001 From: xavcz Date: Fri, 5 Aug 2016 18:26:55 +0200 Subject: [PATCH 22/60] small fix on default props value not taken in consideration --- packages/nova-base-components/lib/common/Loading.jsx | 2 +- packages/nova-forms/lib/NovaForm.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nova-base-components/lib/common/Loading.jsx b/packages/nova-base-components/lib/common/Loading.jsx index c82b2b0cb..4b023e113 100644 --- a/packages/nova-base-components/lib/common/Loading.jsx +++ b/packages/nova-base-components/lib/common/Loading.jsx @@ -14,7 +14,7 @@ Loading.propTypes = { color: React.PropTypes.string } -Loading.defaultPropTypes = { +Loading.defaultProps = { color: "black" } diff --git a/packages/nova-forms/lib/NovaForm.jsx b/packages/nova-forms/lib/NovaForm.jsx index 92e3f6880..d311f99cc 100644 --- a/packages/nova-forms/lib/NovaForm.jsx +++ b/packages/nova-forms/lib/NovaForm.jsx @@ -393,7 +393,7 @@ NovaForm.propTypes = { fields: React.PropTypes.arrayOf(React.PropTypes.string) } -NovaForm.defaultPropTypes = { +NovaForm.defaultProps = { layout: "horizontal" } From e2a0fe26ba728bdf812eabf8f7c7b5969f7a2734 Mon Sep 17 00:00:00 2001 From: Pedro Leandro Coutin Portuondo Date: Fri, 5 Aug 2016 15:38:01 -0700 Subject: [PATCH 23/60] Corrected imports for debug convenience globals --- packages/nova-debug/lib/globals.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nova-debug/lib/globals.js b/packages/nova-debug/lib/globals.js index c8d20dd01..0604d13a8 100644 --- a/packages/nova-debug/lib/globals.js +++ b/packages/nova-debug/lib/globals.js @@ -1,6 +1,6 @@ import PostsImport from "meteor/nova:posts"; -import CommentsImport from "meteor/nova:posts"; -import UsersImport from "meteor/nova:posts"; +import CommentsImport from "meteor/nova:comments"; +import UsersImport from "meteor/nova:users"; import CategoriesImport from "meteor/nova:categories"; Posts = PostsImport; From 08205237503da5eb347f6d88c1d6aa3de0e41bda Mon Sep 17 00:00:00 2001 From: xavcz Date: Sat, 6 Aug 2016 19:47:04 +0200 Subject: [PATCH 24/60] use `CanDo` component when relevant, comment & deprecate ol' permission components --- .../lib/categories/CategoriesList.jsx | 8 ++- .../lib/categories/Category.jsx | 6 ++- .../lib/comments/CommentsItem.jsx | 11 ++-- .../nova-base-components/lib/components.js | 5 -- .../lib/permissions/CanCreatePost.jsx | 52 ++++++++++--------- .../lib/permissions/CanEditPost.jsx | 36 +++++++------ .../lib/permissions/CanEditUser.jsx | 36 +++++++------ .../lib/permissions/CanView.jsx | 34 ++++++------ .../lib/permissions/CanViewPost.jsx | 36 +++++++------ .../lib/posts/PostsEditForm.jsx | 12 +++-- .../lib/users/UsersAccount.jsx | 20 +++---- .../lib/users/UsersEdit.jsx | 1 - .../lib/users/UsersProfile.jsx | 9 +++- .../lib/users/UsersSingle.jsx | 2 +- 14 files changed, 147 insertions(+), 121 deletions(-) diff --git a/packages/nova-base-components/lib/categories/CategoriesList.jsx b/packages/nova-base-components/lib/categories/CategoriesList.jsx index b79e78916..8a36dc604 100644 --- a/packages/nova-base-components/lib/categories/CategoriesList.jsx +++ b/packages/nova-base-components/lib/categories/CategoriesList.jsx @@ -67,7 +67,11 @@ class CategoriesList extends Component { } renderCategoryNewButton() { - return
; + return ( + +
+
+ ); // const CategoriesNewForm = Telescope.components.CategoriesNewForm; // return ( // }> @@ -99,7 +103,7 @@ class CategoriesList extends Component {
{categories && categories.length > 0 ? categories.map((category, index) => ) : null} - {Users.canDo(this.context.currentUser, "categories.new") ? this.renderCategoryNewButton() : null} + {this.renderCategoryNewButton()}
{/* modals cannot be inside DropdownButton component (see GH issue) */} diff --git a/packages/nova-base-components/lib/categories/Category.jsx b/packages/nova-base-components/lib/categories/Category.jsx index a88df0173..1c6c611de 100644 --- a/packages/nova-base-components/lib/categories/Category.jsx +++ b/packages/nova-base-components/lib/categories/Category.jsx @@ -9,7 +9,11 @@ import Users from 'meteor/nova:users'; class Category extends Component { renderEdit() { - return ; + return ( + + + + ); // return ( // }> // diff --git a/packages/nova-base-components/lib/comments/CommentsItem.jsx b/packages/nova-base-components/lib/comments/CommentsItem.jsx index 0d4b71dfc..b561ec718 100644 --- a/packages/nova-base-components/lib/comments/CommentsItem.jsx +++ b/packages/nova-base-components/lib/comments/CommentsItem.jsx @@ -104,8 +104,12 @@ class CommentsItem extends Component{
- {Users.canEdit(this.props.currentUser, this.props.comment) ? : null} - {Users.canEdit(this.props.currentUser, this.props.comment) ? : null} + +
+ + +
+
{this.state.showEdit ? this.renderEdit() : this.renderComment()}
@@ -118,10 +122,11 @@ class CommentsItem extends Component{ CommentsItem.propTypes = { comment: React.PropTypes.object.isRequired, // the current comment - currentUser: React.PropTypes.object, // the current user + //currentUser: React.PropTypes.object, // the current user } CommentsItem.contextTypes = { + currentUser: React.PropTypes.object, actions: React.PropTypes.object, messages: React.PropTypes.object, events: React.PropTypes.object, diff --git a/packages/nova-base-components/lib/components.js b/packages/nova-base-components/lib/components.js index e430a2b95..40c908db4 100644 --- a/packages/nova-base-components/lib/components.js +++ b/packages/nova-base-components/lib/components.js @@ -61,11 +61,6 @@ Telescope.registerComponent("CategoriesNewForm", require('./categories/Catego // permissions Telescope.registerComponent("CanDo", require('./permissions/CanDo.jsx')); -Telescope.registerComponent("CanCreatePost", require('./permissions/CanCreatePost.jsx')); -Telescope.registerComponent("CanEditPost", require('./permissions/CanEditPost.jsx')); -Telescope.registerComponent("CanView", require('./permissions/CanView.jsx')); -Telescope.registerComponent("CanViewPost", require('./permissions/CanViewPost.jsx')); -Telescope.registerComponent("CanEditUser", require('./permissions/CanEditUser.jsx')); // users diff --git a/packages/nova-base-components/lib/permissions/CanCreatePost.jsx b/packages/nova-base-components/lib/permissions/CanCreatePost.jsx index 7c47df563..084c828d2 100644 --- a/packages/nova-base-components/lib/permissions/CanCreatePost.jsx +++ b/packages/nova-base-components/lib/permissions/CanCreatePost.jsx @@ -1,32 +1,34 @@ -import React, { PropTypes, Component } from 'react'; -import { FormattedMessage } from 'react-intl'; -import Users from 'meteor/nova:users'; +// Deprecated way to handle permission in components, check CanDo component -const CanCreatePost = (props, context) => { +// import React, { PropTypes, Component } from 'react'; +// import { FormattedMessage } from 'react-intl'; +// import Users from 'meteor/nova:users'; - const currentUser = context.currentUser; +// const CanCreatePost = (props, context) => { - const children = props.children; - const UsersAccountForm = Telescope.components.UsersAccountForm; +// const currentUser = context.currentUser; - if (!currentUser){ - return ( -
-

- -
- ) - } else if (Users.canDo(currentUser, "posts.new")) { - return children; - } else { - return

; - } -}; +// const children = props.children; +// const UsersAccountForm = Telescope.components.UsersAccountForm; -CanCreatePost.contextTypes = { - currentUser: React.PropTypes.object -}; +// if (!currentUser){ +// return ( +//
+//

+// +//
+// ) +// } else if (Users.canDo(currentUser, "posts.new")) { +// return children; +// } else { +// return

; +// } +// }; -CanCreatePost.displayName = "CanCreatePost"; +// CanCreatePost.contextTypes = { +// currentUser: React.PropTypes.object +// }; -module.exports = CanCreatePost; \ No newline at end of file +// CanCreatePost.displayName = "CanCreatePost"; + +// module.exports = CanCreatePost; \ No newline at end of file diff --git a/packages/nova-base-components/lib/permissions/CanEditPost.jsx b/packages/nova-base-components/lib/permissions/CanEditPost.jsx index d1678241c..bb0044ba4 100644 --- a/packages/nova-base-components/lib/permissions/CanEditPost.jsx +++ b/packages/nova-base-components/lib/permissions/CanEditPost.jsx @@ -1,21 +1,23 @@ -import React, { PropTypes, Component } from 'react'; -import Users from 'meteor/nova:users'; +// Deprecated way to handle permission in components, check CanDo component -const CanEditPost = ({user, post, children}) => { - if (Users.canEdit(user, post)) { - return children; - } else if (!user){ - return

Please log in.

; - } else { - return

Sorry, you do not have permissions to edit this post at this time

; - } -}; +// import React, { PropTypes, Component } from 'react'; +// import Users from 'meteor/nova:users'; -CanEditPost.propTypes = { - user: React.PropTypes.object, - post: React.PropTypes.object -} +// const CanEditPost = ({user, post, children}) => { +// if (Users.canEdit(user, post)) { +// return children; +// } else if (!user){ +// return

Please log in.

; +// } else { +// return

Sorry, you do not have permissions to edit this post at this time

; +// } +// }; -CanEditPost.displayName = "CanEditPost"; +// CanEditPost.propTypes = { +// user: React.PropTypes.object, +// post: React.PropTypes.object +// } -module.exports = CanEditPost; \ No newline at end of file +// CanEditPost.displayName = "CanEditPost"; + +// module.exports = CanEditPost; \ No newline at end of file diff --git a/packages/nova-base-components/lib/permissions/CanEditUser.jsx b/packages/nova-base-components/lib/permissions/CanEditUser.jsx index 982180c9f..31c2df578 100644 --- a/packages/nova-base-components/lib/permissions/CanEditUser.jsx +++ b/packages/nova-base-components/lib/permissions/CanEditUser.jsx @@ -1,21 +1,23 @@ -import React, { PropTypes, Component } from 'react'; -import Users from 'meteor/nova:users'; +// Deprecated way to handle permission in components, check CanDo component -const CanEditUser = ({user, userToEdit, children}) => { - if (!user){ - return

Please log in.

; - } else if (Users.canEdit(user, userToEdit)) { - return children; - } else { - return

Sorry, you do not have permissions to edit this user at this time

; - } -}; +// import React, { PropTypes, Component } from 'react'; +// import Users from 'meteor/nova:users'; -CanEditUser.propTypes = { - user: React.PropTypes.object, - userToEdit: React.PropTypes.object -} +// const CanEditUser = ({user, userToEdit, children}) => { +// if (!user){ +// return

Please log in.

; +// } else if (Users.canEdit(user, userToEdit)) { +// return children; +// } else { +// return

Sorry, you do not have permissions to edit this user at this time

; +// } +// }; -CanEditUser.displayName = "CanEditUser"; +// CanEditUser.propTypes = { +// user: React.PropTypes.object, +// userToEdit: React.PropTypes.object +// } -module.exports = CanEditUser; \ No newline at end of file +// CanEditUser.displayName = "CanEditUser"; + +// module.exports = CanEditUser; \ No newline at end of file diff --git a/packages/nova-base-components/lib/permissions/CanView.jsx b/packages/nova-base-components/lib/permissions/CanView.jsx index 1e2bd339c..ad12cfa41 100644 --- a/packages/nova-base-components/lib/permissions/CanView.jsx +++ b/packages/nova-base-components/lib/permissions/CanView.jsx @@ -1,20 +1,22 @@ -import React, { PropTypes, Component } from 'react'; -import Users from 'meteor/nova:users'; +// Deprecated way to handle permission in components, check CanDo component -const CanView = ({user, children}) => { - if (Users.canDo(user, "posts.view.approved.all")) { - return children; - } else if (!user){ - return

Please log in.

; - } else { - return

Sorry, you do not have permissions to post at this time

; - } -}; +// import React, { PropTypes, Component } from 'react'; +// import Users from 'meteor/nova:users'; -CanView.propTypes = { - user: React.PropTypes.object -} +// const CanView = ({user, children}) => { +// if (Users.canDo(user, "posts.view.approved.all")) { +// return children; +// } else if (!user){ +// return

Please log in.

; +// } else { +// return

Sorry, you do not have permissions to post at this time

; +// } +// }; -CanView.displayName = "CanView"; +// CanView.propTypes = { +// user: React.PropTypes.object +// } -module.exports = CanView; \ No newline at end of file +// CanView.displayName = "CanView"; + +// module.exports = CanView; \ No newline at end of file diff --git a/packages/nova-base-components/lib/permissions/CanViewPost.jsx b/packages/nova-base-components/lib/permissions/CanViewPost.jsx index 6209fa665..02046d7d5 100644 --- a/packages/nova-base-components/lib/permissions/CanViewPost.jsx +++ b/packages/nova-base-components/lib/permissions/CanViewPost.jsx @@ -1,21 +1,23 @@ -import React, { PropTypes, Component } from 'react'; -import Users from 'meteor/nova:users'; +// Deprecated way to handle permission in components, check CanDo component -const CanViewPost = ({user, post, children}) => { - if (Users.canView(this.props.user, this.props.document)) { - return this.props.children; - } else if (!this.props.user){ - return

Please log in.

; - } else { - return

Sorry, you do not have permissions to post at this time

; - } -}; +// import React, { PropTypes, Component } from 'react'; +// import Users from 'meteor/nova:users'; -CanViewPost.propTypes = { - user: React.PropTypes.object, - post: React.PropTypes.object -} +// const CanViewPost = ({user, post, children}) => { +// if (Users.canView(this.props.user, this.props.document)) { +// return this.props.children; +// } else if (!this.props.user){ +// return

Please log in.

; +// } else { +// return

Sorry, you do not have permissions to post at this time

; +// } +// }; -CanViewPost.displayName = "CanViewPost"; +// CanViewPost.propTypes = { +// user: React.PropTypes.object, +// post: React.PropTypes.object +// } -module.exports = CanViewPost; \ No newline at end of file +// CanViewPost.displayName = "CanViewPost"; + +// module.exports = CanViewPost; \ No newline at end of file diff --git a/packages/nova-base-components/lib/posts/PostsEditForm.jsx b/packages/nova-base-components/lib/posts/PostsEditForm.jsx index aab1bb297..3201716fc 100644 --- a/packages/nova-base-components/lib/posts/PostsEditForm.jsx +++ b/packages/nova-base-components/lib/posts/PostsEditForm.jsx @@ -29,10 +29,12 @@ class PostsEditForm extends Component{ renderAdminArea() { return ( -
-
ID: {this.props.post._id}
- -
+ +
+
ID: {this.props.post._id}
+ +
+
) } @@ -41,7 +43,7 @@ class PostsEditForm extends Component{ return (
- {Users.canDo(this.context.currentUser, "posts.edit.all") ? this.renderAdminArea() : null} + {this.renderAdminArea()} { - const terms = props.params.slug ? {"telescope.slug": props.params.slug} : {_id: context.currentUser._id}; + const terms = props.params.slug ? {"telescope.slug": props.params.slug} : context.currentUser ? {_id: context.currentUser._id } : undefined; return ( - + + + ) }; diff --git a/packages/nova-base-components/lib/users/UsersEdit.jsx b/packages/nova-base-components/lib/users/UsersEdit.jsx index 6cf7738f4..0d43701cc 100644 --- a/packages/nova-base-components/lib/users/UsersEdit.jsx +++ b/packages/nova-base-components/lib/users/UsersEdit.jsx @@ -37,7 +37,6 @@ const UsersEdit = (props, context) => { UsersEdit.propTypes = { user: React.PropTypes.object.isRequired, - currentUser: React.PropTypes.object.isRequired }; UsersEdit.contextTypes = { diff --git a/packages/nova-base-components/lib/users/UsersProfile.jsx b/packages/nova-base-components/lib/users/UsersProfile.jsx index e8b4fe987..ae4d0a06e 100644 --- a/packages/nova-base-components/lib/users/UsersProfile.jsx +++ b/packages/nova-base-components/lib/users/UsersProfile.jsx @@ -5,7 +5,7 @@ import Posts from "meteor/nova:posts"; import Users from 'meteor/nova:users'; import { Link } from 'react-router'; -const UsersProfile = ({user, currentUser}) => { +const UsersProfile = ({user}, {currentUser}) => { const twitterName = Users.getTwitterName(user); @@ -20,7 +20,9 @@ const UsersProfile = ({user, currentUser}) => {

{ UsersProfile.propTypes = { user: React.PropTypes.object.isRequired, +} + +UsersProfile.contextTypes = { currentUser: React.PropTypes.object } diff --git a/packages/nova-base-components/lib/users/UsersSingle.jsx b/packages/nova-base-components/lib/users/UsersSingle.jsx index 32cbdd78c..89b78cf73 100644 --- a/packages/nova-base-components/lib/users/UsersSingle.jsx +++ b/packages/nova-base-components/lib/users/UsersSingle.jsx @@ -15,6 +15,6 @@ const UsersSingle = (props, context) => { ) }; -UsersSingle.displayName = "PostsSingle"; +UsersSingle.displayName = "UsersSingle"; module.exports = UsersSingle; \ No newline at end of file From 952617dd96219778746b4c108ba6f538c6b8b917 Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Sun, 7 Aug 2016 19:10:53 +0900 Subject: [PATCH 25/60] subscribe-to-posts -> subscribe --- .../nova-base-components/lib/posts/PostsPage.jsx | 2 +- .../nova-base-styles/lib/stylesheets/_forms.scss | 3 +++ packages/nova-categories/lib/schema.js | 13 +++++++------ .../.gitignore | 0 .../.versions | 0 .../README.md | 0 .../i18n/ar.i18n.json | 0 .../i18n/bg.i18n.json | 0 .../i18n/cs.i18n.json | 0 .../i18n/da.i18n.json | 0 .../i18n/de.i18n.json | 0 .../i18n/el.i18n.json | 0 .../i18n/en.i18n.json | 0 .../i18n/es.i18n.json | 0 .../i18n/et.i18n.json | 0 .../i18n/fa.i18n.json | 0 .../i18n/fr.i18n.json | 0 .../i18n/hu.i18n.json | 0 .../i18n/id.i18n.json | 0 .../i18n/it.i18n.json | 0 .../i18n/ja.i18n.json | 0 .../i18n/kk.i18n.json | 0 .../i18n/ko.i18n.json | 0 .../i18n/lv-LV.i18n.json | 0 .../i18n/lv.i18n.json | 0 .../i18n/nl.i18n.json | 0 .../i18n/pl.i18n.json | 0 .../i18n/pt-BR.i18n.json | 0 .../i18n/ro.i18n.json | 0 .../i18n/ru.i18n.json | 0 .../i18n/se.i18n.json | 0 .../i18n/sl.i18n.json | 0 .../i18n/sv.i18n.json | 0 .../i18n/th.i18n.json | 0 .../i18n/tr-TR.i18n.json | 0 .../i18n/tr.i18n.json | 0 .../i18n/vi.i18n.json | 0 .../i18n/zh-CN.i18n.json | 0 .../lib/callbacks.js | 0 .../lib/client/templates/post_subscribe.html | 0 .../lib/client/templates/post_subscribe.js | 0 .../lib/client/templates/user_subscribed_posts.html | 0 .../lib/client/templates/user_subscribed_posts.js | 0 .../lib/components/Subscribe.jsx | 0 .../lib/components/SubscribedPosts.jsx | 0 .../lib/custom_fields.js | 0 .../lib/export.js | 0 .../lib/methods.js | 0 .../lib/server/publications.js | 0 .../lib/subscribe-to-posts.js | 0 .../lib/views.js | 0 .../package-tap.i18n | 0 .../package.js | 0 .../versions.json | 0 54 files changed, 11 insertions(+), 7 deletions(-) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/.gitignore (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/.versions (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/README.md (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/ar.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/bg.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/cs.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/da.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/de.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/el.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/en.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/es.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/et.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/fa.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/fr.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/hu.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/id.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/it.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/ja.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/kk.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/ko.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/lv-LV.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/lv.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/nl.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/pl.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/pt-BR.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/ro.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/ru.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/se.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/sl.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/sv.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/th.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/tr-TR.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/tr.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/vi.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/i18n/zh-CN.i18n.json (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/lib/callbacks.js (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/lib/client/templates/post_subscribe.html (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/lib/client/templates/post_subscribe.js (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/lib/client/templates/user_subscribed_posts.html (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/lib/client/templates/user_subscribed_posts.js (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/lib/components/Subscribe.jsx (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/lib/components/SubscribedPosts.jsx (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/lib/custom_fields.js (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/lib/export.js (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/lib/methods.js (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/lib/server/publications.js (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/lib/subscribe-to-posts.js (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/lib/views.js (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/package-tap.i18n (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/package.js (100%) rename packages/{_nova-subscribe-to-posts => nova-subscribe}/versions.json (100%) diff --git a/packages/nova-base-components/lib/posts/PostsPage.jsx b/packages/nova-base-components/lib/posts/PostsPage.jsx index acedc983e..758be0b9a 100644 --- a/packages/nova-base-components/lib/posts/PostsPage.jsx +++ b/packages/nova-base-components/lib/posts/PostsPage.jsx @@ -13,7 +13,7 @@ const PostsPage = ({document, currentUser}) => { -
+ {post.htmlBody ?
: null} {/**/} diff --git a/packages/nova-base-styles/lib/stylesheets/_forms.scss b/packages/nova-base-styles/lib/stylesheets/_forms.scss index 481269dae..5051472ae 100644 --- a/packages/nova-base-styles/lib/stylesheets/_forms.scss +++ b/packages/nova-base-styles/lib/stylesheets/_forms.scss @@ -84,6 +84,9 @@ div.ReactTags__suggestions ul li.active { cursor: pointer; } +div.ReactTags__suggestions mark{ + padding: 0; +} .form-section{ .form-section-heading{ diff --git a/packages/nova-categories/lib/schema.js b/packages/nova-categories/lib/schema.js index 39f6979ee..37a8fac4e 100644 --- a/packages/nova-categories/lib/schema.js +++ b/packages/nova-categories/lib/schema.js @@ -2,20 +2,21 @@ import Categories from "./collection.js"; import Users from 'meteor/nova:users'; const canInsert = user => Users.canDo(user, "categories.new"); +const canEdit = user => Users.canDo(user, "categories.edit.all"); // category schema Categories.schema = new SimpleSchema({ name: { type: String, insertableIf: canInsert, - editableIf: Users.canEdit, + editableIf: canEdit, publish: true }, description: { type: String, optional: true, insertableIf: canInsert, - editableIf: Users.canEdit, + editableIf: canEdit, publish: true, autoform: { rows: 3 @@ -25,28 +26,28 @@ Categories.schema = new SimpleSchema({ type: Number, optional: true, insertableIf: canInsert, - editableIf: Users.canEdit, + editableIf: canEdit, publish: true }, slug: { type: String, optional: true, insertableIf: canInsert, - editableIf: Users.canEdit, + editableIf: canEdit, publish: true }, image: { type: String, optional: true, insertableIf: canInsert, - editableIf: Users.canEdit, + editableIf: canEdit, publish: true }, parentId: { type: String, optional: true, insertableIf: canInsert, - editableIf: Users.canEdit, + editableIf: canEdit, publish: true, autoform: { options: function () { diff --git a/packages/_nova-subscribe-to-posts/.gitignore b/packages/nova-subscribe/.gitignore similarity index 100% rename from packages/_nova-subscribe-to-posts/.gitignore rename to packages/nova-subscribe/.gitignore diff --git a/packages/_nova-subscribe-to-posts/.versions b/packages/nova-subscribe/.versions similarity index 100% rename from packages/_nova-subscribe-to-posts/.versions rename to packages/nova-subscribe/.versions diff --git a/packages/_nova-subscribe-to-posts/README.md b/packages/nova-subscribe/README.md similarity index 100% rename from packages/_nova-subscribe-to-posts/README.md rename to packages/nova-subscribe/README.md diff --git a/packages/_nova-subscribe-to-posts/i18n/ar.i18n.json b/packages/nova-subscribe/i18n/ar.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/ar.i18n.json rename to packages/nova-subscribe/i18n/ar.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/bg.i18n.json b/packages/nova-subscribe/i18n/bg.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/bg.i18n.json rename to packages/nova-subscribe/i18n/bg.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/cs.i18n.json b/packages/nova-subscribe/i18n/cs.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/cs.i18n.json rename to packages/nova-subscribe/i18n/cs.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/da.i18n.json b/packages/nova-subscribe/i18n/da.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/da.i18n.json rename to packages/nova-subscribe/i18n/da.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/de.i18n.json b/packages/nova-subscribe/i18n/de.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/de.i18n.json rename to packages/nova-subscribe/i18n/de.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/el.i18n.json b/packages/nova-subscribe/i18n/el.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/el.i18n.json rename to packages/nova-subscribe/i18n/el.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/en.i18n.json b/packages/nova-subscribe/i18n/en.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/en.i18n.json rename to packages/nova-subscribe/i18n/en.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/es.i18n.json b/packages/nova-subscribe/i18n/es.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/es.i18n.json rename to packages/nova-subscribe/i18n/es.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/et.i18n.json b/packages/nova-subscribe/i18n/et.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/et.i18n.json rename to packages/nova-subscribe/i18n/et.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/fa.i18n.json b/packages/nova-subscribe/i18n/fa.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/fa.i18n.json rename to packages/nova-subscribe/i18n/fa.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/fr.i18n.json b/packages/nova-subscribe/i18n/fr.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/fr.i18n.json rename to packages/nova-subscribe/i18n/fr.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/hu.i18n.json b/packages/nova-subscribe/i18n/hu.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/hu.i18n.json rename to packages/nova-subscribe/i18n/hu.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/id.i18n.json b/packages/nova-subscribe/i18n/id.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/id.i18n.json rename to packages/nova-subscribe/i18n/id.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/it.i18n.json b/packages/nova-subscribe/i18n/it.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/it.i18n.json rename to packages/nova-subscribe/i18n/it.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/ja.i18n.json b/packages/nova-subscribe/i18n/ja.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/ja.i18n.json rename to packages/nova-subscribe/i18n/ja.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/kk.i18n.json b/packages/nova-subscribe/i18n/kk.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/kk.i18n.json rename to packages/nova-subscribe/i18n/kk.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/ko.i18n.json b/packages/nova-subscribe/i18n/ko.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/ko.i18n.json rename to packages/nova-subscribe/i18n/ko.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/lv-LV.i18n.json b/packages/nova-subscribe/i18n/lv-LV.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/lv-LV.i18n.json rename to packages/nova-subscribe/i18n/lv-LV.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/lv.i18n.json b/packages/nova-subscribe/i18n/lv.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/lv.i18n.json rename to packages/nova-subscribe/i18n/lv.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/nl.i18n.json b/packages/nova-subscribe/i18n/nl.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/nl.i18n.json rename to packages/nova-subscribe/i18n/nl.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/pl.i18n.json b/packages/nova-subscribe/i18n/pl.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/pl.i18n.json rename to packages/nova-subscribe/i18n/pl.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/pt-BR.i18n.json b/packages/nova-subscribe/i18n/pt-BR.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/pt-BR.i18n.json rename to packages/nova-subscribe/i18n/pt-BR.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/ro.i18n.json b/packages/nova-subscribe/i18n/ro.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/ro.i18n.json rename to packages/nova-subscribe/i18n/ro.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/ru.i18n.json b/packages/nova-subscribe/i18n/ru.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/ru.i18n.json rename to packages/nova-subscribe/i18n/ru.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/se.i18n.json b/packages/nova-subscribe/i18n/se.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/se.i18n.json rename to packages/nova-subscribe/i18n/se.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/sl.i18n.json b/packages/nova-subscribe/i18n/sl.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/sl.i18n.json rename to packages/nova-subscribe/i18n/sl.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/sv.i18n.json b/packages/nova-subscribe/i18n/sv.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/sv.i18n.json rename to packages/nova-subscribe/i18n/sv.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/th.i18n.json b/packages/nova-subscribe/i18n/th.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/th.i18n.json rename to packages/nova-subscribe/i18n/th.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/tr-TR.i18n.json b/packages/nova-subscribe/i18n/tr-TR.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/tr-TR.i18n.json rename to packages/nova-subscribe/i18n/tr-TR.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/tr.i18n.json b/packages/nova-subscribe/i18n/tr.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/tr.i18n.json rename to packages/nova-subscribe/i18n/tr.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/vi.i18n.json b/packages/nova-subscribe/i18n/vi.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/vi.i18n.json rename to packages/nova-subscribe/i18n/vi.i18n.json diff --git a/packages/_nova-subscribe-to-posts/i18n/zh-CN.i18n.json b/packages/nova-subscribe/i18n/zh-CN.i18n.json similarity index 100% rename from packages/_nova-subscribe-to-posts/i18n/zh-CN.i18n.json rename to packages/nova-subscribe/i18n/zh-CN.i18n.json diff --git a/packages/_nova-subscribe-to-posts/lib/callbacks.js b/packages/nova-subscribe/lib/callbacks.js similarity index 100% rename from packages/_nova-subscribe-to-posts/lib/callbacks.js rename to packages/nova-subscribe/lib/callbacks.js diff --git a/packages/_nova-subscribe-to-posts/lib/client/templates/post_subscribe.html b/packages/nova-subscribe/lib/client/templates/post_subscribe.html similarity index 100% rename from packages/_nova-subscribe-to-posts/lib/client/templates/post_subscribe.html rename to packages/nova-subscribe/lib/client/templates/post_subscribe.html diff --git a/packages/_nova-subscribe-to-posts/lib/client/templates/post_subscribe.js b/packages/nova-subscribe/lib/client/templates/post_subscribe.js similarity index 100% rename from packages/_nova-subscribe-to-posts/lib/client/templates/post_subscribe.js rename to packages/nova-subscribe/lib/client/templates/post_subscribe.js diff --git a/packages/_nova-subscribe-to-posts/lib/client/templates/user_subscribed_posts.html b/packages/nova-subscribe/lib/client/templates/user_subscribed_posts.html similarity index 100% rename from packages/_nova-subscribe-to-posts/lib/client/templates/user_subscribed_posts.html rename to packages/nova-subscribe/lib/client/templates/user_subscribed_posts.html diff --git a/packages/_nova-subscribe-to-posts/lib/client/templates/user_subscribed_posts.js b/packages/nova-subscribe/lib/client/templates/user_subscribed_posts.js similarity index 100% rename from packages/_nova-subscribe-to-posts/lib/client/templates/user_subscribed_posts.js rename to packages/nova-subscribe/lib/client/templates/user_subscribed_posts.js diff --git a/packages/_nova-subscribe-to-posts/lib/components/Subscribe.jsx b/packages/nova-subscribe/lib/components/Subscribe.jsx similarity index 100% rename from packages/_nova-subscribe-to-posts/lib/components/Subscribe.jsx rename to packages/nova-subscribe/lib/components/Subscribe.jsx diff --git a/packages/_nova-subscribe-to-posts/lib/components/SubscribedPosts.jsx b/packages/nova-subscribe/lib/components/SubscribedPosts.jsx similarity index 100% rename from packages/_nova-subscribe-to-posts/lib/components/SubscribedPosts.jsx rename to packages/nova-subscribe/lib/components/SubscribedPosts.jsx diff --git a/packages/_nova-subscribe-to-posts/lib/custom_fields.js b/packages/nova-subscribe/lib/custom_fields.js similarity index 100% rename from packages/_nova-subscribe-to-posts/lib/custom_fields.js rename to packages/nova-subscribe/lib/custom_fields.js diff --git a/packages/_nova-subscribe-to-posts/lib/export.js b/packages/nova-subscribe/lib/export.js similarity index 100% rename from packages/_nova-subscribe-to-posts/lib/export.js rename to packages/nova-subscribe/lib/export.js diff --git a/packages/_nova-subscribe-to-posts/lib/methods.js b/packages/nova-subscribe/lib/methods.js similarity index 100% rename from packages/_nova-subscribe-to-posts/lib/methods.js rename to packages/nova-subscribe/lib/methods.js diff --git a/packages/_nova-subscribe-to-posts/lib/server/publications.js b/packages/nova-subscribe/lib/server/publications.js similarity index 100% rename from packages/_nova-subscribe-to-posts/lib/server/publications.js rename to packages/nova-subscribe/lib/server/publications.js diff --git a/packages/_nova-subscribe-to-posts/lib/subscribe-to-posts.js b/packages/nova-subscribe/lib/subscribe-to-posts.js similarity index 100% rename from packages/_nova-subscribe-to-posts/lib/subscribe-to-posts.js rename to packages/nova-subscribe/lib/subscribe-to-posts.js diff --git a/packages/_nova-subscribe-to-posts/lib/views.js b/packages/nova-subscribe/lib/views.js similarity index 100% rename from packages/_nova-subscribe-to-posts/lib/views.js rename to packages/nova-subscribe/lib/views.js diff --git a/packages/_nova-subscribe-to-posts/package-tap.i18n b/packages/nova-subscribe/package-tap.i18n similarity index 100% rename from packages/_nova-subscribe-to-posts/package-tap.i18n rename to packages/nova-subscribe/package-tap.i18n diff --git a/packages/_nova-subscribe-to-posts/package.js b/packages/nova-subscribe/package.js similarity index 100% rename from packages/_nova-subscribe-to-posts/package.js rename to packages/nova-subscribe/package.js diff --git a/packages/_nova-subscribe-to-posts/versions.json b/packages/nova-subscribe/versions.json similarity index 100% rename from packages/_nova-subscribe-to-posts/versions.json rename to packages/nova-subscribe/versions.json From 99a70a326233b3cbdf251aaebbeab24e7a8d2b9f Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Sun, 7 Aug 2016 19:26:08 +0900 Subject: [PATCH 26/60] cleaning up nova:subscribe --- .meteor/packages | 4 +- .meteor/versions | 3 +- .../.build.telescope-blank/buildinfo.json | 78 +++ .../.build.telescope-blank/isopack.json | 24 + .../.build.telescope-blank/os.json | 45 ++ .../os/packages/telescope-blank.js | 311 +++++++++++ .../os/packages/telescope-blank.js.map | 1 + .../.build.telescope-blank/package.js | 1 + .../.build.telescope-blank/unipackage.json | 23 + .../.build.telescope-blank/web.browser.json | 70 +++ .../web.browser/packages/telescope-blank.js | 313 +++++++++++ .../packages/telescope-blank.js.map | 1 + .../lib/client/scss/package.scss.css | 0 .../.build.telescope-blank/web.cordova.json | 70 +++ .../web.cordova/packages/telescope-blank.js | 313 +++++++++++ .../packages/telescope-blank.js.map | 1 + .../lib/client/scss/package.scss.css | 0 .../.build.telescope-email/buildinfo.json | 72 +++ .../.build.telescope-email/isopack.json | 24 + .../.build.telescope-email/os.json | 61 +++ .../os/packages/telescope-email.js | 510 ++++++++++++++++++ .../os/packages/telescope-email.js.map | 1 + .../.build.telescope-email/package.js | 1 + .../.build.telescope-email/unipackage.json | 23 + .../.build.telescope-email/web.browser.json | 51 ++ .../web.browser/packages/telescope-email.js | 153 ++++++ .../packages/telescope-email.js.map | 1 + .../.build.telescope-email/web.cordova.json | 51 ++ .../web.cordova/packages/telescope-email.js | 153 ++++++ .../packages/telescope-email.js.map | 1 + packages/nova-subscribe/.gitignore | 1 - packages/nova-subscribe/.versions | 69 --- packages/nova-subscribe/README.md | 22 +- .../lib/{export.js => client.js} | 7 +- .../lib/client/templates/post_subscribe.html | 15 - .../lib/client/templates/post_subscribe.js | 47 -- .../templates/user_subscribed_posts.html | 6 - .../client/templates/user_subscribed_posts.js | 22 - packages/nova-subscribe/lib/custom_fields.js | 53 +- packages/nova-subscribe/lib/methods.js | 6 +- packages/nova-subscribe/lib/server.js | 15 + .../nova-subscribe/lib/server/publications.js | 10 - .../nova-subscribe/lib/subscribe-to-posts.js | 140 ----- packages/nova-subscribe/package-tap.i18n | 5 - packages/nova-subscribe/package.js | 62 +-- packages/nova-subscribe/versions.json | 227 -------- 46 files changed, 2447 insertions(+), 620 deletions(-) create mode 100644 packages/nova-subscribe/.build.telescope-blank/buildinfo.json create mode 100644 packages/nova-subscribe/.build.telescope-blank/isopack.json create mode 100644 packages/nova-subscribe/.build.telescope-blank/os.json create mode 100644 packages/nova-subscribe/.build.telescope-blank/os/packages/telescope-blank.js create mode 100644 packages/nova-subscribe/.build.telescope-blank/os/packages/telescope-blank.js.map create mode 100644 packages/nova-subscribe/.build.telescope-blank/package.js create mode 100644 packages/nova-subscribe/.build.telescope-blank/unipackage.json create mode 100644 packages/nova-subscribe/.build.telescope-blank/web.browser.json create mode 100644 packages/nova-subscribe/.build.telescope-blank/web.browser/packages/telescope-blank.js create mode 100644 packages/nova-subscribe/.build.telescope-blank/web.browser/packages/telescope-blank.js.map create mode 100644 packages/nova-subscribe/.build.telescope-blank/web.browser/packages/telescope-blank/lib/client/scss/package.scss.css create mode 100644 packages/nova-subscribe/.build.telescope-blank/web.cordova.json create mode 100644 packages/nova-subscribe/.build.telescope-blank/web.cordova/packages/telescope-blank.js create mode 100644 packages/nova-subscribe/.build.telescope-blank/web.cordova/packages/telescope-blank.js.map create mode 100644 packages/nova-subscribe/.build.telescope-blank/web.cordova/packages/telescope-blank/lib/client/scss/package.scss.css create mode 100644 packages/nova-subscribe/.build.telescope-email/buildinfo.json create mode 100644 packages/nova-subscribe/.build.telescope-email/isopack.json create mode 100644 packages/nova-subscribe/.build.telescope-email/os.json create mode 100644 packages/nova-subscribe/.build.telescope-email/os/packages/telescope-email.js create mode 100644 packages/nova-subscribe/.build.telescope-email/os/packages/telescope-email.js.map create mode 100644 packages/nova-subscribe/.build.telescope-email/package.js create mode 100644 packages/nova-subscribe/.build.telescope-email/unipackage.json create mode 100644 packages/nova-subscribe/.build.telescope-email/web.browser.json create mode 100644 packages/nova-subscribe/.build.telescope-email/web.browser/packages/telescope-email.js create mode 100644 packages/nova-subscribe/.build.telescope-email/web.browser/packages/telescope-email.js.map create mode 100644 packages/nova-subscribe/.build.telescope-email/web.cordova.json create mode 100644 packages/nova-subscribe/.build.telescope-email/web.cordova/packages/telescope-email.js create mode 100644 packages/nova-subscribe/.build.telescope-email/web.cordova/packages/telescope-email.js.map delete mode 100644 packages/nova-subscribe/.gitignore delete mode 100644 packages/nova-subscribe/.versions rename packages/nova-subscribe/lib/{export.js => client.js} (71%) delete mode 100644 packages/nova-subscribe/lib/client/templates/post_subscribe.html delete mode 100644 packages/nova-subscribe/lib/client/templates/post_subscribe.js delete mode 100644 packages/nova-subscribe/lib/client/templates/user_subscribed_posts.html delete mode 100644 packages/nova-subscribe/lib/client/templates/user_subscribed_posts.js create mode 100644 packages/nova-subscribe/lib/server.js delete mode 100644 packages/nova-subscribe/lib/server/publications.js delete mode 100644 packages/nova-subscribe/lib/subscribe-to-posts.js delete mode 100644 packages/nova-subscribe/package-tap.i18n delete mode 100644 packages/nova-subscribe/versions.json diff --git a/.meteor/packages b/.meteor/packages index 6b3d89ebe..5f8010e68 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -39,4 +39,6 @@ nova:debug ############ Your Packages ############ -# my-custom-package \ No newline at end of file +# my-custom-package + +nova:subscribe \ No newline at end of file diff --git a/.meteor/versions b/.meteor/versions index b0975381f..89d69344c 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -93,6 +93,7 @@ nova:posts@0.26.5-nova nova:rss@0.26.5-nova nova:search@0.26.5-nova nova:settings@0.26.5-nova +nova:subscribe@0.26.5-nova nova:users@0.26.5-nova nova:voting@0.26.5-nova npm-bcrypt@0.8.6_3 @@ -133,7 +134,7 @@ tracker@1.1.0 ui@1.0.11 underscore@1.0.9 url@1.0.10 -utilities:react-list-container@0.1.12 +utilities:react-list-container@0.1.13 utilities:smart-methods@0.1.5 utilities:smart-publications@0.1.4 webapp@1.3.10 diff --git a/packages/nova-subscribe/.build.telescope-blank/buildinfo.json b/packages/nova-subscribe/.build.telescope-blank/buildinfo.json new file mode 100644 index 000000000..2ef32e328 --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-blank/buildinfo.json @@ -0,0 +1,78 @@ +{ + "builtBy": "meteor/14", + "buildDependencies": { + "os.json": { + "files": { + "/Users/sacha/Dev/Telescope/packages/telescope-blank/package.js": "4b9dc1cdae8aac921a1147dfcb08534bbaacda72", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/package-tap.i18n": "f6a2318986df41df748399f53ee3d59d7f31c179", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/both.js": "845d5b3f61595101239f77867e54b73a5349ab3e", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/routes.js": "1945a42ee1faecc320213406d99a7a9cea965f9d", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/server/publications.js": "04ae0bc6e0d565e45369ab9e3bf67a55454dce07", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4" + }, + "directories": [] + }, + "web.browser.json": { + "files": { + "/Users/sacha/Dev/Telescope/packages/telescope-blank/package.js": "4b9dc1cdae8aac921a1147dfcb08534bbaacda72", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/package-tap.i18n": "f6a2318986df41df748399f53ee3d59d7f31c179", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/both.js": "845d5b3f61595101239f77867e54b73a5349ab3e", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/routes.js": "1945a42ee1faecc320213406d99a7a9cea965f9d", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/client/templates/template.html": "eb40d0bd228474b7fb5949e4ba0edae3902619df", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/client/templates/template.js": "fecd7b155ddc678bced9144469adbada08756039", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/client/scss/package.scss": "da39a3ee5e6b4b0d3255bfef95601890afd80709", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4" + }, + "directories": [] + }, + "web.cordova.json": { + "files": { + "/Users/sacha/Dev/Telescope/packages/telescope-blank/package.js": "4b9dc1cdae8aac921a1147dfcb08534bbaacda72", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/package-tap.i18n": "f6a2318986df41df748399f53ee3d59d7f31c179", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/both.js": "845d5b3f61595101239f77867e54b73a5349ab3e", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/routes.js": "1945a42ee1faecc320213406d99a7a9cea965f9d", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/client/templates/template.html": "eb40d0bd228474b7fb5949e4ba0edae3902619df", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/client/templates/template.js": "fecd7b155ddc678bced9144469adbada08756039", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/client/scss/package.scss": "da39a3ee5e6b4b0d3255bfef95601890afd80709", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4" + }, + "directories": [] + } + }, + "pluginDependencies": { + "files": { + "/Users/sacha/Dev/Telescope/packages/telescope-blank/package.js": "4b9dc1cdae8aac921a1147dfcb08534bbaacda72" + }, + "directories": [] + }, + "source": "/Users/sacha/Dev/Telescope/packages/telescope-blank", + "buildTimeDirectDependencies": { + "telescope-i18n": "0.0.0+59e245bcb9daad9888d7b1165563547b730f4b1e", + "tap:i18n": "1.2.1", + "telescope-lib": "0.2.9+3c5fc781baa945505183378ea284deac3068520b", + "templating": "1.0.9", + "fourseven:scss": "1.0.0", + "underscore": "1.0.1", + "iron:router": "1.0.3", + "jquery": "1.0.1", + "meteor": "1.1.3", + "telescope-base": "0.0.0+400cdc252958afc669dfe6de17b9604adb753c62" + }, + "buildTimePluginDependencies": {}, + "cordovaDependencies": null +} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-blank/isopack.json b/packages/nova-subscribe/.build.telescope-blank/isopack.json new file mode 100644 index 000000000..12494d186 --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-blank/isopack.json @@ -0,0 +1,24 @@ +{ + "isopack-1": { + "name": "telescope-blank", + "summary": "Telescope blank package – use as template for your own packages", + "version": "0.1.0+6c017400b8a83109c230d8b5f2d91823df277f5f", + "earliestCompatibleVersion": "0.0.0", + "isTest": false, + "builds": [ + { + "arch": "os", + "path": "os.json" + }, + { + "arch": "web.browser", + "path": "web.browser.json" + }, + { + "arch": "web.cordova", + "path": "web.cordova.json" + } + ], + "plugins": [] + } +} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-blank/os.json b/packages/nova-subscribe/.build.telescope-blank/os.json new file mode 100644 index 000000000..826c7586e --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-blank/os.json @@ -0,0 +1,45 @@ +{ + "format": "unipackage-unibuild-pre1", + "packageVariables": [ + { + "name": "myFunction", + "export": true + }, + { + "name": "__" + } + ], + "uses": [ + { + "package": "meteor" + }, + { + "package": "tap:i18n" + }, + { + "package": "iron:router" + }, + { + "package": "telescope-base" + }, + { + "package": "telescope-lib" + }, + { + "package": "telescope-i18n" + }, + { + "package": "fourseven:scss" + } + ], + "resources": [ + { + "type": "prelink", + "file": "os/packages/telescope-blank.js", + "length": 26125, + "offset": 0, + "servePath": "/packages/telescope-blank.js", + "sourceMap": "os/packages/telescope-blank.js.map" + } + ] +} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-blank/os/packages/telescope-blank.js b/packages/nova-subscribe/.build.telescope-blank/os/packages/telescope-blank.js new file mode 100644 index 000000000..f91849efa --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-blank/os/packages/telescope-blank.js @@ -0,0 +1,311 @@ +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/package-i18n.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +TAPi18n.packages["telescope-blank"] = {"translation_function_name":"__","helper_name":"_","namespace":"project"}; // 1 + // 2 +// define package's translation function (proxy to the i18next) // 3 +__ = TAPi18n._getPackageI18nextProxy("project"); // 4 + // 5 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/lib/both.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +// Custom Post Property // 1 + // 2 +var customProperty = { // 3 + propertyName: 'customProperty', // 4 + propertySchema: { // 5 + type: String, // property type // 6 + label: 'customLabel', // key string used for internationalization // 7 + optional: true, // make this property optional // 8 + autoform: { // 9 + editable: true, // make this property editable by users // 10 + type: "bootstrap-datetimepicker" // assign a custom input type // 11 + } // 12 + } // 13 +} // 14 +addToPostSchema.push(customProperty); // 15 + // 16 +// Custom Setting // 17 + // 18 +var customSetting = { // 19 + propertyName: 'customSetting', // 20 + propertySchema: { // 21 + type: String, // 22 + optional: true, // 23 + autoform: { // 24 + group: 'customGroup', // assign custom group (fieldset) in Settings form // 25 + private: true // mark as private (not published to client) // 26 + } // 27 + } // 28 +} // 29 +addToSettingsSchema.push(customSetting); // 30 + // 31 +// Global Function // 32 + // 33 +myFunction = function (a, b) { // 34 + return a + b; // 35 +} // 36 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/lib/routes.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +Meteor.startup(function () { // 1 + // 2 + Router.route('/custom-path', { // 3 + name: 'customRoute', // 4 + template: getTemplate('customTemplate') // 5 + }); // 6 + // 7 +}); // 8 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/lib/server/publications.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +Meteor.publish('customPublication', function (limit) { // 1 + return Posts.find({}, {limit: limit}); // 2 +}); // 3 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "telescope-blank", // 2 + namespace = "telescope-blank"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +if(_.isUndefined(TAPi18n.translations["de"])) { // 8 + TAPi18n.translations["de"] = {}; // 9 +} // 10 + // 11 +if(_.isUndefined(TAPi18n.translations["de"][namespace])) { // 12 + TAPi18n.translations["de"][namespace] = {}; // 13 +} // 14 + // 15 +_.extend(TAPi18n.translations["de"][namespace], {"translation_key":"translation string"}); // 16 + // 17 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "telescope-blank", // 2 + namespace = "telescope-blank"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +// integrate the fallback language translations // 8 +TAPi18n.addResourceBundle("en", namespace, {"translation_key":"translation string"}); // 9 + // 10 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "telescope-blank", // 2 + namespace = "telescope-blank"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +if(_.isUndefined(TAPi18n.translations["es"])) { // 8 + TAPi18n.translations["es"] = {}; // 9 +} // 10 + // 11 +if(_.isUndefined(TAPi18n.translations["es"][namespace])) { // 12 + TAPi18n.translations["es"][namespace] = {}; // 13 +} // 14 + // 15 +_.extend(TAPi18n.translations["es"][namespace], {"translation_key":"translation string"}); // 16 + // 17 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "telescope-blank", // 2 + namespace = "telescope-blank"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +if(_.isUndefined(TAPi18n.translations["fr"])) { // 8 + TAPi18n.translations["fr"] = {}; // 9 +} // 10 + // 11 +if(_.isUndefined(TAPi18n.translations["fr"][namespace])) { // 12 + TAPi18n.translations["fr"][namespace] = {}; // 13 +} // 14 + // 15 +_.extend(TAPi18n.translations["fr"][namespace], {"translation_key":"translation string"}); // 16 + // 17 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "telescope-blank", // 2 + namespace = "telescope-blank"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +if(_.isUndefined(TAPi18n.translations["it"])) { // 8 + TAPi18n.translations["it"] = {}; // 9 +} // 10 + // 11 +if(_.isUndefined(TAPi18n.translations["it"][namespace])) { // 12 + TAPi18n.translations["it"][namespace] = {}; // 13 +} // 14 + // 15 +_.extend(TAPi18n.translations["it"][namespace], {"translation_key":"translation string"}); // 16 + // 17 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "telescope-blank", // 2 + namespace = "telescope-blank"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +if(_.isUndefined(TAPi18n.translations["zh-CN"])) { // 8 + TAPi18n.translations["zh-CN"] = {}; // 9 +} // 10 + // 11 +if(_.isUndefined(TAPi18n.translations["zh-CN"][namespace])) { // 12 + TAPi18n.translations["zh-CN"][namespace] = {}; // 13 +} // 14 + // 15 +_.extend(TAPi18n.translations["zh-CN"][namespace], {"translation_key":"translation string"}); // 16 + // 17 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); diff --git a/packages/nova-subscribe/.build.telescope-blank/os/packages/telescope-blank.js.map b/packages/nova-subscribe/.build.telescope-blank/os/packages/telescope-blank.js.map new file mode 100644 index 000000000..5351bff35 --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-blank/os/packages/telescope-blank.js.map @@ -0,0 +1 @@ +{"version":3,"file":"/packages/telescope-blank.js","sources":["telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/package-tap.i18n","telescope-blank/lib/both.js","telescope-blank/lib/routes.js","telescope-blank/lib/server/publications.js","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json"],"names":[],"mappings":";;;;;;;;AAAA,iH;;AAEA,+D;AACA,gD;;;;;;;;;;;;;;;;;;;ACHA,uB;;AAEA,sB;AACA,iC;AACA,mB;AACA,4D;AACA,uF;AACA,0E;AACA,e;AACA,mF;AACA,yE;AACA,K;AACA,G;AACA,C;AACA,qC;;AAEA,iB;;AAEA,qB;AACA,gC;AACA,mB;AACA,iB;AACA,mB;AACA,e;AACA,8F;AACA,wF;AACA,K;AACA,G;AACA,C;AACA,wC;;AAEA,kB;;AAEA,8B;AACA,e;AACA,C;;;;;;;;;;;;;;;;;;ACnCA,4B;AACA,E;AACA,gC;AACA,wB;AACA,2C;AACA,K;;AAEA,G;;;;;;;;;;;;;;;;;;ACPA,sD;AACA,wC;AACA,G;;;;;;;;;;;;;;;;;;ACFA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;AACA,+C;AACA,kC;AACA,C;;AAEA,0D;AACA,6C;AACA,C;;AAEA,0F;;;;;;;;;;;;;;;;;;;ACfA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;AACA,gD;AACA,qF;;;;;;;;;;;;;;;;;;;ACRA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;AACA,+C;AACA,kC;AACA,C;;AAEA,0D;AACA,6C;AACA,C;;AAEA,0F;;;;;;;;;;;;;;;;;;;ACfA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;AACA,+C;AACA,kC;AACA,C;;AAEA,0D;AACA,6C;AACA,C;;AAEA,0F;;;;;;;;;;;;;;;;;;;ACfA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;AACA,+C;AACA,kC;AACA,C;;AAEA,0D;AACA,6C;AACA,C;;AAEA,0F;;;;;;;;;;;;;;;;;;;ACfA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;AACA,kD;AACA,qC;AACA,C;;AAEA,6D;AACA,gD;AACA,C;;AAEA,6F","sourcesContent":["TAPi18n.packages[\"telescope-blank\"] = {\"translation_function_name\":\"__\",\"helper_name\":\"_\",\"namespace\":\"project\"};\n\n// define package's translation function (proxy to the i18next)\n__ = TAPi18n._getPackageI18nextProxy(\"project\");\n","// Custom Post Property\n\nvar customProperty = {\n propertyName: 'customProperty',\n propertySchema: {\n type: String, // property type\n label: 'customLabel', // key string used for internationalization\n optional: true, // make this property optional\n autoform: {\n editable: true, // make this property editable by users\n type: \"bootstrap-datetimepicker\" // assign a custom input type\n }\n }\n}\naddToPostSchema.push(customProperty);\n\n// Custom Setting\n\nvar customSetting = {\n propertyName: 'customSetting',\n propertySchema: {\n type: String,\n optional: true,\n autoform: {\n group: 'customGroup', // assign custom group (fieldset) in Settings form\n private: true // mark as private (not published to client)\n }\n }\n}\naddToSettingsSchema.push(customSetting);\n\n// Global Function\n\nmyFunction = function (a, b) {\n return a + b;\n}","Meteor.startup(function () {\n \n Router.route('/custom-path', {\n name: 'customRoute',\n template: getTemplate('customTemplate')\n });\n\n});","Meteor.publish('customPublication', function (limit) {\n return Posts.find({}, {limit: limit});\n});","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nif(_.isUndefined(TAPi18n.translations[\"de\"])) {\n TAPi18n.translations[\"de\"] = {};\n}\n\nif(_.isUndefined(TAPi18n.translations[\"de\"][namespace])) {\n TAPi18n.translations[\"de\"][namespace] = {};\n}\n\n_.extend(TAPi18n.translations[\"de\"][namespace], {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n// integrate the fallback language translations \nTAPi18n.addResourceBundle(\"en\", namespace, {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nif(_.isUndefined(TAPi18n.translations[\"es\"])) {\n TAPi18n.translations[\"es\"] = {};\n}\n\nif(_.isUndefined(TAPi18n.translations[\"es\"][namespace])) {\n TAPi18n.translations[\"es\"][namespace] = {};\n}\n\n_.extend(TAPi18n.translations[\"es\"][namespace], {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nif(_.isUndefined(TAPi18n.translations[\"fr\"])) {\n TAPi18n.translations[\"fr\"] = {};\n}\n\nif(_.isUndefined(TAPi18n.translations[\"fr\"][namespace])) {\n TAPi18n.translations[\"fr\"][namespace] = {};\n}\n\n_.extend(TAPi18n.translations[\"fr\"][namespace], {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nif(_.isUndefined(TAPi18n.translations[\"it\"])) {\n TAPi18n.translations[\"it\"] = {};\n}\n\nif(_.isUndefined(TAPi18n.translations[\"it\"][namespace])) {\n TAPi18n.translations[\"it\"][namespace] = {};\n}\n\n_.extend(TAPi18n.translations[\"it\"][namespace], {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nif(_.isUndefined(TAPi18n.translations[\"zh-CN\"])) {\n TAPi18n.translations[\"zh-CN\"] = {};\n}\n\nif(_.isUndefined(TAPi18n.translations[\"zh-CN\"][namespace])) {\n TAPi18n.translations[\"zh-CN\"][namespace] = {};\n}\n\n_.extend(TAPi18n.translations[\"zh-CN\"][namespace], {\"translation_key\":\"translation string\"});\n"]} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-blank/package.js b/packages/nova-subscribe/.build.telescope-blank/package.js new file mode 100644 index 000000000..6c20521cb --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-blank/package.js @@ -0,0 +1 @@ +// This file is included for compatibility with the Meteor 0.6.4 package downloader. diff --git a/packages/nova-subscribe/.build.telescope-blank/unipackage.json b/packages/nova-subscribe/.build.telescope-blank/unipackage.json new file mode 100644 index 000000000..d46ab16a2 --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-blank/unipackage.json @@ -0,0 +1,23 @@ +{ + "name": "telescope-blank", + "summary": "Telescope blank package – use as template for your own packages", + "version": "0.1.0+6c017400b8a83109c230d8b5f2d91823df277f5f", + "earliestCompatibleVersion": "0.0.0", + "isTest": false, + "plugins": [], + "unibuilds": [ + { + "arch": "os", + "path": "os.json" + }, + { + "arch": "web.browser", + "path": "web.browser.json" + }, + { + "arch": "web.cordova", + "path": "web.cordova.json" + } + ], + "format": "unipackage-pre2" +} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-blank/web.browser.json b/packages/nova-subscribe/.build.telescope-blank/web.browser.json new file mode 100644 index 000000000..6b155188c --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-blank/web.browser.json @@ -0,0 +1,70 @@ +{ + "format": "unipackage-unibuild-pre1", + "packageVariables": [ + { + "name": "myFunction", + "export": true + }, + { + "name": "__" + }, + { + "name": "registerI18nTemplate" + }, + { + "name": "registerTemplate" + }, + { + "name": "non_package_templates" + } + ], + "uses": [ + { + "package": "meteor" + }, + { + "package": "tap:i18n" + }, + { + "package": "iron:router" + }, + { + "package": "telescope-base" + }, + { + "package": "telescope-lib" + }, + { + "package": "telescope-i18n" + }, + { + "package": "fourseven:scss" + }, + { + "package": "jquery" + }, + { + "package": "underscore" + }, + { + "package": "templating" + } + ], + "resources": [ + { + "type": "css", + "file": "web.browser/packages/telescope-blank/lib/client/scss/package.scss.css", + "length": 0, + "offset": 0, + "servePath": "/packages/telescope-blank/lib/client/scss/package.scss.css" + }, + { + "type": "prelink", + "file": "web.browser/packages/telescope-blank.js", + "length": 25168, + "offset": 0, + "servePath": "/packages/telescope-blank.js", + "sourceMap": "web.browser/packages/telescope-blank.js.map" + } + ] +} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-blank/web.browser/packages/telescope-blank.js b/packages/nova-subscribe/.build.telescope-blank/web.browser/packages/telescope-blank.js new file mode 100644 index 000000000..cc96fb9a0 --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-blank/web.browser/packages/telescope-blank.js @@ -0,0 +1,313 @@ +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/package-i18n.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +TAPi18n.packages["telescope-blank"] = {"translation_function_name":"__","helper_name":"_","namespace":"project"}; // 1 + // 2 +// define package's translation function (proxy to the i18next) // 3 +__ = TAPi18n._getPackageI18nextProxy("project"); // 4 +// define the package's templates registrar // 5 +registerI18nTemplate = TAPi18n._getRegisterHelpersProxy("telescope-blank"); // 6 +registerTemplate = registerI18nTemplate; // XXX OBSOLETE, kept for backward compatibility will be removed in the future + // 8 +// Record the list of templates prior to package load // 9 +var _ = Package.underscore._; // 10 +non_package_templates = _.keys(Template); // 11 + // 12 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/lib/both.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +// Custom Post Property // 1 + // 2 +var customProperty = { // 3 + propertyName: 'customProperty', // 4 + propertySchema: { // 5 + type: String, // property type // 6 + label: 'customLabel', // key string used for internationalization // 7 + optional: true, // make this property optional // 8 + autoform: { // 9 + editable: true, // make this property editable by users // 10 + type: "bootstrap-datetimepicker" // assign a custom input type // 11 + } // 12 + } // 13 +} // 14 +addToPostSchema.push(customProperty); // 15 + // 16 +// Custom Setting // 17 + // 18 +var customSetting = { // 19 + propertyName: 'customSetting', // 20 + propertySchema: { // 21 + type: String, // 22 + optional: true, // 23 + autoform: { // 24 + group: 'customGroup', // assign custom group (fieldset) in Settings form // 25 + private: true // mark as private (not published to client) // 26 + } // 27 + } // 28 +} // 29 +addToSettingsSchema.push(customSetting); // 30 + // 31 +// Global Function // 32 + // 33 +myFunction = function (a, b) { // 34 + return a + b; // 35 +} // 36 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/lib/routes.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +Meteor.startup(function () { // 1 + // 2 + Router.route('/custom-path', { // 3 + name: 'customRoute', // 4 + template: getTemplate('customTemplate') // 5 + }); // 6 + // 7 +}); // 8 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/lib/client/templates/template.template.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // + // 1 +Template.__checkName("customTemplate"); // 2 +Template["customTemplate"] = new Template("Template.customTemplate", (function() { // 3 + var view = this; // 4 + return [ "Hi there, ", Blaze.View(function() { // 5 + return Spacebars.mustache(view.lookup("name")); // 6 + }), "!" ]; // 7 +})); // 8 + // 9 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/lib/client/templates/template.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +Meteor.startup(function () { // 1 + // 2 + Template[getTemplate('customTemplate')].helpers({ // 3 + name: function () { // 4 + return "Bruce Willis"; // 5 + } // 6 + }); // 7 + // 8 +}); // 9 + // 10 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "telescope-blank", // 2 + namespace = "telescope-blank"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +var package_templates = _.difference(_.keys(Template), non_package_templates); // 8 + // 9 +for (var i = 0; i < package_templates.length; i++) { // 10 + var package_template = package_templates[i]; // 11 + // 12 + registerI18nTemplate(package_template); // 13 +} // 14 + // 15 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "telescope-blank", // 2 + namespace = "telescope-blank"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +// integrate the fallback language translations // 8 +TAPi18n.addResourceBundle("en", namespace, {"translation_key":"translation string"}); // 9 + // 10 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "telescope-blank", // 2 + namespace = "telescope-blank"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 + // 8 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "telescope-blank", // 2 + namespace = "telescope-blank"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 + // 8 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "telescope-blank", // 2 + namespace = "telescope-blank"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 + // 8 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "telescope-blank", // 2 + namespace = "telescope-blank"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 + // 8 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); diff --git a/packages/nova-subscribe/.build.telescope-blank/web.browser/packages/telescope-blank.js.map b/packages/nova-subscribe/.build.telescope-blank/web.browser/packages/telescope-blank.js.map new file mode 100644 index 000000000..b0ae4c4bc --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-blank/web.browser/packages/telescope-blank.js.map @@ -0,0 +1 @@ +{"version":3,"file":"/packages/telescope-blank.js","sources":["telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/package-tap.i18n","telescope-blank/lib/both.js","telescope-blank/lib/routes.js","telescope-blank/lib/client/templates/template.html","telescope-blank/lib/client/templates/template.js","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json"],"names":[],"mappings":";;;;;;;;AAAA,iH;;AAEA,+D;AACA,gD;AACA,2C;AACA,2E;AACA,uH;;AAEA,qD;AACA,6B;AACA,yC;;;;;;;;;;;;;;;;;;;ACVA,uB;;AAEA,sB;AACA,iC;AACA,mB;AACA,4D;AACA,uF;AACA,0E;AACA,e;AACA,mF;AACA,yE;AACA,K;AACA,G;AACA,C;AACA,qC;;AAEA,iB;;AAEA,qB;AACA,gC;AACA,mB;AACA,iB;AACA,mB;AACA,e;AACA,8F;AACA,wF;AACA,K;AACA,G;AACA,C;AACA,wC;;AAEA,kB;;AAEA,8B;AACA,e;AACA,C;;;;;;;;;;;;;;;;;;ACnCA,4B;AACA,E;AACA,gC;AACA,wB;AACA,2C;AACA,K;;AAEA,G;;;;;;;;;;;;;;;;;;;ACNA,uC;AACA,kF;AACA,kB;AACA,gD;AACA,mD;AACA,Y;AACA,I;;;;;;;;;;;;;;;;;;;ACPA,4B;;AAEA,mD;AACA,uB;AACA,4B;AACA,K;AACA,K;;AAEA,G;;;;;;;;;;;;;;;;;;;ACRA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;AACA,8E;;AAEA,oD;AACA,8C;;AAEA,yC;AACA,C;;;;;;;;;;;;;;;;;;;ACbA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;AACA,gD;AACA,qF;;;;;;;;;;;;;;;;;;;ACRA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;;;;;;;;;;;;;;;;;;;ACNA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;;;;;;;;;;;;;;;;;;;ACNA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;;;;;;;;;;;;;;;;;;;ACNA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C","sourcesContent":["TAPi18n.packages[\"telescope-blank\"] = {\"translation_function_name\":\"__\",\"helper_name\":\"_\",\"namespace\":\"project\"};\n\n// define package's translation function (proxy to the i18next)\n__ = TAPi18n._getPackageI18nextProxy(\"project\");\n// define the package's templates registrar\nregisterI18nTemplate = TAPi18n._getRegisterHelpersProxy(\"telescope-blank\");\nregisterTemplate = registerI18nTemplate; // XXX OBSOLETE, kept for backward compatibility will be removed in the future\n\n// Record the list of templates prior to package load\nvar _ = Package.underscore._;\nnon_package_templates = _.keys(Template);\n","// Custom Post Property\n\nvar customProperty = {\n propertyName: 'customProperty',\n propertySchema: {\n type: String, // property type\n label: 'customLabel', // key string used for internationalization\n optional: true, // make this property optional\n autoform: {\n editable: true, // make this property editable by users\n type: \"bootstrap-datetimepicker\" // assign a custom input type\n }\n }\n}\naddToPostSchema.push(customProperty);\n\n// Custom Setting\n\nvar customSetting = {\n propertyName: 'customSetting',\n propertySchema: {\n type: String,\n optional: true,\n autoform: {\n group: 'customGroup', // assign custom group (fieldset) in Settings form\n private: true // mark as private (not published to client)\n }\n }\n}\naddToSettingsSchema.push(customSetting);\n\n// Global Function\n\nmyFunction = function (a, b) {\n return a + b;\n}","Meteor.startup(function () {\n \n Router.route('/custom-path', {\n name: 'customRoute',\n template: getTemplate('customTemplate')\n });\n\n});","\nTemplate.__checkName(\"customTemplate\");\nTemplate[\"customTemplate\"] = new Template(\"Template.customTemplate\", (function() {\n var view = this;\n return [ \"Hi there, \", Blaze.View(function() {\n return Spacebars.mustache(view.lookup(\"name\"));\n }), \"!\" ];\n}));\n","Meteor.startup(function () {\n\n Template[getTemplate('customTemplate')].helpers({\n name: function () {\n return \"Bruce Willis\";\n }\n });\n\n});\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nvar package_templates = _.difference(_.keys(Template), non_package_templates);\n\nfor (var i = 0; i < package_templates.length; i++) {\n var package_template = package_templates[i];\n\n registerI18nTemplate(package_template);\n}\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n// integrate the fallback language translations \nTAPi18n.addResourceBundle(\"en\", namespace, {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n"]} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-blank/web.browser/packages/telescope-blank/lib/client/scss/package.scss.css b/packages/nova-subscribe/.build.telescope-blank/web.browser/packages/telescope-blank/lib/client/scss/package.scss.css new file mode 100644 index 000000000..e69de29bb diff --git a/packages/nova-subscribe/.build.telescope-blank/web.cordova.json b/packages/nova-subscribe/.build.telescope-blank/web.cordova.json new file mode 100644 index 000000000..be7324869 --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-blank/web.cordova.json @@ -0,0 +1,70 @@ +{ + "format": "unipackage-unibuild-pre1", + "packageVariables": [ + { + "name": "myFunction", + "export": true + }, + { + "name": "__" + }, + { + "name": "registerI18nTemplate" + }, + { + "name": "registerTemplate" + }, + { + "name": "non_package_templates" + } + ], + "uses": [ + { + "package": "meteor" + }, + { + "package": "tap:i18n" + }, + { + "package": "iron:router" + }, + { + "package": "telescope-base" + }, + { + "package": "telescope-lib" + }, + { + "package": "telescope-i18n" + }, + { + "package": "fourseven:scss" + }, + { + "package": "jquery" + }, + { + "package": "underscore" + }, + { + "package": "templating" + } + ], + "resources": [ + { + "type": "css", + "file": "web.cordova/packages/telescope-blank/lib/client/scss/package.scss.css", + "length": 0, + "offset": 0, + "servePath": "/packages/telescope-blank/lib/client/scss/package.scss.css" + }, + { + "type": "prelink", + "file": "web.cordova/packages/telescope-blank.js", + "length": 25168, + "offset": 0, + "servePath": "/packages/telescope-blank.js", + "sourceMap": "web.cordova/packages/telescope-blank.js.map" + } + ] +} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-blank/web.cordova/packages/telescope-blank.js b/packages/nova-subscribe/.build.telescope-blank/web.cordova/packages/telescope-blank.js new file mode 100644 index 000000000..cc96fb9a0 --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-blank/web.cordova/packages/telescope-blank.js @@ -0,0 +1,313 @@ +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/package-i18n.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +TAPi18n.packages["telescope-blank"] = {"translation_function_name":"__","helper_name":"_","namespace":"project"}; // 1 + // 2 +// define package's translation function (proxy to the i18next) // 3 +__ = TAPi18n._getPackageI18nextProxy("project"); // 4 +// define the package's templates registrar // 5 +registerI18nTemplate = TAPi18n._getRegisterHelpersProxy("telescope-blank"); // 6 +registerTemplate = registerI18nTemplate; // XXX OBSOLETE, kept for backward compatibility will be removed in the future + // 8 +// Record the list of templates prior to package load // 9 +var _ = Package.underscore._; // 10 +non_package_templates = _.keys(Template); // 11 + // 12 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/lib/both.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +// Custom Post Property // 1 + // 2 +var customProperty = { // 3 + propertyName: 'customProperty', // 4 + propertySchema: { // 5 + type: String, // property type // 6 + label: 'customLabel', // key string used for internationalization // 7 + optional: true, // make this property optional // 8 + autoform: { // 9 + editable: true, // make this property editable by users // 10 + type: "bootstrap-datetimepicker" // assign a custom input type // 11 + } // 12 + } // 13 +} // 14 +addToPostSchema.push(customProperty); // 15 + // 16 +// Custom Setting // 17 + // 18 +var customSetting = { // 19 + propertyName: 'customSetting', // 20 + propertySchema: { // 21 + type: String, // 22 + optional: true, // 23 + autoform: { // 24 + group: 'customGroup', // assign custom group (fieldset) in Settings form // 25 + private: true // mark as private (not published to client) // 26 + } // 27 + } // 28 +} // 29 +addToSettingsSchema.push(customSetting); // 30 + // 31 +// Global Function // 32 + // 33 +myFunction = function (a, b) { // 34 + return a + b; // 35 +} // 36 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/lib/routes.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +Meteor.startup(function () { // 1 + // 2 + Router.route('/custom-path', { // 3 + name: 'customRoute', // 4 + template: getTemplate('customTemplate') // 5 + }); // 6 + // 7 +}); // 8 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/lib/client/templates/template.template.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // + // 1 +Template.__checkName("customTemplate"); // 2 +Template["customTemplate"] = new Template("Template.customTemplate", (function() { // 3 + var view = this; // 4 + return [ "Hi there, ", Blaze.View(function() { // 5 + return Spacebars.mustache(view.lookup("name")); // 6 + }), "!" ]; // 7 +})); // 8 + // 9 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/lib/client/templates/template.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +Meteor.startup(function () { // 1 + // 2 + Template[getTemplate('customTemplate')].helpers({ // 3 + name: function () { // 4 + return "Bruce Willis"; // 5 + } // 6 + }); // 7 + // 8 +}); // 9 + // 10 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "telescope-blank", // 2 + namespace = "telescope-blank"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +var package_templates = _.difference(_.keys(Template), non_package_templates); // 8 + // 9 +for (var i = 0; i < package_templates.length; i++) { // 10 + var package_template = package_templates[i]; // 11 + // 12 + registerI18nTemplate(package_template); // 13 +} // 14 + // 15 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "telescope-blank", // 2 + namespace = "telescope-blank"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +// integrate the fallback language translations // 8 +TAPi18n.addResourceBundle("en", namespace, {"translation_key":"translation string"}); // 9 + // 10 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "telescope-blank", // 2 + namespace = "telescope-blank"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 + // 8 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "telescope-blank", // 2 + namespace = "telescope-blank"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 + // 8 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "telescope-blank", // 2 + namespace = "telescope-blank"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 + // 8 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "telescope-blank", // 2 + namespace = "telescope-blank"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 + // 8 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); diff --git a/packages/nova-subscribe/.build.telescope-blank/web.cordova/packages/telescope-blank.js.map b/packages/nova-subscribe/.build.telescope-blank/web.cordova/packages/telescope-blank.js.map new file mode 100644 index 000000000..b0ae4c4bc --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-blank/web.cordova/packages/telescope-blank.js.map @@ -0,0 +1 @@ +{"version":3,"file":"/packages/telescope-blank.js","sources":["telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/package-tap.i18n","telescope-blank/lib/both.js","telescope-blank/lib/routes.js","telescope-blank/lib/client/templates/template.html","telescope-blank/lib/client/templates/template.js","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json"],"names":[],"mappings":";;;;;;;;AAAA,iH;;AAEA,+D;AACA,gD;AACA,2C;AACA,2E;AACA,uH;;AAEA,qD;AACA,6B;AACA,yC;;;;;;;;;;;;;;;;;;;ACVA,uB;;AAEA,sB;AACA,iC;AACA,mB;AACA,4D;AACA,uF;AACA,0E;AACA,e;AACA,mF;AACA,yE;AACA,K;AACA,G;AACA,C;AACA,qC;;AAEA,iB;;AAEA,qB;AACA,gC;AACA,mB;AACA,iB;AACA,mB;AACA,e;AACA,8F;AACA,wF;AACA,K;AACA,G;AACA,C;AACA,wC;;AAEA,kB;;AAEA,8B;AACA,e;AACA,C;;;;;;;;;;;;;;;;;;ACnCA,4B;AACA,E;AACA,gC;AACA,wB;AACA,2C;AACA,K;;AAEA,G;;;;;;;;;;;;;;;;;;;ACNA,uC;AACA,kF;AACA,kB;AACA,gD;AACA,mD;AACA,Y;AACA,I;;;;;;;;;;;;;;;;;;;ACPA,4B;;AAEA,mD;AACA,uB;AACA,4B;AACA,K;AACA,K;;AAEA,G;;;;;;;;;;;;;;;;;;;ACRA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;AACA,8E;;AAEA,oD;AACA,8C;;AAEA,yC;AACA,C;;;;;;;;;;;;;;;;;;;ACbA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;AACA,gD;AACA,qF;;;;;;;;;;;;;;;;;;;ACRA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;;;;;;;;;;;;;;;;;;;ACNA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;;;;;;;;;;;;;;;;;;;ACNA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;;;;;;;;;;;;;;;;;;;ACNA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C","sourcesContent":["TAPi18n.packages[\"telescope-blank\"] = {\"translation_function_name\":\"__\",\"helper_name\":\"_\",\"namespace\":\"project\"};\n\n// define package's translation function (proxy to the i18next)\n__ = TAPi18n._getPackageI18nextProxy(\"project\");\n// define the package's templates registrar\nregisterI18nTemplate = TAPi18n._getRegisterHelpersProxy(\"telescope-blank\");\nregisterTemplate = registerI18nTemplate; // XXX OBSOLETE, kept for backward compatibility will be removed in the future\n\n// Record the list of templates prior to package load\nvar _ = Package.underscore._;\nnon_package_templates = _.keys(Template);\n","// Custom Post Property\n\nvar customProperty = {\n propertyName: 'customProperty',\n propertySchema: {\n type: String, // property type\n label: 'customLabel', // key string used for internationalization\n optional: true, // make this property optional\n autoform: {\n editable: true, // make this property editable by users\n type: \"bootstrap-datetimepicker\" // assign a custom input type\n }\n }\n}\naddToPostSchema.push(customProperty);\n\n// Custom Setting\n\nvar customSetting = {\n propertyName: 'customSetting',\n propertySchema: {\n type: String,\n optional: true,\n autoform: {\n group: 'customGroup', // assign custom group (fieldset) in Settings form\n private: true // mark as private (not published to client)\n }\n }\n}\naddToSettingsSchema.push(customSetting);\n\n// Global Function\n\nmyFunction = function (a, b) {\n return a + b;\n}","Meteor.startup(function () {\n \n Router.route('/custom-path', {\n name: 'customRoute',\n template: getTemplate('customTemplate')\n });\n\n});","\nTemplate.__checkName(\"customTemplate\");\nTemplate[\"customTemplate\"] = new Template(\"Template.customTemplate\", (function() {\n var view = this;\n return [ \"Hi there, \", Blaze.View(function() {\n return Spacebars.mustache(view.lookup(\"name\"));\n }), \"!\" ];\n}));\n","Meteor.startup(function () {\n\n Template[getTemplate('customTemplate')].helpers({\n name: function () {\n return \"Bruce Willis\";\n }\n });\n\n});\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nvar package_templates = _.difference(_.keys(Template), non_package_templates);\n\nfor (var i = 0; i < package_templates.length; i++) {\n var package_template = package_templates[i];\n\n registerI18nTemplate(package_template);\n}\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n// integrate the fallback language translations \nTAPi18n.addResourceBundle(\"en\", namespace, {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n"]} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-blank/web.cordova/packages/telescope-blank/lib/client/scss/package.scss.css b/packages/nova-subscribe/.build.telescope-blank/web.cordova/packages/telescope-blank/lib/client/scss/package.scss.css new file mode 100644 index 000000000..e69de29bb diff --git a/packages/nova-subscribe/.build.telescope-email/buildinfo.json b/packages/nova-subscribe/.build.telescope-email/buildinfo.json new file mode 100644 index 000000000..84b09ad01 --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-email/buildinfo.json @@ -0,0 +1,72 @@ +{ + "builtBy": "meteor/14", + "buildDependencies": { + "os.json": { + "files": { + "/Users/sacha/Dev/Telescope/packages/telescope-blank/package.js": "19170c0de8e8837b9116313ea4db890e0b4e7c62", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/.npm/package/npm-shrinkwrap.json": "437deca86f32425d4dd02e9d4ac7cd402ab1b257", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/server/email.js": "8ba42b8db30a63759428eba2b27ec4ae90e7a6f7", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/server/routes.js": "1ceba9acfe81f7d7bdf9343893fb39054f08b32c", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/server/templates/emailAccountApproved.handlebars": "5c8d2fbaa3c8b10c73830f7db3508bd5a8511cf8", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/server/templates/emailInvite.handlebars": "18d17b784319376a32443c15d70818eb0c05bb6f", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/server/templates/emailNewComment.handlebars": "a1980bb8f91f2046e2bfc90cda5dda634ff82e8d", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/server/templates/emailNewPost.handlebars": "294b0c796a1f22d16a7d22445084e9fdf9e68ef3", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/server/templates/emailNewReply.handlebars": "3dda93fea4bdcf71a50632752ab5a1c0f3aca368", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/server/templates/emailNewUser.handlebars": "44899f335a640000c1d7ab55db9bf9e02555d09b", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/server/templates/emailTest.handlebars": "f0c2ea7838072d20c3e8319673b24a928aed2425", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/server/templates/emailWrapper.handlebars": "9fba2c42cb243f25a4c77d17eddbfd484d1cf4ea", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4" + }, + "directories": [] + }, + "web.browser.json": { + "files": { + "/Users/sacha/Dev/Telescope/packages/telescope-blank/package.js": "19170c0de8e8837b9116313ea4db890e0b4e7c62", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/.npm/package/npm-shrinkwrap.json": "437deca86f32425d4dd02e9d4ac7cd402ab1b257", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4" + }, + "directories": [] + }, + "web.cordova.json": { + "files": { + "/Users/sacha/Dev/Telescope/packages/telescope-blank/package.js": "19170c0de8e8837b9116313ea4db890e0b4e7c62", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/.npm/package/npm-shrinkwrap.json": "437deca86f32425d4dd02e9d4ac7cd402ab1b257", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", + "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4" + }, + "directories": [] + } + }, + "pluginDependencies": { + "files": { + "/Users/sacha/Dev/Telescope/packages/telescope-blank/package.js": "19170c0de8e8837b9116313ea4db890e0b4e7c62" + }, + "directories": [] + }, + "source": "/Users/sacha/Dev/Telescope/packages/telescope-blank", + "buildTimeDirectDependencies": { + "telescope-i18n": "0.0.0+814e6fdbcab1588b923aaaa282cdda4873ee4ed7", + "tap:i18n": "1.2.1", + "telescope-lib": "0.2.9+a4deeda0719a0c6dd02042b6e69784b41ce7c1fe", + "cmather:handlebars-server": "2.0.0", + "iron:router": "1.0.1", + "meteor": "1.1.3", + "telescope-base": "0.0.0+0a39fb31ae7073e53d4f1c386732d5501a34b38f" + }, + "buildTimePluginDependencies": {}, + "cordovaDependencies": null +} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-email/isopack.json b/packages/nova-subscribe/.build.telescope-email/isopack.json new file mode 100644 index 000000000..de0089331 --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-email/isopack.json @@ -0,0 +1,24 @@ +{ + "isopack-1": { + "name": "telescope-email", + "summary": "Telescope email package", + "version": "0.2.9+0a592efc85d83db553743a37ef17747831a10a33", + "earliestCompatibleVersion": "0.0.0", + "isTest": false, + "builds": [ + { + "arch": "os", + "path": "os.json" + }, + { + "arch": "web.browser", + "path": "web.browser.json" + }, + { + "arch": "web.cordova", + "path": "web.cordova.json" + } + ], + "plugins": [] + } +} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-email/os.json b/packages/nova-subscribe/.build.telescope-email/os.json new file mode 100644 index 000000000..c6e841a2e --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-email/os.json @@ -0,0 +1,61 @@ +{ + "format": "unipackage-unibuild-pre1", + "packageVariables": [ + { + "name": "buildEmailTemplate", + "export": true + }, + { + "name": "sendEmail", + "export": true + }, + { + "name": "buildAndSendEmail", + "export": true + }, + { + "name": "getEmailTemplate", + "export": true + }, + { + "name": "html" + }, + { + "name": "Handlebars" + } + ], + "uses": [ + { + "package": "meteor" + }, + { + "package": "iron:router" + }, + { + "package": "telescope-base" + }, + { + "package": "telescope-lib" + }, + { + "package": "telescope-i18n" + }, + { + "package": "tap:i18n" + }, + { + "package": "cmather:handlebars-server" + } + ], + "node_modules": "npm/node_modules", + "resources": [ + { + "type": "prelink", + "file": "os/packages/telescope-email.js", + "length": 50123, + "offset": 0, + "servePath": "/packages/telescope-email.js", + "sourceMap": "os/packages/telescope-email.js.map" + } + ] +} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-email/os/packages/telescope-email.js b/packages/nova-subscribe/.build.telescope-email/os/packages/telescope-email.js new file mode 100644 index 000000000..ee572cce0 --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-email/os/packages/telescope-email.js @@ -0,0 +1,510 @@ +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/lib/server/email.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // + // 1 +var htmlToText = Npm.require('html-to-text'); // 2 + // 3 +// check if server-side template has been customized, and return the correct template // 4 +getEmailTemplate = function (template) { // 5 + var emailTemplate = Handlebars.templates[getTemplate(template)]; // 6 + if(typeof emailTemplate === 'function'){ // 7 + return Handlebars.templates[getTemplate(template)]; // 8 + } else { // 9 + console.log('Cannot find template '+getTemplate(template)+', defaulting to '+template); // 10 + return Handlebars.templates[template]; // 11 + } // 12 +} // 13 + // 14 +buildEmailTemplate = function (htmlContent) { // 15 + // 16 + var emailProperties = { // 17 + headerColor: getSetting('headerColor', '#444444'), // 18 + buttonColor: getSetting('buttonColor', '#DD3416'), // 19 + siteName: getSetting('title'), // 20 + tagline: getSetting('tagline'), // 21 + siteUrl: getSiteUrl(), // 22 + body: htmlContent, // 23 + unsubscribe: '', // 24 + accountLink: getSiteUrl()+'account', // 25 + footer: getSetting('emailFooter'), // 26 + logoUrl: getSetting('logoUrl'), // 27 + logoHeight: getSetting('logoHeight'), // 28 + logoWidth: getSetting('logoWidth') // 29 + } // 30 + // 31 + var emailHTML = Handlebars.templates[getTemplate('emailWrapper')](emailProperties); // 32 + // 33 + var inlinedHTML = Async.runSync(function(done) { // 34 + juice.juiceContent(emailHTML, { // 35 + url: getSiteUrl(), // 36 + removeStyleTags: false // 37 + }, function (error, result) { // 38 + done(null, result); // 39 + }); // 40 + }).result; // 41 + // 42 + var doctype = '' + // 44 + return doctype+inlinedHTML; // 45 +} // 46 + // 47 +sendEmail = function(to, subject, html, text){ // 48 + // 49 + // TODO: limit who can send emails // 50 + // TODO: fix this error: Error: getaddrinfo ENOTFOUND // 51 + // 52 + var from = getSetting('defaultEmail', 'noreply@example.com'); // 53 + var siteName = getSetting('title'); // 54 + var subject = '['+siteName+'] '+subject; // 55 + // 56 + if (typeof text == 'undefined'){ // 57 + // Auto-generate text version if it doesn't exist. Has bugs, but should be good enough. // 58 + var text = htmlToText.fromString(html, { // 59 + wordwrap: 130 // 60 + }); // 61 + } // 62 + // 63 + console.log('//////// sending email…'); // 64 + console.log('from: '+from); // 65 + console.log('to: '+to); // 66 + console.log('subject: '+subject); // 67 + // console.log('html: '+html); // 68 + // console.log('text: '+text); // 69 + // 70 + var email = { // 71 + from: from, // 72 + to: to, // 73 + subject: subject, // 74 + text: text, // 75 + html: html // 76 + } // 77 + // 78 + Email.send(email); // 79 + // 80 + return email; // 81 +}; // 82 + // 83 +buildAndSendEmail = function (to, subject, template, properties) { // 84 + var html = buildEmailTemplate(getEmailTemplate(template)(properties)); // 85 + return sendEmail (to, subject, html); // 86 +} // 87 + // 88 +Meteor.methods({ // 89 + testEmail: function () { // 90 + if(isAdminById(this.userId)){ // 91 + var email = buildAndSendEmail (getSetting('defaultEmail'), 'Telescope email test', 'emailTest', {date: new Date()}); + } // 93 + } // 94 +}) // 95 +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/lib/server/routes.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +Meteor.startup(function () { // 1 + // 2 + // New user email // 3 + // 4 + Router.route('/email/new-user/:id?', { // 5 + name: 'newUser', // 6 + where: 'server', // 7 + action: function() { // 8 + var user = Meteor.users.findOne(this.params.id); // 9 + var emailProperties = { // 10 + profileUrl: getProfileUrl(user), // 11 + username: getUserName(user) // 12 + }; // 13 + html = getEmailTemplate('emailNewUser')(emailProperties); // 14 + this.response.write(buildEmailTemplate(html)); // 15 + this.response.end(); // 16 + } // 17 + }); // 18 + // 19 + // New post email // 20 + // 21 + Router.route('/email/new-post/:id?', { // 22 + name: 'newPost', // 23 + where: 'server', // 24 + action: function() { // 25 + var post = Posts.findOne(this.params.id); // 26 + console.log(templates) // 27 + if (!!post) { // 28 + html = getEmailTemplate('emailNewPost')(getPostProperties(post)); // 29 + } else { // 30 + html = "

No post found.

" // 31 + } // 32 + this.response.write(buildEmailTemplate(html)); // 33 + this.response.end(); // 34 + } // 35 + }); // 36 + // 37 + // 38 +}); // 39 +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/lib/server/templates/handlebars.emailAccountApproved.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile("{{username}}, welcome to {{siteTitle}}!

\n\nYou've just been invited. Start posting.

");Handlebars.templates["emailAccountApproved"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: "emailAccountApproved"});}; +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/lib/server/templates/handlebars.emailInvite.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile("\n{{invitedBy}}\ninvited you to join {{communityName}}\n

\n\n{{#if newUser}}\nJoin {{communityName}}\n{{else}}\nSign in to {{communityName}}\n{{/if}}\n

\n");Handlebars.templates["emailInvite"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: "emailInvite"});}; +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/lib/server/templates/handlebars.emailNewComment.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile("\n{{comment.author}}\nleft a new comment on \n{{post.title}}:\n\n

\n\n
\n{{{body}}}\n
\n
\n\nDiscuss

");Handlebars.templates["emailNewComment"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: "emailNewComment"});}; +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/lib/server/templates/handlebars.emailNewPost.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile("\n{{postAuthorName}}\nhas created a new post:\n{{#if url}}\n {{postTitle}}}\n{{else}}\n {{postTitle}}}\n{{/if}}\n

\n\n{{#if body}}\n
\n {{{body}}}\n
\n
\n{{/if}}\n\nDiscuss

");Handlebars.templates["emailNewPost"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: "emailNewPost"});}; +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/lib/server/templates/handlebars.emailNewReply.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile("{{comment.author}}\nhas replied to your comment on\n{{post.title}}:\n\n

\n\n
\n{{{body}}}\n
\n
\n\nDiscuss

");Handlebars.templates["emailNewReply"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: "emailNewReply"});}; +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/lib/server/templates/handlebars.emailNewUser.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile("A new user account has been created: {{username}}

");Handlebars.templates["emailNewUser"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: "emailNewUser"});}; +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/lib/server/templates/handlebars.emailTest.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile("This is just a test

\n\nSent at {{date}}.

");Handlebars.templates["emailTest"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: "emailTest"});}; +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/lib/server/templates/handlebars.emailWrapper.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile("\n\n \n \n \n\n {{siteName}}\n \n\n\n\n
\n\n\n\n \n \n \n
\n\n \n \n \n \n \n \n \n \n \n \n \n
\n {{#if logoUrl}}\n \"{{siteName}}\"/\n {{else}}\n {{siteName}}\n {{/if}}\n
\n
\n\n {{{body}}}\n\n
\n Change your notifications settings

\n {{{footer}}}\n
\n \n\n
\n\n
\n
\n\n\n");Handlebars.templates["emailWrapper"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: "emailWrapper"});}; +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "project", // 2 + namespace = "project"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +TAPi18n.languages_available_for_project["de"] = ["German","Deutsch"]; // 8 +TAPi18n._enable({"helper_name":"_","supported_languages":null,"i18n_files_route":"/tap-i18n","cdn_path":null}); // 9 +TAPi18n.languages_available_for_project["en"] = ["English","English"]; // 10 +if(_.isUndefined(TAPi18n.translations["de"])) { // 11 + TAPi18n.translations["de"] = {}; // 12 +} // 13 + // 14 +if(_.isUndefined(TAPi18n.translations["de"][namespace])) { // 15 + TAPi18n.translations["de"][namespace] = {}; // 16 +} // 17 + // 18 +_.extend(TAPi18n.translations["de"][namespace], {"translation_key":"translation string"}); // 19 + // 20 +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "project", // 2 + namespace = "project"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +// integrate the fallback language translations // 8 +TAPi18n.addResourceBundle("en", namespace, {"translation_key":"translation string"}); // 9 + // 10 +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "project", // 2 + namespace = "project"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +TAPi18n.languages_available_for_project["es"] = ["Spanish (Spain)","Español"]; // 8 +if(_.isUndefined(TAPi18n.translations["es"])) { // 9 + TAPi18n.translations["es"] = {}; // 10 +} // 11 + // 12 +if(_.isUndefined(TAPi18n.translations["es"][namespace])) { // 13 + TAPi18n.translations["es"][namespace] = {}; // 14 +} // 15 + // 16 +_.extend(TAPi18n.translations["es"][namespace], {"translation_key":"translation string"}); // 17 + // 18 +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "project", // 2 + namespace = "project"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +TAPi18n.languages_available_for_project["fr"] = ["French (France)","Français"]; // 8 +if(_.isUndefined(TAPi18n.translations["fr"])) { // 9 + TAPi18n.translations["fr"] = {}; // 10 +} // 11 + // 12 +if(_.isUndefined(TAPi18n.translations["fr"][namespace])) { // 13 + TAPi18n.translations["fr"][namespace] = {}; // 14 +} // 15 + // 16 +_.extend(TAPi18n.translations["fr"][namespace], {"translation_key":"translation string"}); // 17 + // 18 +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "project", // 2 + namespace = "project"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +TAPi18n.languages_available_for_project["it"] = ["Italian","Italiano"]; // 8 +if(_.isUndefined(TAPi18n.translations["it"])) { // 9 + TAPi18n.translations["it"] = {}; // 10 +} // 11 + // 12 +if(_.isUndefined(TAPi18n.translations["it"][namespace])) { // 13 + TAPi18n.translations["it"][namespace] = {}; // 14 +} // 15 + // 16 +_.extend(TAPi18n.translations["it"][namespace], {"translation_key":"translation string"}); // 17 + // 18 +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "project", // 2 + namespace = "project"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +TAPi18n.languages_available_for_project["zh-CN"] = ["zh-CN","zh-CN"]; // 8 +if(_.isUndefined(TAPi18n.translations["zh-CN"])) { // 9 + TAPi18n.translations["zh-CN"] = {}; // 10 +} // 11 + // 12 +if(_.isUndefined(TAPi18n.translations["zh-CN"][namespace])) { // 13 + TAPi18n.translations["zh-CN"][namespace] = {}; // 14 +} // 15 + // 16 +_.extend(TAPi18n.translations["zh-CN"][namespace], {"translation_key":"translation string"}); // 17 + // 18 +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); diff --git a/packages/nova-subscribe/.build.telescope-email/os/packages/telescope-email.js.map b/packages/nova-subscribe/.build.telescope-email/os/packages/telescope-email.js.map new file mode 100644 index 000000000..c5c789241 --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-email/os/packages/telescope-email.js.map @@ -0,0 +1 @@ +{"version":3,"file":"/packages/telescope-email.js","sources":["telescope-email/lib/server/email.js","telescope-email/lib/server/routes.js","telescope-email/lib/server/templates/emailAccountApproved.handlebars","telescope-email/lib/server/templates/emailInvite.handlebars","telescope-email/lib/server/templates/emailNewComment.handlebars","telescope-email/lib/server/templates/emailNewPost.handlebars","telescope-email/lib/server/templates/emailNewReply.handlebars","telescope-email/lib/server/templates/emailNewUser.handlebars","telescope-email/lib/server/templates/emailTest.handlebars","telescope-email/lib/server/templates/emailWrapper.handlebars","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json"],"names":[],"mappings":";;;;;;;;;AACA,6C;;AAEA,qF;AACA,wC;AACA,kE;AACA,0C;AACA,uD;AACA,U;AACA,2F;AACA,0C;AACA,G;AACA,C;;AAEA,6C;;AAEA,yB;AACA,sD;AACA,sD;AACA,kC;AACA,mC;AACA,0B;AACA,sB;AACA,oB;AACA,wC;AACA,sC;AACA,mC;AACA,yC;AACA,sC;AACA,G;;AAEA,qF;;AAEA,kD;AACA,mC;AACA,wB;AACA,4B;AACA,iC;AACA,yB;AACA,O;AACA,Y;;AAEA,wH;AACA,E;AACA,6B;AACA,C;;AAEA,8C;;AAEA,oC;AACA,uD;AACA,E;AACA,+D;AACA,qC;AACA,0C;;AAEA,kC;AACA,4F;AACA,4C;AACA,qB;AACA,O;AACA,G;;AAEA,yC;AACA,6B;AACA,yB;AACA,mC;AACA,gC;AACA,gC;;AAEA,e;AACA,gB;AACA,Y;AACA,sB;AACA,e;AACA,c;AACA,G;;AAEA,oB;;AAEA,e;AACA,E;;AAEA,kE;AACA,wE;AACA,uC;AACA,C;;AAEA,gB;AACA,0B;AACA,iC;AACA,0H;AACA,K;AACA,G;AACA,E;;;;;;;;;;;;;;;;;;AC9FA,4B;;AAEA,mB;;AAEA,wC;AACA,oB;AACA,oB;AACA,wB;AACA,sD;AACA,6B;AACA,wC;AACA,mC;AACA,Q;AACA,+D;AACA,oD;AACA,0B;AACA,K;AACA,K;;AAEA,mB;;AAEA,wC;AACA,oB;AACA,oB;AACA,wB;AACA,+C;AACA,4B;AACA,mB;AACA,yE;AACA,c;AACA,wC;AACA,O;AACA,oD;AACA,0B;AACA,K;AACA,K;;;AAGA,G;;;;;;;;;;;;;;;;;;ACtCA,0f;;;;;;;;;;;;;;;;;;ACAA,8mB;;;;;;;;;;;;;;;;;;ACAA,spB;;;;;;;;;;;;;;;;;;ACAA,4rB;;;;;;;;;;;;;;;;;;ACAA,wpB;;;;;;;;;;;;;;;;;;ACAA,mc;;;;;;;;;;;;;;;;;;ACAA,6Z;;;;;;;;;;;;;;;;;;ACAA,2tJ;;;;;;;;;;;;;;;;;;ACAA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,qE;AACA,+G;AACA,sE;AACA,+C;AACA,kC;AACA,C;;AAEA,0D;AACA,6C;AACA,C;;AAEA,0F;;;;;;;;;;;;;;;;;;;AClBA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,gD;AACA,qF;;;;;;;;;;;;;;;;;;;ACRA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,8E;AACA,+C;AACA,kC;AACA,C;;AAEA,0D;AACA,6C;AACA,C;;AAEA,0F;;;;;;;;;;;;;;;;;;;AChBA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,+E;AACA,+C;AACA,kC;AACA,C;;AAEA,0D;AACA,6C;AACA,C;;AAEA,0F;;;;;;;;;;;;;;;;;;;AChBA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,uE;AACA,+C;AACA,kC;AACA,C;;AAEA,0D;AACA,6C;AACA,C;;AAEA,0F;;;;;;;;;;;;;;;;;;;AChBA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,qE;AACA,kD;AACA,qC;AACA,C;;AAEA,6D;AACA,gD;AACA,C;;AAEA,6F","sourcesContent":["\nvar htmlToText = Npm.require('html-to-text');\n\n// check if server-side template has been customized, and return the correct template\ngetEmailTemplate = function (template) {\n var emailTemplate = Handlebars.templates[getTemplate(template)];\n if(typeof emailTemplate === 'function'){\n return Handlebars.templates[getTemplate(template)];\n } else {\n console.log('Cannot find template '+getTemplate(template)+', defaulting to '+template);\n return Handlebars.templates[template];\n }\n}\n\nbuildEmailTemplate = function (htmlContent) {\n\n var emailProperties = {\n headerColor: getSetting('headerColor', '#444444'),\n buttonColor: getSetting('buttonColor', '#DD3416'),\n siteName: getSetting('title'),\n tagline: getSetting('tagline'),\n siteUrl: getSiteUrl(),\n body: htmlContent,\n unsubscribe: '',\n accountLink: getSiteUrl()+'account',\n footer: getSetting('emailFooter'),\n logoUrl: getSetting('logoUrl'),\n logoHeight: getSetting('logoHeight'),\n logoWidth: getSetting('logoWidth')\n }\n\n var emailHTML = Handlebars.templates[getTemplate('emailWrapper')](emailProperties);\n\n var inlinedHTML = Async.runSync(function(done) {\n juice.juiceContent(emailHTML, {\n url: getSiteUrl(),\n removeStyleTags: false\n }, function (error, result) {\n done(null, result);\n });\n }).result;\n\n var doctype = ''\n \n return doctype+inlinedHTML;\n}\n\nsendEmail = function(to, subject, html, text){\n\n // TODO: limit who can send emails\n // TODO: fix this error: Error: getaddrinfo ENOTFOUND\n \n var from = getSetting('defaultEmail', 'noreply@example.com');\n var siteName = getSetting('title');\n var subject = '['+siteName+'] '+subject;\n\n if (typeof text == 'undefined'){\n // Auto-generate text version if it doesn't exist. Has bugs, but should be good enough. \n var text = htmlToText.fromString(html, {\n wordwrap: 130\n });\n }\n\n console.log('//////// sending email…');\n console.log('from: '+from);\n console.log('to: '+to);\n console.log('subject: '+subject);\n // console.log('html: '+html);\n // console.log('text: '+text);\n\n var email = {\n from: from, \n to: to, \n subject: subject, \n text: text,\n html: html\n }\n\n Email.send(email);\n\n return email;\n};\n\nbuildAndSendEmail = function (to, subject, template, properties) {\n var html = buildEmailTemplate(getEmailTemplate(template)(properties));\n return sendEmail (to, subject, html);\n}\n\nMeteor.methods({\n testEmail: function () {\n if(isAdminById(this.userId)){\n var email = buildAndSendEmail (getSetting('defaultEmail'), 'Telescope email test', 'emailTest', {date: new Date()});\n }\n }\n})","Meteor.startup(function () {\n\n // New user email\n\n Router.route('/email/new-user/:id?', {\n name: 'newUser',\n where: 'server',\n action: function() {\n var user = Meteor.users.findOne(this.params.id);\n var emailProperties = {\n profileUrl: getProfileUrl(user),\n username: getUserName(user)\n };\n html = getEmailTemplate('emailNewUser')(emailProperties);\n this.response.write(buildEmailTemplate(html));\n this.response.end();\n }\n });\n\n // New post email\n\n Router.route('/email/new-post/:id?', {\n name: 'newPost',\n where: 'server',\n action: function() {\n var post = Posts.findOne(this.params.id);\n console.log(templates)\n if (!!post) {\n html = getEmailTemplate('emailNewPost')(getPostProperties(post));\n } else {\n html = \"

No post found.

\"\n }\n this.response.write(buildEmailTemplate(html));\n this.response.end();\n }\n });\n\n\n});","Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile(\"{{username}}, welcome to {{siteTitle}}!

\\n\\nYou've just been invited. Start posting.

\");Handlebars.templates[\"emailAccountApproved\"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: \"emailAccountApproved\"});};","Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile(\"\\n{{invitedBy}}\\ninvited you to join {{communityName}}\\n

\\n\\n{{#if newUser}}\\nJoin {{communityName}}\\n{{else}}\\nSign in to {{communityName}}\\n{{/if}}\\n

\\n\");Handlebars.templates[\"emailInvite\"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: \"emailInvite\"});};","Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile(\"\\n{{comment.author}}\\nleft a new comment on \\n{{post.title}}:\\n\\n

\\n\\n
\\n{{{body}}}\\n
\\n
\\n\\nDiscuss

\");Handlebars.templates[\"emailNewComment\"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: \"emailNewComment\"});};","Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile(\"\\n{{postAuthorName}}\\nhas created a new post:\\n{{#if url}}\\n {{postTitle}}}\\n{{else}}\\n {{postTitle}}}\\n{{/if}}\\n

\\n\\n{{#if body}}\\n
\\n {{{body}}}\\n
\\n
\\n{{/if}}\\n\\nDiscuss

\");Handlebars.templates[\"emailNewPost\"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: \"emailNewPost\"});};","Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile(\"{{comment.author}}\\nhas replied to your comment on\\n{{post.title}}:\\n\\n

\\n\\n
\\n{{{body}}}\\n
\\n
\\n\\nDiscuss

\");Handlebars.templates[\"emailNewReply\"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: \"emailNewReply\"});};","Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile(\"A new user account has been created: {{username}}

\");Handlebars.templates[\"emailNewUser\"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: \"emailNewUser\"});};","Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile(\"This is just a test

\\n\\nSent at {{date}}.

\");Handlebars.templates[\"emailTest\"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: \"emailTest\"});};","Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile(\"\\n\\n \\n \\n \\n\\n {{siteName}}\\n \\n\\n\\n\\n
\\n\\n\\n\\n \\n \\n \\n
\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
\\n {{#if logoUrl}}\\n \\\"{{siteName}}\\\"/\\n {{else}}\\n {{siteName}}\\n {{/if}}\\n
\\n
\\n\\n {{{body}}}\\n\\n
\\n Change your notifications settings

\\n {{{footer}}}\\n
\\n \\n\\n
\\n\\n
\\n
\\n\\n\\n\");Handlebars.templates[\"emailWrapper\"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: \"emailWrapper\"});};","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"de\"] = [\"German\",\"Deutsch\"];\nTAPi18n._enable({\"helper_name\":\"_\",\"supported_languages\":null,\"i18n_files_route\":\"/tap-i18n\",\"cdn_path\":null});\nTAPi18n.languages_available_for_project[\"en\"] = [\"English\",\"English\"];\nif(_.isUndefined(TAPi18n.translations[\"de\"])) {\n TAPi18n.translations[\"de\"] = {};\n}\n\nif(_.isUndefined(TAPi18n.translations[\"de\"][namespace])) {\n TAPi18n.translations[\"de\"][namespace] = {};\n}\n\n_.extend(TAPi18n.translations[\"de\"][namespace], {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n// integrate the fallback language translations \nTAPi18n.addResourceBundle(\"en\", namespace, {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"es\"] = [\"Spanish (Spain)\",\"Español\"];\nif(_.isUndefined(TAPi18n.translations[\"es\"])) {\n TAPi18n.translations[\"es\"] = {};\n}\n\nif(_.isUndefined(TAPi18n.translations[\"es\"][namespace])) {\n TAPi18n.translations[\"es\"][namespace] = {};\n}\n\n_.extend(TAPi18n.translations[\"es\"][namespace], {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"fr\"] = [\"French (France)\",\"Français\"];\nif(_.isUndefined(TAPi18n.translations[\"fr\"])) {\n TAPi18n.translations[\"fr\"] = {};\n}\n\nif(_.isUndefined(TAPi18n.translations[\"fr\"][namespace])) {\n TAPi18n.translations[\"fr\"][namespace] = {};\n}\n\n_.extend(TAPi18n.translations[\"fr\"][namespace], {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"it\"] = [\"Italian\",\"Italiano\"];\nif(_.isUndefined(TAPi18n.translations[\"it\"])) {\n TAPi18n.translations[\"it\"] = {};\n}\n\nif(_.isUndefined(TAPi18n.translations[\"it\"][namespace])) {\n TAPi18n.translations[\"it\"][namespace] = {};\n}\n\n_.extend(TAPi18n.translations[\"it\"][namespace], {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"zh-CN\"] = [\"zh-CN\",\"zh-CN\"];\nif(_.isUndefined(TAPi18n.translations[\"zh-CN\"])) {\n TAPi18n.translations[\"zh-CN\"] = {};\n}\n\nif(_.isUndefined(TAPi18n.translations[\"zh-CN\"][namespace])) {\n TAPi18n.translations[\"zh-CN\"][namespace] = {};\n}\n\n_.extend(TAPi18n.translations[\"zh-CN\"][namespace], {\"translation_key\":\"translation string\"});\n"]} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-email/package.js b/packages/nova-subscribe/.build.telescope-email/package.js new file mode 100644 index 000000000..6c20521cb --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-email/package.js @@ -0,0 +1 @@ +// This file is included for compatibility with the Meteor 0.6.4 package downloader. diff --git a/packages/nova-subscribe/.build.telescope-email/unipackage.json b/packages/nova-subscribe/.build.telescope-email/unipackage.json new file mode 100644 index 000000000..ef8dcf868 --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-email/unipackage.json @@ -0,0 +1,23 @@ +{ + "name": "telescope-email", + "summary": "Telescope email package", + "version": "0.2.9+0a592efc85d83db553743a37ef17747831a10a33", + "earliestCompatibleVersion": "0.0.0", + "isTest": false, + "plugins": [], + "unibuilds": [ + { + "arch": "os", + "path": "os.json" + }, + { + "arch": "web.browser", + "path": "web.browser.json" + }, + { + "arch": "web.cordova", + "path": "web.cordova.json" + } + ], + "format": "unipackage-pre2" +} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-email/web.browser.json b/packages/nova-subscribe/.build.telescope-email/web.browser.json new file mode 100644 index 000000000..999590652 --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-email/web.browser.json @@ -0,0 +1,51 @@ +{ + "format": "unipackage-unibuild-pre1", + "packageVariables": [ + { + "name": "buildEmailTemplate", + "export": true + }, + { + "name": "sendEmail", + "export": true + }, + { + "name": "buildAndSendEmail", + "export": true + }, + { + "name": "getEmailTemplate", + "export": true + } + ], + "uses": [ + { + "package": "meteor" + }, + { + "package": "iron:router" + }, + { + "package": "telescope-base" + }, + { + "package": "telescope-lib" + }, + { + "package": "telescope-i18n" + }, + { + "package": "tap:i18n" + } + ], + "resources": [ + { + "type": "prelink", + "file": "web.browser/packages/telescope-email.js", + "length": 11726, + "offset": 0, + "servePath": "/packages/telescope-email.js", + "sourceMap": "web.browser/packages/telescope-email.js.map" + } + ] +} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-email/web.browser/packages/telescope-email.js b/packages/nova-subscribe/.build.telescope-email/web.browser/packages/telescope-email.js new file mode 100644 index 000000000..4fbf92296 --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-email/web.browser/packages/telescope-email.js @@ -0,0 +1,153 @@ +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "project", // 2 + namespace = "project"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +TAPi18n.languages_available_for_project["de"] = ["German","Deutsch"]; // 8 +TAPi18n._enable({"helper_name":"_","supported_languages":null,"i18n_files_route":"/tap-i18n","cdn_path":null}); // 9 +TAPi18n.languages_available_for_project["en"] = ["English","English"]; // 10 + // 11 +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "project", // 2 + namespace = "project"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +// integrate the fallback language translations // 8 +TAPi18n.addResourceBundle("en", namespace, {"translation_key":"translation string"}); // 9 + // 10 +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "project", // 2 + namespace = "project"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +TAPi18n.languages_available_for_project["es"] = ["Spanish (Spain)","Español"]; // 8 + // 9 +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "project", // 2 + namespace = "project"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +TAPi18n.languages_available_for_project["fr"] = ["French (France)","Français"]; // 8 + // 9 +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "project", // 2 + namespace = "project"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +TAPi18n.languages_available_for_project["it"] = ["Italian","Italiano"]; // 8 + // 9 +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "project", // 2 + namespace = "project"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +TAPi18n.languages_available_for_project["zh-CN"] = ["zh-CN","zh-CN"]; // 8 + // 9 +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); diff --git a/packages/nova-subscribe/.build.telescope-email/web.browser/packages/telescope-email.js.map b/packages/nova-subscribe/.build.telescope-email/web.browser/packages/telescope-email.js.map new file mode 100644 index 000000000..dafe308fd --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-email/web.browser/packages/telescope-email.js.map @@ -0,0 +1 @@ +{"version":3,"file":"/packages/telescope-email.js","sources":["telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json"],"names":[],"mappings":";;;;;;;;AAAA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,qE;AACA,+G;AACA,sE;;;;;;;;;;;;;;;;;;;ACTA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,gD;AACA,qF;;;;;;;;;;;;;;;;;;;ACRA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,8E;;;;;;;;;;;;;;;;;;;ACPA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,+E;;;;;;;;;;;;;;;;;;;ACPA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,uE;;;;;;;;;;;;;;;;;;;ACPA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,qE","sourcesContent":["var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"de\"] = [\"German\",\"Deutsch\"];\nTAPi18n._enable({\"helper_name\":\"_\",\"supported_languages\":null,\"i18n_files_route\":\"/tap-i18n\",\"cdn_path\":null});\nTAPi18n.languages_available_for_project[\"en\"] = [\"English\",\"English\"];\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n// integrate the fallback language translations \nTAPi18n.addResourceBundle(\"en\", namespace, {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"es\"] = [\"Spanish (Spain)\",\"Español\"];\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"fr\"] = [\"French (France)\",\"Français\"];\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"it\"] = [\"Italian\",\"Italiano\"];\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"zh-CN\"] = [\"zh-CN\",\"zh-CN\"];\n"]} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-email/web.cordova.json b/packages/nova-subscribe/.build.telescope-email/web.cordova.json new file mode 100644 index 000000000..205364255 --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-email/web.cordova.json @@ -0,0 +1,51 @@ +{ + "format": "unipackage-unibuild-pre1", + "packageVariables": [ + { + "name": "buildEmailTemplate", + "export": true + }, + { + "name": "sendEmail", + "export": true + }, + { + "name": "buildAndSendEmail", + "export": true + }, + { + "name": "getEmailTemplate", + "export": true + } + ], + "uses": [ + { + "package": "meteor" + }, + { + "package": "iron:router" + }, + { + "package": "telescope-base" + }, + { + "package": "telescope-lib" + }, + { + "package": "telescope-i18n" + }, + { + "package": "tap:i18n" + } + ], + "resources": [ + { + "type": "prelink", + "file": "web.cordova/packages/telescope-email.js", + "length": 11726, + "offset": 0, + "servePath": "/packages/telescope-email.js", + "sourceMap": "web.cordova/packages/telescope-email.js.map" + } + ] +} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-email/web.cordova/packages/telescope-email.js b/packages/nova-subscribe/.build.telescope-email/web.cordova/packages/telescope-email.js new file mode 100644 index 000000000..4fbf92296 --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-email/web.cordova/packages/telescope-email.js @@ -0,0 +1,153 @@ +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "project", // 2 + namespace = "project"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +TAPi18n.languages_available_for_project["de"] = ["German","Deutsch"]; // 8 +TAPi18n._enable({"helper_name":"_","supported_languages":null,"i18n_files_route":"/tap-i18n","cdn_path":null}); // 9 +TAPi18n.languages_available_for_project["en"] = ["English","English"]; // 10 + // 11 +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "project", // 2 + namespace = "project"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +// integrate the fallback language translations // 8 +TAPi18n.addResourceBundle("en", namespace, {"translation_key":"translation string"}); // 9 + // 10 +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "project", // 2 + namespace = "project"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +TAPi18n.languages_available_for_project["es"] = ["Spanish (Spain)","Español"]; // 8 + // 9 +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "project", // 2 + namespace = "project"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +TAPi18n.languages_available_for_project["fr"] = ["French (France)","Français"]; // 8 + // 9 +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "project", // 2 + namespace = "project"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +TAPi18n.languages_available_for_project["it"] = ["Italian","Italiano"]; // 8 + // 9 +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); + + + + + + +(function () { + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var _ = Package.underscore._, // 1 + package_name = "project", // 2 + namespace = "project"; // 3 + // 4 +if (package_name != "project") { // 5 + namespace = TAPi18n.packages[package_name].namespace; // 6 +} // 7 +TAPi18n.languages_available_for_project["zh-CN"] = ["zh-CN","zh-CN"]; // 8 + // 9 +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +}).call(this); diff --git a/packages/nova-subscribe/.build.telescope-email/web.cordova/packages/telescope-email.js.map b/packages/nova-subscribe/.build.telescope-email/web.cordova/packages/telescope-email.js.map new file mode 100644 index 000000000..dafe308fd --- /dev/null +++ b/packages/nova-subscribe/.build.telescope-email/web.cordova/packages/telescope-email.js.map @@ -0,0 +1 @@ +{"version":3,"file":"/packages/telescope-email.js","sources":["telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json"],"names":[],"mappings":";;;;;;;;AAAA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,qE;AACA,+G;AACA,sE;;;;;;;;;;;;;;;;;;;ACTA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,gD;AACA,qF;;;;;;;;;;;;;;;;;;;ACRA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,8E;;;;;;;;;;;;;;;;;;;ACPA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,+E;;;;;;;;;;;;;;;;;;;ACPA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,uE;;;;;;;;;;;;;;;;;;;ACPA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,qE","sourcesContent":["var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"de\"] = [\"German\",\"Deutsch\"];\nTAPi18n._enable({\"helper_name\":\"_\",\"supported_languages\":null,\"i18n_files_route\":\"/tap-i18n\",\"cdn_path\":null});\nTAPi18n.languages_available_for_project[\"en\"] = [\"English\",\"English\"];\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n// integrate the fallback language translations \nTAPi18n.addResourceBundle(\"en\", namespace, {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"es\"] = [\"Spanish (Spain)\",\"Español\"];\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"fr\"] = [\"French (France)\",\"Français\"];\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"it\"] = [\"Italian\",\"Italiano\"];\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"zh-CN\"] = [\"zh-CN\",\"zh-CN\"];\n"]} \ No newline at end of file diff --git a/packages/nova-subscribe/.gitignore b/packages/nova-subscribe/.gitignore deleted file mode 100644 index 677a6fc26..000000000 --- a/packages/nova-subscribe/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.build* diff --git a/packages/nova-subscribe/.versions b/packages/nova-subscribe/.versions deleted file mode 100644 index 882a6205c..000000000 --- a/packages/nova-subscribe/.versions +++ /dev/null @@ -1,69 +0,0 @@ -accounts-base@1.2.0 -aldeed:autoform@5.1.2 -aldeed:simple-schema@1.3.2 -base64@1.0.3 -binary-heap@1.0.3 -blaze@2.1.2 -blaze-tools@1.0.3 -boilerplate-generator@1.0.3 -callback-hook@1.0.3 -cfs:http-methods@0.0.28 -check@1.0.5 -cmather:handlebars-server@0.2.0 -coffeescript@1.0.6 -ddp@1.1.0 -deps@1.0.7 -ejson@1.0.6 -fourseven:scss@2.1.1 -geojson-utils@1.0.3 -handlebars@1.0.3 -html-tools@1.0.4 -htmljs@1.0.4 -id-map@1.0.3 -iron:controller@1.0.7 -iron:core@1.0.7 -iron:dynamic-template@1.0.7 -iron:layout@1.0.7 -iron:location@1.0.7 -iron:middleware-stack@1.0.7 -iron:router@1.0.7 -iron:url@1.0.7 -jquery@1.11.3_2 -json@1.0.3 -kestanous:herald@1.3.0 -kestanous:herald-email@0.5.0 -livedata@1.0.13 -localstorage@1.0.3 -logging@1.0.7 -meteor@1.1.6 -minifiers@1.1.5 -minimongo@1.0.8 -momentjs:moment@2.8.4 -mongo@1.1.0 -observe-sequence@1.0.6 -ordered-dict@1.0.3 -random@1.0.3 -reactive-dict@1.1.0 -reactive-var@1.0.5 -retry@1.0.3 -routepolicy@1.0.5 -service-configuration@1.0.4 -session@1.1.0 -spacebars@1.0.6 -spacebars-compiler@1.0.6 -tap:i18n@1.4.1 -nova:email@0.3.0 -nova:i18n@0.1.0 -nova:lib@0.3.1 -nova:messages@0.1.0 -nova:notifications@0.1.0 -nova:posts@0.1.2 -nova:settings@0.1.0 -nova:subscribe-to-posts@0.1.0 -nova:users@0.1.0 -templating@1.1.1 -tracker@1.0.7 -ui@1.0.6 -underscore@1.0.3 -webapp@1.2.0 -webapp-hashing@1.0.3 diff --git a/packages/nova-subscribe/README.md b/packages/nova-subscribe/README.md index 5689fedfb..27d7f6712 100644 --- a/packages/nova-subscribe/README.md +++ b/packages/nova-subscribe/README.md @@ -1 +1,21 @@ -Telescope subscribe to posts package, used internally. \ No newline at end of file +### nova:subscribe + +Lets you subscribe to objects. + +### Subscribe To Posts + +#### `Subscribe` + +A link component to subscribe/unsubscribe to a post. + +#### `SubscribedPosts` + +A component that shows a list of subscribed posts. + +### Subscribe To Users (Follow) + +(WIP) + +### Subscribe To Comments + +Note done yet. \ No newline at end of file diff --git a/packages/nova-subscribe/lib/export.js b/packages/nova-subscribe/lib/client.js similarity index 71% rename from packages/nova-subscribe/lib/export.js rename to packages/nova-subscribe/lib/client.js index 199b01bd3..6f0e8238d 100644 --- a/packages/nova-subscribe/lib/export.js +++ b/packages/nova-subscribe/lib/client.js @@ -2,9 +2,14 @@ import {subscribeItem, unsubscribeItem} from './methods.js'; import Subscribe from './components/Subscribe.jsx'; import SubscribedPosts from './components/SubscribedPosts.jsx'; +import './callbacks.js'; +import './custom_fields.js'; +import './methods.js'; +import './views.js'; + export { subscribeItem, unsubscribeItem, Subscribe, SubscribedPosts -} +}; \ No newline at end of file diff --git a/packages/nova-subscribe/lib/client/templates/post_subscribe.html b/packages/nova-subscribe/lib/client/templates/post_subscribe.html deleted file mode 100644 index 33ddaf71f..000000000 --- a/packages/nova-subscribe/lib/client/templates/post_subscribe.html +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/packages/nova-subscribe/lib/client/templates/post_subscribe.js b/packages/nova-subscribe/lib/client/templates/post_subscribe.js deleted file mode 100644 index c038e9e3f..000000000 --- a/packages/nova-subscribe/lib/client/templates/post_subscribe.js +++ /dev/null @@ -1,47 +0,0 @@ -Template.post_subscribe.helpers({ - canSubscribe: function() { - // you cannot subscribe to your own posts - return Meteor.userId() && this.userId !== Meteor.userId(); - }, - subscribed: function() { - var user = Meteor.user(); - if (!user) return false; - - return _.include(this.subscribers, user._id); - } -}); - -Template.post_subscribe.events({ - 'click .subscribe-link': function(e, instance) { - e.preventDefault(); - if (this.userId === Meteor.userId()) - return; - - var post = this; - - if (!Meteor.user()) { - FlowRouter.go('signIn'); - Messages.flash(__("please_log_in_first"), "info"); - } - - Meteor.call('subscribePost', post._id, function(error, result) { - if (result) - Events.track("post subscribed", {'_id': post._id}); - }); - }, - - 'click .unsubscribe-link': function(e, instance) { - e.preventDefault(); - var post = this; - - if (!Meteor.user()) { - FlowRouter.go('signIn'); - Messages.flash(__("please_log_in_first"), "info"); - } - - Meteor.call('unsubscribePost', post._id, function(error, result) { - if (result) - Events.track("post unsubscribed", {'_id': post._id}); - }); - } -}); diff --git a/packages/nova-subscribe/lib/client/templates/user_subscribed_posts.html b/packages/nova-subscribe/lib/client/templates/user_subscribed_posts.html deleted file mode 100644 index 7a04c1ff2..000000000 --- a/packages/nova-subscribe/lib/client/templates/user_subscribed_posts.html +++ /dev/null @@ -1,6 +0,0 @@ - \ No newline at end of file diff --git a/packages/nova-subscribe/lib/client/templates/user_subscribed_posts.js b/packages/nova-subscribe/lib/client/templates/user_subscribed_posts.js deleted file mode 100644 index 22b6691c9..000000000 --- a/packages/nova-subscribe/lib/client/templates/user_subscribed_posts.js +++ /dev/null @@ -1,22 +0,0 @@ -Template.user_subscribed_posts.helpers({ - arguments: function () { - var user = this; - return { - template: "posts_list_compact", - options: { - currentUser: user, - fieldLabel: __("subscribedAt"), - fieldValue: function (post) { - var user = this.currentUser; - var item = _.findWhere(user.telescope.subscribedItems.Posts, {itemId: post._id}); - return moment(item.subscribedAt).format("MM/DD/YYYY, HH:mm"); - } - }, - terms: { - view: 'userSubscribedPosts', - userId: user._id, - limit: 5 - } - } - } -}); \ No newline at end of file diff --git a/packages/nova-subscribe/lib/custom_fields.js b/packages/nova-subscribe/lib/custom_fields.js index 9880b50b0..935907d40 100644 --- a/packages/nova-subscribe/lib/custom_fields.js +++ b/packages/nova-subscribe/lib/custom_fields.js @@ -1,18 +1,45 @@ -import PublicationUtils from 'meteor/utilities:smart-publications' -import Posts from "meteor/nova:posts" -import Users from "meteor/nova:users" +import PublicationUtils from 'meteor/utilities:smart-publications'; +import Posts from "meteor/nova:posts"; +import Users from "meteor/nova:users"; -Users.addField({ - fieldName: 'telescope.subscribedItems', - fieldSchema: { - type: Object, - optional: true, - blackbox: true, - autoform: { - omit: true +Users.addField([ + { + fieldName: 'telescope.subscribedItems', + fieldSchema: { + type: Object, + optional: true, + blackbox: true, + autoform: { + omit: true + } + } + }, + { + fieldName: 'telescope.subscribers', + fieldSchema: { + type: [String], + optional: true, + autoform: { + omit: true + }, + publish: true, + join: { + joinAs: "subscribersArray", + collection: () => Users + } + } + }, + { + fieldName: 'telescope.subscriberCount', + fieldSchema: { + type: Number, + optional: true, + autoform: { + omit: true + } } } -}); +]); Posts.addField([ { @@ -42,5 +69,5 @@ Posts.addField([ } ]); -PublicationUtils.addToFields(Users.publishedFields.list, ["telescope.subscribedItems"]); +PublicationUtils.addToFields(Users.publishedFields.list, ["telescope.subscribedItems", "telescope.subscribers", "telescope.subscriberCount"]); PublicationUtils.addToFields(Posts.publishedFields.list, ["subscribers", "subscriberCount"]); diff --git a/packages/nova-subscribe/lib/methods.js b/packages/nova-subscribe/lib/methods.js index c275abc2a..a7a788007 100644 --- a/packages/nova-subscribe/lib/methods.js +++ b/packages/nova-subscribe/lib/methods.js @@ -33,7 +33,7 @@ export var subscribeItem = function (collection, itemId, user) { // author can't subscribe item if (item.userId && item.userId === user._id) - return false + return false; // Subscribe var result = collection.update({_id: itemId, subscribers: { $ne: user._id }}, { @@ -75,11 +75,11 @@ export var unsubscribeItem = function (collection, itemId, user) { }; Meteor.methods({ - subscribePost: function(postId) { + "posts.subscribe": function(postId) { check(postId, String); return subscribeItem.call(this, Posts, postId, Meteor.user()); }, - unsubscribePost: function(postId) { + "posts.unsubscribe": function(postId) { check(postId, String); return unsubscribeItem.call(this, Posts, postId, Meteor.user()); } diff --git a/packages/nova-subscribe/lib/server.js b/packages/nova-subscribe/lib/server.js new file mode 100644 index 000000000..6f0e8238d --- /dev/null +++ b/packages/nova-subscribe/lib/server.js @@ -0,0 +1,15 @@ +import {subscribeItem, unsubscribeItem} from './methods.js'; +import Subscribe from './components/Subscribe.jsx'; +import SubscribedPosts from './components/SubscribedPosts.jsx'; + +import './callbacks.js'; +import './custom_fields.js'; +import './methods.js'; +import './views.js'; + +export { + subscribeItem, + unsubscribeItem, + Subscribe, + SubscribedPosts +}; \ No newline at end of file diff --git a/packages/nova-subscribe/lib/server/publications.js b/packages/nova-subscribe/lib/server/publications.js deleted file mode 100644 index 2d0310cb7..000000000 --- a/packages/nova-subscribe/lib/server/publications.js +++ /dev/null @@ -1,10 +0,0 @@ -Meteor.publish('userSubscribedPosts', function(terms) { - - if (this.userId) { - terms.currentUserId = this.userId; // add userId to terms - } - - var parameters = Posts.parameters.get(terms); - var posts = Posts.find(parameters.selector, parameters.options); - return posts; -}); diff --git a/packages/nova-subscribe/lib/subscribe-to-posts.js b/packages/nova-subscribe/lib/subscribe-to-posts.js deleted file mode 100644 index 704f5e28e..000000000 --- a/packages/nova-subscribe/lib/subscribe-to-posts.js +++ /dev/null @@ -1,140 +0,0 @@ -Users.addField({ - fieldName: 'telescope.subscribedItems', - fieldSchema: { - type: Object, - optional: true, - blackbox: true, - autoform: { - omit: true - } - } -}); - -Posts.addField({ - fieldName: 'subscribers', - fieldSchema: { - type: [String], - optional: true, - autoform: { - omit: true - } - } -}); - -Posts.addField({ - fieldName: 'subscriberCount', - fieldSchema: { - type: Number, - optional: true, - autoform: { - omit: true - } - } -}); - -Telescope.modules.add("profileEdit", { - template: 'user_subscribed_posts', - order: 5 -}); - -Telescope.modules.add("commentThreadBottom", { - template: 'post_subscribe', - order: 10 -}); - -Posts.views.add("userSubscribedPosts", function (terms) { - var user = Meteor.users.findOne(terms.userId), - postsIds = []; - - if (user && user.telescope.subscribedItems && user.telescope.subscribedItems.Posts) { - postsIds = _.pluck(user.telescope.subscribedItems.Posts, "itemId"); - } - - return { - find: {_id: {$in: postsIds}}, - options: {limit: 5, sort: {postedAt: -1}} - }; -}); - -var hasSubscribedItem = function (item, user) { - return item.subscribers && item.subscribers.indexOf(user._id) != -1; -}; - -var addSubscribedItem = function (userId, item, collectionName) { - var field = 'telescope.subscribedItems.' + collectionName; - var add = {}; - add[field] = item; - Meteor.users.update({_id: userId}, { - $addToSet: add - }); -}; - -var removeSubscribedItem = function (userId, itemId, collectionName) { - var field = 'telescope.subscribedItems.' + collectionName; - var remove = {}; - remove[field] = {itemId: itemId}; - Meteor.users.update({_id: userId}, { - $pull: remove - }); -}; - -subscribeItem = function (collection, itemId, user) { - var item = collection.findOne(itemId), - collectionName = collection._name.slice(0,1).toUpperCase() + collection._name.slice(1); - - if (!user || !item || hasSubscribedItem(item, user)) - return false; - - // author can't subscribe item - if (item.userId && item.userId === user._id) - return false - - // Subscribe - var result = collection.update({_id: itemId, subscribers: { $ne: user._id }}, { - $addToSet: {subscribers: user._id}, - $inc: {subscriberCount: 1} - }); - - if (result > 0) { - // Add item to list of subscribed items - var obj = { - itemId: item._id, - subscribedAt: new Date() - }; - addSubscribedItem(user._id, obj, collectionName); - } - - return true; -}; - -unsubscribeItem = function (collection, itemId, user) { - var user = Meteor.user(), - item = collection.findOne(itemId), - collectionName = collection._name.slice(0,1).toUpperCase()+collection._name.slice(1); - - if (!user || !item || !hasSubscribedItem(item, user)) - return false; - - // Unsubscribe - var result = collection.update({_id: itemId, subscribers: user._id }, { - $pull: {subscribers: user._id}, - $inc: {subscriberCount: -1} - }); - - if (result > 0) { - // Remove item from list of subscribed items - removeSubscribedItem(user._id, itemId, collectionName); - } - return true; -}; - -Meteor.methods({ - subscribePost: function(postId) { - check(postId, String); - return subscribeItem.call(this, Posts, postId, Meteor.user()); - }, - unsubscribePost: function(postId) { - check(postId, String); - return unsubscribeItem.call(this, Posts, postId, Meteor.user()); - } -}); diff --git a/packages/nova-subscribe/package-tap.i18n b/packages/nova-subscribe/package-tap.i18n deleted file mode 100644 index a52321d15..000000000 --- a/packages/nova-subscribe/package-tap.i18n +++ /dev/null @@ -1,5 +0,0 @@ -{ - "translation_function_name": "__", - "helper_name": "_", - "namespace": "project" -} \ No newline at end of file diff --git a/packages/nova-subscribe/package.js b/packages/nova-subscribe/package.js index 0f8510df1..ed172fd25 100644 --- a/packages/nova-subscribe/package.js +++ b/packages/nova-subscribe/package.js @@ -1,6 +1,6 @@ Package.describe({ - name: "subscribe-to-posts", - summary: "Subscribe to posts to be notified when they get new comments", + name: "nova:subscribe", + summary: "Subscribe to posts, users, etc. to be notified of new activity", version: "0.26.5-nova", git: "https://github.com/TelescopeJS/telescope-subscribe-to-posts.git" }); @@ -10,67 +10,13 @@ Package.onUse(function (api) { api.versionsFrom("METEOR@1.0"); - // --------------------------- 1. Meteor packages dependencies --------------------------- - - // automatic (let the package specify where it's needed) - api.use([ 'nova:core@0.26.5-nova', 'nova:posts@0.26.5-nova', 'nova:users@0.26.5-nova' ]); - // api.use([ - // 'nova:notifications@0.26.5-nova', - // 'nova:email@0.26.5-nova' - // ], ['client', 'server'], {weak: true}); - // - // ---------------------------------- 2. Files to include ---------------------------------- - - // i18n config (must come first) - - // api.addFiles([ - // 'package-tap.i18n' - // ], ['client', 'server']); - - // both - - api.addFiles([ - // 'lib/subscribe-to-posts.js',', - 'lib/callbacks.js', - 'lib/custom_fields.js', - 'lib/methods.js', - 'lib/views.js' - ], ['client', 'server']); - - // client - - // api.addFiles([ - // 'lib/client/templates/post_subscribe.html', - // 'lib/client/templates/post_subscribe.js', - // 'lib/client/templates/user_subscribed_posts.html', - // 'lib/client/templates/user_subscribed_posts.js' - // ], ['client']); - - // server - - api.addFiles([ - 'lib/server/publications.js' - ], ['server']); - - // i18n languages (must come last) - - // var languages = ["ar", "bg", "cs", "da", "de", "el", "en", "es", "et", "fr", "hu", "id", "it", "ja", "kk", "ko", "nl", "pl", "pt-BR", "ro", "ru", "sl", "sv", "th", "tr", "vi", "zh-CN"]; - // var languagesPaths = languages.map(function (language) { - // return "i18n/"+language+".i18n.json"; - // }); - // api.addFiles(languagesPaths, ["client", "server"]); - // - // api.export([ - // 'subscribeItem', - // 'unsubscribeItem' - // ]); - - api.mainModule("lib/export.js", ["client", "server"]); + api.mainModule("lib/client.js", ["client"]); + api.mainModule("lib/server.js", ["server"]); }); diff --git a/packages/nova-subscribe/versions.json b/packages/nova-subscribe/versions.json deleted file mode 100644 index 92043f855..000000000 --- a/packages/nova-subscribe/versions.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "dependencies": [ - [ - "application-configuration", - "1.0.3" - ], - [ - "base64", - "1.0.1" - ], - [ - "binary-heap", - "1.0.1" - ], - [ - "blaze", - "2.0.3" - ], - [ - "blaze-tools", - "1.0.1" - ], - [ - "boilerplate-generator", - "1.0.1" - ], - [ - "callback-hook", - "1.0.1" - ], - [ - "check", - "1.0.2" - ], - [ - "cmather:handlebars-server", - "2.0.0" - ], - [ - "coffeescript", - "1.0.4" - ], - [ - "ddp", - "1.0.11" - ], - [ - "deps", - "1.0.5" - ], - [ - "ejson", - "1.0.4" - ], - [ - "follower-livedata", - "1.0.2" - ], - [ - "geojson-utils", - "1.0.1" - ], - [ - "handlebars", - "1.0.1" - ], - [ - "html-tools", - "1.0.2" - ], - [ - "htmljs", - "1.0.2" - ], - [ - "id-map", - "1.0.1" - ], - [ - "iron:controller", - "1.0.0" - ], - [ - "iron:core", - "1.0.3" - ], - [ - "iron:dynamic-template", - "1.0.3" - ], - [ - "iron:layout", - "1.0.3" - ], - [ - "iron:location", - "1.0.3" - ], - [ - "iron:middleware-stack", - "1.0.0" - ], - [ - "iron:router", - "1.0.1" - ], - [ - "iron:url", - "1.0.3" - ], - [ - "jquery", - "1.0.1" - ], - [ - "json", - "1.0.1" - ], - [ - "logging", - "1.0.5" - ], - [ - "meteor", - "1.1.3" - ], - [ - "minifiers", - "1.1.2" - ], - [ - "minimongo", - "1.0.5" - ], - [ - "mongo", - "1.0.8" - ], - [ - "observe-sequence", - "1.0.3" - ], - [ - "ordered-dict", - "1.0.1" - ], - [ - "random", - "1.0.1" - ], - [ - "reactive-dict", - "1.0.4" - ], - [ - "reactive-var", - "1.0.3" - ], - [ - "retry", - "1.0.1" - ], - [ - "routepolicy", - "1.0.2" - ], - [ - "session", - "1.0.4" - ], - [ - "spacebars", - "1.0.3" - ], - [ - "spacebars-compiler", - "1.0.3" - ], - [ - "tap:http-methods", - "0.0.23" - ], - [ - "tap:i18n", - "1.2.1" - ], - [ - "telescope-base", - "0.0.0" - ], - [ - "nova:i18n", - "0.0.0" - ], - [ - "telescope-lib", - "0.2.9" - ], - [ - "templating", - "1.0.9" - ], - [ - "tracker", - "1.0.3" - ], - [ - "ui", - "1.0.4" - ], - [ - "underscore", - "1.0.1" - ], - [ - "webapp", - "1.1.4" - ], - [ - "webapp-hashing", - "1.0.1" - ] - ], - "pluginDependencies": [], - "toolVersion": "meteor-tool@1.0.35", - "format": "1.0" -} \ No newline at end of file From 81a0a82bae9de72fc94f9195d9080aa9e3772b1d Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Sun, 7 Aug 2016 19:32:19 +0900 Subject: [PATCH 27/60] =?UTF-8?q?not=20sure=20what=20this=20stuff=20is=20b?= =?UTF-8?q?ut=20let's=20get=20rid=20of=20it=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.build.telescope-blank/buildinfo.json | 78 --- .../.build.telescope-blank/isopack.json | 24 - .../.build.telescope-blank/os.json | 45 -- .../os/packages/telescope-blank.js | 311 ----------- .../os/packages/telescope-blank.js.map | 1 - .../.build.telescope-blank/package.js | 1 - .../.build.telescope-blank/unipackage.json | 23 - .../.build.telescope-blank/web.browser.json | 70 --- .../web.browser/packages/telescope-blank.js | 313 ----------- .../packages/telescope-blank.js.map | 1 - .../lib/client/scss/package.scss.css | 0 .../.build.telescope-blank/web.cordova.json | 70 --- .../web.cordova/packages/telescope-blank.js | 313 ----------- .../packages/telescope-blank.js.map | 1 - .../lib/client/scss/package.scss.css | 0 .../.build.telescope-email/buildinfo.json | 72 --- .../.build.telescope-email/isopack.json | 24 - .../.build.telescope-email/os.json | 61 --- .../os/packages/telescope-email.js | 510 ------------------ .../os/packages/telescope-email.js.map | 1 - .../.build.telescope-email/package.js | 1 - .../.build.telescope-email/unipackage.json | 23 - .../.build.telescope-email/web.browser.json | 51 -- .../web.browser/packages/telescope-email.js | 153 ------ .../packages/telescope-email.js.map | 1 - .../.build.telescope-email/web.cordova.json | 51 -- .../web.cordova/packages/telescope-email.js | 153 ------ .../packages/telescope-email.js.map | 1 - 28 files changed, 2353 deletions(-) delete mode 100644 packages/nova-subscribe/.build.telescope-blank/buildinfo.json delete mode 100644 packages/nova-subscribe/.build.telescope-blank/isopack.json delete mode 100644 packages/nova-subscribe/.build.telescope-blank/os.json delete mode 100644 packages/nova-subscribe/.build.telescope-blank/os/packages/telescope-blank.js delete mode 100644 packages/nova-subscribe/.build.telescope-blank/os/packages/telescope-blank.js.map delete mode 100644 packages/nova-subscribe/.build.telescope-blank/package.js delete mode 100644 packages/nova-subscribe/.build.telescope-blank/unipackage.json delete mode 100644 packages/nova-subscribe/.build.telescope-blank/web.browser.json delete mode 100644 packages/nova-subscribe/.build.telescope-blank/web.browser/packages/telescope-blank.js delete mode 100644 packages/nova-subscribe/.build.telescope-blank/web.browser/packages/telescope-blank.js.map delete mode 100644 packages/nova-subscribe/.build.telescope-blank/web.browser/packages/telescope-blank/lib/client/scss/package.scss.css delete mode 100644 packages/nova-subscribe/.build.telescope-blank/web.cordova.json delete mode 100644 packages/nova-subscribe/.build.telescope-blank/web.cordova/packages/telescope-blank.js delete mode 100644 packages/nova-subscribe/.build.telescope-blank/web.cordova/packages/telescope-blank.js.map delete mode 100644 packages/nova-subscribe/.build.telescope-blank/web.cordova/packages/telescope-blank/lib/client/scss/package.scss.css delete mode 100644 packages/nova-subscribe/.build.telescope-email/buildinfo.json delete mode 100644 packages/nova-subscribe/.build.telescope-email/isopack.json delete mode 100644 packages/nova-subscribe/.build.telescope-email/os.json delete mode 100644 packages/nova-subscribe/.build.telescope-email/os/packages/telescope-email.js delete mode 100644 packages/nova-subscribe/.build.telescope-email/os/packages/telescope-email.js.map delete mode 100644 packages/nova-subscribe/.build.telescope-email/package.js delete mode 100644 packages/nova-subscribe/.build.telescope-email/unipackage.json delete mode 100644 packages/nova-subscribe/.build.telescope-email/web.browser.json delete mode 100644 packages/nova-subscribe/.build.telescope-email/web.browser/packages/telescope-email.js delete mode 100644 packages/nova-subscribe/.build.telescope-email/web.browser/packages/telescope-email.js.map delete mode 100644 packages/nova-subscribe/.build.telescope-email/web.cordova.json delete mode 100644 packages/nova-subscribe/.build.telescope-email/web.cordova/packages/telescope-email.js delete mode 100644 packages/nova-subscribe/.build.telescope-email/web.cordova/packages/telescope-email.js.map diff --git a/packages/nova-subscribe/.build.telescope-blank/buildinfo.json b/packages/nova-subscribe/.build.telescope-blank/buildinfo.json deleted file mode 100644 index 2ef32e328..000000000 --- a/packages/nova-subscribe/.build.telescope-blank/buildinfo.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "builtBy": "meteor/14", - "buildDependencies": { - "os.json": { - "files": { - "/Users/sacha/Dev/Telescope/packages/telescope-blank/package.js": "4b9dc1cdae8aac921a1147dfcb08534bbaacda72", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/package-tap.i18n": "f6a2318986df41df748399f53ee3d59d7f31c179", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/both.js": "845d5b3f61595101239f77867e54b73a5349ab3e", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/routes.js": "1945a42ee1faecc320213406d99a7a9cea965f9d", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/server/publications.js": "04ae0bc6e0d565e45369ab9e3bf67a55454dce07", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4" - }, - "directories": [] - }, - "web.browser.json": { - "files": { - "/Users/sacha/Dev/Telescope/packages/telescope-blank/package.js": "4b9dc1cdae8aac921a1147dfcb08534bbaacda72", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/package-tap.i18n": "f6a2318986df41df748399f53ee3d59d7f31c179", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/both.js": "845d5b3f61595101239f77867e54b73a5349ab3e", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/routes.js": "1945a42ee1faecc320213406d99a7a9cea965f9d", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/client/templates/template.html": "eb40d0bd228474b7fb5949e4ba0edae3902619df", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/client/templates/template.js": "fecd7b155ddc678bced9144469adbada08756039", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/client/scss/package.scss": "da39a3ee5e6b4b0d3255bfef95601890afd80709", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4" - }, - "directories": [] - }, - "web.cordova.json": { - "files": { - "/Users/sacha/Dev/Telescope/packages/telescope-blank/package.js": "4b9dc1cdae8aac921a1147dfcb08534bbaacda72", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/package-tap.i18n": "f6a2318986df41df748399f53ee3d59d7f31c179", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/both.js": "845d5b3f61595101239f77867e54b73a5349ab3e", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/routes.js": "1945a42ee1faecc320213406d99a7a9cea965f9d", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/client/templates/template.html": "eb40d0bd228474b7fb5949e4ba0edae3902619df", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/client/templates/template.js": "fecd7b155ddc678bced9144469adbada08756039", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/client/scss/package.scss": "da39a3ee5e6b4b0d3255bfef95601890afd80709", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4" - }, - "directories": [] - } - }, - "pluginDependencies": { - "files": { - "/Users/sacha/Dev/Telescope/packages/telescope-blank/package.js": "4b9dc1cdae8aac921a1147dfcb08534bbaacda72" - }, - "directories": [] - }, - "source": "/Users/sacha/Dev/Telescope/packages/telescope-blank", - "buildTimeDirectDependencies": { - "telescope-i18n": "0.0.0+59e245bcb9daad9888d7b1165563547b730f4b1e", - "tap:i18n": "1.2.1", - "telescope-lib": "0.2.9+3c5fc781baa945505183378ea284deac3068520b", - "templating": "1.0.9", - "fourseven:scss": "1.0.0", - "underscore": "1.0.1", - "iron:router": "1.0.3", - "jquery": "1.0.1", - "meteor": "1.1.3", - "telescope-base": "0.0.0+400cdc252958afc669dfe6de17b9604adb753c62" - }, - "buildTimePluginDependencies": {}, - "cordovaDependencies": null -} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-blank/isopack.json b/packages/nova-subscribe/.build.telescope-blank/isopack.json deleted file mode 100644 index 12494d186..000000000 --- a/packages/nova-subscribe/.build.telescope-blank/isopack.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "isopack-1": { - "name": "telescope-blank", - "summary": "Telescope blank package – use as template for your own packages", - "version": "0.1.0+6c017400b8a83109c230d8b5f2d91823df277f5f", - "earliestCompatibleVersion": "0.0.0", - "isTest": false, - "builds": [ - { - "arch": "os", - "path": "os.json" - }, - { - "arch": "web.browser", - "path": "web.browser.json" - }, - { - "arch": "web.cordova", - "path": "web.cordova.json" - } - ], - "plugins": [] - } -} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-blank/os.json b/packages/nova-subscribe/.build.telescope-blank/os.json deleted file mode 100644 index 826c7586e..000000000 --- a/packages/nova-subscribe/.build.telescope-blank/os.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "format": "unipackage-unibuild-pre1", - "packageVariables": [ - { - "name": "myFunction", - "export": true - }, - { - "name": "__" - } - ], - "uses": [ - { - "package": "meteor" - }, - { - "package": "tap:i18n" - }, - { - "package": "iron:router" - }, - { - "package": "telescope-base" - }, - { - "package": "telescope-lib" - }, - { - "package": "telescope-i18n" - }, - { - "package": "fourseven:scss" - } - ], - "resources": [ - { - "type": "prelink", - "file": "os/packages/telescope-blank.js", - "length": 26125, - "offset": 0, - "servePath": "/packages/telescope-blank.js", - "sourceMap": "os/packages/telescope-blank.js.map" - } - ] -} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-blank/os/packages/telescope-blank.js b/packages/nova-subscribe/.build.telescope-blank/os/packages/telescope-blank.js deleted file mode 100644 index f91849efa..000000000 --- a/packages/nova-subscribe/.build.telescope-blank/os/packages/telescope-blank.js +++ /dev/null @@ -1,311 +0,0 @@ -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/package-i18n.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -TAPi18n.packages["telescope-blank"] = {"translation_function_name":"__","helper_name":"_","namespace":"project"}; // 1 - // 2 -// define package's translation function (proxy to the i18next) // 3 -__ = TAPi18n._getPackageI18nextProxy("project"); // 4 - // 5 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/lib/both.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -// Custom Post Property // 1 - // 2 -var customProperty = { // 3 - propertyName: 'customProperty', // 4 - propertySchema: { // 5 - type: String, // property type // 6 - label: 'customLabel', // key string used for internationalization // 7 - optional: true, // make this property optional // 8 - autoform: { // 9 - editable: true, // make this property editable by users // 10 - type: "bootstrap-datetimepicker" // assign a custom input type // 11 - } // 12 - } // 13 -} // 14 -addToPostSchema.push(customProperty); // 15 - // 16 -// Custom Setting // 17 - // 18 -var customSetting = { // 19 - propertyName: 'customSetting', // 20 - propertySchema: { // 21 - type: String, // 22 - optional: true, // 23 - autoform: { // 24 - group: 'customGroup', // assign custom group (fieldset) in Settings form // 25 - private: true // mark as private (not published to client) // 26 - } // 27 - } // 28 -} // 29 -addToSettingsSchema.push(customSetting); // 30 - // 31 -// Global Function // 32 - // 33 -myFunction = function (a, b) { // 34 - return a + b; // 35 -} // 36 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/lib/routes.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -Meteor.startup(function () { // 1 - // 2 - Router.route('/custom-path', { // 3 - name: 'customRoute', // 4 - template: getTemplate('customTemplate') // 5 - }); // 6 - // 7 -}); // 8 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/lib/server/publications.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -Meteor.publish('customPublication', function (limit) { // 1 - return Posts.find({}, {limit: limit}); // 2 -}); // 3 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "telescope-blank", // 2 - namespace = "telescope-blank"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -if(_.isUndefined(TAPi18n.translations["de"])) { // 8 - TAPi18n.translations["de"] = {}; // 9 -} // 10 - // 11 -if(_.isUndefined(TAPi18n.translations["de"][namespace])) { // 12 - TAPi18n.translations["de"][namespace] = {}; // 13 -} // 14 - // 15 -_.extend(TAPi18n.translations["de"][namespace], {"translation_key":"translation string"}); // 16 - // 17 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "telescope-blank", // 2 - namespace = "telescope-blank"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -// integrate the fallback language translations // 8 -TAPi18n.addResourceBundle("en", namespace, {"translation_key":"translation string"}); // 9 - // 10 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "telescope-blank", // 2 - namespace = "telescope-blank"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -if(_.isUndefined(TAPi18n.translations["es"])) { // 8 - TAPi18n.translations["es"] = {}; // 9 -} // 10 - // 11 -if(_.isUndefined(TAPi18n.translations["es"][namespace])) { // 12 - TAPi18n.translations["es"][namespace] = {}; // 13 -} // 14 - // 15 -_.extend(TAPi18n.translations["es"][namespace], {"translation_key":"translation string"}); // 16 - // 17 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "telescope-blank", // 2 - namespace = "telescope-blank"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -if(_.isUndefined(TAPi18n.translations["fr"])) { // 8 - TAPi18n.translations["fr"] = {}; // 9 -} // 10 - // 11 -if(_.isUndefined(TAPi18n.translations["fr"][namespace])) { // 12 - TAPi18n.translations["fr"][namespace] = {}; // 13 -} // 14 - // 15 -_.extend(TAPi18n.translations["fr"][namespace], {"translation_key":"translation string"}); // 16 - // 17 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "telescope-blank", // 2 - namespace = "telescope-blank"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -if(_.isUndefined(TAPi18n.translations["it"])) { // 8 - TAPi18n.translations["it"] = {}; // 9 -} // 10 - // 11 -if(_.isUndefined(TAPi18n.translations["it"][namespace])) { // 12 - TAPi18n.translations["it"][namespace] = {}; // 13 -} // 14 - // 15 -_.extend(TAPi18n.translations["it"][namespace], {"translation_key":"translation string"}); // 16 - // 17 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "telescope-blank", // 2 - namespace = "telescope-blank"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -if(_.isUndefined(TAPi18n.translations["zh-CN"])) { // 8 - TAPi18n.translations["zh-CN"] = {}; // 9 -} // 10 - // 11 -if(_.isUndefined(TAPi18n.translations["zh-CN"][namespace])) { // 12 - TAPi18n.translations["zh-CN"][namespace] = {}; // 13 -} // 14 - // 15 -_.extend(TAPi18n.translations["zh-CN"][namespace], {"translation_key":"translation string"}); // 16 - // 17 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); diff --git a/packages/nova-subscribe/.build.telescope-blank/os/packages/telescope-blank.js.map b/packages/nova-subscribe/.build.telescope-blank/os/packages/telescope-blank.js.map deleted file mode 100644 index 5351bff35..000000000 --- a/packages/nova-subscribe/.build.telescope-blank/os/packages/telescope-blank.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"/packages/telescope-blank.js","sources":["telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/package-tap.i18n","telescope-blank/lib/both.js","telescope-blank/lib/routes.js","telescope-blank/lib/server/publications.js","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json"],"names":[],"mappings":";;;;;;;;AAAA,iH;;AAEA,+D;AACA,gD;;;;;;;;;;;;;;;;;;;ACHA,uB;;AAEA,sB;AACA,iC;AACA,mB;AACA,4D;AACA,uF;AACA,0E;AACA,e;AACA,mF;AACA,yE;AACA,K;AACA,G;AACA,C;AACA,qC;;AAEA,iB;;AAEA,qB;AACA,gC;AACA,mB;AACA,iB;AACA,mB;AACA,e;AACA,8F;AACA,wF;AACA,K;AACA,G;AACA,C;AACA,wC;;AAEA,kB;;AAEA,8B;AACA,e;AACA,C;;;;;;;;;;;;;;;;;;ACnCA,4B;AACA,E;AACA,gC;AACA,wB;AACA,2C;AACA,K;;AAEA,G;;;;;;;;;;;;;;;;;;ACPA,sD;AACA,wC;AACA,G;;;;;;;;;;;;;;;;;;ACFA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;AACA,+C;AACA,kC;AACA,C;;AAEA,0D;AACA,6C;AACA,C;;AAEA,0F;;;;;;;;;;;;;;;;;;;ACfA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;AACA,gD;AACA,qF;;;;;;;;;;;;;;;;;;;ACRA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;AACA,+C;AACA,kC;AACA,C;;AAEA,0D;AACA,6C;AACA,C;;AAEA,0F;;;;;;;;;;;;;;;;;;;ACfA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;AACA,+C;AACA,kC;AACA,C;;AAEA,0D;AACA,6C;AACA,C;;AAEA,0F;;;;;;;;;;;;;;;;;;;ACfA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;AACA,+C;AACA,kC;AACA,C;;AAEA,0D;AACA,6C;AACA,C;;AAEA,0F;;;;;;;;;;;;;;;;;;;ACfA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;AACA,kD;AACA,qC;AACA,C;;AAEA,6D;AACA,gD;AACA,C;;AAEA,6F","sourcesContent":["TAPi18n.packages[\"telescope-blank\"] = {\"translation_function_name\":\"__\",\"helper_name\":\"_\",\"namespace\":\"project\"};\n\n// define package's translation function (proxy to the i18next)\n__ = TAPi18n._getPackageI18nextProxy(\"project\");\n","// Custom Post Property\n\nvar customProperty = {\n propertyName: 'customProperty',\n propertySchema: {\n type: String, // property type\n label: 'customLabel', // key string used for internationalization\n optional: true, // make this property optional\n autoform: {\n editable: true, // make this property editable by users\n type: \"bootstrap-datetimepicker\" // assign a custom input type\n }\n }\n}\naddToPostSchema.push(customProperty);\n\n// Custom Setting\n\nvar customSetting = {\n propertyName: 'customSetting',\n propertySchema: {\n type: String,\n optional: true,\n autoform: {\n group: 'customGroup', // assign custom group (fieldset) in Settings form\n private: true // mark as private (not published to client)\n }\n }\n}\naddToSettingsSchema.push(customSetting);\n\n// Global Function\n\nmyFunction = function (a, b) {\n return a + b;\n}","Meteor.startup(function () {\n \n Router.route('/custom-path', {\n name: 'customRoute',\n template: getTemplate('customTemplate')\n });\n\n});","Meteor.publish('customPublication', function (limit) {\n return Posts.find({}, {limit: limit});\n});","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nif(_.isUndefined(TAPi18n.translations[\"de\"])) {\n TAPi18n.translations[\"de\"] = {};\n}\n\nif(_.isUndefined(TAPi18n.translations[\"de\"][namespace])) {\n TAPi18n.translations[\"de\"][namespace] = {};\n}\n\n_.extend(TAPi18n.translations[\"de\"][namespace], {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n// integrate the fallback language translations \nTAPi18n.addResourceBundle(\"en\", namespace, {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nif(_.isUndefined(TAPi18n.translations[\"es\"])) {\n TAPi18n.translations[\"es\"] = {};\n}\n\nif(_.isUndefined(TAPi18n.translations[\"es\"][namespace])) {\n TAPi18n.translations[\"es\"][namespace] = {};\n}\n\n_.extend(TAPi18n.translations[\"es\"][namespace], {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nif(_.isUndefined(TAPi18n.translations[\"fr\"])) {\n TAPi18n.translations[\"fr\"] = {};\n}\n\nif(_.isUndefined(TAPi18n.translations[\"fr\"][namespace])) {\n TAPi18n.translations[\"fr\"][namespace] = {};\n}\n\n_.extend(TAPi18n.translations[\"fr\"][namespace], {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nif(_.isUndefined(TAPi18n.translations[\"it\"])) {\n TAPi18n.translations[\"it\"] = {};\n}\n\nif(_.isUndefined(TAPi18n.translations[\"it\"][namespace])) {\n TAPi18n.translations[\"it\"][namespace] = {};\n}\n\n_.extend(TAPi18n.translations[\"it\"][namespace], {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nif(_.isUndefined(TAPi18n.translations[\"zh-CN\"])) {\n TAPi18n.translations[\"zh-CN\"] = {};\n}\n\nif(_.isUndefined(TAPi18n.translations[\"zh-CN\"][namespace])) {\n TAPi18n.translations[\"zh-CN\"][namespace] = {};\n}\n\n_.extend(TAPi18n.translations[\"zh-CN\"][namespace], {\"translation_key\":\"translation string\"});\n"]} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-blank/package.js b/packages/nova-subscribe/.build.telescope-blank/package.js deleted file mode 100644 index 6c20521cb..000000000 --- a/packages/nova-subscribe/.build.telescope-blank/package.js +++ /dev/null @@ -1 +0,0 @@ -// This file is included for compatibility with the Meteor 0.6.4 package downloader. diff --git a/packages/nova-subscribe/.build.telescope-blank/unipackage.json b/packages/nova-subscribe/.build.telescope-blank/unipackage.json deleted file mode 100644 index d46ab16a2..000000000 --- a/packages/nova-subscribe/.build.telescope-blank/unipackage.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "telescope-blank", - "summary": "Telescope blank package – use as template for your own packages", - "version": "0.1.0+6c017400b8a83109c230d8b5f2d91823df277f5f", - "earliestCompatibleVersion": "0.0.0", - "isTest": false, - "plugins": [], - "unibuilds": [ - { - "arch": "os", - "path": "os.json" - }, - { - "arch": "web.browser", - "path": "web.browser.json" - }, - { - "arch": "web.cordova", - "path": "web.cordova.json" - } - ], - "format": "unipackage-pre2" -} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-blank/web.browser.json b/packages/nova-subscribe/.build.telescope-blank/web.browser.json deleted file mode 100644 index 6b155188c..000000000 --- a/packages/nova-subscribe/.build.telescope-blank/web.browser.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "format": "unipackage-unibuild-pre1", - "packageVariables": [ - { - "name": "myFunction", - "export": true - }, - { - "name": "__" - }, - { - "name": "registerI18nTemplate" - }, - { - "name": "registerTemplate" - }, - { - "name": "non_package_templates" - } - ], - "uses": [ - { - "package": "meteor" - }, - { - "package": "tap:i18n" - }, - { - "package": "iron:router" - }, - { - "package": "telescope-base" - }, - { - "package": "telescope-lib" - }, - { - "package": "telescope-i18n" - }, - { - "package": "fourseven:scss" - }, - { - "package": "jquery" - }, - { - "package": "underscore" - }, - { - "package": "templating" - } - ], - "resources": [ - { - "type": "css", - "file": "web.browser/packages/telescope-blank/lib/client/scss/package.scss.css", - "length": 0, - "offset": 0, - "servePath": "/packages/telescope-blank/lib/client/scss/package.scss.css" - }, - { - "type": "prelink", - "file": "web.browser/packages/telescope-blank.js", - "length": 25168, - "offset": 0, - "servePath": "/packages/telescope-blank.js", - "sourceMap": "web.browser/packages/telescope-blank.js.map" - } - ] -} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-blank/web.browser/packages/telescope-blank.js b/packages/nova-subscribe/.build.telescope-blank/web.browser/packages/telescope-blank.js deleted file mode 100644 index cc96fb9a0..000000000 --- a/packages/nova-subscribe/.build.telescope-blank/web.browser/packages/telescope-blank.js +++ /dev/null @@ -1,313 +0,0 @@ -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/package-i18n.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -TAPi18n.packages["telescope-blank"] = {"translation_function_name":"__","helper_name":"_","namespace":"project"}; // 1 - // 2 -// define package's translation function (proxy to the i18next) // 3 -__ = TAPi18n._getPackageI18nextProxy("project"); // 4 -// define the package's templates registrar // 5 -registerI18nTemplate = TAPi18n._getRegisterHelpersProxy("telescope-blank"); // 6 -registerTemplate = registerI18nTemplate; // XXX OBSOLETE, kept for backward compatibility will be removed in the future - // 8 -// Record the list of templates prior to package load // 9 -var _ = Package.underscore._; // 10 -non_package_templates = _.keys(Template); // 11 - // 12 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/lib/both.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -// Custom Post Property // 1 - // 2 -var customProperty = { // 3 - propertyName: 'customProperty', // 4 - propertySchema: { // 5 - type: String, // property type // 6 - label: 'customLabel', // key string used for internationalization // 7 - optional: true, // make this property optional // 8 - autoform: { // 9 - editable: true, // make this property editable by users // 10 - type: "bootstrap-datetimepicker" // assign a custom input type // 11 - } // 12 - } // 13 -} // 14 -addToPostSchema.push(customProperty); // 15 - // 16 -// Custom Setting // 17 - // 18 -var customSetting = { // 19 - propertyName: 'customSetting', // 20 - propertySchema: { // 21 - type: String, // 22 - optional: true, // 23 - autoform: { // 24 - group: 'customGroup', // assign custom group (fieldset) in Settings form // 25 - private: true // mark as private (not published to client) // 26 - } // 27 - } // 28 -} // 29 -addToSettingsSchema.push(customSetting); // 30 - // 31 -// Global Function // 32 - // 33 -myFunction = function (a, b) { // 34 - return a + b; // 35 -} // 36 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/lib/routes.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -Meteor.startup(function () { // 1 - // 2 - Router.route('/custom-path', { // 3 - name: 'customRoute', // 4 - template: getTemplate('customTemplate') // 5 - }); // 6 - // 7 -}); // 8 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/lib/client/templates/template.template.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // - // 1 -Template.__checkName("customTemplate"); // 2 -Template["customTemplate"] = new Template("Template.customTemplate", (function() { // 3 - var view = this; // 4 - return [ "Hi there, ", Blaze.View(function() { // 5 - return Spacebars.mustache(view.lookup("name")); // 6 - }), "!" ]; // 7 -})); // 8 - // 9 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/lib/client/templates/template.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -Meteor.startup(function () { // 1 - // 2 - Template[getTemplate('customTemplate')].helpers({ // 3 - name: function () { // 4 - return "Bruce Willis"; // 5 - } // 6 - }); // 7 - // 8 -}); // 9 - // 10 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "telescope-blank", // 2 - namespace = "telescope-blank"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -var package_templates = _.difference(_.keys(Template), non_package_templates); // 8 - // 9 -for (var i = 0; i < package_templates.length; i++) { // 10 - var package_template = package_templates[i]; // 11 - // 12 - registerI18nTemplate(package_template); // 13 -} // 14 - // 15 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "telescope-blank", // 2 - namespace = "telescope-blank"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -// integrate the fallback language translations // 8 -TAPi18n.addResourceBundle("en", namespace, {"translation_key":"translation string"}); // 9 - // 10 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "telescope-blank", // 2 - namespace = "telescope-blank"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 - // 8 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "telescope-blank", // 2 - namespace = "telescope-blank"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 - // 8 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "telescope-blank", // 2 - namespace = "telescope-blank"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 - // 8 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "telescope-blank", // 2 - namespace = "telescope-blank"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 - // 8 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); diff --git a/packages/nova-subscribe/.build.telescope-blank/web.browser/packages/telescope-blank.js.map b/packages/nova-subscribe/.build.telescope-blank/web.browser/packages/telescope-blank.js.map deleted file mode 100644 index b0ae4c4bc..000000000 --- a/packages/nova-subscribe/.build.telescope-blank/web.browser/packages/telescope-blank.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"/packages/telescope-blank.js","sources":["telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/package-tap.i18n","telescope-blank/lib/both.js","telescope-blank/lib/routes.js","telescope-blank/lib/client/templates/template.html","telescope-blank/lib/client/templates/template.js","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json"],"names":[],"mappings":";;;;;;;;AAAA,iH;;AAEA,+D;AACA,gD;AACA,2C;AACA,2E;AACA,uH;;AAEA,qD;AACA,6B;AACA,yC;;;;;;;;;;;;;;;;;;;ACVA,uB;;AAEA,sB;AACA,iC;AACA,mB;AACA,4D;AACA,uF;AACA,0E;AACA,e;AACA,mF;AACA,yE;AACA,K;AACA,G;AACA,C;AACA,qC;;AAEA,iB;;AAEA,qB;AACA,gC;AACA,mB;AACA,iB;AACA,mB;AACA,e;AACA,8F;AACA,wF;AACA,K;AACA,G;AACA,C;AACA,wC;;AAEA,kB;;AAEA,8B;AACA,e;AACA,C;;;;;;;;;;;;;;;;;;ACnCA,4B;AACA,E;AACA,gC;AACA,wB;AACA,2C;AACA,K;;AAEA,G;;;;;;;;;;;;;;;;;;;ACNA,uC;AACA,kF;AACA,kB;AACA,gD;AACA,mD;AACA,Y;AACA,I;;;;;;;;;;;;;;;;;;;ACPA,4B;;AAEA,mD;AACA,uB;AACA,4B;AACA,K;AACA,K;;AAEA,G;;;;;;;;;;;;;;;;;;;ACRA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;AACA,8E;;AAEA,oD;AACA,8C;;AAEA,yC;AACA,C;;;;;;;;;;;;;;;;;;;ACbA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;AACA,gD;AACA,qF;;;;;;;;;;;;;;;;;;;ACRA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;;;;;;;;;;;;;;;;;;;ACNA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;;;;;;;;;;;;;;;;;;;ACNA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;;;;;;;;;;;;;;;;;;;ACNA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C","sourcesContent":["TAPi18n.packages[\"telescope-blank\"] = {\"translation_function_name\":\"__\",\"helper_name\":\"_\",\"namespace\":\"project\"};\n\n// define package's translation function (proxy to the i18next)\n__ = TAPi18n._getPackageI18nextProxy(\"project\");\n// define the package's templates registrar\nregisterI18nTemplate = TAPi18n._getRegisterHelpersProxy(\"telescope-blank\");\nregisterTemplate = registerI18nTemplate; // XXX OBSOLETE, kept for backward compatibility will be removed in the future\n\n// Record the list of templates prior to package load\nvar _ = Package.underscore._;\nnon_package_templates = _.keys(Template);\n","// Custom Post Property\n\nvar customProperty = {\n propertyName: 'customProperty',\n propertySchema: {\n type: String, // property type\n label: 'customLabel', // key string used for internationalization\n optional: true, // make this property optional\n autoform: {\n editable: true, // make this property editable by users\n type: \"bootstrap-datetimepicker\" // assign a custom input type\n }\n }\n}\naddToPostSchema.push(customProperty);\n\n// Custom Setting\n\nvar customSetting = {\n propertyName: 'customSetting',\n propertySchema: {\n type: String,\n optional: true,\n autoform: {\n group: 'customGroup', // assign custom group (fieldset) in Settings form\n private: true // mark as private (not published to client)\n }\n }\n}\naddToSettingsSchema.push(customSetting);\n\n// Global Function\n\nmyFunction = function (a, b) {\n return a + b;\n}","Meteor.startup(function () {\n \n Router.route('/custom-path', {\n name: 'customRoute',\n template: getTemplate('customTemplate')\n });\n\n});","\nTemplate.__checkName(\"customTemplate\");\nTemplate[\"customTemplate\"] = new Template(\"Template.customTemplate\", (function() {\n var view = this;\n return [ \"Hi there, \", Blaze.View(function() {\n return Spacebars.mustache(view.lookup(\"name\"));\n }), \"!\" ];\n}));\n","Meteor.startup(function () {\n\n Template[getTemplate('customTemplate')].helpers({\n name: function () {\n return \"Bruce Willis\";\n }\n });\n\n});\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nvar package_templates = _.difference(_.keys(Template), non_package_templates);\n\nfor (var i = 0; i < package_templates.length; i++) {\n var package_template = package_templates[i];\n\n registerI18nTemplate(package_template);\n}\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n// integrate the fallback language translations \nTAPi18n.addResourceBundle(\"en\", namespace, {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n"]} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-blank/web.browser/packages/telescope-blank/lib/client/scss/package.scss.css b/packages/nova-subscribe/.build.telescope-blank/web.browser/packages/telescope-blank/lib/client/scss/package.scss.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/nova-subscribe/.build.telescope-blank/web.cordova.json b/packages/nova-subscribe/.build.telescope-blank/web.cordova.json deleted file mode 100644 index be7324869..000000000 --- a/packages/nova-subscribe/.build.telescope-blank/web.cordova.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "format": "unipackage-unibuild-pre1", - "packageVariables": [ - { - "name": "myFunction", - "export": true - }, - { - "name": "__" - }, - { - "name": "registerI18nTemplate" - }, - { - "name": "registerTemplate" - }, - { - "name": "non_package_templates" - } - ], - "uses": [ - { - "package": "meteor" - }, - { - "package": "tap:i18n" - }, - { - "package": "iron:router" - }, - { - "package": "telescope-base" - }, - { - "package": "telescope-lib" - }, - { - "package": "telescope-i18n" - }, - { - "package": "fourseven:scss" - }, - { - "package": "jquery" - }, - { - "package": "underscore" - }, - { - "package": "templating" - } - ], - "resources": [ - { - "type": "css", - "file": "web.cordova/packages/telescope-blank/lib/client/scss/package.scss.css", - "length": 0, - "offset": 0, - "servePath": "/packages/telescope-blank/lib/client/scss/package.scss.css" - }, - { - "type": "prelink", - "file": "web.cordova/packages/telescope-blank.js", - "length": 25168, - "offset": 0, - "servePath": "/packages/telescope-blank.js", - "sourceMap": "web.cordova/packages/telescope-blank.js.map" - } - ] -} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-blank/web.cordova/packages/telescope-blank.js b/packages/nova-subscribe/.build.telescope-blank/web.cordova/packages/telescope-blank.js deleted file mode 100644 index cc96fb9a0..000000000 --- a/packages/nova-subscribe/.build.telescope-blank/web.cordova/packages/telescope-blank.js +++ /dev/null @@ -1,313 +0,0 @@ -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/package-i18n.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -TAPi18n.packages["telescope-blank"] = {"translation_function_name":"__","helper_name":"_","namespace":"project"}; // 1 - // 2 -// define package's translation function (proxy to the i18next) // 3 -__ = TAPi18n._getPackageI18nextProxy("project"); // 4 -// define the package's templates registrar // 5 -registerI18nTemplate = TAPi18n._getRegisterHelpersProxy("telescope-blank"); // 6 -registerTemplate = registerI18nTemplate; // XXX OBSOLETE, kept for backward compatibility will be removed in the future - // 8 -// Record the list of templates prior to package load // 9 -var _ = Package.underscore._; // 10 -non_package_templates = _.keys(Template); // 11 - // 12 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/lib/both.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -// Custom Post Property // 1 - // 2 -var customProperty = { // 3 - propertyName: 'customProperty', // 4 - propertySchema: { // 5 - type: String, // property type // 6 - label: 'customLabel', // key string used for internationalization // 7 - optional: true, // make this property optional // 8 - autoform: { // 9 - editable: true, // make this property editable by users // 10 - type: "bootstrap-datetimepicker" // assign a custom input type // 11 - } // 12 - } // 13 -} // 14 -addToPostSchema.push(customProperty); // 15 - // 16 -// Custom Setting // 17 - // 18 -var customSetting = { // 19 - propertyName: 'customSetting', // 20 - propertySchema: { // 21 - type: String, // 22 - optional: true, // 23 - autoform: { // 24 - group: 'customGroup', // assign custom group (fieldset) in Settings form // 25 - private: true // mark as private (not published to client) // 26 - } // 27 - } // 28 -} // 29 -addToSettingsSchema.push(customSetting); // 30 - // 31 -// Global Function // 32 - // 33 -myFunction = function (a, b) { // 34 - return a + b; // 35 -} // 36 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/lib/routes.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -Meteor.startup(function () { // 1 - // 2 - Router.route('/custom-path', { // 3 - name: 'customRoute', // 4 - template: getTemplate('customTemplate') // 5 - }); // 6 - // 7 -}); // 8 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/lib/client/templates/template.template.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // - // 1 -Template.__checkName("customTemplate"); // 2 -Template["customTemplate"] = new Template("Template.customTemplate", (function() { // 3 - var view = this; // 4 - return [ "Hi there, ", Blaze.View(function() { // 5 - return Spacebars.mustache(view.lookup("name")); // 6 - }), "!" ]; // 7 -})); // 8 - // 9 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/lib/client/templates/template.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -Meteor.startup(function () { // 1 - // 2 - Template[getTemplate('customTemplate')].helpers({ // 3 - name: function () { // 4 - return "Bruce Willis"; // 5 - } // 6 - }); // 7 - // 8 -}); // 9 - // 10 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "telescope-blank", // 2 - namespace = "telescope-blank"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -var package_templates = _.difference(_.keys(Template), non_package_templates); // 8 - // 9 -for (var i = 0; i < package_templates.length; i++) { // 10 - var package_template = package_templates[i]; // 11 - // 12 - registerI18nTemplate(package_template); // 13 -} // 14 - // 15 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "telescope-blank", // 2 - namespace = "telescope-blank"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -// integrate the fallback language translations // 8 -TAPi18n.addResourceBundle("en", namespace, {"translation_key":"translation string"}); // 9 - // 10 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "telescope-blank", // 2 - namespace = "telescope-blank"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 - // 8 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "telescope-blank", // 2 - namespace = "telescope-blank"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 - // 8 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "telescope-blank", // 2 - namespace = "telescope-blank"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 - // 8 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-blank/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "telescope-blank", // 2 - namespace = "telescope-blank"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 - // 8 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); diff --git a/packages/nova-subscribe/.build.telescope-blank/web.cordova/packages/telescope-blank.js.map b/packages/nova-subscribe/.build.telescope-blank/web.cordova/packages/telescope-blank.js.map deleted file mode 100644 index b0ae4c4bc..000000000 --- a/packages/nova-subscribe/.build.telescope-blank/web.cordova/packages/telescope-blank.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"/packages/telescope-blank.js","sources":["telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/package-tap.i18n","telescope-blank/lib/both.js","telescope-blank/lib/routes.js","telescope-blank/lib/client/templates/template.html","telescope-blank/lib/client/templates/template.js","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json","telescope-blank//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json"],"names":[],"mappings":";;;;;;;;AAAA,iH;;AAEA,+D;AACA,gD;AACA,2C;AACA,2E;AACA,uH;;AAEA,qD;AACA,6B;AACA,yC;;;;;;;;;;;;;;;;;;;ACVA,uB;;AAEA,sB;AACA,iC;AACA,mB;AACA,4D;AACA,uF;AACA,0E;AACA,e;AACA,mF;AACA,yE;AACA,K;AACA,G;AACA,C;AACA,qC;;AAEA,iB;;AAEA,qB;AACA,gC;AACA,mB;AACA,iB;AACA,mB;AACA,e;AACA,8F;AACA,wF;AACA,K;AACA,G;AACA,C;AACA,wC;;AAEA,kB;;AAEA,8B;AACA,e;AACA,C;;;;;;;;;;;;;;;;;;ACnCA,4B;AACA,E;AACA,gC;AACA,wB;AACA,2C;AACA,K;;AAEA,G;;;;;;;;;;;;;;;;;;;ACNA,uC;AACA,kF;AACA,kB;AACA,gD;AACA,mD;AACA,Y;AACA,I;;;;;;;;;;;;;;;;;;;ACPA,4B;;AAEA,mD;AACA,uB;AACA,4B;AACA,K;AACA,K;;AAEA,G;;;;;;;;;;;;;;;;;;;ACRA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;AACA,8E;;AAEA,oD;AACA,8C;;AAEA,yC;AACA,C;;;;;;;;;;;;;;;;;;;ACbA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;AACA,gD;AACA,qF;;;;;;;;;;;;;;;;;;;ACRA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;;;;;;;;;;;;;;;;;;;ACNA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;;;;;;;;;;;;;;;;;;;ACNA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C;;;;;;;;;;;;;;;;;;;ACNA,6B;AACA,qC;AACA,kC;;AAEA,gC;AACA,yD;AACA,C","sourcesContent":["TAPi18n.packages[\"telescope-blank\"] = {\"translation_function_name\":\"__\",\"helper_name\":\"_\",\"namespace\":\"project\"};\n\n// define package's translation function (proxy to the i18next)\n__ = TAPi18n._getPackageI18nextProxy(\"project\");\n// define the package's templates registrar\nregisterI18nTemplate = TAPi18n._getRegisterHelpersProxy(\"telescope-blank\");\nregisterTemplate = registerI18nTemplate; // XXX OBSOLETE, kept for backward compatibility will be removed in the future\n\n// Record the list of templates prior to package load\nvar _ = Package.underscore._;\nnon_package_templates = _.keys(Template);\n","// Custom Post Property\n\nvar customProperty = {\n propertyName: 'customProperty',\n propertySchema: {\n type: String, // property type\n label: 'customLabel', // key string used for internationalization\n optional: true, // make this property optional\n autoform: {\n editable: true, // make this property editable by users\n type: \"bootstrap-datetimepicker\" // assign a custom input type\n }\n }\n}\naddToPostSchema.push(customProperty);\n\n// Custom Setting\n\nvar customSetting = {\n propertyName: 'customSetting',\n propertySchema: {\n type: String,\n optional: true,\n autoform: {\n group: 'customGroup', // assign custom group (fieldset) in Settings form\n private: true // mark as private (not published to client)\n }\n }\n}\naddToSettingsSchema.push(customSetting);\n\n// Global Function\n\nmyFunction = function (a, b) {\n return a + b;\n}","Meteor.startup(function () {\n \n Router.route('/custom-path', {\n name: 'customRoute',\n template: getTemplate('customTemplate')\n });\n\n});","\nTemplate.__checkName(\"customTemplate\");\nTemplate[\"customTemplate\"] = new Template(\"Template.customTemplate\", (function() {\n var view = this;\n return [ \"Hi there, \", Blaze.View(function() {\n return Spacebars.mustache(view.lookup(\"name\"));\n }), \"!\" ];\n}));\n","Meteor.startup(function () {\n\n Template[getTemplate('customTemplate')].helpers({\n name: function () {\n return \"Bruce Willis\";\n }\n });\n\n});\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nvar package_templates = _.difference(_.keys(Template), non_package_templates);\n\nfor (var i = 0; i < package_templates.length; i++) {\n var package_template = package_templates[i];\n\n registerI18nTemplate(package_template);\n}\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n// integrate the fallback language translations \nTAPi18n.addResourceBundle(\"en\", namespace, {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n","var _ = Package.underscore._,\n package_name = \"telescope-blank\",\n namespace = \"telescope-blank\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n"]} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-blank/web.cordova/packages/telescope-blank/lib/client/scss/package.scss.css b/packages/nova-subscribe/.build.telescope-blank/web.cordova/packages/telescope-blank/lib/client/scss/package.scss.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/nova-subscribe/.build.telescope-email/buildinfo.json b/packages/nova-subscribe/.build.telescope-email/buildinfo.json deleted file mode 100644 index 84b09ad01..000000000 --- a/packages/nova-subscribe/.build.telescope-email/buildinfo.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "builtBy": "meteor/14", - "buildDependencies": { - "os.json": { - "files": { - "/Users/sacha/Dev/Telescope/packages/telescope-blank/package.js": "19170c0de8e8837b9116313ea4db890e0b4e7c62", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/.npm/package/npm-shrinkwrap.json": "437deca86f32425d4dd02e9d4ac7cd402ab1b257", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/server/email.js": "8ba42b8db30a63759428eba2b27ec4ae90e7a6f7", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/server/routes.js": "1ceba9acfe81f7d7bdf9343893fb39054f08b32c", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/server/templates/emailAccountApproved.handlebars": "5c8d2fbaa3c8b10c73830f7db3508bd5a8511cf8", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/server/templates/emailInvite.handlebars": "18d17b784319376a32443c15d70818eb0c05bb6f", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/server/templates/emailNewComment.handlebars": "a1980bb8f91f2046e2bfc90cda5dda634ff82e8d", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/server/templates/emailNewPost.handlebars": "294b0c796a1f22d16a7d22445084e9fdf9e68ef3", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/server/templates/emailNewReply.handlebars": "3dda93fea4bdcf71a50632752ab5a1c0f3aca368", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/server/templates/emailNewUser.handlebars": "44899f335a640000c1d7ab55db9bf9e02555d09b", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/server/templates/emailTest.handlebars": "f0c2ea7838072d20c3e8319673b24a928aed2425", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/lib/server/templates/emailWrapper.handlebars": "9fba2c42cb243f25a4c77d17eddbfd484d1cf4ea", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4" - }, - "directories": [] - }, - "web.browser.json": { - "files": { - "/Users/sacha/Dev/Telescope/packages/telescope-blank/package.js": "19170c0de8e8837b9116313ea4db890e0b4e7c62", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/.npm/package/npm-shrinkwrap.json": "437deca86f32425d4dd02e9d4ac7cd402ab1b257", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4" - }, - "directories": [] - }, - "web.cordova.json": { - "files": { - "/Users/sacha/Dev/Telescope/packages/telescope-blank/package.js": "19170c0de8e8837b9116313ea4db890e0b4e7c62", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/.npm/package/npm-shrinkwrap.json": "437deca86f32425d4dd02e9d4ac7cd402ab1b257", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4", - "/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json": "d103be8932357cacdb9d285fde2a5cd35ddb70d4" - }, - "directories": [] - } - }, - "pluginDependencies": { - "files": { - "/Users/sacha/Dev/Telescope/packages/telescope-blank/package.js": "19170c0de8e8837b9116313ea4db890e0b4e7c62" - }, - "directories": [] - }, - "source": "/Users/sacha/Dev/Telescope/packages/telescope-blank", - "buildTimeDirectDependencies": { - "telescope-i18n": "0.0.0+814e6fdbcab1588b923aaaa282cdda4873ee4ed7", - "tap:i18n": "1.2.1", - "telescope-lib": "0.2.9+a4deeda0719a0c6dd02042b6e69784b41ce7c1fe", - "cmather:handlebars-server": "2.0.0", - "iron:router": "1.0.1", - "meteor": "1.1.3", - "telescope-base": "0.0.0+0a39fb31ae7073e53d4f1c386732d5501a34b38f" - }, - "buildTimePluginDependencies": {}, - "cordovaDependencies": null -} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-email/isopack.json b/packages/nova-subscribe/.build.telescope-email/isopack.json deleted file mode 100644 index de0089331..000000000 --- a/packages/nova-subscribe/.build.telescope-email/isopack.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "isopack-1": { - "name": "telescope-email", - "summary": "Telescope email package", - "version": "0.2.9+0a592efc85d83db553743a37ef17747831a10a33", - "earliestCompatibleVersion": "0.0.0", - "isTest": false, - "builds": [ - { - "arch": "os", - "path": "os.json" - }, - { - "arch": "web.browser", - "path": "web.browser.json" - }, - { - "arch": "web.cordova", - "path": "web.cordova.json" - } - ], - "plugins": [] - } -} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-email/os.json b/packages/nova-subscribe/.build.telescope-email/os.json deleted file mode 100644 index c6e841a2e..000000000 --- a/packages/nova-subscribe/.build.telescope-email/os.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "format": "unipackage-unibuild-pre1", - "packageVariables": [ - { - "name": "buildEmailTemplate", - "export": true - }, - { - "name": "sendEmail", - "export": true - }, - { - "name": "buildAndSendEmail", - "export": true - }, - { - "name": "getEmailTemplate", - "export": true - }, - { - "name": "html" - }, - { - "name": "Handlebars" - } - ], - "uses": [ - { - "package": "meteor" - }, - { - "package": "iron:router" - }, - { - "package": "telescope-base" - }, - { - "package": "telescope-lib" - }, - { - "package": "telescope-i18n" - }, - { - "package": "tap:i18n" - }, - { - "package": "cmather:handlebars-server" - } - ], - "node_modules": "npm/node_modules", - "resources": [ - { - "type": "prelink", - "file": "os/packages/telescope-email.js", - "length": 50123, - "offset": 0, - "servePath": "/packages/telescope-email.js", - "sourceMap": "os/packages/telescope-email.js.map" - } - ] -} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-email/os/packages/telescope-email.js b/packages/nova-subscribe/.build.telescope-email/os/packages/telescope-email.js deleted file mode 100644 index ee572cce0..000000000 --- a/packages/nova-subscribe/.build.telescope-email/os/packages/telescope-email.js +++ /dev/null @@ -1,510 +0,0 @@ -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/lib/server/email.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // - // 1 -var htmlToText = Npm.require('html-to-text'); // 2 - // 3 -// check if server-side template has been customized, and return the correct template // 4 -getEmailTemplate = function (template) { // 5 - var emailTemplate = Handlebars.templates[getTemplate(template)]; // 6 - if(typeof emailTemplate === 'function'){ // 7 - return Handlebars.templates[getTemplate(template)]; // 8 - } else { // 9 - console.log('Cannot find template '+getTemplate(template)+', defaulting to '+template); // 10 - return Handlebars.templates[template]; // 11 - } // 12 -} // 13 - // 14 -buildEmailTemplate = function (htmlContent) { // 15 - // 16 - var emailProperties = { // 17 - headerColor: getSetting('headerColor', '#444444'), // 18 - buttonColor: getSetting('buttonColor', '#DD3416'), // 19 - siteName: getSetting('title'), // 20 - tagline: getSetting('tagline'), // 21 - siteUrl: getSiteUrl(), // 22 - body: htmlContent, // 23 - unsubscribe: '', // 24 - accountLink: getSiteUrl()+'account', // 25 - footer: getSetting('emailFooter'), // 26 - logoUrl: getSetting('logoUrl'), // 27 - logoHeight: getSetting('logoHeight'), // 28 - logoWidth: getSetting('logoWidth') // 29 - } // 30 - // 31 - var emailHTML = Handlebars.templates[getTemplate('emailWrapper')](emailProperties); // 32 - // 33 - var inlinedHTML = Async.runSync(function(done) { // 34 - juice.juiceContent(emailHTML, { // 35 - url: getSiteUrl(), // 36 - removeStyleTags: false // 37 - }, function (error, result) { // 38 - done(null, result); // 39 - }); // 40 - }).result; // 41 - // 42 - var doctype = '' - // 44 - return doctype+inlinedHTML; // 45 -} // 46 - // 47 -sendEmail = function(to, subject, html, text){ // 48 - // 49 - // TODO: limit who can send emails // 50 - // TODO: fix this error: Error: getaddrinfo ENOTFOUND // 51 - // 52 - var from = getSetting('defaultEmail', 'noreply@example.com'); // 53 - var siteName = getSetting('title'); // 54 - var subject = '['+siteName+'] '+subject; // 55 - // 56 - if (typeof text == 'undefined'){ // 57 - // Auto-generate text version if it doesn't exist. Has bugs, but should be good enough. // 58 - var text = htmlToText.fromString(html, { // 59 - wordwrap: 130 // 60 - }); // 61 - } // 62 - // 63 - console.log('//////// sending email…'); // 64 - console.log('from: '+from); // 65 - console.log('to: '+to); // 66 - console.log('subject: '+subject); // 67 - // console.log('html: '+html); // 68 - // console.log('text: '+text); // 69 - // 70 - var email = { // 71 - from: from, // 72 - to: to, // 73 - subject: subject, // 74 - text: text, // 75 - html: html // 76 - } // 77 - // 78 - Email.send(email); // 79 - // 80 - return email; // 81 -}; // 82 - // 83 -buildAndSendEmail = function (to, subject, template, properties) { // 84 - var html = buildEmailTemplate(getEmailTemplate(template)(properties)); // 85 - return sendEmail (to, subject, html); // 86 -} // 87 - // 88 -Meteor.methods({ // 89 - testEmail: function () { // 90 - if(isAdminById(this.userId)){ // 91 - var email = buildAndSendEmail (getSetting('defaultEmail'), 'Telescope email test', 'emailTest', {date: new Date()}); - } // 93 - } // 94 -}) // 95 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/lib/server/routes.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -Meteor.startup(function () { // 1 - // 2 - // New user email // 3 - // 4 - Router.route('/email/new-user/:id?', { // 5 - name: 'newUser', // 6 - where: 'server', // 7 - action: function() { // 8 - var user = Meteor.users.findOne(this.params.id); // 9 - var emailProperties = { // 10 - profileUrl: getProfileUrl(user), // 11 - username: getUserName(user) // 12 - }; // 13 - html = getEmailTemplate('emailNewUser')(emailProperties); // 14 - this.response.write(buildEmailTemplate(html)); // 15 - this.response.end(); // 16 - } // 17 - }); // 18 - // 19 - // New post email // 20 - // 21 - Router.route('/email/new-post/:id?', { // 22 - name: 'newPost', // 23 - where: 'server', // 24 - action: function() { // 25 - var post = Posts.findOne(this.params.id); // 26 - console.log(templates) // 27 - if (!!post) { // 28 - html = getEmailTemplate('emailNewPost')(getPostProperties(post)); // 29 - } else { // 30 - html = "

No post found.

" // 31 - } // 32 - this.response.write(buildEmailTemplate(html)); // 33 - this.response.end(); // 34 - } // 35 - }); // 36 - // 37 - // 38 -}); // 39 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/lib/server/templates/handlebars.emailAccountApproved.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile("{{username}}, welcome to {{siteTitle}}!

\n\nYou've just been invited. Start posting.

");Handlebars.templates["emailAccountApproved"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: "emailAccountApproved"});}; -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/lib/server/templates/handlebars.emailInvite.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile("\n{{invitedBy}}\ninvited you to join {{communityName}}\n

\n\n{{#if newUser}}\nJoin {{communityName}}\n{{else}}\nSign in to {{communityName}}\n{{/if}}\n

\n");Handlebars.templates["emailInvite"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: "emailInvite"});}; -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/lib/server/templates/handlebars.emailNewComment.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile("\n{{comment.author}}\nleft a new comment on \n{{post.title}}:\n\n

\n\n
\n{{{body}}}\n
\n
\n\nDiscuss

");Handlebars.templates["emailNewComment"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: "emailNewComment"});}; -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/lib/server/templates/handlebars.emailNewPost.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile("\n{{postAuthorName}}\nhas created a new post:\n{{#if url}}\n {{postTitle}}}\n{{else}}\n {{postTitle}}}\n{{/if}}\n

\n\n{{#if body}}\n
\n {{{body}}}\n
\n
\n{{/if}}\n\nDiscuss

");Handlebars.templates["emailNewPost"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: "emailNewPost"});}; -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/lib/server/templates/handlebars.emailNewReply.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile("{{comment.author}}\nhas replied to your comment on\n{{post.title}}:\n\n

\n\n
\n{{{body}}}\n
\n
\n\nDiscuss

");Handlebars.templates["emailNewReply"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: "emailNewReply"});}; -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/lib/server/templates/handlebars.emailNewUser.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile("A new user account has been created: {{username}}

");Handlebars.templates["emailNewUser"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: "emailNewUser"});}; -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/lib/server/templates/handlebars.emailTest.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile("This is just a test

\n\nSent at {{date}}.

");Handlebars.templates["emailTest"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: "emailTest"});}; -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/lib/server/templates/handlebars.emailWrapper.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile("\n\n \n \n \n\n {{siteName}}\n \n\n\n\n
\n\n\n\n \n \n \n
\n\n \n \n \n \n \n \n \n \n \n \n \n
\n {{#if logoUrl}}\n \"{{siteName}}\"/\n {{else}}\n {{siteName}}\n {{/if}}\n
\n
\n\n {{{body}}}\n\n
\n Change your notifications settings

\n {{{footer}}}\n
\n \n\n
\n\n
\n
\n\n\n");Handlebars.templates["emailWrapper"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: "emailWrapper"});}; -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "project", // 2 - namespace = "project"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -TAPi18n.languages_available_for_project["de"] = ["German","Deutsch"]; // 8 -TAPi18n._enable({"helper_name":"_","supported_languages":null,"i18n_files_route":"/tap-i18n","cdn_path":null}); // 9 -TAPi18n.languages_available_for_project["en"] = ["English","English"]; // 10 -if(_.isUndefined(TAPi18n.translations["de"])) { // 11 - TAPi18n.translations["de"] = {}; // 12 -} // 13 - // 14 -if(_.isUndefined(TAPi18n.translations["de"][namespace])) { // 15 - TAPi18n.translations["de"][namespace] = {}; // 16 -} // 17 - // 18 -_.extend(TAPi18n.translations["de"][namespace], {"translation_key":"translation string"}); // 19 - // 20 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "project", // 2 - namespace = "project"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -// integrate the fallback language translations // 8 -TAPi18n.addResourceBundle("en", namespace, {"translation_key":"translation string"}); // 9 - // 10 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "project", // 2 - namespace = "project"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -TAPi18n.languages_available_for_project["es"] = ["Spanish (Spain)","Español"]; // 8 -if(_.isUndefined(TAPi18n.translations["es"])) { // 9 - TAPi18n.translations["es"] = {}; // 10 -} // 11 - // 12 -if(_.isUndefined(TAPi18n.translations["es"][namespace])) { // 13 - TAPi18n.translations["es"][namespace] = {}; // 14 -} // 15 - // 16 -_.extend(TAPi18n.translations["es"][namespace], {"translation_key":"translation string"}); // 17 - // 18 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "project", // 2 - namespace = "project"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -TAPi18n.languages_available_for_project["fr"] = ["French (France)","Français"]; // 8 -if(_.isUndefined(TAPi18n.translations["fr"])) { // 9 - TAPi18n.translations["fr"] = {}; // 10 -} // 11 - // 12 -if(_.isUndefined(TAPi18n.translations["fr"][namespace])) { // 13 - TAPi18n.translations["fr"][namespace] = {}; // 14 -} // 15 - // 16 -_.extend(TAPi18n.translations["fr"][namespace], {"translation_key":"translation string"}); // 17 - // 18 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "project", // 2 - namespace = "project"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -TAPi18n.languages_available_for_project["it"] = ["Italian","Italiano"]; // 8 -if(_.isUndefined(TAPi18n.translations["it"])) { // 9 - TAPi18n.translations["it"] = {}; // 10 -} // 11 - // 12 -if(_.isUndefined(TAPi18n.translations["it"][namespace])) { // 13 - TAPi18n.translations["it"][namespace] = {}; // 14 -} // 15 - // 16 -_.extend(TAPi18n.translations["it"][namespace], {"translation_key":"translation string"}); // 17 - // 18 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "project", // 2 - namespace = "project"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -TAPi18n.languages_available_for_project["zh-CN"] = ["zh-CN","zh-CN"]; // 8 -if(_.isUndefined(TAPi18n.translations["zh-CN"])) { // 9 - TAPi18n.translations["zh-CN"] = {}; // 10 -} // 11 - // 12 -if(_.isUndefined(TAPi18n.translations["zh-CN"][namespace])) { // 13 - TAPi18n.translations["zh-CN"][namespace] = {}; // 14 -} // 15 - // 16 -_.extend(TAPi18n.translations["zh-CN"][namespace], {"translation_key":"translation string"}); // 17 - // 18 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); diff --git a/packages/nova-subscribe/.build.telescope-email/os/packages/telescope-email.js.map b/packages/nova-subscribe/.build.telescope-email/os/packages/telescope-email.js.map deleted file mode 100644 index c5c789241..000000000 --- a/packages/nova-subscribe/.build.telescope-email/os/packages/telescope-email.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"/packages/telescope-email.js","sources":["telescope-email/lib/server/email.js","telescope-email/lib/server/routes.js","telescope-email/lib/server/templates/emailAccountApproved.handlebars","telescope-email/lib/server/templates/emailInvite.handlebars","telescope-email/lib/server/templates/emailNewComment.handlebars","telescope-email/lib/server/templates/emailNewPost.handlebars","telescope-email/lib/server/templates/emailNewReply.handlebars","telescope-email/lib/server/templates/emailNewUser.handlebars","telescope-email/lib/server/templates/emailTest.handlebars","telescope-email/lib/server/templates/emailWrapper.handlebars","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json"],"names":[],"mappings":";;;;;;;;;AACA,6C;;AAEA,qF;AACA,wC;AACA,kE;AACA,0C;AACA,uD;AACA,U;AACA,2F;AACA,0C;AACA,G;AACA,C;;AAEA,6C;;AAEA,yB;AACA,sD;AACA,sD;AACA,kC;AACA,mC;AACA,0B;AACA,sB;AACA,oB;AACA,wC;AACA,sC;AACA,mC;AACA,yC;AACA,sC;AACA,G;;AAEA,qF;;AAEA,kD;AACA,mC;AACA,wB;AACA,4B;AACA,iC;AACA,yB;AACA,O;AACA,Y;;AAEA,wH;AACA,E;AACA,6B;AACA,C;;AAEA,8C;;AAEA,oC;AACA,uD;AACA,E;AACA,+D;AACA,qC;AACA,0C;;AAEA,kC;AACA,4F;AACA,4C;AACA,qB;AACA,O;AACA,G;;AAEA,yC;AACA,6B;AACA,yB;AACA,mC;AACA,gC;AACA,gC;;AAEA,e;AACA,gB;AACA,Y;AACA,sB;AACA,e;AACA,c;AACA,G;;AAEA,oB;;AAEA,e;AACA,E;;AAEA,kE;AACA,wE;AACA,uC;AACA,C;;AAEA,gB;AACA,0B;AACA,iC;AACA,0H;AACA,K;AACA,G;AACA,E;;;;;;;;;;;;;;;;;;AC9FA,4B;;AAEA,mB;;AAEA,wC;AACA,oB;AACA,oB;AACA,wB;AACA,sD;AACA,6B;AACA,wC;AACA,mC;AACA,Q;AACA,+D;AACA,oD;AACA,0B;AACA,K;AACA,K;;AAEA,mB;;AAEA,wC;AACA,oB;AACA,oB;AACA,wB;AACA,+C;AACA,4B;AACA,mB;AACA,yE;AACA,c;AACA,wC;AACA,O;AACA,oD;AACA,0B;AACA,K;AACA,K;;;AAGA,G;;;;;;;;;;;;;;;;;;ACtCA,0f;;;;;;;;;;;;;;;;;;ACAA,8mB;;;;;;;;;;;;;;;;;;ACAA,spB;;;;;;;;;;;;;;;;;;ACAA,4rB;;;;;;;;;;;;;;;;;;ACAA,wpB;;;;;;;;;;;;;;;;;;ACAA,mc;;;;;;;;;;;;;;;;;;ACAA,6Z;;;;;;;;;;;;;;;;;;ACAA,2tJ;;;;;;;;;;;;;;;;;;ACAA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,qE;AACA,+G;AACA,sE;AACA,+C;AACA,kC;AACA,C;;AAEA,0D;AACA,6C;AACA,C;;AAEA,0F;;;;;;;;;;;;;;;;;;;AClBA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,gD;AACA,qF;;;;;;;;;;;;;;;;;;;ACRA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,8E;AACA,+C;AACA,kC;AACA,C;;AAEA,0D;AACA,6C;AACA,C;;AAEA,0F;;;;;;;;;;;;;;;;;;;AChBA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,+E;AACA,+C;AACA,kC;AACA,C;;AAEA,0D;AACA,6C;AACA,C;;AAEA,0F;;;;;;;;;;;;;;;;;;;AChBA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,uE;AACA,+C;AACA,kC;AACA,C;;AAEA,0D;AACA,6C;AACA,C;;AAEA,0F;;;;;;;;;;;;;;;;;;;AChBA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,qE;AACA,kD;AACA,qC;AACA,C;;AAEA,6D;AACA,gD;AACA,C;;AAEA,6F","sourcesContent":["\nvar htmlToText = Npm.require('html-to-text');\n\n// check if server-side template has been customized, and return the correct template\ngetEmailTemplate = function (template) {\n var emailTemplate = Handlebars.templates[getTemplate(template)];\n if(typeof emailTemplate === 'function'){\n return Handlebars.templates[getTemplate(template)];\n } else {\n console.log('Cannot find template '+getTemplate(template)+', defaulting to '+template);\n return Handlebars.templates[template];\n }\n}\n\nbuildEmailTemplate = function (htmlContent) {\n\n var emailProperties = {\n headerColor: getSetting('headerColor', '#444444'),\n buttonColor: getSetting('buttonColor', '#DD3416'),\n siteName: getSetting('title'),\n tagline: getSetting('tagline'),\n siteUrl: getSiteUrl(),\n body: htmlContent,\n unsubscribe: '',\n accountLink: getSiteUrl()+'account',\n footer: getSetting('emailFooter'),\n logoUrl: getSetting('logoUrl'),\n logoHeight: getSetting('logoHeight'),\n logoWidth: getSetting('logoWidth')\n }\n\n var emailHTML = Handlebars.templates[getTemplate('emailWrapper')](emailProperties);\n\n var inlinedHTML = Async.runSync(function(done) {\n juice.juiceContent(emailHTML, {\n url: getSiteUrl(),\n removeStyleTags: false\n }, function (error, result) {\n done(null, result);\n });\n }).result;\n\n var doctype = ''\n \n return doctype+inlinedHTML;\n}\n\nsendEmail = function(to, subject, html, text){\n\n // TODO: limit who can send emails\n // TODO: fix this error: Error: getaddrinfo ENOTFOUND\n \n var from = getSetting('defaultEmail', 'noreply@example.com');\n var siteName = getSetting('title');\n var subject = '['+siteName+'] '+subject;\n\n if (typeof text == 'undefined'){\n // Auto-generate text version if it doesn't exist. Has bugs, but should be good enough. \n var text = htmlToText.fromString(html, {\n wordwrap: 130\n });\n }\n\n console.log('//////// sending email…');\n console.log('from: '+from);\n console.log('to: '+to);\n console.log('subject: '+subject);\n // console.log('html: '+html);\n // console.log('text: '+text);\n\n var email = {\n from: from, \n to: to, \n subject: subject, \n text: text,\n html: html\n }\n\n Email.send(email);\n\n return email;\n};\n\nbuildAndSendEmail = function (to, subject, template, properties) {\n var html = buildEmailTemplate(getEmailTemplate(template)(properties));\n return sendEmail (to, subject, html);\n}\n\nMeteor.methods({\n testEmail: function () {\n if(isAdminById(this.userId)){\n var email = buildAndSendEmail (getSetting('defaultEmail'), 'Telescope email test', 'emailTest', {date: new Date()});\n }\n }\n})","Meteor.startup(function () {\n\n // New user email\n\n Router.route('/email/new-user/:id?', {\n name: 'newUser',\n where: 'server',\n action: function() {\n var user = Meteor.users.findOne(this.params.id);\n var emailProperties = {\n profileUrl: getProfileUrl(user),\n username: getUserName(user)\n };\n html = getEmailTemplate('emailNewUser')(emailProperties);\n this.response.write(buildEmailTemplate(html));\n this.response.end();\n }\n });\n\n // New post email\n\n Router.route('/email/new-post/:id?', {\n name: 'newPost',\n where: 'server',\n action: function() {\n var post = Posts.findOne(this.params.id);\n console.log(templates)\n if (!!post) {\n html = getEmailTemplate('emailNewPost')(getPostProperties(post));\n } else {\n html = \"

No post found.

\"\n }\n this.response.write(buildEmailTemplate(html));\n this.response.end();\n }\n });\n\n\n});","Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile(\"{{username}}, welcome to {{siteTitle}}!

\\n\\nYou've just been invited. Start posting.

\");Handlebars.templates[\"emailAccountApproved\"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: \"emailAccountApproved\"});};","Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile(\"\\n{{invitedBy}}\\ninvited you to join {{communityName}}\\n

\\n\\n{{#if newUser}}\\nJoin {{communityName}}\\n{{else}}\\nSign in to {{communityName}}\\n{{/if}}\\n

\\n\");Handlebars.templates[\"emailInvite\"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: \"emailInvite\"});};","Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile(\"\\n{{comment.author}}\\nleft a new comment on \\n{{post.title}}:\\n\\n

\\n\\n
\\n{{{body}}}\\n
\\n
\\n\\nDiscuss

\");Handlebars.templates[\"emailNewComment\"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: \"emailNewComment\"});};","Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile(\"\\n{{postAuthorName}}\\nhas created a new post:\\n{{#if url}}\\n {{postTitle}}}\\n{{else}}\\n {{postTitle}}}\\n{{/if}}\\n

\\n\\n{{#if body}}\\n
\\n {{{body}}}\\n
\\n
\\n{{/if}}\\n\\nDiscuss

\");Handlebars.templates[\"emailNewPost\"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: \"emailNewPost\"});};","Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile(\"{{comment.author}}\\nhas replied to your comment on\\n{{post.title}}:\\n\\n

\\n\\n
\\n{{{body}}}\\n
\\n
\\n\\nDiscuss

\");Handlebars.templates[\"emailNewReply\"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: \"emailNewReply\"});};","Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile(\"A new user account has been created: {{username}}

\");Handlebars.templates[\"emailNewUser\"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: \"emailNewUser\"});};","Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile(\"This is just a test

\\n\\nSent at {{date}}.

\");Handlebars.templates[\"emailTest\"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: \"emailTest\"});};","Handlebars = Handlebars || {};Handlebars.templates = Handlebars.templates || {} ;var template = OriginalHandlebars.compile(\"\\n\\n \\n \\n \\n\\n {{siteName}}\\n \\n\\n\\n\\n
\\n\\n\\n\\n \\n \\n \\n
\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
\\n {{#if logoUrl}}\\n \\\"{{siteName}}\\\"/\\n {{else}}\\n {{siteName}}\\n {{/if}}\\n
\\n
\\n\\n {{{body}}}\\n\\n
\\n Change your notifications settings

\\n {{{footer}}}\\n
\\n \\n\\n
\\n\\n
\\n
\\n\\n\\n\");Handlebars.templates[\"emailWrapper\"] = function (data, partials) { partials = (partials || {});return template(data || {}, { helpers: OriginalHandlebars.helpers,partials: partials,name: \"emailWrapper\"});};","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"de\"] = [\"German\",\"Deutsch\"];\nTAPi18n._enable({\"helper_name\":\"_\",\"supported_languages\":null,\"i18n_files_route\":\"/tap-i18n\",\"cdn_path\":null});\nTAPi18n.languages_available_for_project[\"en\"] = [\"English\",\"English\"];\nif(_.isUndefined(TAPi18n.translations[\"de\"])) {\n TAPi18n.translations[\"de\"] = {};\n}\n\nif(_.isUndefined(TAPi18n.translations[\"de\"][namespace])) {\n TAPi18n.translations[\"de\"][namespace] = {};\n}\n\n_.extend(TAPi18n.translations[\"de\"][namespace], {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n// integrate the fallback language translations \nTAPi18n.addResourceBundle(\"en\", namespace, {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"es\"] = [\"Spanish (Spain)\",\"Español\"];\nif(_.isUndefined(TAPi18n.translations[\"es\"])) {\n TAPi18n.translations[\"es\"] = {};\n}\n\nif(_.isUndefined(TAPi18n.translations[\"es\"][namespace])) {\n TAPi18n.translations[\"es\"][namespace] = {};\n}\n\n_.extend(TAPi18n.translations[\"es\"][namespace], {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"fr\"] = [\"French (France)\",\"Français\"];\nif(_.isUndefined(TAPi18n.translations[\"fr\"])) {\n TAPi18n.translations[\"fr\"] = {};\n}\n\nif(_.isUndefined(TAPi18n.translations[\"fr\"][namespace])) {\n TAPi18n.translations[\"fr\"][namespace] = {};\n}\n\n_.extend(TAPi18n.translations[\"fr\"][namespace], {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"it\"] = [\"Italian\",\"Italiano\"];\nif(_.isUndefined(TAPi18n.translations[\"it\"])) {\n TAPi18n.translations[\"it\"] = {};\n}\n\nif(_.isUndefined(TAPi18n.translations[\"it\"][namespace])) {\n TAPi18n.translations[\"it\"][namespace] = {};\n}\n\n_.extend(TAPi18n.translations[\"it\"][namespace], {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"zh-CN\"] = [\"zh-CN\",\"zh-CN\"];\nif(_.isUndefined(TAPi18n.translations[\"zh-CN\"])) {\n TAPi18n.translations[\"zh-CN\"] = {};\n}\n\nif(_.isUndefined(TAPi18n.translations[\"zh-CN\"][namespace])) {\n TAPi18n.translations[\"zh-CN\"][namespace] = {};\n}\n\n_.extend(TAPi18n.translations[\"zh-CN\"][namespace], {\"translation_key\":\"translation string\"});\n"]} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-email/package.js b/packages/nova-subscribe/.build.telescope-email/package.js deleted file mode 100644 index 6c20521cb..000000000 --- a/packages/nova-subscribe/.build.telescope-email/package.js +++ /dev/null @@ -1 +0,0 @@ -// This file is included for compatibility with the Meteor 0.6.4 package downloader. diff --git a/packages/nova-subscribe/.build.telescope-email/unipackage.json b/packages/nova-subscribe/.build.telescope-email/unipackage.json deleted file mode 100644 index ef8dcf868..000000000 --- a/packages/nova-subscribe/.build.telescope-email/unipackage.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "telescope-email", - "summary": "Telescope email package", - "version": "0.2.9+0a592efc85d83db553743a37ef17747831a10a33", - "earliestCompatibleVersion": "0.0.0", - "isTest": false, - "plugins": [], - "unibuilds": [ - { - "arch": "os", - "path": "os.json" - }, - { - "arch": "web.browser", - "path": "web.browser.json" - }, - { - "arch": "web.cordova", - "path": "web.cordova.json" - } - ], - "format": "unipackage-pre2" -} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-email/web.browser.json b/packages/nova-subscribe/.build.telescope-email/web.browser.json deleted file mode 100644 index 999590652..000000000 --- a/packages/nova-subscribe/.build.telescope-email/web.browser.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "format": "unipackage-unibuild-pre1", - "packageVariables": [ - { - "name": "buildEmailTemplate", - "export": true - }, - { - "name": "sendEmail", - "export": true - }, - { - "name": "buildAndSendEmail", - "export": true - }, - { - "name": "getEmailTemplate", - "export": true - } - ], - "uses": [ - { - "package": "meteor" - }, - { - "package": "iron:router" - }, - { - "package": "telescope-base" - }, - { - "package": "telescope-lib" - }, - { - "package": "telescope-i18n" - }, - { - "package": "tap:i18n" - } - ], - "resources": [ - { - "type": "prelink", - "file": "web.browser/packages/telescope-email.js", - "length": 11726, - "offset": 0, - "servePath": "/packages/telescope-email.js", - "sourceMap": "web.browser/packages/telescope-email.js.map" - } - ] -} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-email/web.browser/packages/telescope-email.js b/packages/nova-subscribe/.build.telescope-email/web.browser/packages/telescope-email.js deleted file mode 100644 index 4fbf92296..000000000 --- a/packages/nova-subscribe/.build.telescope-email/web.browser/packages/telescope-email.js +++ /dev/null @@ -1,153 +0,0 @@ -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "project", // 2 - namespace = "project"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -TAPi18n.languages_available_for_project["de"] = ["German","Deutsch"]; // 8 -TAPi18n._enable({"helper_name":"_","supported_languages":null,"i18n_files_route":"/tap-i18n","cdn_path":null}); // 9 -TAPi18n.languages_available_for_project["en"] = ["English","English"]; // 10 - // 11 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "project", // 2 - namespace = "project"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -// integrate the fallback language translations // 8 -TAPi18n.addResourceBundle("en", namespace, {"translation_key":"translation string"}); // 9 - // 10 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "project", // 2 - namespace = "project"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -TAPi18n.languages_available_for_project["es"] = ["Spanish (Spain)","Español"]; // 8 - // 9 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "project", // 2 - namespace = "project"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -TAPi18n.languages_available_for_project["fr"] = ["French (France)","Français"]; // 8 - // 9 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "project", // 2 - namespace = "project"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -TAPi18n.languages_available_for_project["it"] = ["Italian","Italiano"]; // 8 - // 9 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "project", // 2 - namespace = "project"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -TAPi18n.languages_available_for_project["zh-CN"] = ["zh-CN","zh-CN"]; // 8 - // 9 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); diff --git a/packages/nova-subscribe/.build.telescope-email/web.browser/packages/telescope-email.js.map b/packages/nova-subscribe/.build.telescope-email/web.browser/packages/telescope-email.js.map deleted file mode 100644 index dafe308fd..000000000 --- a/packages/nova-subscribe/.build.telescope-email/web.browser/packages/telescope-email.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"/packages/telescope-email.js","sources":["telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json"],"names":[],"mappings":";;;;;;;;AAAA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,qE;AACA,+G;AACA,sE;;;;;;;;;;;;;;;;;;;ACTA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,gD;AACA,qF;;;;;;;;;;;;;;;;;;;ACRA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,8E;;;;;;;;;;;;;;;;;;;ACPA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,+E;;;;;;;;;;;;;;;;;;;ACPA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,uE;;;;;;;;;;;;;;;;;;;ACPA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,qE","sourcesContent":["var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"de\"] = [\"German\",\"Deutsch\"];\nTAPi18n._enable({\"helper_name\":\"_\",\"supported_languages\":null,\"i18n_files_route\":\"/tap-i18n\",\"cdn_path\":null});\nTAPi18n.languages_available_for_project[\"en\"] = [\"English\",\"English\"];\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n// integrate the fallback language translations \nTAPi18n.addResourceBundle(\"en\", namespace, {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"es\"] = [\"Spanish (Spain)\",\"Español\"];\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"fr\"] = [\"French (France)\",\"Français\"];\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"it\"] = [\"Italian\",\"Italiano\"];\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"zh-CN\"] = [\"zh-CN\",\"zh-CN\"];\n"]} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-email/web.cordova.json b/packages/nova-subscribe/.build.telescope-email/web.cordova.json deleted file mode 100644 index 205364255..000000000 --- a/packages/nova-subscribe/.build.telescope-email/web.cordova.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "format": "unipackage-unibuild-pre1", - "packageVariables": [ - { - "name": "buildEmailTemplate", - "export": true - }, - { - "name": "sendEmail", - "export": true - }, - { - "name": "buildAndSendEmail", - "export": true - }, - { - "name": "getEmailTemplate", - "export": true - } - ], - "uses": [ - { - "package": "meteor" - }, - { - "package": "iron:router" - }, - { - "package": "telescope-base" - }, - { - "package": "telescope-lib" - }, - { - "package": "telescope-i18n" - }, - { - "package": "tap:i18n" - } - ], - "resources": [ - { - "type": "prelink", - "file": "web.cordova/packages/telescope-email.js", - "length": 11726, - "offset": 0, - "servePath": "/packages/telescope-email.js", - "sourceMap": "web.cordova/packages/telescope-email.js.map" - } - ] -} \ No newline at end of file diff --git a/packages/nova-subscribe/.build.telescope-email/web.cordova/packages/telescope-email.js b/packages/nova-subscribe/.build.telescope-email/web.cordova/packages/telescope-email.js deleted file mode 100644 index 4fbf92296..000000000 --- a/packages/nova-subscribe/.build.telescope-email/web.cordova/packages/telescope-email.js +++ /dev/null @@ -1,153 +0,0 @@ -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "project", // 2 - namespace = "project"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -TAPi18n.languages_available_for_project["de"] = ["German","Deutsch"]; // 8 -TAPi18n._enable({"helper_name":"_","supported_languages":null,"i18n_files_route":"/tap-i18n","cdn_path":null}); // 9 -TAPi18n.languages_available_for_project["en"] = ["English","English"]; // 10 - // 11 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "project", // 2 - namespace = "project"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -// integrate the fallback language translations // 8 -TAPi18n.addResourceBundle("en", namespace, {"translation_key":"translation string"}); // 9 - // 10 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "project", // 2 - namespace = "project"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -TAPi18n.languages_available_for_project["es"] = ["Spanish (Spain)","Español"]; // 8 - // 9 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "project", // 2 - namespace = "project"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -TAPi18n.languages_available_for_project["fr"] = ["French (France)","Français"]; // 8 - // 9 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "project", // 2 - namespace = "project"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -TAPi18n.languages_available_for_project["it"] = ["Italian","Italiano"]; // 8 - // 9 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); - - - - - - -(function () { - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/telescope-email/Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -var _ = Package.underscore._, // 1 - package_name = "project", // 2 - namespace = "project"; // 3 - // 4 -if (package_name != "project") { // 5 - namespace = TAPi18n.packages[package_name].namespace; // 6 -} // 7 -TAPi18n.languages_available_for_project["zh-CN"] = ["zh-CN","zh-CN"]; // 8 - // 9 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -}).call(this); diff --git a/packages/nova-subscribe/.build.telescope-email/web.cordova/packages/telescope-email.js.map b/packages/nova-subscribe/.build.telescope-email/web.cordova/packages/telescope-email.js.map deleted file mode 100644 index dafe308fd..000000000 --- a/packages/nova-subscribe/.build.telescope-email/web.cordova/packages/telescope-email.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"/packages/telescope-email.js","sources":["telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/de.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/en.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/es.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/fr.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/it.i18n.json","telescope-email//Users/sacha/Dev/Telescope/packages/telescope-blank/i18n/zh-CN.i18n.json"],"names":[],"mappings":";;;;;;;;AAAA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,qE;AACA,+G;AACA,sE;;;;;;;;;;;;;;;;;;;ACTA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,gD;AACA,qF;;;;;;;;;;;;;;;;;;;ACRA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,8E;;;;;;;;;;;;;;;;;;;ACPA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,+E;;;;;;;;;;;;;;;;;;;ACPA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,uE;;;;;;;;;;;;;;;;;;;ACPA,6B;AACA,6B;AACA,0B;;AAEA,gC;AACA,yD;AACA,C;AACA,qE","sourcesContent":["var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"de\"] = [\"German\",\"Deutsch\"];\nTAPi18n._enable({\"helper_name\":\"_\",\"supported_languages\":null,\"i18n_files_route\":\"/tap-i18n\",\"cdn_path\":null});\nTAPi18n.languages_available_for_project[\"en\"] = [\"English\",\"English\"];\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\n// integrate the fallback language translations \nTAPi18n.addResourceBundle(\"en\", namespace, {\"translation_key\":\"translation string\"});\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"es\"] = [\"Spanish (Spain)\",\"Español\"];\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"fr\"] = [\"French (France)\",\"Français\"];\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"it\"] = [\"Italian\",\"Italiano\"];\n","var _ = Package.underscore._,\n package_name = \"project\",\n namespace = \"project\";\n\nif (package_name != \"project\") {\n namespace = TAPi18n.packages[package_name].namespace;\n}\nTAPi18n.languages_available_for_project[\"zh-CN\"] = [\"zh-CN\",\"zh-CN\"];\n"]} \ No newline at end of file From a63317913737cbccf949d0b65024bf8ba54bcc07 Mon Sep 17 00:00:00 2001 From: schabluk Date: Sun, 7 Aug 2016 13:40:02 +0200 Subject: [PATCH 28/60] move subscribe to Optional Packages --- .meteor/packages | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.meteor/packages b/.meteor/packages index 5f8010e68..4f3c3f387 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -20,6 +20,7 @@ nova:api nova:rss nova:kadira nova:email +nova:subscribe ############ Customizable Packages ############ @@ -40,5 +41,3 @@ nova:debug ############ Your Packages ############ # my-custom-package - -nova:subscribe \ No newline at end of file From 3dde711f415ed5b4642d146aeee38fc532715943 Mon Sep 17 00:00:00 2001 From: schabluk Date: Sun, 7 Aug 2016 18:06:42 +0200 Subject: [PATCH 29/60] Change subscription method names --- packages/nova-subscribe/lib/components/Subscribe.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/nova-subscribe/lib/components/Subscribe.jsx b/packages/nova-subscribe/lib/components/Subscribe.jsx index 765251c7e..eb9bed572 100644 --- a/packages/nova-subscribe/lib/components/Subscribe.jsx +++ b/packages/nova-subscribe/lib/components/Subscribe.jsx @@ -11,16 +11,16 @@ class Subscribe extends Component { } onSubscribe(e) { - e.preventDefault(); + e.preventDefault(); const post = this.props.post; const user = this.context.currentUser; - let callAction = 'subscribePost'; + let callAction = 'posts.subscribe'; let isSubscribed = this.isSubscribed(post, user); if( isSubscribed ) { - callAction = "unsubscribePost"; + callAction = "posts.unsubscribe"; } this.context.actions.call(callAction, post._id, (error, result) => { From 79ba615bae6a70ae2533d12742e027594b204116 Mon Sep 17 00:00:00 2001 From: schabluk Date: Sun, 7 Aug 2016 18:31:15 +0200 Subject: [PATCH 30/60] Better error handling --- packages/nova-subscribe/lib/components/Subscribe.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/nova-subscribe/lib/components/Subscribe.jsx b/packages/nova-subscribe/lib/components/Subscribe.jsx index eb9bed572..ff9722aa9 100644 --- a/packages/nova-subscribe/lib/components/Subscribe.jsx +++ b/packages/nova-subscribe/lib/components/Subscribe.jsx @@ -24,6 +24,8 @@ class Subscribe extends Component { } this.context.actions.call(callAction, post._id, (error, result) => { + if (error) + this.context.messages.flash(error.message, "error") if (result) this.context.events.track(callAction, {'_id': post._id}); }) @@ -64,6 +66,7 @@ Subscribe.propTypes = { Subscribe.contextTypes = { currentUser: React.PropTypes.object, + messages: React.PropTypes.object, actions: React.PropTypes.object, events: React.PropTypes.object, intl: intlShape From e7e0d3333902ae7cfc2c470f2b85708fee7b36d1 Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Mon, 8 Aug 2016 10:54:33 +0900 Subject: [PATCH 31/60] clean up nova:core --- packages/nova-core/lib/client.js | 10 ++ packages/nova-core/lib/colors.js | 106 ------------------ .../lib/containers/CurrentUserContainer.jsx | 10 -- packages/nova-core/lib/debug.js | 3 - packages/nova-core/lib/modules.js | 2 + packages/nova-core/lib/router.jsx | 53 --------- packages/nova-core/lib/seo.js | 21 ---- .../nova-core/lib/{export.js => server.js} | 8 +- packages/nova-core/package.js | 36 ++---- 9 files changed, 27 insertions(+), 222 deletions(-) create mode 100644 packages/nova-core/lib/client.js delete mode 100644 packages/nova-core/lib/colors.js delete mode 100644 packages/nova-core/lib/containers/CurrentUserContainer.jsx delete mode 100644 packages/nova-core/lib/debug.js create mode 100644 packages/nova-core/lib/modules.js delete mode 100644 packages/nova-core/lib/router.jsx delete mode 100644 packages/nova-core/lib/seo.js rename packages/nova-core/lib/{export.js => server.js} (69%) diff --git a/packages/nova-core/lib/client.js b/packages/nova-core/lib/client.js new file mode 100644 index 000000000..2faecabfd --- /dev/null +++ b/packages/nova-core/lib/client.js @@ -0,0 +1,10 @@ +import './modules.js'; + +import Messages from './messages.js'; +import ModalTrigger from './components/ModalTrigger.jsx'; +import ContextPasser from './components/ContextPasser.jsx'; +import FlashContainer from './containers/FlashContainer.jsx'; +import AppComposer from './containers/AppComposer.jsx'; +// import NovaCounts from './counts.js'; + +export { Messages, ModalTrigger, ContextPasser, AppComposer, FlashContainer}; \ No newline at end of file diff --git a/packages/nova-core/lib/colors.js b/packages/nova-core/lib/colors.js deleted file mode 100644 index bb117c43d..000000000 --- a/packages/nova-core/lib/colors.js +++ /dev/null @@ -1,106 +0,0 @@ -/** - * @summary A dictionnary of all the elements that use custom colors - */ - -Telescope.colorElements = {}; - -Telescope.colorElements.colorTable = { - accentColor: [], - accentContrastColor: [], - secondaryColor: [], - secondaryContrastColor: [] -}; - -Telescope.colorElements.defaultColors = { - accentColor: "#DD3416", // red - accentContrastColor: "#ffffff", // white - secondaryColor: "#4e555d", // slate - secondaryContrastColor: "#ffffff" // white -}; - -/** - * @summary Register an element to use a custom color - * @param {string} selector - the CSS selector of the element - * @param {string} color - the color. Either `accentColor`, `accentContrastColor`, `secondaryColor`, or `secondaryContrastColor` - * @param {string} [property=color] - the property to colorize. Usually `color`, `background-color`, `border-color`, etc. - */ -Telescope.colorElements.add = function (selector, color, property) { - var element = {selector: selector}; - - if (typeof property !== "undefined") - element.property = property; - - Telescope.colorElements.colorTable[color].push(element); -}; - -// shortcuts -var setShortcut = function(name) { - return function (selector, property) { - Telescope.colorElements.add(selector, name, property); - }; -}; - -var accent = setShortcut('accentColor'); -var accentContrast = setShortcut('accentContrastColor'); -var secondary = setShortcut('secondaryColor'); -var secondaryContrast = setShortcut('secondaryContrastColor'); - -// accentColor - -accent("a:hover"); -accent(".post-content .post-heading .post-title:hover"); -accent(".upvoted .upvote-link"); -accent(".downvoted .downvote-link"); -accent(".upvoted .upvote"); -accent(".downvoted .downvote"); -accent(".toggle-actions-link"); -accent(".post-meta a:hover"); -accent(".action:hover"); -accent(".post-actions .icon"); - -accent('input[type="submit"]', 'background-color'); -accent("button", 'background-color'); -accent(".button", 'background-color'); -accent(".auth-buttons #login-buttons #login-buttons-password", 'background-color'); -accent(".btn-primary", 'background-color'); -accent(".header .btn-primary", 'background-color'); -accent(".header .btn-primary:link", 'background-color'); -accent(".header .btn-primary:visited", 'background-color'); -accent(".error", 'background-color'); -accent(".mobile-menu-button", 'background-color'); -accent(".login-link-text", 'background-color'); -accent(".post-category:hover", 'background-color'); - -accent(".icon-more", "border-color"); -accent(".post-admin a:hover", "background-color"); - -// accentContrastColor - -accentContrast('input[type="submit"]'); -accentContrast("button"); -accentContrast(".button"); -accentContrast(".menu-dropdown .menu-wrapper a.button"); -accentContrast(".auth-buttons #login-buttons #login-buttons-password"); -accentContrast(".btn-primary"); -accentContrast(".btn-primary:link"); -accentContrast(".btn-primary:hover"); -accentContrast(".header .btn-primary:link"); -accentContrast(".header .btn-primary:visited"); -accentContrast(".error"); -accentContrast(".header a.mobile-menu-button"); -accentContrast("login-link-text"); -accentContrast(".post-category:hover"); -accentContrast(".post-admin a:hover", "color"); - -// secondaryColor - -secondary(".header", "background-color"); - -// secondaryContrastColor - -secondaryContrast(".header"); -secondaryContrast(".header .logo a"); -secondaryContrast(".header .logo a:visited"); - -secondaryContrast(".header .dropdown-top-level", "border-color"); -secondaryContrast(".header .dropdown-accordion .show-more", "border-color"); diff --git a/packages/nova-core/lib/containers/CurrentUserContainer.jsx b/packages/nova-core/lib/containers/CurrentUserContainer.jsx deleted file mode 100644 index 5f7d1fcb4..000000000 --- a/packages/nova-core/lib/containers/CurrentUserContainer.jsx +++ /dev/null @@ -1,10 +0,0 @@ -import { createContainer } from 'meteor/react-meteor-data'; - -const CurrentUserContainer = createContainer(() => { - return { - currentUser: Meteor.user() - } -}, params => ); - -module.exports = CurrentUserContainer; -export default CurrentUserContainer; \ No newline at end of file diff --git a/packages/nova-core/lib/debug.js b/packages/nova-core/lib/debug.js deleted file mode 100644 index 32323334a..000000000 --- a/packages/nova-core/lib/debug.js +++ /dev/null @@ -1,3 +0,0 @@ -import Messages from "./messages.js"; - -// TODO: export only in dev environment? \ No newline at end of file diff --git a/packages/nova-core/lib/modules.js b/packages/nova-core/lib/modules.js new file mode 100644 index 000000000..3930766ff --- /dev/null +++ b/packages/nova-core/lib/modules.js @@ -0,0 +1,2 @@ +import './callbacks.js'; +import './icons.js'; \ No newline at end of file diff --git a/packages/nova-core/lib/router.jsx b/packages/nova-core/lib/router.jsx deleted file mode 100644 index 9a9344b24..000000000 --- a/packages/nova-core/lib/router.jsx +++ /dev/null @@ -1,53 +0,0 @@ -// import Messages from "./messages.js"; - -// FlowRouter.extendPathWithQueryParams = (path, params, newQueryParams) => { -// const current = FlowRouter.current(); -// const currentQueryParams = _.clone(current.queryParams); -// return FlowRouter.path(path, params, _.extend(currentQueryParams, newQueryParams)); -// }; - -// FlowRouter.triggers.exit([() => Messages.clearSeen()]); - -// FlowRouter.addToQueryArray = function (key, value) { -// var keyArray = FlowRouter.getQueryParam(key) || []; -// keyArray.push(value); -// var params = {}; -// params[key] = keyArray; -// FlowRouter.setQueryParams(params); -// } - -// FlowRouter.removeFromQueryArray = function (key, value) { -// var keyArray = FlowRouter.getQueryParam(key); -// keyArray = _.without(keyArray, value); -// var params = {}; -// params[key] = keyArray; -// FlowRouter.setQueryParams(params); -// } - -// if(Meteor.isServer) { -// var timeInMillis = 1000 * 30; // 30 secs -// FlowRouter.setPageCacheTimeout(timeInMillis); -// FlowRouter.setDeferScriptLoading(true); -// } - -// // FlowRouter.notFound = { -// // action: function() { -// // if (Meteor.isClient) { -// // DocHead.addMeta({ -// // name: "name", -// // property: "prerender-status-code", -// // content: "404" -// // }); -// // DocHead.addMeta({ -// // name: "name", -// // property: "robots", -// // content: "noindex, nofollow" -// // }); -// // } -// // BlazeLayout.render("layout", {main: "not_found"}); -// // } -// // }; - -// if (typeof Events !== "undefined" && Meteor.isClient) { -// FlowRouter.triggers.enter([function () {Events.analyticsRequest()}]); -// } diff --git a/packages/nova-core/lib/seo.js b/packages/nova-core/lib/seo.js deleted file mode 100644 index 15a18416b..000000000 --- a/packages/nova-core/lib/seo.js +++ /dev/null @@ -1,21 +0,0 @@ -// // SEO - -// Telescope.SEO = {}; - -// Telescope.SEO.setTitle = function (title) { -// DocHead.setTitle(title); -// DocHead.addMeta({name: "title", content: title}); -// DocHead.addMeta({property: "og:title", content: title}); -// DocHead.addMeta({property: "twitter:title", content: title}); -// } - -// Telescope.SEO.setDescription = function (description) { -// DocHead.addMeta({name: "description", content: description}); -// DocHead.addMeta({property: "og:description", content: description}); -// } - -// Telescope.SEO.setImage = function (image) { -// DocHead.addMeta({name: "image", content: image}); -// DocHead.addMeta({property: "og:image", content: image}); -// DocHead.addMeta({property: "twitter:image", content: image}); -// } \ No newline at end of file diff --git a/packages/nova-core/lib/export.js b/packages/nova-core/lib/server.js similarity index 69% rename from packages/nova-core/lib/export.js rename to packages/nova-core/lib/server.js index c6c3bc4cc..0f91025bb 100644 --- a/packages/nova-core/lib/export.js +++ b/packages/nova-core/lib/server.js @@ -1,9 +1,11 @@ +import "./modules.js"; + +import "./server/start.js"; + import Messages from "./messages.js"; import ModalTrigger from "./components/ModalTrigger.jsx"; import ContextPasser from "./components/ContextPasser.jsx"; import FlashContainer from "./containers/FlashContainer.jsx"; import AppComposer from "./containers/AppComposer.jsx"; -import CurrentUserContainer from "./containers/CurrentUserContainer.jsx"; -// import NovaCounts from "./counts.js"; -export { Messages, ModalTrigger, ContextPasser, AppComposer, FlashContainer, CurrentUserContainer}; \ No newline at end of file +export { Messages, ModalTrigger, ContextPasser, AppComposer, FlashContainer}; \ No newline at end of file diff --git a/packages/nova-core/package.js b/packages/nova-core/package.js index 60eab4932..3a57220ae 100644 --- a/packages/nova-core/package.js +++ b/packages/nova-core/package.js @@ -8,34 +8,18 @@ Package.describe({ Package.onUse(function(api) { api.versionsFrom("METEOR@1.0"); + + api.use([ + 'nova:lib@0.26.5-nova', + 'nova:events@0.26.5-nova' + ]); - var packages = [ - 'nova:lib@0.26.5-nova', // no dependencies - 'nova:events@0.26.5-nova' // lib - ]; + api.imply([ + 'nova:lib@0.26.5-nova' + ]); - api.use(packages); - - api.imply(packages); - api.addFiles([ - 'lib/callbacks.js', - 'lib/icons.js', - 'lib/seo.js', - 'lib/debug.js', - 'lib/router.jsx' - // 'lib/colors.js' // probably not that useful anymore? - ], ['client', 'server']); - - api.addAssets([ - // 'public/img/loading.svg', - ], 'client'); - - api.addFiles([ - 'lib/server/start.js' - ], ['server']); - - api.mainModule("lib/export.js", "server"); - api.mainModule("lib/export.js", "client"); + api.mainModule("lib/server.js", "server"); + api.mainModule("lib/client.js", "client"); }); From 3ec90a04b560c159af055925204998bf7f75044a Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Mon, 8 Aug 2016 11:18:21 +0900 Subject: [PATCH 32/60] remove Telescope global --- .meteor/versions | 2 +- packages/my-custom-package/lib/callbacks.js | 2 ++ packages/my-custom-package/lib/components.js | 2 ++ .../lib/components/CustomNewsletter.jsx | 1 + .../lib/components/CustomPostsItem.jsx | 1 + packages/my-custom-package/lib/intl.js | 3 +++ packages/my-custom-package/lib/routes.jsx | 1 + packages/nova-api/lib/server/api.js | 1 + .../lib/categories/CategoriesEditForm.jsx | 1 + .../lib/categories/CategoriesList.jsx | 1 + .../lib/categories/Category.jsx | 1 + .../lib/comments/CommentsItem.jsx | 1 + .../lib/comments/CommentsList.jsx | 1 + .../lib/comments/CommentsNode.jsx | 1 + .../nova-base-components/lib/common/App.jsx | 1 + .../lib/common/FlashMessages.jsx | 1 + .../lib/common/HeadTags.jsx | 1 + .../lib/common/Header.jsx | 1 + .../nova-base-components/lib/common/Icon.jsx | 1 + .../lib/common/Layout.jsx | 1 + .../lib/common/Newsletter.jsx | 1 + .../lib/common/SettingsEditForm.jsx | 1 + .../nova-base-components/lib/common/Vote.jsx | 1 + .../nova-base-components/lib/components.js | 2 ++ packages/nova-base-components/lib/config.js | 1 + .../lib/permissions/CanCreatePost.jsx | 1 + .../lib/permissions/CanDo.jsx | 1 + .../lib/posts/PostsCommenters.jsx | 1 + .../lib/posts/PostsCommentsThread.jsx | 1 + .../lib/posts/PostsDaily.jsx | 1 + .../lib/posts/PostsDay.jsx | 1 + .../lib/posts/PostsEditForm.jsx | 1 + .../lib/posts/PostsHome.jsx | 1 + .../lib/posts/PostsItem.jsx | 1 + .../lib/posts/PostsList.jsx | 1 + .../lib/posts/PostsListHeader.jsx | 1 + .../lib/posts/PostsLoading.jsx | 1 + .../lib/posts/PostsNewButton.jsx | 1 + .../lib/posts/PostsNewForm.jsx | 1 + .../lib/posts/PostsPage.jsx | 1 + .../lib/posts/PostsSingle.jsx | 1 + .../lib/posts/PostsStats.jsx | 1 + .../lib/users/UsersAccount.jsx | 1 + .../lib/users/UsersAccountMenu.jsx | 1 + .../lib/users/UsersEdit.jsx | 1 + .../lib/users/UsersMenu.jsx | 1 + .../lib/users/UsersProfile.jsx | 1 + .../lib/users/UsersProfileCheck.jsx | 1 + .../lib/users/UsersSingle.jsx | 1 + packages/nova-base-routes/lib/routes.jsx | 1 + packages/nova-categories/lib/callbacks.js | 1 + packages/nova-categories/lib/helpers.js | 1 + packages/nova-categories/lib/parameters.js | 1 + packages/nova-categories/lib/schema.js | 1 + .../lib/server/load_categories.js | 1 + packages/nova-categories/lib/subscriptions.js | 4 +++- .../nova-cloudinary/lib/server/cloudinary.js | 1 + packages/nova-comments/lib/callbacks.js | 1 + packages/nova-comments/lib/methods.js | 1 + packages/nova-comments/lib/parameters.js | 1 + packages/nova-comments/lib/schema.js | 1 + packages/nova-core/lib/callbacks.js | 2 ++ .../nova-core/lib/containers/AppComposer.jsx | 1 + packages/nova-core/lib/icons.js | 2 ++ packages/nova-core/lib/server/start.js | 1 + packages/nova-core/package.js | 1 - .../nova-debug/lib/components/Cheatsheet.jsx | 1 + packages/nova-debug/lib/components/Emails.jsx | 1 + .../nova-debug/lib/components/Settings.jsx | 1 + packages/nova-debug/lib/routes.jsx | 1 + packages/nova-debug/lib/server/methods.js | 1 + packages/nova-demo/demo-app.jsx | 1 + packages/nova-demo/demo-components.jsx | 1 + packages/nova-email/lib/server/email.js | 1 + .../lib/components/EmbedlyURL.jsx | 1 + .../lib/components/ThumbnailURL.jsx | 1 + packages/nova-embedly/lib/custom_fields.js | 1 + packages/nova-embedly/lib/embedly.js | 2 +- .../lib/server/get_embedly_data.js | 1 + packages/nova-events/lib/client/analytics.js | 1 + .../lib/getting_started.js | 1 + packages/nova-i18n-en-us/lib/en_US.js | 2 ++ packages/nova-kadira/lib/kadira-settings.js | 2 ++ packages/nova-kadira/lib/server/kadira.js | 2 ++ packages/nova-lib/lib/callbacks.js | 1 + packages/nova-lib/lib/client.js | 3 +++ packages/nova-lib/lib/client/jquery.exists.js | 3 --- packages/nova-lib/lib/collections.js | 2 ++ packages/nova-lib/lib/config.js | 4 +++- packages/nova-lib/lib/deep_extend.js | 2 ++ packages/nova-lib/lib/intl-polyfill.js | 2 ++ packages/nova-lib/lib/modules.js | 11 ++++++++++ packages/nova-lib/lib/server.js | 5 +++++ packages/nova-lib/lib/settings.js | 2 ++ packages/nova-lib/lib/utils.js | 1 + packages/nova-lib/package.js | 22 +++++-------------- .../lib/components/NewsletterSubscribe.jsx | 1 + packages/nova-newsletter/lib/custom_fields.js | 1 + .../nova-newsletter/lib/server/callbacks.js | 1 + packages/nova-newsletter/lib/server/cron.js | 1 + packages/nova-newsletter/lib/server/emails.js | 1 + .../lib/server/mailchimp/mailchimp_list.js | 3 +-- .../server/mailchimp/mailchimp_newsletter.js | 1 + .../nova-newsletter/lib/server/newsletter.js | 1 + .../nova-notifications/lib/notifications.js | 1 + .../lib/server/notifications-server.js | 2 ++ packages/nova-posts/lib/callbacks.js | 1 + packages/nova-posts/lib/helpers.js | 1 + packages/nova-posts/lib/methods.js | 1 + packages/nova-posts/lib/notifications.js | 1 + packages/nova-posts/lib/parameters.js | 1 + .../nova-posts/lib/server/publications.js | 1 + packages/nova-rss/lib/headtags.js | 2 ++ packages/nova-rss/lib/server/rss.js | 1 + packages/nova-search/lib/parameters.js | 1 + packages/nova-settings/lib/collection.js | 1 + packages/nova-settings/lib/init.js | 2 ++ packages/nova-settings/lib/methods.js | 1 + .../nova-settings/lib/server/publications.js | 1 + packages/nova-subscribe/lib/callbacks.js | 1 + .../lib/components/SubscribedPosts.jsx | 1 + packages/nova-users/lib/callbacks.js | 1 + packages/nova-users/lib/collection.js | 2 ++ packages/nova-users/lib/helpers.js | 1 + packages/nova-users/lib/methods.js | 1 + packages/nova-users/lib/notifications.js | 1 + packages/nova-users/lib/schema.js | 1 + packages/nova-users/lib/server/create_user.js | 2 ++ packages/nova-voting/lib/scoring.js | 2 ++ packages/nova-voting/lib/server/cron.js | 1 + packages/nova-voting/lib/vote.js | 1 + 131 files changed, 173 insertions(+), 27 deletions(-) create mode 100644 packages/nova-lib/lib/client.js delete mode 100644 packages/nova-lib/lib/client/jquery.exists.js create mode 100644 packages/nova-lib/lib/modules.js create mode 100644 packages/nova-lib/lib/server.js diff --git a/.meteor/versions b/.meteor/versions index 89d69344c..1d5f4be52 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -134,7 +134,7 @@ tracker@1.1.0 ui@1.0.11 underscore@1.0.9 url@1.0.10 -utilities:react-list-container@0.1.13 +utilities:react-list-container@0.1.14 utilities:smart-methods@0.1.5 utilities:smart-publications@0.1.4 webapp@1.3.10 diff --git a/packages/my-custom-package/lib/callbacks.js b/packages/my-custom-package/lib/callbacks.js index bb1968961..f20e972fc 100644 --- a/packages/my-custom-package/lib/callbacks.js +++ b/packages/my-custom-package/lib/callbacks.js @@ -3,6 +3,8 @@ Let's add a callback to the new post method that appends a random emoji to the newly submitted post's title. */ +import Telescope from 'meteor/nova:lib'; + function PostsNewAddRandomEmoji (post, user) { post.title = post.title + " " +_.sample(["🎉", "💎", "☠", "⏱", "🎈", "⛱"]) diff --git a/packages/my-custom-package/lib/components.js b/packages/my-custom-package/lib/components.js index c6ccc0b6e..59ce70b68 100644 --- a/packages/my-custom-package/lib/components.js +++ b/packages/my-custom-package/lib/components.js @@ -2,6 +2,8 @@ This file centralizes all our custom component overrides. */ +import Telescope from 'meteor/nova:lib'; + import CustomLogo from "./components/CustomLogo.jsx"; import CustomNewsletter from "./components/CustomNewsletter.jsx"; import CustomPostsItem from "./components/CustomPostsItem.jsx"; diff --git a/packages/my-custom-package/lib/components/CustomNewsletter.jsx b/packages/my-custom-package/lib/components/CustomNewsletter.jsx index 77ec3f6ae..50cfd455e 100644 --- a/packages/my-custom-package/lib/components/CustomNewsletter.jsx +++ b/packages/my-custom-package/lib/components/CustomNewsletter.jsx @@ -7,6 +7,7 @@ all of the class's other methods (other render functions, event handlers, etc.). */ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { FormattedMessage, intlShape } from 'react-intl'; diff --git a/packages/my-custom-package/lib/components/CustomPostsItem.jsx b/packages/my-custom-package/lib/components/CustomPostsItem.jsx index f078f9657..c32751cda 100644 --- a/packages/my-custom-package/lib/components/CustomPostsItem.jsx +++ b/packages/my-custom-package/lib/components/CustomPostsItem.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { FormattedMessage, FormattedRelative } from 'react-intl'; import { Button } from 'react-bootstrap'; diff --git a/packages/my-custom-package/lib/intl.js b/packages/my-custom-package/lib/intl.js index f85fadf50..b6872fcc6 100644 --- a/packages/my-custom-package/lib/intl.js +++ b/packages/my-custom-package/lib/intl.js @@ -1,6 +1,9 @@ /* Let's add an international label to the field added in custom_fields.js */ + +import Telescope from 'meteor/nova:lib'; + Telescope.strings.en = { ...Telescope.strings.en, // get all the string translated "posts.color": "Color" // add a new one (collection.field: "Label") diff --git a/packages/my-custom-package/lib/routes.jsx b/packages/my-custom-package/lib/routes.jsx index e59255f64..504dd3dd2 100644 --- a/packages/my-custom-package/lib/routes.jsx +++ b/packages/my-custom-package/lib/routes.jsx @@ -3,6 +3,7 @@ A new custom route for our custom page. Browse to http://localhost:3000/my-custom-route to see it. */ +import Telescope from 'meteor/nova:lib'; import MyCustomPage from './components/MyCustomPage.jsx'; Telescope.routes.add({name:"myCustomRoute", path:"/my-custom-route", component:MyCustomPage}); diff --git a/packages/nova-api/lib/server/api.js b/packages/nova-api/lib/server/api.js index ba62ca739..2964a2e05 100644 --- a/packages/nova-api/lib/server/api.js +++ b/packages/nova-api/lib/server/api.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Posts from "meteor/nova:posts"; import Comments from "meteor/nova:comments"; import Users from 'meteor/nova:users'; diff --git a/packages/nova-base-components/lib/categories/CategoriesEditForm.jsx b/packages/nova-base-components/lib/categories/CategoriesEditForm.jsx index 4a20918e1..b588df9ad 100644 --- a/packages/nova-base-components/lib/categories/CategoriesEditForm.jsx +++ b/packages/nova-base-components/lib/categories/CategoriesEditForm.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { FormattedMessage } from 'react-intl'; import NovaForm from "meteor/nova:forms"; diff --git a/packages/nova-base-components/lib/categories/CategoriesList.jsx b/packages/nova-base-components/lib/categories/CategoriesList.jsx index 8a36dc604..7c1519608 100644 --- a/packages/nova-base-components/lib/categories/CategoriesList.jsx +++ b/packages/nova-base-components/lib/categories/CategoriesList.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { FormattedMessage } from 'react-intl'; import { Button, DropdownButton, MenuItem, Modal } from 'react-bootstrap'; diff --git a/packages/nova-base-components/lib/categories/Category.jsx b/packages/nova-base-components/lib/categories/Category.jsx index 1c6c611de..bc2ce1c6c 100644 --- a/packages/nova-base-components/lib/categories/Category.jsx +++ b/packages/nova-base-components/lib/categories/Category.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { Button, DropdownButton, MenuItem } from 'react-bootstrap'; import classNames from "classnames"; diff --git a/packages/nova-base-components/lib/comments/CommentsItem.jsx b/packages/nova-base-components/lib/comments/CommentsItem.jsx index b561ec718..21be1a823 100644 --- a/packages/nova-base-components/lib/comments/CommentsItem.jsx +++ b/packages/nova-base-components/lib/comments/CommentsItem.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import moment from 'moment'; import { intlShape, FormattedMessage, FormattedRelative } from 'react-intl'; diff --git a/packages/nova-base-components/lib/comments/CommentsList.jsx b/packages/nova-base-components/lib/comments/CommentsList.jsx index 2630f6943..5d45ee7d4 100644 --- a/packages/nova-base-components/lib/comments/CommentsList.jsx +++ b/packages/nova-base-components/lib/comments/CommentsList.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React from 'react'; import {injectIntl, FormattedMessage} from 'react-intl'; diff --git a/packages/nova-base-components/lib/comments/CommentsNode.jsx b/packages/nova-base-components/lib/comments/CommentsNode.jsx index 7e83d430c..1177bfd67 100644 --- a/packages/nova-base-components/lib/comments/CommentsNode.jsx +++ b/packages/nova-base-components/lib/comments/CommentsNode.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; class CommentsNode extends Component { diff --git a/packages/nova-base-components/lib/common/App.jsx b/packages/nova-base-components/lib/common/App.jsx index be06461b7..1198ee751 100644 --- a/packages/nova-base-components/lib/common/App.jsx +++ b/packages/nova-base-components/lib/common/App.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { IntlProvider, intlShape} from 'react-intl'; import { AppComposer } from "meteor/nova:core"; diff --git a/packages/nova-base-components/lib/common/FlashMessages.jsx b/packages/nova-base-components/lib/common/FlashMessages.jsx index f7642c735..41fc7d516 100644 --- a/packages/nova-base-components/lib/common/FlashMessages.jsx +++ b/packages/nova-base-components/lib/common/FlashMessages.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React from 'react'; const FlashMessages = ({messages}) => { diff --git a/packages/nova-base-components/lib/common/HeadTags.jsx b/packages/nova-base-components/lib/common/HeadTags.jsx index ded8268cd..202796f7c 100644 --- a/packages/nova-base-components/lib/common/HeadTags.jsx +++ b/packages/nova-base-components/lib/common/HeadTags.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import Helmet from 'react-helmet'; diff --git a/packages/nova-base-components/lib/common/Header.jsx b/packages/nova-base-components/lib/common/Header.jsx index 90fc3385e..6b28d2581 100644 --- a/packages/nova-base-components/lib/common/Header.jsx +++ b/packages/nova-base-components/lib/common/Header.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React from 'react'; //import { Messages } from "meteor/nova:core"; diff --git a/packages/nova-base-components/lib/common/Icon.jsx b/packages/nova-base-components/lib/common/Icon.jsx index 1ddb36fdd..fb34bddc1 100644 --- a/packages/nova-base-components/lib/common/Icon.jsx +++ b/packages/nova-base-components/lib/common/Icon.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React from 'react'; const Icon = ({ name, iconClass }) => { diff --git a/packages/nova-base-components/lib/common/Layout.jsx b/packages/nova-base-components/lib/common/Layout.jsx index 72f4a9e40..d88e44910 100644 --- a/packages/nova-base-components/lib/common/Layout.jsx +++ b/packages/nova-base-components/lib/common/Layout.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { FlashContainer } from "meteor/nova:core"; diff --git a/packages/nova-base-components/lib/common/Newsletter.jsx b/packages/nova-base-components/lib/common/Newsletter.jsx index 2cc0cfac2..96da2d6b5 100644 --- a/packages/nova-base-components/lib/common/Newsletter.jsx +++ b/packages/nova-base-components/lib/common/Newsletter.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { FormattedMessage, intlShape } from 'react-intl'; import Formsy from 'formsy-react'; diff --git a/packages/nova-base-components/lib/common/SettingsEditForm.jsx b/packages/nova-base-components/lib/common/SettingsEditForm.jsx index 9a6449ed2..e89fc90bc 100644 --- a/packages/nova-base-components/lib/common/SettingsEditForm.jsx +++ b/packages/nova-base-components/lib/common/SettingsEditForm.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { FormattedMessage, intlShape } from 'react-intl'; import NovaForm from "meteor/nova:forms"; diff --git a/packages/nova-base-components/lib/common/Vote.jsx b/packages/nova-base-components/lib/common/Vote.jsx index 34b530f28..998fe5cf6 100644 --- a/packages/nova-base-components/lib/common/Vote.jsx +++ b/packages/nova-base-components/lib/common/Vote.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; //import Actions from "../actions.js"; //import { Messages } from "meteor/nova:core"; diff --git a/packages/nova-base-components/lib/components.js b/packages/nova-base-components/lib/components.js index 40c908db4..f4291e9c5 100644 --- a/packages/nova-base-components/lib/components.js +++ b/packages/nova-base-components/lib/components.js @@ -1,3 +1,5 @@ +import Telescope from 'meteor/nova:lib'; + // common Telescope.registerComponent("App", require('./common/App.jsx')); diff --git a/packages/nova-base-components/lib/config.js b/packages/nova-base-components/lib/config.js index 27bc4ba8a..71abdd889 100644 --- a/packages/nova-base-components/lib/config.js +++ b/packages/nova-base-components/lib/config.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Users from 'meteor/nova:users'; // import { checkNpmVersions } from 'meteor/tmeasday:check-npm-versions'; diff --git a/packages/nova-base-components/lib/permissions/CanCreatePost.jsx b/packages/nova-base-components/lib/permissions/CanCreatePost.jsx index 084c828d2..8f89b85e5 100644 --- a/packages/nova-base-components/lib/permissions/CanCreatePost.jsx +++ b/packages/nova-base-components/lib/permissions/CanCreatePost.jsx @@ -1,5 +1,6 @@ // Deprecated way to handle permission in components, check CanDo component +// import Telescope from 'meteor/nova:lib'; // import React, { PropTypes, Component } from 'react'; // import { FormattedMessage } from 'react-intl'; // import Users from 'meteor/nova:users'; diff --git a/packages/nova-base-components/lib/permissions/CanDo.jsx b/packages/nova-base-components/lib/permissions/CanDo.jsx index 7d442af03..472052568 100644 --- a/packages/nova-base-components/lib/permissions/CanDo.jsx +++ b/packages/nova-base-components/lib/permissions/CanDo.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes } from 'react'; import { FormattedMessage } from 'react-intl'; import Users from 'meteor/nova:users'; diff --git a/packages/nova-base-components/lib/posts/PostsCommenters.jsx b/packages/nova-base-components/lib/posts/PostsCommenters.jsx index 7248b1ab3..37879a564 100644 --- a/packages/nova-base-components/lib/posts/PostsCommenters.jsx +++ b/packages/nova-base-components/lib/posts/PostsCommenters.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React from 'react'; import { Link } from 'react-router'; import Posts from "meteor/nova:posts"; diff --git a/packages/nova-base-components/lib/posts/PostsCommentsThread.jsx b/packages/nova-base-components/lib/posts/PostsCommentsThread.jsx index 9b7713f96..13f6838c4 100644 --- a/packages/nova-base-components/lib/posts/PostsCommentsThread.jsx +++ b/packages/nova-base-components/lib/posts/PostsCommentsThread.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React from 'react'; import {FormattedMessage } from 'react-intl'; import { ListContainer } from "meteor/utilities:react-list-container"; diff --git a/packages/nova-base-components/lib/posts/PostsDaily.jsx b/packages/nova-base-components/lib/posts/PostsDaily.jsx index b925a565f..e91dbae78 100644 --- a/packages/nova-base-components/lib/posts/PostsDaily.jsx +++ b/packages/nova-base-components/lib/posts/PostsDaily.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { Button } from 'react-bootstrap'; import moment from 'moment'; diff --git a/packages/nova-base-components/lib/posts/PostsDay.jsx b/packages/nova-base-components/lib/posts/PostsDay.jsx index f8b1ede4a..a6d602d17 100644 --- a/packages/nova-base-components/lib/posts/PostsDay.jsx +++ b/packages/nova-base-components/lib/posts/PostsDay.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { ListContainer } from "meteor/utilities:react-list-container"; import moment from 'moment'; diff --git a/packages/nova-base-components/lib/posts/PostsEditForm.jsx b/packages/nova-base-components/lib/posts/PostsEditForm.jsx index 3201716fc..0ddd9c9b7 100644 --- a/packages/nova-base-components/lib/posts/PostsEditForm.jsx +++ b/packages/nova-base-components/lib/posts/PostsEditForm.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { FormattedMessage, intlShape } from 'react-intl'; import NovaForm from "meteor/nova:forms"; diff --git a/packages/nova-base-components/lib/posts/PostsHome.jsx b/packages/nova-base-components/lib/posts/PostsHome.jsx index 0c461ab4d..1052f25a3 100644 --- a/packages/nova-base-components/lib/posts/PostsHome.jsx +++ b/packages/nova-base-components/lib/posts/PostsHome.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { ListContainer, DocumentContainer } from "meteor/utilities:react-list-container"; import Posts from "meteor/nova:posts"; diff --git a/packages/nova-base-components/lib/posts/PostsItem.jsx b/packages/nova-base-components/lib/posts/PostsItem.jsx index 6d6ed4a1b..0693c8852 100644 --- a/packages/nova-base-components/lib/posts/PostsItem.jsx +++ b/packages/nova-base-components/lib/posts/PostsItem.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { FormattedMessage, FormattedRelative } from 'react-intl'; import { Button } from 'react-bootstrap'; diff --git a/packages/nova-base-components/lib/posts/PostsList.jsx b/packages/nova-base-components/lib/posts/PostsList.jsx index 7973760fb..3fbc9a964 100644 --- a/packages/nova-base-components/lib/posts/PostsList.jsx +++ b/packages/nova-base-components/lib/posts/PostsList.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React from 'react'; const PostsList = ({results, currentUser, hasMore, ready, count, totalCount, loadMore, showHeader = true}) => { diff --git a/packages/nova-base-components/lib/posts/PostsListHeader.jsx b/packages/nova-base-components/lib/posts/PostsListHeader.jsx index 8b70367ab..92c549978 100644 --- a/packages/nova-base-components/lib/posts/PostsListHeader.jsx +++ b/packages/nova-base-components/lib/posts/PostsListHeader.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React from 'react'; import { ListContainer } from "meteor/utilities:react-list-container"; import Categories from "meteor/nova:categories"; diff --git a/packages/nova-base-components/lib/posts/PostsLoading.jsx b/packages/nova-base-components/lib/posts/PostsLoading.jsx index 09cf81572..ee6db3710 100644 --- a/packages/nova-base-components/lib/posts/PostsLoading.jsx +++ b/packages/nova-base-components/lib/posts/PostsLoading.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React from 'react'; const PostsLoading = props => { diff --git a/packages/nova-base-components/lib/posts/PostsNewButton.jsx b/packages/nova-base-components/lib/posts/PostsNewButton.jsx index 76c428ff4..23f948ae5 100644 --- a/packages/nova-base-components/lib/posts/PostsNewButton.jsx +++ b/packages/nova-base-components/lib/posts/PostsNewButton.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { FormattedMessage, intlShape } from 'react-intl'; import { Button } from 'react-bootstrap'; diff --git a/packages/nova-base-components/lib/posts/PostsNewForm.jsx b/packages/nova-base-components/lib/posts/PostsNewForm.jsx index de41bc22d..8687ecf53 100644 --- a/packages/nova-base-components/lib/posts/PostsNewForm.jsx +++ b/packages/nova-base-components/lib/posts/PostsNewForm.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { intlShape } from 'react-intl'; import NovaForm from "meteor/nova:forms"; diff --git a/packages/nova-base-components/lib/posts/PostsPage.jsx b/packages/nova-base-components/lib/posts/PostsPage.jsx index 758be0b9a..5a0c5b0b8 100644 --- a/packages/nova-base-components/lib/posts/PostsPage.jsx +++ b/packages/nova-base-components/lib/posts/PostsPage.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React from 'react'; import Posts from "meteor/nova:posts"; diff --git a/packages/nova-base-components/lib/posts/PostsSingle.jsx b/packages/nova-base-components/lib/posts/PostsSingle.jsx index 7fda98adb..fe7245a0b 100644 --- a/packages/nova-base-components/lib/posts/PostsSingle.jsx +++ b/packages/nova-base-components/lib/posts/PostsSingle.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React from 'react'; import { DocumentContainer } from "meteor/utilities:react-list-container"; import Posts from "meteor/nova:posts"; diff --git a/packages/nova-base-components/lib/posts/PostsStats.jsx b/packages/nova-base-components/lib/posts/PostsStats.jsx index 02a06dd7c..cd825cbdf 100644 --- a/packages/nova-base-components/lib/posts/PostsStats.jsx +++ b/packages/nova-base-components/lib/posts/PostsStats.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React from 'react'; const PostsStats = ({post}) => { diff --git a/packages/nova-base-components/lib/users/UsersAccount.jsx b/packages/nova-base-components/lib/users/UsersAccount.jsx index 0efb09f03..77bb0d6f0 100644 --- a/packages/nova-base-components/lib/users/UsersAccount.jsx +++ b/packages/nova-base-components/lib/users/UsersAccount.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React from 'react'; import { DocumentContainer } from "meteor/utilities:react-list-container"; import Users from 'meteor/nova:users'; diff --git a/packages/nova-base-components/lib/users/UsersAccountMenu.jsx b/packages/nova-base-components/lib/users/UsersAccountMenu.jsx index 7628e9e16..024b30463 100644 --- a/packages/nova-base-components/lib/users/UsersAccountMenu.jsx +++ b/packages/nova-base-components/lib/users/UsersAccountMenu.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { FormattedMessage } from 'react-intl'; import { Dropdown, Button } from 'react-bootstrap'; diff --git a/packages/nova-base-components/lib/users/UsersEdit.jsx b/packages/nova-base-components/lib/users/UsersEdit.jsx index 0d43701cc..94ee36094 100644 --- a/packages/nova-base-components/lib/users/UsersEdit.jsx +++ b/packages/nova-base-components/lib/users/UsersEdit.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { FormattedMessage, intlShape } from 'react-intl'; import { Row, Col } from 'react-bootstrap'; diff --git a/packages/nova-base-components/lib/users/UsersMenu.jsx b/packages/nova-base-components/lib/users/UsersMenu.jsx index 08c0798d0..740985097 100644 --- a/packages/nova-base-components/lib/users/UsersMenu.jsx +++ b/packages/nova-base-components/lib/users/UsersMenu.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { FormattedMessage } from 'react-intl'; import { Meteor } from 'meteor/meteor'; diff --git a/packages/nova-base-components/lib/users/UsersProfile.jsx b/packages/nova-base-components/lib/users/UsersProfile.jsx index ae4d0a06e..a6e6591fa 100644 --- a/packages/nova-base-components/lib/users/UsersProfile.jsx +++ b/packages/nova-base-components/lib/users/UsersProfile.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { FormattedMessage } from 'react-intl'; import { ListContainer } from "meteor/utilities:react-list-container"; diff --git a/packages/nova-base-components/lib/users/UsersProfileCheck.jsx b/packages/nova-base-components/lib/users/UsersProfileCheck.jsx index 213b88a1b..f6b06359a 100644 --- a/packages/nova-base-components/lib/users/UsersProfileCheck.jsx +++ b/packages/nova-base-components/lib/users/UsersProfileCheck.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { FormattedMessage } from 'react-intl'; import { Modal } from 'react-bootstrap'; diff --git a/packages/nova-base-components/lib/users/UsersSingle.jsx b/packages/nova-base-components/lib/users/UsersSingle.jsx index 89b78cf73..49faf6fbb 100644 --- a/packages/nova-base-components/lib/users/UsersSingle.jsx +++ b/packages/nova-base-components/lib/users/UsersSingle.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React from 'react'; import { DocumentContainer } from "meteor/utilities:react-list-container"; import Users from 'meteor/nova:users'; diff --git a/packages/nova-base-routes/lib/routes.jsx b/packages/nova-base-routes/lib/routes.jsx index ee4c52e37..22589940f 100644 --- a/packages/nova-base-routes/lib/routes.jsx +++ b/packages/nova-base-routes/lib/routes.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React from 'react'; import {mount} from 'react-mounter'; import { Messages } from 'meteor/nova:core'; diff --git a/packages/nova-categories/lib/callbacks.js b/packages/nova-categories/lib/callbacks.js index 28f537fae..a205876b8 100644 --- a/packages/nova-categories/lib/callbacks.js +++ b/packages/nova-categories/lib/callbacks.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Posts from "meteor/nova:posts"; import Categories from "./collection.js"; diff --git a/packages/nova-categories/lib/helpers.js b/packages/nova-categories/lib/helpers.js index 8b5cd8d29..b39d01753 100644 --- a/packages/nova-categories/lib/helpers.js +++ b/packages/nova-categories/lib/helpers.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Posts from "meteor/nova:posts"; import Categories from "./collection.js"; diff --git a/packages/nova-categories/lib/parameters.js b/packages/nova-categories/lib/parameters.js index 2ef716c34..6d435411b 100644 --- a/packages/nova-categories/lib/parameters.js +++ b/packages/nova-categories/lib/parameters.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Categories from "./collection.js"; // Category Parameter diff --git a/packages/nova-categories/lib/schema.js b/packages/nova-categories/lib/schema.js index 37a8fac4e..1f1d4c70d 100644 --- a/packages/nova-categories/lib/schema.js +++ b/packages/nova-categories/lib/schema.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Categories from "./collection.js"; import Users from 'meteor/nova:users'; diff --git a/packages/nova-categories/lib/server/load_categories.js b/packages/nova-categories/lib/server/load_categories.js index 072843ed9..980524182 100644 --- a/packages/nova-categories/lib/server/load_categories.js +++ b/packages/nova-categories/lib/server/load_categories.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Categories from "../collection.js"; // Load categories from settings, if there are any diff --git a/packages/nova-categories/lib/subscriptions.js b/packages/nova-categories/lib/subscriptions.js index dec3a18e1..0ccbe0f3d 100644 --- a/packages/nova-categories/lib/subscriptions.js +++ b/packages/nova-categories/lib/subscriptions.js @@ -1 +1,3 @@ -Telescope.subscriptions.preload("categories"); +import Telescope from 'meteor/nova:lib'; + +Telescope.subscriptions.preload("categories"); \ No newline at end of file diff --git a/packages/nova-cloudinary/lib/server/cloudinary.js b/packages/nova-cloudinary/lib/server/cloudinary.js index 8f66b514a..1dbbdd182 100644 --- a/packages/nova-cloudinary/lib/server/cloudinary.js +++ b/packages/nova-cloudinary/lib/server/cloudinary.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import cloudinary from "cloudinary"; import Posts from "meteor/nova:posts"; import Users from 'meteor/nova:users'; diff --git a/packages/nova-comments/lib/callbacks.js b/packages/nova-comments/lib/callbacks.js index fdbeb10cb..a89ef368c 100644 --- a/packages/nova-comments/lib/callbacks.js +++ b/packages/nova-comments/lib/callbacks.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import marked from 'marked'; import Posts from "meteor/nova:posts"; import Comments from './collection.js'; diff --git a/packages/nova-comments/lib/methods.js b/packages/nova-comments/lib/methods.js index 570fc0a59..bc0e317ff 100644 --- a/packages/nova-comments/lib/methods.js +++ b/packages/nova-comments/lib/methods.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Comments from './collection.js'; import Posts from "meteor/nova:posts"; import Users from 'meteor/nova:users'; diff --git a/packages/nova-comments/lib/parameters.js b/packages/nova-comments/lib/parameters.js index ca1e8bdfc..1584a42a3 100644 --- a/packages/nova-comments/lib/parameters.js +++ b/packages/nova-comments/lib/parameters.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Comments from './collection.js'; Comments.parameters = {}; diff --git a/packages/nova-comments/lib/schema.js b/packages/nova-comments/lib/schema.js index 426e36d5f..890eddba2 100644 --- a/packages/nova-comments/lib/schema.js +++ b/packages/nova-comments/lib/schema.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Comments from './collection.js'; import Users from 'meteor/nova:users'; diff --git a/packages/nova-core/lib/callbacks.js b/packages/nova-core/lib/callbacks.js index 492e3378e..738be6247 100644 --- a/packages/nova-core/lib/callbacks.js +++ b/packages/nova-core/lib/callbacks.js @@ -1,3 +1,5 @@ +import Telescope from 'meteor/nova:lib'; + var modifyKarma = function (userId, karma) { Meteor.users.update({_id: userId}, {$inc: {"telescope.karma": karma}}); }; diff --git a/packages/nova-core/lib/containers/AppComposer.jsx b/packages/nova-core/lib/containers/AppComposer.jsx index a9a79320e..52e4c6ead 100644 --- a/packages/nova-core/lib/containers/AppComposer.jsx +++ b/packages/nova-core/lib/containers/AppComposer.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import { composeWithTracker } from 'react-komposer'; import Messages from '../messages.js'; import Events from "meteor/nova:events"; diff --git a/packages/nova-core/lib/icons.js b/packages/nova-core/lib/icons.js index abcd381c2..263bad790 100644 --- a/packages/nova-core/lib/icons.js +++ b/packages/nova-core/lib/icons.js @@ -1,3 +1,5 @@ +import Telescope from 'meteor/nova:lib'; + // ------------------------------ Dynamic Icons ------------------------------ // /** diff --git a/packages/nova-core/lib/server/start.js b/packages/nova-core/lib/server/start.js index 96ea72334..fe6b9f3db 100644 --- a/packages/nova-core/lib/server/start.js +++ b/packages/nova-core/lib/server/start.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import {Inject} from 'meteor/meteorhacks:inject-initial'; import Events from "meteor/nova:events"; diff --git a/packages/nova-core/package.js b/packages/nova-core/package.js index 3a57220ae..0c7baf781 100644 --- a/packages/nova-core/package.js +++ b/packages/nova-core/package.js @@ -18,7 +18,6 @@ Package.onUse(function(api) { 'nova:lib@0.26.5-nova' ]); - api.mainModule("lib/server.js", "server"); api.mainModule("lib/client.js", "client"); diff --git a/packages/nova-debug/lib/components/Cheatsheet.jsx b/packages/nova-debug/lib/components/Cheatsheet.jsx index a0b3d4f69..63841954c 100644 --- a/packages/nova-debug/lib/components/Cheatsheet.jsx +++ b/packages/nova-debug/lib/components/Cheatsheet.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React from 'react'; import Posts from "meteor/nova:posts"; import Comments from "meteor/nova:comments"; diff --git a/packages/nova-debug/lib/components/Emails.jsx b/packages/nova-debug/lib/components/Emails.jsx index 28cdab65a..ce913c18c 100644 --- a/packages/nova-debug/lib/components/Emails.jsx +++ b/packages/nova-debug/lib/components/Emails.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import Actions from "../actions.js"; import { Button } from 'react-bootstrap'; diff --git a/packages/nova-debug/lib/components/Settings.jsx b/packages/nova-debug/lib/components/Settings.jsx index 4e6463dd1..8e573f332 100644 --- a/packages/nova-debug/lib/components/Settings.jsx +++ b/packages/nova-debug/lib/components/Settings.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React from 'react'; const renderSetting = (field, key) => { diff --git a/packages/nova-debug/lib/routes.jsx b/packages/nova-debug/lib/routes.jsx index 8db8aff68..53cb2762f 100644 --- a/packages/nova-debug/lib/routes.jsx +++ b/packages/nova-debug/lib/routes.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Cheatsheet from './components/Cheatsheet.jsx'; import Groups from './components/Groups.jsx'; import Settings from './components/Settings.jsx'; diff --git a/packages/nova-debug/lib/server/methods.js b/packages/nova-debug/lib/server/methods.js index d306a2590..a91014e11 100644 --- a/packages/nova-debug/lib/server/methods.js +++ b/packages/nova-debug/lib/server/methods.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import NovaEmail from 'meteor/nova:email'; import Users from 'meteor/nova:users'; diff --git a/packages/nova-demo/demo-app.jsx b/packages/nova-demo/demo-app.jsx index 94afdd157..e7f13048d 100644 --- a/packages/nova-demo/demo-app.jsx +++ b/packages/nova-demo/demo-app.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import {mount} from 'react-mounter'; import MoviesWrapper from './demo-components.jsx'; diff --git a/packages/nova-demo/demo-components.jsx b/packages/nova-demo/demo-components.jsx index b2a136cbf..6e94f992f 100644 --- a/packages/nova-demo/demo-components.jsx +++ b/packages/nova-demo/demo-components.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { ListContainer } from "meteor/utilities:react-list-container"; import NovaForm from "meteor/nova:forms"; diff --git a/packages/nova-email/lib/server/email.js b/packages/nova-email/lib/server/email.js index d4d69a086..f1c6c433a 100644 --- a/packages/nova-email/lib/server/email.js +++ b/packages/nova-email/lib/server/email.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import NovaEmail from '../namespace.js'; import Juice from 'juice'; import htmlToText from 'html-to-text'; diff --git a/packages/nova-embedly/lib/components/EmbedlyURL.jsx b/packages/nova-embedly/lib/components/EmbedlyURL.jsx index 87ed26e45..35306afc2 100644 --- a/packages/nova-embedly/lib/components/EmbedlyURL.jsx +++ b/packages/nova-embedly/lib/components/EmbedlyURL.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import FRC from 'formsy-react-components'; const Input = FRC.Input; diff --git a/packages/nova-embedly/lib/components/ThumbnailURL.jsx b/packages/nova-embedly/lib/components/ThumbnailURL.jsx index 11ebbf66f..43dc027c5 100644 --- a/packages/nova-embedly/lib/components/ThumbnailURL.jsx +++ b/packages/nova-embedly/lib/components/ThumbnailURL.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { FormattedMessage } from 'react-intl'; import Formsy from 'formsy-react'; diff --git a/packages/nova-embedly/lib/custom_fields.js b/packages/nova-embedly/lib/custom_fields.js index f58a5ff00..45d3d9d7d 100644 --- a/packages/nova-embedly/lib/custom_fields.js +++ b/packages/nova-embedly/lib/custom_fields.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import PublicationUtils from 'meteor/utilities:smart-publications'; import EmbedlyURL from './components/EmbedlyURL.jsx'; import ThumbnailURL from './components/ThumbnailURL.jsx'; diff --git a/packages/nova-embedly/lib/embedly.js b/packages/nova-embedly/lib/embedly.js index 69c546a5f..3fd076ebd 100644 --- a/packages/nova-embedly/lib/embedly.js +++ b/packages/nova-embedly/lib/embedly.js @@ -1,4 +1,4 @@ - +import Telescope from 'meteor/nova:lib'; function addThumbnailClass (postClass, post) { var thumbnailClass = !!post.thumbnailUrl ? "has-thumbnail" : "no-thumbnail"; diff --git a/packages/nova-embedly/lib/server/get_embedly_data.js b/packages/nova-embedly/lib/server/get_embedly_data.js index e371e805a..ac2861d5b 100644 --- a/packages/nova-embedly/lib/server/get_embedly_data.js +++ b/packages/nova-embedly/lib/server/get_embedly_data.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Posts from "meteor/nova:posts"; import Users from 'meteor/nova:users'; diff --git a/packages/nova-events/lib/client/analytics.js b/packages/nova-events/lib/client/analytics.js index de4b1dd05..43b87703e 100644 --- a/packages/nova-events/lib/client/analytics.js +++ b/packages/nova-events/lib/client/analytics.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Events from '../collection.js'; Events.analyticsRequest = function() { diff --git a/packages/nova-getting-started/lib/getting_started.js b/packages/nova-getting-started/lib/getting_started.js index e16e7cbc7..ecfda40f8 100644 --- a/packages/nova-getting-started/lib/getting_started.js +++ b/packages/nova-getting-started/lib/getting_started.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Posts from "meteor/nova:posts"; import Comments from "meteor/nova:comments"; import Users from 'meteor/nova:users'; diff --git a/packages/nova-i18n-en-us/lib/en_US.js b/packages/nova-i18n-en-us/lib/en_US.js index 6b9f454be..e40f45c0b 100644 --- a/packages/nova-i18n-en-us/lib/en_US.js +++ b/packages/nova-i18n-en-us/lib/en_US.js @@ -1,3 +1,5 @@ +import Telescope from 'meteor/nova:lib'; + Telescope.strings.en = { "forms.submit": "Submit", "forms.cancel": "Cancel", diff --git a/packages/nova-kadira/lib/kadira-settings.js b/packages/nova-kadira/lib/kadira-settings.js index 855ac86ee..303b14879 100644 --- a/packages/nova-kadira/lib/kadira-settings.js +++ b/packages/nova-kadira/lib/kadira-settings.js @@ -1,3 +1,5 @@ +import Telescope from 'meteor/nova:lib'; + var kadiraAppIdProperty = { fieldName: "kadiraAppId", propertyGroup: "kadira", diff --git a/packages/nova-kadira/lib/server/kadira.js b/packages/nova-kadira/lib/server/kadira.js index fa2458b6e..022807979 100644 --- a/packages/nova-kadira/lib/server/kadira.js +++ b/packages/nova-kadira/lib/server/kadira.js @@ -1,3 +1,5 @@ +import Telescope from 'meteor/nova:lib'; + Meteor.startup(function() { if(process.env.NODE_ENV === "production" && !!Telescope.settings.get('kadiraAppId') && !!Telescope.settings.get('kadiraAppSecret')){ Kadira.connect(Telescope.settings.get('kadiraAppId'), Telescope.settings.get('kadiraAppSecret')); diff --git a/packages/nova-lib/lib/callbacks.js b/packages/nova-lib/lib/callbacks.js index eb47cb3b8..dc24e4d5f 100644 --- a/packages/nova-lib/lib/callbacks.js +++ b/packages/nova-lib/lib/callbacks.js @@ -1,3 +1,4 @@ +import Telescope from './config.js'; import moment from 'moment'; /** diff --git a/packages/nova-lib/lib/client.js b/packages/nova-lib/lib/client.js new file mode 100644 index 000000000..7e7891c87 --- /dev/null +++ b/packages/nova-lib/lib/client.js @@ -0,0 +1,3 @@ +import Telescope from './modules.js'; + +export default Telescope; diff --git a/packages/nova-lib/lib/client/jquery.exists.js b/packages/nova-lib/lib/client/jquery.exists.js deleted file mode 100644 index 7399f8443..000000000 --- a/packages/nova-lib/lib/client/jquery.exists.js +++ /dev/null @@ -1,3 +0,0 @@ -$.fn.exists = function () { - return this.length !== 0; -} \ No newline at end of file diff --git a/packages/nova-lib/lib/collections.js b/packages/nova-lib/lib/collections.js index db9335fdf..8307f1014 100644 --- a/packages/nova-lib/lib/collections.js +++ b/packages/nova-lib/lib/collections.js @@ -1,3 +1,5 @@ +import Telescope from './config.js'; + /** * @summary Meteor Collections. * @class Mongo.Collection diff --git a/packages/nova-lib/lib/config.js b/packages/nova-lib/lib/config.js index dca1d50d2..ac7b0d723 100644 --- a/packages/nova-lib/lib/config.js +++ b/packages/nova-lib/lib/config.js @@ -78,4 +78,6 @@ Telescope.routes = { Telescope.headtags = { meta: [], link: [] -} \ No newline at end of file +} + +export default Telescope; \ No newline at end of file diff --git a/packages/nova-lib/lib/deep_extend.js b/packages/nova-lib/lib/deep_extend.js index 0638a54b7..c39bd83bd 100644 --- a/packages/nova-lib/lib/deep_extend.js +++ b/packages/nova-lib/lib/deep_extend.js @@ -1,3 +1,5 @@ +import Telescope from './config.js'; + // see: http://stackoverflow.com/questions/9399365/deep-extend-like-jquerys-for-nodejs Telescope.utils.deepExtend = function () { var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, diff --git a/packages/nova-lib/lib/intl-polyfill.js b/packages/nova-lib/lib/intl-polyfill.js index dc54415e6..a6a3213c7 100644 --- a/packages/nova-lib/lib/intl-polyfill.js +++ b/packages/nova-lib/lib/intl-polyfill.js @@ -1,3 +1,5 @@ +import Telescope from './config.js'; + var areIntlLocalesSupported = require('intl-locales-supported'); var localesMyAppSupports = [ diff --git a/packages/nova-lib/lib/modules.js b/packages/nova-lib/lib/modules.js new file mode 100644 index 000000000..df229dd94 --- /dev/null +++ b/packages/nova-lib/lib/modules.js @@ -0,0 +1,11 @@ +import Telescope from './config.js'; + +import './utils.js'; +import './callbacks.js'; +import './settings.js'; +import './collections.js'; +import './deep.js'; +import './deep_extend.js'; +import './intl-polyfill.js'; + +export default Telescope; \ No newline at end of file diff --git a/packages/nova-lib/lib/server.js b/packages/nova-lib/lib/server.js new file mode 100644 index 000000000..9106eeaf6 --- /dev/null +++ b/packages/nova-lib/lib/server.js @@ -0,0 +1,5 @@ +import Telescope from './modules.js'; + +import './server/oauth-config.js'; + +export default Telescope; diff --git a/packages/nova-lib/lib/settings.js b/packages/nova-lib/lib/settings.js index b01f2b691..bb23be5cc 100644 --- a/packages/nova-lib/lib/settings.js +++ b/packages/nova-lib/lib/settings.js @@ -1,3 +1,5 @@ +import Telescope from './config.js'; + Telescope.settings = {}; Telescope.settings.getFromJSON = function (setting) { diff --git a/packages/nova-lib/lib/utils.js b/packages/nova-lib/lib/utils.js index 4a947c220..22b3f32b5 100644 --- a/packages/nova-lib/lib/utils.js +++ b/packages/nova-lib/lib/utils.js @@ -1,3 +1,4 @@ +import Telescope from './config.js'; import marked from 'marked'; import urlObject from 'url'; import moment from 'moment'; diff --git a/packages/nova-lib/package.js b/packages/nova-lib/package.js index 61cc78cf1..58bd593f4 100644 --- a/packages/nova-lib/package.js +++ b/packages/nova-lib/package.js @@ -52,23 +52,11 @@ Package.onUse(function (api) { api.imply(packages); - api.addFiles([ - 'lib/config.js', - 'lib/utils.js', - 'lib/callbacks.js', - 'lib/settings.js', - 'lib/collections.js', - 'lib/deep.js', - 'lib/deep_extend.js', - 'lib/intl-polyfill.js' - ], ['client', 'server']); + // api.export([ + // 'Telescope' + // ]); - api.addFiles([ - 'lib/server/oauth-config.js' - ], ['server']); - - api.export([ - 'Telescope' - ]); + api.mainModule("lib/server.js", "server"); + api.mainModule("lib/client.js", "client"); }); diff --git a/packages/nova-newsletter/lib/components/NewsletterSubscribe.jsx b/packages/nova-newsletter/lib/components/NewsletterSubscribe.jsx index f8976b33f..31163f1d5 100644 --- a/packages/nova-newsletter/lib/components/NewsletterSubscribe.jsx +++ b/packages/nova-newsletter/lib/components/NewsletterSubscribe.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; // this component is used as a custom controller in user's account edit (cf. ./custom_fields.js) diff --git a/packages/nova-newsletter/lib/custom_fields.js b/packages/nova-newsletter/lib/custom_fields.js index ed02e42d9..2d1ffc917 100644 --- a/packages/nova-newsletter/lib/custom_fields.js +++ b/packages/nova-newsletter/lib/custom_fields.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import NewsletterSubscribe from './components/NewsletterSubscribe.jsx'; import Posts from "meteor/nova:posts"; import Users from 'meteor/nova:users'; diff --git a/packages/nova-newsletter/lib/server/callbacks.js b/packages/nova-newsletter/lib/server/callbacks.js index f438cb049..7371ecb8a 100644 --- a/packages/nova-newsletter/lib/server/callbacks.js +++ b/packages/nova-newsletter/lib/server/callbacks.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import MailChimpList from './mailchimp/mailchimp_list.js'; import Users from 'meteor/nova:users'; diff --git a/packages/nova-newsletter/lib/server/cron.js b/packages/nova-newsletter/lib/server/cron.js index 319752c99..ca8653b8e 100644 --- a/packages/nova-newsletter/lib/server/cron.js +++ b/packages/nova-newsletter/lib/server/cron.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Newsletter from '../namespace.js'; import moment from 'moment'; diff --git a/packages/nova-newsletter/lib/server/emails.js b/packages/nova-newsletter/lib/server/emails.js index 1c38cb55c..4a9a2a946 100644 --- a/packages/nova-newsletter/lib/server/emails.js +++ b/packages/nova-newsletter/lib/server/emails.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import NovaEmail from 'meteor/nova:email'; import Newsletter from "../namespace.js"; diff --git a/packages/nova-newsletter/lib/server/mailchimp/mailchimp_list.js b/packages/nova-newsletter/lib/server/mailchimp/mailchimp_list.js index 6d158df36..1e25fd632 100644 --- a/packages/nova-newsletter/lib/server/mailchimp/mailchimp_list.js +++ b/packages/nova-newsletter/lib/server/mailchimp/mailchimp_list.js @@ -1,5 +1,4 @@ -// methods to add and remove users from MailChimp lists - +import Telescope from 'meteor/nova:lib'; import Users from 'meteor/nova:users'; import MailChimp from './mailchimp_api.js'; diff --git a/packages/nova-newsletter/lib/server/mailchimp/mailchimp_newsletter.js b/packages/nova-newsletter/lib/server/mailchimp/mailchimp_newsletter.js index a6d5ddb20..3ab67bf87 100644 --- a/packages/nova-newsletter/lib/server/mailchimp/mailchimp_newsletter.js +++ b/packages/nova-newsletter/lib/server/mailchimp/mailchimp_newsletter.js @@ -1,5 +1,6 @@ // newsletter scheduling with MailChimp +import Telescope from 'meteor/nova:lib'; import Newsletter from '../../namespace.js'; import MailChimp from './mailchimp_api.js'; import NovaEmail from 'meteor/nova:email'; diff --git a/packages/nova-newsletter/lib/server/newsletter.js b/packages/nova-newsletter/lib/server/newsletter.js index 9901e8854..ee684e3a4 100644 --- a/packages/nova-newsletter/lib/server/newsletter.js +++ b/packages/nova-newsletter/lib/server/newsletter.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import moment from 'moment'; import Posts from "meteor/nova:posts"; import Comments from "meteor/nova:comments"; diff --git a/packages/nova-notifications/lib/notifications.js b/packages/nova-notifications/lib/notifications.js index 65facf48f..3ed9d86bd 100644 --- a/packages/nova-notifications/lib/notifications.js +++ b/packages/nova-notifications/lib/notifications.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Users from 'meteor/nova:users'; import NovaEmail from 'meteor/nova:email'; diff --git a/packages/nova-notifications/lib/server/notifications-server.js b/packages/nova-notifications/lib/server/notifications-server.js index 38ba549f6..5f0c4a47f 100644 --- a/packages/nova-notifications/lib/server/notifications-server.js +++ b/packages/nova-notifications/lib/server/notifications-server.js @@ -1,3 +1,5 @@ +import Telescope from 'meteor/nova:lib'; + getUnsubscribeLink = function(user){ return Telescope.utils.getRouteUrl('unsubscribe', {hash: user.telescope.emailHash}); }; diff --git a/packages/nova-posts/lib/callbacks.js b/packages/nova-posts/lib/callbacks.js index fad9f402c..1eee9c868 100644 --- a/packages/nova-posts/lib/callbacks.js +++ b/packages/nova-posts/lib/callbacks.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Posts from './collection.js' import marked from 'marked'; import Users from 'meteor/nova:users'; diff --git a/packages/nova-posts/lib/helpers.js b/packages/nova-posts/lib/helpers.js index 0f543baca..c252612f5 100644 --- a/packages/nova-posts/lib/helpers.js +++ b/packages/nova-posts/lib/helpers.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import moment from 'moment'; import Posts from './collection.js'; import Users from 'meteor/nova:users'; diff --git a/packages/nova-posts/lib/methods.js b/packages/nova-posts/lib/methods.js index b18b1285b..3818eb78d 100644 --- a/packages/nova-posts/lib/methods.js +++ b/packages/nova-posts/lib/methods.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Posts from './collection.js' import Users from 'meteor/nova:users'; import Events from "meteor/nova:events"; diff --git a/packages/nova-posts/lib/notifications.js b/packages/nova-posts/lib/notifications.js index 361a4c3f7..dc392ad00 100644 --- a/packages/nova-posts/lib/notifications.js +++ b/packages/nova-posts/lib/notifications.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Posts from './collection.js' import Users from 'meteor/nova:users'; diff --git a/packages/nova-posts/lib/parameters.js b/packages/nova-posts/lib/parameters.js index 8d588ca5b..9f8b8cd34 100644 --- a/packages/nova-posts/lib/parameters.js +++ b/packages/nova-posts/lib/parameters.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Posts from './collection.js' import moment from 'moment'; diff --git a/packages/nova-posts/lib/server/publications.js b/packages/nova-posts/lib/server/publications.js index 76fd66d4f..8e3f4486a 100644 --- a/packages/nova-posts/lib/server/publications.js +++ b/packages/nova-posts/lib/server/publications.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Posts from '../collection.js'; // import Comments from "meteor/nova:comments"; import Users from 'meteor/nova:users'; diff --git a/packages/nova-rss/lib/headtags.js b/packages/nova-rss/lib/headtags.js index a00ec8084..b0021a269 100644 --- a/packages/nova-rss/lib/headtags.js +++ b/packages/nova-rss/lib/headtags.js @@ -1,3 +1,5 @@ +import Telescope from 'meteor/nova:lib'; + Telescope.headtags.link.push({ rel: "alternate", type: "application/rss+xml", diff --git a/packages/nova-rss/lib/server/rss.js b/packages/nova-rss/lib/server/rss.js index 90b12c1fc..eea54636d 100644 --- a/packages/nova-rss/lib/server/rss.js +++ b/packages/nova-rss/lib/server/rss.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Posts from "meteor/nova:posts"; import Comments from "meteor/nova:comments"; diff --git a/packages/nova-search/lib/parameters.js b/packages/nova-search/lib/parameters.js index bd52d198b..07764aac5 100644 --- a/packages/nova-search/lib/parameters.js +++ b/packages/nova-search/lib/parameters.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import escapeStringRegexp from 'escape-string-regexp'; function addSearchQueryParameter (parameters, terms) { diff --git a/packages/nova-settings/lib/collection.js b/packages/nova-settings/lib/collection.js index d72959693..b91cf19bd 100644 --- a/packages/nova-settings/lib/collection.js +++ b/packages/nova-settings/lib/collection.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Users from 'meteor/nova:users'; const isInSettingsJSON = function () { diff --git a/packages/nova-settings/lib/init.js b/packages/nova-settings/lib/init.js index ed2a4b28b..e8da188c9 100644 --- a/packages/nova-settings/lib/init.js +++ b/packages/nova-settings/lib/init.js @@ -1,3 +1,5 @@ +import Telescope from 'meteor/nova:lib'; + Meteor.startup(function () { if (Telescope.settings.collection.find().count() === 0) { Telescope.settings.collection.insert({}); diff --git a/packages/nova-settings/lib/methods.js b/packages/nova-settings/lib/methods.js index a15011064..9800a3fc7 100644 --- a/packages/nova-settings/lib/methods.js +++ b/packages/nova-settings/lib/methods.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Users from 'meteor/nova:users'; Telescope.settings.collection.smartMethods({ diff --git a/packages/nova-settings/lib/server/publications.js b/packages/nova-settings/lib/server/publications.js index 2913e5951..32f8a9d8f 100644 --- a/packages/nova-settings/lib/server/publications.js +++ b/packages/nova-settings/lib/server/publications.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Users from 'meteor/nova:users'; // Meteor.publish('settings', function() { diff --git a/packages/nova-subscribe/lib/callbacks.js b/packages/nova-subscribe/lib/callbacks.js index bb42dd03c..96e15fb18 100644 --- a/packages/nova-subscribe/lib/callbacks.js +++ b/packages/nova-subscribe/lib/callbacks.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Posts from "meteor/nova:posts"; import Users from 'meteor/nova:users'; diff --git a/packages/nova-subscribe/lib/components/SubscribedPosts.jsx b/packages/nova-subscribe/lib/components/SubscribedPosts.jsx index 5357897bc..3bf023386 100644 --- a/packages/nova-subscribe/lib/components/SubscribedPosts.jsx +++ b/packages/nova-subscribe/lib/components/SubscribedPosts.jsx @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { ListContainer } from "meteor/utilities:react-list-container"; import Posts from "meteor/nova:posts"; diff --git a/packages/nova-users/lib/callbacks.js b/packages/nova-users/lib/callbacks.js index 039c32022..96cfee315 100644 --- a/packages/nova-users/lib/callbacks.js +++ b/packages/nova-users/lib/callbacks.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Users from './collection.js'; import marked from 'marked'; import Events from "meteor/nova:events"; diff --git a/packages/nova-users/lib/collection.js b/packages/nova-users/lib/collection.js index f129d20c8..808e44a20 100644 --- a/packages/nova-users/lib/collection.js +++ b/packages/nova-users/lib/collection.js @@ -1,3 +1,5 @@ +import Telescope from 'meteor/nova:lib'; + /** * @summary Telescope Users namespace * @namespace Users diff --git a/packages/nova-users/lib/helpers.js b/packages/nova-users/lib/helpers.js index 0aaa254bd..33b55205c 100644 --- a/packages/nova-users/lib/helpers.js +++ b/packages/nova-users/lib/helpers.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Users from './collection.js'; import moment from 'moment'; diff --git a/packages/nova-users/lib/methods.js b/packages/nova-users/lib/methods.js index b6af797ff..6dc3afbef 100644 --- a/packages/nova-users/lib/methods.js +++ b/packages/nova-users/lib/methods.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Users from './collection.js'; var completeUserProfile = function (userId, modifier, user) { diff --git a/packages/nova-users/lib/notifications.js b/packages/nova-users/lib/notifications.js index c75b047ff..64808334f 100644 --- a/packages/nova-users/lib/notifications.js +++ b/packages/nova-users/lib/notifications.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Users from './collection.js'; Users.getNotificationProperties = function (user) { diff --git a/packages/nova-users/lib/schema.js b/packages/nova-users/lib/schema.js index 87396aa23..943c4a7a5 100644 --- a/packages/nova-users/lib/schema.js +++ b/packages/nova-users/lib/schema.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Users from './collection.js'; const adminGroup = { diff --git a/packages/nova-users/lib/server/create_user.js b/packages/nova-users/lib/server/create_user.js index ae42394dd..c4c004059 100644 --- a/packages/nova-users/lib/server/create_user.js +++ b/packages/nova-users/lib/server/create_user.js @@ -1,3 +1,5 @@ +import Telescope from 'meteor/nova:lib'; + function telescopeCreateUserCallback (options, user) { user = Telescope.callbacks.run("onCreateUser", user, options); return user; diff --git a/packages/nova-voting/lib/scoring.js b/packages/nova-voting/lib/scoring.js index 4ea2e707e..f077e60e2 100644 --- a/packages/nova-voting/lib/scoring.js +++ b/packages/nova-voting/lib/scoring.js @@ -1,3 +1,5 @@ +import Telescope from 'meteor/nova:lib'; + Telescope.updateScore = function (args) { var collection = args.collection; var item = args.item; diff --git a/packages/nova-voting/lib/server/cron.js b/packages/nova-voting/lib/server/cron.js index f281e81ea..ec2769da8 100644 --- a/packages/nova-voting/lib/server/cron.js +++ b/packages/nova-voting/lib/server/cron.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Posts from "meteor/nova:posts"; import Comments from "meteor/nova:comments"; diff --git a/packages/nova-voting/lib/vote.js b/packages/nova-voting/lib/vote.js index 6396f8e52..7a5dcef40 100644 --- a/packages/nova-voting/lib/vote.js +++ b/packages/nova-voting/lib/vote.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Users from 'meteor/nova:users'; // The equation to determine voting power. Defaults to returning 1 for everybody From 58148ae5996735a250772284487d0ae9d5d3eb41 Mon Sep 17 00:00:00 2001 From: xavcz Date: Tue, 9 Aug 2016 07:57:12 +0200 Subject: [PATCH 33/60] fix #1423 --- packages/nova-forms/lib/NovaForm.jsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/nova-forms/lib/NovaForm.jsx b/packages/nova-forms/lib/NovaForm.jsx index d311f99cc..f92b4dcc0 100644 --- a/packages/nova-forms/lib/NovaForm.jsx +++ b/packages/nova-forms/lib/NovaForm.jsx @@ -307,8 +307,13 @@ class NovaForm extends Component{ submitForm(data) { this.setState({disabled: true}); - // complete the data with values not caught by formsy submit handler (ex: Datetimepicker or NewsletterSubcribe components) - data = {...data, ...this.state.currentValues, ...this.state.autofilledValues}; + // complete the data with values from custom components which are not being catched by Formsy mixin + // note: it follows the same logic as NovaForm's getDocument method + data = { + ...this.state.autofilledValues, // ex: can be values from EmbedlyURL or NewsletterSubscribe component + ...data, // original data generated thanks to Formsy + ...this.state.currentValues, // ex: can be values from DateTime component + }; const fields = this.getFieldNames(); From c0f0f4b293e866286f568a44e95e785f5ed1b9f1 Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Wed, 10 Aug 2016 10:32:36 +0900 Subject: [PATCH 34/60] update formsy and formsy-react-components --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5a447a0e4..c8847a4ea 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,8 @@ "bootstrap": "^4.0.0-alpha.2", "classnames": "^2.2.3", "escape-string-regexp": "^1.0.5", - "formsy-react": "^0.18.0", - "formsy-react-components": "^0.7.1", + "formsy-react": "^0.18.1", + "formsy-react-components": "^0.8.1", "handlebars": "^4.0.5", "history": "^3.0.0", "html-to-text": "^2.1.0", From 72b63533219fdfde378a709b70339f25b5f19c80 Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Wed, 10 Aug 2016 10:40:17 +0900 Subject: [PATCH 35/60] put statuses on Telescope object instead of Posts --- packages/nova-lib/lib/config.js | 25 +++++++++++++++++++++++++ packages/nova-posts/lib/schema.js | 29 ++--------------------------- packages/nova-users/lib/groups.js | 3 ++- 3 files changed, 29 insertions(+), 28 deletions(-) diff --git a/packages/nova-lib/lib/config.js b/packages/nova-lib/lib/config.js index ac7b0d723..5a1c2f5f8 100644 --- a/packages/nova-lib/lib/config.js +++ b/packages/nova-lib/lib/config.js @@ -80,4 +80,29 @@ Telescope.headtags = { link: [] } +// ------------------------------------- Statuses -------------------------------- // + +Telescope.statuses = [ + { + value: 1, + label: 'pending' + }, + { + value: 2, + label: 'approved' + }, + { + value: 3, + label: 'rejected' + }, + { + value: 4, + label: 'spam' + }, + { + value: 5, + label: 'deleted' + } +]; + export default Telescope; \ No newline at end of file diff --git a/packages/nova-posts/lib/schema.js b/packages/nova-posts/lib/schema.js index 9147b9d4b..7704f81d9 100644 --- a/packages/nova-posts/lib/schema.js +++ b/packages/nova-posts/lib/schema.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Posts from './collection.js'; import Users from 'meteor/nova:users'; @@ -7,32 +8,6 @@ import Users from 'meteor/nova:users'; */ Posts.config = {}; -/** - * @summary Post Statuses - */ -Posts.config.postStatuses = [ - { - value: 1, - label: 'pending' - }, - { - value: 2, - label: 'approved' - }, - { - value: 3, - label: 'rejected' - }, - { - value: 4, - label: 'spam' - }, - { - value: 5, - label: 'deleted' - } -]; - Posts.config.STATUS_PENDING = 1; Posts.config.STATUS_APPROVED = 2; Posts.config.STATUS_REJECTED = 3; @@ -198,7 +173,7 @@ Posts.schemaJSON = { }, autoform: { noselect: true, - options: Posts.config.postStatuses, + options: Telescope.statuses, group: 'admin' }, group: Posts.formGroups.admin diff --git a/packages/nova-users/lib/groups.js b/packages/nova-users/lib/groups.js index 99f367748..2a047c1f1 100644 --- a/packages/nova-users/lib/groups.js +++ b/packages/nova-users/lib/groups.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Users from './collection.js'; /** @@ -98,7 +99,7 @@ Users.canDo = (user, action) => { */ Users.canView = function (user, document) { - const status = _.findWhere(Posts.config.postStatuses, {value: document.status}).label; + const status = _.findWhere(Telescope.statuses, {value: document.status}).label; const collectionName = document.getCollectionName(); if (!document) { From 7e0b1fb2d7db4f689558f93cc9a47d5350cd33bd Mon Sep 17 00:00:00 2001 From: xavcz Date: Wed, 10 Aug 2016 07:49:40 +0200 Subject: [PATCH 36/60] fix Comments.getPageUrl ; dust some related functions down --- packages/nova-comments/lib/helpers.js | 13 ++++--------- packages/nova-comments/lib/notifications.js | 6 +++--- packages/nova-posts/lib/helpers.js | 5 ++--- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/packages/nova-comments/lib/helpers.js b/packages/nova-comments/lib/helpers.js index c7ab9a782..43f792a7e 100644 --- a/packages/nova-comments/lib/helpers.js +++ b/packages/nova-comments/lib/helpers.js @@ -11,10 +11,9 @@ Comments.helpers({getCollectionName: () => "comments"}); * @summary Get URL of a comment page. * @param {Object} comment */ -Comments.getPageUrl = function(comment, isAbsolute){ - var isAbsolute = typeof isAbsolute === "undefined" ? false : isAbsolute; // default to false - var prefix = isAbsolute ? Telescope.utils.getSiteUrl().slice(0,-1) : ""; - return prefix + "foo" + "#"+comment._id; +Comments.getPageUrl = function(comment, isAbsolute = false){ + const post = Posts.findOne(comment.postId); + return `${Posts.getPageUrl(post, isAbsolute)}/#${comment._id}`; }; Comments.helpers({getPageUrl: function () {return Comments.getPageUrl(this);}}); @@ -28,11 +27,7 @@ Comments.helpers({getPageUrl: function () {return Comments.getPageUrl(this);}}); */ Comments.getAuthorName = function (comment) { var user = Meteor.users.findOne(comment.userId); - if (user) { - return user.getDisplayName(); - } else { - return comment.author; - } + return user ? user.getDisplayName() : comment.author; }; Comments.helpers({getAuthorName: function () {return Comments.getAuthorName(this);}}); diff --git a/packages/nova-comments/lib/notifications.js b/packages/nova-comments/lib/notifications.js index 3e03f4719..c736a7ec9 100644 --- a/packages/nova-comments/lib/notifications.js +++ b/packages/nova-comments/lib/notifications.js @@ -3,9 +3,9 @@ import Posts from "meteor/nova:posts"; Comments.getNotificationProperties = function (data) { const comment = data.comment; - var commentAuthor = Meteor.users.findOne(comment.userId); - var post = Posts.findOne(comment.postId); - var properties = { + const commentAuthor = Meteor.users.findOne(comment.userId); + const post = Posts.findOne(comment.postId); + const properties = { profileUrl: commentAuthor && commentAuthor.getProfileUrl(true), postUrl: Posts.getPageUrl(post, true), authorName : Comments.getAuthorName(comment), diff --git a/packages/nova-posts/lib/helpers.js b/packages/nova-posts/lib/helpers.js index c252612f5..316c5dcaf 100644 --- a/packages/nova-posts/lib/helpers.js +++ b/packages/nova-posts/lib/helpers.js @@ -42,9 +42,8 @@ Posts.helpers({getLinkTarget: function () {return Posts.getLinkTarget(this);}}); * @summary Get URL of a post page. * @param {Object} post */ -Posts.getPageUrl = function(post, isAbsolute){ - isAbsolute = typeof isAbsolute === "undefined" ? false : isAbsolute; // default to false - var prefix = isAbsolute ? Telescope.utils.getSiteUrl().slice(0,-1) : ""; +Posts.getPageUrl = function(post, isAbsolute = false){ + const prefix = isAbsolute ? Telescope.utils.getSiteUrl().slice(0,-1) : ""; return `${prefix}/posts/${post._id}/${post.slug}`; }; Posts.helpers({getPageUrl: function (isAbsolute) {return Posts.getPageUrl(this, isAbsolute);}}); From b021f4586d2232e60e01b0e58c56ade495beb92f Mon Sep 17 00:00:00 2001 From: Rubens Mariuzzo Date: Thu, 11 Aug 2016 11:03:33 -0400 Subject: [PATCH 37/60] =?UTF-8?q?Syntax=20highlighting=20added=20(where=20?= =?UTF-8?q?missing)=20=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f1b473d5c..0ad482e35 100644 --- a/README.md +++ b/README.md @@ -41,25 +41,25 @@ Note that both versions use the same data format, so you can go back and forth b [Install Meteor](https://www.meteor.com/install): -``` +```sh curl https://install.meteor.com/ | sh ``` Clone this repository locally: -``` +```sh git clone git@github.com:TelescopeJS/Telescope.git ``` Install the necessary NPM packages: -``` +```sh npm install ``` Then run the app with: -``` +```sh meteor ``` @@ -130,7 +130,7 @@ Just like Settings, you can specify categories either via the in-app UI or via ` To add new social login options, you'll first need to add your API keys to your `settings.json` file. For example: -``` +```json "oAuth": { "twitter": { "consumerKey": "foo", @@ -147,7 +147,7 @@ To add new social login options, you'll first need to add your API keys to your Then, add the relevant Meteor package: -``` +```sh meteor add accounts-twitter accounts-facebook ``` From 3d5c3d0330d32b09398e9893a63ec71dbaba3fd3 Mon Sep 17 00:00:00 2001 From: xavcz Date: Thu, 11 Aug 2016 18:01:27 +0200 Subject: [PATCH 38/60] refactor methods so user can subscribe to another user, create UsersSubscribe --- packages/nova-i18n-en-us/lib/en_US.js | 3 - packages/nova-subscribe/lib/client.js | 16 +- packages/nova-subscribe/lib/components.js | 8 + .../lib/components/Subscribe.jsx | 2 +- .../lib/components/UsersSubscribe.jsx | 77 +++++++ packages/nova-subscribe/lib/intl.js | 20 ++ packages/nova-subscribe/lib/methods.js | 193 ++++++++++++------ packages/nova-subscribe/lib/modules.js | 6 + packages/nova-subscribe/lib/server.js | 16 +- 9 files changed, 242 insertions(+), 99 deletions(-) create mode 100644 packages/nova-subscribe/lib/components.js create mode 100644 packages/nova-subscribe/lib/components/UsersSubscribe.jsx create mode 100644 packages/nova-subscribe/lib/intl.js create mode 100644 packages/nova-subscribe/lib/modules.js diff --git a/packages/nova-i18n-en-us/lib/en_US.js b/packages/nova-i18n-en-us/lib/en_US.js index e40f45c0b..6bca1dcc1 100644 --- a/packages/nova-i18n-en-us/lib/en_US.js +++ b/packages/nova-i18n-en-us/lib/en_US.js @@ -33,9 +33,6 @@ Telescope.strings.en = { "posts.rate_limit_error": "Please wait {details} seconds before posting again.", "posts.postedAt": "Posted at", "posts.dateNotDefined": "Date not defined", - "posts.subscribe": "Subscribe", - "posts.unsubscribe": "Unsubscribe", - "posts.subscribed_posts" : "Subscribed Posts", "comments.comments": "Comments", "comments.count": "{count, plural, =0 {No comments} one {# comment} other {# comments}}", diff --git a/packages/nova-subscribe/lib/client.js b/packages/nova-subscribe/lib/client.js index 6f0e8238d..5e1634120 100644 --- a/packages/nova-subscribe/lib/client.js +++ b/packages/nova-subscribe/lib/client.js @@ -1,15 +1 @@ -import {subscribeItem, unsubscribeItem} from './methods.js'; -import Subscribe from './components/Subscribe.jsx'; -import SubscribedPosts from './components/SubscribedPosts.jsx'; - -import './callbacks.js'; -import './custom_fields.js'; -import './methods.js'; -import './views.js'; - -export { - subscribeItem, - unsubscribeItem, - Subscribe, - SubscribedPosts -}; \ No newline at end of file +import './modules.js'; \ No newline at end of file diff --git a/packages/nova-subscribe/lib/components.js b/packages/nova-subscribe/lib/components.js new file mode 100644 index 000000000..280492970 --- /dev/null +++ b/packages/nova-subscribe/lib/components.js @@ -0,0 +1,8 @@ +import Telescope from 'meteor/nova:lib'; +import Subscribe from './components/Subscribe.jsx'; +import UsersSubscribe from './components/UsersSubscribe.jsx'; +import SubscribedPosts from './components/SubscribedPosts.jsx'; + +Telescope.components.Subscribe = Subscribe; +Telescope.components.UsersSubscribe = UsersSubscribe; +Telescope.components.SubscribedPosts = SubscribedPosts; \ No newline at end of file diff --git a/packages/nova-subscribe/lib/components/Subscribe.jsx b/packages/nova-subscribe/lib/components/Subscribe.jsx index ff9722aa9..477c3309d 100644 --- a/packages/nova-subscribe/lib/components/Subscribe.jsx +++ b/packages/nova-subscribe/lib/components/Subscribe.jsx @@ -42,7 +42,7 @@ class Subscribe extends Component { const user = this.context.currentUser; // can't subscribe to own post (also validated on server side) - if(user && post.author === user.username) { + if(!user || user && post.author === user.username) { return null; } diff --git a/packages/nova-subscribe/lib/components/UsersSubscribe.jsx b/packages/nova-subscribe/lib/components/UsersSubscribe.jsx new file mode 100644 index 000000000..9a4b5e5d1 --- /dev/null +++ b/packages/nova-subscribe/lib/components/UsersSubscribe.jsx @@ -0,0 +1,77 @@ +import React, { PropTypes, Component } from 'react'; +import { intlShape } from 'react-intl'; + +class UsersSubscribe extends Component { + + constructor(props, context) { + super(props, context); + + this.onSubscribe = this.onSubscribe.bind(this); + this.isSubscribed = this.isSubscribed.bind(this); + } + + onSubscribe(e) { + e.preventDefault(); + + const user = this.props.user; + const currentUser = this.context.currentUser; + + let callAction = 'users.subscribe'; + + let isSubscribed = this.isSubscribed(user, currentUser); + if( isSubscribed ) { + callAction = "users.unsubscribe"; + } + debugger + + this.context.actions.call(callAction, user._id, (error, result) => { + if (error) + this.context.messages.flash(error.message, "error") + if (result) + this.context.events.track(callAction, {'_id': user._id}); + }); + } + + isSubscribed(user, currentUser) { + if (!user || !currentUser) + return false; + + return user.telescope && user.telescope.subscribers && user.telescope.subscribers.indexOf(currentUser._id) != -1; + } + + render() { + const {user} = this.props; + const {currentUser, intl} = this.context; + + // can't subscribe to yourself (also validated on server side) + if(!user || user === currentUser) { + return null; + } + + let btnTitle = "users.subscribe"; + + let isSubscribed = this.isSubscribed(user, currentUser); + if( isSubscribed ) { + btnTitle = "users.unsubscribe"; + } + + return ( + {intl.formatMessage({id: btnTitle})} + ); + } + +} + +UsersSubscribe.propTypes = { + user: React.PropTypes.object.isRequired +} + +UsersSubscribe.contextTypes = { + currentUser: React.PropTypes.object, + messages: React.PropTypes.object, + actions: React.PropTypes.object, + events: React.PropTypes.object, + intl: intlShape +}; + +export default UsersSubscribe; diff --git a/packages/nova-subscribe/lib/intl.js b/packages/nova-subscribe/lib/intl.js new file mode 100644 index 000000000..a41455969 --- /dev/null +++ b/packages/nova-subscribe/lib/intl.js @@ -0,0 +1,20 @@ +import Telescope from 'meteor/nova:lib'; + +Meteor.startup(() => { + // note: add the keys *after* nova:i18n-en-us has been loaded! + Telescope.strings.en = { + ...Telescope.strings.en, + "posts.subscribe": "Subscribe", + "posts.unsubscribe": "Unsubscribe", + "posts.subscribed_posts" : "Posts subscribed to", + + "users.subscribe": "Subscribe to this user's posts", + "users.unsubscribe": "Unsubscribe to this user's posts", + "users.subscribed_users" : "Users subscribed to", + "users.subscribers": "Subscribers", + + "categories.subscribe": "Subscribe to this categorie's posts", + "categories.unsubscribe": "Unsubscribe to this categorie's posts", + "categories.subscribed_categories" : "Categories subscribed to", + }; +}); \ No newline at end of file diff --git a/packages/nova-subscribe/lib/methods.js b/packages/nova-subscribe/lib/methods.js index a7a788007..8c37b0a10 100644 --- a/packages/nova-subscribe/lib/methods.js +++ b/packages/nova-subscribe/lib/methods.js @@ -1,86 +1,149 @@ import Posts from "meteor/nova:posts"; import Users from 'meteor/nova:users'; -var hasSubscribedItem = function (item, user) { - return item.subscribers && item.subscribers.indexOf(user._id) != -1; -}; +/** + * @summary Verify that the un/subscription can be performed + * @returns {Object} collectionName, fields: object, item, hasSubscribedItem: boolean + * @param {String} action + * @param {Collection} collection + * @param {String} itemId + * @param {Object} user: current user (xxx: legacy, to replace with this.userId) + */ +const prepareSubscription = (action, collection, itemId, user) => { + + // get item's collection name + const collectionName = collection._name.slice(0,1).toUpperCase() + collection._name.slice(1); + + // get item data + const item = collection.findOne(itemId); -var addSubscribedItem = function (userId, item, collectionName) { - var field = 'telescope.subscribedItems.' + collectionName; - var add = {}; - add[field] = item; - Meteor.users.update({_id: userId}, { - $addToSet: add - }); -}; - -var removeSubscribedItem = function (userId, itemId, collectionName) { - var field = 'telescope.subscribedItems.' + collectionName; - var remove = {}; - remove[field] = {itemId: itemId}; - Meteor.users.update({_id: userId}, { - $pull: remove - }); -}; - -export var subscribeItem = function (collection, itemId, user) { - - var item = collection.findOne(itemId), - collectionName = collection._name.slice(0,1).toUpperCase() + collection._name.slice(1); - - if (!user || !item || hasSubscribedItem(item, user)) + // there no user logged in or no item, abort process + if (!user || !item) { return false; + } + + // edge case: Users collection + if (collectionName === 'Users') { + // someone can't subscribe to themself, abort process + if (item._id === user._id) { + return false; + } + } else { + // the item's owner is the subscriber, abort process + if (item.userId && item.userId === user._id) { + return false; + } + } - // author can't subscribe item - if (item.userId && item.userId === user._id) - return false; + // assign the right fields depending on the collection + let fields = { + subscribers: collectionName === 'Users' ? 'telescope.subscribers' : 'subscribers', + subscriberCount: collectionName === 'Users' ? 'telescope.subscriberCount' : 'subscriberCount', + }; - // Subscribe - var result = collection.update({_id: itemId, subscribers: { $ne: user._id }}, { - $addToSet: {subscribers: user._id}, - $inc: {subscriberCount: 1} + // return true if the item has the subscriber's id in its fields + const hasSubscribedItem = !!_.deep(item, fields['subscribers']) && _.deep(item, fields['subscribers']) && _.deep(item, fields['subscribers']).indexOf(user._id) !== -1; + + // assign the right update operator and count depending on the action type + const updateQuery = action === 'subscribe' ? { + findOperator: '$ne', // where 'IT' isn't... + updateOperator: '$addToSet', // ...add 'IT' to the array... + updateCount: 1, // ...and log the addition +1 + } : { + findOperator: '$eq', // where 'IT' is... + updateOperator: '$pull', // ...remove 'IT' from the array... + updateCount: -1, // ...and log the subtraction -1 + }; + + // return the utility object to pursue + return { + collectionName, + fields, + item, + hasSubscribedItem, + ...updateQuery, + }; +} + +/** + * @summary Perform the un/subscription after verification: update the collection item & the user + * @param {String} action + * @param {Collection} collection + * @param {String} itemId + * @param {Object} user: current user (xxx: legacy, to replace with this.userId) + * @returns {Object} collectionName, fields: object, item, hasSubscribedItem: boolean + */ +const performSubscriptionAction = (action, collection, itemId, user) => { + + // subscription preparation to verify if can pursue and give shorthand variables + const subscription = prepareSubscription(action, collection, itemId, user); + + // Abort process if the situation matches one of these cases: + // - subscription preparation failed (ex: no user, no item, subscriber is author's item, ... see all cases above) + // - the action is subscribe but the user has already subscribed to this item + // - the action is unsubscribe but the user hasn't subscribed to this item + if(!subscription || (action === 'subscribe' && subscription.hasSubscribedItem) || (action === 'unsubscribe' && !subscription.hasSubscribedItem)) { + return false; // xxx: should return exploitable error + } + + // shorthand for useful variables + const { collectionName, fields, item, findOperator, updateOperator, updateCount } = subscription; + + // Perform the action, eg. operate on the item's collection + const result = collection.update({ + _id: itemId, + // if it's a subscription, find where there are not the user (ie. findOperator = $ne), else it will be $in + [fields['subscribers']]: { [findOperator]: user._id } + }, { + // if it's a subscription, add a subscriber (ie. updateOperator = $addToSet), else it will be $pull + [updateOperator]: { [fields['subscribers']]: user._id }, + // if it's a subscription, the count is incremented of 1, else decremented of 1 + $inc: { [fields['subscriberCount']]: updateCount }, }); + // log the operation on the subscriber if it has succeeded if (result > 0) { - // Add item to list of subscribed items - var obj = { + // id of the item subject of the action + let loggedItem = { itemId: item._id, - subscribedAt: new Date() }; - addSubscribedItem(user._id, obj, collectionName); + + // in case of subscription, log also the date + if (action === 'subscribe') { + loggedItem = { + ...loggedItem, + subscribedAt: new Date() + }; + } + + // update the user's list of subscribed items + Users.update({ + _id: user._id + }, { + [updateOperator]: { [`telescope.subscribedItems.${collectionName}`]: loggedItem } + }); + + return true; // action completed! ✅ + } else { + return false; // xxx: should return exploitable error } - - return true; -}; - -export var unsubscribeItem = function (collection, itemId, user) { - - var item = collection.findOne(itemId), - collectionName = collection._name.slice(0,1).toUpperCase()+collection._name.slice(1); - - if (!user || !item || !hasSubscribedItem(item, user)) - return false; - - // Unsubscribe - var result = collection.update({_id: itemId, subscribers: user._id }, { - $pull: {subscribers: user._id}, - $inc: {subscriberCount: -1} - }); - - if (result > 0) { - // Remove item from list of subscribed items - removeSubscribedItem(user._id, itemId, collectionName); - } - return true; }; Meteor.methods({ - "posts.subscribe": function(postId) { + "posts.subscribe"(postId) { check(postId, String); - return subscribeItem.call(this, Posts, postId, Meteor.user()); + return performSubscriptionAction('subscribe', Posts, postId, Meteor.user()); }, - "posts.unsubscribe": function(postId) { + "posts.unsubscribe"(postId) { check(postId, String); - return unsubscribeItem.call(this, Posts, postId, Meteor.user()); + return performSubscriptionAction('unsubscribe', Posts, postId, Meteor.user()); + }, + "users.subscribe"(userId) { + check(userId, String); + return performSubscriptionAction('subscribe', Users, userId, Meteor.user()); + }, + "users.unsubscribe"(userId) { + check(userId, String); + return performSubscriptionAction('unsubscribe', Users, userId, Meteor.user()); } }); diff --git a/packages/nova-subscribe/lib/modules.js b/packages/nova-subscribe/lib/modules.js new file mode 100644 index 000000000..a05ebbb03 --- /dev/null +++ b/packages/nova-subscribe/lib/modules.js @@ -0,0 +1,6 @@ +import './callbacks.js'; +import './custom_fields.js'; +import './intl.js'; +import './components.js'; +import './methods.js'; +import './views.js'; diff --git a/packages/nova-subscribe/lib/server.js b/packages/nova-subscribe/lib/server.js index 6f0e8238d..5e1634120 100644 --- a/packages/nova-subscribe/lib/server.js +++ b/packages/nova-subscribe/lib/server.js @@ -1,15 +1 @@ -import {subscribeItem, unsubscribeItem} from './methods.js'; -import Subscribe from './components/Subscribe.jsx'; -import SubscribedPosts from './components/SubscribedPosts.jsx'; - -import './callbacks.js'; -import './custom_fields.js'; -import './methods.js'; -import './views.js'; - -export { - subscribeItem, - unsubscribeItem, - Subscribe, - SubscribedPosts -}; \ No newline at end of file +import './modules.js'; \ No newline at end of file From 39188814557dfe18e4df5c60a0d17dc9ad250180 Mon Sep 17 00:00:00 2001 From: xavcz Date: Fri, 12 Aug 2016 09:10:05 +0200 Subject: [PATCH 39/60] check on methods, added permissions, rename components for more consistency --- packages/nova-subscribe/lib/components.js | 11 ++-- .../{Subscribe.jsx => PostsSubscribe.jsx} | 19 +++--- ...ribedPosts.jsx => PostsSubscribedList.jsx} | 4 +- .../lib/components/UsersSubscribe.jsx | 9 ++- packages/nova-subscribe/lib/methods.js | 64 +++++++++++++++---- packages/nova-subscribe/lib/modules.js | 1 + packages/nova-subscribe/lib/permissions.js | 19 ++++++ 7 files changed, 95 insertions(+), 32 deletions(-) rename packages/nova-subscribe/lib/components/{Subscribe.jsx => PostsSubscribe.jsx} (76%) rename packages/nova-subscribe/lib/components/{SubscribedPosts.jsx => PostsSubscribedList.jsx} (90%) create mode 100644 packages/nova-subscribe/lib/permissions.js diff --git a/packages/nova-subscribe/lib/components.js b/packages/nova-subscribe/lib/components.js index 280492970..14d6698dc 100644 --- a/packages/nova-subscribe/lib/components.js +++ b/packages/nova-subscribe/lib/components.js @@ -1,8 +1,9 @@ import Telescope from 'meteor/nova:lib'; -import Subscribe from './components/Subscribe.jsx'; +import PostsSubscribe from './components/PostsSubscribe.jsx'; import UsersSubscribe from './components/UsersSubscribe.jsx'; -import SubscribedPosts from './components/SubscribedPosts.jsx'; +import PostsSubscribedList from './components/PostsSubscribedList.jsx'; -Telescope.components.Subscribe = Subscribe; -Telescope.components.UsersSubscribe = UsersSubscribe; -Telescope.components.SubscribedPosts = SubscribedPosts; \ No newline at end of file +Telescope.components.PostsSubscribe = PostsSubscribe; +Telescope.components.PostsSubscribedList = PostsSubscribedList; + +Telescope.components.UsersSubscribe = UsersSubscribe; \ No newline at end of file diff --git a/packages/nova-subscribe/lib/components/Subscribe.jsx b/packages/nova-subscribe/lib/components/PostsSubscribe.jsx similarity index 76% rename from packages/nova-subscribe/lib/components/Subscribe.jsx rename to packages/nova-subscribe/lib/components/PostsSubscribe.jsx index 477c3309d..e25f90ad6 100644 --- a/packages/nova-subscribe/lib/components/Subscribe.jsx +++ b/packages/nova-subscribe/lib/components/PostsSubscribe.jsx @@ -1,7 +1,8 @@ import React, { PropTypes, Component } from 'react'; import { intlShape } from 'react-intl'; +import Telescope from 'meteor/nova:lib'; -class Subscribe extends Component { +class PostsSubscribe extends Component { constructor(props, context) { super(props, context); @@ -46,25 +47,27 @@ class Subscribe extends Component { return null; } - let btnTitle = "posts.subscribe"; + let action = "posts.subscribe"; let isSubscribed = this.isSubscribed(post, user); if( isSubscribed ) { - btnTitle = "posts.unsubscribe"; + action = "posts.unsubscribe"; } return ( - {this.context.intl.formatMessage({id: btnTitle})} + + {this.context.intl.formatMessage({id: action})} + ) } } -Subscribe.propTypes = { +PostsSubscribe.propTypes = { post: React.PropTypes.object.isRequired } -Subscribe.contextTypes = { +PostsSubscribe.contextTypes = { currentUser: React.PropTypes.object, messages: React.PropTypes.object, actions: React.PropTypes.object, @@ -72,5 +75,5 @@ Subscribe.contextTypes = { intl: intlShape }; -module.exports = Subscribe; -export default Subscribe; +module.exports = PostsSubscribe; +export default PostsSubscribe; diff --git a/packages/nova-subscribe/lib/components/SubscribedPosts.jsx b/packages/nova-subscribe/lib/components/PostsSubscribedList.jsx similarity index 90% rename from packages/nova-subscribe/lib/components/SubscribedPosts.jsx rename to packages/nova-subscribe/lib/components/PostsSubscribedList.jsx index 3bf023386..f978ae503 100644 --- a/packages/nova-subscribe/lib/components/SubscribedPosts.jsx +++ b/packages/nova-subscribe/lib/components/PostsSubscribedList.jsx @@ -3,7 +3,7 @@ import React, { PropTypes, Component } from 'react'; import { ListContainer } from "meteor/utilities:react-list-container"; import Posts from "meteor/nova:posts"; -class SubscribedPosts extends Component { +class PostsSubscribedList extends Component { render() { @@ -27,4 +27,4 @@ class SubscribedPosts extends Component { } }; -module.exports = SubscribedPosts; +module.exports = PostsSubscribedList; diff --git a/packages/nova-subscribe/lib/components/UsersSubscribe.jsx b/packages/nova-subscribe/lib/components/UsersSubscribe.jsx index 9a4b5e5d1..fd5eb7b02 100644 --- a/packages/nova-subscribe/lib/components/UsersSubscribe.jsx +++ b/packages/nova-subscribe/lib/components/UsersSubscribe.jsx @@ -1,5 +1,6 @@ import React, { PropTypes, Component } from 'react'; import { intlShape } from 'react-intl'; +import Telescope from 'meteor/nova:lib'; class UsersSubscribe extends Component { @@ -48,15 +49,17 @@ class UsersSubscribe extends Component { return null; } - let btnTitle = "users.subscribe"; + let action = "users.subscribe"; let isSubscribed = this.isSubscribed(user, currentUser); if( isSubscribed ) { - btnTitle = "users.unsubscribe"; + action = "users.unsubscribe"; } return ( - {intl.formatMessage({id: btnTitle})} + + {intl.formatMessage({id: action})} + ); } diff --git a/packages/nova-subscribe/lib/methods.js b/packages/nova-subscribe/lib/methods.js index 8c37b0a10..1d1f1605b 100644 --- a/packages/nova-subscribe/lib/methods.js +++ b/packages/nova-subscribe/lib/methods.js @@ -3,11 +3,11 @@ import Users from 'meteor/nova:users'; /** * @summary Verify that the un/subscription can be performed - * @returns {Object} collectionName, fields: object, item, hasSubscribedItem: boolean * @param {String} action * @param {Collection} collection * @param {String} itemId * @param {Object} user: current user (xxx: legacy, to replace with this.userId) + * @returns {Object} collectionName, fields: object, item, hasSubscribedItem: boolean */ const prepareSubscription = (action, collection, itemId, user) => { @@ -71,7 +71,7 @@ const prepareSubscription = (action, collection, itemId, user) => { * @param {Collection} collection * @param {String} itemId * @param {Object} user: current user (xxx: legacy, to replace with this.userId) - * @returns {Object} collectionName, fields: object, item, hasSubscribedItem: boolean + * @returns {Boolean} */ const performSubscriptionAction = (action, collection, itemId, user) => { @@ -130,20 +130,56 @@ const performSubscriptionAction = (action, collection, itemId, user) => { }; Meteor.methods({ - "posts.subscribe"(postId) { - check(postId, String); - return performSubscriptionAction('subscribe', Posts, postId, Meteor.user()); - }, - "posts.unsubscribe"(postId) { - check(postId, String); - return performSubscriptionAction('unsubscribe', Posts, postId, Meteor.user()); - }, - "users.subscribe"(userId) { + "posts.subscribe"(docId, userId = this.userId) { + check(docId, String); check(userId, String); - return performSubscriptionAction('subscribe', Users, userId, Meteor.user()); + + const currentUser = Users.findOne({_id: this.userId}); + const user = userId !== this.userId ? Users.findOne({_id: userId }) : currentUser; + + if (!Users.canDo(currentUser, "posts.subscribe") || userId !== this.userId && !Users.canDo(currentUser, "posts.subscribe.all")) { + throw new Meteor.Error(601, "You don't have the permission to do this"); + } + + return performSubscriptionAction('subscribe', Posts, docId, user); }, - "users.unsubscribe"(userId) { + "posts.unsubscribe"(docId, userId = this.userId) { + check(docId, String); check(userId, String); - return performSubscriptionAction('unsubscribe', Users, userId, Meteor.user()); + + const currentUser = Users.findOne({_id: this.userId}); + const user = userId !== this.userId ? Users.findOne({_id: userId }) : currentUser; + + if (!Users.canDo(currentUser, "posts.unsubscribe") || userId !== this.userId && !Users.canDo(currentUser, "posts.unsubscribe.all")) { + throw new Meteor.Error(601, "You don't have the permission to do this"); + } + + return performSubscriptionAction('unsubscribe', Posts, docId, Meteor.user()); + }, + "users.subscribe"(docId, userId = this.userId) { + check(docId, String); + check(userId, String); + + const currentUser = Users.findOne({_id: this.userId}); + const user = userId !== this.userId ? Users.findOne({_id: userId }) : currentUser; + + if (!Users.canDo(currentUser, "users.subscribe") || userId !== this.userId && !Users.canDo(currentUser, "users.subscribe.all")) { + throw new Meteor.Error(601, "You don't have the permission to do this"); + } + + return performSubscriptionAction('subscribe', Users, docId, Meteor.user()); + }, + "users.unsubscribe"(docId, userId = this.userId) { + check(docId, String); + check(userId, String); + + const currentUser = Users.findOne({_id: this.userId}); + const user = userId !== this.userId ? Users.findOne({_id: userId }) : currentUser; + + if (!Users.canDo(currentUser, "users.unsubscribe") || userId !== this.userId && !Users.canDo(currentUser, "users.unsubscribe.all")) { + throw new Meteor.Error(601, "You don't have the permission to do this"); + } + + return performSubscriptionAction('unsubscribe', Users, docId, Meteor.user()); } }); diff --git a/packages/nova-subscribe/lib/modules.js b/packages/nova-subscribe/lib/modules.js index a05ebbb03..d235b624f 100644 --- a/packages/nova-subscribe/lib/modules.js +++ b/packages/nova-subscribe/lib/modules.js @@ -4,3 +4,4 @@ import './intl.js'; import './components.js'; import './methods.js'; import './views.js'; +import './permissions.js'; diff --git a/packages/nova-subscribe/lib/permissions.js b/packages/nova-subscribe/lib/permissions.js new file mode 100644 index 000000000..118fd104d --- /dev/null +++ b/packages/nova-subscribe/lib/permissions.js @@ -0,0 +1,19 @@ +import Users from 'meteor/nova:users'; + +const defaultActions = [ + "posts.subscribe", + "posts.unsubscribe", + "users.subscribe", + "users.unsubscribe", +]; + +Users.groups.default.can(defaultActions); + +const adminActions = [ + "posts.subscribe.all", + "posts.unsubscribe.all", + "users.subscribe.all", + "users.unsubscribe.all", +]; + +Users.groups.admins.can(adminActions); \ No newline at end of file From 44bf243e89349729057c15cc7fa6950b012cf5c3 Mon Sep 17 00:00:00 2001 From: xavcz Date: Fri, 12 Aug 2016 11:35:58 +0200 Subject: [PATCH 40/60] subscribed user's post callback (posts.new.async), SubscribeTo generic component taking a document and a documentType --- packages/nova-subscribe/lib/callbacks.js | 34 +++++++- packages/nova-subscribe/lib/components.js | 8 +- .../lib/components/PostsSubscribe.jsx | 79 ------------------ .../lib/components/SubscribeTo.jsx | 69 ++++++++++++++++ .../lib/components/UsersSubscribe.jsx | 80 ------------------- 5 files changed, 103 insertions(+), 167 deletions(-) delete mode 100644 packages/nova-subscribe/lib/components/PostsSubscribe.jsx create mode 100644 packages/nova-subscribe/lib/components/SubscribeTo.jsx delete mode 100644 packages/nova-subscribe/lib/components/UsersSubscribe.jsx diff --git a/packages/nova-subscribe/lib/callbacks.js b/packages/nova-subscribe/lib/callbacks.js index 96e15fb18..f229c4751 100644 --- a/packages/nova-subscribe/lib/callbacks.js +++ b/packages/nova-subscribe/lib/callbacks.js @@ -3,8 +3,7 @@ import Posts from "meteor/nova:posts"; import Users from 'meteor/nova:users'; // Notify users subscribed to the thread - -function SubscribedCommentsNotifications (comment) { +const SubscribedCommentsNotifications = (comment) => { if (typeof Telescope.notifications !== "undefined") { // note: dummy content has disableNotifications set to true if(Meteor.isServer && !comment.disableNotifications){ @@ -17,7 +16,7 @@ function SubscribedCommentsNotifications (comment) { post: _.pick(post, '_id', 'userId', 'title', 'url') }; - if (!!post.subscribers) { + if (!!post.subscribers && !!post.subscribers.length) { // remove userIds of users that have already been notified // and of comment author (they could be replying in a thread they're subscribed to) let subscriberIdsToNotify = _.difference(post.subscribers, userIdsNotified, [comment.userId]); @@ -31,3 +30,32 @@ function SubscribedCommentsNotifications (comment) { } Telescope.callbacks.add("comments.new.async", SubscribedCommentsNotifications); + +/** + * @summary Add new post notification callback on post submit + */ +function SubscribedUsersNotifications (post) { + + if (typeof Telescope.notifications !== "undefined") { + if(Meteor.isServer) { + + let userIdsNotified = []; + const notificationData = { + post: _.pick(post, '_id', 'userId', 'title', 'url', 'author') + }; + + const user = Users.findOne({_id: post.userId}); + + if (!!user.telescope.subscribers && !!user.telescope.subscribers.length) { + // remove userIds of users that have already been notified and of post's author + let subscriberIdsToNotify = _.difference(user.telescope.subscribers, userIdsNotified, [user._id]); + + Telescope.notifications.create(subscriberIdsToNotify, 'newPost', notificationData); + + userIdsNotified = userIdsNotified.concat(subscriberIdsToNotify); + } + } + } +} + +Telescope.callbacks.add("posts.new.async", SubscribedUsersNotifications); diff --git a/packages/nova-subscribe/lib/components.js b/packages/nova-subscribe/lib/components.js index 14d6698dc..f7ab32633 100644 --- a/packages/nova-subscribe/lib/components.js +++ b/packages/nova-subscribe/lib/components.js @@ -1,9 +1,7 @@ import Telescope from 'meteor/nova:lib'; -import PostsSubscribe from './components/PostsSubscribe.jsx'; -import UsersSubscribe from './components/UsersSubscribe.jsx'; +import SubscribeTo from './components/SubscribeTo.jsx'; import PostsSubscribedList from './components/PostsSubscribedList.jsx'; -Telescope.components.PostsSubscribe = PostsSubscribe; -Telescope.components.PostsSubscribedList = PostsSubscribedList; +Telescope.components.SubscribeTo = SubscribeTo; -Telescope.components.UsersSubscribe = UsersSubscribe; \ No newline at end of file +Telescope.components.PostsSubscribedList = PostsSubscribedList; diff --git a/packages/nova-subscribe/lib/components/PostsSubscribe.jsx b/packages/nova-subscribe/lib/components/PostsSubscribe.jsx deleted file mode 100644 index e25f90ad6..000000000 --- a/packages/nova-subscribe/lib/components/PostsSubscribe.jsx +++ /dev/null @@ -1,79 +0,0 @@ -import React, { PropTypes, Component } from 'react'; -import { intlShape } from 'react-intl'; -import Telescope from 'meteor/nova:lib'; - -class PostsSubscribe extends Component { - - constructor(props, context) { - super(props, context); - - this.onSubscribe = this.onSubscribe.bind(this); - this.isSubscribed = this.isSubscribed.bind(this); - } - - onSubscribe(e) { - e.preventDefault(); - - const post = this.props.post; - const user = this.context.currentUser; - - let callAction = 'posts.subscribe'; - - let isSubscribed = this.isSubscribed(post, user); - if( isSubscribed ) { - callAction = "posts.unsubscribe"; - } - - this.context.actions.call(callAction, post._id, (error, result) => { - if (error) - this.context.messages.flash(error.message, "error") - if (result) - this.context.events.track(callAction, {'_id': post._id}); - }) - } - - isSubscribed(post, user) { - if (!post || !user) - return false; - return post.subscribers && post.subscribers.indexOf(user._id) != -1; - } - - render() { - const post = this.props.post; - const user = this.context.currentUser; - - // can't subscribe to own post (also validated on server side) - if(!user || user && post.author === user.username) { - return null; - } - - let action = "posts.subscribe"; - - let isSubscribed = this.isSubscribed(post, user); - if( isSubscribed ) { - action = "posts.unsubscribe"; - } - - return ( - - {this.context.intl.formatMessage({id: action})} - - ) - } - -} - -PostsSubscribe.propTypes = { - post: React.PropTypes.object.isRequired -} - -PostsSubscribe.contextTypes = { - currentUser: React.PropTypes.object, - messages: React.PropTypes.object, - actions: React.PropTypes.object, - events: React.PropTypes.object, - intl: intlShape -}; - -module.exports = PostsSubscribe; -export default PostsSubscribe; diff --git a/packages/nova-subscribe/lib/components/SubscribeTo.jsx b/packages/nova-subscribe/lib/components/SubscribeTo.jsx new file mode 100644 index 000000000..778099498 --- /dev/null +++ b/packages/nova-subscribe/lib/components/SubscribeTo.jsx @@ -0,0 +1,69 @@ +import React, { PropTypes, Component } from 'react'; +import { intlShape } from 'react-intl'; +import Telescope from 'meteor/nova:lib'; + +class SubscribeTo extends Component { + + constructor(props, context) { + super(props, context); + + this.onSubscribe = this.onSubscribe.bind(this); + this.isSubscribed = this.isSubscribed.bind(this); + } + + onSubscribe(e) { + e.preventDefault(); + + const {document, documentType} = this.props; + + const action = this.isSubscribed() ? `${this.props.documentType}.unsubscribe` : `${this.props.documentType}.subscribe`; + + this.context.actions.call(action, this.props.document._id, (error, result) => { + if (error) + this.context.messages.flash(error.message, "error") + if (result) + this.context.events.track(action, {'_id': this.props.document._id}); + }); + } + + isSubscribed() { + // if the document is a user, the subscribers object is located on `user.telescope` + const documentCheck = this.props.documentType === 'users' ? this.props.document.telescope : this.props.document; + + return documentCheck && documentCheck.subscribers && documentCheck.subscribers.indexOf(this.context.currentUser._id) !== -1; + } + + render() { + const {document, documentType} = this.props; + const {currentUser, intl} = this.context; + + // can't subscribe to yourself or to own post (also validated on server side) + if (!currentUser || !document || (documentType === 'posts' && document && document.author === currentUser.username) || (documentType === 'users' && document === currentUser)) { + return null; + } + + const action = this.isSubscribed() ? `${documentType}.unsubscribe` : `${documentType}.subscribe`; + + return ( + + {intl.formatMessage({id: action})} + + ); + } + +} + +SubscribeTo.propTypes = { + document: React.PropTypes.object.isRequired, + documentType: React.PropTypes.string.isRequired, +} + +SubscribeTo.contextTypes = { + currentUser: React.PropTypes.object, + messages: React.PropTypes.object, + actions: React.PropTypes.object, + events: React.PropTypes.object, + intl: intlShape +}; + +export default SubscribeTo; diff --git a/packages/nova-subscribe/lib/components/UsersSubscribe.jsx b/packages/nova-subscribe/lib/components/UsersSubscribe.jsx deleted file mode 100644 index fd5eb7b02..000000000 --- a/packages/nova-subscribe/lib/components/UsersSubscribe.jsx +++ /dev/null @@ -1,80 +0,0 @@ -import React, { PropTypes, Component } from 'react'; -import { intlShape } from 'react-intl'; -import Telescope from 'meteor/nova:lib'; - -class UsersSubscribe extends Component { - - constructor(props, context) { - super(props, context); - - this.onSubscribe = this.onSubscribe.bind(this); - this.isSubscribed = this.isSubscribed.bind(this); - } - - onSubscribe(e) { - e.preventDefault(); - - const user = this.props.user; - const currentUser = this.context.currentUser; - - let callAction = 'users.subscribe'; - - let isSubscribed = this.isSubscribed(user, currentUser); - if( isSubscribed ) { - callAction = "users.unsubscribe"; - } - debugger - - this.context.actions.call(callAction, user._id, (error, result) => { - if (error) - this.context.messages.flash(error.message, "error") - if (result) - this.context.events.track(callAction, {'_id': user._id}); - }); - } - - isSubscribed(user, currentUser) { - if (!user || !currentUser) - return false; - - return user.telescope && user.telescope.subscribers && user.telescope.subscribers.indexOf(currentUser._id) != -1; - } - - render() { - const {user} = this.props; - const {currentUser, intl} = this.context; - - // can't subscribe to yourself (also validated on server side) - if(!user || user === currentUser) { - return null; - } - - let action = "users.subscribe"; - - let isSubscribed = this.isSubscribed(user, currentUser); - if( isSubscribed ) { - action = "users.unsubscribe"; - } - - return ( - - {intl.formatMessage({id: action})} - - ); - } - -} - -UsersSubscribe.propTypes = { - user: React.PropTypes.object.isRequired -} - -UsersSubscribe.contextTypes = { - currentUser: React.PropTypes.object, - messages: React.PropTypes.object, - actions: React.PropTypes.object, - events: React.PropTypes.object, - intl: intlShape -}; - -export default UsersSubscribe; From 6812b54f71cae7018316ed13affbc75efaf238c5 Mon Sep 17 00:00:00 2001 From: xavcz Date: Fri, 12 Aug 2016 14:33:51 +0200 Subject: [PATCH 41/60] =?UTF-8?q?make=20Categories=20fields=20extensible?= =?UTF-8?q?=20&=20"subscribe-able"=20,=20subscribe=20methods=20generator?= =?UTF-8?q?=20=F0=9F=A4=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/nova-categories/lib/modules.js | 1 + .../nova-categories/lib/published_fields.js | 17 +++ .../lib/server/publications.js | 2 +- packages/nova-subscribe/lib/callbacks.js | 124 +++++++++++------- packages/nova-subscribe/lib/custom_fields.js | 30 +++++ packages/nova-subscribe/lib/intl.js | 4 +- packages/nova-subscribe/lib/methods.js | 104 +++++++-------- packages/nova-subscribe/lib/permissions.js | 6 +- packages/nova-subscribe/package.js | 3 +- 9 files changed, 180 insertions(+), 111 deletions(-) create mode 100644 packages/nova-categories/lib/published_fields.js diff --git a/packages/nova-categories/lib/modules.js b/packages/nova-categories/lib/modules.js index 27012def4..6e2cd4368 100644 --- a/packages/nova-categories/lib/modules.js +++ b/packages/nova-categories/lib/modules.js @@ -8,5 +8,6 @@ import './custom_fields.js'; import './subscriptions.js'; import './methods.js'; import './permissions.js'; +import './published_fields.js'; export default Categories; \ No newline at end of file diff --git a/packages/nova-categories/lib/published_fields.js b/packages/nova-categories/lib/published_fields.js new file mode 100644 index 000000000..882aa3460 --- /dev/null +++ b/packages/nova-categories/lib/published_fields.js @@ -0,0 +1,17 @@ +import Categories from './collection.js' +import PublicationsUtils from 'meteor/utilities:smart-publications'; + +Categories.publishedFields = {}; + +/** + * @summary Specify which fields should be published by the categories publication + * @array Categories.publishedFields.list + */ +Categories.publishedFields.list = PublicationsUtils.arrayToFields([ + "name", + "description", + "order", + "slug", + "image", + "parentId", +]); \ No newline at end of file diff --git a/packages/nova-categories/lib/server/publications.js b/packages/nova-categories/lib/server/publications.js index d56f6660e..d15af778a 100644 --- a/packages/nova-categories/lib/server/publications.js +++ b/packages/nova-categories/lib/server/publications.js @@ -8,7 +8,7 @@ Meteor.publish('categories', function() { if(Users.canDo(currentUser, "posts.view.approved.all")){ - var categories = Categories.find(); + var categories = Categories.find({}, {fields: Categories.publishedFields.list}); var publication = this; categories.forEach(function (category) { diff --git a/packages/nova-subscribe/lib/callbacks.js b/packages/nova-subscribe/lib/callbacks.js index f229c4751..882edde3c 100644 --- a/packages/nova-subscribe/lib/callbacks.js +++ b/packages/nova-subscribe/lib/callbacks.js @@ -1,61 +1,93 @@ import Telescope from 'meteor/nova:lib'; import Posts from "meteor/nova:posts"; import Users from 'meteor/nova:users'; +import Categories from 'meteor/nova:categories'; -// Notify users subscribed to the thread -const SubscribedCommentsNotifications = (comment) => { - if (typeof Telescope.notifications !== "undefined") { - // note: dummy content has disableNotifications set to true - if(Meteor.isServer && !comment.disableNotifications){ - - const post = Posts.findOne(comment.postId); - - let userIdsNotified = [], - notificationData = { - comment: _.pick(comment, '_id', 'userId', 'author', 'htmlBody', 'postId'), - post: _.pick(post, '_id', 'userId', 'title', 'url') - }; - - if (!!post.subscribers && !!post.subscribers.length) { - // remove userIds of users that have already been notified - // and of comment author (they could be replying in a thread they're subscribed to) - let subscriberIdsToNotify = _.difference(post.subscribers, userIdsNotified, [comment.userId]); - Telescope.notifications.create(subscriberIdsToNotify, 'newCommentSubscribed', notificationData); - - userIdsNotified = userIdsNotified.concat(subscriberIdsToNotify); - } - - } - } -} - -Telescope.callbacks.add("comments.new.async", SubscribedCommentsNotifications); +// note: even if all these callbacks are async, they are imported on the client so they pop in the cheatsheet when debug is enabled /** - * @summary Add new post notification callback on post submit + * @summary Notify users subscribed to the comment's thread */ -function SubscribedUsersNotifications (post) { +const SubscribedPostNotifications = (comment) => { + // note: dummy content has disableNotifications set to true + if (typeof Telescope.notifications !== "undefined" && Meteor.isServer && !comment.disableNotifications) { - if (typeof Telescope.notifications !== "undefined") { - if(Meteor.isServer) { + const post = Posts.findOne(comment.postId); - let userIdsNotified = []; - const notificationData = { - post: _.pick(post, '_id', 'userId', 'title', 'url', 'author') - }; + let userIdsNotified = []; + const notificationData = { + comment: _.pick(comment, '_id', 'userId', 'author', 'htmlBody', 'postId'), + post: _.pick(post, '_id', 'userId', 'title', 'url') + }; - const user = Users.findOne({_id: post.userId}); + if (!!post.subscribers && !!post.subscribers.length) { + // remove userIds of users that have already been notified + // and of comment author (they could be replying in a thread they're subscribed to) + let subscriberIdsToNotify = _.difference(post.subscribers, userIdsNotified, [comment.userId]); + Telescope.notifications.create(subscriberIdsToNotify, 'newCommentSubscribed', notificationData); - if (!!user.telescope.subscribers && !!user.telescope.subscribers.length) { - // remove userIds of users that have already been notified and of post's author - let subscriberIdsToNotify = _.difference(user.telescope.subscribers, userIdsNotified, [user._id]); - - Telescope.notifications.create(subscriberIdsToNotify, 'newPost', notificationData); - - userIdsNotified = userIdsNotified.concat(subscriberIdsToNotify); - } + userIdsNotified = userIdsNotified.concat(subscriberIdsToNotify); } } -} +}; + +Telescope.callbacks.add("comments.new.async", SubscribedPostNotifications); + +/** + * @summary Notify users subscribed to 'another user' whenever another user posts + */ +const SubscribedUsersNotifications = (post) => { + if (typeof Telescope.notifications !== "undefined" && Meteor.isServer) { + + let userIdsNotified = []; + const notificationData = { + post: _.pick(post, '_id', 'userId', 'title', 'url', 'author') + }; + + const user = Users.findOne({_id: post.userId}); + + if (!!user.telescope.subscribers && !!user.telescope.subscribers.length) { + // remove userIds of users that have already been notified and of post's author + let subscriberIdsToNotify = _.difference(user.telescope.subscribers, userIdsNotified, [user._id]); + + Telescope.notifications.create(subscriberIdsToNotify, 'newPost', notificationData); + + userIdsNotified = userIdsNotified.concat(subscriberIdsToNotify); + } + } +}; Telescope.callbacks.add("posts.new.async", SubscribedUsersNotifications); + +/** + * @summary Notify users subscribed to 'another user' whenever another user posts + */ +const SubscribedCategoriesNotifications = (post) => { + + if (typeof Telescope.notifications !== "undefined" && Meteor.isServer && !!post.categories.length) { + // get the subscribers of the different categories from the post's categories + const subscribers = post.categories + // find the category from its id + .map(categoryId => Categories.findOne({_id: categoryId})) + // clean the array if none subscribe to this category + .filter(category => typeof category.subscribers !== 'undefined' || !!category.subscribers) + // build the subscribers list interested in these categories + .reduce((subscribersList, category) => [...subscribersList, ...category.subscribers], []); + + let userIdsNotified = []; + const notificationData = { + post: _.pick(post, '_id', 'userId', 'title', 'url', 'author') + }; + + if (!!subscribers && !!subscribers.length) { + // remove userIds of users that have already been notified and of post's author + let subscriberIdsToNotify = _.difference(subscribers, userIdsNotified, [post.userId]); + + Telescope.notifications.create(subscriberIdsToNotify, 'newPost', notificationData); + + userIdsNotified = userIdsNotified.concat(subscriberIdsToNotify); + } + } +}; + +Telescope.callbacks.add("posts.new.async", SubscribedCategoriesNotifications); diff --git a/packages/nova-subscribe/lib/custom_fields.js b/packages/nova-subscribe/lib/custom_fields.js index 935907d40..52c02b340 100644 --- a/packages/nova-subscribe/lib/custom_fields.js +++ b/packages/nova-subscribe/lib/custom_fields.js @@ -1,6 +1,7 @@ import PublicationUtils from 'meteor/utilities:smart-publications'; import Posts from "meteor/nova:posts"; import Users from "meteor/nova:users"; +import Categories from "meteor/nova:categories"; Users.addField([ { @@ -69,5 +70,34 @@ Posts.addField([ } ]); +Categories.addField([ + { + fieldName: 'subscribers', + fieldSchema: { + type: [String], + optional: true, + autoform: { + omit: true + }, + publish: true, + join: { + joinAs: "subscribersArray", + collection: () => Users + } + } + }, + { + fieldName: 'subscriberCount', + fieldSchema: { + type: Number, + optional: true, + autoform: { + omit: true + } + } + } +]); + PublicationUtils.addToFields(Users.publishedFields.list, ["telescope.subscribedItems", "telescope.subscribers", "telescope.subscriberCount"]); PublicationUtils.addToFields(Posts.publishedFields.list, ["subscribers", "subscriberCount"]); +PublicationUtils.addToFields(Categories.publishedFields.list, ["subscribers", "subscriberCount"]); diff --git a/packages/nova-subscribe/lib/intl.js b/packages/nova-subscribe/lib/intl.js index a41455969..346d389ff 100644 --- a/packages/nova-subscribe/lib/intl.js +++ b/packages/nova-subscribe/lib/intl.js @@ -13,8 +13,8 @@ Meteor.startup(() => { "users.subscribed_users" : "Users subscribed to", "users.subscribers": "Subscribers", - "categories.subscribe": "Subscribe to this categorie's posts", - "categories.unsubscribe": "Unsubscribe to this categorie's posts", + "categories.subscribe": "😎", + "categories.unsubscribe": "🤓", "categories.subscribed_categories" : "Categories subscribed to", }; }); \ No newline at end of file diff --git a/packages/nova-subscribe/lib/methods.js b/packages/nova-subscribe/lib/methods.js index 1d1f1605b..d87578b8e 100644 --- a/packages/nova-subscribe/lib/methods.js +++ b/packages/nova-subscribe/lib/methods.js @@ -1,5 +1,6 @@ import Posts from "meteor/nova:posts"; import Users from 'meteor/nova:users'; +import Categories from 'meteor/nova:categories'; /** * @summary Verify that the un/subscription can be performed @@ -30,19 +31,19 @@ const prepareSubscription = (action, collection, itemId, user) => { } } else { // the item's owner is the subscriber, abort process - if (item.userId && item.userId === user._id) { + if (item.userId && item.userId === user._id) { return false; } } // assign the right fields depending on the collection - let fields = { + const fields = { subscribers: collectionName === 'Users' ? 'telescope.subscribers' : 'subscribers', subscriberCount: collectionName === 'Users' ? 'telescope.subscriberCount' : 'subscriberCount', }; // return true if the item has the subscriber's id in its fields - const hasSubscribedItem = !!_.deep(item, fields['subscribers']) && _.deep(item, fields['subscribers']) && _.deep(item, fields['subscribers']).indexOf(user._id) !== -1; + const hasSubscribedItem = !!_.deep(item, fields.subscribers) && _.deep(item, fields.subscribers) && _.deep(item, fields.subscribers).indexOf(user._id) !== -1; // assign the right update operator and count depending on the action type const updateQuery = action === 'subscribe' ? { @@ -82,7 +83,7 @@ const performSubscriptionAction = (action, collection, itemId, user) => { // - subscription preparation failed (ex: no user, no item, subscriber is author's item, ... see all cases above) // - the action is subscribe but the user has already subscribed to this item // - the action is unsubscribe but the user hasn't subscribed to this item - if(!subscription || (action === 'subscribe' && subscription.hasSubscribedItem) || (action === 'unsubscribe' && !subscription.hasSubscribedItem)) { + if (!subscription || (action === 'subscribe' && subscription.hasSubscribedItem) || (action === 'unsubscribe' && !subscription.hasSubscribedItem)) { return false; // xxx: should return exploitable error } @@ -91,14 +92,14 @@ const performSubscriptionAction = (action, collection, itemId, user) => { // Perform the action, eg. operate on the item's collection const result = collection.update({ - _id: itemId, - // if it's a subscription, find where there are not the user (ie. findOperator = $ne), else it will be $in - [fields['subscribers']]: { [findOperator]: user._id } - }, { - // if it's a subscription, add a subscriber (ie. updateOperator = $addToSet), else it will be $pull - [updateOperator]: { [fields['subscribers']]: user._id }, - // if it's a subscription, the count is incremented of 1, else decremented of 1 - $inc: { [fields['subscriberCount']]: updateCount }, + _id: itemId, + // if it's a subscription, find where there are not the user (ie. findOperator = $ne), else it will be $in + [fields.subscribers]: { [findOperator]: user._id } + }, { + // if it's a subscription, add a subscriber (ie. updateOperator = $addToSet), else it will be $pull + [updateOperator]: { [fields.subscribers]: user._id }, + // if it's a subscription, the count is incremented of 1, else decremented of 1 + $inc: { [fields.subscriberCount]: updateCount }, }); // log the operation on the subscriber if it has succeeded @@ -129,57 +130,40 @@ const performSubscriptionAction = (action, collection, itemId, user) => { } }; -Meteor.methods({ - "posts.subscribe"(docId, userId = this.userId) { - check(docId, String); - check(userId, String); - - const currentUser = Users.findOne({_id: this.userId}); - const user = userId !== this.userId ? Users.findOne({_id: userId }) : currentUser; +// collections = array of name ['posts', 'users', categories] +const subscribeMethodsGenerator = (collections) => { + + const genericMethodFunction = (collection, action) => { + // get the lower case collection name - if (!Users.canDo(currentUser, "posts.subscribe") || userId !== this.userId && !Users.canDo(currentUser, "posts.subscribe.all")) { - throw new Meteor.Error(601, "You don't have the permission to do this"); - } + return function(docId, userId) { + check(docId, String); + check(userId, Match.Maybe(String)); - return performSubscriptionAction('subscribe', Posts, docId, user); - }, - "posts.unsubscribe"(docId, userId = this.userId) { - check(docId, String); - check(userId, String); - - const currentUser = Users.findOne({_id: this.userId}); - const user = userId !== this.userId ? Users.findOne({_id: userId }) : currentUser; + const currentUser = Users.findOne({_id: this.userId}); + const user = typeof userId !== "undefined" ? Users.findOne({_id: userId }) : currentUser; - if (!Users.canDo(currentUser, "posts.unsubscribe") || userId !== this.userId && !Users.canDo(currentUser, "posts.unsubscribe.all")) { - throw new Meteor.Error(601, "You don't have the permission to do this"); - } + if (!Users.canDo(currentUser, `${collection._name}.${action}`) || typeof userId !== "undefined" && !Users.canDo(currentUser, `${collection._name}.${action}.all`)) { + throw new Meteor.Error(601, "You don't have the permission to do this"); + } - return performSubscriptionAction('unsubscribe', Posts, docId, Meteor.user()); - }, - "users.subscribe"(docId, userId = this.userId) { - check(docId, String); - check(userId, String); - - const currentUser = Users.findOne({_id: this.userId}); - const user = userId !== this.userId ? Users.findOne({_id: userId }) : currentUser; + return performSubscriptionAction(action, collection, docId, user); + }; + }; - if (!Users.canDo(currentUser, "users.subscribe") || userId !== this.userId && !Users.canDo(currentUser, "users.subscribe.all")) { - throw new Meteor.Error(601, "You don't have the permission to do this"); - } + // + return collections + .map(collection => { + const collectionName = collection._name; + return { + [`${collectionName}.subscribe`]: genericMethodFunction(collection, 'subscribe'), + [`${collectionName}.unsubscribe`]: genericMethodFunction(collection, 'unsubscribe') + }; + }) + .reduce((methods, couple) => ({ + ...methods, + ...couple, + }), {}); +}; - return performSubscriptionAction('subscribe', Users, docId, Meteor.user()); - }, - "users.unsubscribe"(docId, userId = this.userId) { - check(docId, String); - check(userId, String); - - const currentUser = Users.findOne({_id: this.userId}); - const user = userId !== this.userId ? Users.findOne({_id: userId }) : currentUser; - - if (!Users.canDo(currentUser, "users.unsubscribe") || userId !== this.userId && !Users.canDo(currentUser, "users.unsubscribe.all")) { - throw new Meteor.Error(601, "You don't have the permission to do this"); - } - - return performSubscriptionAction('unsubscribe', Users, docId, Meteor.user()); - } -}); +Meteor.methods(subscribeMethodsGenerator([Posts, Users, Categories])); diff --git a/packages/nova-subscribe/lib/permissions.js b/packages/nova-subscribe/lib/permissions.js index 118fd104d..2bcd458ba 100644 --- a/packages/nova-subscribe/lib/permissions.js +++ b/packages/nova-subscribe/lib/permissions.js @@ -5,6 +5,8 @@ const defaultActions = [ "posts.unsubscribe", "users.subscribe", "users.unsubscribe", + "categories.subscribe", + "categories.unsubscribe", ]; Users.groups.default.can(defaultActions); @@ -14,6 +16,8 @@ const adminActions = [ "posts.unsubscribe.all", "users.subscribe.all", "users.unsubscribe.all", + "categories.subscribe.all", + "categories.unsubscribe.all", ]; -Users.groups.admins.can(adminActions); \ No newline at end of file +Users.groups.admins.can(adminActions); diff --git a/packages/nova-subscribe/package.js b/packages/nova-subscribe/package.js index ed172fd25..033687b0e 100644 --- a/packages/nova-subscribe/package.js +++ b/packages/nova-subscribe/package.js @@ -13,7 +13,8 @@ Package.onUse(function (api) { api.use([ 'nova:core@0.26.5-nova', 'nova:posts@0.26.5-nova', - 'nova:users@0.26.5-nova' + 'nova:users@0.26.5-nova', + 'nova:categories@0.26.5-nova', ]); api.mainModule("lib/client.js", ["client"]); From bd49addff593d2cf7c4f6a1f129a6d51f76f7461 Mon Sep 17 00:00:00 2001 From: xavcz Date: Fri, 12 Aug 2016 15:41:19 +0200 Subject: [PATCH 42/60] intl: emoji test -> text --- packages/nova-subscribe/lib/intl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nova-subscribe/lib/intl.js b/packages/nova-subscribe/lib/intl.js index 346d389ff..703dd526e 100644 --- a/packages/nova-subscribe/lib/intl.js +++ b/packages/nova-subscribe/lib/intl.js @@ -13,8 +13,8 @@ Meteor.startup(() => { "users.subscribed_users" : "Users subscribed to", "users.subscribers": "Subscribers", - "categories.subscribe": "😎", - "categories.unsubscribe": "🤓", + "categories.subscribe": "Subscribe to this category's posts", + "categories.unsubscribe": "Unsubscribe to this category's posts", "categories.subscribed_categories" : "Categories subscribed to", }; }); \ No newline at end of file From a7d9dc9f8f8c26e1c8bec643f81b51844c578e85 Mon Sep 17 00:00:00 2001 From: xavcz Date: Fri, 12 Aug 2016 16:02:33 +0200 Subject: [PATCH 43/60] =?UTF-8?q?clarify=20some=20things=20=F0=9F=A4=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/nova-subscribe/lib/methods.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/packages/nova-subscribe/lib/methods.js b/packages/nova-subscribe/lib/methods.js index d87578b8e..9af618667 100644 --- a/packages/nova-subscribe/lib/methods.js +++ b/packages/nova-subscribe/lib/methods.js @@ -7,7 +7,7 @@ import Categories from 'meteor/nova:categories'; * @param {String} action * @param {Collection} collection * @param {String} itemId - * @param {Object} user: current user (xxx: legacy, to replace with this.userId) + * @param {Object} user * @returns {Object} collectionName, fields: object, item, hasSubscribedItem: boolean */ const prepareSubscription = (action, collection, itemId, user) => { @@ -64,7 +64,7 @@ const prepareSubscription = (action, collection, itemId, user) => { hasSubscribedItem, ...updateQuery, }; -} +}; /** * @summary Perform the un/subscription after verification: update the collection item & the user @@ -130,17 +130,20 @@ const performSubscriptionAction = (action, collection, itemId, user) => { } }; -// collections = array of name ['posts', 'users', categories] +/** + * @summary Generate methods 'collection.subscribe' & 'collection.unsubscribe' automatically + * @params {Array[Collections]} collections + */ const subscribeMethodsGenerator = (collections) => { + // generic method function calling the performSubscriptionAction const genericMethodFunction = (collection, action) => { - // get the lower case collection name - + // return the method code return function(docId, userId) { check(docId, String); check(userId, Match.Maybe(String)); - const currentUser = Users.findOne({_id: this.userId}); + const currentUser = Users.findOne({_id: this.userId}); // this refers to Meteor thanks to previous fat arrows when this function-builder is used const user = typeof userId !== "undefined" ? Users.findOne({_id: userId }) : currentUser; if (!Users.canDo(currentUser, `${collection._name}.${action}`) || typeof userId !== "undefined" && !Users.canDo(currentUser, `${collection._name}.${action}.all`)) { @@ -150,9 +153,9 @@ const subscribeMethodsGenerator = (collections) => { return performSubscriptionAction(action, collection, docId, user); }; }; - - // + // return an object of the shape expected by Meteor.methods return collections + // map over the collection and create the methods associated .map(collection => { const collectionName = collection._name; return { @@ -160,10 +163,12 @@ const subscribeMethodsGenerator = (collections) => { [`${collectionName}.unsubscribe`]: genericMethodFunction(collection, 'unsubscribe') }; }) + // reduce this array in an object of methods .reduce((methods, couple) => ({ ...methods, ...couple, }), {}); }; +// Finally. Add the methods to the Meteor namespace 🖖 Meteor.methods(subscribeMethodsGenerator([Posts, Users, Categories])); From c6381ee383a9ea058060f4094e69fda65cfe3575 Mon Sep 17 00:00:00 2001 From: xavcz Date: Sun, 14 Aug 2016 17:59:20 +0200 Subject: [PATCH 44/60] use reify nested imports to avoid dependencies on nova:posts & nova:categories, export default subscribeMethodsGenerator --- packages/nova-i18n-en-us/lib/en_US.js | 12 +- packages/nova-subscribe/i18n/ar.i18n.json | 2 - packages/nova-subscribe/i18n/bg.i18n.json | 2 - packages/nova-subscribe/i18n/cs.i18n.json | 5 - packages/nova-subscribe/i18n/da.i18n.json | 2 - packages/nova-subscribe/i18n/de.i18n.json | 2 - packages/nova-subscribe/i18n/el.i18n.json | 2 - packages/nova-subscribe/i18n/en.i18n.json | 5 - packages/nova-subscribe/i18n/es.i18n.json | 5 - packages/nova-subscribe/i18n/et.i18n.json | 5 - packages/nova-subscribe/i18n/fa.i18n.json | 5 - packages/nova-subscribe/i18n/fr.i18n.json | 5 - packages/nova-subscribe/i18n/hu.i18n.json | 2 - packages/nova-subscribe/i18n/id.i18n.json | 5 - packages/nova-subscribe/i18n/it.i18n.json | 2 - packages/nova-subscribe/i18n/ja.i18n.json | 2 - packages/nova-subscribe/i18n/kk.i18n.json | 2 - packages/nova-subscribe/i18n/ko.i18n.json | 5 - packages/nova-subscribe/i18n/lv-LV.i18n.json | 2 - packages/nova-subscribe/i18n/lv.i18n.json | 2 - packages/nova-subscribe/i18n/nl.i18n.json | 2 - packages/nova-subscribe/i18n/pl.i18n.json | 5 - packages/nova-subscribe/i18n/pt-BR.i18n.json | 5 - packages/nova-subscribe/i18n/ro.i18n.json | 2 - packages/nova-subscribe/i18n/ru.i18n.json | 2 - packages/nova-subscribe/i18n/se.i18n.json | 2 - packages/nova-subscribe/i18n/sl.i18n.json | 5 - packages/nova-subscribe/i18n/sv.i18n.json | 5 - packages/nova-subscribe/i18n/th.i18n.json | 2 - packages/nova-subscribe/i18n/tr-TR.i18n.json | 2 - packages/nova-subscribe/i18n/tr.i18n.json | 5 - packages/nova-subscribe/i18n/vi.i18n.json | 2 - packages/nova-subscribe/i18n/zh-CN.i18n.json | 2 - packages/nova-subscribe/lib/callbacks.js | 128 +++++++++-------- packages/nova-subscribe/lib/client.js | 1 - packages/nova-subscribe/lib/components.js | 4 +- .../lib/components/PostsSubscribedList.jsx | 50 +++---- packages/nova-subscribe/lib/custom_fields.js | 129 +++++++++--------- packages/nova-subscribe/lib/intl.js | 20 --- packages/nova-subscribe/lib/methods.js | 74 +++++----- packages/nova-subscribe/lib/modules.js | 5 +- packages/nova-subscribe/lib/server.js | 1 - packages/nova-subscribe/lib/views.js | 26 ++-- packages/nova-subscribe/package.js | 9 +- 44 files changed, 235 insertions(+), 327 deletions(-) delete mode 100644 packages/nova-subscribe/i18n/ar.i18n.json delete mode 100644 packages/nova-subscribe/i18n/bg.i18n.json delete mode 100644 packages/nova-subscribe/i18n/cs.i18n.json delete mode 100644 packages/nova-subscribe/i18n/da.i18n.json delete mode 100644 packages/nova-subscribe/i18n/de.i18n.json delete mode 100644 packages/nova-subscribe/i18n/el.i18n.json delete mode 100644 packages/nova-subscribe/i18n/en.i18n.json delete mode 100644 packages/nova-subscribe/i18n/es.i18n.json delete mode 100644 packages/nova-subscribe/i18n/et.i18n.json delete mode 100644 packages/nova-subscribe/i18n/fa.i18n.json delete mode 100644 packages/nova-subscribe/i18n/fr.i18n.json delete mode 100644 packages/nova-subscribe/i18n/hu.i18n.json delete mode 100644 packages/nova-subscribe/i18n/id.i18n.json delete mode 100644 packages/nova-subscribe/i18n/it.i18n.json delete mode 100644 packages/nova-subscribe/i18n/ja.i18n.json delete mode 100644 packages/nova-subscribe/i18n/kk.i18n.json delete mode 100644 packages/nova-subscribe/i18n/ko.i18n.json delete mode 100644 packages/nova-subscribe/i18n/lv-LV.i18n.json delete mode 100644 packages/nova-subscribe/i18n/lv.i18n.json delete mode 100644 packages/nova-subscribe/i18n/nl.i18n.json delete mode 100644 packages/nova-subscribe/i18n/pl.i18n.json delete mode 100644 packages/nova-subscribe/i18n/pt-BR.i18n.json delete mode 100644 packages/nova-subscribe/i18n/ro.i18n.json delete mode 100644 packages/nova-subscribe/i18n/ru.i18n.json delete mode 100644 packages/nova-subscribe/i18n/se.i18n.json delete mode 100644 packages/nova-subscribe/i18n/sl.i18n.json delete mode 100644 packages/nova-subscribe/i18n/sv.i18n.json delete mode 100644 packages/nova-subscribe/i18n/th.i18n.json delete mode 100644 packages/nova-subscribe/i18n/tr-TR.i18n.json delete mode 100644 packages/nova-subscribe/i18n/tr.i18n.json delete mode 100644 packages/nova-subscribe/i18n/vi.i18n.json delete mode 100644 packages/nova-subscribe/i18n/zh-CN.i18n.json delete mode 100644 packages/nova-subscribe/lib/client.js delete mode 100644 packages/nova-subscribe/lib/intl.js delete mode 100644 packages/nova-subscribe/lib/server.js diff --git a/packages/nova-i18n-en-us/lib/en_US.js b/packages/nova-i18n-en-us/lib/en_US.js index 6bca1dcc1..c4bc64ae2 100644 --- a/packages/nova-i18n-en-us/lib/en_US.js +++ b/packages/nova-i18n-en-us/lib/en_US.js @@ -33,6 +33,9 @@ Telescope.strings.en = { "posts.rate_limit_error": "Please wait {details} seconds before posting again.", "posts.postedAt": "Posted at", "posts.dateNotDefined": "Date not defined", + "posts.subscribe": "Subscribe", + "posts.unsubscribe": "Unsubscribe", + "posts.subscribed_posts" : "Posts subscribed to", "comments.comments": "Comments", "comments.count": "{count, plural, =0 {No comments} one {# comment} other {# comments}}", @@ -70,6 +73,10 @@ Telescope.strings.en = { "users.posts": "Posts", "users.please_log_in": "Please log in", "users.cannot_post": "Sorry, you do not have permissions to post at this time", + "users.subscribe": "Subscribe to this user's posts", + "users.unsubscribe": "Unsubscribe to this user's posts", + "users.subscribed_users" : "Users subscribed to", + "users.subscribers": "Subscribers", "categories": "Categories", "categories.all": "All Categories", @@ -82,6 +89,9 @@ Telescope.strings.en = { "categories.slug": "Slug", "categories.image": "Image", "categories.parentId": "Parent ID", + "categories.subscribe": "Subscribe to this category's posts", + "categories.unsubscribe": "Unsubscribe to this category's posts", + "categories.subscribed_categories" : "Categories subscribed to", "settings": "Settings", "settings.json_message": "Note: settings already provided in your settings.json file will be disabled.", @@ -129,4 +139,4 @@ Telescope.strings.en = { "admin": "Admin", "notifications": "Notifications", -} +}; diff --git a/packages/nova-subscribe/i18n/ar.i18n.json b/packages/nova-subscribe/i18n/ar.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-subscribe/i18n/ar.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/bg.i18n.json b/packages/nova-subscribe/i18n/bg.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-subscribe/i18n/bg.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/cs.i18n.json b/packages/nova-subscribe/i18n/cs.i18n.json deleted file mode 100644 index 1d21241d8..000000000 --- a/packages/nova-subscribe/i18n/cs.i18n.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "subscribed_posts" : "Odebírané příspěvky", - "subscribe_to_thread" : "Odebírat komentáře", - "unsubscribe_from_thread" : "Odhlásit se z odběru komentářů" -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/da.i18n.json b/packages/nova-subscribe/i18n/da.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-subscribe/i18n/da.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/de.i18n.json b/packages/nova-subscribe/i18n/de.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-subscribe/i18n/de.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/el.i18n.json b/packages/nova-subscribe/i18n/el.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-subscribe/i18n/el.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/en.i18n.json b/packages/nova-subscribe/i18n/en.i18n.json deleted file mode 100644 index 5798f8c09..000000000 --- a/packages/nova-subscribe/i18n/en.i18n.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "subscribed_posts" : "Subscribed Posts", - "subscribe_to_thread" : "Subscribe to comment thread", - "unsubscribe_from_thread" : "Unsubscribe from comment thread" -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/es.i18n.json b/packages/nova-subscribe/i18n/es.i18n.json deleted file mode 100644 index 65753e10f..000000000 --- a/packages/nova-subscribe/i18n/es.i18n.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "subscribed_posts" : "Posts suscritos", - "subscribe_to_thread" : "Suscribirse a esta conversación", - "unsubscribe_from_thread" : "Cancelar la suscripción a esta conversación" -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/et.i18n.json b/packages/nova-subscribe/i18n/et.i18n.json deleted file mode 100644 index 07509d5a2..000000000 --- a/packages/nova-subscribe/i18n/et.i18n.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "subscribed_posts" : "Tellitud postitused", - "subscribe_to_thread" : "Liitu, et teemat kommenteerida", - "unsubscribe_from_thread" : "Loobu teema kommenteerimisest" -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/fa.i18n.json b/packages/nova-subscribe/i18n/fa.i18n.json deleted file mode 100644 index 67d1dc0c4..000000000 --- a/packages/nova-subscribe/i18n/fa.i18n.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "subscribed_posts" : "مشترک پست ها", - "subscribe_to_thread" : "مشترک شدن به رشته نظرات", - "unsubscribe_from_thread" : "لغو اشتراک از رشته نظرات" -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/fr.i18n.json b/packages/nova-subscribe/i18n/fr.i18n.json deleted file mode 100644 index 90d203095..000000000 --- a/packages/nova-subscribe/i18n/fr.i18n.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "subscribed_posts" : "Posts auxquels vous êtes abonnés", - "subscribe_to_thread" : "S'abonner au fil de commentaires", - "unsubscribe_from_thread" : "Se désabonner du fil de commentaires" -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/hu.i18n.json b/packages/nova-subscribe/i18n/hu.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-subscribe/i18n/hu.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/id.i18n.json b/packages/nova-subscribe/i18n/id.i18n.json deleted file mode 100644 index 4c64ca054..000000000 --- a/packages/nova-subscribe/i18n/id.i18n.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "subscribed_posts" : "Postingan yang Terlanggan", - "subscribe_to_thread" : "Berlangganan komentar thread ini", - "unsubscribe_from_thread" : "Berhenti berlangganan dari komentar thread ini" -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/it.i18n.json b/packages/nova-subscribe/i18n/it.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-subscribe/i18n/it.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/ja.i18n.json b/packages/nova-subscribe/i18n/ja.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-subscribe/i18n/ja.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/kk.i18n.json b/packages/nova-subscribe/i18n/kk.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-subscribe/i18n/kk.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/ko.i18n.json b/packages/nova-subscribe/i18n/ko.i18n.json deleted file mode 100644 index da64df5a5..000000000 --- a/packages/nova-subscribe/i18n/ko.i18n.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "subscribed_posts" : "구독 게시물", - "subscribe_to_thread" : "댓글 구독하기", - "unsubscribe_from_thread" : "댓글 구독취소" -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/lv-LV.i18n.json b/packages/nova-subscribe/i18n/lv-LV.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-subscribe/i18n/lv-LV.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/lv.i18n.json b/packages/nova-subscribe/i18n/lv.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-subscribe/i18n/lv.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/nl.i18n.json b/packages/nova-subscribe/i18n/nl.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-subscribe/i18n/nl.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/pl.i18n.json b/packages/nova-subscribe/i18n/pl.i18n.json deleted file mode 100644 index 1e8d08f82..000000000 --- a/packages/nova-subscribe/i18n/pl.i18n.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "subscribed_posts" : "Posty które subskrybujesz", - "subscribe_to_thread" : "Subskrybuj", - "unsubscribe_from_thread" : "Nie subskrybuj" -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/pt-BR.i18n.json b/packages/nova-subscribe/i18n/pt-BR.i18n.json deleted file mode 100644 index cda40707f..000000000 --- a/packages/nova-subscribe/i18n/pt-BR.i18n.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "subscribed_posts" : "Postagens inscritas", - "subscribe_to_thread" : "Inscreva-se aos comentários", - "unsubscribe_from_thread" : "Desinscreva-se dos comentários" -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/ro.i18n.json b/packages/nova-subscribe/i18n/ro.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-subscribe/i18n/ro.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/ru.i18n.json b/packages/nova-subscribe/i18n/ru.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-subscribe/i18n/ru.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/se.i18n.json b/packages/nova-subscribe/i18n/se.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-subscribe/i18n/se.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/sl.i18n.json b/packages/nova-subscribe/i18n/sl.i18n.json deleted file mode 100644 index e7bcf6f66..000000000 --- a/packages/nova-subscribe/i18n/sl.i18n.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "subscribed_posts" : "Naročnine na Objave", - "subscribe_to_thread" : "Naročite se na komentarje", - "unsubscribe_from_thread" : "Odjavite se od komentarjev" -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/sv.i18n.json b/packages/nova-subscribe/i18n/sv.i18n.json deleted file mode 100644 index 31e1b3a64..000000000 --- a/packages/nova-subscribe/i18n/sv.i18n.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "subscribed_posts" : "Bevakade inlägg", - "subscribe_to_thread" : "Prenumerera på kommentarstråd", - "unsubscribe_from_thread" : "Avprenumerera på kommentarstråd" -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/th.i18n.json b/packages/nova-subscribe/i18n/th.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-subscribe/i18n/th.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/tr-TR.i18n.json b/packages/nova-subscribe/i18n/tr-TR.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-subscribe/i18n/tr-TR.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/tr.i18n.json b/packages/nova-subscribe/i18n/tr.i18n.json deleted file mode 100644 index feb6f4669..000000000 --- a/packages/nova-subscribe/i18n/tr.i18n.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "subscribed_posts" : "İzlenen Gönderiler", - "subscribe_to_thread" : "Yorum dizisini izle", - "unsubscribe_from_thread" : "Yorum dizisini izlemeyi bırak" -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/vi.i18n.json b/packages/nova-subscribe/i18n/vi.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-subscribe/i18n/vi.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-subscribe/i18n/zh-CN.i18n.json b/packages/nova-subscribe/i18n/zh-CN.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-subscribe/i18n/zh-CN.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-subscribe/lib/callbacks.js b/packages/nova-subscribe/lib/callbacks.js index 882edde3c..637e44070 100644 --- a/packages/nova-subscribe/lib/callbacks.js +++ b/packages/nova-subscribe/lib/callbacks.js @@ -1,93 +1,103 @@ import Telescope from 'meteor/nova:lib'; -import Posts from "meteor/nova:posts"; import Users from 'meteor/nova:users'; -import Categories from 'meteor/nova:categories'; // note: even if all these callbacks are async, they are imported on the client so they pop in the cheatsheet when debug is enabled /** * @summary Notify users subscribed to the comment's thread */ -const SubscribedPostNotifications = (comment) => { - // note: dummy content has disableNotifications set to true - if (typeof Telescope.notifications !== "undefined" && Meteor.isServer && !comment.disableNotifications) { + +if (typeof Package['nova:posts'] !== "undefined" && typeof Package['nova:comments'] !== "undefined") { + import Posts from 'meteor/nova:posts'; + + const SubscribedPostNotifications = (comment) => { + // note: dummy content has disableNotifications set to true + if (typeof Telescope.notifications !== "undefined" && Meteor.isServer && !comment.disableNotifications) { - const post = Posts.findOne(comment.postId); + const post = Posts.findOne(comment.postId); - let userIdsNotified = []; - const notificationData = { - comment: _.pick(comment, '_id', 'userId', 'author', 'htmlBody', 'postId'), - post: _.pick(post, '_id', 'userId', 'title', 'url') - }; + let userIdsNotified = []; + const notificationData = { + comment: _.pick(comment, '_id', 'userId', 'author', 'htmlBody', 'postId'), + post: _.pick(post, '_id', 'userId', 'title', 'url') + }; - if (!!post.subscribers && !!post.subscribers.length) { - // remove userIds of users that have already been notified - // and of comment author (they could be replying in a thread they're subscribed to) - let subscriberIdsToNotify = _.difference(post.subscribers, userIdsNotified, [comment.userId]); - Telescope.notifications.create(subscriberIdsToNotify, 'newCommentSubscribed', notificationData); + if (!!post.subscribers && !!post.subscribers.length) { + // remove userIds of users that have already been notified + // and of comment author (they could be replying in a thread they're subscribed to) + let subscriberIdsToNotify = _.difference(post.subscribers, userIdsNotified, [comment.userId]); + Telescope.notifications.create(subscriberIdsToNotify, 'newCommentSubscribed', notificationData); - userIdsNotified = userIdsNotified.concat(subscriberIdsToNotify); + userIdsNotified = userIdsNotified.concat(subscriberIdsToNotify); + } } - } -}; + }; -Telescope.callbacks.add("comments.new.async", SubscribedPostNotifications); + Telescope.callbacks.add("comments.new.async", SubscribedPostNotifications); +} /** * @summary Notify users subscribed to 'another user' whenever another user posts */ -const SubscribedUsersNotifications = (post) => { - if (typeof Telescope.notifications !== "undefined" && Meteor.isServer) { +if (typeof Package['nova:posts'] !== "undefined") { + const SubscribedUsersNotifications = (post) => { + if (typeof Telescope.notifications !== "undefined" && Meteor.isServer) { - let userIdsNotified = []; - const notificationData = { - post: _.pick(post, '_id', 'userId', 'title', 'url', 'author') - }; + let userIdsNotified = []; + const notificationData = { + post: _.pick(post, '_id', 'userId', 'title', 'url', 'author') + }; - const user = Users.findOne({_id: post.userId}); + const user = Users.findOne({_id: post.userId}); - if (!!user.telescope.subscribers && !!user.telescope.subscribers.length) { - // remove userIds of users that have already been notified and of post's author - let subscriberIdsToNotify = _.difference(user.telescope.subscribers, userIdsNotified, [user._id]); - - Telescope.notifications.create(subscriberIdsToNotify, 'newPost', notificationData); + if (!!user.telescope.subscribers && !!user.telescope.subscribers.length) { + // remove userIds of users that have already been notified and of post's author + let subscriberIdsToNotify = _.difference(user.telescope.subscribers, userIdsNotified, [user._id]); + + Telescope.notifications.create(subscriberIdsToNotify, 'newPost', notificationData); - userIdsNotified = userIdsNotified.concat(subscriberIdsToNotify); + userIdsNotified = userIdsNotified.concat(subscriberIdsToNotify); + } } - } -}; + }; -Telescope.callbacks.add("posts.new.async", SubscribedUsersNotifications); + Telescope.callbacks.add("posts.new.async", SubscribedUsersNotifications); +} /** * @summary Notify users subscribed to 'another user' whenever another user posts */ -const SubscribedCategoriesNotifications = (post) => { - if (typeof Telescope.notifications !== "undefined" && Meteor.isServer && !!post.categories.length) { - // get the subscribers of the different categories from the post's categories - const subscribers = post.categories - // find the category from its id - .map(categoryId => Categories.findOne({_id: categoryId})) - // clean the array if none subscribe to this category - .filter(category => typeof category.subscribers !== 'undefined' || !!category.subscribers) - // build the subscribers list interested in these categories - .reduce((subscribersList, category) => [...subscribersList, ...category.subscribers], []); + if (typeof Package['nova:posts'] !== "undefined" && typeof Package['nova:categories'] !== "undefined") { + import Categories from 'meteor/nova:categories'; - let userIdsNotified = []; - const notificationData = { - post: _.pick(post, '_id', 'userId', 'title', 'url', 'author') - }; + const SubscribedCategoriesNotifications = (post) => { - if (!!subscribers && !!subscribers.length) { - // remove userIds of users that have already been notified and of post's author - let subscriberIdsToNotify = _.difference(subscribers, userIdsNotified, [post.userId]); - - Telescope.notifications.create(subscriberIdsToNotify, 'newPost', notificationData); + if (typeof Telescope.notifications !== "undefined" && Meteor.isServer && !!post.categories.length) { + // get the subscribers of the different categories from the post's categories + const subscribers = post.categories + // find the category from its id + .map(categoryId => Categories.findOne({_id: categoryId})) + // clean the array if none subscribe to this category + .filter(category => typeof category.subscribers !== 'undefined' || !!category.subscribers) + // build the subscribers list interested in these categories + .reduce((subscribersList, category) => [...subscribersList, ...category.subscribers], []); - userIdsNotified = userIdsNotified.concat(subscriberIdsToNotify); + let userIdsNotified = []; + const notificationData = { + post: _.pick(post, '_id', 'userId', 'title', 'url', 'author') + }; + + if (!!subscribers && !!subscribers.length) { + // remove userIds of users that have already been notified and of post's author + let subscriberIdsToNotify = _.difference(subscribers, userIdsNotified, [post.userId]); + + Telescope.notifications.create(subscriberIdsToNotify, 'newPost', notificationData); + + userIdsNotified = userIdsNotified.concat(subscriberIdsToNotify); + } } - } -}; + }; -Telescope.callbacks.add("posts.new.async", SubscribedCategoriesNotifications); + Telescope.callbacks.add("posts.new.async", SubscribedCategoriesNotifications); +} diff --git a/packages/nova-subscribe/lib/client.js b/packages/nova-subscribe/lib/client.js deleted file mode 100644 index 5e1634120..000000000 --- a/packages/nova-subscribe/lib/client.js +++ /dev/null @@ -1 +0,0 @@ -import './modules.js'; \ No newline at end of file diff --git a/packages/nova-subscribe/lib/components.js b/packages/nova-subscribe/lib/components.js index f7ab32633..f2d8a17a0 100644 --- a/packages/nova-subscribe/lib/components.js +++ b/packages/nova-subscribe/lib/components.js @@ -1,7 +1,7 @@ import Telescope from 'meteor/nova:lib'; import SubscribeTo from './components/SubscribeTo.jsx'; -import PostsSubscribedList from './components/PostsSubscribedList.jsx'; +//import PostsSubscribedList from './components/PostsSubscribedList.jsx'; Telescope.components.SubscribeTo = SubscribeTo; -Telescope.components.PostsSubscribedList = PostsSubscribedList; +// Telescope.components.PostsSubscribedList = PostsSubscribedList; diff --git a/packages/nova-subscribe/lib/components/PostsSubscribedList.jsx b/packages/nova-subscribe/lib/components/PostsSubscribedList.jsx index f978ae503..696d4ce21 100644 --- a/packages/nova-subscribe/lib/components/PostsSubscribedList.jsx +++ b/packages/nova-subscribe/lib/components/PostsSubscribedList.jsx @@ -1,30 +1,30 @@ -import Telescope from 'meteor/nova:lib'; -import React, { PropTypes, Component } from 'react'; -import { ListContainer } from "meteor/utilities:react-list-container"; -import Posts from "meteor/nova:posts"; +// import Telescope from 'meteor/nova:lib'; +// import React, { PropTypes, Component } from 'react'; +// import { ListContainer } from "meteor/utilities:react-list-container"; +// import Posts from "meteor/nova:posts"; -class PostsSubscribedList extends Component { +// class PostsSubscribedList extends Component { - render() { +// render() { - const params = {view: 'userSubscribedPosts', userId: Meteor.userId(), listId: "posts.list.subscribed"}; - const {selector, options} = Posts.parameters.get(params); +// const params = {view: 'userSubscribedPosts', userId: Meteor.userId(), listId: "posts.list.subscribed"}; +// const {selector, options} = Posts.parameters.get(params); - return ( - - ) - } -}; +// return ( +// +// ) +// } +// }; -module.exports = PostsSubscribedList; +// module.exports = PostsSubscribedList; diff --git a/packages/nova-subscribe/lib/custom_fields.js b/packages/nova-subscribe/lib/custom_fields.js index 52c02b340..6f87c9689 100644 --- a/packages/nova-subscribe/lib/custom_fields.js +++ b/packages/nova-subscribe/lib/custom_fields.js @@ -1,7 +1,5 @@ import PublicationUtils from 'meteor/utilities:smart-publications'; -import Posts from "meteor/nova:posts"; import Users from "meteor/nova:users"; -import Categories from "meteor/nova:categories"; Users.addField([ { @@ -41,63 +39,72 @@ Users.addField([ } } ]); - -Posts.addField([ - { - fieldName: 'subscribers', - fieldSchema: { - type: [String], - optional: true, - autoform: { - omit: true - }, - publish: true, - join: { - joinAs: "subscribersArray", - collection: () => Users - } - } - }, - { - fieldName: 'subscriberCount', - fieldSchema: { - type: Number, - optional: true, - autoform: { - omit: true - } - } - } -]); - -Categories.addField([ - { - fieldName: 'subscribers', - fieldSchema: { - type: [String], - optional: true, - autoform: { - omit: true - }, - publish: true, - join: { - joinAs: "subscribersArray", - collection: () => Users - } - } - }, - { - fieldName: 'subscriberCount', - fieldSchema: { - type: Number, - optional: true, - autoform: { - omit: true - } - } - } -]); - PublicationUtils.addToFields(Users.publishedFields.list, ["telescope.subscribedItems", "telescope.subscribers", "telescope.subscriberCount"]); -PublicationUtils.addToFields(Posts.publishedFields.list, ["subscribers", "subscriberCount"]); -PublicationUtils.addToFields(Categories.publishedFields.list, ["subscribers", "subscriberCount"]); + +// check if nova:posts exists, if yes, add the custom fields to Posts +if (typeof Package['nova:posts'] !== "undefined") { + import Posts from 'meteor/nova:posts'; + Posts.addField([ + { + fieldName: 'subscribers', + fieldSchema: { + type: [String], + optional: true, + autoform: { + omit: true + }, + publish: true, + join: { + joinAs: "subscribersArray", + collection: () => Users + } + } + }, + { + fieldName: 'subscriberCount', + fieldSchema: { + type: Number, + optional: true, + autoform: { + omit: true + } + } + } + ]); + + PublicationUtils.addToFields(Posts.publishedFields.list, ["subscribers", "subscriberCount"]); +} + +// check if nova:categories exists, if yes, add the custom fields to Categories +if (typeof Package['nova:categories'] !== "undefined") { + import Categories from 'meteor/nova:categories'; + Categories.addField([ + { + fieldName: 'subscribers', + fieldSchema: { + type: [String], + optional: true, + autoform: { + omit: true + }, + publish: true, + join: { + joinAs: "subscribersArray", + collection: () => Users + } + } + }, + { + fieldName: 'subscriberCount', + fieldSchema: { + type: Number, + optional: true, + autoform: { + omit: true + } + } + } + ]); + + PublicationUtils.addToFields(Categories.publishedFields.list, ["subscribers", "subscriberCount"]); +} diff --git a/packages/nova-subscribe/lib/intl.js b/packages/nova-subscribe/lib/intl.js deleted file mode 100644 index 703dd526e..000000000 --- a/packages/nova-subscribe/lib/intl.js +++ /dev/null @@ -1,20 +0,0 @@ -import Telescope from 'meteor/nova:lib'; - -Meteor.startup(() => { - // note: add the keys *after* nova:i18n-en-us has been loaded! - Telescope.strings.en = { - ...Telescope.strings.en, - "posts.subscribe": "Subscribe", - "posts.unsubscribe": "Unsubscribe", - "posts.subscribed_posts" : "Posts subscribed to", - - "users.subscribe": "Subscribe to this user's posts", - "users.unsubscribe": "Unsubscribe to this user's posts", - "users.subscribed_users" : "Users subscribed to", - "users.subscribers": "Subscribers", - - "categories.subscribe": "Subscribe to this category's posts", - "categories.unsubscribe": "Unsubscribe to this category's posts", - "categories.subscribed_categories" : "Categories subscribed to", - }; -}); \ No newline at end of file diff --git a/packages/nova-subscribe/lib/methods.js b/packages/nova-subscribe/lib/methods.js index 9af618667..a77fe8f0e 100644 --- a/packages/nova-subscribe/lib/methods.js +++ b/packages/nova-subscribe/lib/methods.js @@ -1,6 +1,4 @@ -import Posts from "meteor/nova:posts"; import Users from 'meteor/nova:users'; -import Categories from 'meteor/nova:categories'; /** * @summary Verify that the un/subscription can be performed @@ -134,41 +132,47 @@ const performSubscriptionAction = (action, collection, itemId, user) => { * @summary Generate methods 'collection.subscribe' & 'collection.unsubscribe' automatically * @params {Array[Collections]} collections */ -const subscribeMethodsGenerator = (collections) => { - - // generic method function calling the performSubscriptionAction - const genericMethodFunction = (collection, action) => { - // return the method code - return function(docId, userId) { - check(docId, String); - check(userId, Match.Maybe(String)); + export default subscribeMethodsGenerator = (collection) => { + + // generic method function calling the performSubscriptionAction + const genericMethodFunction = (col, action) => { + // return the method code + return function(docId, userId) { + check(docId, String); + check(userId, Match.Maybe(String)); - const currentUser = Users.findOne({_id: this.userId}); // this refers to Meteor thanks to previous fat arrows when this function-builder is used - const user = typeof userId !== "undefined" ? Users.findOne({_id: userId }) : currentUser; + const currentUser = Users.findOne({_id: this.userId}); // this refers to Meteor thanks to previous fat arrows when this function-builder is used + const user = typeof userId !== "undefined" ? Users.findOne({_id: userId }) : currentUser; - if (!Users.canDo(currentUser, `${collection._name}.${action}`) || typeof userId !== "undefined" && !Users.canDo(currentUser, `${collection._name}.${action}.all`)) { - throw new Meteor.Error(601, "You don't have the permission to do this"); - } + if (!Users.canDo(currentUser, `${col._name}.${action}`) || typeof userId !== "undefined" && !Users.canDo(currentUser, `${col._name}.${action}.all`)) { + throw new Meteor.Error(601, "You don't have the permission to do this"); + } - return performSubscriptionAction(action, collection, docId, user); - }; - }; - // return an object of the shape expected by Meteor.methods - return collections - // map over the collection and create the methods associated - .map(collection => { - const collectionName = collection._name; - return { - [`${collectionName}.subscribe`]: genericMethodFunction(collection, 'subscribe'), - [`${collectionName}.unsubscribe`]: genericMethodFunction(collection, 'unsubscribe') - }; - }) - // reduce this array in an object of methods - .reduce((methods, couple) => ({ - ...methods, - ...couple, - }), {}); -}; + return performSubscriptionAction(action, col, docId, user); + }; + }; + + const collectionName = collection._name; + // return an object of the shape expected by Meteor.methods + return { + [`${collectionName}.subscribe`]: genericMethodFunction(collection, 'subscribe'), + [`${collectionName}.unsubscribe`]: genericMethodFunction(collection, 'unsubscribe') + }; + }; // Finally. Add the methods to the Meteor namespace 🖖 -Meteor.methods(subscribeMethodsGenerator([Posts, Users, Categories])); + +// nova:users is a dependency of this package, it is alreay imported +Meteor.methods(subscribeMethodsGenerator(Users)); + +// check if nova:posts exists, if yes, add the methods to Posts +if (typeof Package['nova:posts'] !== 'undefined') { + import Posts from 'meteor/nova:posts'; + Meteor.methods(subscribeMethodsGenerator(Posts)); +} + +// check if nova:categories exists, if yes, add the methods to Categories +if (typeof Package['nova:categories'] !== "undefined") { + import Categories from 'meteor/nova:categories'; + Meteor.methods(subscribeMethodsGenerator(Categories)); +} diff --git a/packages/nova-subscribe/lib/modules.js b/packages/nova-subscribe/lib/modules.js index d235b624f..c8d9b9243 100644 --- a/packages/nova-subscribe/lib/modules.js +++ b/packages/nova-subscribe/lib/modules.js @@ -1,7 +1,8 @@ import './callbacks.js'; import './custom_fields.js'; -import './intl.js'; import './components.js'; -import './methods.js'; +import subscribeMethodsGenerator from './methods.js'; import './views.js'; import './permissions.js'; + +export default subscribeMethodsGenerator; \ No newline at end of file diff --git a/packages/nova-subscribe/lib/server.js b/packages/nova-subscribe/lib/server.js deleted file mode 100644 index 5e1634120..000000000 --- a/packages/nova-subscribe/lib/server.js +++ /dev/null @@ -1 +0,0 @@ -import './modules.js'; \ No newline at end of file diff --git a/packages/nova-subscribe/lib/views.js b/packages/nova-subscribe/lib/views.js index 3e36e9f94..3504680db 100644 --- a/packages/nova-subscribe/lib/views.js +++ b/packages/nova-subscribe/lib/views.js @@ -1,15 +1,17 @@ -import Posts from "meteor/nova:posts"; +if (typeof Package['nova:posts'] !== "undefined") { + import Posts from "meteor/nova:posts"; -Posts.views.add("userSubscribedPosts", function (terms) { - var user = Meteor.users.findOne(terms.userId), - postsIds = []; + Posts.views.add("userSubscribedPosts", function (terms) { + var user = Meteor.users.findOne(terms.userId), + postsIds = []; - if (user && user.telescope.subscribedItems && user.telescope.subscribedItems.Posts) { - postsIds = _.pluck(user.telescope.subscribedItems.Posts, "itemId"); - } + if (user && user.telescope.subscribedItems && user.telescope.subscribedItems.Posts) { + postsIds = _.pluck(user.telescope.subscribedItems.Posts, "itemId"); + } - return { - selector: {_id: {$in: postsIds}}, - options: {limit: 5, sort: {postedAt: -1}} - }; -}); + return { + selector: {_id: {$in: postsIds}}, + options: {limit: 5, sort: {postedAt: -1}} + }; + }); +} diff --git a/packages/nova-subscribe/package.js b/packages/nova-subscribe/package.js index 033687b0e..db4221474 100644 --- a/packages/nova-subscribe/package.js +++ b/packages/nova-subscribe/package.js @@ -12,12 +12,11 @@ Package.onUse(function (api) { api.use([ 'nova:core@0.26.5-nova', - 'nova:posts@0.26.5-nova', - 'nova:users@0.26.5-nova', - 'nova:categories@0.26.5-nova', + 'nova:users@0.26.5-nova', // this dep is needed to check users permissions + // dependencies on posts, categories are done with nested imports to reduce explicit dependencies ]); - api.mainModule("lib/client.js", ["client"]); - api.mainModule("lib/server.js", ["server"]); + api.mainModule("lib/modules.js", ["client"]); + api.mainModule("lib/modules.js", ["server"]); }); From 15f854fa6ffb6af845d8632fd712c56cd0144196 Mon Sep 17 00:00:00 2001 From: Xavier Cazalot Date: Tue, 16 Aug 2016 17:04:04 +0200 Subject: [PATCH 45/60] =?UTF-8?q?Give=20doc=20to=20nova:subscribe=20?= =?UTF-8?q?=F0=9F=93=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/nova-subscribe/README.md | 73 ++++++++++++++++++++++++++----- 1 file changed, 62 insertions(+), 11 deletions(-) diff --git a/packages/nova-subscribe/README.md b/packages/nova-subscribe/README.md index 27d7f6712..60dd50386 100644 --- a/packages/nova-subscribe/README.md +++ b/packages/nova-subscribe/README.md @@ -1,21 +1,72 @@ -### nova:subscribe +# nova:subscribe -Lets you subscribe to objects. +This optional package for Nova lets your users subscribe to the different domains (collections) of your application. -### Subscribe To Posts +### Dependencies & usage +Explicit dependency on `nova:users` to enable permissions. -#### `Subscribe` +If `nova:posts` is enabled, your users will be able to subscribe to: +* new posts from users they follow (subscribed to) +* new comments on a post they are subscribed to -A link component to subscribe/unsubscribe to a post. +If `nova:categories` is enabled, your users will be able to subscribe to new posts in a category. -#### `SubscribedPosts` +### Basic usage -A component that shows a list of subscribed posts. +This package gives you access to several methods of the type `collection.subscribe` & `collection.unsubscribe`. Default group of users can subscribe to any activated domain (see above) with the following methods (action) : +``` +users.subscribe +users.unsubscribe +posts.subscribe +posts.unsubscribe +categories.subscribe +categories.unsubscribe +``` -### Subscribe To Users (Follow) +This package also provides a reusable component called `SubscribeTo` to subscribe to an document of collection. -(WIP) +This component takes two props, `document` & `documentType`. It can trigger any method described below: -### Subscribe To Comments +```jsx +// for example, in PostItem.jsx + -Note done yet. \ No newline at end of file +// for example, in UsersProfile.jsx + + +// for example, in Category.jsx + +``` + +### Extend to other collections than Users, Posts, Categories +This package export a function called `subscribeMethodsGenerator` that takes a collection as an argument and create the associated methods code : + +```js +// in my custom package +import subscribeMethodsGenerator from 'meteor/nova:subscribe'; +import Movies from './collection.js'; + +// the function creates the code, then you have to associate it to the Meteor namespace: +Meteor.methods(subscribeMethodsGenerator(Movies)); +``` + +This will creates for you the methods `movies.subscribe` & `movies.unsubscribe` than can be used in the `SubscribeTo` component: +```jsx +// in my custom component + +``` + +You'll also need to write the relevant callbacks, custom fields & permissions to run whenever a user is subscribed to your custom collection's item. See these files for inspiration. +*Note: it's more or less always the same thing* + +* Custom fields: https://github.com/TelescopeJS/Telescope/blob/devel/packages/nova-subscribe/lib/custom_fields.js#L47-L75 +* Callbacks: https://github.com/TelescopeJS/Telescope/blob/devel/packages/nova-subscribe/lib/callbacks.js#L13-L36 +* Permissions: https://github.com/TelescopeJS/Telescope/blob/devel/packages/nova-subscribe/lib/permissions.js + +### Reusable component to show a list of subscribed items + +There was formerly a component that showed a list of subscribed posts. While reducing the depencies to other packages, it broke. It's on the roadmap to re-enable it. Feel free to discuss about it [on the Slack channel](http://slack.telescopeapp.org/) if you want to build it! + +![Subscribe all the things](https://cdn.meme.am/instances/500x/70780773.jpg) + +Original PR & discussion can be found here: https://github.com/TelescopeJS/Telescope/pull/1425 From 11d7524798019d769567ad4c34e91b2d8176ae03 Mon Sep 17 00:00:00 2001 From: xavcz Date: Wed, 17 Aug 2016 10:29:08 +0200 Subject: [PATCH 46/60] nova:subscribe - fix exception in category's callback when a post isn't assigned to a category --- packages/nova-subscribe/lib/callbacks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nova-subscribe/lib/callbacks.js b/packages/nova-subscribe/lib/callbacks.js index 637e44070..c56a0cb2e 100644 --- a/packages/nova-subscribe/lib/callbacks.js +++ b/packages/nova-subscribe/lib/callbacks.js @@ -73,7 +73,7 @@ if (typeof Package['nova:posts'] !== "undefined") { const SubscribedCategoriesNotifications = (post) => { - if (typeof Telescope.notifications !== "undefined" && Meteor.isServer && !!post.categories.length) { + if (typeof Telescope.notifications !== "undefined" && Meteor.isServer && !!post.categories && !!post.categories.length) { // get the subscribers of the different categories from the post's categories const subscribers = post.categories // find the category from its id From fef3e3281c1c3a1e954dbcd29a84e94116a42dc8 Mon Sep 17 00:00:00 2001 From: xavcz Date: Wed, 17 Aug 2016 18:08:37 +0200 Subject: [PATCH 47/60] add intl support for avatar + fix typo in avatar's doc --- packages/nova-i18n-en-us/lib/en_US.js | 1 + packages/nova-users/lib/avatar.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nova-i18n-en-us/lib/en_US.js b/packages/nova-i18n-en-us/lib/en_US.js index c4bc64ae2..f9edcc8ad 100644 --- a/packages/nova-i18n-en-us/lib/en_US.js +++ b/packages/nova-i18n-en-us/lib/en_US.js @@ -64,6 +64,7 @@ Telescope.strings.en = { "users.telescope.twitterUsername": "Twitter Username", "users.telescope.website": "Website", "users.telescope.groups": "Groups", + "users.telescope.avatar": "Avatar", "users.notifications": "Notifications", "users.telescope.notifications_users": "New Users Notifications", "users.telescope.notifications_posts": "New Posts Notifications", diff --git a/packages/nova-users/lib/avatar.js b/packages/nova-users/lib/avatar.js index 74e7c2934..424c852e5 100644 --- a/packages/nova-users/lib/avatar.js +++ b/packages/nova-users/lib/avatar.js @@ -7,7 +7,7 @@ import Users from './collection.js'; Users.avatar = { // Default functionality. You can override these options by calling - // Avater.setOptions (do not set this.options directly) + // Users.avatar.setOptions (do not set this.options directly) options: { From dd1b2d7ca2582533436ab45177197a2c0513f9f8 Mon Sep 17 00:00:00 2001 From: xavcz Date: Wed, 17 Aug 2016 18:13:19 +0200 Subject: [PATCH 48/60] =?UTF-8?q?=F0=9F=8D=AA=F0=9F=A4=96:=20plug=20cookie?= =?UTF-8?q?=20to=20request=20before=20rendering=20ssr=20string?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/nova-base-routes/lib/routes.jsx | 33 ++++++++++++++++-------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/packages/nova-base-routes/lib/routes.jsx b/packages/nova-base-routes/lib/routes.jsx index 22589940f..6c69e65ba 100644 --- a/packages/nova-base-routes/lib/routes.jsx +++ b/packages/nova-base-routes/lib/routes.jsx @@ -9,6 +9,7 @@ import { ListContainer, DocumentContainer } from "meteor/utilities:react-list-co import createBrowserHistory from 'history/lib/createBrowserHistory'; import Events from "meteor/nova:events"; import Helmet from 'react-helmet'; +import Cookie from 'react-cookie'; Telescope.routes.indexRoute = { name: "posts.list", component: Telescope.components.PostsHome }; @@ -31,24 +32,34 @@ Meteor.startup(() => { let history; - const clientOptions = {}, serverOptions = {}; + const clientOptions = { + props: { + onUpdate: () => { + Events.analyticsRequest(); + Messages.clearSeen(); + } + } + }; + const serverOptions = { + htmlHook: (html) => { + const head = Helmet.rewind(); + return html.replace('', ''+ head.title + head.meta + head.link); + }, + preRender: (req, res) => { + Cookie.plugToRequest(req, res); + }, + }; + + ReactRouterSSR.Run(AppRoutes, clientOptions, serverOptions); + + // note: we did like this at first // if (Meteor.isClient) { // history = useNamedRoutes(useRouterHistory(createBrowserHistory))({ routes: AppRoutes }); // } - // if (Meteor.isServer) { // history = useNamedRoutes(useRouterHistory(createMemoryHistory))({ routes: AppRoutes }); // } - - clientOptions.props = {onUpdate: () => {Events.analyticsRequest(); Messages.clearSeen();}}; - - serverOptions.htmlHook = (html) => { - const head = Helmet.rewind(); - return html.replace('', ''+ head.title + head.meta + head.link); - } - // ReactRouterSSR.Run(AppRoutes, {historyHook: () => history}, {historyHook: () => history}); - ReactRouterSSR.Run(AppRoutes, clientOptions, serverOptions); }); \ No newline at end of file From eacb8e52267aba6253d1169ef435cf46e2ee74f0 Mon Sep 17 00:00:00 2001 From: xavcz Date: Thu, 18 Aug 2016 15:38:22 +0200 Subject: [PATCH 49/60] make Telescope available in debug mode --- packages/nova-debug/lib/globals.js | 2 ++ packages/nova-debug/package.js | 1 + 2 files changed, 3 insertions(+) diff --git a/packages/nova-debug/lib/globals.js b/packages/nova-debug/lib/globals.js index 0604d13a8..63cd6ccee 100644 --- a/packages/nova-debug/lib/globals.js +++ b/packages/nova-debug/lib/globals.js @@ -1,8 +1,10 @@ +import TelescopeImport from 'meteor/nova:lib'; import PostsImport from "meteor/nova:posts"; import CommentsImport from "meteor/nova:comments"; import UsersImport from "meteor/nova:users"; import CategoriesImport from "meteor/nova:categories"; +Telescope = TelescopeImport; Posts = PostsImport; Comments = CommentsImport; Users = UsersImport; diff --git a/packages/nova-debug/package.js b/packages/nova-debug/package.js index 588191417..65d6e4a3d 100644 --- a/packages/nova-debug/package.js +++ b/packages/nova-debug/package.js @@ -37,6 +37,7 @@ Package.onUse(function (api) { ], ['server']); api.export([ + 'Telescope', 'Posts', 'Comments', 'Users', From 9f85dbefbae91cd9971658df5a248878a0ef3d62 Mon Sep 17 00:00:00 2001 From: xavcz Date: Fri, 19 Aug 2016 13:18:51 +0200 Subject: [PATCH 50/60] nova:subscribe - display clear message to the user after performing an action --- packages/nova-i18n-en-us/lib/en_US.js | 7 ++++++- .../lib/components/SubscribeTo.jsx | 18 ++++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/packages/nova-i18n-en-us/lib/en_US.js b/packages/nova-i18n-en-us/lib/en_US.js index f9edcc8ad..88e2a315b 100644 --- a/packages/nova-i18n-en-us/lib/en_US.js +++ b/packages/nova-i18n-en-us/lib/en_US.js @@ -35,6 +35,8 @@ Telescope.strings.en = { "posts.dateNotDefined": "Date not defined", "posts.subscribe": "Subscribe", "posts.unsubscribe": "Unsubscribe", + "posts.subscribed": "You have subscribed to “{name}” comments.", + "posts.unsubscribed": "You have unsubscribed from “{name}” comments.", "posts.subscribed_posts" : "Posts subscribed to", "comments.comments": "Comments", @@ -76,7 +78,8 @@ Telescope.strings.en = { "users.cannot_post": "Sorry, you do not have permissions to post at this time", "users.subscribe": "Subscribe to this user's posts", "users.unsubscribe": "Unsubscribe to this user's posts", - "users.subscribed_users" : "Users subscribed to", + "users.subscribed": "You have subscribed to “{name}” posts.", + "users.unsubscribed": "You have unsubscribed from “{name}” posts.", "users.subscribers": "Subscribers", "categories": "Categories", @@ -92,6 +95,8 @@ Telescope.strings.en = { "categories.parentId": "Parent ID", "categories.subscribe": "Subscribe to this category's posts", "categories.unsubscribe": "Unsubscribe to this category's posts", + "categories.subscribed": "You have subscribed to “{name}” posts.", + "categories.unsubscribed": "You have unsubscribed from “{name}” posts.", "categories.subscribed_categories" : "Categories subscribed to", "settings": "Settings", diff --git a/packages/nova-subscribe/lib/components/SubscribeTo.jsx b/packages/nova-subscribe/lib/components/SubscribeTo.jsx index 778099498..a247eeff5 100644 --- a/packages/nova-subscribe/lib/components/SubscribeTo.jsx +++ b/packages/nova-subscribe/lib/components/SubscribeTo.jsx @@ -16,13 +16,23 @@ class SubscribeTo extends Component { const {document, documentType} = this.props; - const action = this.isSubscribed() ? `${this.props.documentType}.unsubscribe` : `${this.props.documentType}.subscribe`; + const action = this.isSubscribed() ? `unsubscribe` : `subscribe`; - this.context.actions.call(action, this.props.document._id, (error, result) => { - if (error) + // method name will be for example posts.subscribe + this.context.actions.call(`${documentType}.${action}`, document._id, (error, result) => { + if (error) { this.context.messages.flash(error.message, "error") - if (result) + } + + if (result) { + // success message will be for example posts.subscribed + this.context.messages.flash(this.context.intl.formatMessage( + {id: `${documentType}.${action}d`}, + // handle usual name properties + {name: document.name || document.title || document.telescope.displayName} + ), "success"); this.context.events.track(action, {'_id': this.props.document._id}); + } }); } From e5a1508d98ff32db6d34ee8985008b80c3534336 Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Wed, 24 Aug 2016 10:05:47 +0900 Subject: [PATCH 51/60] fix cancelUpvote/cancelDownvote bug --- packages/nova-voting/lib/vote.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/nova-voting/lib/vote.js b/packages/nova-voting/lib/vote.js index 7a5dcef40..0a7ee3497 100644 --- a/packages/nova-voting/lib/vote.js +++ b/packages/nova-voting/lib/vote.js @@ -1,5 +1,5 @@ -import Telescope from 'meteor/nova:lib'; -import Users from 'meteor/nova:users'; +import Telescope from 'nova-lib'; +import Users from 'nova-users'; // The equation to determine voting power. Defaults to returning 1 for everybody Telescope.getVotePower = function (user) { @@ -27,7 +27,9 @@ Telescope.operateOnItem = function (collection, itemId, user, operation) { !user || !Users.canDo(user, `${item.getCollectionName()}.${operation}`) || operation === "upvote" && hasUpvotedItem || - operation === "downvote" && hasDownvotedItem + operation === "downvote" && hasDownvotedItem || + operation === "cancelUpvote" && !hasUpvotedItem|| + operation === "cancelDownvote" && !hasDownvotedItem ) { return false; } From 6319c76fb42c2d04b55f249bc0b58324ad19e042 Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Wed, 24 Aug 2016 10:05:53 +0900 Subject: [PATCH 52/60] add missing import --- packages/nova-comments/lib/helpers.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/nova-comments/lib/helpers.js b/packages/nova-comments/lib/helpers.js index c7ab9a782..b0267155f 100644 --- a/packages/nova-comments/lib/helpers.js +++ b/packages/nova-comments/lib/helpers.js @@ -1,3 +1,4 @@ +import Telescope from 'meteor/nova:lib'; import Comments from './collection.js'; Comments.helpers({getCollection: () => Comments}); From 42decba8ad40ee9a490fee8f72278b6a24a1998b Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Thu, 25 Aug 2016 09:49:59 +0900 Subject: [PATCH 53/60] used webpack import by mistake --- packages/nova-voting/lib/vote.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nova-voting/lib/vote.js b/packages/nova-voting/lib/vote.js index 0a7ee3497..b4684e621 100644 --- a/packages/nova-voting/lib/vote.js +++ b/packages/nova-voting/lib/vote.js @@ -1,5 +1,5 @@ -import Telescope from 'nova-lib'; -import Users from 'nova-users'; +import Telescope from 'meteor/nova:lib'; +import Users from 'meteor/nova:users'; // The equation to determine voting power. Defaults to returning 1 for everybody Telescope.getVotePower = function (user) { From 49ed55dda0bceec71de0e04d119488a5851bb30f Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Thu, 25 Aug 2016 09:53:54 +0900 Subject: [PATCH 54/60] update fast-render --- .meteor/versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.meteor/versions b/.meteor/versions index 1d5f4be52..9c2dfd9d4 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -52,7 +52,7 @@ matb33:collection-hooks@0.8.3 mdg:validation-error@0.2.0 meteor@1.2.16 meteor-base@1.0.4 -meteorhacks:fast-render@2.14.0 +meteorhacks:fast-render@2.16.0 meteorhacks:inject-data@2.0.0 meteorhacks:inject-initial@1.0.4 meteorhacks:kadira@2.30.0 From f04b6ec35a1fa63cc884410b7d6da92f2ab363fb Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Thu, 25 Aug 2016 09:54:02 +0900 Subject: [PATCH 55/60] fix accounts form bug --- .../nova-base-components/lib/users/UsersAccountForm.jsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/nova-base-components/lib/users/UsersAccountForm.jsx b/packages/nova-base-components/lib/users/UsersAccountForm.jsx index b5477c5d5..2dd3bdb4d 100644 --- a/packages/nova-base-components/lib/users/UsersAccountForm.jsx +++ b/packages/nova-base-components/lib/users/UsersAccountForm.jsx @@ -36,6 +36,15 @@ class AccountsButton extends Accounts.ui.Button { } class AccountsField extends Accounts.ui.Field { + + // see https://github.com/studiointeract/accounts-ui/issues/60 + triggerUpdate () { + const { onChange } = this.props + if (this.input) { + onChange({ target: { value: this.input.value } }) + } + } + render() { const { id, hint, label, type = 'text', onChange, className = "field", defaultValue = "" } = this.props; const { mount = true } = this.state; From 0b6e11b62419674d94b46950c470797689f86c99 Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Thu, 25 Aug 2016 09:54:24 +0900 Subject: [PATCH 56/60] pass app's ReactDOM to react-router-ssr --- packages/nova-base-routes/lib/routes.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/nova-base-routes/lib/routes.jsx b/packages/nova-base-routes/lib/routes.jsx index 6c69e65ba..a623ff4da 100644 --- a/packages/nova-base-routes/lib/routes.jsx +++ b/packages/nova-base-routes/lib/routes.jsx @@ -10,6 +10,7 @@ import createBrowserHistory from 'history/lib/createBrowserHistory'; import Events from "meteor/nova:events"; import Helmet from 'react-helmet'; import Cookie from 'react-cookie'; +import ReactDOM from 'react-dom'; Telescope.routes.indexRoute = { name: "posts.list", component: Telescope.components.PostsHome }; @@ -33,6 +34,7 @@ Meteor.startup(() => { let history; const clientOptions = { + renderHook: ReactDOM.render, props: { onUpdate: () => { Events.analyticsRequest(); From 97d457251c29d11015031a09e39033bde595dbe9 Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Thu, 25 Aug 2016 09:59:09 +0900 Subject: [PATCH 57/60] remove activeClassName attribute from LinkContainer components since it's not supported --- .../nova-base-components/lib/categories/CategoriesList.jsx | 2 +- packages/nova-base-components/lib/categories/Category.jsx | 2 +- packages/nova-base-components/lib/posts/PostsViews.jsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/nova-base-components/lib/categories/CategoriesList.jsx b/packages/nova-base-components/lib/categories/CategoriesList.jsx index 7c1519608..b718d6601 100644 --- a/packages/nova-base-components/lib/categories/CategoriesList.jsx +++ b/packages/nova-base-components/lib/categories/CategoriesList.jsx @@ -97,7 +97,7 @@ class CategoriesList extends Component { id="categories-dropdown" >
- + diff --git a/packages/nova-base-components/lib/categories/Category.jsx b/packages/nova-base-components/lib/categories/Category.jsx index bc2ce1c6c..969bbc452 100644 --- a/packages/nova-base-components/lib/categories/Category.jsx +++ b/packages/nova-base-components/lib/categories/Category.jsx @@ -33,7 +33,7 @@ class Category extends Component { return (
- + { id="views-dropdown" > {views.map(view => - + )} - + From 3d6c7731fe7455a7c9ce6e737ab418777c35fc17 Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Fri, 26 Aug 2016 10:16:01 +0900 Subject: [PATCH 58/60] =?UTF-8?q?limit=20commenter=20avatars=20to=204;=20a?= =?UTF-8?q?dd=20try=E2=80=A6catch=20to=20email=20sending?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nova-base-components/lib/posts/PostsCommenters.jsx | 2 +- packages/nova-email/lib/server/email.js | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/nova-base-components/lib/posts/PostsCommenters.jsx b/packages/nova-base-components/lib/posts/PostsCommenters.jsx index 37879a564..67d30e08e 100644 --- a/packages/nova-base-components/lib/posts/PostsCommenters.jsx +++ b/packages/nova-base-components/lib/posts/PostsCommenters.jsx @@ -7,7 +7,7 @@ const PostsCommenters = ({post}) => { return (
- {post.commentersArray.map(user => )} + {_.take(post.commentersArray, 4).map(user => )}
diff --git a/packages/nova-email/lib/server/email.js b/packages/nova-email/lib/server/email.js index f1c6c433a..ad01b2a8e 100644 --- a/packages/nova-email/lib/server/email.js +++ b/packages/nova-email/lib/server/email.js @@ -92,9 +92,15 @@ NovaEmail.send = function(to, subject, html, text){ html: html }; - Email.send(email); + try { + Email.send(email); + } catch (error) { + console.log("// error while sending email:") + console.log(error) + } return email; + }; NovaEmail.buildAndSend = function (to, subject, template, properties) { From e788998bec34563b759b541d89904cc7a1265fa7 Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Mon, 29 Aug 2016 08:53:20 +0900 Subject: [PATCH 59/60] Upgrade to Meteor 1.4.1.1 --- .meteor/.finished-upgraders | 1 + .meteor/packages | 2 +- .meteor/release | 2 +- .meteor/versions | 73 ++++++++++++++-------------- package.json | 1 + packages/nova-base-styles/package.js | 2 +- packages/nova-lib/package.js | 5 +- 7 files changed, 45 insertions(+), 41 deletions(-) diff --git a/.meteor/.finished-upgraders b/.meteor/.finished-upgraders index 3e712bc5a..a541808f2 100644 --- a/.meteor/.finished-upgraders +++ b/.meteor/.finished-upgraders @@ -13,3 +13,4 @@ notices-for-facebook-graph-api-2 1.3.0-split-minifiers-package 1.3.5-remove-old-dev-bundle-link 1.4.0-remove-old-dev-bundle-link +1.4.1-add-shell-server-package diff --git a/.meteor/packages b/.meteor/packages index 4f3c3f387..16dbc95f6 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -30,7 +30,7 @@ nova:base-routes nova:email-templates nova:i18n-en-us -accounts-password +accounts-password@1.3.0 # accounts-twitter # accounts-facebook diff --git a/.meteor/release b/.meteor/release index 810628dc6..72980bc2f 100644 --- a/.meteor/release +++ b/.meteor/release @@ -1 +1 @@ -METEOR@1.4 +METEOR@1.4.1.1 diff --git a/.meteor/versions b/.meteor/versions index 9c2dfd9d4..4d77618c8 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -1,43 +1,43 @@ -accounts-base@1.2.9 -accounts-password@1.1.13 -aldeed:collection2@2.9.1 -aldeed:collection2-core@1.1.1 -aldeed:schema-deny@1.0.1 -aldeed:schema-index@1.0.1 +accounts-base@1.2.11 +accounts-password@1.3.0 +aldeed:collection2@2.10.0 +aldeed:collection2-core@1.2.0 +aldeed:schema-deny@1.1.0 +aldeed:schema-index@1.1.0 aldeed:simple-schema@1.5.3 allow-deny@1.0.5 -autoupdate@1.2.11 -babel-compiler@6.9.0 -babel-runtime@0.1.10 +autoupdate@1.3.11 +babel-compiler@6.9.1 +babel-runtime@0.1.11 base64@1.0.9 binary-heap@1.0.9 blaze@2.1.8 blaze-tools@1.0.9 boilerplate-generator@1.0.9 -caching-compiler@1.0.6 +caching-compiler@1.1.7 callback-hook@1.0.9 check@1.2.3 chuangbo:cookie@1.1.0 -coffeescript@1.1.4 +coffeescript@1.2.4_1 dburles:collection-helpers@1.0.4 ddp@1.2.5 -ddp-client@1.2.9 +ddp-client@1.3.1 ddp-common@1.2.6 ddp-rate-limiter@1.0.5 -ddp-server@1.2.10 +ddp-server@1.3.10 deps@1.0.12 diff-sequence@1.0.6 -ecmascript@0.5.7 -ecmascript-runtime@0.3.12 +ecmascript@0.5.8 +ecmascript-runtime@0.3.14 ejson@1.0.12 -email@1.0.16 +email@1.1.17 fortawesome:fontawesome@4.5.0 -fourseven:scss@3.8.0_1 +fourseven:scss@3.9.0 geojson-utils@1.0.9 hot-code-push@1.0.4 html-tools@1.0.10 htmljs@1.0.10 -http@1.1.8 +http@1.2.9 id-map@1.0.8 jparker:crypto-core@0.1.0 jparker:crypto-md5@0.1.1 @@ -47,27 +47,27 @@ kadira:debug@3.2.2 kadira:runtime-dev@0.0.1 livedata@1.0.18 localstorage@1.0.11 -logging@1.1.14 -matb33:collection-hooks@0.8.3 -mdg:validation-error@0.2.0 -meteor@1.2.16 +logging@1.1.15 +matb33:collection-hooks@0.8.4 +mdg:validation-error@0.5.1 +meteor@1.2.17 meteor-base@1.0.4 meteorhacks:fast-render@2.16.0 meteorhacks:inject-data@2.0.0 meteorhacks:inject-initial@1.0.4 meteorhacks:kadira@2.30.0 meteorhacks:kadira-binary-deps@1.5.0 -meteorhacks:kadira-profiler@1.2.1 +meteorhacks:kadira-profiler@1.3.0 meteorhacks:meteorx@1.4.1 meteorhacks:picker@1.0.3 meteorhacks:subs-manager@1.6.4 meteorhacks:unblock@1.1.0 -minifier-css@1.1.13 -minifier-js@1.1.13 +minifier-css@1.2.14 +minifier-js@1.2.14 minimongo@1.0.17 -modules@0.7.5 -modules-runtime@0.7.5 -mongo@1.1.10 +modules@0.7.6 +modules-runtime@0.7.6 +mongo@1.1.12 mongo-id@1.0.5 mongo-livedata@1.0.12 nova:api@0.26.5-nova @@ -96,8 +96,8 @@ nova:settings@0.26.5-nova nova:subscribe@0.26.5-nova nova:users@0.26.5-nova nova:voting@0.26.5-nova -npm-bcrypt@0.8.6_3 -npm-mongo@1.5.45 +npm-bcrypt@0.9.1 +npm-mongo@1.5.48 observe-sequence@1.0.12 ordered-dict@1.0.8 peerlibrary:assert@0.2.5 @@ -106,26 +106,27 @@ peerlibrary:reactive-mongo@0.1.1 peerlibrary:reactive-publish@0.2.0 peerlibrary:server-autorun@0.5.2 percolatestudio:synced-cron@1.1.0 -promise@0.8.3 +promise@0.8.4 raix:eventemitter@0.1.3 random@1.0.10 rate-limit@1.0.5 react-meteor-data@0.2.9 -reactive-dict@1.1.5 +reactive-dict@1.1.8 reactive-var@1.0.10 reactrouter:react-router-ssr@3.1.4 reload@1.1.10 retry@1.0.8 routepolicy@1.0.11 service-configuration@1.0.10 -session@1.1.3 +session@1.1.6 sha@1.0.8 +shell-server@0.2.1 softwarerero:accounts-t9n@1.3.4 spacebars@1.0.12 spacebars-compiler@1.0.12 srp@1.0.9 -standard-minifier-css@1.0.8 -standard-minifier-js@1.0.8 +standard-minifier-css@1.2.0 +standard-minifier-js@1.2.0 standard-minifiers@1.0.6 std:accounts-ui@1.2.6 tmeasday:check-npm-versions@0.3.1 @@ -137,5 +138,5 @@ url@1.0.10 utilities:react-list-container@0.1.14 utilities:smart-methods@0.1.5 utilities:smart-publications@0.1.4 -webapp@1.3.10 +webapp@1.3.11 webapp-hashing@1.0.9 diff --git a/package.json b/package.json index c8847a4ea..c7561eb3f 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "npm": "^3.0" }, "dependencies": { + "bcrypt": "^0.8.7", "bootstrap": "^4.0.0-alpha.2", "classnames": "^2.2.3", "escape-string-regexp": "^1.0.5", diff --git a/packages/nova-base-styles/package.js b/packages/nova-base-styles/package.js index aa81d8726..26ffdc149 100644 --- a/packages/nova-base-styles/package.js +++ b/packages/nova-base-styles/package.js @@ -11,7 +11,7 @@ Package.onUse(function (api) { api.use([ 'nova:core@0.26.5-nova', - 'fourseven:scss@3.8.0_1', + 'fourseven:scss@3.9.0', // 'juliancwirko:postcss@1.0.0-rc.4', // 'seba:minifiers-autoprefixer@0.0.1', // 'twbs:bootstrap@=4.0.0-alpha.2' diff --git a/packages/nova-lib/package.js b/packages/nova-lib/package.js index 58bd593f4..f8d822972 100644 --- a/packages/nova-lib/package.js +++ b/packages/nova-lib/package.js @@ -17,7 +17,7 @@ Package.onUse(function (api) { 'mongo', 'tracker', 'service-configuration', - 'standard-minifiers@1.0.5', + 'standard-minifiers@1.0.6', 'modules@0.5.2', 'accounts-base', 'check', @@ -27,11 +27,12 @@ Package.onUse(function (api) { 'ecmascript@0.4.2', 'react-meteor-data@0.2.8', 'service-configuration', + 'shell-server', // Third-party packages 'aldeed:simple-schema@1.5.3', - 'aldeed:collection2@2.9.1', + 'aldeed:collection2@2.10.0', 'meteorhacks:picker@1.0.3', 'dburles:collection-helpers@1.0.4', 'matb33:collection-hooks@0.8.1', From 3f56f4668d8eca33a5d02d7f39bd1a57553a6b9e Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Mon, 29 Aug 2016 08:55:19 +0900 Subject: [PATCH 60/60] cache front page posts again --- packages/nova-base-components/lib/posts/PostsHome.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nova-base-components/lib/posts/PostsHome.jsx b/packages/nova-base-components/lib/posts/PostsHome.jsx index 1052f25a3..6edca4747 100644 --- a/packages/nova-base-components/lib/posts/PostsHome.jsx +++ b/packages/nova-base-components/lib/posts/PostsHome.jsx @@ -23,7 +23,7 @@ class PostsHome extends Component { terms={params} joins={Posts.getJoins()} component={Telescope.components.PostsList} - cacheSubscription={false} + cacheSubscription={true} listId={params.listId} limit={Telescope.settings.get("postsPerPage", 10)} />