Firefox now works... barely

This commit is contained in:
Stefan Zermatten
2017-02-10 14:01:06 +02:00
parent eb4336b3e9
commit 576c1f953b
7 changed files with 119 additions and 122 deletions

View File

@@ -38,7 +38,6 @@ spacebars
check@1.2.4
useraccounts:iron-routing
wizonesolutions:canonical
meteorhacks:fast-render
standard-minifier-js@1.2.1
shell-server
seba:minifiers-autoprefixer

View File

@@ -3,36 +3,35 @@ 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
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.5
autoupdate@1.2.11
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.1.9
blaze-html-templates@1.0.5
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.0.7
caching-html-compiler@1.1.0
callback-hook@1.0.10
check@1.2.4
chuangbo:cookie@1.1.0
chuangbo:marked@0.3.5_1
coffeescript@1.0.17
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.9
ddp-client@1.3.2
ddp-common@1.2.8
ddp-rate-limiter@1.0.6
ddp-server@1.2.10
ddp-server@1.3.12
deps@1.0.12
diff-sequence@1.0.7
differential:vulcanize@3.0.0
@@ -56,37 +55,33 @@ 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.13
iron:router@1.1.1
iron:url@1.0.11
jquery@1.11.10
lai:collection-extensions@0.2.1_1
launch-screen@1.0.12
less@2.6.5
launch-screen@1.1.0
less@2.7.8
livedata@1.0.18
localstorage@1.0.12
logging@1.1.16
matb33:collection-hooks@0.8.4
mdg:validation-error@0.2.0
mdg:validation-error@0.5.1
meteor@1.6.0
meteor-base@1.0.4
meteorhacks:fast-render@2.16.0
meteorhacks:inject-data@2.0.0
meteorhacks:meteorx@1.4.1
meteorhacks:picker@1.0.3
meteorhacks:subs-manager@1.6.4
minifier-css@1.1.13
minifier-css@1.2.15
minifier-js@1.2.15
minimongo@1.0.19
mobile-experience@1.0.4
mobile-status-bar@1.0.13
modules@0.7.7
modules-runtime@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.11_2
npm-mongo@2.2.16_1
oauth@1.1.12
oauth2@1.1.11
observe-sequence@1.0.14
@@ -107,18 +102,18 @@ service-configuration@1.0.11
session@1.1.7
sha@1.0.9
shell-server@0.2.1
softwarerero:accounts-t9n@1.3.6
softwarerero:accounts-t9n@1.3.7
spacebars@1.0.13
spacebars-compiler@1.0.13
spacebars-compiler@1.1.0
splendido:accounts-emails-field@1.2.0
splendido:accounts-meld@1.3.1
srp@1.0.10
standard-minifier-js@1.2.1
templates:array@1.0.3
templating@1.2.15
templating-compiler@1.2.15
templating-runtime@1.2.15
templating-tools@1.0.5
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

View File

