diff --git a/.github/issue_template.md b/.github/issue_template.md index c878cd93edd..dd3adfa7f06 100644 --- a/.github/issue_template.md +++ b/.github/issue_template.md @@ -10,6 +10,9 @@ to our [Gitter](https://gitter.im/reactioncommerce/reaction) channel instead. ### Steps to Reproduce the Behavior +### Versions +(run `reaction -v` from your reaction directory) + For enhancements or other issues, please describe in as much detail as possible how the app should be changed and how this would benefit users/developers diff --git a/.gitmodules b/.gitmodules index 3218f60758c..739b6f365ee 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,9 @@ [submodule "imports/plugins/custom"] path = imports/plugins/custom url = git@github.com:evereveofficial/eePlugins.git +# [submodule "private/settings"] +# path = private/settings +# url = git@github.com:evereveofficial/ReactionPrivateSettings.git +[submodule "private/settings"] + path = private/settings + url = git@github.com:evereveofficial/ReactionPrivateSettings.git diff --git a/.meteor/packages b/.meteor/packages index 724a7d997fc..559d518aadc 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -11,7 +11,7 @@ meteor-base@1.0.4 # Packages every Meteor app needs to have mobile-experience@1.0.4 # Packages for a great mobile UX blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views es5-shim@4.6.15 # ECMAScript 5 compatibility for older browsers. -ecmascript@0.6.3 # Enable ECMAScript2015+ syntax in app code +ecmascript@0.7.2 # Enable ECMAScript2015+ syntax in app code audit-argument-checks@1.0.7 # ensure meteor method argument validation browser-policy@1.1.0 # security-related policies enforced by newer browsers juliancwirko:postcss # CSS post-processing plugin (replaces standard-minifier-css) @@ -36,10 +36,10 @@ mdg:validated-method shell-server@0.2.3 # Meteor Auth Packages -accounts-base@1.2.15 -accounts-password@1.3.4 +accounts-base@1.2.16 +accounts-password@1.3.5 accounts-facebook@1.1.1 -accounts-google@1.1.1 +accounts-google@1.1.2 accounts-twitter@1.2.1 oauth-encryption@1.2.1 # accounts-github @@ -96,6 +96,6 @@ johanbrook:publication-collector # meteorhacks:sikka # additional ddp, login security # Custom Packages -facebook-config-ui -google-config-ui -twitter-config-ui +facebook-config-ui@1.0.0 +google-config-ui@1.0.0 +twitter-config-ui@1.0.0 diff --git a/.meteor/release b/.meteor/release index 31ce024f183..605b4e1f031 100644 --- a/.meteor/release +++ b/.meteor/release @@ -1 +1 @@ -METEOR@1.4.3.2 +METEOR@1.4.4.1 diff --git a/.meteor/versions b/.meteor/versions index 9b41659d99f..d38b3d4bde6 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -1,10 +1,10 @@ abernix:minifier-js@1.3.19 abernix:standard-minifier-js@1.3.19 -accounts-base@1.2.15 +accounts-base@1.2.16 accounts-facebook@1.1.1 -accounts-google@1.1.1 +accounts-google@1.1.2 accounts-oauth@1.1.15 -accounts-password@1.3.4 +accounts-password@1.3.5 accounts-twitter@1.2.1 alanning:roles@1.2.16 aldeed:autoform@5.8.1 @@ -19,7 +19,7 @@ allow-deny@1.0.5 amplify@1.0.0 audit-argument-checks@1.0.7 autoupdate@1.3.12 -babel-compiler@6.14.1 +babel-compiler@6.18.2 babel-runtime@1.0.1 base64@1.0.10 binary-heap@1.0.10 @@ -59,18 +59,18 @@ chuangbo:cookie@1.1.0 coffeescript@1.11.1_4 dburles:factory@1.1.0 ddp@1.2.5 -ddp-client@1.3.3 +ddp-client@1.3.4 ddp-common@1.2.8 ddp-rate-limiter@1.0.7 -ddp-server@1.3.13 +ddp-server@1.3.14 deps@1.0.12 diff-sequence@1.0.7 -dispatch:mocha@0.2.0 +dispatch:mocha@0.3.0 dispatch:run-as-user@1.1.1 -ecmascript@0.6.3 +ecmascript@0.7.3 ecmascript-runtime@0.3.15 ejson@1.0.13 -email@1.1.18 +email@1.2.0 es5-shim@4.6.15 facebook-config-ui@1.0.0 facebook-oauth@1.3.0 @@ -78,7 +78,7 @@ fastclick@1.0.13 gadicc:blaze-react-component@1.4.0 geojson-utils@1.0.10 google-config-ui@1.0.0 -google-oauth@1.2.0 +google-oauth@1.2.3 hot-code-push@1.0.4 html-tools@1.0.11 htmljs@1.0.11 @@ -116,8 +116,8 @@ minifier-css@1.2.16 minimongo@1.0.21 mobile-experience@1.0.4 mobile-status-bar@1.0.14 -modules@0.7.9 -modules-runtime@0.7.9 +modules@0.8.2 +modules-runtime@0.7.10 momentjs:moment@2.17.1 mongo@1.1.16 mongo-id@1.0.6 @@ -141,7 +141,7 @@ promise@0.8.8 raix:eventemitter@0.1.3 raix:ui-dropped-event@0.0.7 random@1.0.10 -rate-limit@1.0.7 +rate-limit@1.0.8 react-meteor-data@0.2.9 reactive-dict@1.1.8 reactive-var@1.0.11 @@ -169,5 +169,5 @@ ui@1.0.13 underscore@1.0.10 url@1.1.0 vsivsi:job-collection@1.4.0 -webapp@1.3.14 +webapp@1.3.15 webapp-hashing@1.0.9 diff --git a/Dockerfile b/Dockerfile index cbcdf016d2b..adb8cc0a8c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM reactioncommerce/base:v1.2.2 +FROM reactioncommerce/base:v1.3.0 # Default environment variables ENV ROOT_URL "http://localhost" diff --git a/README.md b/README.md index 1c4414920e0..fd77b3d0b62 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,8 @@ cd reaction reaction ``` +_Reaction requires Meteor, Git, MongoDB, OS Specific Build Tools, and (optionally) ImageMagick. See our [Requirements Docs](https://docs.reactioncommerce.com/reaction-docs/master/requirements) for requirements installation information._ + For more information on setup and configuration, check out the [installation](https://docs.reactioncommerce.com/reaction-docs/development/installation) and [configuration](https://docs.reactioncommerce.com/reaction-docs/development/configuration) docs. ## Participation @@ -70,7 +72,7 @@ Docker images are pushed when Reaction sucessfully builds and passes all tests o ### Contributing -Want to contribute? That's great! [Here's you can get started](https://guides.github.com/activities/contributing-to-open-source/#contributing). +Want to contribute? That's great! [Here's how you can get started](https://guides.github.com/activities/contributing-to-open-source/#contributing). Check out our Issues page, and if you find something you want to work on, let us know in the comments. If you're interested in a particular [project](https://github.com/reactioncommerce/reaction/projects) and you aren’t sure where to begin, feel free to ask. Start small! diff --git a/client/modules/accounts/templates/members/member.js b/client/modules/accounts/templates/members/member.js index 801e7f5b04f..4f163ae9f88 100644 --- a/client/modules/accounts/templates/members/member.js +++ b/client/modules/accounts/templates/members/member.js @@ -20,6 +20,8 @@ const getPermissionMap = (permissions) => { */ Template.member.events({ "click [data-event-action=showMemberSettings]": function () { + $(".customerUsageType input").val(""); // form reset + $(".customerUsageType").addClass("hide"); // form reset Reaction.setActionViewDetail({ label: "Permissions", i18nKeyLabel: "admin.settings.permissionsSettingsLabel", diff --git a/client/modules/core/startup.js b/client/modules/core/startup.js index 417b6be8874..48bc5d95390 100644 --- a/client/modules/core/startup.js +++ b/client/modules/core/startup.js @@ -2,23 +2,6 @@ import { Meteor } from "meteor/meteor"; import { Tracker } from "meteor/tracker"; import Reaction from "./main"; -// @see https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API -let hidden; -// let visibilityState; // keep this for a some case -if (typeof document.hidden !== "undefined") { - hidden = "hidden"; - // visibilityState = "visibilityState"; -} else if (typeof document.mozHidden !== "undefined") { - hidden = "mozHidden"; - // visibilityState = "mozVisibilityState"; -} else if (typeof document.msHidden !== "undefined") { - hidden = "msHidden"; - // visibilityState = "msVisibilityState"; -} else if (typeof document.webkitHidden !== "undefined") { - hidden = "webkitHidden"; - // visibilityState = "webkitVisibilityState"; -} - /** * Startup Reaction * Init Reaction client @@ -30,16 +13,14 @@ Meteor.startup(function () { return Tracker.autorun(function () { const userId = Meteor.userId(); // TODO: maybe `visibilityState` will be better here - let isHidden; let loggingIn; let sessionId; Tracker.nonreactive(function () { - isHidden = document[hidden]; loggingIn = Accounts.loggingIn(); sessionId = amplify.store("Reaction.session"); }); if (!userId) { - if (!isHidden && !loggingIn || typeof sessionId !== "string") { + if (!loggingIn || typeof sessionId !== "string") { Accounts.loginWithAnonymous(); } } diff --git a/client/modules/router/main.js b/client/modules/router/main.js index e011180a959..4fef3c98603 100644 --- a/client/modules/router/main.js +++ b/client/modules/router/main.js @@ -121,7 +121,9 @@ export function ReactionLayout(options = {}) { if (Reaction.Subscriptions.Shops.ready()) { const shop = Shops.findOne(Reaction.getShopId()); if (shop) { - const newLayout = shop.layout.find((x) => selectLayout(x, layout, workflow)); + const sortedLayout = shop.layout.sort((prev, next) => prev.priority - next.priority); + const newLayout = sortedLayout.find((x) => selectLayout(x, layout, workflow)); + // oops this layout wasn't found. render notFound if (!newLayout) { BlazeLayout.render("notFound"); diff --git a/client/templates/index.html b/client/templates/index.html index d3fcf26198b..7b2db8708a8 100644 --- a/client/templates/index.html +++ b/client/templates/index.html @@ -2,4 +2,5 @@ + diff --git a/imports/plugins/core/checkout/register.js b/imports/plugins/core/checkout/register.js index 89c64e1127d..e3e6028ac43 100644 --- a/imports/plugins/core/checkout/register.js +++ b/imports/plugins/core/checkout/register.js @@ -42,7 +42,6 @@ Reaction.registerPackage({ workflow: "coreCartWorkflow", container: "checkout-steps-main", audience: ["guest", "anonymous"], - priority: 1, position: "1" }, { template: "checkoutAddressBook", @@ -50,7 +49,6 @@ Reaction.registerPackage({ workflow: "coreCartWorkflow", container: "checkout-steps-main", audience: ["guest", "anonymous"], - priority: 2, position: "2" }, { template: "coreCheckoutShipping", @@ -58,7 +56,6 @@ Reaction.registerPackage({ workflow: "coreCartWorkflow", container: "checkout-steps-main", audience: ["guest", "anonymous"], - priority: 3, position: "3" }, { template: "checkoutReview", @@ -66,7 +63,6 @@ Reaction.registerPackage({ workflow: "coreCartWorkflow", container: "checkout-steps-side", audience: ["guest", "anonymous"], - priority: 4, position: "4" }, { template: "checkoutPayment", @@ -74,7 +70,6 @@ Reaction.registerPackage({ workflow: "coreCartWorkflow", container: "checkout-steps-side", audience: ["guest", "anonymous"], - priority: 5, position: "5" }] }); diff --git a/imports/plugins/core/email/client/components/emailTableColumn.js b/imports/plugins/core/email/client/components/emailTableColumn.js index 6e40ec37f95..fe8decab88c 100644 --- a/imports/plugins/core/email/client/components/emailTableColumn.js +++ b/imports/plugins/core/email/client/components/emailTableColumn.js @@ -1,10 +1,14 @@ import React, { Component, PropTypes } from "react"; import moment from "moment"; import { Icon } from "/imports/plugins/core/ui/client/components"; +import { i18next } from "/client/api"; class EmailTableColumn extends Component { static propTypes = { - data: PropTypes.object, + data: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.instanceOf(Date) + ]), metadata: PropTypes.object, rowData: PropTypes.object } diff --git a/imports/plugins/core/orders/client/components/lineItems.js b/imports/plugins/core/orders/client/components/lineItems.js index 6b575b72db7..aa0e0534d4a 100644 --- a/imports/plugins/core/orders/client/components/lineItems.js +++ b/imports/plugins/core/orders/client/components/lineItems.js @@ -22,7 +22,7 @@ class LineItems extends Component {
handleClick(uniqueItem.cartItemId)} + onClick={() => handleClick(uniqueItem._id)} style={{ height: 70 }} > @@ -42,7 +42,7 @@ class LineItems extends Component {
- {quantity || 1} + {quantity || uniqueItem.quantity}
@@ -56,7 +56,7 @@ class LineItems extends Component { ); } - renderLineItemInvoice(uniqueItem, shippingRate, quantity) { + renderLineItemInvoice(uniqueItem) { return (
@@ -69,14 +69,14 @@ class LineItems extends Component {
- {formatPriceString(shippingRate)} + {formatPriceString(uniqueItem.shipping.rate)}
Item tax
- {uniqueItem.taxDetail ? formatPriceString(uniqueItem.taxDetail.tax / quantity) : formatPriceString(0)} + {uniqueItem.taxDetail ? formatPriceString(uniqueItem.taxDetail.tax / uniqueItem.quantity) : formatPriceString(0)}
@@ -92,10 +92,10 @@ class LineItems extends Component {
{uniqueItem.taxDetail ? - {this.calculateTotal(uniqueItem.variants.price, shippingRate, uniqueItem.taxDetail.tax)} + {this.calculateTotal(uniqueItem.variants.price, uniqueItem.shipping.rate, uniqueItem.taxDetail.tax)} : - {this.calculateTotal(uniqueItem.variants.price, shippingRate, 0)} + {this.calculateTotal(uniqueItem.variants.price, uniqueItem.shipping.rate, 0)} }
@@ -107,22 +107,21 @@ class LineItems extends Component { render() { const { uniqueItems, isExpanded, onClose } = this.props; - return (
{uniqueItems.map((uniqueItem) => { - if (!isExpanded(uniqueItem.cartItemId)) { + if (!isExpanded(uniqueItem._id)) { return ( -
{ this.renderLineItem(uniqueItem.items[0], uniqueItem.items.length) }
+
{ this.renderLineItem(uniqueItem) }
); } return ( -
+
-
diff --git a/imports/plugins/core/orders/client/containers/lineItemsContainer.js b/imports/plugins/core/orders/client/containers/lineItemsContainer.js index 0e6f39d6bed..bf55df9f552 100644 --- a/imports/plugins/core/orders/client/containers/lineItemsContainer.js +++ b/imports/plugins/core/orders/client/containers/lineItemsContainer.js @@ -73,7 +73,6 @@ class LineItemsContainer extends Component { render() { const { invoice, uniqueItems } = this.props; - return ( { if (filter.name === selectedFilterName) { selectedIndex = index; @@ -94,13 +28,19 @@ function composer(props, onData) { filter.label = i18next.t(`order.filter.${filter.name}`, { defaultValue: filter.label }); filter.i18nKeyLabel = `order.filter.${filter.name}`; - filter.count = Orders.find(OrderHelper.makeQuery(filter.name)).count(); + + if (filter.name === "new") { + filter.count = Counts.get("newOrder-count"); + } else if (filter.name === "processing") { + filter.count = Counts.get("processingOrder-count"); + } else if (filter.name === "completed") { + filter.count = Counts.get("completedOrder-count"); + } return filter; }); onData(null, { - orders, filters, selectedIndex, diff --git a/imports/plugins/core/orders/client/templates/list/summary.html b/imports/plugins/core/orders/client/templates/list/summary.html index 89c15c90b27..3e0d67a7b63 100644 --- a/imports/plugins/core/orders/client/templates/list/summary.html +++ b/imports/plugins/core/orders/client/templates/list/summary.html @@ -10,7 +10,7 @@
Sub total
-
+
{{formatPrice subtotal}}
@@ -20,7 +20,7 @@
Shipping
-
+
{{formatPrice shipping}}
@@ -31,7 +31,7 @@
Tax
-
+
{{formatPrice taxes}}
@@ -42,7 +42,7 @@
Discount
-
+
{{formatPrice discounts}}
@@ -52,7 +52,7 @@
Total
-
+
{{formatPrice total}}
diff --git a/imports/plugins/core/orders/client/templates/orders.html b/imports/plugins/core/orders/client/templates/orders.html index 0174dd37357..243ce48a690 100644 --- a/imports/plugins/core/orders/client/templates/orders.html +++ b/imports/plugins/core/orders/client/templates/orders.html @@ -1,45 +1,34 @@ - -