summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Quandalle <maxime@quandalle.com>2015-10-08 23:25:04 +0200
committerMaxime Quandalle <maxime@quandalle.com>2015-10-08 23:28:27 +0200
commita78debc461944f55de246db15a1dd29353dec4ae (patch)
treee49b55895c5376c613dcc3512d56a5d89246b095
parentc804813e5f5fdffb8a7deca72737b65f052ea28a (diff)
downloadwekan-a78debc461944f55de246db15a1dd29353dec4ae.tar.gz
wekan-a78debc461944f55de246db15a1dd29353dec4ae.tar.bz2
wekan-a78debc461944f55de246db15a1dd29353dec4ae.zip
Support app deployment under a path prefix
Fixes #133
-rw-r--r--.meteor/versions2
-rw-r--r--client/components/activities/activities.js4
-rw-r--r--client/components/cards/attachments.jade2
-rw-r--r--client/components/cards/minicard.jade2
-rw-r--r--client/components/main/header.jade4
-rw-r--r--client/components/main/layouts.jade6
6 files changed, 12 insertions, 8 deletions
diff --git a/.meteor/versions b/.meteor/versions
index 0a423853..672a85e8 100644
--- a/.meteor/versions
+++ b/.meteor/versions
@@ -61,7 +61,7 @@ id-map@1.0.4
idmontie:migrations@1.0.0
jquery@1.11.4
kadira:blaze-layout@2.1.0
-kadira:flow-router@2.6.1
+kadira:flow-router@2.7.0
kenton:accounts-sandstorm@0.1.4
launch-screen@1.0.4
less@2.5.0_3
diff --git a/client/components/activities/activities.js b/client/components/activities/activities.js
index 5c5d8370..9a1435ef 100644
--- a/client/components/activities/activities.js
+++ b/client/components/activities/activities.js
@@ -55,7 +55,7 @@ BlazeComponent.extendComponent({
cardLink() {
const card = this.currentData().card();
return card && Blaze.toHTML(HTML.A({
- href: card.absoluteUrl(),
+ href: FlowRouter.path(card.absoluteUrl()),
'class': 'action-card',
}, card.title));
},
@@ -69,7 +69,7 @@ BlazeComponent.extendComponent({
attachmentLink() {
const attachment = this.currentData().attachment();
return attachment && Blaze.toHTML(HTML.A({
- href: attachment.url({ download: true }),
+ href: FlowRouter.path(attachment.url({ download: true })),
target: '_blank',
}, attachment.name()));
},
diff --git a/client/components/cards/attachments.jade b/client/components/cards/attachments.jade
index 59eaf077..e519650b 100644
--- a/client/components/cards/attachments.jade
+++ b/client/components/cards/attachments.jade
@@ -15,7 +15,7 @@ template(name="attachmentsGalery")
.attachment-thumbnail
if isUploaded
if isImage
- img.attachment-thumbnail-img(src=url)
+ img.attachment-thumbnail-img(src="{{pathfor url}}")
else
span.attachment-thumbnail-ext= extension
else
diff --git a/client/components/cards/minicard.jade b/client/components/cards/minicard.jade
index 660b0fa5..573b3da1 100644
--- a/client/components/cards/minicard.jade
+++ b/client/components/cards/minicard.jade
@@ -2,7 +2,7 @@ template(name="minicard")
.minicard
if cover
.minicard-cover
- img(src=cover.url)
+ img(src="{{pathFor cover.url}}")
if labels
.minicard-labels
each labels
diff --git a/client/components/main/header.jade b/client/components/main/header.jade
index 4715bfc8..86dfd6a7 100644
--- a/client/components/main/header.jade
+++ b/client/components/main/header.jade
@@ -43,10 +43,10 @@ template(name="header")
the list of all boards.
if isSandstorm
.wekan-logo
- img(src="/wekan-logo-header.png" alt="Wekan")
+ img(src="{{pathFor '/wekan-logo-header.png'}}" alt="Wekan")
else
a.wekan-logo(href="{{pathFor 'home'}}" title="{{_ 'header-logo-title'}}")
- img(src="/wekan-logo-header.png" alt="Wekan")
+ img(src="{{pathFor '/wekan-logo-header.png'}}" alt="Wekan")
template(name="headerTitle")
h1 {{_ 'my-boards'}}
diff --git a/client/components/main/layouts.jade b/client/components/main/layouts.jade
index f5a8db59..166f143a 100644
--- a/client/components/main/layouts.jade
+++ b/client/components/main/layouts.jade
@@ -2,12 +2,16 @@ head
title Wekan
meta(name="viewport"
content="maximum-scale=1.0,width=device-width,initial-scale=1.0,user-scalable=0")
+ //- XXX We should use pathFor in the following `href` to support the case
+ where the application is deployed with a path prefix, but it seems to be
+ difficult to do that cleanly with Blaze -- at least without adding extra
+ packages.
link(rel="shortcut icon" href="/wekan-favicon.png")
template(name="userFormsLayout")
section.auth-layout
h1.at-form-landing-logo
- img(src="/wekan-logo.png" alt="Wekan")
+ img(src="{{pathFor '/wekan-logo.png'}}" alt="Wekan")
+Template.dynamic(template=content)
template(name="defaultLayout")