Skip to content

Commit dec39bc

Browse files
author
Aaron Judd
committed
Merge pull request #769 from reactioncommerce/development
Version 0.11.1
2 parents 99c77a3 + d638fda commit dec39bc

File tree

47 files changed

+572
-520
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+572
-520
lines changed

.meteor/packages

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,19 @@ ecmascript # Enable ECMAScript2015+ syntax in app code
2020

2121
# Meteor Community Packages
2222

23-
logging
24-
reload
25-
random
26-
ejson
27-
check
28-
underscore
29-
oauth-encryption
30-
audit-argument-checks
23+
logging # meteor logging
24+
reload # hot reload
25+
random # random library
26+
ejson # ejson libary
27+
check # argument validation utility
28+
underscore # helper library underscore.js
29+
oauth-encryption # oauth encryption for accounts
30+
audit-argument-checks # ensure meteor method argument validation
3131

3232
# Recommended Packages
3333

34-
less # dependency of bootstrap, core-theme
35-
# nemo64:bootstrap # required only with bootstrap-theme
36-
# spiderable # adds phantomjs, use ongoworks:spiderable with Docker
37-
# meteorhacks:sikka # additional ddp, login security
38-
fortawesome:fontawesome
34+
less # dependency of bootstrap, core-theme
35+
fortawesome:fontawesome # font awesome library
3936

4037
# Meteor Auth Packages
4138

@@ -62,27 +59,29 @@ reactioncommerce:launchdock-connect
6259

6360
# Reaction Payment Packages
6461

62+
reactioncommerce:reaction-paymentmethod
6563
reactioncommerce:reaction-paypal
6664
reactioncommerce:reaction-stripe
6765
#reactioncommerce:reaction-auth-net
6866
#reactioncommerce:reaction-braintree
69-
reactioncommerce:reaction-paymentmethod
7067

71-
# Reaction Commerce Data
7268

73-
reactioncommerce:reaction-sample-data
74-
75-
# Performance & Debugging Tools
69+
# Reaction Commerce Data
7670

77-
#meteorhacks:kadira
78-
#meteorhacks:kadira-profiler
79-
#meteortoys:allthings
71+
reactioncommerce:reaction-sample-data # default Reaction data
8072

8173
# Themes
82-
reactioncommerce:default-theme
74+
reactioncommerce:default-theme # default Reaction theme
8375
#my:custom-theme
8476

8577
# Forced updates on packages
86-
8778
79+
8880

81+
# Performance & Debugging Tools
82+
83+
#meteorhacks:kadira # performance profiling
84+
#meteorhacks:kadira-profiler
85+
#meteortoys:allthings # developer tools
86+
#spiderable # adds phantomjs, use ongoworks:spiderable with Docker
87+
#meteorhacks:sikka # additional ddp, login security

.meteor/versions

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ [email protected]
88
99
1010
11-
12-
11+
12+
13+
14+
15+
1316
1417
1518
@@ -84,7 +87,7 @@ iron:[email protected]
8487
8588
8689
87-
jeremy:stripe@1.0.0
90+
jeremy:stripe@1.1.0
8891
8992
9093
@@ -95,7 +98,7 @@ [email protected]
9598
9699
97100
98-
mdg:validation-error@0.1.0
101+
mdg:validation-error@0.4.0
99102
100103
101104
meteorhacks:[email protected]
@@ -104,7 +107,7 @@ [email protected]
104107
105108
106109
107-
momentjs:moment@2.10.6
110+
momentjs:moment@2.11.1
108111
109112
110113
@@ -131,17 +134,17 @@ [email protected]
131134
reactioncommerce:[email protected]
132135
reactioncommerce:[email protected]
133136
reactioncommerce:[email protected]
134-
reactioncommerce:[email protected].3
135-
reactioncommerce:[email protected].1
137+
reactioncommerce:[email protected].5
138+
reactioncommerce:[email protected].2
136139
reactioncommerce:[email protected]
137140
reactioncommerce:[email protected]
138-
reactioncommerce:[email protected].3
139-
reactioncommerce:[email protected].1
141+
reactioncommerce:[email protected].4
142+
reactioncommerce:[email protected].2
140143
reactioncommerce:[email protected]
141-
reactioncommerce:[email protected].1
142-
reactioncommerce:[email protected].7
144+
reactioncommerce:[email protected].2
145+
reactioncommerce:[email protected].8
143146
reactioncommerce:[email protected]
144-
reactioncommerce:[email protected].3
147+
reactioncommerce:[email protected].4
145148
reactioncommerce:[email protected]
146149
reactioncommerce:[email protected]
147150
reactioncommerce:[email protected]

