- if @task.errors.empty? - if !called_from_index_page? -# If it's not Tasks tab then we just reload appropriate -# partial with the new task, and update recent items. = replace_content(@task) jQuery('#recently').replaceWith('#{ j render(:partial => "shared/recently") }'); - else - if @task.assigned_to != @task_before_update.assigned_to = reassign(@task) - elsif @task.bucket != @task_before_update.bucket = reschedule(@task) - else = replace_content(@task, @task.bucket) - else # Errors jQuery('##{dom_id(@task)}').effect("shake", { duration:250, distance: 6 }); jQuery('#task_name').focus(); jQuery('#task_submit').enable();