Permalink
Browse files

Use JavaScript for link to project info file. Comment out absolute pa…

…th dictionary items.
  • Loading branch information...
drdrang committed May 31, 2010
1 parent 04fb411 commit f3660f130f87249bfb15fe263d0d0681f63a7d91
Showing with 9 additions and 5 deletions.
  1. +2 −2 buildPage.py
  2. +6 −3 header.tmpl
  3. +1 −0 project.info
View
@@ -51,7 +51,7 @@
info['modtime'] = info['modtime'][1:]
# Dictionary entry with absolute path to the Markdown file (for editing).
-info['mdpath'] = os.path.abspath(mdFile)
+# info['mdpath'] = os.path.abspath(mdFile)
# Add project info to the dictionary.
projInfo = open('project.info', 'r')
@@ -67,7 +67,7 @@
projInfo.close()
# Dictionary entry with path to project info file (for editing).
-info['infopath'] = os.path.abspath('project.info')
+# info['infopath'] = os.path.abspath('project.info')
# Convert the contacts into a series of HTML list items.
if 'contact' in info:
View
@@ -36,10 +36,13 @@
&nbsp;$modldate<br />
&nbsp;at $modtime</li>
</ul>
- <!-- <hr />
+ <hr />
<ul>
- <li><a href="txmt://open?url=file://$infopath">Edit project info</a></li>
- </ul> -->
+ <li><script type="text/javascript">
+ infoPath = document.URL.replace(/\/$dirname\/.+$/, '/$dirname/project.info');
+ document.write('<a href="txmt://open?url=' + infoPath + '">Edit project info</a>');
+ </script></li>
+ </ul>
</div> <!-- sidebar -->
<div id="note">
View
@@ -1,4 +1,5 @@
jsmathpath = file:///Users/mark/Library/JavaScript/jsMath/easy/load.js
+dirname = notes
projname = Project Name
projnumber = 9999
contact = Apple:A1A2AA41-FA30-40AE-9925-FD6DB270B0A5%3AABPerson

0 comments on commit f3660f1

Please sign in to comment.