diff --git a/.jscsrc b/.jscsrc index a4337796..aed9e33e 100644 --- a/.jscsrc +++ b/.jscsrc @@ -13,7 +13,7 @@ "disallowMixedSpacesAndTabs": "smart", "disallowTrailingWhitespace": true, "disallowSpaceAfterPrefixUnaryOperators": true, - "disallowMultipleVarDecl": true, + "disallowMultipleVarDecl": false, "disallowNewlineBeforeBlockStatements": true, "disallowKeywordsOnNewLine": ["else"], @@ -53,4 +53,4 @@ "disallowMultipleLineBreaks": true, "disallowNewlineBeforeBlockStatements": true -} \ No newline at end of file +} diff --git a/rpg-docs/.gitignore b/rpg-docs/.gitignore index dc11d68b..88a0a828 100644 --- a/rpg-docs/.gitignore +++ b/rpg-docs/.gitignore @@ -3,6 +3,7 @@ .demeteorized settings.json public/components +public/_imports.html nohup.out node_modules dump diff --git a/rpg-docs/.meteor/.finished-upgraders b/rpg-docs/.meteor/.finished-upgraders index dacc2c0d..aa607041 100644 --- a/rpg-docs/.meteor/.finished-upgraders +++ b/rpg-docs/.meteor/.finished-upgraders @@ -11,3 +11,5 @@ notices-for-facebook-graph-api-2 1.2.0-cordova-changes 1.2.0-breaking-changes 1.3.0-split-minifiers-package +1.4.0-remove-old-dev-bundle-link +1.4.1-add-shell-server-package diff --git a/rpg-docs/.meteor/packages b/rpg-docs/.meteor/packages index f2991bd6..c1e8a81c 100644 --- a/rpg-docs/.meteor/packages +++ b/rpg-docs/.meteor/packages @@ -3,14 +3,13 @@ # 'meteor add' and 'meteor remove' will edit this file for you, # but you can also edit it by hand. -thaum:vulcanize@0.0.5 iron:router -accounts-password -accounts-ui -random +accounts-password@1.3.3 +accounts-ui@1.1.9 +random@1.0.10 dburles:collection-helpers -reactive-var -underscore +reactive-var@1.0.11 +underscore@1.0.10 aldeed:collection2 matb33:collection-hooks zimme:collection-softremovable @@ -19,29 +18,31 @@ dburles:mongo-collection-instances percolate:migrations ecwyne:mathjs useraccounts:polymer -accounts-google +accounts-google@1.0.11 splendido:accounts-meld -email +email@1.1.18 meteorhacks:subs-manager -meteorhacks:kadira chuangbo:marked reywood:iron-router-ga -meteor-base -mobile-experience -mongo +meteor-base@1.0.4 +mobile-experience@1.0.4 +mongo@1.1.14 blaze-html-templates -session -jquery -tracker -logging -reload -ejson +session@1.1.7 +jquery@1.11.10 +tracker@1.1.1 +logging@1.1.16 +reload@1.1.11 +ejson@1.0.13 spacebars -check +check@1.2.4 useraccounts:iron-routing wizonesolutions:canonical -meteorhacks:fast-render -fourseven:scss -wolves:bourbon -standard-minifier-css -standard-minifier-js +standard-minifier-js@1.2.1 +shell-server@0.2.1 +seba:minifiers-autoprefixer +nikogosovd:multiple-uihooks +templates:array +ecmascript@0.6.1 +es5-shim@4.6.15 +differential:vulcanize diff --git a/rpg-docs/.meteor/release b/rpg-docs/.meteor/release index 940e0b5d..b7694ea3 100644 --- a/rpg-docs/.meteor/release +++ b/rpg-docs/.meteor/release @@ -1 +1 @@ -METEOR@1.3.2.4 +METEOR@1.4.2.6 diff --git a/rpg-docs/.meteor/versions b/rpg-docs/.meteor/versions index e405ebba..2f490285 100644 --- a/rpg-docs/.meteor/versions +++ b/rpg-docs/.meteor/versions @@ -1,131 +1,128 @@ -accounts-base@1.2.7 -accounts-google@1.0.9 -accounts-oauth@1.1.12 -accounts-password@1.1.8 +accounts-base@1.2.14 +accounts-google@1.0.11 +accounts-oauth@1.1.15 +accounts-password@1.3.3 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 +accounts-ui-unstyled@1.1.13 +aldeed:collection2@2.10.0 +aldeed:collection2-core@1.2.0 +aldeed:schema-deny@1.1.0 +aldeed:schema-index@1.1.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 +allow-deny@1.0.5 +autoupdate@1.3.12 +babel-compiler@6.13.0 +babel-runtime@1.0.1 +base64@1.0.10 +binary-heap@1.0.10 +blaze@2.3.0 +blaze-html-templates@1.1.0 +blaze-tools@1.0.10 +boilerplate-generator@1.0.11 +caching-compiler@1.1.9 +caching-html-compiler@1.1.0 +callback-hook@1.0.10 +check@1.2.4 chuangbo:marked@0.3.5_1 -coffeescript@1.0.17 -dburles:collection-helpers@1.0.4 +coffeescript@1.11.1_4 +dburles:collection-helpers@1.1.0 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 +ddp-client@1.3.2 +ddp-common@1.2.8 +ddp-rate-limiter@1.0.6 +ddp-server@1.3.12 deps@1.0.12 -diff-sequence@1.0.5 -ecmascript@0.4.3 -ecmascript-runtime@0.2.10 +diff-sequence@1.0.7 +differential:vulcanize@3.0.0 +ecmascript@0.6.1 +ecmascript-runtime@0.3.15 ecwyne:mathjs@0.25.0 -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 +ejson@1.0.13 +email@1.1.18 +es5-shim@4.6.15 +fastclick@1.0.13 +geojson-utils@1.0.10 +google@1.1.15 hot-code-push@1.0.4 -html-tools@1.0.9 -htmljs@1.0.9 -http@1.1.5 -id-map@1.0.7 +html-tools@1.0.11 +htmljs@1.0.11 +http@1.2.10 +id-map@1.0.9 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:router@1.1.1 iron:url@1.0.11 -jquery@1.11.8 +jquery@1.11.10 lai:collection-extensions@0.2.1_1 -launch-screen@1.0.11 -less@2.6.0 +launch-screen@1.1.0 +less@2.7.9 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 +localstorage@1.0.12 +logging@1.1.16 +matb33:collection-hooks@0.8.4 +mdg:validation-error@0.5.1 +meteor@1.6.0 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 +minifier-css@1.2.16 +minifier-js@1.2.17 +minimongo@1.0.19 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 +mobile-status-bar@1.0.13 +modules@0.7.7 +modules-runtime@0.7.8 +momentjs:moment@2.17.1 +mongo@1.1.14 +mongo-id@1.0.6 +nikogosovd:multiple-uihooks@0.1.8 +npm-bcrypt@0.9.2 +npm-mongo@2.2.16_1 +oauth@1.1.12 +oauth2@1.1.11 +observe-sequence@1.0.14 +ordered-dict@1.0.9 percolate:migrations@0.9.8 -promise@0.6.7 +promise@0.8.8 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 +random@1.0.10 +rate-limit@1.0.6 +reactive-dict@1.1.8 +reactive-var@1.0.11 +reload@1.1.11 +retry@1.0.9 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 +routepolicy@1.0.12 +seba:minifiers-autoprefixer@1.0.1 +service-configuration@1.0.11 +session@1.1.7 +sha@1.0.9 +shell-server@0.2.1 +softwarerero:accounts-t9n@1.3.7 +spacebars@1.0.13 +spacebars-compiler@1.1.0 splendido:accounts-emails-field@1.2.0 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 +srp@1.0.10 +standard-minifier-js@1.2.2 +templates:array@1.0.3 +templating@1.3.0 +templating-compiler@1.3.0 +templating-runtime@1.3.0 +templating-tools@1.1.0 +tracker@1.1.1 +ui@1.0.12 +underscore@1.0.10 +url@1.0.11 useraccounts:core@1.14.2 useraccounts:iron-routing@1.14.2 -useraccounts:polymer@1.12.3 -webapp@1.2.8 +useraccounts:polymer@1.14.2 +webapp@1.3.12 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 diff --git a/rpg-docs/Model/Character/Characters.js b/rpg-docs/Model/Character/Characters.js index cb09ce3b..20e717e1 100644 --- a/rpg-docs/Model/Character/Characters.js +++ b/rpg-docs/Model/Character/Characters.js @@ -443,13 +443,13 @@ Characters.calculate = { }), }; -var depreciated = function() { - //var err = new Error("this function has been depreciated"); +var deprecated = function() { + //var err = new Error("this function has been deprecated"); var name = ""; if (Template.instance()){ name = Template.instance().view.name; } - var logString = "this function has been depreciated \n"; + var logString = "this function has been deprecated \n"; if (name){ logString += "View: " + name + "\n\n"; } @@ -464,56 +464,56 @@ Characters.helpers({ //returns the value stored in the field requested //will set up dependencies on just that field getField : function(fieldName){ - depreciated(); + deprecated(); return Characters.calculate.getField(this._id, fieldName); }, //returns the value of a field fieldValue : function(fieldName){ - depreciated(); + deprecated(); return Characters.calculate.fieldValue(this._id, fieldName); }, attributeValue: function(attributeName){ - depreciated(); + deprecated(); return Characters.calculate.attributeValue(this._id, attributeName); }, attributeBase: function(attributeName){ - depreciated(); + deprecated(); return Characters.calculate.attributeBase(this._id, attributeName); }, skillMod: function(skillName){ - depreciated(); + deprecated(); return Characters.calculate.skillMod(this._id, skillName); }, proficiency: function(skillName){ - depreciated(); + deprecated(); return Characters.calculate.proficiency(this._id, skillName); }, passiveSkill: function(skillName){ - depreciated(); + deprecated(); return Characters.calculate.passiveSkill(this._id, skillName); }, advantage: function(skillName){ - depreciated(); + deprecated(); return Characters.calculate.advantage(this._id, skillName); }, abilityMod: function(attribute){ - depreciated(); + deprecated(); return Characters.calculate.abilityMod(this._id, attribute); }, passiveAbility: function(attribute){ - depreciated(); + deprecated(); return Characters.calculate.passiveAbility(this._id, attribute); }, xpLevel: function(){ - depreciated(); + deprecated(); return Characters.calculate.xpLevel(this._id); }, level: function(){ - depreciated(); + deprecated(); return Characters.calculate.level(this._id); }, experience: function(){ - depreciated(); + deprecated(); return Characters.calculate.experience(this._id); }, }); diff --git a/rpg-docs/Model/Meta/Reports.js b/rpg-docs/Model/Meta/Reports.js index ac0679e3..21ac4fe7 100644 --- a/rpg-docs/Model/Meta/Reports.js +++ b/rpg-docs/Model/Meta/Reports.js @@ -17,8 +17,8 @@ Schemas.Report = new SimpleSchema({ }, type: { type: String, - allowedValues: ["bug", "change", "feature", "general"], - defaultValue: "bug", + allowedValues: ["General Feedback", "Bug", "Suggested Change", "Feature Request"], + defaultValue: "General Feedback", }, //the immediate impact of doing this action (eg. -1 rages) severity: { diff --git a/rpg-docs/Routes/Routes.js b/rpg-docs/Routes/Routes.js index f3fe9fdd..cb414b74 100644 --- a/rpg-docs/Routes/Routes.js +++ b/rpg-docs/Routes/Routes.js @@ -26,13 +26,8 @@ Router.map(function() { waitOn: function(){ return subsManager.subscribe("characterList", Meteor.userId()); }, - data: { - characters: function(){ - return Characters.find({}, {fields: {_id: 1}, sort: {name: 1}}); - } - }, onAfterAction: function() { - document.title = appName; + document.title = appName + " - Characters"; }, fastRender: true, }); diff --git a/rpg-docs/bower.json b/rpg-docs/bower.json index 2c456ec3..b6299b5d 100644 --- a/rpg-docs/bower.json +++ b/rpg-docs/bower.json @@ -15,12 +15,16 @@ "tests" ], "dependencies": { - "polymer": "Polymer/polymer#~0.5.5", - "core-elements": "Polymer/core-elements#~0.5.5", - "paper-elements": "Polymer/paper-elements#~0.5.5", - "paper-fab-menu": "cwdoh/paper-fab-menu#~0.4.0" + "polymer": "Polymer/polymer#^1.0.0", + "iron-elements": "PolymerElements/iron-elements#^1.0.0", + "platinum-elements": "PolymerElements/platinum-elements#^1.0.1", + "neon-elements": "PolymerElements/neon-elements#^1.0.0", + "paper-elements": "PolymerElements/paper-elements#^1.0.7", + "app-elements": "PolymerElements/app-elements#^0.10.1", + "marked-element": "PolymerElements/marked-element#^1.2.0", + "paper-swatch-picker": "PolymerElements/paper-swatch-picker#~1.0.2" }, "resolutions": { - "webcomponentsjs": "0.7.23" + "webcomponentsjs": "0.7.24" } } diff --git a/rpg-docs/client/globalHelpers/GlobalUI.js b/rpg-docs/client/globalHelpers/GlobalUI.js index ad50010a..cf757253 100644 --- a/rpg-docs/client/globalHelpers/GlobalUI.js +++ b/rpg-docs/client/globalHelpers/GlobalUI.js @@ -1,14 +1,17 @@ this.GlobalUI = (function() { function GlobalUI() {} - - GlobalUI.dialog = {}; - + var toast; GlobalUI.toast = function(opts) { - var toast; - toast = $("[global-toast]")[0]; - toast.text = opts.text; - Session.set("global.ui.toastTemplate", opts.template); - Session.set("global.ui.toastData", opts.data); + if (!toast) toast = $("#global-toast")[0]; + if (_.isObject(opts)){ + toast.text = opts.text; + Session.set("global.ui.toastTemplate", opts.template); + Session.set("global.ui.toastData", opts.data); + } else { + toast.text = opts; + Session.set("global.ui.toastTemplate"); + Session.set("global.ui.toastData"); + } return toast.show(); }; @@ -18,147 +21,18 @@ this.GlobalUI = (function() { template: "undoToast", data: { id: id, - collection: collection - } + collection: collection, + }, }); }; - - GlobalUI.setDialog = function(opts) { - this.dialog = $("[global-dialog]")[0]; - Session.set("global.ui.dialogHeader", opts.heading); - Session.set("global.ui.dialogData", opts.data); - Session.set("global.ui.dialogTemplate", opts.template); - Session.set("global.ui.dialogFullOnMobile", opts.fullOnMobile !== null); - }; - - GlobalUI.showDialog = function(opts) { - this.dialog = $("[global-dialog]")[0]; - Session.set("global.ui.dialogHeader", opts.heading); - Session.set("global.ui.dialogData", opts.data); - Session.set("global.ui.dialogTemplate", opts.template); - Session.set("global.ui.dialogFullOnMobile", opts.fullOnMobile !== null); - return Tracker.afterFlush((function(_this) { - return function() { - return _this.dialog.open(); - }; - })(this)); - }; - - GlobalUI.closeDialog = function() { - return this.dialog.close(); - }; - - //To show a detail, first animate the click, with raising z-depth - //then call this function with a template and data - //the element should have a hero-id of detail-main - GlobalUI.showDetail = function(opts) { - Session.set("global.ui.detailData", opts.data); - Session.set("global.ui.detailTemplate", opts.template); - Session.set("global.ui.detailHeroId", opts.heroId); - Session.set("global.ui.detailShow", true); - }; - - //if setting the detail rather than showing it, - //the template should contain the following in template.rendered - // - //if (!this.alreadyRendered){ - // Session.set("global.ui.detailShow", true); - // this.alreadyRendered = true; - //} - GlobalUI.setDetail = function(opts) { - Session.set("global.ui.detailData", opts.data); - Session.set("global.ui.detailTemplate", opts.template); - Session.set("global.ui.detailHeroId", opts.heroId); - if (window.history && window.history.pushState) { - history.replaceState({detail: "closed", opts: opts}, "Detail Dialog"); - history.pushState({detail: "opened", opts: opts}, "Detail Dialog"); - } - }; - - var throttleBack = _.throttle(function() { - history.back(); - }, 100, {trailing: false}); - - GlobalUI.closeDetail = function() { - if (window.history && history.pushState && history.state.detail === "opened") { - throttleBack(); - } else { - Session.set("global.ui.detailShow", false); - } - }; - - GlobalUI.popStateHandler = function(e) { - var state = e.originalEvent.state; - if (state) { - if (state.detail === "closed") { - Session.set("global.ui.detailShow", false); - } else if (state.detail === "opened") { - var opts = state.opts; - Session.set("global.ui.detailData", opts.data); - Session.set("global.ui.detailTemplate", opts.template); - Session.set("global.ui.detailHeroId", opts.heroId); - } - } - }; - return GlobalUI; - })(); Template.layout.helpers({ - globalDialogTemplate: function() { - return Session.get("global.ui.dialogTemplate"); - }, - globalDialogData: function() { - return Session.get("global.ui.dialogData"); - }, - globalDialogFullOnMobile: function() { - return Session.get("global.ui.dialogFullOnMobile"); - }, - globalDialogHeader: function() { - return Session.get("global.ui.dialogHeader"); - }, - globalDetailSelected: function() { - return Session.get("global.ui.detailShow") ? 1 : 0; - }, - globalDetailTemplate: function() { - return Session.get("global.ui.detailTemplate"); - }, - globalDetailData: function() { - return Session.get("global.ui.detailData"); - }, globalToastTemplate: function() { return Session.get("global.ui.toastTemplate"); }, globalToastData: function() { return Session.get("global.ui.toastData"); - } -}); - -Template.layout.events({ - "core-overlay-close-completed [global-dialog]": function(e) { - Session.set("global.ui.dialogTemplate", null); - Session.set("global.ui.dialogData", null); - return Session.set("global.ui.dialogFullOnMobile", null); - }, - "core-animated-pages-transition-end [detail-pages]": function(e) { - var detailOpened = Session.get("global.ui.detailShow"); - if (!detailOpened) { - Session.set("global.ui.detailData", null); - Session.set("global.ui.detailTemplate", null); - Session.set("global.ui.detailHeroId", null); - } - }, - "core-animated-pages-transition-prepare": function(e) { - var detailOpened = Session.get("global.ui.detailShow"); - if (detailOpened) { - //set up the transition - } else { - //undo hack - $("#mainContentSection").removeClass("fake-selected"); - } - }, - "tap #screenDim": function(e) { - GlobalUI.closeDetail(); - } + }, }); diff --git a/rpg-docs/client/globalHelpers/evaluate.js b/rpg-docs/client/globalHelpers/evaluate.js index df6000d3..d986b1f0 100644 --- a/rpg-docs/client/globalHelpers/evaluate.js +++ b/rpg-docs/client/globalHelpers/evaluate.js @@ -23,3 +23,11 @@ Template.registerHelper("evaluateSignedSpaced", function(charId, string) { Template.registerHelper("evaluateString", function(charId, string) { return evaluateString(charId, string); }); + +Template.registerHelper("evaluateShortString", function(charId, string) { + if (_.isString(string)){ + return evaluateString( + charId, string.split(/^( *[-*_]){3,} *(?:\n+|$)/m)[0] + ); + } +}); diff --git a/rpg-docs/client/globalHelpers/openParentDialog.js b/rpg-docs/client/globalHelpers/openParentDialog.js index 7f1528a2..139428fe 100644 --- a/rpg-docs/client/globalHelpers/openParentDialog.js +++ b/rpg-docs/client/globalHelpers/openParentDialog.js @@ -1,32 +1,23 @@ -openParentDialog = function(parent, charId, heroId) { - var detail; +openParentDialog = function({ + parent, charId, element, returnElement, callback, +}) { + let template; + let data; if (parent.collection === "Characters" && parent.group === "racial") { - detail = { - template: "raceDialog", - data: {charId: parent.id}, - }; + template = "raceDialog"; + data = {charId: parent.id}; } else if (parent.collection === "Features") { - detail = { - template: "featureDialog", - data: {featureId: parent.id}, - }; + template = "featureDialog"; + data = {featureId: parent.id}; } else if (parent.collection === "Classes") { - detail = { - template: "classDialog", - data: {classId: parent.id}, - }; + template = "classDialog"; + data = {classId: parent.id}; } else if (parent.collection === "Items") { - detail = { - template: "itemDialog", - data: {itemId: parent.id}, - }; + template = "itemDialog"; + data = {itemId: parent.id}; } else if (parent.collection === "Spells") { - detail = { - template: "spellDialog", - data: {spellId: parent.id}, - }; + template = "spellDialog"; + data = {spellId: parent.id}; } - detail.heroId = heroId; - detail.charId = charId; - GlobalUI.setDetail(detail); + pushDialogStack({template, data, element, returnElement, callback}); }; diff --git a/rpg-docs/client/style/cards.css b/rpg-docs/client/style/cards.css new file mode 100644 index 00000000..c38dfbb2 --- /dev/null +++ b/rpg-docs/client/style/cards.css @@ -0,0 +1,85 @@ +/*Column layout*/ +.column-container { + column-fill: balance; + column-gap: 0px; + column-width: 304px; + padding: 4px; +} + +.column-container.thin-columns { + column-count: 4; + column-width: 240px; +} + +.column-container > div { + padding: 4px; + -webkit-column-break-inside: avoid; + page-break-inside: avoid; + break-inside: avoid; +} + +/*Cards*/ +.card { + background: white; + border-radius: 2px; +} + +.card .top { + cursor: pointer; + padding: 16px; + border-radius: 2px 2px 0 0; +} + +.card .top.white { + cursor: auto; + padding: 16px; + border-bottom: rgba(0,0,0,0.12) solid 1px; +} + +.card .bottom { + padding: 16px; + border-radius: 0 0 2px 2px; +} + +.card .bottom.list { + padding: 16px 0; +} + +.card .bottom.list .paper-font-subhead { + color: rgba(0,0,0,0.54); + font-size: 14px; + font-weight: 500; + letter-spacing: 0.010em; + padding: 12px 16px 12px 16px; +} + +.card .bottom.text { + white-space: pre-wrap; +} + +.card .left { + padding: 16px; + border-radius: 2px 0 0 2px; + text-align: center; + min-width: 72px; +} + +.card .right { + padding: 16px; + border-radius: 0 2px 2px 0; +} + +.card .left paper-icon-button { + display: block; + height: 32px; + padding: 0; + width: 32px; +} + +.card .left paper-icon-button[disabled] { + color: rgba(255, 255, 255, 0.2); +} + +.card img, .card iron-image { + max-width: 100%; +} diff --git a/rpg-docs/client/style/cards.scss b/rpg-docs/client/style/cards.scss deleted file mode 100644 index f0fa43b1..00000000 --- a/rpg-docs/client/style/cards.scss +++ /dev/null @@ -1,89 +0,0 @@ -@import "{wolves:bourbon}/bourbon"; - -$thickColumnWidth: 304px; -$thinColumnWidth: 240px; - -//Column layout -.column-container { - @include column-fill(balance); - @include column-gap(0px); - @include column-width($thickColumnWidth); - padding: 4px; - - &.thin-columns { - @include column-count(4); - @include column-width($thinColumnWidth); - } - & > div { - padding: 4px; - //stop divs breaking over multiple columns - -webkit-column-break-inside: avoid; - page-break-inside: avoid; - break-inside: avoid; - } -} - -//Cards -.card { - background: white; - border-radius: 2px; - - .top { - cursor: pointer; - padding: 16px; - border-radius: 2px 2px 0 0; - &.white { - cursor: auto; - padding: 16px; - border-bottom: rgba(0,0,0,0.12) solid 1px; - } - paper-checkbox::shadow #ink[checked] { - color: #ffffff; - } - paper-checkbox::shadow #ink { - color: #ffffff; - } - paper-checkbox::shadow #checkbox.checked { - background-color: #ffffff; - background-color: rgba(255,255,255,0.27); - border-color: #ffffff; - border-color: rgba(255,255,255,0.27); - } - paper-checkbox::shadow #checkbox { - border-color: #ffffff; - border-color: rgba(255,255,255,0.54); - } - } - .bottom { - padding: 16px; - border-radius: 0 0 2px 2px; - &.list { - padding: 0 0 16px 0; - .subhead { - color: rgba(0,0,0,0.54); - font-size: 14px; - font-weight: 500; - letter-spacing: 0.010em; - padding: 12px 16px 12px 16px; - } - } - &.text { - white-space: pre-wrap; - } - } - .left { - padding: 16px; - border-radius: 2px 0 0 2px; - text-align: center; - min-width: 72px; - } - .right { - padding: 16px; - border-radius: 0 2px 2px 0; - } -} - -/* undo pointer cursor on detail box heading */ -#globalDetail.card .top { - cursor: auto; -} diff --git a/rpg-docs/client/style/colors.scss b/rpg-docs/client/style/colors.css similarity index 94% rename from rpg-docs/client/style/colors.scss rename to rpg-docs/client/style/colors.css index 6f501aa9..04aa90a2 100644 --- a/rpg-docs/client/style/colors.scss +++ b/rpg-docs/client/style/colors.css @@ -70,6 +70,10 @@ background-color: #9E9E9E; } +.blue-grey { + background-color: #607D8B; +} + .app-grey { background-color: #424242; } @@ -80,4 +84,4 @@ .black { background-color: #262626; -} \ No newline at end of file +} diff --git a/rpg-docs/client/style/listItem.css b/rpg-docs/client/style/listItem.css new file mode 100644 index 00000000..87f61265 --- /dev/null +++ b/rpg-docs/client/style/listItem.css @@ -0,0 +1,43 @@ +/* +List items +*/ +.item-slot { + background-color: rgb(232, 232, 232); + background-color: rgba(0, 0, 0, 0.1); +} + +.item { + background: white; + cursor: pointer; + font-size: 16px; + height: 40px; + margin: 1px 0 1px 0; + padding: 0 16px 0 16px; + position: relative; + transition: box-shadow 0.3s ease, opacity 0.5s ease-in-out; +} + +.item > .itemName { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.item.small { + height: 32px; +} + +.item.tall { + height: 56px; +} + +.item.flexible { + height: auto; + padding-top: 16px; + padding-bottom: 16px; +} + +.item iron-icon, .item paper-icon-button { + color: #747474; + color: rgba(0,0,0,0.54); +} diff --git a/rpg-docs/client/style/listItem.scss b/rpg-docs/client/style/listItem.scss deleted file mode 100644 index 9d5f717f..00000000 --- a/rpg-docs/client/style/listItem.scss +++ /dev/null @@ -1,37 +0,0 @@ -/* -List items -*/ -.item-slot { - background-color: rgb(232, 232, 232); - background-color: rgba(0, 0, 0, 0.1); -} - -.item { - background: white; - cursor: pointer; - font-size: 16px; - height: 40px; - margin: 1px 0 1px 0; - padding: 0 16px 0 16px; - position: relative; - transition: box-shadow 0.3s ease, opacity 0.5s ease-in-out; - &.small { - height: 32px; - } - &.tall { - height: 56px; - } - &.flexible { - height: auto; - padding-top: 16px; - padding-bottom: 16px; - } - &[hero], &:active{ - box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.37); - z-index: 10; - } - core-icon, paper-icon-button { - color: #747474; - color: rgba(0,0,0,0.54); - } -} diff --git a/rpg-docs/client/style/main.scss b/rpg-docs/client/style/main.css similarity index 53% rename from rpg-docs/client/style/main.scss rename to rpg-docs/client/style/main.css index 376e4eb9..93a8d7dc 100644 --- a/rpg-docs/client/style/main.scss +++ b/rpg-docs/client/style/main.css @@ -1,7 +1,4 @@ -@import "{wolves:bourbon}/bourbon"; -@import "colors"; - -//apply a natural box layout model to all elements +/*apply a natural box layout model to all elements*/ *, *:before, *:after { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; @@ -19,17 +16,7 @@ body { background-color: #E0E0E0; } -//fix tabs and core-toolbar having box shadow -core-toolbar { - box-shadow: none; -} - -//give drawer panel a shadow always -core-header-panel[drawer] { - box-shadow: 2px 0px 5px 0px rgba(0,0,0,0.2); -} - -//Paragraphs +/*Paragraphs*/ p { margin-bottom: 8px; } @@ -46,14 +33,48 @@ hr { text-align: center; } -//FABs +.avatar { + display: inline-block; + box-sizing: border-box; + width: 40px; + height: 40px; + border-radius: 50%; + font-size: 26px; + font-color: rgba(255, 255, 255, 0.58) !important; +} + +/* + temporary fix for https://github.com/PolymerElements/paper-item/issues/71 + */ +paper-icon-item::shadow #contentIcon { + flex-shrink: 0; +} + +/*FABs*/ .floatyButton { position: fixed; bottom: 24px; right: 24px; + /* stop the fab from flashing during animation */ + transform: scale(1) translateZ(0px); + z-index: 3; } -//Buttons +paper-fab { + background-color: #d13b2e; +} + +paper-fab.keyboard-focus { + background: #630c05; +} + +.red-button:not([disabled]) { + background: #d23f31; + color: #fff; + margin-top: 16px; +} + +/*Buttons*/ paper-button { color: #000; color: rgba(0,0,0,0.87); @@ -63,7 +84,12 @@ paper-button { text-transform: uppercase; } -//Style shortcuts +dicecloud-selector paper-item { + white-space: nowrap; + overflow: hidden; +} + +/*Style shortcuts*/ .scroll-y { overflow-y: auto; } diff --git a/rpg-docs/client/style/shadowDom.css b/rpg-docs/client/style/shadowDom.css deleted file mode 100644 index 3cc59356..00000000 --- a/rpg-docs/client/style/shadowDom.css +++ /dev/null @@ -1,24 +0,0 @@ -.card .left paper-icon-button { - display: block; - height: 32px; - padding: 0; - width: 32px; -} - -.card .left paper-icon-button[disabled] { - color: rgba(255, 255, 255, 0.2); -} - -.card .left paper-icon-button /deep/ core-icon { - height: 32px; - width: 32px; -} - -/*fix paper-dropdowns*/ -body /deep/ core-menu { - overflow-x: hidden !important; -} - -html /deep/ paper-dropdown { - box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.37); -} diff --git a/rpg-docs/client/style/tables.css b/rpg-docs/client/style/tables.css new file mode 100644 index 00000000..28499097 --- /dev/null +++ b/rpg-docs/client/style/tables.css @@ -0,0 +1,15 @@ +td { + padding: 8px; +} + +.strengthTable{ + width: 100%; +} + +.strengthTable td:nth-child(2){ + text-align: right; +} + +.summaryTable td:nth-child(3){ + text-align: right; +} diff --git a/rpg-docs/client/style/tables.scss b/rpg-docs/client/style/tables.scss deleted file mode 100644 index 5edf7381..00000000 --- a/rpg-docs/client/style/tables.scss +++ /dev/null @@ -1,21 +0,0 @@ -td { - padding: 8px; -} - -.strengthTable{ - width: 100%; - td{ - &:nth-child(2) { - text-align: right; - } - &:nth-child(3) { - width: 250px; - } - } -} - -.summaryTable { - &:nth-child(3){ - text-align: right; - } -} diff --git a/rpg-docs/client/views/GeneralCSS/globalDetail.css b/rpg-docs/client/views/GeneralCSS/globalDetail.css deleted file mode 100644 index 30196b18..00000000 --- a/rpg-docs/client/views/GeneralCSS/globalDetail.css +++ /dev/null @@ -1,68 +0,0 @@ -#detailScreenFiller { - position: fixed; - top: 0; - bottom: 0; - left: 0; - right: 0; - z-index: 2; - - display: flex; - justify-content: center; - align-items: center; -} - -#screenDim { - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - background-color: grey; - background-color: rgba(0,0,0,0.35); -} - -#fadeDummy { - pointer-events: none; -} - -.detailContent { - padding: 24px; -} - -html /deep/ .red-button:not([disabled]) { - background: #d23f31; - color: #fff; - margin-top: 16px; -} - -#globalDetail { - background-color: white; - width: 624px; - height: 500px; - border-radius: 2px; -} - -#globalDetail core-toolbar { - border-radius: 2px 2px 0 0; -} - -@media (max-width: 640px) { - #globalDetail core-toolbar { - border-radius: 0; - } -} - -@media (max-width: 640px) { - #globalDetail { - top: 0 !important; - left: 0 !important; - width: 100%; - height: 100%; - margin: 0; - border-radius: 0; - } -} - -.not-selected [hero] { - visibility: hidden; -} diff --git a/rpg-docs/client/views/GeneralCSS/typography.css b/rpg-docs/client/views/GeneralCSS/typography.css index f97cb577..862706e2 100644 --- a/rpg-docs/client/views/GeneralCSS/typography.css +++ b/rpg-docs/client/views/GeneralCSS/typography.css @@ -1,113 +1,64 @@ -.display2 { - font-size: 45px; - font-weight: 400; - color: #000; - color: rgba(0,0,0,0.54); - letter-spacing: 0; +.white-text { + color: #dedede; + color: rgba(255,255,255,0.87); } -.white-text .display2{ +.white-text .paper-font-display2{ + color: #8a8a8a; color: rgba(255,255,255,0.54); } -.display1 { - font-size: 34px; - font-weight: 400; - color: #000; - color: rgba(0,0,0,0.54); - letter-spacing: 0; -} - -.white-text .display1, .white-text.display1{ +.white-text .paper-font-display1, .white-text.paper-font-display1{ + color: #8a8a8a; color: rgba(255,255,255,0.54); } -h1, .headline { - font-size: 24px; - font-weight: 400; - margin: 0; - color: #000; - color: rgba(0,0,0,0.87); - letter-spacing: 0; -} - -.white-text h1, .white-text .headline, .white-text.headline{ +.white-text h1, .white-text .paper-font-headline, .white-text.paper-font-headline{ + color: #dedede; color: rgba(255,255,255,0.87); } -h2, .title { - font-size: 20px; - font-weight: 500; - margin: 0; - color: #000; - color: rgba(0,0,0,0.87); - letter-spacing: 0.005em; -} - -.white-text h2, .white-text .title, .white-text.title{ +.white-text h2, .white-text .paper-font-title, .white-text.paper-font-title{ + color: #dedede; color: rgba(255,255,255,0.87); } -h3, .subhead { - font-size: 16px; - font-weight: 400; - margin: 0; - color: #000; - color: rgba(0,0,0,0.87); - letter-spacing: 0.010em; -} - -.white-text h3, .white-text .subhead{ +.white-text h3, .white-text .paper-font-subhead{ + color: #dedede; color: rgba(255,255,255,0.87); } -.body2 { - font-size: 14px; - font-weight: 500; - color: #000; - color: rgba(0,0,0,0.87); - letter-spacing: 0.010em; -} - -.white-text .body2{ +.white-text .paper-font-body2{ + color: #dedede; color: rgba(255,255,255,0.87); } -p, .body1, body { - font-size: 14px; - font-weight: 400; - margin: 0; - color: #000; - color: rgba(0,0,0,0.87); - letter-spacing: 0.010em; -} - -.white-text p, .white-text .body1{ +.white-text p, .white-text .paper-font-body1{ + color: #dedede; color: rgba(255,255,255,0.87); } -.caption{ - font-size: 12px; - font-weight: 400; - color: #000; - color: rgba(0,0,0,0.54); - letter-spacing: 0.020em; -} - -.white-text .caption{ +.white-text .paper-font-caption{ + color: #8a8a8a; color: rgba(255,255,255,0.54); } -html /deep/ .white-text{ - color: #fff; -} - .black54 { - color: #444; + color: #757575; color: rgba(0,0,0,0.54); } .white54 { - color: #eee; + color: #8a8a8a; color: rgba(255,255,255,0.54); } + +.black87 { + color: #212121; + color: rgba(0,0,0,0.87); +} + +.white87 { + color: #dedede; + color: rgba(255,255,255,0.87); +} diff --git a/rpg-docs/client/views/character/attacks/attackEdit/attackEdit.html b/rpg-docs/client/views/character/attacks/attackEdit/attackEdit.html index a5cd8e03..2a4230d0 100644 --- a/rpg-docs/client/views/character/attacks/attackEdit/attackEdit.html +++ b/rpg-docs/client/views/character/attacks/attackEdit/attackEdit.html @@ -1,39 +1,33 @@ \ No newline at end of file + diff --git a/rpg-docs/client/views/character/attacks/attackEdit/attackEdit.js b/rpg-docs/client/views/character/attacks/attackEdit/attackEdit.js index 295f0311..d313b1af 100644 --- a/rpg-docs/client/views/character/attacks/attackEdit/attackEdit.js +++ b/rpg-docs/client/views/character/attacks/attackEdit/attackEdit.js @@ -15,7 +15,7 @@ var damageTypes = [ ]; Template.attackEdit.events({ - "tap .deleteAttack": function(event, instance) { + "click .deleteAttack": function(event, instance) { Attacks.softRemoveNode(this._id); GlobalUI.deletedToast(this._id, "Attacks", "Attack"); }, @@ -31,9 +31,8 @@ Template.attackEdit.events({ var value = event.currentTarget.value; Attacks.update(this._id, {$set: {details: value}}); }, - "core-select .damageTypeDropdown": function(event) { + "iron-select .damageTypeDropdown": function(event) { var detail = event.originalEvent.detail; - if (!detail.isSelected) return; var value = detail.item.getAttribute("name"); if (value == this.damageType) return; Attacks.update(this._id, {$set: {damageType: value}}); @@ -44,7 +43,4 @@ Template.attackEdit.helpers({ damageTypes: function() { return damageTypes; }, - DAMAGE_DICE: function() { - return DAMAGE_DICE; - }, }); diff --git a/rpg-docs/client/views/character/attacks/attackEditList/attackEditList.html b/rpg-docs/client/views/character/attacks/attackEditList/attackEditList.html index 154c5cd6..e6eae7df 100644 --- a/rpg-docs/client/views/character/attacks/attackEditList/attackEditList.html +++ b/rpg-docs/client/views/character/attacks/attackEditList/attackEditList.html @@ -3,7 +3,7 @@ {{#if attacks.count}}
-

