Skip to content

Commit

Permalink
updated toggleSessions
Browse files Browse the repository at this point in the history
#73

- [x] editable provider (cog near method title)
- [x] add additional providers ui
  • Loading branch information
aaronjudd committed Jan 24, 2015
1 parent 10011e8 commit 7ddc40e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
20 changes: 14 additions & 6 deletions packages/reaction-core/client/helpers/helpers.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,24 @@ String::toCamelCase = ->
s = s.replace(/([0-9]+)([a-zA-Z])/g, (a, b, c) ->
b + c.toUpperCase()
)
s
return s

###
# quick and easy snippet for toggling sessions
# accepts string name, see http://docs.meteor.com/#/basic/session
# optional pass positive param match
###
@toggleSession = (session_variable) ->
if Session.get(session_variable)
Session.set session_variable, false
@toggleSession = (sessionVariable, positive) ->
check sessionVariable, String
session = Session.get sessionVariable
positive = positive || true

if _.isEqual positive, session
Session.set sessionVariable, false
else
Session.set session_variable, true
return
Session.set sessionVariable, positive

return Session.get sessionVariable

###
# method to return tag specific product
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template name="settingsGeneral">
<h2>Shop<small> Settings</small></h2>
<h2>Shop <small data-18n="app.settings">Settings</small></h2>
<div class="col-md-5">
<ul class="nav nav-tabs">
<li class="active"><a href="#general" data-toggle="tab">General</a></li>
Expand Down
2 changes: 1 addition & 1 deletion packages/reaction-core/common/schemas/shipping.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ReactionCore.Schemas.Shipment = new SimpleSchema
ReactionCore.Schemas.ShippingProvider = new SimpleSchema
name:
type: String
label: "Service Name"
label: "Service Code"
label:
type: String
label: "Public Label"
Expand Down
6 changes: 4 additions & 2 deletions packages/reaction-core/private/data/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"submit": "Submit",
"delete": "Delete",
"create": "Create",
"close": "Close"
"close": "Close",
"settings": "Settings"
},
"header": {
"tagsAdd": "Add tag",
Expand Down Expand Up @@ -134,7 +135,8 @@
"checkoutShipping": {
"selectShippingOption": "Select shipping option",
"noShippingMethods": "No shipping methods are configured.",
"configureNow": "Configure now."
"configureNow": "Configure now.",
"shipping": "Shipping"
},
"shopEditForm": {
"name": "Name",
Expand Down

0 comments on commit 7ddc40e

Please sign in to comment.