<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>app/controllers/site_controller.rb</filename>
    </added>
    <added>
      <filename>app/controllers/user_sessions_controller.rb</filename>
    </added>
    <added>
      <filename>app/controllers/users_controller.rb</filename>
    </added>
    <added>
      <filename>app/helpers/site_helper.rb</filename>
    </added>
    <added>
      <filename>app/helpers/user_sessions_helper.rb</filename>
    </added>
    <added>
      <filename>app/helpers/users_helper.rb</filename>
    </added>
    <added>
      <filename>app/models/list.rb</filename>
    </added>
    <added>
      <filename>app/models/month_list.rb</filename>
    </added>
    <added>
      <filename>app/models/task.rb</filename>
    </added>
    <added>
      <filename>app/models/task_group.rb</filename>
    </added>
    <added>
      <filename>app/models/user.rb</filename>
    </added>
    <added>
      <filename>app/models/user_session.rb</filename>
    </added>
    <added>
      <filename>app/views/layouts/application.html.erb</filename>
    </added>
    <added>
      <filename>app/views/shared/_notice_div.html.erb</filename>
    </added>
    <added>
      <filename>app/views/shared/_sub_nav.html.erb</filename>
    </added>
    <added>
      <filename>app/views/site/index.html.erb</filename>
    </added>
    <added>
      <filename>app/views/user_sessions/new.html.erb</filename>
    </added>
    <added>
      <filename>app/views/users/_form.html.erb</filename>
    </added>
    <added>
      <filename>app/views/users/edit.html.erb</filename>
    </added>
    <added>
      <filename>app/views/users/new.html.erb</filename>
    </added>
    <added>
      <filename>db/migrate/20091025184609_create_users.rb</filename>
    </added>
    <added>
      <filename>db/migrate/20091025184735_create_tasks.rb</filename>
    </added>
    <added>
      <filename>db/migrate/20091025184740_create_task_groups.rb</filename>
    </added>
    <added>
      <filename>db/migrate/20091025184747_create_lists.rb</filename>
    </added>
    <added>
      <filename>db/migrate/20091025184754_create_month_lists.rb</filename>
    </added>
    <added>
      <filename>db/schema.rb</filename>
    </added>
    <added>
      <filename>public/images/active_tab_l.png</filename>
    </added>
    <added>
      <filename>public/images/active_tab_r.png</filename>
    </added>
    <added>
      <filename>public/images/bg_active_row.png</filename>
    </added>
    <added>
      <filename>public/images/bg_content_bottom.png</filename>
    </added>
    <added>
      <filename>public/images/bg_content_top.png</filename>
    </added>
    <added>
      <filename>public/images/bg_header.gif</filename>
    </added>
    <added>
      <filename>public/images/blank.gif</filename>
    </added>
    <added>
      <filename>public/images/btn_add_task.png</filename>
    </added>
    <added>
      <filename>public/images/btn_add_task_group.png</filename>
    </added>
    <added>
      <filename>public/images/btn_create_acct.png</filename>
    </added>
    <added>
      <filename>public/images/btn_create_task.png</filename>
    </added>
    <added>
      <filename>public/images/btn_create_task_group.png</filename>
    </added>
    <added>
      <filename>public/images/btn_get_started.png</filename>
    </added>
    <added>
      <filename>public/images/btn_login.png</filename>
    </added>
    <added>
      <filename>public/images/btn_mark_complete.png</filename>
    </added>
    <added>
      <filename>public/images/btn_send_feedback.png</filename>
    </added>
    <added>
      <filename>public/images/btn_update.png</filename>
    </added>
    <added>
      <filename>public/images/checked.png</filename>
    </added>
    <added>
      <filename>public/images/edit.png</filename>
    </added>
    <added>
      <filename>public/images/home_list.png</filename>
    </added>
    <added>
      <filename>public/images/inactive_tab_l.png</filename>
    </added>
    <added>
      <filename>public/images/inactive_tab_r.png</filename>
    </added>
    <added>
      <filename>public/images/link_cur_month.png</filename>
    </added>
    <added>
      <filename>public/images/link_delete.png</filename>
    </added>
    <added>
      <filename>public/images/link_edit.png</filename>
    </added>
    <added>
      <filename>public/images/link_manage_task_groups.png</filename>
    </added>
    <added>
      <filename>public/images/link_manage_tasks.png</filename>
    </added>
    <added>
      <filename>public/images/link_next_month.png</filename>
    </added>
    <added>
      <filename>public/images/link_prev_month.png</filename>
    </added>
    <added>
      <filename>public/images/logo.png</filename>
    </added>
    <added>
      <filename>public/images/member_nav_l.png</filename>
    </added>
    <added>
      <filename>public/images/member_nav_r.png</filename>
    </added>
    <added>
      <filename>public/images/merb.jpg</filename>
    </added>
    <added>
      <filename>public/javascripts/IE7.js</filename>
    </added>
    <added>
      <filename>public/javascripts/jquery.ahover.js</filename>
    </added>
    <added>
      <filename>public/javascripts/jquery.dimensions.min.js</filename>
    </added>
    <added>
      <filename>public/javascripts/jquery.form.js</filename>
    </added>
    <added>
      <filename>public/javascripts/jquery.js</filename>
    </added>
    <added>
      <filename>public/stylesheets/application.css</filename>
    </added>
    <added>
      <filename>public/stylesheets/application.less</filename>
    </added>
    <added>
      <filename>public/stylesheets/print.css</filename>
    </added>
    <added>
      <filename>public/stylesheets/screen.css</filename>
    </added>
    <added>
      <filename>test/fixtures/lists.yml</filename>
    </added>
    <added>
      <filename>test/fixtures/month_lists.yml</filename>
    </added>
    <added>
      <filename>test/fixtures/task_groups.yml</filename>
    </added>
    <added>
      <filename>test/fixtures/tasks.yml</filename>
    </added>
    <added>
      <filename>test/fixtures/users.yml</filename>
    </added>
    <added>
      <filename>test/functional/site_controller_test.rb</filename>
    </added>
    <added>
      <filename>test/functional/user_sessions_controller_test.rb</filename>
    </added>
    <added>
      <filename>test/functional/users_controller_test.rb</filename>
    </added>
    <added>
      <filename>test/unit/helpers/site_helper_test.rb</filename>
    </added>
    <added>
      <filename>test/unit/helpers/user_sessions_helper_test.rb</filename>
    </added>
    <added>
      <filename>test/unit/helpers/users_helper_test.rb</filename>
    </added>
    <added>
      <filename>test/unit/list_test.rb</filename>
    </added>
    <added>
      <filename>test/unit/month_list_test.rb</filename>
    </added>
    <added>
      <filename>test/unit/task_group_test.rb</filename>
    </added>
    <added>
      <filename>test/unit/task_test.rb</filename>
    </added>
    <added>
      <filename>test/unit/user_test.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,10 +1,47 @@