packages/.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,27 @@
11
*
22
!.gitignore
33

4+
!my-custom-theme-template
45
!my-custom-theme-template/*
56

7+
!reaction-accounts
8+
!reaction-analytics
9+
!reaction-analytics-libs
10+
!reaction-collections
11+
!reaction-core
12+
!reaction-core-theme
13+
!reaction-default-theme
14+
!reaction-inventory
15+
!reaction-product-simple
16+
!reaction-sample-data
17+
!reaction-schemas
18+
!reaction-shipping
19+
!reaction-social
20+
!reaction-ui
21+
!reaction-email-templates
22+
23+
# For some reason the above inverse ignore rules don't play well with some
24+
# editors, so we also add inverse ignore rules for their subdirectories.
625
!reaction-accounts/*
726
!reaction-analytics/*
827
!reaction-analytics-libs/*

packages/my-custom-theme-template/main.less

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,28 @@
1-
21
/*
3-
Write and/or import all other styles into this file
4-
Be sure to also include them in package.js under
5-
6-
7-
api.addFiles([
8-
"/path/to/file.less"
9-
], "client", {isImport: true});
10-
11-
- or -
12-
13-
api.addFiles("/path/to/file.less", "client", {isImport: true})
14-
2+
You may import all other styles into this file.
153
*/
164

175
// Import Bootstrap 3 Styles
6+
// This provides the base styles needed for the theme to function properly
187
@import "{reactioncommerce:core-theme}/lib/bootstrap/less/bootstrap.less";
198

9+
// Import Reaction Core Theme Variables
10+
// Variable overrides and additions provided by core-theme
11+
@import "{reactioncommerce:core-theme}/default/variables.less";
12+
13+
// *** Import our variable overrides
14+
@import "styles/variables.less";
15+
2016
// Import Reaction Core Theme Styles
17+
@import "{reactioncommerce:core-theme}/default/bootstrap.rtl.less";
2118
@import "{reactioncommerce:core-theme}/default/alerts.less";
22-
23-
// Disabled: Reaction-UI can handle RTL
24-
// @import "{reactioncommerce:core-theme}/default/bootstrap.rtl.less";
2519
@import "{reactioncommerce:core-theme}/default/dropdowns.less";
2620
@import "{reactioncommerce:core-theme}/default/forms.less";
2721
@import "{reactioncommerce:core-theme}/default/grid.less";
2822
@import "{reactioncommerce:core-theme}/default/mixins.less";
2923
@import "{reactioncommerce:core-theme}/default/navs.less";
3024
@import "{reactioncommerce:core-theme}/default/panels.less";
3125
@import "{reactioncommerce:core-theme}/default/popovers.less";
32-
@import "{reactioncommerce:core-theme}/default/variables.less";
3326
@import "{reactioncommerce:core-theme}/default/base.less";
3427
@import "{reactioncommerce:core-theme}/theme/accounts/accounts.less";
3528
@import "{reactioncommerce:core-theme}/theme/accounts/inline/inline.less";
@@ -63,8 +56,12 @@
6356
@import "{reactioncommerce:core-theme}/theme/products/productList/productList.less";
6457
@import "{reactioncommerce:core-theme}/theme/products/products.less";
6558

66-
// Get bootstrap variables
67-
@import "{reactioncommerce:core-theme}/lib/bootstrap/less/variables.less";
59+
/**
60+
Import your styles here
61+
*** YOU ALSO HAVE TO INCLUDE YOUR STYLES IN THE package.js FILE ***
62+
63+
api.addFiles("/path/to/file.less", "client", {isImport: true});
64+
**/
6865

69-
// Import our styles
66+
// Import our other styles
7067
@import "styles/base.less";
Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,39 @@
11
Package.describe({
2-
name: "my:custom-theme",
2+
// Name of your package
3+
name: "my:custom-theme-template",
4+
5+
// Brief summary or title of your package
36
summary: "My Custom Theme",
7+
8+
// Version number of your theme package
49
version: "0.1.0"
510
});
611