@@ -4,28 +4,32 @@ Template.characterSheet.onRendered(function() {
Session.setDefault(this.data._id + ".selectedTab", "0");
// Keep the header's scroll target up to date with the currently selected tab
const header = this.find("app-header");
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 && header._scrollHandler();
});
});
// 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")
);
_.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);
@@ -175,6 +179,7 @@ Template.characterSheet.events({
setTab(this._id, event.target.selected);
},
"color-change": function(event, instance){
console.log("character color change")
Characters.update(this._id, {$set: {color: event.color}});
},
"click #deleteCharacter": function(event, instance){

View File

@@ -1,53 +1,7 @@
<template name="layout">
<app-drawer-layout class="layout" responsive-width="905px" fullbleed>
<app-drawer>
<app-header-layout class="white" has-scrolling-region>
<app-header id="accountSummary" effects="waterfall parallax-background" condenses fixed>
<app-toolbar>
{{#if currentUser}}
<a href="/account" style="text-decoration: underline; cursor: pointer; font-size: 16px;">
{{profileLink}}
</a>
{{else}}
<a href="/sign-in" style="text-decoration: underline; cursor: pointer; font-size: 16px;">
Sign in
</a>
{{/if}}
</app-toolbar>
</app-header>
<div id="navPanel">
<a href="/" tabindex="-1">
<paper-icon-item id="homeNav">
<iron-icon icon="home" item-icon></iron-icon>
Home
</paper-icon-item>
</a>
<a href="/characterList" tabindex="-1">
<paper-icon-item id="characters">
<iron-icon icon="social:people" item-icon></iron-icon>
Characters
</paper-icon-item>
</a>
<a href="/guide" tabindex="-1">
<paper-icon-item id="guide">
<iron-icon icon="social:school" item-icon></iron-icon>
Guide
</paper-icon-item>
</a>
<paper-icon-item id="feedback">
<iron-icon icon="bug-report" item-icon></iron-icon>
Send Feedback
</paper-icon-item>
<a href="changeLog" tabindex="-1">
<paper-icon-item id="changeLog">
<iron-icon icon="list" item-icon></iron-icon>
Change Log
</paper-icon-item>
</a>
<hr style="margin: 16px 0 24px 0;">
{{> characterSideList}}
</div>
</app-header-layout>
{{> appDrawer}}
</app-drawer>
{{> yield}}
</app-drawer-layout>
@@ -56,3 +10,53 @@
</paper-toast>
{{> dialogStack}}
</template>
<template name="appDrawer">
<app-header-layout class="white" has-scrolling-region>
<app-header id="accountSummary" effects="waterfall parallax-background" condenses fixed>
<app-toolbar>
{{#if currentUser}}
<a href="/account" style="text-decoration: underline; cursor: pointer; font-size: 16px;">
{{profileLink}}
</a>
{{else}}
<a href="/sign-in" style="text-decoration: underline; cursor: pointer; font-size: 16px;">
Sign in
</a>
{{/if}}
</app-toolbar>
</app-header>
<div id="navPanel">
<a href="/" tabindex="-1">
<paper-icon-item id="homeNav">
<iron-icon icon="home" item-icon></iron-icon>
Home
</paper-icon-item>
</a>
<a href="/characterList" tabindex="-1">
<paper-icon-item id="characters">
<iron-icon icon="social:people" item-icon></iron-icon>
Characters
</paper-icon-item>
</a>
<a href="/guide" tabindex="-1">
<paper-icon-item id="guide">
<iron-icon icon="social:school" item-icon></iron-icon>
Guide
</paper-icon-item>
</a>
<paper-icon-item class="feedback">
<iron-icon icon="bug-report" item-icon></iron-icon>
Send Feedback
</paper-icon-item>
<a href="changeLog" tabindex="-1">
<paper-icon-item id="changeLog">
<iron-icon icon="list" item-icon></iron-icon>
Change Log
</paper-icon-item>
</a>
<hr style="margin: 16px 0 24px 0;">
{{> characterSideList}}
</div>
</app-header-layout>
</template>

View File

@@ -2,18 +2,7 @@ Template.layout.onCreated(function() {
this.subscribe("user");
});
Template.layout.rendered = function() {
$(window).on("popstate", GlobalUI.popStateHandler);
};
Template.layout.destroyed = function() {
$(window).off("popstate", GlobalUI.popStateHandler);
};
Template.layout.helpers({
notSelected: function(){
return Session.get("global.ui.detailShow") ? "not-selected" : null;
},
Template.appDrawer.helpers({
profileLink: function() {
var user = Meteor.user();
return user.profile && user.profile.username || user.username || "My Account";
@@ -22,17 +11,18 @@ Template.layout.helpers({
let drawerLayout;
const closeDrawer = function(instance){
if (!drawerLayout) drawerLayout = instance.find("app-drawer-layout");
if (!drawerLayout) drawerLayout = $("app-drawer-layout")[0];
if (drawerLayout && drawerLayout.narrow){
drawerLayout.drawer.close();
}
}
Template.layout.events({
Template.appDrawer.events({
"click app-drawer a": function(event, instance){
closeDrawer(instance);
},
"click #feedback": function(event, instance) {
"click .feedback": function(event, instance) {
console.log("feedback clicked");
pushDialogStack({
template: "feedback",
element: event.currentTarget,

View File

@@ -88,10 +88,11 @@ const shrinkAnimation = ({element, reverse}) => {
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: $(".mini-holder paper-fab, .floatyButton")
});
shrinkAnimation({element: fabs});
}
const dialogRect = dialog.getBoundingClientRect();
@@ -124,10 +125,12 @@ const dialogOpenAnimation = ({element, returnElement, dialog}) => {
const dialogCloseAnimation = ({element, returnElement, dialog, callback}) => {
// unhide all floaty buttons when we close the last dialog
if (!dialogs._array.length) shrinkAnimation({
element: $(".mini-holder paper-fab, .floatyButton"),
reverse: true,
});
let fabs = $(".mini-holder paper-fab, .floatyButton").filter(
(index, el) => el !== element && el !== returnElement
);
if (dialogs._array.length === 1) {
shrinkAnimation({element: fabs, revese: true});
}
// We are returning to a different element
// pop the original element back in and use the returnElement in its place
@@ -212,10 +215,9 @@ const dialogCloseAnimation = ({element, returnElement, dialog, callback}) => {
}, duration);
};
Template.dialogStack.uihooks({
".dialog": {
container: ".dialog-sizer",
insert: function(node, next, tpl) {
Template.dialogStack.onRendered(function(){
$(".dialog-sizer")[0]._uihooks = {
insertElement: function(node, next) {
$(node).insertBefore(next);
const data = Blaze.getData(node);
if (data.element){
@@ -230,7 +232,7 @@ Template.dialogStack.uihooks({
});
}
},
remove: function(node, tpl) {
removeElement: function(node) {
const element = node._dialogStackElement;
const returnElement = node._dialogStackReturnElement;
if (element){

View File

@@ -7,12 +7,14 @@ Template.fabMenu.onRendered(function(){
// Do a spin animation to turn the + icon into a x when active
this.autorun(() => {
const active = this.active.get();
const iconStyle = active ?
"transition: transform 0.3s ease; transform: rotate(225deg);" :
"transition: transform 0.3s ease;";
fab.updateStyles({
["--paper-fab-iron-icon"]: iconStyle,
});
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,
});
}
})
});