<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -401,7 +401,15 @@ class ApplicationController &lt; ActionController::Base
                         :user =&gt; current_user)
     title = highlight_all(title, highlight_keys)
 
-    html = { :class =&gt; &quot;tooltip#{task.css_classes}&quot;, :title =&gt; title }
+    html = { 
+      :class =&gt; &quot;tooltip tasklink #{task.css_classes}&quot;, 
+      :title =&gt; title
+    }
+
+    if @ajax_task_links
+      html[:onclick] = &quot;showTaskInPage(#{ task.task_num }); return false;&quot;
+    end
+
     text = truncate ? task.name : self.class.helpers.truncate(task.name, :length =&gt; 80)
     text = highlight_all(text, highlight_keys)
     </diff>
      <filename>app/controllers/application_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -209,6 +209,9 @@ class TasksController &lt; ApplicationController
   def edit
     @task = current_user.company.tasks.find_by_task_num(params[:id])
 
+    @ajax_task_links = request.xhr? # want to use ajax task loads if this page was loaded by ajax
+      
+
     if @task.nil? or !current_user.can_view_task?(@task)
       flash['notice'] = _(&quot;You don't have access to that task, or it doesn't exist.&quot;)
       redirect_from_last
@@ -1115,9 +1118,6 @@ class TasksController &lt; ApplicationController
     task.due_at = tz.utc_to_local(@task.due_at) unless task.due_at.nil?
     @tags = {}
 
-    @logs = WorkLog.find(:all, :order =&gt; &quot;work_logs.started_at desc,work_logs.id desc&quot;, :conditions =&gt; [&quot;work_logs.task_id = ? #{&quot;AND (work_logs.comment = 1 OR work_logs.log_type=6)&quot; if session[:only_comments].to_i == 1}&quot;, task.id], :include =&gt; [:user, :task, :project])
-    @logs ||= []
-
     @projects = User.find(current_user.id).projects.find(:all, :order =&gt; 'name', :conditions =&gt; [&quot;completed_at IS NULL&quot;]).collect {|c| [ &quot;#{c.name} / #{c.customer.name}&quot;, c.id ] if current_user.can?(c, 'create')  }.compact unless current_user.projects.nil?
 
     @notify_targets = current_projects.collect{ |p| p.users.collect(&amp;:name) }.flatten.uniq
@@ -1167,6 +1167,7 @@ class TasksController &lt; ApplicationController
     # Subscribe to the juggernaut channel for Task updates
     session[:channels] += [&quot;tasks_#{current_user.company_id}&quot;]
     @tasks = current_task_filter.tasks
+    @ajax_task_links = true
   end
 
 end</diff>
      <filename>app/controllers/tasks_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -213,10 +213,6 @@ module ApplicationHelper
     text
   end
 
-#   def link_to_task(task)
-#     &quot;&lt;strong&gt;#{task.issue_num}&lt;/strong&gt; &lt;a href=\&quot;/tasks/edit/#{task.task_num}\&quot; class=\&quot;tooltip#{task.css_classes}\&quot; title=\&quot;#{task.to_tip({ :duration_format =&gt; current_user.duration_format, :workday_duration =&gt; current_user.workday_duration, :days_per_week =&gt; current_user.days_per_week, :user =&gt; current_user })}\&quot;&gt;#{h(truncate(task.name, :length =&gt; 80))}&lt;/a&gt;&quot;
-#   end
-
   def milestone_classes(m)
     return &quot; complete_milestone&quot; unless m.completed_at.nil?
 </diff>
      <filename>app/helpers/application_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -19,7 +19,7 @@ class WorkLog &lt; ActiveRecord::Base
   has_many    :work_log_notifications, :dependent =&gt; :destroy
   has_many    :users, :through =&gt; :work_log_notifications
 
-  named_scope :comments, :conditions =&gt; [ &quot;work_logs.comment = 1 or work_logs.log_type = 6&quot; ]
+  named_scope :comments, :conditions =&gt; [ &quot;work_logs.comment = ? or work_logs.log_type = ?&quot;, true, 6 ]
 
   validates_presence_of :started_at
 </diff>
      <filename>app/models/work_log.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,9 @@
   &lt;% end %&gt;
   
   &lt;% if dependency.done? %&gt;
-    &lt;img src=&quot;/images/tick.png&quot; border=0&gt;&lt;% else %&gt; &lt;% end %&gt;&lt;%= link_to_task(dependency) %&gt;
-    &lt;input name=&quot;dependencies[]&quot; type=&quot;hidden&quot; value=&quot;&lt;%=dependency.task_num%&gt;&quot;&gt;
-    &lt;span class=&quot;divider&quot;&gt;&lt;/span&gt;
+    &lt;img src=&quot;/images/tick.png&quot; border=0&gt;
+  &lt;% end %&gt;
+  &lt;%= link_to_task(dependency) %&gt;
+  &lt;%= hidden_field_tag :dependencies, dependency.task_num, :index =&gt; nil %&gt;
+  &lt;span class=&quot;divider&quot;&gt;&lt;/span&gt;
 &lt;/div&gt;</diff>
      <filename>app/views/tasks/_dependency.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -202,12 +202,12 @@ it in the current page.
 */
 function showTaskInPage(taskNum) {
     jQuery(&quot;#task_list tr.selected&quot;).removeClass(&quot;selected&quot;);
-	jQuery(&quot;#task_list #task_row_&quot; + taskNum).addClass(&quot;selected&quot;);
+    jQuery(&quot;#task_list #task_row_&quot; + taskNum).addClass(&quot;selected&quot;);
 
-	jQuery(&quot;#task&quot;).fadeOut();
+    jQuery(&quot;#task&quot;).fadeOut();
     jQuery.get(&quot;/tasks/edit/&quot; + taskNum, {}, function(data) {
-		jQuery(&quot;#task&quot;).html(data);
-		jQuery(&quot;#task&quot;).fadeIn('slow');
+	jQuery(&quot;#task&quot;).html(data);
+	jQuery(&quot;#task&quot;).fadeIn('slow');
     });
 }
 </diff>
      <filename>public/javascripts/application.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4f05115019297cfd5f4c9ea9114ed88c1ede347e</id>
    </parent>
  </parents>
  <author>
    <name>Brad Wilson</name>
    <email>brad@lucky-dip.net</email>
  </author>
  <url>http://github.com/ari/clockingit/commit/b3b365465581273688dfcf33e7c4ca9c57a78a95</url>
  <id>b3b365465581273688dfcf33e7c4ca9c57a78a95</id>
  <committed-date>2009-11-01T23:29:52-08:00</committed-date>
  <authored-date>2009-11-01T23:29:52-08:00</authored-date>
  <message>ajax load tasks when in the task list view</message>
  <tree>dd63eaca6db1150bee28e8e82de7016ca619d305</tree>
  <committer>
    <name>Brad Wilson</name>
    <email>brad@lucky-dip.net</email>
  </committer>
</commit>