712
Package.onUse(function (api) {
8-
// Works with meteor 1.2 and above
13+
// The package is set to work with meteor 1.2 and above
914
api.versionsFrom("[email protected]");
1015

11-
// Use a preprocessor
16+
// Use a preprocessor, LESS CSS in this case.
1217
api.use("less");
1318

14-
// Include core theme to get its base styles
19+
// Include core theme to get its base styles.
20+
// The styles from core-theme are imported into the main.less file.
21+
// @see main.less
1522
// (Optional, but recommended for a starting point)
1623
api.use("reactioncommerce:[email protected]");
1724

18-
// Add files what will be imported into your theme.less file
19-
// ** Please note: {isImport: true} stops meteor from processing a file with its
20-
// build system. This is helpful if the file needs to imported into another file.
21-
// In this case, these files are imported into main.less
22-
23-
// (Array of files)
24-
api.addFiles([
25-
"styles/base.less"
26-
], "client", {isImport: true});
25+
// ---------------------------------------------------------------------------
26+
// Styles that will be imported into another file.
27+
// -- Theses file will imported into main.less, so they are included here,
28+
// -- before they are include the main.less file
29+
//
30+
// ** ADD YOUR CUSTOM STYLES HERE **
31+
api.addFiles("styles/variables.less", "client", {isImport: true});
32+
api.addFiles("styles/base.less", "client", {isImport: true});
2733

28-
// - OR Individually, if you prefer
29-
// api.addFiles("/path/to/file.less", "client", {isImport: true});
3034

31-
// Add top level .less files
32-
// These will be processed by your included preprocessors (less, styles, or sass)
33-
api.addFiles([
34-
"main.less"
35-
], "client");
35+
// ---------------------------------------------------------------------------
36+
// Styles that stand on their own and are processed by Meteor using the proper
37+
// CSS preprocessor (LESS CSS in this case)
38+
api.addFiles("main.less", "client");
3639
});
Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
// Custom theme styles
2-
3-
// Example: Override less variables from reactioncommerce:core-theme
4-
@navbar-default-bg: #61462F;
5-
61
/*
7-
Example importing mixins, If you change the language to a RTL language,
8-
you'll get the marign on the right, instead of the left. And a magic pink background.
9-
*/
2+
Example style with usage of mixins.
103
11-
@import "{reactioncommerce:core-theme}/default/mixins/rtl.less";
4+
If you change the language to a RTL language,
5+
you'll get a marign of 50px on the right, instead of the left.
6+
And a magic pink background.
7+
*/
128

139
body {
1410
.margin-left(50px);
1511
background-color: #ff00ff;
1612
}
17-
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* Add your variable overrides here
3+
*/
4+
5+
// Example: Override less variable override
6+
@navbar-default-bg: #61462F;

packages/reaction-accounts/client/templates/addressBook/form/form.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,8 @@ Template.addressBookForm.helpers({
33
/*
44
* TODO: update for i18n
55
*/
6-
countryOptions: function() {
7-
var country, locale, options, ref, shop;
8-
options = [];
9-
shop = ReactionCore.Collections.Shops.findOne();
10-
ref = shop != null ? shop.locales.countries : void 0;
11-
for (country in ref) {
12-
locale = ref[country];
13-
options.push({
14-
'label': locale.name,
15-
'value': country
16-
});
17-
}
18-
return options;
6+
countryOptions: function () {
7+
return ReactionCore.Collections.Countries.find().fetch();
198
},
209
statesForCountry: function() {
2110
var locale, options, ref, selectedCountry, shop, state;

packages/reaction-accounts/package.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package.describe({
22
summary: "Reaction Accounts - Authentication UI for Reaction Commerce",
33
name: "reactioncommerce:reaction-accounts",
4-
version: "1.6.1",
4+
version: "1.6.2",
55
documentation: "README.md"
66
});
77

@@ -32,6 +32,7 @@ Package.onUse(function (api) {
3232
api.use("oauth-encryption");
3333
api.use("accounts-base");
3434
api.use("accounts-password");
35+
api.use("jparker:[email protected]");
3536
api.use("reactioncommerce:[email protected]");
3637

3738
// accounts

packages/reaction-accounts/server/methods/accounts.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,12 @@ Accounts.onCreateUser(function (options, user) {
8787

8888
// assign default user roles
8989
user.roles = roles;
90-
return user;
90+
91+
// run onCreateUser hooks
92+
// (the user object must be returned by all callbacks)
93+
userDoc = ReactionCore.Hooks.Events.run("onCreateUser", user, options);
94+
95+
return userDoc;
9196
}
9297
});
9398

@@ -97,7 +102,11 @@ Accounts.onCreateUser(function (options, user) {
97102
* @param {Object} options - user account creation options
98103
* @fires "cart/mergeCart" Method
99104
*/
100-
Accounts.onLogin(function (options) {
105+
Accounts.onLogin(function (opts) {
106+
// run onLogin hooks
107+
// (the options object must be returned by all callbacks)
108+
options = ReactionCore.Hooks.Events.run("onLogin", opts);
109+
101110
// remove anonymous role
102111
// all users are guest, but anonymous user don't have profile access
103112
// or ability to order history, etc. so ensure its removed upon login.

0 commit comments

Comments
 (0)