Use relative links into static/... rather than /static/...
authorW. Trevor King <wking@drexel.edu>
Sun, 18 Jul 2010 19:06:32 +0000 (15:06 -0400)
committerW. Trevor King <wking@drexel.edu>
Sun, 18 Jul 2010 19:06:32 +0000 (15:06 -0400)
This allows us to mount dirtag/web.py to a non-root URL (e.g. with
Apache's mod_proxy).

static/dirtag.js
template/dirtag.xul

index 336c928f63fa0f368ffbc552c00cd54c244f16eb..e1eb26715b9ab7aa79266a49ceb9ef4c8fe83648 100644 (file)
@@ -126,7 +126,7 @@ function set_selected_element(path, tags, id) {
     element.file_path = path;
     element.file_tags = tags;
     element.tree_id = id;
-    element.setAttribute('src', '/static/raw/'+path.join('/'));
+    element.setAttribute('src', 'static/raw/'+path.join('/'));
 }
 
 function raw_tree_select() {
index 2e1ad9d442f0502948aa8e1d87177ecda1d75feb..c37d1399b8a3756fb2f4c2a70a136f4b5ed94168 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<?xml-stylesheet href="/static/dirtag.css" type="text/css"?>
+<?xml-stylesheet href="static/dirtag.css" type="text/css"?>
 
 <!-- Firefox doesn't load external DTDs for web-served XML,
     https://developer.mozilla.org/en/XML_in_Mozilla#DTDs_and_Other_External_Entities
@@ -30,7 +30,7 @@
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    >
 
-  <script type="application/javascript" src="/static/dirtag.js"/>
+  <script type="application/javascript" src="static/dirtag.js"/>
   <groupbox id="new-tag">
     <caption label="&new_tag.caption;"/>
     <hbox>