-# Filters added to this controller apply to all controllers in the application.
-# Likewise, all the methods added will be available for all controllers.
-
 class ApplicationController &lt; ActionController::Base
   helper :all # include all helpers, all the time
   protect_from_forgery # See ActionController::RequestForgeryProtection for details
 
   # Scrub sensitive parameters from your log
-  # filter_parameter_logging :password
+  filter_parameter_logging :password, :password_confirmation
+  
+  helper_method :current_user_session, :current_user
+  
+  private
+    def current_user_session
+      return @current_user_session if defined?(@current_user_session)
+      @current_user_session = UserSession.find
+    end
+
+    def current_user
+      return @current_user if defined?(@current_user)
+      @current_user = current_user_session &amp;&amp; current_user_session.user
+    end
+    
+    def require_user
+      unless current_user
+        store_location
+        flash[:notice] = &quot;You must be logged in to access this page&quot;
+        redirect_to new_user_session_url
+        return false
+      end
+    end
+
+    def require_no_user
+      if current_user
+        store_location
+        flash[:notice] = &quot;You must be logged out to access this page&quot;
+        redirect_to root_path
+        return false
+      end
+    end
+    
+    def store_location
+      session[:return_to] = request.request_uri
+    end
+    
+    def redirect_back_or_default(default)
+      redirect_to(session[:return_to] || default)
+      session[:return_to] = nil
+    end
 end</diff>
      <filename>app/controllers/application_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,31 +11,14 @@ Rails::Initializer.run do |config|
   # Application configuration should go into files in config/initializers
   # -- all .rb files in that directory are automatically loaded.
 
