Permalink
Browse files

Fixed TODO list when using on single files. “Show relative path” chec…

…kbox is disabled in that case. Issue #3
  • Loading branch information...
1 parent 959e077 commit 7af4cea4b46094f974b311f8b04f49883f620fb3 Stanley Rost committed Dec 3, 2009
Showing with 8 additions and 4 deletions.
  1. +6 −2 Support/css/default/style.css
  2. +1 −1 Support/template_tail.rhtml
  3. +1 −1 Support/todo.rb
@@ -86,8 +86,12 @@
}
label.filter {
- position: absolute;
- padding-top: 4px;
+ position: absolute;
+ padding-top: 4px;
+}
+
+label.disabled {
+ opacity: .66;
}
#filter, #trigger_relative_paths {
@@ -7,7 +7,7 @@
<fieldset>
<legend>Options</legend>
<p><label class="filter">Filter:</label><input type="text" value="" id="filter" size="40"></p>
- <p><input type="checkbox" id="trigger_relative_paths"> <label for="trigger_relative_paths">Show relative paths</label> </p>
+ <p><input type="checkbox" id="trigger_relative_paths" <% if project_dir == "" %>disabled="true"<% end %>> <label for="trigger_relative_paths" <% if project_dir == "" %>class="disabled"<% end %>>Show relative paths</label> </p>
</fieldset>
<% tags.each do |tag| %>
View
@@ -65,7 +65,7 @@ def TextMate.file_link (file, line = 0)
STDOUT.flush
-project_dir = ENV['TM_PROJECT_DIRECTORY']
+project_dir = ENV['TM_PROJECT_DIRECTORY'] || ""
home_dir = /^#{Regexp.escape ENV['HOME']}/
total = 0
TextMate.each_text_file do |file|

0 comments on commit 7af4cea

Please sign in to comment.