aboutsummaryrefslogtreecommitdiffstats
path: root/scrumelo.el
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-05-22 21:49:16 +0200
committerGravatar Tom Willemse2013-05-22 21:49:16 +0200
commit77eebc036114247a0ea34bf0a2d8369b3c7f041c (patch)
tree5e7af5b137198d642a8a04be3bc0ec3d1da64720 /scrumelo.el
parenta5eb8e2da51934ee10f0aa17496838c3999bd5c5 (diff)
downloadscrumelo-77eebc036114247a0ea34bf0a2d8369b3c7f041c.tar.gz
scrumelo-77eebc036114247a0ea34bf0a2d8369b3c7f041c.zip
Add scrumelo--base-dir
This should help with serving files and such, so I don't have to stay in the right buffer to make everything work.
Diffstat (limited to 'scrumelo.el')
-rw-r--r--scrumelo.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/scrumelo.el b/scrumelo.el
index 52b1493..1e4c070 100644
--- a/scrumelo.el
+++ b/scrumelo.el
@@ -18,6 +18,12 @@
(defvar scrumelo-project-file "~/projects/scrumelo/aeos.org"
"The file containing the scrum backlog.")
+(defvar scrumelo--base-dir
+ (if load-file-name
+ (directory-file-name load-file-name)
+ default-directory)
+ "The current directory.")
+
(defvar scrumelo-bootstrap-css-location
"http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css"
"The location of the twitter bootstrap CSS file.")
@@ -155,7 +161,8 @@
(elnode-dispatcher
httpcon
`(("^/$" . scrumelo-backlog-page)
- ("^/js/scrumelo.js" . ,(elnode-make-send-file "js/scrumelo.js"))
+ ("^/js/scrumelo.js" . ,(elnode-make-send-file
+ (concat scrumelo--base-dir "js/scrumelo.js")))
("^/stories/new/$" . scrumelo-new-story))))
(elnode-start 'scrumelo-handler :port 8028 :host "localhost")