Compare commits

...

47 Commits

Author SHA1 Message Date
Stefan Zermatten
be0283a342 Chrome 54 broke transitions again 2016-10-17 14:51:24 +02:00
Stefan Zermatten
e05561dcf9 Trying a different version of webcomponents 2016-10-03 14:27:57 +02:00
Stefan Zermatten
3c776ed018 added webcomponent dependency resolution 2016-10-03 14:19:48 +02:00
Stefan Zermatten
ebecb46935 Fixed drop-down bug, for now
Expect it to break again in Chrome 54
2016-10-03 14:05:30 +02:00
Stefan Zermatten
d83fe917d0 Fixed change logs version numbers 2016-09-19 10:02:25 +02:00
Stefan Zermatten
f526de88a7 Fixed invisible dropdown boxes in Chrome 52. Bumped version 2016-09-08 14:40:47 +02:00
Stefan Zermatten
55adca36d5 Added bower 2016-09-07 10:04:21 +02:00
Stefan Zermatten
be6f54e53a Added Package.json to get Scalingo working 2016-09-07 09:52:14 +02:00
Stefan Zermatten
d41c27c86d Bumped version 2016-06-03 14:49:04 +02:00
Stefan Zermatten
f4397e65ab Global update of packages 2016-06-03 14:43:11 +02:00
Stefan Zermatten
c00c69a0c7 Merge pull request #54 from ThaumRystra/fix-bug-156
closes #54
2016-05-20 09:42:25 +02:00
Robert Perce
6737983782 [#156] add "ritual" after the school in the spell detail view if the spell is, in fact, a ritual. 2016-05-13 11:40:39 -05:00
Stefan Zermatten
78441439c3 Merge pull request #52 from ThaumRystra/user-story-127
Added 'if' function for math.js to use whenever eval-ing input, closes #32
2016-05-04 07:43:21 +02:00
Robert Perce
9b72e1aea2 Added 'if' function for math.js to use whenever eval-ing input 2016-05-03 14:44:40 -05:00
Stefan Zermatten
684eca8603 Merge pull request #51 from ThaumRystra/fix-bug-163
[#163] Changed the x to a × in effectView.js
2016-05-03 11:13:32 +02:00
Stefan Zermatten
868e5f96a4 Update README.md 2016-05-03 09:03:26 +02:00
Stefan Zermatten
6fe368cde7 Updated bourbon and scss 2016-05-03 08:12:44 +02:00
Stefan Zermatten
2ffacb88e0 Included custom vulcanize package in repo 2016-05-03 07:50:12 +02:00
Stefan Zermatten
af3af0e550 Fixed missing bower dependency 2016-05-03 07:48:14 +02:00
Robert Perce
81f50d94c1 [#163] Changed the x to a × in effectView.js 2016-04-22 15:20:32 -05:00
Stefan Zermatten
49e6d51b95 Merge pull request #40 from ThaumRystra/feature-coins-inc-default
Make coins incrementable by default, closes #27
2016-03-09 14:17:23 +02:00
Stefan Zermatten
1e4e1a3b11 Merge pull request #38 from ThaumRystra/feature-base-ability-scores-10
Base ability scores default to 10, closes #36
2016-03-09 13:56:36 +02:00
Stefan Zermatten
4440c88417 Removed grouping from effects
Grouping is currently only used to differentiate effects that have the same parent, but are ambiguous as to which part of that parent they come from, like race or background. Features do not need grouped effects, because there can be no ambiguity.
2016-03-09 12:57:23 +02:00
Connor Petersen
98047ca806 Moved base-10 default to Features.js, cleaned up default Effects, and Features code to be consistent. 2016-03-07 23:21:42 -08:00
Connor Petersen
051cabc712 Cleaned up a little more 2016-03-07 22:53:27 -08:00
Connor Petersen
636fa504f1 Updated to not require caching the id or making a separate update call 2016-03-07 22:51:41 -08:00
Connor Petersen
ff9fc916f6 Added a call to adding a feature and 6 related effects to the newCharacterDialog event handler 2016-02-11 23:29:27 -08:00
Connor Petersen
2206a607b2 Added an update call to default Item adding function to update the showIncrement field to true for coins 2016-02-10 22:11:41 -08:00
Stefan Zermatten
ce224301b2 Fixed layout on chrome 49+, made character names into links 2016-02-01 09:34:22 +02:00
Stefan Zermatten
e6a9911dfc Replaced the head that was accidentally deleted 2015-11-19 12:44:11 +02:00
Stefan Zermatten
8a1871ee18 Fixed character list FAB not staying put 2015-11-19 12:43:54 +02:00
Stefan Zermatten
402f885f85 Specified thaum:vulcanize at 0.5 2015-11-18 08:52:52 +02:00
Stefan Zermatten
d07c118d47 Removed useless public items, removed Appcache, fixed vulcanize 2015-11-17 15:20:33 +02:00
Stefan Zermatten
103d44eeec Merge branch 'feature-fast-render' 2015-11-17 13:59:22 +02:00
Stefan Zermatten
33196c6771 Bumped change log 2015-11-17 13:58:50 +02:00
Stefan Zermatten
80dc862047 Added Appcache 2015-11-17 12:26:55 +02:00
Stefan Zermatten
314da14ad1 Added indexes to charId on character fields 2015-11-02 09:35:05 +02:00
Stefan Zermatten
e5dbe81ac1 Added fast render support to routes which have subscriptions
Closes #18
2015-10-13 08:22:00 +02:00
Stefan Zermatten
7e68ef64cc Merge pull request #16 from ThaumRystra/bugfix-encumberance-meter-swapping
Change character reference to be reactive based on the active, undestroyed template
2015-10-09 08:58:53 +02:00
Connor Petersen
c9d71cad52 Change character reference to be reactive based on the active, undestroyed template 2015-10-08 23:05:57 -07:00
Stefan Zermatten
d79a808c81 Bumped Version 2015-10-05 08:59:25 +02:00
Stefan Zermatten
1016c39bdf Merge branch 'fix-www-route' 2015-10-05 08:59:07 +02:00
Stefan Zermatten
5f4923e049 Added canonical URL 2015-10-05 08:57:50 +02:00
Stefan Zermatten
e83237a728 Added demeteorized to gitignore 2015-10-05 08:57:33 +02:00
Stefan Zermatten
9f323738bf Renamed custom useraccount-polymer package to be more obvious 2015-10-05 08:34:43 +02:00
Stefan Zermatten
1fc76fa50d Removed Vulcanize entirely
There is no version compatible with both Meteor 1.2 and Polymer 0.5, so screw it, clients can deal with a few ms more load time.
2015-10-05 08:34:18 +02:00
Stefan Zermatten
36d5ff0a88 Update Meteor to 1.2
This requires local copies of packages that are broken or not Polymer 0.5

Closes #15
2015-10-03 22:40:04 +02:00
109 changed files with 2165 additions and 346 deletions

View File

@@ -1,4 +1,13 @@
RPG Docs
========
This is the repo for [DiceCloud](dicecloud.com). The currently deployed version should always be the head of the master branch.
This is the repo for [DiceCloud](dicecloud.com). The currently deployed version should always be the latest release of the master branch.
Getting started
---------------
`git clone https://github.com/ThaumRystra/RPG-Docs RPG-Docs`
`cd RPG-Docs`
`cd rpg-docs`
`bower install`
`meteor`

4
rpg-docs/.gitignore vendored
View File

@@ -1,6 +1,8 @@
.meteor/local
.meteor/meteorite
.demeteorized
settings.json
public/components
nohup.out
dump
node_modules
dump

View File

@@ -6,3 +6,8 @@ notices-for-0.9.0
notices-for-0.9.1
0.9.4-platform-file
notices-for-facebook-graph-api-2
1.2.0-standard-minifiers-package
1.2.0-meteor-platform-split
1.2.0-cordova-changes
1.2.0-breaking-changes
1.3.0-split-minifiers-package

View File

@@ -1 +0,0 @@

View File

@@ -3,7 +3,7 @@
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.
meteor-platform
thaum:vulcanize@0.0.5
iron:router
accounts-password
accounts-ui
@@ -12,7 +12,6 @@ dburles:collection-helpers
reactive-var
underscore
aldeed:collection2
differential:vulcanize
matb33:collection-hooks
zimme:collection-softremovable
momentjs:moment
@@ -23,9 +22,26 @@ useraccounts:polymer
accounts-google
splendido:accounts-meld
email
fourseven:scss@2.1.1
wolves:bourbon
meteorhacks:subs-manager
meteorhacks:kadira
chuangbo:marked
reywood:iron-router-ga
meteor-base
mobile-experience
mongo
blaze-html-templates
session
jquery
tracker
logging
reload
ejson
spacebars
check
useraccounts:iron-routing
wizonesolutions:canonical
meteorhacks:fast-render
fourseven:scss
wolves:bourbon
standard-minifier-css
standard-minifier-js

View File

@@ -1 +1 @@
METEOR@1.1.0.2
METEOR@1.3.2.4

View File

@@ -1,96 +1,131 @@
accounts-base@1.2.0
accounts-google@1.0.4
accounts-oauth@1.1.5
accounts-password@1.1.1
accounts-ui@1.1.5
accounts-ui-unstyled@1.1.7
aldeed:collection2@2.3.3
aldeed:simple-schema@1.3.3
autoupdate@1.2.1
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
check@1.0.5
chuangbo:marked@0.3.5
coffeescript@1.0.6
dburles:collection-helpers@1.0.3
dburles:mongo-collection-instances@0.3.3
ddp@1.1.0
deps@1.0.7
differential:vulcanize@0.0.5
accounts-base@1.2.7
accounts-google@1.0.9
accounts-oauth@1.1.12
accounts-password@1.1.8
accounts-ui@1.1.9
accounts-ui-unstyled@1.1.12
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-html-templates@1.0.4
blaze-tools@1.0.8
boilerplate-generator@1.0.8
caching-compiler@1.0.4
caching-html-compiler@1.0.6
callback-hook@1.0.8
check@1.2.1
chuangbo:cookie@1.1.0
chuangbo:marked@0.3.5_1
coffeescript@1.0.17
dburles:collection-helpers@1.0.4
dburles:mongo-collection-instances@0.3.5
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
deps@1.0.12
diff-sequence@1.0.5
ecmascript@0.4.3
ecmascript-runtime@0.2.10
ecwyne:mathjs@0.25.0
ejson@1.0.6
email@1.0.6
fastclick@1.0.3
fourseven:scss@2.1.1
geojson-utils@1.0.3
google@1.1.5
html-tools@1.0.4
htmljs@1.0.4
http@1.1.0
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
lai:collection-extensions@0.1.3
launch-screen@1.0.2
less@1.0.14
livedata@1.0.13
localstorage@1.0.3
logging@1.0.7
matb33:collection-hooks@0.7.13
meteor@1.1.6
meteor-platform@1.2.2
meteorhacks:kadira@2.21.0
meteorhacks:meteorx@1.3.1
meteorhacks:subs-manager@1.3.0
minifiers@1.1.5
minimongo@1.0.8
mobile-status-bar@1.0.3
momentjs:moment@2.10.3
mongo@1.1.0
mongo-livedata@1.0.8
npm-bcrypt@0.7.8_2
oauth@1.1.4
oauth2@1.1.3
observe-sequence@1.0.6
ordered-dict@1.0.3
percolate:migrations@0.7.5
random@1.0.3
reactive-dict@1.1.0
reactive-var@1.0.5
reload@1.1.3
retry@1.0.3
reywood:iron-router-ga@0.6.0
routepolicy@1.0.5
service-configuration@1.0.4
session@1.1.0
sha@1.0.3
softwarerero:accounts-t9n@1.0.9
spacebars@1.0.6
spacebars-compiler@1.0.6
ejson@1.0.11
email@1.0.12
fastclick@1.0.11
fourseven:scss@3.4.3
geojson-utils@1.0.8
google@1.1.11
hot-code-push@1.0.4
html-tools@1.0.9
htmljs@1.0.9
http@1.1.5
id-map@1.0.7
iron:controller@1.0.12
iron:core@1.0.11
iron:dynamic-template@1.0.12
iron:layout@1.0.12
iron:location@1.0.11
iron:middleware-stack@1.1.0
iron:router@1.0.12
iron:url@1.0.11
jquery@1.11.8
lai:collection-extensions@0.2.1_1
launch-screen@1.0.11
less@2.6.0
livedata@1.0.18
localstorage@1.0.9
logging@1.0.12
matb33:collection-hooks@0.8.1
mdg:validation-error@0.2.0
meteor@1.1.14
meteor-base@1.0.4
meteorhacks:fast-render@2.14.0
meteorhacks:inject-data@2.0.0
meteorhacks:kadira@2.28.7
meteorhacks:meteorx@1.4.1
meteorhacks:picker@1.0.3
meteorhacks:subs-manager@1.6.4
minifier-css@1.1.11
minifier-js@1.1.11
minimongo@1.0.16
mobile-experience@1.0.4
mobile-status-bar@1.0.12
modules@0.6.1
modules-runtime@0.6.3
momentjs:moment@2.13.1
mongo@1.1.7
mongo-id@1.0.4
mongo-livedata@1.0.12
npm-bcrypt@0.8.5
npm-mongo@1.4.43
oauth@1.1.10
oauth2@1.1.9
observe-sequence@1.0.11
ordered-dict@1.0.7
percolate:migrations@0.9.8
promise@0.6.7
raix:eventemitter@0.1.3
random@1.0.9
rate-limit@1.0.4
reactive-dict@1.1.7
reactive-var@1.0.9
reload@1.1.8
retry@1.0.7
reywood:iron-router-ga@0.7.1
routepolicy@1.0.10
service-configuration@1.0.9
session@1.1.5
sha@1.0.7
softwarerero:accounts-t9n@1.3.4
spacebars@1.0.11
spacebars-compiler@1.0.11
splendido:accounts-emails-field@1.2.0
splendido:accounts-meld@1.3.0
srp@1.0.3
templating@1.1.1
tracker@1.0.7
ui@1.0.6
underscore@1.0.3
url@1.0.4
useraccounts:core@1.9.1
useraccounts:polymer@1.9.1
webapp@1.2.0
webapp-hashing@1.0.3
wolves:bourbon@1.0.0
zimme:collection-behaviours@1.0.4
zimme:collection-softremovable@1.0.4
splendido:accounts-meld@1.3.1
srp@1.0.8
standard-minifier-css@1.0.6
standard-minifier-js@1.0.6
templating@1.1.9
templating-tools@1.0.4
thaum:vulcanize@0.0.5
tracker@1.0.13
ui@1.0.11
underscore@1.0.8
url@1.0.9
useraccounts:core@1.14.2
useraccounts:iron-routing@1.14.2
useraccounts:polymer@1.12.3
webapp@1.2.8
webapp-hashing@1.0.9
wizonesolutions:canonical@0.0.5
wolves:bourbon@3.1.0
zimme:collection-behaviours@1.1.3
zimme:collection-softremovable@1.0.5

View File

@@ -7,6 +7,7 @@ Schemas.Action = new SimpleSchema({
charId: {
type: String,
regEx: SimpleSchema.RegEx.Id,
index: 1,
},
name: {
type: String,

View File

@@ -7,6 +7,7 @@ Schemas.Attack = new SimpleSchema({
charId: {
type: String,
regEx: SimpleSchema.RegEx.Id,
index: 1,
},
name: {
type: String,

View File

@@ -4,6 +4,7 @@ Schemas.Buff = new SimpleSchema({
charId: {
type: String,
regEx: SimpleSchema.RegEx.Id,
index: 1,
},
name: {
type: String,

View File

@@ -1,7 +1,7 @@
Classes = new Mongo.Collection("classes");
Schemas.Class = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
name: {type: String, trim: false},
level: {type: Number},
createdAt: {

View File

@@ -8,6 +8,7 @@ Schemas.Effect = new SimpleSchema({
charId: {
type: String,
regEx: SimpleSchema.RegEx.Id,
index: 1,
},
name: {
type: String,
@@ -58,71 +59,74 @@ Schemas.Effect = new SimpleSchema({
Effects.attachSchema(Schemas.Effect);
if (Meteor.isServer) Characters.after.insert(function(userId, char) {
Effects.insert({
charId: char._id,
name: "Constitution modifier for each level",
stat: "hitPoints",
operation: "add",
calculation: "level * constitutionMod",
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
Effects.insert({
charId: char._id,
name: "Proficiency bonus by level",
stat: "proficiencyBonus",
operation: "add",
calculation: "floor(level / 4 + 1.75)",
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
Effects.insert({
charId: char._id,
name: "Dexterity Armor Bonus",
stat: "armor",
operation: "add",
calculation: "dexterityArmor",
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
Effects.insert({
charId: char._id,
name: "Natural Armor",
stat: "armor",
operation: "base",
value: 10,
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
Effects.insert({
charId: char._id,
name: "Natural Carrying Capacity",
stat: "carryMultiplier",
operation: "base",
value: "1",
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
});
Effects.attachBehaviour("softRemovable");
makeChild(Effects, ["enabled"]); //children of lots of things
Effects.allow(CHARACTER_SUBSCHEMA_ALLOW);
Effects.deny(CHARACTER_SUBSCHEMA_DENY);
//give characters default character effects
Characters.after.insert(function(userId, char) {
if (Meteor.isServer) {
Effects.insert({
charId: char._id,
name: "Constitution modifier for each level",
stat: "hitPoints",
operation: "add",
calculation: "level * constitutionMod",
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
Effects.insert({
charId: char._id,
name: "Proficiency bonus by level",
stat: "proficiencyBonus",
operation: "add",
calculation: "floor(level / 4 + 1.75)",
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
Effects.insert({
charId: char._id,
name: "Dexterity Armor Bonus",
stat: "armor",
operation: "add",
calculation: "dexterityArmor",
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
Effects.insert({
charId: char._id,
name: "Natural Armor",
stat: "armor",
operation: "base",
value: 10,
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
Effects.insert({
charId: char._id,
name: "Natural Carrying Capacity",
stat: "carryMultiplier",
operation: "base",
value: "1",
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
}
});

View File

@@ -1,7 +1,7 @@
Experiences = new Mongo.Collection("experience");
Schemas.Experience = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
name: {type: String, defaultValue: "New Experience", trim: false},
description: {type: String, optional: true, trim: false},
value: {type: Number, defaultValue: 0},

View File

@@ -1,7 +1,7 @@
Features = new Mongo.Collection("features");
Schemas.Feature = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
name: {type: String, trim: false},
description: {type: String, optional: true, trim: false},
uses: {type: String, optional: true, trim: false},
@@ -35,3 +35,81 @@ makeParent(Features, ["name", "enabled"]); //parents of effects and attacks
Features.allow(CHARACTER_SUBSCHEMA_ALLOW);
Features.deny(CHARACTER_SUBSCHEMA_DENY);
//give characters default feature of base ability scores of 10
Characters.after.insert(function(userId, char) {
if (Meteor.isServer){
var featureId = Features.insert({
name: "Base Ability Scores",
charId: char._id,
enabled: true,
alwaysEnabled: true,
});
Effects.insert({
stat: "strength",
charId: char._id,
parent: {
id: featureId,
collection: "Features",
},
operation: "base",
value: 10,
enabled: true,
});
Effects.insert({
stat: "dexterity",
charId: char._id,
parent: {
id: featureId,
collection: "Features",
},
operation: "base",
value: 10,
enabled: true,
});
Effects.insert({
stat: "constitution",
charId: char._id,
parent: {
id: featureId,
collection: "Features",
},
operation: "base",
value: 10,
enabled: true,
});
Effects.insert({
stat: "intelligence",
charId: char._id,
parent: {
id: featureId,
collection: "Features",
},
operation: "base",
value: 10,
enabled: true,
});
Effects.insert({
stat: "wisdom",
charId: char._id,
parent: {
id: featureId,
collection: "Features",
},
operation: "base",
value: 10,
enabled: true,
});
Effects.insert({
stat: "charisma",
charId: char._id,
parent: {
id: featureId,
collection: "Features",
},
operation: "base",
value: 10,
enabled: true,
});
}
});

View File

@@ -1,7 +1,7 @@
Notes = new Mongo.Collection("notes");
Schemas.Note = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
name: {type: String, trim: false},
description: {type: String, optional: true, trim: false},
color: {

View File

@@ -4,6 +4,7 @@ Schemas.Proficiency = new SimpleSchema({
charId: {
type: String,
regEx: SimpleSchema.RegEx.Id,
index: 1,
},
name: {
type: String,

View File

@@ -1,7 +1,7 @@
SpellLists = new Mongo.Collection("spellLists");
Schemas.SpellLists = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
name: {type: String, trim: false},
description: {type: String, optional: true, trim: false},
saveDC: {type: String, optional: true, trim: false},

View File

@@ -1,7 +1,7 @@
Spells = new Mongo.Collection("spells");
Schemas.Spell = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
prepared: {
type: String,
defaultValue: "prepared",

View File

@@ -1,7 +1,7 @@
TemporaryHitPoints = new Mongo.Collection("temporaryHitPoints");
Schemas.TemporaryHitPoints = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
name: {type: String, optional: true},
maximum: {type: Number, defaultValue: 0, min: 0, max: 500},
used: {type: Number, defaultValue: 0, min: 0, max: 500},

View File

@@ -3,7 +3,7 @@ Containers = new Mongo.Collection("containers");
Schemas.Container = new SimpleSchema({
name: {type: String, trim: false},
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
isCarried: {type: Boolean},
weight: {type: Number, min: 0, defaultValue: 0, decimal: true},
value: {type: Number, min: 0, defaultValue: 0, decimal: true},

View File

@@ -4,7 +4,7 @@ Schemas.Item = new SimpleSchema({
name: {type: String, defaultValue: "New Item", trim: false},
plural: {type: String, optional: true, trim: false},
description:{type: String, optional: true, trim: false},
charId: {type: String, regEx: SimpleSchema.RegEx.Id}, //id of owner
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1}, //id of owner
quantity: {type: Number, min: 0, defaultValue: 1},
weight: {type: Number, min: 0, defaultValue: 0, decimal: true},
value: {type: Number, min: 0, defaultValue: 0, decimal: true},
@@ -228,6 +228,9 @@ Characters.after.insert(function(userId, char) {
id: containerId,
collection: "Containers",
},
settings: {
showIncrement: true,
},
});
Items.insert({
name: "Silver piece",
@@ -241,6 +244,9 @@ Characters.after.insert(function(userId, char) {
id: containerId,
collection: "Containers",
},
settings: {
showIncrement: true,
},
});
Items.insert({
name: "Copper piece",
@@ -254,6 +260,9 @@ Characters.after.insert(function(userId, char) {
id: containerId,
collection: "Containers",
},
settings: {
showIncrement: true,
},
});
}
});

View File

@@ -34,6 +34,7 @@ Router.map(function() {
onAfterAction: function() {
document.title = appName;
},
fastRender: true,
});
this.route("characterSheet", {
@@ -63,6 +64,7 @@ Router.map(function() {
window.ga && window.ga("send", "pageview", "/character");
this.next();
},
fastRender: true,
});
this.route("loading", {
@@ -91,6 +93,7 @@ Router.map(function() {
onAfterAction: function() {
document.title = appName;
},
fastRender: true,
});
this.route("/guide", {

View File

@@ -2,7 +2,9 @@
"name": "RPG Docs",
"version": "0.0.0",
"homepage": "",
"authors": ["Stefan Zermatten"],
"authors": [
"Stefan Zermatten"
],
"license": "none",
"private": true,
"ignore": [
@@ -15,11 +17,10 @@
"dependencies": {
"polymer": "Polymer/polymer#~0.5.5",
"core-elements": "Polymer/core-elements#~0.5.5",
"paper-elements": "Polymer/paper-elements#~0.5.5"
"paper-elements": "Polymer/paper-elements#~0.5.5",
"paper-fab-menu": "cwdoh/paper-fab-menu#~0.4.0"
},
"resolutions": {
"core-component-page": "^0.5.0",
"polymer": "^0.5.0",
"webcomponentsjs": "^0.5.0"
"webcomponentsjs": "0.6.3"
}
}
}

View File

@@ -1,4 +1,4 @@
@import "bourbon/bourbon";
@import "{wolves:bourbon}/bourbon";
$thickColumnWidth: 304px;
$thinColumnWidth: 240px;

View File

@@ -1,4 +1,4 @@
@import "bourbon/bourbon";
@import "{wolves:bourbon}/bourbon";
@import "colors";
//apply a natural box layout model to all elements
@@ -48,7 +48,7 @@ hr {
//FABs
.floatyButton {
position: absolute;
position: fixed;
bottom: 24px;
right: 24px;
}

View File

@@ -18,3 +18,7 @@
body /deep/ core-menu {
overflow-x: hidden !important;
}
html /deep/ paper-dropdown {
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.37);
}

View File

@@ -99,7 +99,7 @@ var operations = {
base: {name: "Base Value: "},
proficiency: {name: "Proficiency"},
add: {name: "+"},
mul: {name: "x"},
mul: {name: "×"},
min: {name: "Min: "},
max: {name: "Max: "},
advantage: {name: "Advantage"},

View File

@@ -24,7 +24,7 @@ Template.carryCapacityBar.onCreated(function() {
var self = this;
self.carriedFraction = new ReactiveVar(0);
self.autorun(function() {
self.carriedFraction.set(getFractionCarried(self.data));
self.carriedFraction.set(getFractionCarried(Template.currentData()));
});
});

View File

@@ -10,7 +10,7 @@
<template name="spellDetails">
<div class="body2">
Level {{level}} {{school}}, {{preparedString}}
Level {{level}} {{school}} {{#if ritual}}ritual{{/if}}, {{preparedString}}
</div>
<div style="margin: 16px 0 16px 0;">
{{#if castingTime}}
@@ -136,4 +136,4 @@
</paper-autogrow-textarea>
</paper-input-decorator>
{{> attackEditList parentId=_id parentCollection="Spells" charId=charId enabled=true name=name}}
</template>
</template>

View File

@@ -6,6 +6,7 @@
padding: 8px 0 8px 16px;
text-overflow: ellipsis;
white-space: nowrap;
text-decoration: none;
}
.singleLineItem core-icon {
@@ -19,4 +20,4 @@
/* Required for text-overflow to do anything */
white-space: nowrap;
overflow: hidden;
}
}

View File

@@ -3,11 +3,12 @@
{{#if characters.count}}
<div>
{{#each characters}}
<div class="singleLineItem characterRepresentative"
<a href={{pathFor route="characterSheet" data=this}}
class="singleLineItem characterRepresentative"
layout horizontal center>
<core-icon icon="image:brightness-1"></core-icon>
<div>{{name}}</div>
</div>
</a>
{{/each}}
</div>
{{/if}}

View File

@@ -23,7 +23,7 @@ Template.characterSideList.helpers({
Template.characterSideList.events({
"tap .singleLineItem": function(event, instance) {
Router.go("characterSheet", {_id: this._id});
//Router.go("characterSheet", {_id: this._id});
$("core-drawer-panel").get(0).closeDrawer();
},
"tap core-item": function() {

View File

@@ -15,3 +15,11 @@
#navPanel {
padding: 16px;
}
.layout > core-header-panel {
height: 100%;
}
.layout > core-animated-pages {
height: 100%;
}

View File

@@ -1,5 +1,5 @@
<template name="layout">
<core-drawer-panel responsiveWidth="905px">
<core-drawer-panel class="layout" responsiveWidth="905px">
<core-header-panel drawer navigation flex mode="seamed" class="white">
<div id="accountSummary">
{{#if currentUser}}
@@ -19,9 +19,9 @@
<core-item id="changeLog" icon="list" label="Change Log"></core-item>
</div>
</core-header-panel>
<core-animated-pages main
navigation
detail-pages
<core-animated-pages main
navigation
detail-pages
transitions="hero-transition cross-fade"
selected={{globalDetailSelected}}>
<section id="mainContentSection" class={{notSelected}}>
@@ -66,4 +66,4 @@
</div>
{{/if}}
</paper-toast>
</template>
</template>

View File

@@ -20,7 +20,6 @@
<link rel="import" href="/components/paper-dialog/paper-action-dialog.html">
<link rel="import" href="/components/paper-dialog/paper-dialog.html">
<link rel="import" href="/components/paper-dialog/paper-dialog-transition.html">
<link rel="import" href="/components/paper-dropdown/paper-dropdown.html">
<link rel="import" href="/components/paper-fab/paper-fab.html">
<link rel="import" href="/components/paper-fab-menu/paper-fab-menu.html">
<link rel="import" href="/components/paper-icon-button/paper-icon-button.html">
@@ -40,5 +39,5 @@
<!--custom components-->
<link rel="import" href="/custom_components/paper-dropdown-menu/paper-dropdown-menu.html">
<link rel="import" href="/custom_components/paper-dropdown/paper-dropdown.html">
<link rel="import" href="/custom_components/paper-diff-slider/paper-diff-slider.html">
<link rel="import" href="/custom_components/swipe-detect/swipe-detect.html">

View File

@@ -1,4 +1,4 @@
@import "bourbon/bourbon";
@import "{wolves:bourbon}/bourbon";
.mini-holder {
position: absolute;
@@ -43,4 +43,3 @@
@include transform(rotate(405deg));
}
}

45
rpg-docs/config.vulcanize Normal file
View File

@@ -0,0 +1,45 @@
{
"imports": [
"/custom_components/paper-dropdown/paper-dropdown.html",
"/custom_components/paper-dropdown-menu/paper-dropdown-menu.html",
"/custom_components/paper-diff-slider/paper-diff-slider.html",
"/custom_components/swipe-detect/swipe-detect.html",
"/components/core-animated-pages/core-animated-pages.html",
"/components/core-animated-pages/transitions/cross-fade.html",
"/components/core-animated-pages/transitions/hero-transition.html",
"/components/core-animated-pages/transitions/slide-from-right.html",
"/components/core-icons/av-icons.html",
"/components/core-icons/core-icons.html",
"/components/core-icons/editor-icons.html",
"/components/core-icons/image-icons.html",
"/components/core-icons/social-icons.html",
"/components/core-image/core-image.html",
"/components/core-item/core-item.html",
"/components/core-menu/core-menu.html",
"/components/core-scaffold/core-scaffold.html",
"/components/core-transition/core-transition.html",
"/components/paper-button/paper-button.html",
"/components/paper-checkbox/paper-checkbox.html",
"/components/paper-dialog/paper-action-dialog.html",
"/components/paper-dialog/paper-dialog.html",
"/components/paper-dialog/paper-dialog-transition.html",
"/components/paper-fab/paper-fab.html",
"/components/paper-fab-menu/paper-fab-menu.html",
"/components/paper-icon-button/paper-icon-button.html",
"/components/paper-input/paper-autogrow-textarea.html",
"/components/paper-input/paper-input.html",
"/components/paper-input/paper-input-decorator.html",
"/components/paper-item/paper-item.html",
"/components/paper-menu-button/paper-menu-button.html",
"/components/paper-radio-button/paper-radio-button.html",
"/components/paper-radio-group/paper-radio-group.html",
"/components/paper-shadow/paper-shadow.html",
"/components/paper-spinner/paper-spinner.html",
"/components/paper-slider/paper-slider.html",
"/components/paper-tabs/paper-tabs.html",
"/components/paper-toast/paper-toast.html",
"/components/paper-toggle-button/paper-toggle-button.html"
]
}

View File

@@ -1,3 +1,12 @@
// if we want to add more functions, consider pulling out into its own file
(function() {
math.import({
"if": function(pred, a, b) {
return (!!(pred)) ? a : b;
}
});
})();
//evaluates a calculation string
evaluate = function(charId, string){
if (!string) return string;

16
rpg-docs/package.json Normal file
View File

@@ -0,0 +1,16 @@
{
"name": "rpg-docs",
"version": "0.10.0",
"description": "Unofficial Online Realtime D&D 5e App",
"scripts": {
"postinstall": "bower install"
},
"repository": {
"type": "git",
"url": "https://github.com/ThaumRystra/RPG-Docs"
},
"author": "Stefan Zermatten",
"dependencies": {
"bower": "^1.7.9"
}
}

View File

@@ -0,0 +1 @@
.npm

View File

@@ -0,0 +1,3 @@
differential:vulcanize@0.0.5
meteor@1.1.6
underscore@1.0.3

View File

@@ -0,0 +1,29 @@
Vulcanize
==============================================================================
This package a meteor build plugin that wraps the [vulcanize](https://www.npmjs.com/package/vulcanize) npm package, which is used to process web components into a single output file.
### Usage
1. Ensure all your components are located somewhere under your public directory.
2. Include an `imports.html` file anywhere available to the client, that contains the html imports that would normally go inside your `<head>` tag.
````
<!-- Core Components -->
<link rel="import" href="/components/core-animation/core-animation.html">
<link rel="import" href="/components/core-animated-pages/core-animated-pages.html">
<link rel="import" href="/components/core-animated-pages/transitions/slide-from-right.html">
<link rel="import" href="/components/core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="/components/core-pages/core-pages.html">
...
<!-- Paper Components -->
<link rel="import" href="/components/paper-dialog/paper-action-dialog.html">
<link rel="import" href="/components/paper-dialog/paper-dialog-transition.html">
<link rel="import" href="/components/paper-input/paper-input.html">
...
````
- Running your app in development as usual will result in the contents of `imports.html` being added to your `<head>` tag, resulting in multiple subsequent HTTP requests (good in development - debugging).
- Running `meteor`, `meteor build`, `modulus deploy`, etc with the `VULCANIZE=true` environment variable set will result in all your html imports being vulcanized or concatenated into a single html import (good in production). The resulting file will be called `vulcanized.html`, which will be automatically added to your `<head>` tag. For example, `VULCANIZE=true meteor`, `VULCANIZE=true modulus deploy`.
- Setting the `CDN_PREFIX` environment variable will prepend the string to the beginning of the file path that is inserted into your HTML's `<head>` tag.

View File

@@ -0,0 +1,15 @@
Package.describe({
name: 'thaum:vulcanize',
summary: 'Vulcanize',
version: '0.0.5',
git: 'https://github.com/Differential/meteor-vulcanize'
});
Package.registerBuildPlugin({
name: 'vulcanize',
use: [],
sources: [
'vulcanize.js'
],
npmDependencies: {'vulcanize': '0.7.11'}
});

View File

@@ -0,0 +1,20 @@
{
"dependencies": [
[
"meteor",
"1.1.3"
],
[
"underscore",
"1.0.1"
]
],
"pluginDependencies": [
[
"vulcanize",
{}
]
],
"toolVersion": "meteor-tool@1.0.35",
"format": "1.0"
}

View File

@@ -0,0 +1,5 @@
// Write your tests here!
// Here is an example.
Tinytest.add('example', function (test) {
test.equal(true, true);
});

View File

@@ -0,0 +1,70 @@
var vulcan = Npm.require('vulcanize');
var crypto = Npm.require('crypto');
var url = Npm.require('url');
var _ = Npm.require('underscore');
var handler = function(compileStep) {
var importsHtml = compileStep.read().toString('utf8');
if (process.env.VULCANIZE) {
log('Vulcanizing imports...');
vulcanize(compileStep, importsHtml);
} else {
log('Adding all imports...');
addImports(compileStep, importsHtml);
}
};
var vulcanize = function(compileStep, importsHtml) {
var vulcanOutputHandler = function(filename, data) {
var filenameHash = crypto.createHash('md5').update(data).digest('hex');
var filePath = '/vulcanized-' + filenameHash + '.html';
compileStep.addAsset({
path: filePath,
data: data
});
if (_.isString(process.env.CDN_PREFIX)) {
filePath = url.resolve(process.env.CDN_PREFIX, filePath);
}
compileStep.addHtml({
section: 'head',
data: '<link rel="import" href="' + filePath + '">'
});
};
vulcan.setOptions({
inputSrc: importsHtml,
outputHandler: vulcanOutputHandler,
abspath: 'public',
strip: true
}, function(error) {
if (error) {
log(error);
} else {
vulcan.processDocument();
}
});
};
var addImports = function(compileStep, importsHtml) {
compileStep.addHtml({
section: 'head',
data: importsHtml
});
};
var log = function() {
args = _.values(arguments);
args.unshift("Vulcanize:");
console.log.apply(this, args);
};
Plugin.registerSourceHandler("imports.html", handler);

View File

@@ -0,0 +1,8 @@
sudo: required
language: node_js
node_js:
- "0.10"
before_install:
- "curl -L http://git.io/ejPSng | /bin/sh"
env:
- TEST_COMMAND=meteor

View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014 splendido
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,48 @@
[![Build Status](https://travis-ci.org/meteor-useraccounts/polymer.svg?branch=master)](https://travis-ci.org/meteor-useraccounts/polymer)
useraccounts:polymer
=====================================
WORK IN PROGRESS - let us know about any problem you might encounter ;)
## TODOs
Add the following input types:
- checkbox input
- select input
- radio input
Find the proper solution for inheriting AT events for paper-button elements
This package depends on [useraccounts:core](https://atmospherejs.com/useraccounts/core)
Learn more [here](http://useraccounts.meteor.com) or have a look at the full [documentation](https://github.com/meteor-useraccounts/core).
## Bring Your Own Polymer
Adding this package with `meteor add useraccounts:polymer` does not add any other packages providing Polymer .This is to let you choose the flavour you prefer! Or using an Atmosphere package, or straight up with bower!
## ADD theses imports manually
This package does not automatically add the imports for the elements needed. If you don't have them imported already you should copy/paste these imports :
```HTML
<link rel="import" href="bower_components/paper-input/paper-input.html">
<link rel="import" href="bower_components/paper-button/paper-button.html">
<link rel="import" href="bower_components/paper-checkbox/paper-checkbox.html">
```
## Contributing
Anyone is welcome to contribute. Fork, make your changes, and then submit a pull request.
Thanks to all those who have contributed code changes to [this package](https://github.com/meteor-useraccounts/unstyled/graphs/contributors) as well as to the [core package](https://github.com/meteor-useraccounts/core/graphs/contributors) and all who have helped by submitting bug reports and feature ideas.

View File

@@ -0,0 +1,7 @@
<template name="atError">
<div class="at-error" horizontal center-justified layout>
{{#each error}}
<p>{{errorText}}</p>
{{/each}}
</div>
</template>

View File

@@ -0,0 +1,2 @@
// Simply 'inherites' helpers from AccountsTemplates
Template.atError.helpers(AccountsTemplates.atErrorHelpers);

View File

@@ -0,0 +1,39 @@
<template name="atForm">
{{#unless hide}}
<div class="at-form">
{{#if showTitle}}
{{> atTitle}}
{{/if}}
{{#if showOauthServices}}
{{> atOauth}}
{{/if}}
{{#if showServicesSeparator}}
{{> atSep}}
{{/if}}
{{#if showError}}
{{> atError}}
{{/if}}
{{#if showResult}}
{{> atResult}}
{{/if}}
{{#if showMessage}}
{{> atMessage}}
{{/if}}
{{#if showPwdForm}}
{{> atPwdForm}}
{{/if}}
{{#if showTermsLink}}
{{> atTermsLink}}
{{/if}}
{{#if showSignInLink}}
{{> atSigninLink}}
{{/if}}
{{#if showSignUpLink}}
{{> atSignupLink}}
{{/if}}
{{#if showResendVerificationEmailLink}}
{{> atResendVerificationEmailLink}}
{{/if}}
</div>
{{/unless}}
</template>

View File

@@ -0,0 +1,2 @@
// Simply 'inherites' helpers from AccountsTemplates
Template.atForm.helpers(AccountsTemplates.atFormHelpers);

View File

@@ -0,0 +1,81 @@
<template name="atInput">
{{> Template.dynamic template=templateName}}
</template>
<template name="atTextInput">
<div class="at-input pure-control-group{{#if isValidating}}validating{{/if}} {{#if hasError}}has-error{{/if}} {{#if hasSuccess}}has-success{{/if}} {{#if feedback}}has-feedback{{/if}}">
<!-- {{#if showLabels}}
<label for="at-field-{{_id}}">
{{displayName}} {{#unless required}}{{optionalText}}{{/unless}}
</label>
{{/if}}
<input type="{{type}}" id="at-field-{{_id}}" name="at-field-{{_id}}" placeholder="{{placeholder}}" autocapitalize="none" autocorrect="off">
{{#if hasIcon}}
<span class="{{iconClass}}"></span>
{{/if}}
{{#if hasError}}
<span>{{errorText}}</span>
{{/if}}
</div> -->
{{#if showLabels}}
<paper-input-decorator label=" {{displayName}} {{#unless required}}{{optionalText}}{{/unless}}" error="{{errorText}}" floatinglabel="" layout="" vertical="" isInvalid="{{#if hasError}} true {{/if}}">
<input type="{{type}}" id="at-field-{{_id}}" is="core-input" name="at-field-{{_id}}" placeholder="{{placeholder}}" autocapitalize="none" autocorrect="off">
</paper-input-decorator>
{{else}}
<paper-input-decorator error="{{errorText}}" isInvalid="{{#if hasError}} true {{/if}}">
<input type="{{type}}" id="at-field-{{_id}}" is="core-input" name="at-field-{{_id}}" placeholder="{{placeholder}}" autocapitalize="none" autocorrect="off">
</paper-input-decorator>
{{/if}}
{{#if hasIcon}}
<core-icon icon="{{iconClass}}"></core-icon>
{{/if}}
</div>
</template>
<template name="atCheckboxInput">
<div class="at-input">
<core-label horizontal layout>
<div flex>{{displayName}}</div>
<paper-checkbox type="{{type}}" id="at-field-{{_id}}" name="at-field-{{_id}}" {{disabled}} for></paper-checkbox>
</core-label>
</div>
</template>
<template name="atSelectInput">
<div class="at-input">
<core-label>
<div for="at-field-{{_id}}">{{displayName}}</div>
<core-selector id="at-field-{{_id}}" name="at-field-{{_id}}" valueattr="value" for horizontal layout center justified>
{{#each values}}
<div value="{{value}}">{{text}}</div>
{{/each}}
</core-selector>
</core-label>
</div>
</template>
<template name="atRadioInput">
<div class="at-input">
<label>{{displayName}}</label>
</div>
<paper-radio-group role="radiogroup" vertical layout>
{{#each values}}
<paper-radio-button id="at-field-{{id}}-choice-{{value}}" name="t-field-{{id}}" label="{{text}}" value={{value}} toggles role="radio" tabindex="0" aria-checked="true" aria-label="{{text}}" class="core-selected"></paper-radio-button>
{{/each}}
</paper-radio-group>
</template>
<template name="atHiddenInput">
<input type="hidden" id="at-field-{{_id}}" name="at-field-{{_id}}">
</template>

View File

@@ -0,0 +1,25 @@
_.each(AccountsTemplates.atInputRendered, function(callback){
Template.atInput.onRendered(callback);
Template.atHiddenInput.onRendered(callback);
});
// Simply 'inherites' helpers from AccountsTemplates
Template.atInput.helpers(AccountsTemplates.atInputHelpers);
// Simply 'inherites' events from AccountsTemplates
Template.atInput.events(AccountsTemplates.atInputEvents);
// Simply 'inherites' helpers from AccountsTemplates
Template.atTextInput.helpers(AccountsTemplates.atInputHelpers);
// Simply 'inherites' helpers from AccountsTemplates
Template.atCheckboxInput.helpers(AccountsTemplates.atInputHelpers);
// Simply 'inherites' helpers from AccountsTemplates
Template.atSelectInput.helpers(AccountsTemplates.atInputHelpers);
// Simply 'inherites' helpers from AccountsTemplates
Template.atRadioInput.helpers(AccountsTemplates.atInputHelpers);
// Simply 'inherites' helpers from AccountsTemplates
Template.atHiddenInput.helpers(AccountsTemplates.atInputHelpers);

View File

@@ -0,0 +1,5 @@
<template name="atMessage">
<div class="at-message">
{{message}}
</div>
</template>

View File

@@ -0,0 +1,2 @@
// Simply 'inherites' helpers from AccountsTemplates
Template.atMessage.helpers(AccountsTemplates.atMessageHelpers);

View File

@@ -0,0 +1,4 @@
<template name="atNavButton">
<!-- <a id="at-nav-button">{{text}}</a> -->
<paper-button id="at-nav-button" raised>{{text}}</paper-button>
</template>

View File

@@ -0,0 +1,5 @@
// Simply 'inherites' helpers from AccountsTemplates
Template.atNavButton.helpers(AccountsTemplates.atNavButtonHelpers);
// Simply 'inherites' events from AccountsTemplates
Template.atNavButton.events(AccountsTemplates.atNavButtonEvents);

View File

@@ -0,0 +1,7 @@
<template name="atOauth">
<div class="at-oauth" horizontal center-justified layout>
{{#each oauthService}}
{{> atSocial}}
{{/each}}
</div>
</template>

View File

@@ -0,0 +1,2 @@
// Simply 'inherites' helpers from AccountsTemplates
Template.atOauth.helpers(AccountsTemplates.atOauthHelpers);

View File

@@ -0,0 +1,168 @@
.fullPageAtForm {
margin: 0 auto;
}
.at-form {
float: none;
margin: auto;
overflow: auto;
margin-top: 20px;
margin-bottom: 20px;
border-radius: 10px;
padding: 15px;
}
.at-form p {
font-size: 15px;
line-height: 20px;
}
.at-title h3 {
margin-top: 0px;
margin-bottom: 10px;
font-size: 18px;
font-weight: 800;
text-align: center;
}
.at-link.disabled {
color: #444;
}
.at-signin-link {
margin-top: 20px;
margin-bottom: 30px;
text-align: center;
}
.at-error,
.at-result {
text-align: center;
}
.at-error {
background-color: #FFF0F0;
}
.at-error p {
width: 100%;
color: #A94442;
}
.at-oauth {
margin-top: 10px;
}
.at-btn {
display: block;
width: 100%;
}
paper-button.at-social-btn {
display: block;
width: 100%;
margin: auto;
margin-bottom: 10px;
padding: 8px 10px;
border-radius: 5px;
font-size: 16px;
}
paper-button.at-social-btn core-icon {
float: left;
width: 40px;
font-size: 20px;
margin-top: 1px;
padding-right: 15px;
padding-left: 5px;
border-right: 1px solid rgba(0, 0, 0, 0.2);
}
paper-button.at-social-btn#at-facebook {
background: #3B5998;
color: #fff;
}
paper-button.at-social-btn#at-facebook.disabled {
color: #ddd;
background: #666666;
}
paper-button.at-social-btn#at-facebook:hover {
background: #2C4780;
}
paper-button.at-social-btn#at-linkedin {
background: #338AB0;
color: #fff;
}
paper-button.at-social-btn#at-linkedin.disabled {
color: #ddd;
background: #666666;
}
paper-button.at-social-btn#at-linkedin:hover {
background: #0571A6;
}
paper-button.at-social-btn#at-twitter {
background: #4099FF;
color: #fff;
}
paper-button.at-social-btn#at-twitter.disabled {
color: #ddd;
background: #666666;
}
paper-button.at-social-btn#at-twitter:hover {
background: #3288EB;
}
paper-button.at-social-btn#at-google {
background: #db5a3c;
color: #fff;
}
paper-button.at-social-btn#at-google.disabled {
color: #ddd;
background: #666666;
}
paper-button.at-social-btn#at-google:hover {
background: #CA4C2E;
}
paper-button.at-social-btn#at-github {
background: #666;
color: #fff;
}
paper-button.at-social-btn#at-github.disabled {
color: #ddd;
background: #666666;
}
paper-button.at-social-btn#at-github:hover {
background: #555;
}
.at-sep {
text-align: center;
position: relative;
overflow: hidden;
margin-bottom: 15px;
}
.at-sep:before,
.at-sep:after {
display: block;
content: " ";
border-bottom: 1px solid #ddd;
width: 100%;
position: absolute;
top: 48%;
}
.at-sep:before {
left: -60%;
}
.at-sep:after {
right: -60%;
}
.at-input.validating * {
cursor: progress;
}
.at-pwd-form > form {
margin-top: 20px;
}
.at-pwd-form > form label {
margin-bottom: 5px;
font-weight: 500;
font-size: 14px;
}
#at-btn {
font-size: 16px;
padding: 10px 12px;
margin-top: 30px;
}
.at-signup-link {
margin-top: 20px;
margin-bottom: 30px;
}
.at-terms-link {
text-align: center;
margin-top: 20px;
font-size: 16px;
}

View File

@@ -0,0 +1,16 @@
<template name="atPwdForm">
<div class="at-pwd-form">
<form role="form" id="at-pwd-form" class="{{disabled}} pure-form pure-form-aligned" novalidate action="#" method="POST">
{{#each fields}}
{{> atInput}}
{{/each}}
{{#if showReCaptcha}}
{{> atReCaptcha}}
{{/if}}
{{#if showForgotPasswordLink}}
{{> atPwdLink}}
{{/if}}
{{> atPwdFormBtn}}
</form>
</div>
</template>

View File

@@ -0,0 +1,5 @@
// Simply 'inherites' helpers from AccountsTemplates
Template.atPwdForm.helpers(AccountsTemplates.atPwdFormHelpers);
// Simply 'inherites' events from AccountsTemplates
Template.atPwdForm.events(AccountsTemplates.atPwdFormEvents);

View File

@@ -0,0 +1,8 @@
<template name="atPwdFormBtn">
<div horizontal layout center-justified>
<button type="submit" id="at-btn" hidden></button>
<paper-button class="at-btn submit {{submitDisabled}}" role="button" id="at-btn-polymer" raised>
{{buttonText}}
</paper-button>
</div>
</template>

View File

@@ -0,0 +1,10 @@
// Simply 'inherites' helpers from AccountsTemplates
Template.atPwdFormBtn.helpers(AccountsTemplates.atPwdFormBtnHelpers);
Template.atPwdFormBtn.events = {
'click #at-btn-polymer': function(event,template) {
event.preventDefault();
template.find('button[type=submit]').click();
}
};

View File

@@ -0,0 +1,9 @@
<template name="atPwdLink">
<div class="at-pwd-link" horizontal layout center-justified>
<p>
{{preText}}
<a href="{{forgotPwdLink}}" id="at-forgotPwd" class="at-link at-pwd {{disabled}}">{{linkText}}</a>
{{suffText}}
</p>
</div>
</template>

View File

@@ -0,0 +1,5 @@
// Simply 'inherites' helpers from AccountsTemplates
Template.atPwdLink.helpers(AccountsTemplates.atPwdLinkHelpers);
// Simply 'inherites' events from AccountsTemplates
Template.atPwdLink.events(AccountsTemplates.atPwdLinkEvents);

View File

@@ -0,0 +1,3 @@
<template name="atReCaptcha">
<div class="g-recaptcha" data-sitekey='{{key}}' data-theme='{{theme}}' data-type='{{data_type}}'></div>
</template>

View File

@@ -0,0 +1,5 @@
// Simply 'inherites' rendered callback from AccountsTemplates
Template.atReCaptcha.rendered = AccountsTemplates.atReCaptchaRendered;
// Simply 'inherites' helpers from AccountsTemplates
Template.atReCaptcha.helpers(AccountsTemplates.atReCaptchaHelpers);

View File

@@ -0,0 +1,8 @@
<template name="atResendVerificationEmailLink">
<div class="at-resend-verification-email-link at-wrap" horizontal center-justified layout>
<p>
<a href="{{resendVerificationEmailLink}}" id="at-resend-verification-email" class="at-link at-resend-verification-email {{disabled}}">{{linkText}}</a>
{{suffText}}
</p>
</div>
</template>

View File

@@ -0,0 +1,5 @@
// Simply 'inherites' helpers from AccountsTemplates
Template.atResendVerificationEmailLink.helpers(AccountsTemplates.atResendVerificationEmailLinkHelpers);
// Simply 'inherites' events from AccountsTemplates
Template.atResendVerificationEmailLink.events(AccountsTemplates.atResendVerificationEmailLinkEvents);

View File

@@ -0,0 +1,5 @@
<template name="atResult">
<div class="at-result">
{{result}}
</div>
</template>

View File

@@ -0,0 +1,2 @@
// Simply 'inherites' helpers from AccountsTemplates
Template.atResult.helpers(AccountsTemplates.atResultHelpers);

View File

@@ -0,0 +1,5 @@
<template name="atSep">
<div class="at-sep" horizontal center-justified layout>
<strong>{{sepText}}</strong>
</div>
</template>

View File

@@ -0,0 +1,2 @@
// Simply 'inherites' helpers from AccountsTemplates
Template.atSep.helpers(AccountsTemplates.atSepHelpers);

View File

@@ -0,0 +1,9 @@
<template name="atSigninLink">
<div class="at-signin-link" horizontal center-justified layout>
<p>
{{preText}}
<a href="{{signInLink}}" id="at-signIn" class="at-link at-signin {{disabled}}">{{linkText}}</a>
{{suffText}}
</p>
</div>
</template>

View File

@@ -0,0 +1,5 @@
// Simply 'inherites' helpers from AccountsTemplates
Template.atSigninLink.helpers(AccountsTemplates.atSigninLinkHelpers);
// Simply 'inherites' events from AccountsTemplates
Template.atSigninLink.events(AccountsTemplates.atSigninLinkEvents);

View File

@@ -0,0 +1,9 @@
<template name="atSignupLink">
<div class="at-signup-link" horizontal center-justified layout>
<p>
{{preText}}
<a href="{{signUpLink}}" id="at-signUp" class="at-link at-signup {{disabled}}">{{linkText}}</a>
{{suffText}}
</p>
</div>
</template>

View File

@@ -0,0 +1,5 @@
// Simply 'inherites' helpers from AccountsTemplates
Template.atSignupLink.helpers(AccountsTemplates.atSignupLinkHelpers);
// Simply 'inherites' events from AccountsTemplates
Template.atSignupLink.events(AccountsTemplates.atSignupLinkEvents);

View File

@@ -0,0 +1,6 @@
<template name="atSocial">
<paper-button class="at-social-btn {{disabled}}" id="at-{{name}}" name="{{name}}" >
<core-icon icon="social:post-{{iconClass}}"></core-icon>
<span flex>{{buttonText}} </span>
</paper-button>
</template>

View File

@@ -0,0 +1,18 @@
// Simply 'inherites' helpers from AccountsTemplates
Template.atSocial.helpers(AccountsTemplates.atSocialHelpers);
// Simply 'inherites' events from AccountsTemplates
Template.atSocial.events(AccountsTemplates.atSocialEvents);
Template.atSocial.events({
'click paper-button': AccountsTemplates.atSocialEvents["click button"]
});
Template.atSocial.helpers({
iconClass: function() {
var classStr = this._id;
if (classStr[0] === "g" && classStr[1] === "o")
classStr = "gplus";
return classStr;
},
});

View File

@@ -0,0 +1,16 @@
<template name="atTermsLink">
<div class="at-terms-link at-wrap" horizontal center-justified layout>
<p>
{{text}}
{{#if privacyUrl}}
<a href="{{privacyUrl}}" class="{{disabled}}">{{privacyLinkText}}</a>
{{/if}}
{{#if showTermsAnd}}
{{and}}
{{/if}}
{{#if termsUrl}}
<a href="{{termsUrl}}" class="{{disabled}}">{{termsLinkText}}</a>
{{/if}}
</p>
</div>
</template>

View File

@@ -0,0 +1,5 @@
// Simply 'inherites' helpers from AccountsTemplates
Template.atTermsLink.helpers(AccountsTemplates.atTermsLinkHelpers);
// Simply 'inherites' events from AccountsTemplates
Template.atTermsLink.events(AccountsTemplates.atTermsLinkEvents);

View File

@@ -0,0 +1,5 @@
<template name="atTitle">
<div class="at-title" horizontal center-justified layout>
<h3>{{title}}</h3>
</div>
</template>

View File

@@ -0,0 +1,2 @@
// Simply 'inherites' helpers from AccountsTemplates
Template.atTitle.helpers(AccountsTemplates.atTitleHelpers);

View File

@@ -0,0 +1,7 @@
<template name="fullPageAtForm">
<div class="fullPageAtForm" vertical layout center>
{{> atForm}}
</div>
</template>

View File

@@ -0,0 +1,86 @@
Package.describe({
summary: 'Accounts Templates for polymer',
version: '1.12.3',
name: 'useraccounts:polymer',
git: 'https://github.com/meteor-useraccounts/polymer.git',
});
Package.on_use(function(api, where) {
api.versionsFrom('METEOR@1.0');
api.use([
'templating',
'underscore',
], 'client');
api.use([
'useraccounts:core',
], ['client', 'server']);
// Requires all routing packages loads before this asking for weak dependencies.
api.use('useraccounts:flow-routing@1.12.1', ['client', 'server'], {weak: true});
api.use('useraccounts:iron-routing@1.12.1', ['client', 'server'], {weak: true});
api.imply([
'useraccounts:core@1.12.3',
], ['client', 'server']);
api.add_files([
'lib/at_error.html',
'lib/at_error.js',
'lib/at_form.html',
'lib/at_form.js',
'lib/at_input.html',
'lib/at_input.js',
'lib/at_message.html',
'lib/at_message.js',
'lib/at_nav_button.html',
'lib/at_nav_button.js',
'lib/at_oauth.html',
'lib/at_oauth.js',
'lib/at_pwd_form.html',
'lib/at_pwd_form.js',
'lib/at_pwd_form_btn.html',
'lib/at_pwd_form_btn.js',
'lib/at_pwd_link.html',
'lib/at_pwd_link.js',
'lib/at_reCaptcha.html',
'lib/at_reCaptcha.js',
'lib/at_result.html',
'lib/at_result.js',
'lib/at_sep.html',
'lib/at_sep.js',
'lib/at_signin_link.html',
'lib/at_signin_link.js',
'lib/at_signup_link.html',
'lib/at_signup_link.js',
'lib/at_social.html',
'lib/at_social.js',
'lib/at_terms_link.html',
'lib/at_terms_link.js',
'lib/at_resend_verification_email_link.html',
'lib/at_resend_verification_email_link.js',
'lib/at_title.html',
'lib/at_title.js',
'lib/full_page_at_form.html',
'lib/at_polymer.css'
], ['client']);
});
Package.on_test(function(api) {
api.use([
'useraccounts:polymer',
'useraccounts:core@1.12.3',
]);
api.use([
'accounts-password',
'less',
'tinytest',
'test-helpers'
], ['client', 'server']);
api.add_files([
'tests/tests.js'
], ['client', 'server']);
});

View File

@@ -0,0 +1,2 @@
// TODO: write tests!!!

View File

@@ -115,7 +115,7 @@ ChangeLogs.insert({
"Added encumbrance effects that automatically apply when carrying too much load",
"Added a bunch of UI elements to make your character's current load clear",
"Floating button menus now close as expected when you click a sub-button",
"Base values in attribute summaries no longer look like added values"
"Base values in attribute summaries no longer look like added values",
],
});
@@ -275,3 +275,47 @@ ChangeLogs.insert({
"Fixed spell attacks appearing on features page when the spell is not prepared",
],
});
ChangeLogs.insert({
version: "0.8.0",
changes: [
"Migrate to a new hosting provider. Server should now respond to interaction in milliseconds, rather than minutes",
"Redirected www.dicecloud.com to dicecloud.com",
"Fixed errors loggin in with Google",
],
});
ChangeLogs.insert({
version: "0.9.0",
changes: [
"Added fast render support, direct links to characters should load instantly",
"Added extra indexes to the database to improve performance",
],
});
ChangeLogs.insert({
version: "0.9.1",
changes: [
"Fixed rendering issues in Chrome 49+",
"Made character names in the side-bar into regular links",
],
});
ChangeLogs.insert({
version: "0.9.2",
changes: [
"New characters now have starting ability scores of 10",
"Coins are incrementable by default",
"Fixed multiplication sign",
"Added \"if\" function to equations",
"Added ritual tag to spells in the spell list",
"Updated dependencies to keep up with Chrome's breaking changes",
],
});
ChangeLogs.insert({
version: "0.9.3",
changes: [
"Fixed invisible dropdown boxes in Chrome 52",
],
});

View File

@@ -0,0 +1,29 @@
{
"name": "paper-dropdown",
"private": false,
"dependencies": {
"polymer": "Polymer/polymer#^0.5",
"core-animation": "Polymer/core-animation#^0.5",
"core-collapse": "Polymer/core-collapse#^0.5",
"core-dropdown": "Polymer/core-dropdown#^0.5",
"core-transition": "Polymer/core-transition#^0.5",
"core-icons": "Polymer/core-icons#^0.5",
"paper-icon-button": "Polymer/paper-icon-button#^0.5",
"paper-item": "Polymer/paper-item#^0.5",
"paper-shadow": "Polymer/paper-shadow#^0.5"
},
"devDependencies": {
"web-component-tester": "web-component-tester#master"
},
"version": "0.5.6",
"homepage": "https://github.com/Polymer/paper-dropdown",
"_release": "0.5.6",
"_resolution": {
"type": "version",
"tag": "0.5.6",
"commit": "30db0c00276fd8740bc7488f58703ad9f2449e9d"
},
"_source": "git://github.com/Polymer/paper-dropdown.git",
"_target": "^0.5",
"_originalSource": "Polymer/paper-dropdown"
}

View File

@@ -0,0 +1,6 @@
paper-dropdown
==============
owner: @morethanreal
See the [component page](https://www.polymer-project.org/0.5/docs/elements/paper-dropdown.html) for more information.

View File

@@ -0,0 +1,19 @@
{
"name": "paper-dropdown",
"private": false,
"dependencies": {
"polymer": "Polymer/polymer#^0.5",
"core-animation": "Polymer/core-animation#^0.5",
"core-collapse": "Polymer/core-collapse#^0.5",
"core-dropdown": "Polymer/core-dropdown#^0.5",
"core-transition": "Polymer/core-transition#^0.5",
"core-icons": "Polymer/core-icons#^0.5",
"paper-icon-button": "Polymer/paper-icon-button#^0.5",
"paper-item": "Polymer/paper-item#^0.5",
"paper-shadow": "Polymer/paper-shadow#^0.5"
},
"devDependencies": {
"web-component-tester": "web-component-tester#master"
},
"version": "0.5.6"
}

View File

@@ -0,0 +1,456 @@
<!doctype html>
<!--
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>paper-dropdown</title>
<script src="../webcomponentsjs/webcomponents.js"></script>
<link href="../core-collapse/core-collapse.html" rel="import">
<link href="../core-icons/core-icons.html" rel="import">
<link href="../paper-icon-button/paper-icon-button.html" rel="import">
<link href="../paper-item/paper-item.html" rel="import">
<link href="paper-dropdown.html" rel="import">
<style shim-shadowdom>
body {
font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial;
font-size: 14px;
margin: 0;
padding: 24px;
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-touch-callout: none;
}
section {
padding: 20px 0;
}
section > div {
padding: 14px;
font-size: 16px;
}
x-trigger {
z-index: auto;
}
html /deep/ paper-dropdown:not(.no-padding)::shadow #scroller {
box-sizing: border-box;
padding: 8px;
}
.with-margin {
margin: 12px;
}
.open-below {
top: 38px;
}
</style>
</head>
<body>
<polymer-element name="x-trigger" extends="paper-icon-button" relative on-tap="{{toggle}}" noink>
<template>
<shadow></shadow>
<content></content>
</template>
<script>
Polymer({
toggle: function() {
if (!this.dropdown) {
this.dropdown = this.querySelector('paper-dropdown');
}
this.dropdown && this.dropdown.toggle();
}
});
</script>
</polymer-element>
<template is="auto-binding">
<section>
<div>Absolutely positioned dropdowns</div>
<x-trigger icon="menu">
<paper-dropdown>
halign = left
<br>
valign = top
</paper-dropdown>
</x-trigger>
<x-trigger icon="menu">
<paper-dropdown valign="bottom">
halign = left
<br>
valign = bottom
</paper-dropdown>
</x-trigger>
<x-trigger icon="menu">
<paper-dropdown halign="right">
halign = right
<br>
valign = top
</paper-dropdown>
</x-trigger>
<x-trigger icon="menu">
<paper-dropdown class="no-padding">
<div class="menu">
<paper-item>Item 1</paper-item>
<paper-item>Item 2</paper-item>
<paper-item>Item 3</paper-item>
</div>
</paper-dropdown>
</x-trigger>
</section>
<section>
<div>Layered dropdowns</div>
<button onclick="document.getElementById('collapse').toggle()">toggle core-collapse</button>
<br>
<core-collapse id="collapse">
<x-trigger icon="menu">
<paper-dropdown layered>
halign = left
<br>
valign = top
</paper-dropdown>
</x-trigger>
</core-collapse>
</section>
<section>
<div>Scrolling and margin</div>
<x-trigger icon="menu">
<paper-dropdown>
no margin<br>
<br>
<template repeat="{{countries}}">
{{name}}<br>
</template>
</paper-dropdown>
</x-trigger>
<x-trigger icon="menu">
<paper-dropdown class="with-margin">
with margin<br>
<br>
<template repeat="{{countries}}">
{{name}}<br>
</template>
</paper-dropdown>
</x-trigger>
</section>
<section>
<div>Custom position</div>
<x-trigger icon="menu">
<paper-dropdown class="open-below">
top: 38px
</paper-dropdown>
</x-trigger>
</section>
</template>
<script>
scope = document.querySelector('template[is=auto-binding]');
scope.countries = [
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'Andorra', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
{name: 'Antigua and Barbuda', code: 'AG'},
{name: 'Argentina', code: 'AR'},
{name: 'Armenia', code: 'AM'},
{name: 'Aruba', code: 'AW'},
{name: 'Australia', code: 'AU'},
{name: 'Austria', code: 'AT'},
{name: 'Azerbaijan', code: 'AZ'},
{name: 'Bahamas', code: 'BS'},
{name: 'Bahrain', code: 'BH'},
{name: 'Bangladesh', code: 'BD'},
{name: 'Barbados', code: 'BB'},
{name: 'Belarus', code: 'BY'},
{name: 'Belgium', code: 'BE'},
{name: 'Belize', code: 'BZ'},
{name: 'Benin', code: 'BJ'},
{name: 'Bermuda', code: 'BM'},
{name: 'Bhutan', code: 'BT'},
{name: 'Bolivia', code: 'BO'},
{name: 'Bosnia and Herzegovina', code: 'BA'},
{name: 'Botswana', code: 'BW'},
{name: 'Bouvet Island', code: 'BV'},
{name: 'Brazil', code: 'BR'},
{name: 'British Indian Ocean Territory', code: 'IO'},
{name: 'Brunei Darussalam', code: 'BN'},
{name: 'Bulgaria', code: 'BG'},
{name: 'Burkina Faso', code: 'BF'},
{name: 'Burundi', code: 'BI'},
{name: 'Cambodia', code: 'KH'},
{name: 'Cameroon', code: 'CM'},
{name: 'Canada', code: 'CA'},
{name: 'Cape Verde', code: 'CV'},
{name: 'Cayman Islands', code: 'KY'},
{name: 'Central African Republic', code: 'CF'},
{name: 'Chad', code: 'TD'},
{name: 'Chile', code: 'CL'},
{name: 'China', code: 'CN'},
{name: 'Christmas Island', code: 'CX'},
{name: 'Cocos (Keeling) Islands', code: 'CC'},
{name: 'Colombia', code: 'CO'},
{name: 'Comoros', code: 'KM'},
{name: 'Congo', code: 'CG'},
{name: 'Congo, The Democratic Republic of the', code: 'CD'},
{name: 'Cook Islands', code: 'CK'},
{name: 'Costa Rica', code: 'CR'},
{name: 'Cote D\'Ivoire', code: 'CI'},
{name: 'Croatia', code: 'HR'},
{name: 'Cuba', code: 'CU'},
{name: 'Cyprus', code: 'CY'},
{name: 'Czech Republic', code: 'CZ'},
{name: 'Denmark', code: 'DK'},
{name: 'Djibouti', code: 'DJ'},
{name: 'Dominica', code: 'DM'},
{name: 'Dominican Republic', code: 'DO'},
{name: 'Ecuador', code: 'EC'},
{name: 'Egypt', code: 'EG'},
{name: 'El Salvador', code: 'SV'},
{name: 'Equatorial Guinea', code: 'GQ'},
{name: 'Eritrea', code: 'ER'},
{name: 'Estonia', code: 'EE'},
{name: 'Ethiopia', code: 'ET'},
{name: 'Falkland Islands (Malvinas)', code: 'FK'},
{name: 'Faroe Islands', code: 'FO'},
{name: 'Fiji', code: 'FJ'},
{name: 'Finland', code: 'FI'},
{name: 'France', code: 'FR'},
{name: 'French Guiana', code: 'GF'},
{name: 'French Polynesia', code: 'PF'},
{name: 'French Southern Territories', code: 'TF'},
{name: 'Gabon', code: 'GA'},
{name: 'Gambia', code: 'GM'},
{name: 'Georgia', code: 'GE'},
{name: 'Germany', code: 'DE'},
{name: 'Ghana', code: 'GH'},
{name: 'Gibraltar', code: 'GI'},
{name: 'Greece', code: 'GR'},
{name: 'Greenland', code: 'GL'},
{name: 'Grenada', code: 'GD'},
{name: 'Guadeloupe', code: 'GP'},
{name: 'Guam', code: 'GU'},
{name: 'Guatemala', code: 'GT'},
{name: 'Guernsey', code: 'GG'},
{name: 'Guinea', code: 'GN'},
{name: 'Guinea-Bissau', code: 'GW'},
{name: 'Guyana', code: 'GY'},
{name: 'Haiti', code: 'HT'},
{name: 'Heard Island and Mcdonald Islands', code: 'HM'},
{name: 'Holy See (Vatican City State)', code: 'VA'},
{name: 'Honduras', code: 'HN'},
{name: 'Hong Kong', code: 'HK'},
{name: 'Hungary', code: 'HU'},
{name: 'Iceland', code: 'IS'},
{name: 'India', code: 'IN'},
{name: 'Indonesia', code: 'ID'},
{name: 'Iran, Islamic Republic Of', code: 'IR'},
{name: 'Iraq', code: 'IQ'},
{name: 'Ireland', code: 'IE'},
{name: 'Isle of Man', code: 'IM'},
{name: 'Israel', code: 'IL'},
{name: 'Italy', code: 'IT'},
{name: 'Jamaica', code: 'JM'},
{name: 'Japan', code: 'JP'},
{name: 'Jersey', code: 'JE'},
{name: 'Jordan', code: 'JO'},
{name: 'Kazakhstan', code: 'KZ'},
{name: 'Kenya', code: 'KE'},
{name: 'Kiribati', code: 'KI'},
{name: 'Korea, Democratic People\'S Republic of', code: 'KP'},
{name: 'Korea, Republic of', code: 'KR'},
{name: 'Kuwait', code: 'KW'},
{name: 'Kyrgyzstan', code: 'KG'},
{name: 'Lao People\'S Democratic Republic', code: 'LA'},
{name: 'Latvia', code: 'LV'},
{name: 'Lebanon', code: 'LB'},
{name: 'Lesotho', code: 'LS'},
{name: 'Liberia', code: 'LR'},
{name: 'Libyan Arab Jamahiriya', code: 'LY'},
{name: 'Liechtenstein', code: 'LI'},
{name: 'Lithuania', code: 'LT'},
{name: 'Luxembourg', code: 'LU'},
{name: 'Macao', code: 'MO'},
{name: 'Macedonia, The Former Yugoslav Republic of', code: 'MK'},
{name: 'Madagascar', code: 'MG'},
{name: 'Malawi', code: 'MW'},
{name: 'Malaysia', code: 'MY'},
{name: 'Maldives', code: 'MV'},
{name: 'Mali', code: 'ML'},
{name: 'Malta', code: 'MT'},
{name: 'Marshall Islands', code: 'MH'},
{name: 'Martinique', code: 'MQ'},
{name: 'Mauritania', code: 'MR'},
{name: 'Mauritius', code: 'MU'},
{name: 'Mayotte', code: 'YT'},
{name: 'Mexico', code: 'MX'},
{name: 'Micronesia, Federated States of', code: 'FM'},
{name: 'Moldova, Republic of', code: 'MD'},
{name: 'Monaco', code: 'MC'},
{name: 'Mongolia', code: 'MN'},
{name: 'Montserrat', code: 'MS'},
{name: 'Morocco', code: 'MA'},
{name: 'Mozambique', code: 'MZ'},
{name: 'Myanmar', code: 'MM'},
{name: 'Namibia', code: 'NA'},
{name: 'Nauru', code: 'NR'},
{name: 'Nepal', code: 'NP'},
{name: 'Netherlands', code: 'NL'},
{name: 'Netherlands Antilles', code: 'AN'},
{name: 'New Caledonia', code: 'NC'},
{name: 'New Zealand', code: 'NZ'},
{name: 'Nicaragua', code: 'NI'},
{name: 'Niger', code: 'NE'},
{name: 'Nigeria', code: 'NG'},
{name: 'Niue', code: 'NU'},
{name: 'Norfolk Island', code: 'NF'},
{name: 'Northern Mariana Islands', code: 'MP'},
{name: 'Norway', code: 'NO'},
{name: 'Oman', code: 'OM'},
{name: 'Pakistan', code: 'PK'},
{name: 'Palau', code: 'PW'},
{name: 'Palestinian Territory, Occupied', code: 'PS'},
{name: 'Panama', code: 'PA'},
{name: 'Papua New Guinea', code: 'PG'},
{name: 'Paraguay', code: 'PY'},
{name: 'Peru', code: 'PE'},
{name: 'Philippines', code: 'PH'},
{name: 'Pitcairn', code: 'PN'},
{name: 'Poland', code: 'PL'},
{name: 'Portugal', code: 'PT'},
{name: 'Puerto Rico', code: 'PR'},
{name: 'Qatar', code: 'QA'},
{name: 'Reunion', code: 'RE'},
{name: 'Romania', code: 'RO'},
{name: 'Russian Federation', code: 'RU'},
{name: 'RWANDA', code: 'RW'},
{name: 'Saint Helena', code: 'SH'},
{name: 'Saint Kitts and Nevis', code: 'KN'},
{name: 'Saint Lucia', code: 'LC'},
{name: 'Saint Pierre and Miquelon', code: 'PM'},
{name: 'Saint Vincent and the Grenadines', code: 'VC'},
{name: 'Samoa', code: 'WS'},
{name: 'San Marino', code: 'SM'},
{name: 'Sao Tome and Principe', code: 'ST'},
{name: 'Saudi Arabia', code: 'SA'},
{name: 'Senegal', code: 'SN'},
{name: 'Serbia and Montenegro', code: 'CS'},
{name: 'Seychelles', code: 'SC'},
{name: 'Sierra Leone', code: 'SL'},
{name: 'Singapore', code: 'SG'},
{name: 'Slovakia', code: 'SK'},
{name: 'Slovenia', code: 'SI'},
{name: 'Solomon Islands', code: 'SB'},
{name: 'Somalia', code: 'SO'},
{name: 'South Africa', code: 'ZA'},
{name: 'South Georgia and the South Sandwich Islands', code: 'GS'},
{name: 'Spain', code: 'ES'},
{name: 'Sri Lanka', code: 'LK'},
{name: 'Sudan', code: 'SD'},
{name: 'Suriname', code: 'SR'},
{name: 'Svalbard and Jan Mayen', code: 'SJ'},
{name: 'Swaziland', code: 'SZ'},
{name: 'Sweden', code: 'SE'},
{name: 'Switzerland', code: 'CH'},
{name: 'Syrian Arab Republic', code: 'SY'},
{name: 'Taiwan, Province of China', code: 'TW'},
{name: 'Tajikistan', code: 'TJ'},
{name: 'Tanzania, United Republic of', code: 'TZ'},
{name: 'Thailand', code: 'TH'},
{name: 'Timor-Leste', code: 'TL'},
{name: 'Togo', code: 'TG'},
{name: 'Tokelau', code: 'TK'},
{name: 'Tonga', code: 'TO'},
{name: 'Trinidad and Tobago', code: 'TT'},
{name: 'Tunisia', code: 'TN'},
{name: 'Turkey', code: 'TR'},
{name: 'Turkmenistan', code: 'TM'},
{name: 'Turks and Caicos Islands', code: 'TC'},
{name: 'Tuvalu', code: 'TV'},
{name: 'Uganda', code: 'UG'},
{name: 'Ukraine', code: 'UA'},
{name: 'United Arab Emirates', code: 'AE'},
{name: 'United Kingdom', code: 'GB'},
{name: 'United States', code: 'US'},
{name: 'United States Minor Outlying Islands', code: 'UM'},
{name: 'Uruguay', code: 'UY'},
{name: 'Uzbekistan', code: 'UZ'},
{name: 'Vanuatu', code: 'VU'},
{name: 'Venezuela', code: 'VE'},
{name: 'Viet Nam', code: 'VN'},
{name: 'Virgin Islands, British', code: 'VG'},
{name: 'Virgin Islands, U.S.', code: 'VI'},
{name: 'Wallis and Futuna', code: 'WF'},
{name: 'Western Sahara', code: 'EH'},
{name: 'Yemen', code: 'YE'},
{name: 'Zambia', code: 'ZM'},
{name: 'Zimbabwe', code: 'ZW'}
];
scope.pastries = [
'Apple fritter',
'Croissant',
'Donut',
'Financier',
'Jello',
'Madeleine',
'Pound cake',
'Pretzel',
'Sfogliatelle'
];
</script>
</body>
</html>

View File

@@ -0,0 +1,22 @@
<!doctype html>
<!--
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
The complete set of authors may be found at http://polymer.github.io/AUTHORS
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS
-->
<html>
<head>
<script src="../webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="../core-component-page/core-component-page.html">
</head>
<body unresolved>
<core-component-page sources='["paper-dropdown.html","paper-dropdown-transition.html"]'></core-component-page>
</body>
</html>

View File

@@ -0,0 +1,15 @@
/* Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */
:host(.core-transition) #ripple,
:host(.core-transition) #background {
opacity: 0;
}
:host(.core-transition) #scroller {
opacity: 0;
}

View File

@@ -0,0 +1,179 @@
<!--
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<!--
`paper-dropdown-transition` is a transition for `paper-dropdown`.
Add the class `menu` to a `core-selector` child of the `paper-dropdown` to
enable the optional list cascade transition.
@group Paper Elements
@class paper-dropdown-transition
@extends core-transition-css
@status unstable
-->
<link href="../../components/polymer/polymer.html" rel="import">
<link href="../../components/core-transition/core-transition-css.html" rel="import">
<link href="../../components/core-animation/web-animations.html" rel="import">
<polymer-element name="paper-dropdown-transition" extends="core-transition-css">
<template>
<link href="paper-dropdown-transition.css" rel="stylesheet" no-shim>
</template>
<script>
Polymer('paper-dropdown-transition', {
publish: {
/**
* The duration of the transition in ms. You can also set the duration by
* setting a `duration` attribute on the target:
*
* <paper-dropdown duration="1000"></paper-dropdown>
*
* @attribute duration
* @type number
* @default 500
*/
duration: 350
},
setup: function(node) {
this.super(arguments);
var to = {
'top': '0%',
'left': '0%',
'bottom': '100%',
'right': '100%'
};
var bg = node.$.background;
bg.style.webkitTransformOrigin = to[node.halign] + ' ' + to[node.valign];
bg.style.transformOrigin = to[node.halign] + ' ' + to[node.valign];
},
transitionOpened: function(node, opened) {
this.super(arguments);
if (opened) {
if (this.player) {
this.player.cancel();
}
var duration = Number(node.getAttribute('duration')) || this.duration;
var anims = [];
var size = node.getBoundingClientRect();
var ink = node.$.ripple;
// var offset = 40 / Math.max(size.width, size.height);
var offset = 0.2;
anims.push(new Animation(ink, [{
'opacity': 0.9,
'transform': 'scale(0)',
}, {
'opacity': 0.9,
'transform': 'scale(1)'
}], {
duration: duration * offset,
}));
// XXX: cancel() seems not to be working until chrome 41 so set the opacity for the
// background here to prevent a flash.
anims.push(new Animation(node.$.background, [{
'opacity': 0,
'transform': 'scale(0)'
}, {
'opacity': 0,
'transform': 'scale(0)'
}], {
duration: 0,
delay: 0,
fill: 'forwards'
}));
var bg = node.$.background;
var sx = 40 / size.width;
var sy = 40 / size.height;
anims.push(new Animation(bg, [{
'opacity': 0.9,
'transform': 'scale(' + sx + ',' + sy + ')',
}, {
'opacity': 1,
'transform': 'scale(' + Math.max(sx, 0.95) + ',' + Math.max(sy, 0.5) + ')'
}, {
'opacity': 1,
'transform': 'scale(1, 1)'
}], {
delay: duration * offset,
duration: duration * (1 - offset),
fill: 'forwards'
}));
var menu = node.querySelector('.menu');
if (menu) {
var items = menu.items || menu.children.array();
var itemDelay = offset + (1 - offset) / 2;
var itemDuration = duration * (1 - itemDelay) / items.length;
var reverse = this.valign === 'bottom';
items.forEach(function(item, i) {
anims.push(new Animation(item, [{
'opacity': 0
}, {
'opacity': 1
}], {
delay: duration * itemDelay + itemDuration * (reverse ? items.length - 1 - i : i),
duration: itemDuration,
fill: 'both'
}));
}.bind(this));
anims.push(new Animation(node.$.scroller, [{
'opacity': 1
}, {
'opacity': 1
}], {
delay: duration * itemDelay,
duration: itemDuration * items.length,
fill: 'both'
}));
} else {
anims.push(new Animation(node.$.scroller, [{
'opacity': 0
}, {
'opacity': 1
}], {
delay: duration * (offset + (1 - offset) / 2),
duration: duration * 0.5,
fill: 'both'
}));
}
var group = new AnimationGroup(anims/*, {
easing: 'cubic-bezier(0.4, 0, 0.2, 1)'
}*/);
this.player = document.timeline.play(group);
this.player.onfinish = function() {
this.fire('core-transitionend', this, node);
}.bind(this);
} else {
this.fire('core-transitionend', this, node);
}
},
});
</script>
</polymer-element>
<paper-dropdown-transition id="paper-dropdown-transition"></paper-dropdown-transition>

View File

@@ -0,0 +1,115 @@
<!--
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<!--
`paper-dropdown` is a `core-dropdown` with a `paper-shadow`. By default, it
is animated on open with `paper-dropdown-transition`. Use this element with
`paper-dropdown-menu` or `paper-menu-button` to implement UI controls that
open a drop-down.
Example:
<paper-dropdown>
Hi!
</paper-dropdown>
Theming
-------
Style the background color of the dropdown with these selectors:
paper-dropdown::shadow #ripple,
paper-dropdown::shadow #background {
background-color: green;
}
@group Paper Elements
@element paper-dropdown
@extends core-dropdown
@status unstable
-->
<link href="../../components/polymer/polymer.html" rel="import">
<link href="../../components/core-dropdown/core-dropdown.html" rel="import">
<link href="../../components/paper-shadow/paper-shadow.html" rel="import">
<!--<link href="paper-dropdown-transition.html" rel="import">-->
<style shim-shadowdom>
html /deep/ paper-dropdown {
position: absolute;
overflow: visible;
min-height: 40px;
}
</style>
<polymer-element name="paper-dropdown" extends="core-dropdown">
<template>
<style>
#ripple {
background-color: #fff;
position: absolute;
left: 0;
top: 0;
width: 40px;
height: 40px;
border-radius: 50%;
box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.26);
opacity: 0;
}
:host([halign=right]) #ripple {
left: auto;
right: 0;
}
:host([valign=bottom]) #ripple {
top: auto;
bottom: 0;
}
#background {
background-color: #fff;
border-radius: inherit;
}
#scroller {
overflow: auto;
box-sizing: border-box;
}
</style>
<div id="ripple"></div>
<div id="background" fit>
<paper-shadow fit></paper-shadow>
</div>
<div id="scroller" relative>
<content></content>
</div>
</template>
<script>
Polymer({
publish: { //Chrome 52 breaks this
// transition: 'paper-dropdown-transition'
},
ready: function() {
this.super();
this.sizingTarget = this.$.scroller;
}
});
</script>
</polymer-element>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Some files were not shown because too many files have changed in this diff Show More