-  # Add additional load paths for your own custom dirs
-  # config.load_paths += %W( #{RAILS_ROOT}/extras )
-
   # Specify gems that this application depends on and have them installed with rake gems:install
-  # config.gem &quot;bj&quot;
-  # config.gem &quot;hpricot&quot;, :version =&gt; '0.6', :source =&gt; &quot;http://code.whytheluckystiff.net&quot;
-  # config.gem &quot;sqlite3-ruby&quot;, :lib =&gt; &quot;sqlite3&quot;
-  # config.gem &quot;aws-s3&quot;, :lib =&gt; &quot;aws/s3&quot;
-
-  # Only load the plugins named here, in the order given (default is alphabetical).
-  # :all can be used as a placeholder for all plugins not explicitly named
-  # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
+  config.gem 'mislav-will_paginate', :lib =&gt; 'will_paginate', :source =&gt; 'http://gems.github.com'
+  config.gem 'less', :source =&gt; 'http://gemcutter.org'
+  config.gem 'binarylogic-authlogic', :lib =&gt; 'authlogic', :source =&gt; 'http://gems.github.com'
 
-  # Skip frameworks you're not going to use. To use Rails without a database,
-  # you must remove the Active Record framework.
-  # config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
-
-  # Activate observers that should always be running
-  # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
+  # Skip frameworks you're not going to use.
+  config.frameworks -= [ :active_resource ]
 
   # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
-  # Run &quot;rake -D time&quot; for a list of tasks for finding time zone names.
   config.time_zone = 'UTC'
-
-  # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
-  # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
-  # config.i18n.default_locale = :de
 end
\ No newline at end of file</diff>
      <filename>config/environment.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,43 +1,12 @@
 ActionController::Routing::Routes.draw do |map|
-  # The priority is based upon order of creation: first created -&gt; highest priority.
-
-  # Sample of regular route:
-  #   map.connect 'products/:id', :controller =&gt; 'catalog', :action =&gt; 'view'
-  # Keep in mind you can assign values other than :controller and :action
-
-  # Sample of named route:
-  #   map.purchase 'products/:id/purchase', :controller =&gt; 'catalog', :action =&gt; 'purchase'
-  # This route can be invoked with purchase_url(:id =&gt; product.id)
-
-  # Sample resource route (maps HTTP verbs to controller actions automatically):
-  #   map.resources :products
-
-  # Sample resource route with options:
-  #   map.resources :products, :member =&gt; { :short =&gt; :get, :toggle =&gt; :post }, :collection =&gt; { :sold =&gt; :get }
-
-  # Sample resource route with sub-resources:
-  #   map.resources :products, :has_many =&gt; [ :comments, :sales ], :has_one =&gt; :seller
+  map.root :controller =&gt; 'site'
   
-  # Sample resource route with more complex sub-resources
-  #   map.resources :products do |products|
-  #     products.resources :comments
-  #     products.resources :sales, :collection =&gt; { :recent =&gt; :get }
-  #   end
-
-  # Sample resource route within a namespace:
-  #   map.namespace :admin do |admin|
-  #     # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
-  #     admin.resources :products
-  #   end
-
-  # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
-  # map.root :controller =&gt; &quot;welcome&quot;
-
-  # See how all your routes lay out with &quot;rake routes&quot;
+  map.login 'login', :controller =&gt; 'user_sessions', :action =&gt; 'new'  
+  map.logout 'logout', :controller =&gt; 'user_sessions', :action =&gt; 'destroy'  
+  map.resources :user_sessions
+  map.resources :users
 
   # Install the default routes as the lowest priority.
-  # Note: These default routes make all actions in every controller accessible via GET requests. You should
-  # consider removing or commenting them out if you're using named routes and resources.
   map.connect ':controller/:action/:id'
   map.connect ':controller/:action/:id.:format'
 end</diff>
      <filename>config/routes.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,2 +1,99 @@