Attacks

+
Attacks
{{#each attacks}} {{>attackEdit}} {{/each}} diff --git a/rpg-docs/client/views/character/attacks/attackView/attackView.html b/rpg-docs/client/views/character/attacks/attackView/attackView.html index ba849b4e..d06683af 100644 --- a/rpg-docs/client/views/character/attacks/attackView/attackView.html +++ b/rpg-docs/client/views/character/attacks/attackView/attackView.html @@ -1,14 +1,14 @@ \ No newline at end of file + diff --git a/rpg-docs/client/views/character/characterSettings/characterSettings.html b/rpg-docs/client/views/character/characterSettings/characterSettings.html index 9fd9efe9..ae71b815 100644 --- a/rpg-docs/client/views/character/characterSettings/characterSettings.html +++ b/rpg-docs/client/views/character/characterSettings/characterSettings.html @@ -1,27 +1,24 @@ diff --git a/rpg-docs/client/views/character/characterSettings/characterSettings.js b/rpg-docs/client/views/character/characterSettings/characterSettings.js index 528ac718..09fe2291 100644 --- a/rpg-docs/client/views/character/characterSettings/characterSettings.js +++ b/rpg-docs/client/views/character/characterSettings/characterSettings.js @@ -23,4 +23,7 @@ Template.characterSettings.events({ ); } }, + "click .doneButton": function(event, instance){ + popDialogStack(); + }, }); diff --git a/rpg-docs/client/views/character/characterSettings/deleteCharacterConfirmation.html b/rpg-docs/client/views/character/characterSettings/deleteCharacterConfirmation.html index a941445c..9ddcb7e2 100644 --- a/rpg-docs/client/views/character/characterSettings/deleteCharacterConfirmation.html +++ b/rpg-docs/client/views/character/characterSettings/deleteCharacterConfirmation.html @@ -1,9 +1,20 @@ \ No newline at end of file + diff --git a/rpg-docs/client/views/character/characterSettings/deleteCharacterConfirmation.js b/rpg-docs/client/views/character/characterSettings/deleteCharacterConfirmation.js index 68225829..af8a64c2 100644 --- a/rpg-docs/client/views/character/characterSettings/deleteCharacterConfirmation.js +++ b/rpg-docs/client/views/character/characterSettings/deleteCharacterConfirmation.js @@ -18,11 +18,14 @@ Template.deleteCharacterConfirmation.events({ var canDel = instance.find("#nameInput").value === this.name; instance.canDelete.set(canDel); }, - "tap #deleteButton": function(event, instance) { + "click #deleteButton": function(event, instance) { if (instance.find("#nameInput").value === this.name) { - GlobalUI.closeDialog(); - Router.go("/"); + popDialogStack(); + Router.go("/characterList"); Characters.remove(this._id); } - } + }, + "click .cancelButton": function(event, instance){ + popDialogStack(); + }, }); diff --git a/rpg-docs/client/views/character/characterSettings/shareDialog.html b/rpg-docs/client/views/character/characterSettings/shareDialog.html index d788ac2e..4554da61 100644 --- a/rpg-docs/client/views/character/characterSettings/shareDialog.html +++ b/rpg-docs/client/views/character/characterSettings/shareDialog.html @@ -1,54 +1,65 @@ diff --git a/rpg-docs/client/views/character/characterSettings/shareDialog.js b/rpg-docs/client/views/character/characterSettings/shareDialog.js index e5ed3198..6574fa84 100644 --- a/rpg-docs/client/views/character/characterSettings/shareDialog.js +++ b/rpg-docs/client/views/character/characterSettings/shareDialog.js @@ -1,5 +1,19 @@ Template.shareDialog.onCreated(function(){ this.userId = new ReactiveVar(); + this.autorun(() => { + var char = Characters.findOne(Template.currentData()._id, { + fields: {readers: 1, writers: 1} + }); + if (!char) return; + this.subscribe("userNames", _.union(char.readers, char.writers)); + }); +}); + +Template.shareDialog.onRendered(function(){ + // Polymer not mirroring selected attribute properly + this.$("paper-listbox").each(function(){ + this.selected = this.getAttribute("selected"); + }); }); Template.shareDialog.helpers({ @@ -9,11 +23,16 @@ Template.shareDialog.helpers({ }, readers: function(){ var char = Characters.findOne(this._id, {fields: {readers: 1}}); - return Meteor.users.find({_id: {$in: char.readers}}); + return char.readers; }, writers: function(){ var char = Characters.findOne(this._id, {fields: {writers: 1}}); - return Meteor.users.find({_id: {$in: char.writers}}); + //Meteor.users.find({_id: {$in: char.writers}}); + return char.writers + }, + username: function(id){ + const user = Meteor.users.findOne(id); + return user && user.username || "user: " + id; }, shareButtonDisabled: function(){ return !Template.instance().userId.get(); @@ -23,15 +42,11 @@ Template.shareDialog.helpers({ return "User not found"; } }, - getUserName: function() { - return this.username || "user: " + this._id; - } }); Template.shareDialog.events({ - "core-select .visibilityDropdown": function(event){ + "iron-select .visibilityDropdown": function(event){ var detail = event.originalEvent.detail; - if (!detail.isSelected) return; var value = detail.item.getAttribute("name"); var char = Characters.findOne(this._id, {fields: {settings: 1}}); if (value == char.settings.viewPermission) return; @@ -50,7 +65,7 @@ Template.shareDialog.events({ } }); }, - "tap #shareButton": function(event, instance){ + "click #shareButton": function(event, instance){ var self = this; var permission = instance.find("#accessLevelMenu").selected; if (!permission) throw "no permission set"; @@ -68,9 +83,12 @@ Template.shareDialog.events({ }); } }, - "tap .deleteShare": function(event, instance) { + "click .deleteShare": function(event, instance) { Characters.update(instance.data._id, { - $pull: {writers: this._id, readers: this._id} + $pull: {writers: this.id, readers: this.id} }); }, + "click .doneButton": function(event, instance){ + popDialogStack(); + }, }); diff --git a/rpg-docs/client/views/character/characterSheet.css b/rpg-docs/client/views/character/characterSheet.css index 9816e965..5ce11aa5 100644 --- a/rpg-docs/client/views/character/characterSheet.css +++ b/rpg-docs/client/views/character/characterSheet.css @@ -1,28 +1,24 @@ -paper-tabs, core-toolbar { - box-shadow: 0px 3px 2px rgba(0, 0, 0, 0.2); -} - -core-toolbar paper-tabs { - box-shadow: none; -} - -paper-tabs[noink][nobar] paper-tab.core-selected { - color: #fff; -} - -paper-tabs /deep/ #selectionBar, #onRadio { - background-color: #d50000; -} - -paper-tabs ::shadow #ink { - color: #b22 !important; -} - -paper-tabs.transparent-brown { - background-color: transparent; - box-shadow: none; -} - -core-toolbar.medium-tall { +app-toolbar.medium-tall { height: 108px; } + +.character-name { + padding-left: 16px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.character-menu paper-icon-item{ + cursor: pointer; +} + +.character-sheet app-header { + position: relative; + z-index: 1; +} + +.character-sheet iron-pages > div { + overflow-y: auto; + overflow-x: hidden; +} diff --git a/rpg-docs/client/views/character/characterSheet.html b/rpg-docs/client/views/character/characterSheet.html index 2a0331e4..bb9ce825 100644 --- a/rpg-docs/client/views/character/characterSheet.html +++ b/rpg-docs/client/views/character/characterSheet.html @@ -1,54 +1,58 @@ diff --git a/rpg-docs/client/views/character/characterSheet.js b/rpg-docs/client/views/character/characterSheet.js index 4e7681b9..006c42f4 100644 --- a/rpg-docs/client/views/character/characterSheet.js +++ b/rpg-docs/client/views/character/characterSheet.js @@ -1,11 +1,162 @@ -Template.characterSheet.onCreated(function() { - //default to the first tab - Session.setDefault(this.data._id + ".selectedTab", "stats"); +let tabPages, tabSliders, tabFabs, tabFabMenus; +Template.characterSheet.onRendered(function() { + //default to the stats tab + Session.setDefault(this.data._id + ".selectedTab", "0"); + + // Keep the header's scroll target up to date with the currently selected tab + let header; + this.autorun(() => { + const tab = getTab(Template.currentData()._id); + header = header || this.find("app-header"); + if (!header) return; + Tracker.afterFlush(() => { + header.scrollTarget = this.find("#tabPages .iron-selected"); + header._scrollHandler && header._scrollHandler(); + }); + }); + + _.defer(() => { + // Store all the tab page components for use in animations + tabPages = _.times(6, (n) => + this.$(`.tab-page:nth-child(${n + 1})`) + ); + tabSliders = _.times(6, (n) => + tabPages[n].find(".animation-slider") + ); + tabFabs = _.times(6, (n) => + tabPages[n].find(".floatyButton") + ); + tabFabMenus = _.times(6, (n) => + tabPages[n].find(".mini-holder") + ); + }) + //watch this character and make sure their encumbrance is updated - trackEncumbranceConditions(this.data._id, this); + //trackEncumbranceConditions(this.data._id, this); }); +/** + * Page change animations that suck less than neon-animated-pages + */ +const tabAnimation = ({oldTab, newTab, duration}) => { + if (newTab === oldTab) return; + duration = duration || 400; + const delay = (element, f) => { + element.on( + "transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd", + (event) => { + if (event.target == event.currentTarget){ + f(); + $(this).off(event); + } + } + ); + } + const isForward = newTab > oldTab; + const entryAnimation = { + before: { + transform: isForward ? "translateX(100%)" : "translateX(-100%)", + }, + during: { + transition: `transform ${duration}ms ease`, + transform: "", + }, + after: { + transition: "", + transform: "", + }, + } + const exitAnimation = { + before: { + transform: "translateZ(0)", + }, + during: { + transition: `transform ${duration}ms ease`, + transform: isForward ? "translateX(-100%)" : "translateX(100%)", + }, + after: { + transition: "", + transform: "", + display: "", + }, + } + const oldPage = tabPages[oldTab]; + const newPage = tabPages[newTab]; + if (oldPage.length && newPage.length){ + oldPage[0].style.setProperty("display", "initial", "important"); + oldPage.css({zIndex: "1"}); + newPage.css({zIndex: "0"}); + _.defer(() => { + oldPage.css({ + transition: `z-index ${duration}ms linear`, + zIndex: "0", + }); + newPage.css({ + transition: `z-index ${duration}ms linear`, + zIndex: "1", + }); + }); + delay(oldPage, () => oldPage.css({ + display: "", + transition: "", + zIndex: "", + })); + delay(newPage, () => newPage.css({ + transition: "", + zIndex: "", + })); + } + const oldSlider = tabSliders[oldTab]; + if (oldSlider.length){ + oldSlider.css(exitAnimation.before); + _.defer(() => oldSlider.css(exitAnimation.during)); + delay(oldSlider, () => oldSlider.css(exitAnimation.after)); + } + const newSlider = tabSliders[newTab]; + if (newSlider.length){ + newSlider.css(entryAnimation.before); + _.defer(() => newSlider.css(entryAnimation.during)); + delay(newSlider, () => newSlider.css(entryAnimation.after)); + } + slideDown = ({element, reverse}) => { + element.css({ + transform: reverse ? "translateY(80px)" : "", + }); + const fraction = duration / 4; + _.defer(() => element.css({ + transition: reverse ? + `transform ${fraction}ms ease-out ${duration - fraction}ms` : + `transform ${fraction}ms ease-in`, + transform: reverse ? "" : "translateY(80px)", + })); + delay(element, () => element.css({ + transition: "", + })); + } + + const oldFab = tabFabs[oldTab]; + const newFab = tabFabs[newTab]; + if (oldFab.length && !newFab.length){ + slideDown({element: oldFab}); + } + if (newFab.length && !oldFab.length){ + slideDown({element: newFab, reverse: true}); + } + if (newFab.length && oldFab.length){ + newFab.css({transform: ""}); + } + + const oldFabMenu = tabFabMenus[oldTab]; + if (oldFabMenu.length) { + Blaze.getView(oldFabMenu[0]).templateInstance().active.set(false); + } +} + var setTab = function(charId, tab){ + tabAnimation({ + oldTab: +Session.get(charId + ".selectedTab"), + newTab: +tab, + }); return Session.set(charId + ".selectedTab", tab); }; @@ -24,34 +175,32 @@ Template.characterSheet.helpers({ }); Template.characterSheet.events({ - "core-animated-pages-transition-end #tabPages": function(event) { - event.stopPropagation(); - }, - "tap #characterSheetTabs paper-tab": function(event, instance){ - setTab(this._id, event.currentTarget.getAttribute("name")); + "iron-select #characterSheetTabs": function(event, instance){ + setTab(this._id, event.target.selected); }, "color-change": function(event, instance){ + console.log("character color change") Characters.update(this._id, {$set: {color: event.color}}); }, - "tap #deleteCharacter": function(event, instance){ - GlobalUI.showDialog({ - heading: "Delete " + this.name, + "click #deleteCharacter": function(event, instance){ + pushDialogStack({ data: this, template: "deleteCharacterConfirmation", + element: event.currentTarget.parentElement.parentElement, }); }, - "tap #shareCharacter": function(event, instance){ - GlobalUI.showDialog({ - heading: "Share " + this.name, + "click #shareCharacter": function(event, instance){ + pushDialogStack({ data: this, template: "shareDialog", + element: event.currentTarget.parentElement.parentElement, }); }, - "tap #characterSettings": function(event, instance){ - GlobalUI.showDialog({ - heading: this.name + " Settings", + "click #characterSettings": function(event, instance){ + pushDialogStack({ data: this, template: "characterSettings", + element: event.currentTarget.parentElement.parentElement, }); }, }); diff --git a/rpg-docs/client/views/character/effects/effectEdit/effectEdit.css b/rpg-docs/client/views/character/effects/effectEdit/effectEdit.css index 9c577908..d9170586 100644 --- a/rpg-docs/client/views/character/effects/effectEdit/effectEdit.css +++ b/rpg-docs/client/views/character/effects/effectEdit/effectEdit.css @@ -1,22 +1,15 @@ -html /deep/ .operationDropDown { +.effectEdit .operationDropDown { width: 152px; } -html /deep/ .statDropDown { +.effectEdit .statDropDown { width: 152px; } -html /deep/ .damageMultiplierDropDown { +.effectEdit .damageMultiplierDropDown { width: 152px; } -html /deep/ .effectEdit paper-input { - position: relative; - bottom: 5px; -} - -html /deep/ .effectEdit { - height: 64px; - display: flex; - align-items: flex-end; +.effectEdit .deleteEffect { + flex-shrink: 0; } diff --git a/rpg-docs/client/views/character/effects/effectEdit/effectEdit.html b/rpg-docs/client/views/character/effects/effectEdit/effectEdit.html index a249eb3d..ccfc868a 100644 --- a/rpg-docs/client/views/character/effects/effectEdit/effectEdit.html +++ b/rpg-docs/client/views/character/effects/effectEdit/effectEdit.html @@ -1,36 +1,30 @@ diff --git a/rpg-docs/client/views/character/effects/effectEdit/effectEdit.js b/rpg-docs/client/views/character/effects/effectEdit/effectEdit.js index bc20833b..4a33c503 100644 --- a/rpg-docs/client/views/character/effects/effectEdit/effectEdit.js +++ b/rpg-docs/client/views/character/effects/effectEdit/effectEdit.js @@ -1,4 +1,5 @@ //TODO add dexterity armor +// jscs:disable maximumLineLength var stats = [ {stat: "strength", name: "Strength", group: "Ability Scores"}, {stat: "dexterity", name: "Dexterity", group: "Ability Scores"}, @@ -68,9 +69,11 @@ var stats = [ {stat: "psychicMultiplier", name: "Psychic", group: "Weakness/Resistance"}, {stat: "radiantMultiplier", name: "Radiant", group: "Weakness/Resistance"}, {stat: "slashingMultiplier", name: "Slashing", group: "Weakness/Resistance"}, - {stat: "thunderMultiplier", name: "Thunder", group: "Weakness/Resistance"} + {stat: "thunderMultiplier", name: "Thunder", group: "Weakness/Resistance"}, ]; +// jscs:enable maximumLineLength + var statsDict = _.indexBy(stats, "stat"); var statGroups = _.groupBy(stats, "group"); var statGroupNames = _.keys(statGroups); @@ -80,7 +83,7 @@ var attributeOperations = [ {name: "Add", operation: "add"}, {name: "Multiply", operation: "mul"}, {name: "Min", operation: "min"}, - {name: "Max", operation: "max"} + {name: "Max", operation: "max"}, ]; var skillOperations = [ {name: "Add", operation: "add"}, @@ -91,7 +94,7 @@ var skillOperations = [ {name: "Disadvantage", operation: "disadvantage"}, {name: "Passive Bonus", operation: "passiveAdd"}, {name: "Automatically Fail", operation: "fail"}, - {name: "Conditional Benefit", operation: "conditional"} + {name: "Conditional Benefit", operation: "conditional"}, ]; Template.effectEdit.helpers({ @@ -125,7 +128,7 @@ Template.effectEdit.helpers({ //default template return "regularEffectValue"; - } + }, }); Template.regularEffectValue.helpers({ @@ -135,33 +138,30 @@ Template.regularEffectValue.helpers({ }); Template.effectEdit.events({ - "tap .deleteEffect": function(event){ + "click .deleteEffect": function(event){ Effects.softRemoveNode(this._id); GlobalUI.deletedToast(this._id, "Effects", "Effect"); }, - "core-select .statDropDown": function(event){ + "iron-select .statDropDown": function(event){ var detail = event.originalEvent.detail; - if (!detail.isSelected) return; var statName = detail.item.getAttribute("name"); if (statName == this.stat) return; Effects.update(this._id, {$set: {stat: statName}}); }, - "core-select .operationDropDown": function(event){ + "iron-select .operationDropDown": function(event){ var detail = event.originalEvent.detail; - if (!detail.isSelected) return; var opName = detail.item.getAttribute("name"); if (opName == this.operation) return; Effects.update(this._id, {$set: {operation: opName}}); }, - "core-select .damageMultiplierDropDown": function(event){ + "iron-select .damageMultiplierDropDown": function(event){ var detail = event.originalEvent.detail; - if (!detail.isSelected) return; var value = +detail.item.getAttribute("name"); if (value == this.value) return; Effects.update(this._id, {$set: { value: value, calculation: "", - operation: "mul" + operation: "mul", }}); }, "change .effectValueInput": function(event){ @@ -174,5 +174,5 @@ Template.effectEdit.events({ if (this.calculation === value) return; Effects.update(this._id, {$set: {value: "", calculation: value}}); } - } + }, }); diff --git a/rpg-docs/client/views/character/effects/effectsEditList/effectsEditList.html b/rpg-docs/client/views/character/effects/effectsEditList/effectsEditList.html index 4b1c7c0d..cf6a6182 100644 --- a/rpg-docs/client/views/character/effects/effectsEditList/effectsEditList.html +++ b/rpg-docs/client/views/character/effects/effectsEditList/effectsEditList.html @@ -1,13 +1,12 @@ \ No newline at end of file + diff --git a/rpg-docs/client/views/character/effects/effectsViewList/effectsViewList.html b/rpg-docs/client/views/character/effects/effectsViewList/effectsViewList.html index 0b9c26cd..dcae1b7c 100644 --- a/rpg-docs/client/views/character/effects/effectsViewList/effectsViewList.html +++ b/rpg-docs/client/views/character/effects/effectsViewList/effectsViewList.html @@ -1,9 +1,8 @@ diff --git a/rpg-docs/client/views/character/newCharacterDialog/newCharacterDialog.js b/rpg-docs/client/views/character/newCharacterDialog/newCharacterDialog.js index dcfc96cb..ca690666 100644 --- a/rpg-docs/client/views/character/newCharacterDialog/newCharacterDialog.js +++ b/rpg-docs/client/views/character/newCharacterDialog/newCharacterDialog.js @@ -1,13 +1,50 @@ -Template.newCharacterDialog.events({ - "tap #addButton": function(event, instance){ - Characters.insert({ - name: instance.find("#nameInput").value, - gender: instance.find("#genderInput").value, - race: instance.find("#raceInput").value, - owner: Meteor.userId(), - }, function(err, id){ - if (err) throw err; - Router.go("characterSheet", {_id: id}); - }); - } +Template.newCharacterDialog.onCreated(function(){ + this.character = {}; + this.schema = new SimpleSchema({ + //strings + name: {type: String}, + gender: {type: String, optional: true}, + race: {type: String, optional: true}, + }); + this.context = this.schema.newContext(); + this.context.runOnce = new ReactiveVar(false); +}); + +Template.newCharacterDialog.helpers({ + invalid(){ + let context = Template.instance().context; + let valid = context.isValid() && context.runOnce.get(); + return !valid; + }, + errorAtts(key){ + let error = Template.instance().context.keyErrorMessage(key); + if (error){ + return { + invalid: true, + ["error-message"]: error, + } + } + }, +}); + +changeFunction = function(field){ + return _.debounce(function(event, instance){ + console.log({field, event}) + instance.character[field] = event.currentTarget.value; + instance.schema.clean(instance.character); + instance.context.validate(instance.character); + if (!instance.context.runOnce.get()) instance.context.runOnce.set(true); + }, 200); +}; + +Template.newCharacterDialog.events({ + "input .nameInput": changeFunction("name"), + "input .genderInput": changeFunction("gender"), + "input .raceInput": changeFunction("race"), + "click .cancelButton": function(event, instance){ + popDialogStack(); + }, + "click .addButton": function(event, instance){ + popDialogStack(instance.character); + }, }); diff --git a/rpg-docs/client/views/character/persona/peronaDetailsDialog/personaDetailsDialog.html b/rpg-docs/client/views/character/persona/peronaDetailsDialog/personaDetailsDialog.html index 93900df5..38f0c332 100644 --- a/rpg-docs/client/views/character/persona/peronaDetailsDialog/personaDetailsDialog.html +++ b/rpg-docs/client/views/character/persona/peronaDetailsDialog/personaDetailsDialog.html @@ -2,10 +2,9 @@ {{#baseDialog title=name class="deep-purple white-text" hideColor="true" hideDelete="true" startEditing=startEditing}} {{#with char}}
{{alignment}} {{gender}} {{race}}
- + {{/with}} {{else}} {{#with char}} @@ -15,22 +14,21 @@ diff --git a/rpg-docs/client/views/character/persona/peronaDetailsDialog/personaDetailsDialog.js b/rpg-docs/client/views/character/persona/peronaDetailsDialog/personaDetailsDialog.js index 063eaea6..018525dc 100644 --- a/rpg-docs/client/views/character/persona/peronaDetailsDialog/personaDetailsDialog.js +++ b/rpg-docs/client/views/character/persona/peronaDetailsDialog/personaDetailsDialog.js @@ -1,7 +1,3 @@ -Template.personaDetailsEdit.onRendered(function(){ - updatePolymerInputs(this); -}); - Template.personaDetailsDialog.helpers({ char: function() { return Characters.findOne( @@ -11,25 +7,20 @@ Template.personaDetailsDialog.helpers({ } }); +inputHandler = (field) => _.debounce(function(event){ + var input = event.currentTarget.value; + Characters.update(this._id, { + $set: {[field]: input} + }, { + removeEmptyStrings: false, + trimStrings: false, + }); +}, 300); + Template.personaDetailsEdit.events({ - "change #nameInput": function(event){ - var input = event.currentTarget.value; - Characters.update(this._id, {$set: {name: input}}); - }, - "change #alignmentInput": function(event){ - var input = event.currentTarget.value; - Characters.update(this._id, {$set: {alignment: input}}); - }, - "change #genderInput": function(event){ - var input = event.currentTarget.value; - Characters.update(this._id, {$set: {gender: input}}); - }, - "change #raceInput": function(event){ - var input = event.currentTarget.value; - Characters.update(this._id, {$set: {race: input}}); - }, - "change #pictureInput": function(event){ - var input = event.currentTarget.value; - Characters.update(this._id, {$set: {picture: input}}); - }, + "input #nameInput, change #nameInput": inputHandler("name"), + "input #alignmentInput, change #alignmentInput": inputHandler("alignment"), + "input #genderInput, change #genderInput": inputHandler("gender"), + "input #raceInput, change #raceInput": inputHandler("race"), + "input #pictureInput, change #pictureInput": inputHandler("picture"), }); diff --git a/rpg-docs/client/views/character/persona/persona.html b/rpg-docs/client/views/character/persona/persona.html index 748e9051..327e3053 100644 --- a/rpg-docs/client/views/character/persona/persona.html +++ b/rpg-docs/client/views/character/persona/persona.html @@ -1,77 +1,66 @@ diff --git a/rpg-docs/client/views/character/persona/persona.js b/rpg-docs/client/views/character/persona/persona.js index 6ef1e6a3..e01c3c73 100644 --- a/rpg-docs/client/views/character/persona/persona.js +++ b/rpg-docs/client/views/character/persona/persona.js @@ -16,7 +16,6 @@ Template.persona.helpers({ char.field = "details"; char.title = char.name; char.color = "d"; - char.startEditing = true; return char; }, characterField: function(field, title){ @@ -39,28 +38,27 @@ Template.persona.helpers({ }); Template.persona.events({ - "tap .characterField": function(event){ + "click .characterField": function(event){ if (this.field == "details"){ this.charId = Template.parentData()._id; - GlobalUI.setDetail({ + pushDialogStack({ template: "personaDetailsDialog", data: this, - heroId: this._id + this.field, + element: event.currentTarget.parentElement, }); } else { var template = "textDialog"; if (this.field === "backstory") template = "backgroundDialog"; var charId = Template.parentData()._id; - GlobalUI.setDetail({ + pushDialogStack({ template: template, data: { charId: charId, field: this.field, title: this.title, color: this.color, - startEditing: true, }, - heroId: this._id + this.field, + element: event.currentTarget.parentElement, }); } } diff --git a/rpg-docs/client/views/character/persona/textDialog/textDialog.html b/rpg-docs/client/views/character/persona/textDialog/textDialog.html index 215d6a92..a714a6f7 100644 --- a/rpg-docs/client/views/character/persona/textDialog/textDialog.html +++ b/rpg-docs/client/views/character/persona/textDialog/textDialog.html @@ -1,5 +1,5 @@ diff --git a/rpg-docs/client/views/character/persona/textDialog/textDialog.js b/rpg-docs/client/views/character/persona/textDialog/textDialog.js index 48ab4663..e374bf38 100644 --- a/rpg-docs/client/views/character/persona/textDialog/textDialog.js +++ b/rpg-docs/client/views/character/persona/textDialog/textDialog.js @@ -7,10 +7,6 @@ Template.textDialog.helpers({ } }); -Template.textDialogEdit.onRendered(function(){ - updatePolymerInputs(this); -}); - Template.textDialogEdit.helpers({ value: function(){ var fieldSelector = {fields: {}}; @@ -21,10 +17,13 @@ Template.textDialogEdit.helpers({ }); Template.textDialogEdit.events({ - "change #textInput": function(event){ + "input #textInput": _.debounce(function(event){ var input = event.currentTarget.value; - var setter = {$set: {}}; - setter.$set[this.field] = input; - Characters.update(this.charId, setter); - } + Characters.update(this.charId, { + $set: {[this.field]: input} + }, { + removeEmptyStrings: false, + trimStrings: false, + }); + }, 300), }); diff --git a/rpg-docs/client/views/character/proficiencies/proficiencyEdit/proficiencyEdit.html b/rpg-docs/client/views/character/proficiencies/proficiencyEdit/proficiencyEdit.html index 69eca3ed..522e9b0a 100644 --- a/rpg-docs/client/views/character/proficiencies/proficiencyEdit/proficiencyEdit.html +++ b/rpg-docs/client/views/character/proficiencies/proficiencyEdit/proficiencyEdit.html @@ -1,23 +1,19 @@ diff --git a/rpg-docs/client/views/character/proficiencies/proficiencyEdit/proficiencyEdit.js b/rpg-docs/client/views/character/proficiencies/proficiencyEdit/proficiencyEdit.js index 900dc59b..fdacf251 100644 --- a/rpg-docs/client/views/character/proficiencies/proficiencyEdit/proficiencyEdit.js +++ b/rpg-docs/client/views/character/proficiencies/proficiencyEdit/proficiencyEdit.js @@ -51,27 +51,24 @@ Template.proficiencyEdit.helpers({ }); Template.proficiencyEdit.events({ - "tap .deleteProficiency": function(event){ + "click .deleteProficiency": function(event){ Proficiencies.softRemoveNode(this._id); GlobalUI.deletedToast(this._id, "Proficiencies", "Proficiency"); }, - "core-select .typeDropDown": function(event){ + "iron-select .typeDropDown": function(event){ var detail = event.originalEvent.detail; - if (!detail.isSelected) return; var type = detail.item.getAttribute("name"); if (type == this.type) return; Proficiencies.update(this._id, {$set: {type: type}}); }, - "core-select .valueDropDown": function(event){ + "iron-select .valueDropDown": function(event){ var detail = event.originalEvent.detail; - if (!detail.isSelected) return; var value = +detail.item.getAttribute("name"); if (value == this.value) return; Proficiencies.update(this._id, {$set: {value: value}}); }, - "core-select .nameDropDown": function(event){ + "iron-select .nameDropDown": function(event){ var detail = event.originalEvent.detail; - if (!detail.isSelected) return; var name = detail.item.getAttribute("name"); if (name == this.name) return; Proficiencies.update(this._id, {$set: {name: name}}); diff --git a/rpg-docs/client/views/character/proficiencies/proficiencyEditList/proficiencyEditList.html b/rpg-docs/client/views/character/proficiencies/proficiencyEditList/proficiencyEditList.html index 5d1c9fe5..e0f6d090 100644 --- a/rpg-docs/client/views/character/proficiencies/proficiencyEditList/proficiencyEditList.html +++ b/rpg-docs/client/views/character/proficiencies/proficiencyEditList/proficiencyEditList.html @@ -1,10 +1,8 @@ \ No newline at end of file + diff --git a/rpg-docs/client/views/character/proficiencies/proficiencyListItem/proficiencyListItem.html b/rpg-docs/client/views/character/proficiencies/proficiencyListItem/proficiencyListItem.html index 944e9eb4..a40f715a 100644 --- a/rpg-docs/client/views/character/proficiencies/proficiencyListItem/proficiencyListItem.html +++ b/rpg-docs/client/views/character/proficiencies/proficiencyListItem/proficiencyListItem.html @@ -1,11 +1,8 @@ \ No newline at end of file + diff --git a/rpg-docs/client/views/character/proficiencies/proficiencyListItem/proficiencyListItem.js b/rpg-docs/client/views/character/proficiencies/proficiencyListItem/proficiencyListItem.js index 5f5ce19b..55744233 100644 --- a/rpg-docs/client/views/character/proficiencies/proficiencyListItem/proficiencyListItem.js +++ b/rpg-docs/client/views/character/proficiencies/proficiencyListItem/proficiencyListItem.js @@ -14,7 +14,11 @@ Template.proficiencyListItem.helpers({ }); Template.proficiencyListItem.events({ - "tap .proficiency": function(event, instance){ - openParentDialog(this.parent, this.charId, this._id); + "click .proficiency": function(event, instance){ + openParentDialog({ + parent: this.parent, + charId: this.charId, + element: event.currentTarget, + }); } }); diff --git a/rpg-docs/client/views/character/proficiencies/proficiencyView/proficiencyView.html b/rpg-docs/client/views/character/proficiencies/proficiencyView/proficiencyView.html index 5d79e37f..cb1d97d5 100644 --- a/rpg-docs/client/views/character/proficiencies/proficiencyView/proficiencyView.html +++ b/rpg-docs/client/views/character/proficiencies/proficiencyView/proficiencyView.html @@ -1,10 +1,7 @@ - - diff --git a/rpg-docs/client/views/character/proficiencies/proficiencyViewList/proficiencyViewList.html b/rpg-docs/client/views/character/proficiencies/proficiencyViewList/proficiencyViewList.html index b4a08c23..3cd2512f 100644 --- a/rpg-docs/client/views/character/proficiencies/proficiencyViewList/proficiencyViewList.html +++ b/rpg-docs/client/views/character/proficiencies/proficiencyViewList/proficiencyViewList.html @@ -1,11 +1,12 @@ \ No newline at end of file + diff --git a/rpg-docs/client/views/character/spells/spellDialog/spellDialog.css b/rpg-docs/client/views/character/spells/spellDialog/spellDialog.css index 6639585f..322ecc5b 100644 --- a/rpg-docs/client/views/character/spells/spellDialog/spellDialog.css +++ b/rpg-docs/client/views/character/spells/spellDialog/spellDialog.css @@ -1,3 +1,7 @@ -.spellDialog paper-checkbox { - margin: 8px 16px 8px 8px; +.spell-dialog paper-checkbox { + margin: 8px; +} + +.spell-dialog paper-dropdown-menu, .spell-dialog paper-input { + margin: 0 4px; } diff --git a/rpg-docs/client/views/character/spells/spellDialog/spellDialog.html b/rpg-docs/client/views/character/spells/spellDialog/spellDialog.html index cee3b459..07d9faa7 100644 --- a/rpg-docs/client/views/character/spells/spellDialog/spellDialog.html +++ b/rpg-docs/client/views/character/spells/spellDialog/spellDialog.html @@ -1,36 +1,38 @@ diff --git a/rpg-docs/client/views/character/spells/spellDialog/spellDialog.js b/rpg-docs/client/views/character/spells/spellDialog/spellDialog.js index 9b2c7ad9..601b67a2 100644 --- a/rpg-docs/client/views/character/spells/spellDialog/spellDialog.js +++ b/rpg-docs/client/views/character/spells/spellDialog/spellDialog.js @@ -24,7 +24,7 @@ Template.spellDialog.events({ "tap #deleteButton": function(event, instance){ Spells.softRemoveNode(instance.data.spellId); GlobalUI.deletedToast(instance.data.spellId, "Spells", "Spell"); - GlobalUI.closeDetail(); + popDialogStack(); }, }); @@ -47,10 +47,6 @@ Template.spellDetails.helpers({ }, }); -Template.spellEdit.onRendered(function(){ - updatePolymerInputs(this); -}); - Template.spellEdit.helpers({ spellLists: function(){ return SpellLists.find({charId: this.charId}, {fields: {name: 1}}); @@ -70,55 +66,92 @@ Template.spellEdit.helpers({ }, }); +const debounce = (f) => _.debounce(f, 300); + Template.spellEdit.events({ - "change #spellNameInput, input #spellNameInput": function(event){ + "change #spellNameInput, input #spellNameInput": debounce(function(event){ + const input = event.currentTarget; + var value = input.value; + if (!value){ + input.invalid = true; + input.errorMessage = "Name is required"; + } else { + input.invalid = false; + Spells.update(this._id, { + $set: {name: value} + }, { + removeEmptyStrings: false, + trimStrings: false, + }); + } + }), + "change #castingTimeInput, input #castingTimeInput": debounce(function(event){ var value = event.currentTarget.value; - Spells.update(this._id, {$set: {name: value}}); - }, - "change #castingTimeInput": function(event){ + Spells.update(this._id, { + $set: {castingTime: value} + }, { + removeEmptyStrings: false, + trimStrings: false, + }); + }), + "change #rangeInput, input #rangeInput": debounce(function(event){ var value = event.currentTarget.value; - Spells.update(this._id, {$set: {castingTime: value}}); - }, - "change #rangeInput": function(event){ + Spells.update(this._id, { + $set: {range: value} + }, { + removeEmptyStrings: false, + trimStrings: false, + }); + }), + "change #durationInput, input #durationInput": debounce(function(event){ var value = event.currentTarget.value; - Spells.update(this._id, {$set: {range: value}}); - }, - "change #durationInput": function(event){ + Spells.update(this._id, { + $set: {duration: value} + }, { + removeEmptyStrings: false, + trimStrings: false, + }); + }), + "change #materialInput, input #materialInput": debounce(function(event){ var value = event.currentTarget.value; - Spells.update(this._id, {$set: {duration: value}}); - }, - "change #materialInput": function(event){ + Spells.update(this._id, { + $set: {"components.material": value} + }, { + removeEmptyStrings: false, + trimStrings: false, + }); + }), + "input #descriptionInput": debounce(function(event){ var value = event.currentTarget.value; - Spells.update(this._id, {$set: {"components.material": value}}); - }, - "change #descriptionInput": function(event){ - var value = event.currentTarget.value; - Spells.update(this._id, {$set: {"description": value}}); - }, - "core-select #listDropdown": function(event){ + Spells.update(this._id, { + $set: {"description": value} + }, { + removeEmptyStrings: false, + trimStrings: false, + }); + }), + "iron-select #listDropdown": function(event){ var detail = event.originalEvent.detail; - if (!detail.isSelected) return; var value = detail.item.getAttribute("name"); if (value == this.parent.id) return; - Spells.update(this._id, {$set: {"parent.id": value}}); + Spells.update(this._id, { + $set: {"parent.id": value} + }); }, - "core-select #levelDropdown": function(event){ + "iron-select #levelDropdown": function(event){ var detail = event.originalEvent.detail; - if (!detail.isSelected) return; var value = detail.item.getAttribute("name"); if (value == this.level) return; Spells.update(this._id, {$set: {level: value}}); }, - "core-select #schoolDropdown": function(event){ + "iron-select #schoolDropdown": function(event){ var detail = event.originalEvent.detail; - if (!detail.isSelected) return; var value = detail.item.getAttribute("name"); if (value == this.school) return; Spells.update(this._id, {$set: {school: value}}); }, - "core-select #preparedDropdown": function(event){ + "iron-select #preparedDropdown": function(event){ var detail = event.originalEvent.detail; - if (!detail.isSelected) return; var value = detail.item.getAttribute("name"); if (value == this.school) return; Spells.update(this._id, {$set: {prepared: value}}); diff --git a/rpg-docs/client/views/character/spells/spellListDialog/spellListDialog.html b/rpg-docs/client/views/character/spells/spellListDialog/spellListDialog.html index 3bed65e6..8063d957 100644 --- a/rpg-docs/client/views/character/spells/spellListDialog/spellListDialog.html +++ b/rpg-docs/client/views/character/spells/spellListDialog/spellListDialog.html @@ -2,10 +2,10 @@ {{#with spellList}} {{#baseDialog title=name class=colorClass startEditing=../startEditing}}
-
+
{{#if attackBonus}}
- Attack Bonus: {{evaluate charId attackBonus}} + Attack Bonus: {{evaluateSigned charId attackBonus}}
{{/if}} {{#if saveDC}} @@ -15,7 +15,7 @@ {{/if}} {{#if maxPrepared}}
- Max Prepared: {{evaluateSigned charId maxPrepared}} + Max Prepared Spells: {{evaluate charId maxPrepared}}
{{/if}}
@@ -23,36 +23,26 @@
{{#markdown}}{{evaluateString charId description}}{{/markdown}}
{{else}} +
- + + -
+ + {{> formulaSuffix}} + -
+ + {{> formulaSuffix}} + -
+ + {{> formulaSuffix}} + - - - - - + + +
{{/baseDialog}} {{/with}} - \ No newline at end of file + diff --git a/rpg-docs/client/views/character/spells/spellListDialog/spellListDialog.js b/rpg-docs/client/views/character/spells/spellListDialog/spellListDialog.js index 60065831..c967d72c 100644 --- a/rpg-docs/client/views/character/spells/spellListDialog/spellListDialog.js +++ b/rpg-docs/client/views/character/spells/spellListDialog/spellListDialog.js @@ -1,48 +1,80 @@ -Template.spellListDialog.onRendered(function(){ - updatePolymerInputs(this); +Template.spellListDialog.helpers({ + spellList: function(){ + return SpellLists.findOne(this.spellListId); + } }); +const debounce = (f) => _.debounce(f, 300); + Template.spellListDialog.events({ "color-change": function(event, instance){ SpellLists.update(instance.data.spellListId, {$set: {color: event.color}}); }, - "tap #deleteButton": function(event, instance){ + "click #deleteButton": function(event, instance){ SpellLists.softRemoveNode(instance.data.spellListId); GlobalUI.deletedToast( instance.data.spellListId, "SpellLists", "Spell list and contents" ); - GlobalUI.closeDetail(); + popDialogStack(); }, //TODO clean up String -> num here so they don't need casting by Schema.clean //TODO validate input (integer, non-negative, etc) for these inputs and give validation errors - "change #spellListNameInput, input #spellListNameInput": function(event){ + "change #spellListNameInput, input #spellListNameInput": + debounce(function(event){ + const input = event.currentTarget; + var value = input.value; + if (!value){ + input.invalid = true; + input.errorMessage = "Name is required"; + } else { + input.invalid = false; + SpellLists.update(this._id, { + $set: {name: value} + }, { + removeEmptyStrings: false, + trimStrings: false, + }); + } + }), + "change #spellListSaveDCInput, input #spellListSaveDCInput": + debounce(function(event){ var value = event.currentTarget.value; - SpellLists.update(this._id, {$set: {name: value}}); - }, - "change #spellListSaveDCInput, input #spellListSaveDCInput": function(event){ - var value = event.currentTarget.value; - SpellLists.update(this._id, {$set: {saveDC: value}}); - }, + SpellLists.update(this._id, { + $set: {saveDC: value} + }, { + removeEmptyStrings: false, + trimStrings: false, + }); + }), "change #spellListAttackBonusInput, input #spellListAttackBonusInput": - function(event){ + debounce(function(event){ var value = event.currentTarget.value; - SpellLists.update(this._id, {$set: {attackBonus: value}}); - }, + SpellLists.update(this._id, { + $set: {attackBonus: value} + }, { + removeEmptyStrings: false, + trimStrings: false, + }); + }), "change #spellListMaxPreparedInput, input #spellListMaxPreparedInput": - function(event){ + debounce(function(event){ var value = event.currentTarget.value; - SpellLists.update(this._id, {$set: {maxPrepared: value}}); - }, - "change #spellListDescriptionInput": function(event){ + SpellLists.update(this._id, { + $set: {maxPrepared: value} + }, { + removeEmptyStrings: false, + trimStrings: false, + }); + }), + "input #spellListDescriptionInput": debounce(function(event){ var value = event.currentTarget.value; - SpellLists.update(this._id, {$set: {description: value}}); - }, -}); - -Template.spellListDialog.helpers({ - spellList: function(){ - return SpellLists.findOne(this.spellListId); - } + SpellLists.update(this._id, { + $set: {description: value} + }, { + removeEmptyStrings: false, + trimStrings: false, + }); + }), }); diff --git a/rpg-docs/client/views/character/spells/spells.css b/rpg-docs/client/views/character/spells/spells.css index 4b00a80c..148d2d0f 100644 --- a/rpg-docs/client/views/character/spells/spells.css +++ b/rpg-docs/client/views/character/spells/spells.css @@ -6,7 +6,7 @@ height: 56px; } -#spells .inventoryItem core-icon{ +#spells .inventoryItem iron-icon{ width: 32px; height: 32px; } @@ -18,7 +18,7 @@ cursor: pointer !important; } -#spells .inventoryItem[disabled] core-icon{ +#spells .inventoryItem[disabled] iron-icon{ color: #ccc !important; color: rgba(0,0,0,0.26) !important; } @@ -67,17 +67,15 @@ margin: 4px; } -.spellList .containerMain { - -ms-column-width: 300px; - -webkit-column-width: 300px; - -moz-column-width: 300px; +.spellList.card .bottom.list { column-width: 300px; - -ms-column-gap: 8px; - -webkit-column-gap: 8px; - -moz-column-gap: 8px; column-gap: 8px; - -moz-column-fill: balance; column-fill: balance; + padding: 16px 4px; +} + +.spellList .bottom .paper-font-subhead { + margin-left: 16px; } .spellLevel { diff --git a/rpg-docs/client/views/character/spells/spells.html b/rpg-docs/client/views/character/spells/spells.html index 4dc1a671..35c0736e 100644 --- a/rpg-docs/client/views/character/spells/spells.html +++ b/rpg-docs/client/views/character/spells/spells.html @@ -1,147 +1,145 @@ diff --git a/rpg-docs/client/views/character/spells/spells.js b/rpg-docs/client/views/character/spells/spells.js index 067160d1..e7cf0ad7 100644 --- a/rpg-docs/client/views/character/spells/spells.js +++ b/rpg-docs/client/views/character/spells/spells.js @@ -11,13 +11,17 @@ var spellLevels = [ {name: "Level 9", level: 9}, ]; +const showUnprepared = (listId) => { + return Session.get(`showUnprepared.${listId}`); +} + Template.spells.helpers({ spellLists: function(){ return SpellLists.find({charId: this._id}, {sort: {color: 1, name: 1}}); }, spellCount: function(list, charId){ - if (!list || !list.settings) return; - if (list.settings.showUnprepared){ + if (!list) return; + if (showUnprepared(list._id)){ return Spells.find( {charId: charId, "parent.id": list._id, level: this.level}, {fields: {_id: 1, level: 1}} @@ -43,6 +47,9 @@ Template.spells.helpers({ levels: function(){ return spellLevels; }, + showUnprepared: function(listId){ + return showUnprepared(listId); + }, numPrepared: function(){ return Spells.find({ charId: Template.parentData()._id, @@ -72,8 +79,8 @@ Template.spells.helpers({ isPrepared: function(){ return this.prepared === "prepared" || this.prepared === "always"; }, - showSpell: function(listShowPrepped){ - if (listShowPrepped) { + showSpell: function(listId){ + if (showUnprepared(listId)) { return true; } else { return this.prepared === "prepared" || this.prepared === "always"; @@ -84,7 +91,9 @@ Template.spells.helpers({ }, cantCast: function(level, char){ for (var i = level; i <= 9; i++){ - if (Characters.calculate.attributeValue(char._id, "level" + i + "SpellSlots") > 0){ + if (Characters.calculate.attributeValue( + char._id, "level" + i + "SpellSlots" + ) > 0){ return false; } } @@ -97,21 +106,27 @@ Template.spells.helpers({ }, hasSlots: function(){ for (var i = 1; i <= 9; i += 1){ - if (Characters.calculate.attributeBase(this._id, "level" + i + "SpellSlots")){ + if (Characters.calculate.attributeBase( + this._id, "level" + i + "SpellSlots" + )){ return true; } } return false; }, slotBubbles: function(char){ - var baseSlots = Characters.calculate.attributeBase(char._id, "level" + this.level + "SpellSlots"); - var currentSlots = Characters.calculate.attributeValue(char._id, "level" + this.level + "SpellSlots"); + var baseSlots = Characters.calculate.attributeBase( + char._id, "level" + this.level + "SpellSlots" + ); + var currentSlots = Characters.calculate.attributeValue( + char._id, "level" + this.level + "SpellSlots" + ); var slotsUsed = baseSlots - currentSlots; var bubbles = []; var i; for (i = 0; i < currentSlots; i++){ bubbles.push({ - icon: "radio-button-on", + icon: "radio-button-checked", disabled: i !== currentSlots - 1 || !canEditCharacter(char._id), //last full slot not disabled attribute: "level" + this.level + "SpellSlots", charId: char._id, @@ -119,7 +134,7 @@ Template.spells.helpers({ } for (i = 0; i < slotsUsed; i++){ bubbles.push({ - icon: "radio-button-off", + icon: "radio-button-unchecked", disabled: i !== 0 || !canEditCharacter(char._id), //first empty slot not disabled attribute: "level" + this.level + "SpellSlots", charId: char._id, @@ -133,11 +148,11 @@ Template.spells.helpers({ }); Template.spells.events({ - "tap .slotBubble": function(event){ + "click .slotBubble": function(event){ var modifier; if (!event.currentTarget.disabled){ var char = Characters.findOne(this.charId); - if (event.currentTarget.icon === "radio-button-off"){ + if (event.currentTarget.icon === "radio-button-unchecked"){ if ( Characters.calculate.attributeValue(char._id, this.attribute) < Characters.calculate.attributeBase(char._id, this.attribute) @@ -156,51 +171,49 @@ Template.spells.events({ } event.stopPropagation(); }, - "tap .spellSlot": function(event, instance) { + "click .spellSlot": function(event, instance) { var name = "Level " + this.level + " Spell Slots"; var stat = "level" + this.level + "SpellSlots"; var charId = instance.data._id; - GlobalUI.setDetail({ + pushDialogStack({ template: "attributeDialog", data: {name: name, statName: stat, charId: charId}, - heroId: charId + stat, + element: event.currentTarget, }); }, - "tap .spellList .top": function(event){ - GlobalUI.setDetail({ + "click .spellList .top": function(event){ + pushDialogStack({ template: "spellListDialog", data: {spellListId: this._id, charId: this.charId}, - heroId: this._id, + element: event.currentTarget.parentElement, }); }, - "tap .spell": function(event){ - GlobalUI.setDetail({ + "click .spell": function(event){ + pushDialogStack({ template: "spellDialog", data: {spellId: this._id, charId: this.charId}, - heroId: this._id, + element: event.currentTarget, }); }, - "tap .addSpellList": function(event){ + "click .addSpellList": function(event, instance){ var charId = this.charId; - SpellLists.insert({ + var id = SpellLists.insert({ name: "New SpellList", charId: this._id, saveDC: "8 + intelligenceMod + proficiencyBonus", attackBonus: "intelligenceMod + proficiencyBonus", - }, function(error, id){ - if (!error){ - GlobalUI.setDetail({ - template: "spellListDialog", - data: {spellListId: id, charId: charId, startEditing: true}, - heroId: id, - }); - } + }); + pushDialogStack({ + template: "spellListDialog", + data: {spellListId: id, charId: charId, startEditing: true}, + element: event.currentTarget, + returnElement: () => instance.find(`.spellList[data-id='${id}']`), }); }, - "tap .addSpell": function(event){ + "click .addSpell": function(event, instance){ var charId = this.charId; var listId = SpellLists.findOne({charId: this._id})._id; - Spells.insert({ + var id = Spells.insert({ name: "New Spell", charId: this._id, parent: { @@ -208,17 +221,15 @@ Template.spells.events({ collection: "SpellLists", }, prepared: "prepared", - }, function(error, id){ - if (!error){ - GlobalUI.setDetail({ - template: "spellDialog", - data: {spellId: id, charId: charId, startEditing: true}, - heroId: id, - }); - } + }); + pushDialogStack({ + template: "spellDialog", + data: {spellId: id, charId: charId, startEditing: true}, + element: event.currentTarget, + returnElement: () => instance.find(`.spell[data-id='${id}']`), }); }, - "tap .preparedCheckbox": function(event){ + "click .preparedCheckbox": function(event){ event.stopPropagation(); }, "change .preparedCheckbox": function(event){ @@ -228,12 +239,12 @@ Template.spells.events({ else if (this.prepared === "prepared" && !value) Spells.update(this._id, {$set: {prepared: "unprepared"}}); }, - "tap .prepSpells": function(event){ - SpellLists.update(this._id, {$set: {"settings.showUnprepared": true}}); + "click .prepSpells": function(event){ + Session.set(`showUnprepared.${this._id}`, true); event.stopPropagation(); }, - "tap .finishPrep": function(event){ - SpellLists.update(this._id, {$set: {"settings.showUnprepared": false}}); + "click .finishPrep": function(event){ + Session.set(`showUnprepared.${this._id}`, false); event.stopPropagation(); }, }); diff --git a/rpg-docs/client/views/character/stats/abilityCards/abilityCards.css b/rpg-docs/client/views/character/stats/abilityCards/abilityCards.css new file mode 100644 index 00000000..52be38a1 --- /dev/null +++ b/rpg-docs/client/views/character/stats/abilityCards/abilityCards.css @@ -0,0 +1,23 @@ +.ability-mini-card { + min-width: 75px; + text-align: center; + cursor: pointer; + -webkit-margin-collapse: separate; + background: #fff; +} + +.ability-mini-card .title { + padding: 16px; +} + +.ability-mini-card .numbers { + min-width: 72px; + padding: 16px; +} + +.ability-mini-card .modifier { + font-weight: 600; + font-size: 24px; + color: #747474; + color: rgba(0,0,0,0.54); +} diff --git a/rpg-docs/client/views/character/stats/abilityCards/abilityCards.html b/rpg-docs/client/views/character/stats/abilityCards/abilityCards.html index f82ffe0c..fb21d972 100644 --- a/rpg-docs/client/views/character/stats/abilityCards/abilityCards.html +++ b/rpg-docs/client/views/character/stats/abilityCards/abilityCards.html @@ -1,16 +1,17 @@ diff --git a/rpg-docs/client/views/character/stats/addTHPDialog/addTHPDialog.html b/rpg-docs/client/views/character/stats/addTHPDialog/addTHPDialog.html index 197e54f2..c5044dc5 100644 --- a/rpg-docs/client/views/character/stats/addTHPDialog/addTHPDialog.html +++ b/rpg-docs/client/views/character/stats/addTHPDialog/addTHPDialog.html @@ -1,14 +1,28 @@ diff --git a/rpg-docs/client/views/character/stats/addTHPDialog/addTHPDialog.js b/rpg-docs/client/views/character/stats/addTHPDialog/addTHPDialog.js index 030acd42..c49bd6b1 100644 --- a/rpg-docs/client/views/character/stats/addTHPDialog/addTHPDialog.js +++ b/rpg-docs/client/views/character/stats/addTHPDialog/addTHPDialog.js @@ -1,5 +1,10 @@ +Template.addTHPDialog.onRendered(function(){ + this.find("#quantityInput").focus(); +}); + Template.addTHPDialog.events({ - "tap #addButton": function(event, instance){ + "tap .addButton": function(event, instance){ + popDialogStack(); var max = +instance.find("#quantityInput").value; if (!max || max < 0) max = 0; TemporaryHitPoints.insert({ @@ -8,5 +13,8 @@ Template.addTHPDialog.events({ maximum: max, deleteOnZero: !!instance.find("#deleteWhenZeroCheckbox").checked, }); - } + }, + "tap .cancelButton": function(event, instance){ + popDialogStack(); + }, }); diff --git a/rpg-docs/client/views/character/stats/attributeDialog/attributeDialog.html b/rpg-docs/client/views/character/stats/attributeDialog/attributeDialog.html index f2b06de5..ec9f313f 100644 --- a/rpg-docs/client/views/character/stats/attributeDialog/attributeDialog.html +++ b/rpg-docs/client/views/character/stats/attributeDialog/attributeDialog.html @@ -6,12 +6,12 @@ diff --git a/rpg-docs/client/views/character/stats/attributeDialog/strengthDialog/strengthDialog.html b/rpg-docs/client/views/character/stats/attributeDialog/strengthDialog/strengthDialog.html index 5e22564f..88a05987 100644 --- a/rpg-docs/client/views/character/stats/attributeDialog/strengthDialog/strengthDialog.html +++ b/rpg-docs/client/views/character/stats/attributeDialog/strengthDialog/strengthDialog.html @@ -3,9 +3,9 @@ {{> attributeDialogView}}
-
Carrying
+
Carrying
{{> carryCapacityTable}} -
Jumping
+
Jumping
@@ -18,7 +18,7 @@ - - - + - - - +
Running long jump
Running high jump {{evaluate charId "3 + strengthMod"}} feet + Can reach a ledge as high as {{evaluate charId "3 + strengthMod"}} feet + 1.5× your height @@ -27,7 +27,7 @@
Standing high jump {{evaluate charId "floor((3 + strengthMod)/2)"}} feet + Can reach a ledge as high as {{evaluate charId "floor((3 + strengthMod)/2)"}} feet + 1.5× your height diff --git a/rpg-docs/client/views/character/stats/carryCapacityTable/carryCapacityTable.html b/rpg-docs/client/views/character/stats/carryCapacityTable/carryCapacityTable.html index e6f67f02..b47e29a7 100644 --- a/rpg-docs/client/views/character/stats/carryCapacityTable/carryCapacityTable.html +++ b/rpg-docs/client/views/character/stats/carryCapacityTable/carryCapacityTable.html @@ -3,26 +3,26 @@
Encumbered >{{evaluate charId "strength * 5 * carryMultiplier"}}lbsVariant rule, encumbered characters move 10 feet slowerVariant rule, encumbered characters move 10 feet slower
Heavily encumbered >{{evaluate charId "strength * 10 * carryMultiplier"}}lbs + Variant rule, heavily encumbered characters move 20 feet slower and have disadvantage on ability checks, attack rolls, and saving thows that use Strength, Dexterity, or Constitution
Over Encumbered >{{evaluate charId "strength * 15 * carryMultiplier"}}lbs + Characters that can only just lift, push or drag their current load can only move at 5 feet.
Push, drag or lift maximum {{evaluate charId "strength * 30 * carryMultiplier"}}lbs
diff --git a/rpg-docs/client/views/character/stats/healthCard/healthCard.css b/rpg-docs/client/views/character/stats/healthCard/healthCard.css index 98280aaf..03733970 100644 --- a/rpg-docs/client/views/character/stats/healthCard/healthCard.css +++ b/rpg-docs/client/views/character/stats/healthCard/healthCard.css @@ -3,24 +3,20 @@ margin-right: 8px; } -/*Slider knob color*/ -#hitPointSlider::shadow #sliderKnobInner { - background-color: #0f9d58; +.healthCard #stableButton { + color: #b71c1c; + transition: color 0.4s ease; + width: 100% } -/*Slider pin*/ -#hitPointSlider::shadow #sliderKnobInner::before { - background-color: #0f9d58; - height: 32px; - width: 32px; +.healthCard #stableButton:before { + content: "Unstable"; } -/*Slider pin text*/ -#hitPointSlider::shadow #sliderKnob > #sliderKnobInner::after { - font-size: 16px; +.healthCard #stableButton.stable { + color: #1b5e20; } -/*Slider bar*/ -#hitPointSlider::shadow #sliderBar::shadow #activeProgress { - background-color: #0f9d58; +.healthCard #stableButton.stable:before{ + content: "Stable"; } diff --git a/rpg-docs/client/views/character/stats/healthCard/healthCard.html b/rpg-docs/client/views/character/stats/healthCard/healthCard.html index f9626b51..3309c710 100644 --- a/rpg-docs/client/views/character/stats/healthCard/healthCard.html +++ b/rpg-docs/client/views/character/stats/healthCard/healthCard.html @@ -1,45 +1,42 @@ diff --git a/rpg-docs/client/views/character/stats/healthCard/healthCard.js b/rpg-docs/client/views/character/stats/healthCard/healthCard.js index 6fe9a7c8..364b4dd5 100644 --- a/rpg-docs/client/views/character/stats/healthCard/healthCard.js +++ b/rpg-docs/client/views/character/stats/healthCard/healthCard.js @@ -10,12 +10,12 @@ Template.healthCard.helpers({ return char && char.deathSave; }, failIcon: function(num){ - if (num <= this.fail) return "radio-button-on"; - else return "radio-button-off"; + if (num <= this.fail) return "radio-button-checked"; + else return "radio-button-unchecked"; }, passIcon: function(num){ - if (num <= this.pass) return "radio-button-on"; - else return "radio-button-off"; + if (num <= this.pass) return "radio-button-checked"; + else return "radio-button-unchecked"; }, failDisabled: function(num){ return !(num === this.fail || num - 1 === this.fail); @@ -27,6 +27,7 @@ Template.healthCard.helpers({ return this.fail >= 3; }, multipliers: function(){ + // jscs:disable maximumLineLength var multipliers = [ {name: "Acid", value: Characters.calculate.attributeValue(this._id, "acidMultiplier")}, {name: "Bludgeoning", value: Characters.calculate.attributeValue(this._id, "bludgeoningMultiplier")}, @@ -42,6 +43,7 @@ Template.healthCard.helpers({ {name: "Slashing", value: Characters.calculate.attributeValue(this._id, "slashingMultiplier")}, {name: "Thunder", value: Characters.calculate.attributeValue(this._id, "thunderMultiplier")}, ]; + // jscs:enable maximumLineLength multipliers = _.groupBy(multipliers, "value"); return { "immunities": multipliers["0"] || [], @@ -54,7 +56,7 @@ Template.healthCard.helpers({ Template.healthCard.events({ "change #hitPointSlider": function(event){ var value = event.currentTarget.value; - var base = Characters.calculate.attributeBase(this._id, "hitPoints") + var base = Characters.calculate.attributeBase(this._id, "hitPoints"); var adjustment = value - base; Characters.update(this._id, {$set: {"hitPoints.adjustment": adjustment}}); //reset the death saves if we are gaining HP @@ -73,39 +75,42 @@ Template.healthCard.events({ var used = this.maximum - value; TemporaryHitPoints.update(this._id, {$set: {"used": used}}); }, - "tap .deleteTHP": function(event){ + "click .deleteTHP": function(event){ TemporaryHitPoints.remove(this._id); }, - "tap #addTempHP": function(event){ - GlobalUI.showDialog({ + "click #addTempHP": function(event){ + pushDialogStack({ template: "addTHPDialog", data: {charId: this._id}, + element: event.currentTarget.parentElement, }); }, - "tap .failBubble": function(event){ + "click .failBubble": function(event){ if (event.currentTarget.disabled) return; var char = Template.parentData(); - if (event.currentTarget.icon === "radio-button-off"){ + if (event.currentTarget.icon === "radio-button-unchecked"){ Characters.update(char._id, {$set: {"deathSave.fail": this.fail + 1}}); } else { Characters.update(char._id, {$set: {"deathSave.fail": this.fail - 1}}); } }, - "tap .passBubble": function(event){ + "click .passBubble": function(event){ if (event.currentTarget.disabled) return; var char = Template.parentData(); - if (event.currentTarget.icon === "radio-button-off"){ + if (event.currentTarget.icon === "radio-button-unchecked"){ Characters.update(char._id, {$set: {"deathSave.pass": this.pass + 1}}); } else { Characters.update(char._id, {$set: {"deathSave.pass": this.pass - 1}}); } }, - "tap #stableButton": function(event){ - var char = Template.parentData(); - Characters.update(char._id, {$set: {"deathSave.stable": false}}); - }, - "tap #unstableButton": function(event){ - var char = Template.parentData(); - Characters.update(char._id, {$set: {"deathSave.stable": true}}); + "click #stableButton": function(event){ + var char = Characters.findOne(Template.parentData()._id, { + fields: {deathSave: 1} + }); + Characters.update(char._id, { + $set: { + "deathSave.stable": !char.deathSave.stable + } + }); }, }); diff --git a/rpg-docs/client/views/character/stats/hitDice/hitDice.html b/rpg-docs/client/views/character/stats/hitDice/hitDice.html index 7e41d789..76fe31a7 100644 --- a/rpg-docs/client/views/character/stats/hitDice/hitDice.html +++ b/rpg-docs/client/views/character/stats/hitDice/hitDice.html @@ -1,35 +1,31 @@ diff --git a/rpg-docs/client/views/character/stats/hitDice/hitDice.js b/rpg-docs/client/views/character/stats/hitDice/hitDice.js index 4e49f4b3..90afb5ba 100644 --- a/rpg-docs/client/views/character/stats/hitDice/hitDice.js +++ b/rpg-docs/client/views/character/stats/hitDice/hitDice.js @@ -16,7 +16,7 @@ Template.hitDice.helpers({ }); Template.hitDice.events({ - "tap .resourceUp": function(event){ + "click .resourceUp": function(event){ var value = Characters.calculate.attributeValue(this.char._id, this.name); var base = Characters.calculate.attributeBase(this.char._id, this.name); if (value < base){ @@ -25,7 +25,7 @@ Template.hitDice.events({ Characters.update(this.char._id, modifier, {validate: false}); } }, - "tap .resourceDown": function(event){ + "click .resourceDown": function(event){ var value = Characters.calculate.attributeValue(this.char._id, this.name); if (value > 0){ var modifier = {$inc: {}}; @@ -33,10 +33,10 @@ Template.hitDice.events({ Characters.update(this.char._id, modifier, {validate: false}); } }, - "tap .right": function() { + "click .right": function(event, template) { var charId = Template.parentData()._id; var title = "d" + this.diceNum + " Hit Dice"; - GlobalUI.setDetail({ + pushDialogStack({ template: "attributeDialog", data: { name: title, @@ -44,7 +44,7 @@ Template.hitDice.events({ charId: charId, color: "green", }, - heroId: charId + this.name, + element: event.currentTarget.parentElement, }); }, }); diff --git a/rpg-docs/client/views/character/stats/skillDialog/skillDialog.html b/rpg-docs/client/views/character/stats/skillDialog/skillDialog.html index 10953f17..8edf4caa 100644 --- a/rpg-docs/client/views/character/stats/skillDialog/skillDialog.html +++ b/rpg-docs/client/views/character/stats/skillDialog/skillDialog.html @@ -6,12 +6,12 @@ diff --git a/rpg-docs/client/views/character/stats/skillRow/skillRow.js b/rpg-docs/client/views/character/stats/skillRow/skillRow.js index fae6145a..20915294 100644 --- a/rpg-docs/client/views/character/stats/skillRow/skillRow.js +++ b/rpg-docs/client/views/character/stats/skillRow/skillRow.js @@ -12,7 +12,7 @@ Template.skillRow.helpers({ if (prof > 0 && prof < 1) return "image:brightness-2"; if (prof === 1) return "image:brightness-1"; if (prof > 1) return "av:album"; - return "radio-button-off"; + return "radio-button-unchecked"; }, failSkill: function(){ var charId = Template.parentData()._id; diff --git a/rpg-docs/client/views/character/stats/skillRow/skillRow.scss b/rpg-docs/client/views/character/stats/skillRow/skillRow.scss deleted file mode 100644 index 11499723..00000000 --- a/rpg-docs/client/views/character/stats/skillRow/skillRow.scss +++ /dev/null @@ -1,21 +0,0 @@ -.skill-row { - .skill-mod{ - width: 45px; - text-align: center; - &.fail { - color: #D50000; - } - &.advantage{ - background-image: url(/png/advantage/greenUp.png); - background-size: contain; - background-repeat: no-repeat; - background-position: center; - } - &.disadvantage{ - background-image: url(/png/advantage/redDown.png); - background-size: contain; - background-repeat: no-repeat; - background-position: center; - } - } -} \ No newline at end of file diff --git a/rpg-docs/client/views/character/stats/statCard/statCard.css b/rpg-docs/client/views/character/stats/statCard/statCard.css new file mode 100644 index 00000000..04a9250e --- /dev/null +++ b/rpg-docs/client/views/character/stats/statCard/statCard.css @@ -0,0 +1,16 @@ +.stat-card { + min-width: 75px; + text-align: center; + cursor: pointer; + -webkit-margin-collapse: separate; + background: #fff; +} + +.stat-card .title { + padding: 16px; +} + +.stat-card .numbers { + min-width: 72px; + padding: 16px; +} diff --git a/rpg-docs/client/views/character/stats/statCard/statCard.html b/rpg-docs/client/views/character/stats/statCard/statCard.html new file mode 100644 index 00000000..bf3ef3f7 --- /dev/null +++ b/rpg-docs/client/views/character/stats/statCard/statCard.html @@ -0,0 +1,16 @@ + diff --git a/rpg-docs/client/views/character/stats/statCard/statCard.js b/rpg-docs/client/views/character/stats/statCard/statCard.js new file mode 100644 index 00000000..32a89cad --- /dev/null +++ b/rpg-docs/client/views/character/stats/statCard/statCard.js @@ -0,0 +1,9 @@ +Template.statCard.helpers({ + skillMod: function() { + return signedString( + Characters.calculate.skillMod( + Template.parentData()._id, this.stat + ) + ); + }, +}); diff --git a/rpg-docs/client/views/character/stats/stats.css b/rpg-docs/client/views/character/stats/stats.css index 343afeb5..fe8f696e 100644 --- a/rpg-docs/client/views/character/stats/stats.css +++ b/rpg-docs/client/views/character/stats/stats.css @@ -46,6 +46,6 @@ background-color: rgba(0,0,0,0.6); } -section:not(.core-selected):not([animate]) paper-shadow[hero] { +section:not(.core-selected):not([animate]) paper-material[hero] { visibility: hidden; } \ No newline at end of file diff --git a/rpg-docs/client/views/character/stats/stats.html b/rpg-docs/client/views/character/stats/stats.html index 6aeff4c7..3a5ce782 100644 --- a/rpg-docs/client/views/character/stats/stats.html +++ b/rpg-docs/client/views/character/stats/stats.html @@ -1,5 +1,5 @@ - - diff --git a/rpg-docs/client/views/character/stats/stats.js b/rpg-docs/client/views/character/stats/stats.js index 0cf7b922..f38934b8 100644 --- a/rpg-docs/client/views/character/stats/stats.js +++ b/rpg-docs/client/views/character/stats/stats.js @@ -1,78 +1,68 @@ Template.stats.events({ - "tap .statCard": function(event, instance){ + "click .stat-card": function(event, instance){ var charId = instance.data._id; if (this.isSkill){ - GlobalUI.setDetail({ + pushDialogStack({ template: "skillDialog", - data: { + data: { name: this.name, skillName: this.stat, charId: charId, color: this.color, }, - heroId: charId + this.stat, + element: event.currentTarget, }); } else { - GlobalUI.setDetail({ + pushDialogStack({ template: "attributeDialog", - data: { + data: { name: this.name, statName: this.stat, charId: charId, color: this.color, }, - heroId: charId + this.stat, + element: event.currentTarget, }); } }, - "tap .abilityMiniCard": function(event, instance){ + "click .ability-mini-card": function(event, instance){ var charId = Template.parentData()._id; var template = "attributeDialog"; if (this.ability === "strength") template = "strengthDialog"; - GlobalUI.setDetail({ + pushDialogStack({ template: template, - data: { + data: { name: this.title, statName: this.ability, charId: charId, color: this.color, }, - heroId: charId + this.ability, + element: event.currentTarget, }); }, "tap .skill-row": function(event, instance){ var skill = this.skill; var charId = instance.data._id; - GlobalUI.setDetail({ + pushDialogStack({ template: "skillDialog", - data: { + data: { name: this.name, skillName: skill, charId: charId, }, - heroId: charId + skill, + element: event.currentTarget, }); }, "tap .hitPointTitle": function(event, instance) { - GlobalUI.setDetail({ + pushDialogStack({ template: "attributeDialog", - data: { + data: { name: "Hit Points", statName: "hitPoints", charId: this._id, color: "green", }, - heroId: this._id + "hitPoints", + element: event.currentTarget.parentElement.parentElement, }); }, }); - -Template.statCard.helpers({ - skillMod: function() { - return signedString( - Characters.calculate.skillMod( - Template.parentData()._id, this.stat - ) - ); - }, -}); diff --git a/rpg-docs/client/views/characterList/characterList.css b/rpg-docs/client/views/characterList/characterList.css index e457e32e..f25313b8 100644 --- a/rpg-docs/client/views/characterList/characterList.css +++ b/rpg-docs/client/views/characterList/characterList.css @@ -1,10 +1,35 @@ -.characterCards { - padding: 4px; +.character-card{ + background-color: #fff; + height: 300px; + min-width: 250px; + max-width: 500px; + flex-basis: 300px; + margin: 4px; + position: relative; } -.characterCard{ - width: 272px; - margin: 4px; - min-width: 272px; - flex-grow: 1; +.character-card .image { + +} + +.character-card .initials { + font-size: 100px; + color: rgba(255,255,255,0.1); + background: linear-gradient(-8deg, rgba(0,0,0,0.7), rgba(0,0,0,0)); +} + +.character-card paper-item { + padding-top: 16px; + padding-bottom: 16px; + height: 76px; + background-color: #545454; + background-color: rgba(0,0,0,0.3); +} + +.character-card .name { + font-weight: 500; +} + +.character-card paper-ripple { + color: #fff ; } diff --git a/rpg-docs/client/views/characterList/characterList.html b/rpg-docs/client/views/characterList/characterList.html index 66923574..1603eaa5 100644 --- a/rpg-docs/client/views/characterList/characterList.html +++ b/rpg-docs/client/views/characterList/characterList.html @@ -1,39 +1,55 @@ \ No newline at end of file +
+ +
+ + diff --git a/rpg-docs/client/views/characterList/characterList.js b/rpg-docs/client/views/characterList/characterList.js index a25628f2..c5971a03 100644 --- a/rpg-docs/client/views/characterList/characterList.js +++ b/rpg-docs/client/views/characterList/characterList.js @@ -1,24 +1,36 @@ Template.characterList.helpers({ - characterDetails: function(){ - var char = Characters.findOne( - this._id, - {fields: {name: 1, gender: 1, alignment: 1, race:1, color: 1}} + characters(){ + var userId = Meteor.userId(); + return Characters.find( + { + $or: [ + {readers: userId}, + {writers: userId}, + {owner: userId}, + ] + }, + { + fields: {name: 1, picture: 1, color: 1, race: 1, alignment: 1, gender: 1}, + sort: {name: 1}, + } ); - char.title = char.name; - char.field = "base"; - char.class = "characterCard"; - return char; - } -}); + }, + initials(name){ + return name.replace(/[^A-Z]/g, ""); + }, +}) Template.characterList.events({ - "tap .characterCard": function(event, instance){ - Router.go("characterSheet", {_id: this._id}); - }, "tap .addCharacter": function(event, template) { - GlobalUI.showDialog({ - heading: "New Character", + pushDialogStack({ template: "newCharacterDialog", - }); + element: event.currentTarget, + callback(character){ + if (!character) return; + character.owner = Meteor.userId(); + let _id = Characters.insert(character); + Router.go("characterSheet", {_id}); + }, + }) }, }); diff --git a/rpg-docs/client/views/characterList/characterSideList.css b/rpg-docs/client/views/characterList/characterSideList.css index 6e09e834..e48e0b94 100644 --- a/rpg-docs/client/views/characterList/characterSideList.css +++ b/rpg-docs/client/views/characterList/characterSideList.css @@ -1,23 +1,9 @@ -.singleLineItem { - color: black; - color: rgba(0, 0, 0, 0.870588); - cursor: pointer; - overflow: hidden; - padding: 8px 0 8px 16px; - text-overflow: ellipsis; - white-space: nowrap; - text-decoration: none; -} +/* + prevent character names from wrapping + */ -.singleLineItem core-icon { - height: 8px; - margin-right: 8px; - width: 8px; -} - -.singleLineItem div { - text-overflow: ellipsis; - /* Required for text-overflow to do anything */ +.character-name { white-space: nowrap; overflow: hidden; + text-overflow: ellipsis; } diff --git a/rpg-docs/client/views/characterList/characterSideList.html b/rpg-docs/client/views/characterList/characterSideList.html index 5cde2abe..5ba80b22 100644 --- a/rpg-docs/client/views/characterList/characterSideList.html +++ b/rpg-docs/client/views/characterList/characterSideList.html @@ -1,13 +1,13 @@ diff --git a/rpg-docs/client/views/feedback/feedback.js b/rpg-docs/client/views/feedback/feedback.js index fd2ceb29..ee3db5da 100644 --- a/rpg-docs/client/views/feedback/feedback.js +++ b/rpg-docs/client/views/feedback/feedback.js @@ -18,16 +18,19 @@ Template.feedback.events({ "input #feedbackDescription": function(event, instance) { instance.description.set(instance.find("#feedbackDescription").value); }, - "tap #sendButton": function(event, instance) { + "click #sendButton": function(event, instance) { var report = {}; report.title = instance.find("#feedbackTitle").value; report.severity = instance.find("#severity").value; - report.type = instance.find(".typeMenu").selected; + report.type = instance.find(".typeMenu").value; report.description = instance.find("#feedbackDescription").value; report.metaData = { url: window.location.href, session: _.pairs(Session.keys), }; - Meteor.call("insertReport", report); - } + popDialogStack(report); + }, + "click #cancelButton": function(event, template){ + popDialogStack(); + }, }); diff --git a/rpg-docs/client/views/guide/guide.html b/rpg-docs/client/views/guide/guide.html index c03e65bb..6efefdb5 100644 --- a/rpg-docs/client/views/guide/guide.html +++ b/rpg-docs/client/views/guide/guide.html @@ -1,94 +1,98 @@ \ No newline at end of file +

Adding a Class

+

Currently your character is at level 0, because they don't have any class levels. Let's fix that.

+ +

We now have a class, lets add the saving throw proficiencies it gives us.

+ +

If you navigate back to the stat page, you will see that you now have a proficiency bonus, based on your class level, and the saving throw you are proficienct in will take your proficiency bonus into account.

+

One of the most important things your class gives you is your hitpoints, so lets go add those now.

+ +

Now we need to decide how many hitpoints our class gives us. We will assume that we take the constant hitpoints per level, since it's both the rule used for league play and it's statistically advantageous over rolling for hitpoints every level.

+

We could work out our hit points every level and change the effect each time, but we can do one better, we can input the calculation directly into the value field and have the character sheet figure it out for us

+

Let's assume we are rolling a fighter, so in the class name you typed in "Fighter" (with the capital F, but without the quote marks). A fighter gets 10 hp at first level and 6 hitpoints every level after that.

+

Lets rather split that into 4 bonus hitpoints at first level, and 6 hitpoints for every fighter level your character has. We can the write this as 4 + 6*FighterLevel where the * represents multiplication.

+

Note, we don't add the constitution modifier here, that's already taken care of by default, since all characters add their constitution modifier to their hit points

+ +

You can try all sorts of calculations in your effects and in certain other places too. For example if you had some feature that is used a number of times equal to your wisdom modifier or 1, whichever is lower, you could limit its uses to min(1, wisdomMod) and the character sheet will figure it out for you, and update itself if you wisdom modifier happens to change later.

+ +
+ + diff --git a/rpg-docs/client/views/home/home.html b/rpg-docs/client/views/home/home.html index 053a016d..1ef4d03b 100644 --- a/rpg-docs/client/views/home/home.html +++ b/rpg-docs/client/views/home/home.html @@ -1,9 +1,15 @@ \ No newline at end of file + + + + +
DiceCloud
+
+ + +
DiceCloud
+
+
+ {{> intro}} +
+ diff --git a/rpg-docs/client/views/home/intro/intro.css b/rpg-docs/client/views/home/intro/intro.css new file mode 100644 index 00000000..75c5328e --- /dev/null +++ b/rpg-docs/client/views/home/intro/intro.css @@ -0,0 +1,33 @@ +.intro .section { + width: 100%; + min-height: 200px; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + padding-top: 24px; + padding-bottom: 24px; +} + +.intro .section > div, .intro .section > h2 { + padding: 32px; +} + +.intro .section .display1 { + margin-bottom: 16px; +} + +.intro .section .columns > div { + max-width: 300px; + padding: 16px; + text-align: center; +} + +.intro paper-button { + min-width: 200px; +} + + +.intro paper-button:not([raised]) { + color: #d13b2e; +} diff --git a/rpg-docs/client/views/home/intro/intro.html b/rpg-docs/client/views/home/intro/intro.html index 89b762a5..bfd40f87 100644 --- a/rpg-docs/client/views/home/intro/intro.html +++ b/rpg-docs/client/views/home/intro/intro.html @@ -1,29 +1,30 @@ diff --git a/rpg-docs/client/views/notFound/notFound.html b/rpg-docs/client/views/notFound/notFound.html index 17bc3d1e..c919c7e1 100644 --- a/rpg-docs/client/views/notFound/notFound.html +++ b/rpg-docs/client/views/notFound/notFound.html @@ -1,7 +1,7 @@ diff --git a/rpg-docs/client/views/paperTemplates/baseDialog/baseDialog.js b/rpg-docs/client/views/paperTemplates/baseDialog/baseDialog.js index adf63f76..09526a48 100644 --- a/rpg-docs/client/views/paperTemplates/baseDialog/baseDialog.js +++ b/rpg-docs/client/views/paperTemplates/baseDialog/baseDialog.js @@ -2,14 +2,10 @@ Template.baseDialog.onCreated(function(){ this.editing = new ReactiveVar(!!this.data.startEditing); }); -Template.baseDialog.onRendered(function(){ - //after the dialog is built, open it - Session.set("global.ui.detailShow", true); -}); - Template.baseDialog.helpers({ editing: function(){ - return Template.instance().editing.get() && canEditCharacter(Template.parentData().charId); + return Template.instance().editing.get() && + canEditCharacter(Template.parentData().charId); }, showEdit: function() { if (this.hideEdit) return false; @@ -19,7 +15,7 @@ Template.baseDialog.helpers({ Template.baseDialog.events({ "tap #backButton": function(){ - GlobalUI.closeDetail(); + popDialogStack(); }, "tap #editButton": function(event, instance){ instance.editing.set(true); diff --git a/rpg-docs/client/views/paperTemplates/colorDropdown/colorDropdown.css b/rpg-docs/client/views/paperTemplates/colorDropdown/colorDropdown.css index ae4379ab..b83e917b 100644 --- a/rpg-docs/client/views/paperTemplates/colorDropdown/colorDropdown.css +++ b/rpg-docs/client/views/paperTemplates/colorDropdown/colorDropdown.css @@ -1,9 +1,4 @@ -html /deep/ .colorDropdown paper-item{ - width: 150px; -} - -html /deep/ .colorDropdown { - top: 18px; - padding: 0.5em 0 0.25em 16px; - width: 150px; +.colorDropdown paper-item { + width: 150px; + cursor: pointer; } diff --git a/rpg-docs/client/views/paperTemplates/colorDropdown/colorDropdown.html b/rpg-docs/client/views/paperTemplates/colorDropdown/colorDropdown.html index b5ac46f8..a1e756f0 100644 --- a/rpg-docs/client/views/paperTemplates/colorDropdown/colorDropdown.html +++ b/rpg-docs/client/views/paperTemplates/colorDropdown/colorDropdown.html @@ -1,24 +1,4 @@ - - diff --git a/rpg-docs/client/views/paperTemplates/colorDropdown/colorDropdown.js b/rpg-docs/client/views/paperTemplates/colorDropdown/colorDropdown.js index 94b98dc0..e6fa01b0 100644 --- a/rpg-docs/client/views/paperTemplates/colorDropdown/colorDropdown.js +++ b/rpg-docs/client/views/paperTemplates/colorDropdown/colorDropdown.js @@ -1,15 +1,28 @@ Template.colorDropdown.helpers({ colors: function(){ - return colorOptions; - } + let colors = ""; + _.each(colorOptions, (option) => { + colors += !colors ? `["${option.color}"` : `, "${option.color}"`; + }); + colors += "]"; + return colors; + }, + selectedColor: function(){ + const selected = _.find(colorOptions, (option) => option.key === this.color); + return selected && selected.color; + }, }); Template.colorDropdown.events({ - "tap .colorMenuItem": function(event, instance){ - var color = event.currentTarget.getAttribute("name"); - instance.$("#colorDropdown").trigger({ + "color-picker-selected": function(event, instance){ + var color = event.originalEvent.detail.color; + var option = _.find(colorOptions, (option) => { + return option.color === color.toUpperCase()} + ); + var key = option && option.key; + instance.$("paper-swatch-picker").trigger({ type: "color-change", - color: color, + color: key, }); } }); diff --git a/rpg-docs/client/views/paperTemplates/dialogStack/dialogStack.css b/rpg-docs/client/views/paperTemplates/dialogStack/dialogStack.css new file mode 100644 index 00000000..512b7ff7 --- /dev/null +++ b/rpg-docs/client/views/paperTemplates/dialogStack/dialogStack.css @@ -0,0 +1,91 @@ +.dialog-stack { + z-index: 1; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + visibility: visible; + transition: visibility 0s linear; +} + +.dialog-stack.hide { + visibility: hidden; + transition: visibility 0s linear 400ms; +} + +.dialog-stack .backdrop { + background: #000; + transform: translateZ(0); + opacity: 0.4; + transition: opacity 400ms linear; +} + +.dialog-stack.hide .backdrop { + opacity: 0; + transition: opacity 200ms linear; +} + +.dialog-stack .dialog-sizer { + position: relative; + height: 80%; + width: 80%; + max-width: 800px; + max-height: 600px; +} + +.dialog-stack app-toolbar { + border-radius: 2px 2px 0 0; +} + +@media (max-width: 640px) { + .dialog-stack app-toolbar { + border-radius: 0; + } +} + +@media (max-width: 640px) { + .dialog-stack .dialog-sizer { + width: 100%; + height: 100%; + max-width: initial; + max-height: initial; + } + .dialog-stack .dialog { + border-radius: 0; + } +} + +.dialog-stack .dialog { + position: absolute; + width: 100%; + height: 100%; + background: white; + box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), + 0 3px 14px 2px rgba(0, 0, 0, 0.12), + 0 5px 5px -3px rgba(0, 0, 0, 0.4); + border-radius: 2px; + transform-origin: top left; + transition: top 400ms ease, left 400ms ease; + z-index: 3; + overflow: hidden; +} + +.dialog-stack .dialog .testButton { + height: 200px; + width: 100px; + background: red; + border-radius: 30px; +} + +.dialog-stack .dialog .form { + padding: 24px; +} + +.dialog-stack .dialog .buttons { + padding: 8px 8px 8px 24px; +} + +.dialog-stack .dialog img, .dialog-stack .dialog iron-image { + max-width: 100%; +} diff --git a/rpg-docs/client/views/paperTemplates/dialogStack/dialogStack.html b/rpg-docs/client/views/paperTemplates/dialogStack/dialogStack.html new file mode 100644 index 00000000..5a0f7d28 --- /dev/null +++ b/rpg-docs/client/views/paperTemplates/dialogStack/dialogStack.html @@ -0,0 +1,32 @@ + + + + diff --git a/rpg-docs/client/views/paperTemplates/dialogStack/dialogStack.js b/rpg-docs/client/views/paperTemplates/dialogStack/dialogStack.js new file mode 100644 index 00000000..424fcd7f --- /dev/null +++ b/rpg-docs/client/views/paperTemplates/dialogStack/dialogStack.js @@ -0,0 +1,262 @@ +dialogs = new ReactiveArray(); +const offset = 16; +const duration = 400; + +pushDialogStack = function({template, data, element, returnElement, callback}){ + // Generate a new _id so that Blaze knows how to shuffle the array + const _id = Random.id(); + dialogs.push({ + _id, + template, + data, + element, + returnElement, + callback, + }); +}; + +popDialogStack = function(result){ + const dialog = dialogs.pop(); + if (!dialog) return; + dialog.callback && dialog.callback(result); +}; + +Template.dialogStack.helpers({ + dialogStackClass(){ + if (!dialogs.get().length) return "hide"; + }, + dialogs(){ + return dialogs.get(); + }, + dialogStyle(index){ + const length = dialogs.get().length; + if (index >= length) return; + const num = length - 1; + const left = (num - index) * -offset; + const top = (num - index) * -offset; + return `left:${left}px; top:${top}px;`; + }, +}); + +Template.dialogStack.events({ + "click .dialog-stack .backdrop": function(event){ + if (event.target === event.currentTarget) popDialogStack(); + }, +}); + +// Only supports border radius defined like "20px" or "100%" +const transformedRadius = (radiusString, deltaWidth, deltaHeight) => { + if (/^\d+\.?\d*px$/.test(radiusString)){ + //The radius is defined in pixel units, so get the radius as a number + const rad = +radiusString.match(/\d+\.?\d*/)[0]; + // Set the x and y radius of the "to" element, compensating for scale + return `${rad / deltaWidth}px / ${rad / deltaHeight}px`; + } else if (/^\d+\.?\d*%$/.test(radiusString)) { + //The radius is defined as a percentage, so just use it as is + return radiusString; + } +}; + +const imitate = ( + element, source, deltaLeft, deltaTop, deltaWidth, deltaHeight +) => { + element.style.transform = `translate(${deltaLeft}px, ${deltaTop}px) ` + + `scale(${deltaWidth}, ${deltaHeight})`; + element.style.background = $(source).css("background"); + // Imitate the border radius after transform + const border = $(source).css("border-radius") + const rad = transformedRadius(border, deltaWidth, deltaHeight); + element.style.borderRadius = rad +} + +const shrinkAnimation = ({element, reverse}) => { + element.css({ + transform: reverse ? "scale(0) translateZ(0)" : "", + }); + const fraction = duration / 4; + _.defer(() => element.css({ + transition: reverse ? + `transform ${fraction}ms ease ${duration - fraction}ms` : + `transform ${fraction}ms ease` + , + transform: reverse ? "" : "scale(0) translateZ(0)", + })); + _.delay(() => element.css({ + transition: "", + }), duration); +} + +const dialogOpenAnimation = ({element, returnElement, dialog}) => { + // hide all floaty buttons when we open the first dialog + let fabs = $(".mini-holder paper-fab, .floatyButton").filter( + (index, el) => el !== element && el !== returnElement + ); + if (dialogs._array.length === 1) { + shrinkAnimation({element: fabs}); + } + + const dialogRect = dialog.getBoundingClientRect(); + const elementRect = element.getBoundingClientRect(); + element.style.visibility = "hidden"; + returnElement = _.isFunction(returnElement) ? returnElement() : returnElement; + if (returnElement) returnElement.style.visibility = "hidden"; + // Get how must the element change to become the dialog + const deltaLeft = elementRect.left - dialogRect.left; + const deltaTop = elementRect.top - dialogRect.top; + const deltaWidth = elementRect.width / dialogRect.width; + const deltaHeight = elementRect.height / dialogRect.height; + + // Make the dialog imitate the element, immediately + dialog.style.transition = "none"; + imitate(dialog, element, deltaLeft, deltaTop, deltaWidth, deltaHeight); + + _.defer(() => { + // Next frame, undo the imitation, let dialog animate back into place + dialog.style.transition = `all ${duration}ms ease`; + dialog.style.transform = ""; + dialog.style.borderRadius = ""; + dialog.style.background = ""; + }); + // Clean up after the animation is done and call our callback + _.delay(() => { + dialog.style.transition = ""; + }, duration); +} + +const dialogCloseAnimation = ({element, returnElement, dialog, callback}) => { + // unhide all floaty buttons when we close the last dialog + let fabs = $(".mini-holder paper-fab, .floatyButton").filter( + (index, el) => el !== element && el !== returnElement + ); + if (dialogs._array.length === 0) { + shrinkAnimation({element: fabs, reverse: true}); + } + + // We are returning to a different element + // pop the original element back in and use the returnElement in its place + returnElement = _.isFunction(returnElement) ? returnElement() : returnElement; + if (returnElement && returnElement !== element){ + let originalElement = element; + element = returnElement; + originalElement.style.transition = ""; + originalElement.style.visibility = ""; + originalElement.style.transform = "scale(0) translateZ(0px)"; + _.defer(() => { + originalElement.style.transition = `transform ${duration}ms ease`; + originalElement.style.transform = ""; + }); + _.delay(() => { + originalElement.style.transition = ""; + }, duration); + } + // Reset the dialog if it is mid-transition + dialog.style.transition = "none"; + dialog.style.transform = "none"; + dialog.style.borderRadius = ""; + dialog.style.background = ""; + dialog.style.opacity = "1"; + // Get the original bounding rectangles of both elements + const dialogRect = dialog.getBoundingClientRect(); + const elementRect = element.getBoundingClientRect(); + + // Set up a clone of the original element + // This lets us have a fixed position element which isn't clipped + clone = element.cloneNode(true); + clone.style.position = "fixed"; + clone.style.top = 0; + clone.style.left = 0; + clone.style.width = elementRect.width + "px"; + clone.style.height = elementRect.height + "px"; + clone.style.visibility = ""; + clone.style.zIndex = 2; + + // Compensate for stack moving at the same time if we are many dialogs deep + const stackCompensation = dialogs._array.length ? 16 : 0; + + // Insert clone before its progenitor so it can inherit css correctly + element.parentNode.insertBefore(clone, element); + + // Polymer messes up fixed positioning, measure and compensate + startingRect = clone.getBoundingClientRect(); + clone.style.top = (elementRect.top - startingRect.top + stackCompensation) + + "px"; + clone.style.left = (elementRect.left - startingRect.left + stackCompensation) + + "px"; + + // How must the original dialog change to become the element + const deltaLeft = dialogRect.left - elementRect.left - stackCompensation; + const deltaTop = dialogRect.top - elementRect.top - stackCompensation; + const deltaWidth = dialogRect.width / elementRect.width; + const deltaHeight = dialogRect.height / elementRect.height; + + // Make the clone imitate the dialog + clone.style.transition = "none"; + clone.style.transformOrigin = "top left" + imitate(clone, dialog, deltaLeft, deltaTop, deltaWidth, deltaHeight); + + _.defer(() => { + // Next frame, undo the imitation, let clone animate into its place + clone.style.transition = `all ${duration}ms ease`; + clone.style.transform = ""; + clone.style.borderRadius = ""; + clone.style.background = ""; + // Make the dialog follow the clone in and fade away + dialog.style.transition = `all ${duration}ms ease, ` + + `opacity ${duration / 2}ms linear`; + dialog.style.opacity = 0; + imitate(dialog, element, -deltaLeft, + -deltaTop, 1 / deltaWidth, 1 / deltaHeight); + }); + // Clean up after the animation is done and call our callback + _.delay(() => { + element.style.visibility = ""; + clone.remove(); + if (callback) callback(); + }, duration); +}; + +Template.dialogStack.onRendered(function(){ + $(".dialog-sizer")[0]._uihooks = { + insertElement: function(node, next) { + $(node).insertBefore(next); + const data = Blaze.getData(node); + if (data.element){ + // Store the reference to the element on the DOM node itself, + // since Blaze won't keep the data around for the remove hook + node._dialogStackElement = data.element; + node._dialogStackReturnElement = data.returnElement; + dialogOpenAnimation({ + element: data.element, + returnElement: data.returnElement, + dialog: node, + }); + } + }, + removeElement: function(node) { + const element = node._dialogStackElement; + const returnElement = node._dialogStackReturnElement; + if (element){ + dialogCloseAnimation({ + element, + returnElement, + dialog: node, + callback(){ + node.remove(); + }, + }); + } else { + node.remove(); + } + }, + } +}); + +Template.testDialog.events({ + "click .testButton": function(event, template){ + pushDialogStack({ + template: "testDialog", + element: event.currentTarget, + data: Random.id(), + }); + }, +}) diff --git a/rpg-docs/client/views/paperTemplates/fabMenu/fabMenu.css b/rpg-docs/client/views/paperTemplates/fabMenu/fabMenu.css new file mode 100644 index 00000000..ccc4d06b --- /dev/null +++ b/rpg-docs/client/views/paperTemplates/fabMenu/fabMenu.css @@ -0,0 +1,41 @@ +.mini-holder { + position: fixed; + padding: 4px; + bottom: 80px; + right: 24px; + width: 56px; + pointer-events: none; + flex-direction: column-reverse !important; +} + +.mini-holder > div{ + transform: scale(0); + transition-property: transform; + transition-duration: 0.3s; + transition-timing-function: ease-in-out; + margin: 4px; +} + +.mini-holder.active > div { + transform: scale(1); +} + +.mini-holder.active { + pointer-events: auto; +} + +.mini-holder.active > div:nth-child(2){ + transition-delay: 0.1s; +} + +.mini-holder.active > div:nth-child(3){ + transition-delay: 0.2s; +} + +.mini-holder.active > div:nth-child(4){ + transition-delay: 0.3s; +} + +.mini-holder.active > div:nth-child(5){ + transition-delay: 0.4s; +} diff --git a/rpg-docs/client/views/paperTemplates/fabMenu/fabMenu.html b/rpg-docs/client/views/paperTemplates/fabMenu/fabMenu.html index 78ae0718..902cff36 100644 --- a/rpg-docs/client/views/paperTemplates/fabMenu/fabMenu.html +++ b/rpg-docs/client/views/paperTemplates/fabMenu/fabMenu.html @@ -1,8 +1,7 @@ \ No newline at end of file + diff --git a/rpg-docs/client/views/paperTemplates/fabMenu/fabMenu.js b/rpg-docs/client/views/paperTemplates/fabMenu/fabMenu.js index 59837c36..3647787b 100644 --- a/rpg-docs/client/views/paperTemplates/fabMenu/fabMenu.js +++ b/rpg-docs/client/views/paperTemplates/fabMenu/fabMenu.js @@ -2,6 +2,22 @@ Template.fabMenu.onCreated(function() { this.active = new ReactiveVar(false); }); +Template.fabMenu.onRendered(function(){ + const fab = this.find("paper-fab.expand-menu"); + // Do a spin animation to turn the + icon into a x when active + this.autorun(() => { + const active = this.active.get(); + if (fab && fab.updateStyles){ + const iconStyle = active ? + "transition: transform 0.3s ease; transform: rotate(225deg);" : + "transition: transform 0.3s ease;"; + fab.updateStyles({ + ["--paper-fab-iron-icon"]: iconStyle, + }); + } + }) +}); + Template.fabMenu.helpers({ active: function() { return Template.instance().active.get(); diff --git a/rpg-docs/client/views/paperTemplates/fabMenu/fabMenu.scss b/rpg-docs/client/views/paperTemplates/fabMenu/fabMenu.scss deleted file mode 100644 index db5ee47c..00000000 --- a/rpg-docs/client/views/paperTemplates/fabMenu/fabMenu.scss +++ /dev/null @@ -1,45 +0,0 @@ -@import "{wolves:bourbon}/bourbon"; - -.mini-holder { - position: absolute; - padding: 4px; - bottom: 80px; - right: 24px; - width: 56px; - pointer-events: none; - flex-direction: column-reverse !important; - core-tooltip{ - @include transform(scale(0)); - @include transition-property(transform); - @include transition-duration(0.3s); - @include transition-timing-function(ease-in-out); - margin: 4px; - } - &.active { - pointer-events: auto; - core-tooltip{ - @include transform(scale(1)); - } - core-tooltip:nth-child(2){ - @include transition-delay(0.1s); - } - core-tooltip:nth-child(3){ - @include transition-delay(0.2s); - } - core-tooltip:nth-child(4){ - @include transition-delay(0.3s); - } - core-tooltip:nth-child(5){ - @include transition-delay(0.4s); - } - } -} - -.expand-menu { - &::shadow core-icon { - @include transition(transform 0.3s ease-in-out); - } - &.active::shadow core-icon{ - @include transform(rotate(405deg)); - } -} diff --git a/rpg-docs/client/views/paperTemplates/inputSuffixes/inputSuffixes.html b/rpg-docs/client/views/paperTemplates/inputSuffixes/inputSuffixes.html new file mode 100644 index 00000000..fc0964df --- /dev/null +++ b/rpg-docs/client/views/paperTemplates/inputSuffixes/inputSuffixes.html @@ -0,0 +1,13 @@ + + + diff --git a/rpg-docs/client/views/user/profile/profile.css b/rpg-docs/client/views/user/profile/profile.css new file mode 100644 index 00000000..93fc9727 --- /dev/null +++ b/rpg-docs/client/views/user/profile/profile.css @@ -0,0 +1,4 @@ +.profile #at-nav-button { + color: #212121; + color: rgba(0,0,0,0.87); +} diff --git a/rpg-docs/client/views/user/profile/profile.html b/rpg-docs/client/views/user/profile/profile.html index 4e87f4c6..89634afa 100644 --- a/rpg-docs/client/views/user/profile/profile.html +++ b/rpg-docs/client/views/user/profile/profile.html @@ -1,22 +1,47 @@ diff --git a/rpg-docs/client/views/user/profile/profile.js b/rpg-docs/client/views/user/profile/profile.js index e274fd00..e8ce64a9 100644 --- a/rpg-docs/client/views/user/profile/profile.js +++ b/rpg-docs/client/views/user/profile/profile.js @@ -8,15 +8,15 @@ Template.profile.helpers({ }); Template.profile.events({ - "tap #username": function(){ + "click .username-edit": function(event, instance){ if (this._id === Meteor.userId()){ - GlobalUI.showDialog({ - heading: "Change Username", + pushDialogStack({ template: "usernameDialog", + element: event.currentTarget, }); } }, - "tap #verifyEmail": function(event, instance){ + "click #at-resend-verification-email": function(event, instance){ if (!Meteor.user()) return; Accounts.sendVerificationEmail(Meteor.userId(), this.address); GlobalUI.toast({ diff --git a/rpg-docs/client/views/user/profile/usernameDialog.html b/rpg-docs/client/views/user/profile/usernameDialog.html index 3b83dbd4..dfc304ae 100644 --- a/rpg-docs/client/views/user/profile/usernameDialog.html +++ b/rpg-docs/client/views/user/profile/usernameDialog.html @@ -1,8 +1,24 @@ diff --git a/rpg-docs/client/views/user/profile/usernameDialog.js b/rpg-docs/client/views/user/profile/usernameDialog.js index 964e8380..e4484cde 100644 --- a/rpg-docs/client/views/user/profile/usernameDialog.js +++ b/rpg-docs/client/views/user/profile/usernameDialog.js @@ -4,7 +4,7 @@ var getUsername = function() { }; Template.usernameDialog.onCreated(function() { - this.errorMessage = new ReactiveVar(""); + this.errorMessage = new ReactiveVar(); this.username = new ReactiveVar(getUsername()); }); @@ -32,12 +32,13 @@ Template.usernameDialog.events({ if (userId && userId !== Meteor.userId()) instance.errorMessage.set("This username is taken"); else - instance.errorMessage.set(""); + instance.errorMessage.set(); }); } }, - "tap #changeButton": function(event, instance){ + "click #changeButton": function(event, instance){ var username = instance.find("#usernameInput").value; + popDialogStack(); username = username.trim().replace(/\s+/gm, " "); var profileName = username; username = username.toLowerCase().replace(/\s+/gm, ""); @@ -46,4 +47,7 @@ Template.usernameDialog.events({ {$set: {username: username, "profile.username": profileName}} ); }, + "click #cancelButton": function(event, instance){ + popDialogStack(); + }, }); diff --git a/rpg-docs/client/views/user/titledAtForm/titledAtForm.html b/rpg-docs/client/views/user/titledAtForm/titledAtForm.html index ef62b371..4c332c27 100644 --- a/rpg-docs/client/views/user/titledAtForm/titledAtForm.html +++ b/rpg-docs/client/views/user/titledAtForm/titledAtForm.html @@ -1,13 +1,16 @@ diff --git a/rpg-docs/config.vulcanize b/rpg-docs/config.vulcanize index 98d8d01c..88a89f37 100644 --- a/rpg-docs/config.vulcanize +++ b/rpg-docs/config.vulcanize @@ -1,45 +1,53 @@ { + "polyfill": "/components/webcomponentsjs/webcomponents.min.js", + "useShadowDom": true, "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/app-layout/app-layout.html", + "/components/app-layout/app-layout.html", + "/components/app-layout/app-scroll-effects/effects/waterfall.html", + "/components/app-layout/app-scroll-effects/effects/parallax-background.html", + "/components/app-layout/app-scroll-effects/effects/resize-title.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" + "/components/iron-icon/iron-icon.html", + "/components/iron-icons/av-icons.html", + "/components/iron-icons/editor-icons.html", + "/components/iron-icons/image-icons.html", + "/components/iron-icons/iron-icons.html", + "/components/iron-icons/social-icons.html", + "/components/iron-image/iron-image.html", + "/components/iron-pages/iron-pages.html", + "/components/iron-selector/iron-selector.html", + + "/components/neon-animation/neon-animation.html", + + "/components/paper-button/paper-button.html", + "/components/paper-swatch-picker/paper-swatch-picker.html", + "/components/paper-dialog/paper-dialog.html", + "/components/paper-dropdown-menu/paper-dropdown-menu.html", + "/components/paper-fab/paper-fab.html", + "/components/paper-icon-button/paper-icon-button.html", + "/components/paper-input/paper-input.html", + "/components/paper-input/paper-textarea.html", + "/components/paper-item/all-imports.html", + "/components/paper-listbox/paper-listbox.html", + "/components/paper-material/paper-material.html", + "/components/paper-menu-button/paper-menu-button.html", + "/components/paper-menu/paper-menu.html", + "/components/paper-radio-button/paper-radio-button.html", + "/components/paper-radio-group/paper-radio-group.html", + "/components/paper-ripple/paper-ripple.html", + "/components/paper-slider/paper-slider.html", + "/components/paper-spinner/paper-spinner.html", + "/components/paper-tabs/paper-tabs.html", + "/components/paper-toast/paper-toast.html", + "/components/paper-toggle-button/paper-toggle-button.html", + "/components/paper-tooltip/paper-tooltip.html", + + "/custom_components/dicecloud-icons/dicecloud-icons.html", + "/custom_components/dicecloud-selector/dicecloud-selector.html", + "/custom_components/dicecloud-wrapper/dicecloud-wrapper.html", + "/custom_components/paper-checkbox/paper-checkbox.html", + "/custom_components/paper-diff-slider/paper-diff-slider.html", + "/custom_components/app-theme.html" ] } diff --git a/rpg-docs/lib/constants/appName.js b/rpg-docs/lib/constants/appName.js index 3951e4bd..5278dabe 100644 --- a/rpg-docs/lib/constants/appName.js +++ b/rpg-docs/lib/constants/appName.js @@ -1 +1 @@ -appName = "Dicecloud"; +appName = "DiceCloud"; diff --git a/rpg-docs/lib/constants/characterAssetAllowDeny.js b/rpg-docs/lib/constants/characterAssetAllowDeny.js index edcc370a..65730cfb 100644 --- a/rpg-docs/lib/constants/characterAssetAllowDeny.js +++ b/rpg-docs/lib/constants/characterAssetAllowDeny.js @@ -5,6 +5,7 @@ Meteor.methods({ charId, {fields: {owner: 1, writers: 1}} ); + if (!char) return true; return (userId && char.owner === userId || _.contains(char.writers, userId)); }, }); @@ -30,6 +31,7 @@ CHARACTER_SUBSCHEMA_ALLOW = { doc.charId, {fields: {owner: 1, writers: 1}} ); + if (!char) return true; return userId && char.owner === userId || _.contains(char.writers, userId); }, fetch: ["charId"], diff --git a/rpg-docs/lib/constants/colorOptions.js b/rpg-docs/lib/constants/colorOptions.js index 8f5d3bea..e6937a44 100644 --- a/rpg-docs/lib/constants/colorOptions.js +++ b/rpg-docs/lib/constants/colorOptions.js @@ -16,7 +16,7 @@ colorOptions = [ {key: "o", className: "orange", whiteText: false, color: "#FF9800"}, {key: "p", className: "deep-orange", whiteText: true, color: "#FF5722"}, {key: "q", className: "grey", whiteText: true, color: "#9E9E9E"}, //spec says no white text - //{key: "r", className: "blue-grey", whiteText: true, color: "#607D8B"}, + {key: "r", className: "blue-grey", whiteText: true, color: "#607D8B"}, {key: "s", className: "brown", whiteText: true, color: "#795548"}, {key: "t", className: "black", whiteText: true, color: "#000000"}, ]; diff --git a/rpg-docs/lib/constants/useraccountsConfig.js b/rpg-docs/lib/constants/useraccountsConfig.js index 9824b2d4..297ede35 100644 --- a/rpg-docs/lib/constants/useraccountsConfig.js +++ b/rpg-docs/lib/constants/useraccountsConfig.js @@ -14,31 +14,42 @@ AccountsTemplates.configure({ showAddRemoveServices: true, showForgotPasswordLink: true, showResendVerificationEmailLink: true, + texts: { + resendVerificationEmailLink_link: "Resend email verification", + }, }); AccountsTemplates.configureRoute("changePwd", { template: "titledAtForm", + layoutTemplate: 'layout', }); AccountsTemplates.configureRoute("enrollAccount", { template: "titledAtForm", + layoutTemplate: 'layout', }); AccountsTemplates.configureRoute("forgotPwd", { template: "titledAtForm", + layoutTemplate: 'layout', }); AccountsTemplates.configureRoute("resetPwd", { template: "titledAtForm", + layoutTemplate: 'layout', }); AccountsTemplates.configureRoute("signIn", { template: "titledAtForm", + layoutTemplate: 'layout', }); AccountsTemplates.configureRoute("signUp", { template: "titledAtForm", + layoutTemplate: 'layout', }); AccountsTemplates.configureRoute("verifyEmail", { template: "titledAtForm", + layoutTemplate: 'layout', }); AccountsTemplates.configureRoute("resendVerificationEmail", { template: "titledAtForm", + layoutTemplate: 'layout', }); if (Meteor.isServer){ diff --git a/rpg-docs/lib/functions/permissions.js b/rpg-docs/lib/functions/permissions.js index 6308c429..9e658d03 100644 --- a/rpg-docs/lib/functions/permissions.js +++ b/rpg-docs/lib/functions/permissions.js @@ -1,7 +1,7 @@ canEditCharacter = function(charId, userId){ userId = userId || Meteor.userId(); var char = Characters.findOne(charId, {fields: {owner: 1, writers: 1}}); - if (!char) return false; + if (!char) return true; return (userId === char.owner || _.contains(char.writers, userId)); }; @@ -11,7 +11,7 @@ canViewCharacter = function(charId, userId){ charId, {fields: {owner: 1, writers: 1, readers: 1}} ); - if (!char) return false; + if (!char) return true; return userId === char.owner || _.contains(char.writers, userId) || _.contains(char.readers, userId); diff --git a/rpg-docs/lib/methods/conditions.js b/rpg-docs/lib/methods/conditions.js index 4e42bdcc..a89f5d8b 100644 --- a/rpg-docs/lib/methods/conditions.js +++ b/rpg-docs/lib/methods/conditions.js @@ -115,7 +115,7 @@ trackEncumbranceConditions = function(charId, templateInstance) { give("encumbered2"); remove("encumbered"); } else if (weight > strength * 5 * carryMultiplier && - character.settings.useVariantEncumbrance){ + character.settings.useVariantEncumbrance){ give("encumbered"); remove("encumbered2"); } else { @@ -128,7 +128,7 @@ trackEncumbranceConditions = function(charId, templateInstance) { give("encumbered4"); remove("encumbered3"); } else if (weight > strength * 15 * carryMultiplier && - character.settings.useStandardEncumbrance) { + character.settings.useStandardEncumbrance) { give("encumbered3"); remove("encumbered4"); } else { @@ -138,6 +138,7 @@ trackEncumbranceConditions = function(charId, templateInstance) { }); }; +// jscs:disable maximumLineLength CONDITIONS = { //Conditions blind: { diff --git a/rpg-docs/package.json b/rpg-docs/package.json index a643b086..49a2f8ff 100644 --- a/rpg-docs/package.json +++ b/rpg-docs/package.json @@ -11,6 +11,9 @@ }, "author": "Stefan Zermatten", "dependencies": { + "@polymer/polymer": "^1.2.5-npm-test.2", + "babel-runtime": "^6.18.0", + "bcrypt": "^1.0.1", "bower": "^1.7.9" } } diff --git a/rpg-docs/packages/meteor-vulcanize/.gitignore b/rpg-docs/packages/meteor-vulcanize/.gitignore deleted file mode 100644 index 918ef5d7..00000000 --- a/rpg-docs/packages/meteor-vulcanize/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.npm diff --git a/rpg-docs/packages/meteor-vulcanize/.versions b/rpg-docs/packages/meteor-vulcanize/.versions deleted file mode 100644 index 26911b9d..00000000 --- a/rpg-docs/packages/meteor-vulcanize/.versions +++ /dev/null @@ -1,3 +0,0 @@ -differential:vulcanize@0.0.5 -meteor@1.1.6 -underscore@1.0.3 diff --git a/rpg-docs/packages/meteor-vulcanize/README.md b/rpg-docs/packages/meteor-vulcanize/README.md deleted file mode 100644 index b4149d18..00000000 --- a/rpg-docs/packages/meteor-vulcanize/README.md +++ /dev/null @@ -1,29 +0,0 @@ -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 `` tag. - -```` - - - - - - -... - - - - - -... -```` - -- Running your app in development as usual will result in the contents of `imports.html` being added to your `` 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 `` 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 `` tag. diff --git a/rpg-docs/packages/meteor-vulcanize/package.js b/rpg-docs/packages/meteor-vulcanize/package.js deleted file mode 100644 index 464b3682..00000000 --- a/rpg-docs/packages/meteor-vulcanize/package.js +++ /dev/null @@ -1,15 +0,0 @@ -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'} -}); diff --git a/rpg-docs/packages/meteor-vulcanize/versions.json b/rpg-docs/packages/meteor-vulcanize/versions.json deleted file mode 100644 index dd13098b..00000000 --- a/rpg-docs/packages/meteor-vulcanize/versions.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "dependencies": [ - [ - "meteor", - "1.1.3" - ], - [ - "underscore", - "1.0.1" - ] - ], - "pluginDependencies": [ - [ - "vulcanize", - {} - ] - ], - "toolVersion": "meteor-tool@1.0.35", - "format": "1.0" -} \ No newline at end of file diff --git a/rpg-docs/packages/meteor-vulcanize/vulcanize-tests.js b/rpg-docs/packages/meteor-vulcanize/vulcanize-tests.js deleted file mode 100644 index c5623d89..00000000 --- a/rpg-docs/packages/meteor-vulcanize/vulcanize-tests.js +++ /dev/null @@ -1,5 +0,0 @@ -// Write your tests here! -// Here is an example. -Tinytest.add('example', function (test) { - test.equal(true, true); -}); diff --git a/rpg-docs/packages/meteor-vulcanize/vulcanize.js b/rpg-docs/packages/meteor-vulcanize/vulcanize.js deleted file mode 100644 index ce452788..00000000 --- a/rpg-docs/packages/meteor-vulcanize/vulcanize.js +++ /dev/null @@ -1,70 +0,0 @@ -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: '' - }); - }; - - 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); diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/.travis.yml b/rpg-docs/packages/useraccounts-polymer-1.0/.travis.yml deleted file mode 100644 index 7846a282..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -sudo: required -language: node_js -node_js: - - "0.10" -before_install: - - "curl -L http://git.io/ejPSng | /bin/sh" -env: - - TEST_COMMAND=meteor diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/LICENSE b/rpg-docs/packages/useraccounts-polymer-1.0/LICENSE deleted file mode 100644 index b3a6169d..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -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. \ No newline at end of file diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/README.md b/rpg-docs/packages/useraccounts-polymer-1.0/README.md deleted file mode 100644 index ac2adf9c..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/README.md +++ /dev/null @@ -1,48 +0,0 @@ -[![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 - - - - - - ``` - - - - -## 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. diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_error.html b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_error.html deleted file mode 100644 index e878be1d..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_error.html +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_error.js b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_error.js deleted file mode 100644 index dc285d18..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_error.js +++ /dev/null @@ -1,2 +0,0 @@ -// Simply 'inherites' helpers from AccountsTemplates -Template.atError.helpers(AccountsTemplates.atErrorHelpers); \ No newline at end of file diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_form.html b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_form.html deleted file mode 100644 index d50b6192..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_form.html +++ /dev/null @@ -1,39 +0,0 @@ - diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_form.js b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_form.js deleted file mode 100644 index faa145f4..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_form.js +++ /dev/null @@ -1,2 +0,0 @@ -// Simply 'inherites' helpers from AccountsTemplates -Template.atForm.helpers(AccountsTemplates.atFormHelpers); \ No newline at end of file diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_input.html b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_input.html deleted file mode 100644 index 7da5ba87..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_input.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_input.js b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_input.js deleted file mode 100644 index f4f31220..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_input.js +++ /dev/null @@ -1,25 +0,0 @@ -_.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); diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_message.html b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_message.html deleted file mode 100644 index e15b64c6..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_message.html +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_message.js b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_message.js deleted file mode 100644 index d060d730..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_message.js +++ /dev/null @@ -1,2 +0,0 @@ -// Simply 'inherites' helpers from AccountsTemplates -Template.atMessage.helpers(AccountsTemplates.atMessageHelpers); diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_nav_button.html b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_nav_button.html deleted file mode 100644 index 06afd6a5..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_nav_button.html +++ /dev/null @@ -1,4 +0,0 @@ - \ No newline at end of file diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_nav_button.js b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_nav_button.js deleted file mode 100644 index fcb9fa51..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_nav_button.js +++ /dev/null @@ -1,5 +0,0 @@ -// Simply 'inherites' helpers from AccountsTemplates -Template.atNavButton.helpers(AccountsTemplates.atNavButtonHelpers); - -// Simply 'inherites' events from AccountsTemplates -Template.atNavButton.events(AccountsTemplates.atNavButtonEvents); \ No newline at end of file diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_oauth.html b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_oauth.html deleted file mode 100644 index 13066f8d..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_oauth.html +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_oauth.js b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_oauth.js deleted file mode 100644 index 09198e00..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_oauth.js +++ /dev/null @@ -1,2 +0,0 @@ -// Simply 'inherites' helpers from AccountsTemplates -Template.atOauth.helpers(AccountsTemplates.atOauthHelpers); \ No newline at end of file diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_polymer.css b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_polymer.css deleted file mode 100644 index a23a5a7b..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_polymer.css +++ /dev/null @@ -1,168 +0,0 @@ -.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; -} diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_pwd_form.html b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_pwd_form.html deleted file mode 100644 index dc1ac313..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_pwd_form.html +++ /dev/null @@ -1,16 +0,0 @@ - diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_pwd_form.js b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_pwd_form.js deleted file mode 100644 index 91f08d72..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_pwd_form.js +++ /dev/null @@ -1,5 +0,0 @@ -// Simply 'inherites' helpers from AccountsTemplates -Template.atPwdForm.helpers(AccountsTemplates.atPwdFormHelpers); - -// Simply 'inherites' events from AccountsTemplates -Template.atPwdForm.events(AccountsTemplates.atPwdFormEvents); \ No newline at end of file diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_pwd_form_btn.html b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_pwd_form_btn.html deleted file mode 100644 index 9076a2c9..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_pwd_form_btn.html +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_pwd_form_btn.js b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_pwd_form_btn.js deleted file mode 100644 index 88ccb214..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_pwd_form_btn.js +++ /dev/null @@ -1,10 +0,0 @@ -// 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(); - } -}; diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_pwd_link.html b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_pwd_link.html deleted file mode 100644 index 7e14f88d..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_pwd_link.html +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_pwd_link.js b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_pwd_link.js deleted file mode 100644 index b1e7c3e7..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_pwd_link.js +++ /dev/null @@ -1,5 +0,0 @@ -// Simply 'inherites' helpers from AccountsTemplates -Template.atPwdLink.helpers(AccountsTemplates.atPwdLinkHelpers); - -// Simply 'inherites' events from AccountsTemplates -Template.atPwdLink.events(AccountsTemplates.atPwdLinkEvents); \ No newline at end of file diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_reCaptcha.html b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_reCaptcha.html deleted file mode 100644 index cfe8424b..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_reCaptcha.html +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_reCaptcha.js b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_reCaptcha.js deleted file mode 100644 index 6762c114..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_reCaptcha.js +++ /dev/null @@ -1,5 +0,0 @@ -// Simply 'inherites' rendered callback from AccountsTemplates -Template.atReCaptcha.rendered = AccountsTemplates.atReCaptchaRendered; - -// Simply 'inherites' helpers from AccountsTemplates -Template.atReCaptcha.helpers(AccountsTemplates.atReCaptchaHelpers); diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_resend_verification_email_link.html b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_resend_verification_email_link.html deleted file mode 100644 index 10bc183e..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_resend_verification_email_link.html +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_resend_verification_email_link.js b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_resend_verification_email_link.js deleted file mode 100644 index 9b365ef7..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_resend_verification_email_link.js +++ /dev/null @@ -1,5 +0,0 @@ -// Simply 'inherites' helpers from AccountsTemplates -Template.atResendVerificationEmailLink.helpers(AccountsTemplates.atResendVerificationEmailLinkHelpers); - -// Simply 'inherites' events from AccountsTemplates -Template.atResendVerificationEmailLink.events(AccountsTemplates.atResendVerificationEmailLinkEvents); diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_result.html b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_result.html deleted file mode 100644 index b1e11fa3..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_result.html +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_result.js b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_result.js deleted file mode 100644 index 36d9e0ce..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_result.js +++ /dev/null @@ -1,2 +0,0 @@ -// Simply 'inherites' helpers from AccountsTemplates -Template.atResult.helpers(AccountsTemplates.atResultHelpers); \ No newline at end of file diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_sep.html b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_sep.html deleted file mode 100644 index 920a332b..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_sep.html +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_sep.js b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_sep.js deleted file mode 100644 index 450febaa..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_sep.js +++ /dev/null @@ -1,2 +0,0 @@ -// Simply 'inherites' helpers from AccountsTemplates -Template.atSep.helpers(AccountsTemplates.atSepHelpers); \ No newline at end of file diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_signin_link.html b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_signin_link.html deleted file mode 100644 index d2b1448e..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_signin_link.html +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_signin_link.js b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_signin_link.js deleted file mode 100644 index 89251fd8..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_signin_link.js +++ /dev/null @@ -1,5 +0,0 @@ -// Simply 'inherites' helpers from AccountsTemplates -Template.atSigninLink.helpers(AccountsTemplates.atSigninLinkHelpers); - -// Simply 'inherites' events from AccountsTemplates -Template.atSigninLink.events(AccountsTemplates.atSigninLinkEvents); \ No newline at end of file diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_signup_link.html b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_signup_link.html deleted file mode 100644 index 12e1b5f8..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_signup_link.html +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_signup_link.js b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_signup_link.js deleted file mode 100644 index c1b97711..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_signup_link.js +++ /dev/null @@ -1,5 +0,0 @@ -// Simply 'inherites' helpers from AccountsTemplates -Template.atSignupLink.helpers(AccountsTemplates.atSignupLinkHelpers); - -// Simply 'inherites' events from AccountsTemplates -Template.atSignupLink.events(AccountsTemplates.atSignupLinkEvents); \ No newline at end of file diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_social.html b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_social.html deleted file mode 100644 index 6f9acb13..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_social.html +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_social.js b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_social.js deleted file mode 100644 index f02e5e8a..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_social.js +++ /dev/null @@ -1,18 +0,0 @@ -// 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; - }, -}); diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_terms_link.html b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_terms_link.html deleted file mode 100644 index 82468c57..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_terms_link.html +++ /dev/null @@ -1,16 +0,0 @@ - diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_terms_link.js b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_terms_link.js deleted file mode 100644 index b1d4b69e..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_terms_link.js +++ /dev/null @@ -1,5 +0,0 @@ -// Simply 'inherites' helpers from AccountsTemplates -Template.atTermsLink.helpers(AccountsTemplates.atTermsLinkHelpers); - -// Simply 'inherites' events from AccountsTemplates -Template.atTermsLink.events(AccountsTemplates.atTermsLinkEvents); \ No newline at end of file diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_title.html b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_title.html deleted file mode 100644 index c16046da..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_title.html +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_title.js b/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_title.js deleted file mode 100644 index c1c8f3cd..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/at_title.js +++ /dev/null @@ -1,2 +0,0 @@ -// Simply 'inherites' helpers from AccountsTemplates -Template.atTitle.helpers(AccountsTemplates.atTitleHelpers); \ No newline at end of file diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/lib/full_page_at_form.html b/rpg-docs/packages/useraccounts-polymer-1.0/lib/full_page_at_form.html deleted file mode 100644 index 41d385eb..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/lib/full_page_at_form.html +++ /dev/null @@ -1,7 +0,0 @@ - \ No newline at end of file diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/package.js b/rpg-docs/packages/useraccounts-polymer-1.0/package.js deleted file mode 100644 index fe1dbe55..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/package.js +++ /dev/null @@ -1,86 +0,0 @@ -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']); -}); diff --git a/rpg-docs/packages/useraccounts-polymer-1.0/tests/tests.js b/rpg-docs/packages/useraccounts-polymer-1.0/tests/tests.js deleted file mode 100644 index b3dda869..00000000 --- a/rpg-docs/packages/useraccounts-polymer-1.0/tests/tests.js +++ /dev/null @@ -1,2 +0,0 @@ - -// TODO: write tests!!! \ No newline at end of file diff --git a/rpg-docs/public/_imports.html b/rpg-docs/public/_imports.html new file mode 100644 index 00000000..974db0dc --- /dev/null +++ b/rpg-docs/public/_imports.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rpg-docs/public/custom_components/app-theme.html b/rpg-docs/public/custom_components/app-theme.html new file mode 100644 index 00000000..1b90d2a2 --- /dev/null +++ b/rpg-docs/public/custom_components/app-theme.html @@ -0,0 +1,63 @@ + + + + + + diff --git a/rpg-docs/public/custom_components/dicecloud-icons/dicecloud-icons.html b/rpg-docs/public/custom_components/dicecloud-icons/dicecloud-icons.html new file mode 100644 index 00000000..5a6b5ac2 --- /dev/null +++ b/rpg-docs/public/custom_components/dicecloud-icons/dicecloud-icons.html @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/rpg-docs/public/custom_components/dicecloud-selector/dicecloud-selectable.html b/rpg-docs/public/custom_components/dicecloud-selector/dicecloud-selectable.html new file mode 100644 index 00000000..fceeba7e --- /dev/null +++ b/rpg-docs/public/custom_components/dicecloud-selector/dicecloud-selectable.html @@ -0,0 +1,353 @@ + + + + diff --git a/rpg-docs/public/custom_components/dicecloud-selector/dicecloud-selector.html b/rpg-docs/public/custom_components/dicecloud-selector/dicecloud-selector.html new file mode 100644 index 00000000..d2cde4c1 --- /dev/null +++ b/rpg-docs/public/custom_components/dicecloud-selector/dicecloud-selector.html @@ -0,0 +1,24 @@ + + + + diff --git a/rpg-docs/public/custom_components/dicecloud-wrapper/dicecloud-wrapper.html b/rpg-docs/public/custom_components/dicecloud-wrapper/dicecloud-wrapper.html new file mode 100644 index 00000000..e014539c --- /dev/null +++ b/rpg-docs/public/custom_components/dicecloud-wrapper/dicecloud-wrapper.html @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/rpg-docs/public/custom_components/paper-checkbox/paper-checkbox.html b/rpg-docs/public/custom_components/paper-checkbox/paper-checkbox.html new file mode 100644 index 00000000..223c86b1 --- /dev/null +++ b/rpg-docs/public/custom_components/paper-checkbox/paper-checkbox.html @@ -0,0 +1,311 @@ + + + + + + + + + + + + + diff --git a/rpg-docs/public/custom_components/paper-diff-slider/paper-diff-slider.css b/rpg-docs/public/custom_components/paper-diff-slider/paper-diff-slider.css deleted file mode 100644 index 4840ee8b..00000000 --- a/rpg-docs/public/custom_components/paper-diff-slider/paper-diff-slider.css +++ /dev/null @@ -1,239 +0,0 @@ -/* -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 { - display: inline-block; - width: 200px; - cursor: default; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - -webkit-tap-highlight-color: rgba(0,0,0,0); -} - -:host(:focus) { - outline: none; -} - -#sliderContainer { - position: relative; - width: calc(100% - 32px); - height: 32px; -} - -#sliderContainer.editable { - float: left; - width: calc(100% - 72px); - margin: 12px 0; -} - -.bar-container { - position: absolute; - top: 0; - left: 16px; - height: 100%; - width: 100%; - overflow: hidden; -} - -.ring > .bar-container { - left: 20px; - width: calc(100% - 4px); - transition: left 0.18s ease, width 0.18s ease; -} - -.ring.expand:not(.pin) > .bar-container { - left: 30px; - width: calc(100% - 14px); -} - -.ring.expand.dragging > .bar-container { - transition: none; -} - -#sliderBar { - position: absolute; - top: 15px; - left: 0; - height: 2px; - width: 100%; - padding: 8px 0; - margin: -8px 0; -} - -.ring #sliderBar { - left: -4px; - width: calc(100% + 4px); -} - -.ring.expand:not(.pin) #sliderBar { - left: -14px; - width: calc(100% + 14px); -} - -.slider-markers { - position: absolute; - top: 15px; - left: 15px; - height: 2px; - width: calc(100% + 2px); - box-sizing: border-box; - pointer-events: none; -} - -.slider-markers::after, .slider-marker::after { - content: ""; - display: block; - width: 2px; - height: 2px; - border-radius: 50%; - background-color: black; -} - -#sliderBar::shadow #activeProgress { - background-color: #3f51b5; -} - -.transiting #sliderBar::shadow #activeProgress { - transition: -webkit-transform 0.08s ease; - transition: transform 0.08s ease; -} - -#sliderKnob { - position: absolute; - left: 0; - top: 0; - width: 32px; - height: 32px; -} - -.transiting > #sliderKnob { - transition: left 0.08s ease; -} - -#sliderKnob:focus { - outline: none; -} - -#sliderKnob.dragging { - transition: none; -} - -.snaps > #sliderKnob.dragging { - transition: -webkit-transform 0.08s ease; - transition: transform 0.08s ease; -} - -#sliderKnobInner { - width: 12px; - height: 12px; - box-sizing: border-box; - -moz-box-sizing: border-box; - border-radius: 50%; - background-color: #3f51b5; - /* FIXME(ffu): can't use the following. https://github.com/Polymer/platform/issues/53 */ - /* transition-property: height, width, background-color, border; - transition-duration: 0.1s; - transition-timing-function: ease; */ - transition: height 0.18s ease, width 0.18s ease; -} - -.expand:not(.pin) > #sliderKnob > #sliderKnobInner { - width: 100%; - height: 100%; - -webkit-transform: translateZ(0); - transform: translateZ(0); -} - -.ring > #sliderKnob > #sliderKnobInner { - background-color: transparent; - border: 2px solid #c8c8c8; -} - -#sliderKnobInner::before { - background-color: #3f51b5; -} - -.pin > #sliderKnob > #sliderKnobInner::before { - content: ""; - position: absolute; - top: 0; - left: 0; - width: 26px; - height: 26px; - margin-left: 3px; - border-radius: 50% 50% 50% 0; - -webkit-transform: rotate(-45deg) scale(0) translate(0); - transform: rotate(-45deg) scale(0) translate(0); -} - -#sliderKnobInner::before, #sliderKnobInner::after { - transition: -webkit-transform .2s ease, background-color .18s ease; - transition: transform .2s ease, background-color .18s ease; -} - -.pin.ring > #sliderKnob > #sliderKnobInner::before { - background-color: #c8c8c8; -} - -.pin.expand > #sliderKnob > #sliderKnobInner::before { - -webkit-transform: rotate(-45deg) scale(1) translate(17px, -17px); - transform: rotate(-45deg) scale(1) translate(17px, -17px); -} - -.pin > #sliderKnob > #sliderKnobInner::after { - content: attr(value); - position: absolute; - top: 0; - left: 0; - width: 32px; - height: 26px; - text-align: center; - color: #fff; - font-size: 10px; - -webkit-transform: scale(0) translate(0); - transform: scale(0) translate(0); -} - -.pin.expand > #sliderKnob > #sliderKnobInner::after { - -webkit-transform: scale(1) translate(0, -17px); - transform: scale(1) translate(0, -17px); -} - -/* editable: paper-input */ -.slider-input { - width: 40px; - float: right; - overflow: hidden; -} - -.slider-input::shadow input { - /* FIXME(ffu): should one be able set text-align directly on paper-input? */ - text-align: center; -} - -/* disabled state */ -#sliderContainer.disabled { - pointer-events: none; -} - -.disabled > #sliderKnob > #sliderKnobInner { - width: 8px; - height: 8px; - background-color: #c8c8c8; -} - -.disabled.ring > #sliderKnob > #sliderKnobInner { - background-color: transparent; -} - -#sliderContainer.disabled #sliderBar::shadow #activeProgress { - background-color: #c8c8c8; -} diff --git a/rpg-docs/public/custom_components/paper-diff-slider/paper-diff-slider.html b/rpg-docs/public/custom_components/paper-diff-slider/paper-diff-slider.html index 0a2e283b..e624a428 100644 --- a/rpg-docs/public/custom_components/paper-diff-slider/paper-diff-slider.html +++ b/rpg-docs/public/custom_components/paper-diff-slider/paper-diff-slider.html @@ -1,16 +1,29 @@ - + + + + + + + + + + - - - + + -
- -
+ +
+
+
-
- - - - - + + diff --git a/rpg-docs/public/custom_components/paper-dropdown-menu/paper-dropdown-menu.css b/rpg-docs/public/custom_components/paper-dropdown-menu/paper-dropdown-menu.css deleted file mode 100644 index 2621f627..00000000 --- a/rpg-docs/public/custom_components/paper-dropdown-menu/paper-dropdown-menu.css +++ /dev/null @@ -1,44 +0,0 @@ -/* - * @license - * 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 { - position: relative; - display: inline-block; - background-color: #fff; - -moz-user-select: none; - -ms-user-select: none; - -webkit-user-select: none; - user-select: none; - cursor: pointer; - padding: 0.75em 0; -} - -#control { - box-sizing: border-box; - max-height: 2em; - color: #757575; - border-bottom: 1px solid #757575; -} - -#control[selected] { - color: #000; -} - -#control > div { - padding: 0.5em 0 0.25em; - overflow: hidden; - /* FIXME not working for some reason */ - white-space: nowrap; - text-overflow: ellipsis; -} - -core-icon { - margin: 0.3em 0 0.2em 0.25em; -} \ No newline at end of file diff --git a/rpg-docs/public/custom_components/paper-dropdown-menu/paper-dropdown-menu.html b/rpg-docs/public/custom_components/paper-dropdown-menu/paper-dropdown-menu.html deleted file mode 100644 index c9a64a76..00000000 --- a/rpg-docs/public/custom_components/paper-dropdown-menu/paper-dropdown-menu.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/rpg-docs/public/custom_components/paper-dropdown/.bower.json b/rpg-docs/public/custom_components/paper-dropdown/.bower.json deleted file mode 100644 index 89e60c42..00000000 --- a/rpg-docs/public/custom_components/paper-dropdown/.bower.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "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" -} \ No newline at end of file diff --git a/rpg-docs/public/custom_components/paper-dropdown/README.md b/rpg-docs/public/custom_components/paper-dropdown/README.md deleted file mode 100644 index 234847f2..00000000 --- a/rpg-docs/public/custom_components/paper-dropdown/README.md +++ /dev/null @@ -1,6 +0,0 @@ -paper-dropdown -============== - -owner: @morethanreal - -See the [component page](https://www.polymer-project.org/0.5/docs/elements/paper-dropdown.html) for more information. diff --git a/rpg-docs/public/custom_components/paper-dropdown/bower.json b/rpg-docs/public/custom_components/paper-dropdown/bower.json deleted file mode 100644 index f0ff0cd7..00000000 --- a/rpg-docs/public/custom_components/paper-dropdown/bower.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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" -} \ No newline at end of file diff --git a/rpg-docs/public/custom_components/paper-dropdown/demo.html b/rpg-docs/public/custom_components/paper-dropdown/demo.html deleted file mode 100644 index d23962db..00000000 --- a/rpg-docs/public/custom_components/paper-dropdown/demo.html +++ /dev/null @@ -1,456 +0,0 @@ - - - - - - - - - - - paper-dropdown - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rpg-docs/public/custom_components/paper-dropdown/index.html b/rpg-docs/public/custom_components/paper-dropdown/index.html deleted file mode 100644 index 8c8da47a..00000000 --- a/rpg-docs/public/custom_components/paper-dropdown/index.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/rpg-docs/public/custom_components/paper-dropdown/paper-dropdown-transition.css b/rpg-docs/public/custom_components/paper-dropdown/paper-dropdown-transition.css deleted file mode 100644 index d544eade..00000000 --- a/rpg-docs/public/custom_components/paper-dropdown/paper-dropdown-transition.css +++ /dev/null @@ -1,15 +0,0 @@ -/* 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; -} \ No newline at end of file diff --git a/rpg-docs/public/custom_components/paper-dropdown/paper-dropdown-transition.html b/rpg-docs/public/custom_components/paper-dropdown/paper-dropdown-transition.html deleted file mode 100644 index f9c11db9..00000000 --- a/rpg-docs/public/custom_components/paper-dropdown/paper-dropdown-transition.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - - - - - diff --git a/rpg-docs/public/custom_components/paper-dropdown/paper-dropdown.html b/rpg-docs/public/custom_components/paper-dropdown/paper-dropdown.html deleted file mode 100644 index 245777ef..00000000 --- a/rpg-docs/public/custom_components/paper-dropdown/paper-dropdown.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/rpg-docs/public/custom_components/swipe-detect/swipe-detect.html b/rpg-docs/public/custom_components/swipe-detect/swipe-detect.html deleted file mode 100644 index 6624cdcf..00000000 --- a/rpg-docs/public/custom_components/swipe-detect/swipe-detect.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - diff --git a/rpg-docs/scss.json b/rpg-docs/scss.json deleted file mode 100644 index 71575975..00000000 --- a/rpg-docs/scss.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "includePaths": [ - ".meteor/local/build/programs/server/assets/packages/wolves_bourbon" - ] -} \ No newline at end of file diff --git a/rpg-docs/server/kadira.js b/rpg-docs/server/kadira.js deleted file mode 100644 index 1a8cf69a..00000000 --- a/rpg-docs/server/kadira.js +++ /dev/null @@ -1 +0,0 @@ -Kadira.connect("erzTBaxBGjsd28SDt", "1c100582-dfce-4378-884f-e133e347b7b3"); diff --git a/rpg-docs/server/publications/characterList.js b/rpg-docs/server/publications/characterList.js index 5a558fee..b8c24b83 100644 --- a/rpg-docs/server/publications/characterList.js +++ b/rpg-docs/server/publications/characterList.js @@ -22,6 +22,7 @@ Meteor.publish("characterList", function(){ writers:1, owner: 1, color: 1, + picture: 1, } } ); diff --git a/rpg-docs/server/publications/singleCharacter.js b/rpg-docs/server/publications/singleCharacter.js index 94d3015c..13632db3 100644 --- a/rpg-docs/server/publications/singleCharacter.js +++ b/rpg-docs/server/publications/singleCharacter.js @@ -27,10 +27,6 @@ Meteor.publish("singleCharacter", function(characterId){ SpellLists.find ({charId: characterId}, {removed: true}), TemporaryHitPoints.find({charId: characterId}, {removed: true}), Proficiencies.find ({charId: characterId}, {removed: true}), - Meteor.users.find ( - {_id: {$in: _.union(char.readers, char.writers)}}, - {fields: {username: 1}} - ), ]; } else { return []; diff --git a/rpg-docs/server/publications/users.js b/rpg-docs/server/publications/users.js new file mode 100644 index 00000000..df759364 --- /dev/null +++ b/rpg-docs/server/publications/users.js @@ -0,0 +1,7 @@ +Meteor.publish("userNames", function(ids){ + if (!this.userId || !ids) return []; + return Meteor.users.find( + {_id: {$in: ids}}, + {fields: {username: 1}} + ); +}); diff --git a/us.stackdump b/us.stackdump new file mode 100644 index 00000000..0852c264 --- /dev/null +++ b/us.stackdump @@ -0,0 +1,24 @@ +MSYS-1.0.12 Build:2012-07-05 14:56 +Exception: STATUS_NONCONTINUABLE_EXCEPTION at eip=77C10864 +eax=0028EDB0 ebx=0028FEE0 ecx=00000000 edx=C0000008 esi=0028EE2C edi=00000000 +ebp=0028EE14 esp=0028EDA4 program=us +cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B +Stack trace: +Frame Function Args +0028EE14 77C10864 (0028EE2C, 0028EE7C, 0028EE2C, 0028EE7C) +0028F2E0 77B90133 (00320114, 00000000, 00320238, 00000000) +0028F2F8 77BB8EE2 (00320114, 0028F358, 0028F588, 6803B9F5) +0028F588 6803BA01 (00320000, 00330F38, 68037457, 00000022) +0028FC38 6803AF8F (00320000, 00660065, 006E0061, 005A002E) +0028FCD8 6803ADC4 (00320000, 0028FD20, 0028FD28, 6803B334) +0028FD28 6803B33E (00320000, 0028FD88, 00000000, 68029DE3) +0028FD48 68039AE6 (00320000, 680F7174, 00011044, 00000000) +0028FE98 68052117 (680A4C64, 00000000, 0028FEE8, 680044EA) +0028FEE8 68004709 (00000000, 00000000, 0028FF28, 0048BC00) +0028FF08 68004C5F (00401248, 00000000, 00000000, 00000000) +0028FF28 68004C98 (00000000, 00000000, 00000000, 00000000) +0028FF58 0048BB08 (00401248, 00000000, 00000000, 00000000) +0028FF88 0040103D (7EFDE000, 0028FFD4, 77BB9F72, 7EFDE000) +0028FF94 755F33AA (7EFDE000, 7D5558E1, 00000000, 00000000) +0028FFD4 77BB9F72 (00401000, 7EFDE000, 00000000, 00000000) +End of stack trace (more stack frames may be present) \ No newline at end of file