-// Place your application-specific JavaScript functions and classes here
-// This file is automatically included by javascript_include_tag :defaults
+// Common JavaScript code across your application goes here.
+
+// function to send a jQuery object via AJAX
+jQuery.fn.submitFormWithAjax = function() {
+  this.submit(function() {
+    $.post(this.action + '.js', $(this).serialize(), null, &quot;script&quot;);
+    return false;
+  })
+  return this;
+};
+
+jQuery.fn.submitLinkWithAjax = function() {
+  this.click(function() {
+    $.get(this.href + '.js', null, null, &quot;script&quot;);
+  	return false;
+  })
+};
+
+
+$(document).ready(function() {
+  // make forms with the class &quot;remote&quot; submit via AJAX
+  $(&quot;form.remote&quot;).submitFormWithAjax();
+  
+	// make links with the class &quot;remote&quot; submit via AJAX (but only in Firefox)
+	if($.browser.mozilla){ $('a.remote').submitLinkWithAjax(); }
+	
+	// Confirm dialog for delete records
+	$('.task_delete').click(function() {
+		var answer = confirm('Are you sure you want to delete this task?');
+		return answer;
+	});
+	
+	// Confirm dialog for deleting task groups
+	$('.task_group_delete').click(function() {
+		var answer = confirm('Are you sure you want to delete this task group? All associated tasks will also be deleted.');
+		return answer;
+	});
+	
+	// Confirm dialog for marking a task as uncomplete
+	$('.uncomplete_confirm').click(function() {
+		var answer = confirm('Are you sure you want to mark this item as incomplete? Your amount/notes will be erased as well.');
+		return answer;
+	});
+	
+  // hover effect for navigation
+  $('#nav ul li').ahover({toggleEffect: 'width', toggleSpeed: 150});
+  
+  // hover effect for logolink
+  $('#header .logolink').ahover({toggleEffect: 'width', toggleSpeed: 150});
+  
+  // show add task form
+  $('a.add_task_link').click(function() {
+    $('#task_group_select').hide();
+    $('#task_group_form').show();
+    return false;
+  })
+  
+  // hide add task form
+  $('a.cancel_add_task').click(function() {
+    $('#task_group_select').show();
+    $('#task_group_form').hide();
+    return false;
+  })
+  
+  // submit add task form
+  $('a.task_group_submit').click(function() {
+    this.href = this.href + &quot;?title=&quot; + $('#task_group_title').attr(&quot;value&quot;);
+  })
+});
+
+// show and hide notes for a list item
+function toggle_list_notes(id, source) {
+  if (source == 'link') {
+    $('#complete_'+id).attr(&quot;checked&quot;, false);
+  }
+	$('#amount_field_'+id).attr(&quot;value&quot;, '');
+	$('#note_field_'+id).attr(&quot;value&quot;, '');
+	$('#notes_'+id).toggle();
+	return false;
+}
+
+// reset all checkboxes to not-checked
+function reset_checkboxes() {
+	var inputs = $(&quot;:checkbox&quot;);
+	for (var i = 0; i &lt; inputs.length; i++) {
+		inputs[i].checked = false;
+	}
+}
+
+function show_note_actions(id) {
+  // first, hide all instances of 'note_actions'
+  $('.action_img').hide();
+  // now, show the one we need to
+  $('#list_notes_' + id + ' .action_img').show();
+}
+
+function hide_note_actions(id) {
+  window.setTimeout(&quot;$('#list_notes_&quot; + id + &quot; .action_img').hide()&quot;, 500);
+}
\ No newline at end of file</diff>
      <filename>public/javascripts/application.js</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>public/index.html</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>f7c116333d0c8cb207cb100933ee3adb449670d1</id>
    </parent>
  </parents>
  <author>
    <name>Travis Roberts</name>
    <email>traviskroberts@gmail.com</email>
  </author>
  <url>http://github.com/travisr/listode-rails/commit/2fd0a71ca4656c4e1a3b35bc6438beba3eeb12de</url>
  <id>2fd0a71ca4656c4e1a3b35bc6438beba3eeb12de</id>
  <committed-date>2009-10-25T19:29:45-07:00</committed-date>
  <authored-date>2009-10-25T19:29:45-07:00</authored-date>
  <message>Beginning rails rewrite - adding styles and js, layout</message>
  <tree>e68af2f5aeaf12d91e04d8ac78d29ef87e05028c</tree>
  <committer>
    <name>Travis Roberts</name>
    <email>traviskroberts@gmail.com</email>
  </committer>
</commit>
