From 351822e8ef5364f59c1f521e062305591530173f Mon Sep 17 00:00:00 2001 From: Scott Davis Date: Thu, 4 Mar 2010 01:22:45 -0500 Subject: [PATCH] inital commit --- README | 243 ++++ Rakefile | 10 + app/controllers/application_controller.rb | 10 + app/controllers/projects_controller.rb | 85 ++ app/controllers/tasks_controller.rb | 100 ++ app/helpers/application_helper.rb | 10 + app/helpers/projects_helper.rb | 2 + app/helpers/tasks_helper.rb | 2 + app/models/project.rb | 4 + app/models/task.rb | 7 + app/views/layouts/application.html.erb | 19 + app/views/projects/edit.html.erb | 16 + app/views/projects/index.html.erb | 20 + app/views/projects/new.html.erb | 15 + app/views/projects/show.html.erb | 8 + app/views/tasks/edit.html.erb | 28 + app/views/tasks/index.html.erb | 26 + app/views/tasks/new.html.erb | 23 + app/views/tasks/show.html.erb | 23 + config/boot.rb | 110 ++ config/database.yml | 22 + config/environment.rb | 41 + config/environments/development.rb | 17 + config/environments/production.rb | 28 + config/environments/test.rb | 28 + config/initializers/backtrace_silencers.rb | 7 + config/initializers/inflections.rb | 10 + config/initializers/mime_types.rb | 5 + config/initializers/new_rails_defaults.rb | 21 + config/initializers/session_store.rb | 15 + config/locales/en.yml | 5 + config/routes.rb | 49 + db/development.sqlite3 | Bin 0 -> 12288 bytes db/migrate/20100304035633_create_projects.rb | 13 + db/migrate/20100304040201_create_tasks.rb | 16 + db/schema.rb | 29 + db/seeds.rb | 7 + doc/README_FOR_APP | 2 + log/development.log | 1268 +++++++++++++++++ log/production.log | 0 log/server.log | 0 log/test.log | 0 public/404.html | 30 + public/422.html | 30 + public/500.html | 30 + public/favicon.ico | 0 public/images/rails.png | Bin 0 -> 6646 bytes public/javascripts/application.js | 2 + public/javascripts/jrails.js | 1 + public/robots.txt | 5 + public/stylesheets/scaffold.css | 54 + public/stylesheets/style.css | 11 + script/about | 4 + script/console | 3 + script/dbconsole | 3 + script/destroy | 3 + script/generate | 3 + script/performance/benchmarker | 3 + script/performance/profiler | 3 + script/plugin | 3 + script/runner | 3 + script/server | 3 + test/fixtures/projects.yml | 7 + test/fixtures/tasks.yml | 13 + test/functional/projects_controller_test.rb | 45 + test/functional/tasks_controller_test.rb | 45 + test/performance/browsing_test.rb | 9 + test/test_helper.rb | 38 + test/unit/helpers/projects_helper_test.rb | 4 + test/unit/helpers/tasks_helper_test.rb | 4 + test/unit/project_test.rb | 8 + test/unit/task_test.rb | 8 + vendor/plugins/jrails/CHANGELOG | 35 + vendor/plugins/jrails/README | 21 + vendor/plugins/jrails/init.rb | 6 + vendor/plugins/jrails/install.rb | 9 + .../plugins/jrails/javascripts/jquery-ui.js | 160 +++ vendor/plugins/jrails/javascripts/jquery.js | 32 + vendor/plugins/jrails/javascripts/jrails.js | 128 ++ .../jrails/javascripts/sources/jrails.js | 194 +++ vendor/plugins/jrails/lib/jrails.rb | 406 ++++++ vendor/plugins/jrails/tasks/jrails.rake | 19 + 82 files changed, 3729 insertions(+) create mode 100644 README create mode 100644 Rakefile create mode 100644 app/controllers/application_controller.rb create mode 100644 app/controllers/projects_controller.rb create mode 100644 app/controllers/tasks_controller.rb create mode 100644 app/helpers/application_helper.rb create mode 100644 app/helpers/projects_helper.rb create mode 100644 app/helpers/tasks_helper.rb create mode 100644 app/models/project.rb create mode 100644 app/models/task.rb create mode 100644 app/views/layouts/application.html.erb create mode 100644 app/views/projects/edit.html.erb create mode 100644 app/views/projects/index.html.erb create mode 100644 app/views/projects/new.html.erb create mode 100644 app/views/projects/show.html.erb create mode 100644 app/views/tasks/edit.html.erb create mode 100644 app/views/tasks/index.html.erb create mode 100644 app/views/tasks/new.html.erb create mode 100644 app/views/tasks/show.html.erb create mode 100644 config/boot.rb create mode 100644 config/database.yml create mode 100644 config/environment.rb create mode 100644 config/environments/development.rb create mode 100644 config/environments/production.rb create mode 100644 config/environments/test.rb create mode 100644 config/initializers/backtrace_silencers.rb create mode 100644 config/initializers/inflections.rb create mode 100644 config/initializers/mime_types.rb create mode 100644 config/initializers/new_rails_defaults.rb create mode 100644 config/initializers/session_store.rb create mode 100644 config/locales/en.yml create mode 100644 config/routes.rb create mode 100644 db/development.sqlite3 create mode 100644 db/migrate/20100304035633_create_projects.rb create mode 100644 db/migrate/20100304040201_create_tasks.rb create mode 100644 db/schema.rb create mode 100644 db/seeds.rb create mode 100644 doc/README_FOR_APP create mode 100644 log/development.log create mode 100644 log/production.log create mode 100644 log/server.log create mode 100644 log/test.log create mode 100644 public/404.html create mode 100644 public/422.html create mode 100644 public/500.html create mode 100644 public/favicon.ico create mode 100644 public/images/rails.png create mode 100644 public/javascripts/application.js create mode 100644 public/javascripts/jrails.js create mode 100644 public/robots.txt create mode 100644 public/stylesheets/scaffold.css create mode 100644 public/stylesheets/style.css create mode 100755 script/about create mode 100755 script/console create mode 100755 script/dbconsole create mode 100755 script/destroy create mode 100755 script/generate create mode 100755 script/performance/benchmarker create mode 100755 script/performance/profiler create mode 100755 script/plugin create mode 100755 script/runner create mode 100755 script/server create mode 100644 test/fixtures/projects.yml create mode 100644 test/fixtures/tasks.yml create mode 100644 test/functional/projects_controller_test.rb create mode 100644 test/functional/tasks_controller_test.rb create mode 100644 test/performance/browsing_test.rb create mode 100644 test/test_helper.rb create mode 100644 test/unit/helpers/projects_helper_test.rb create mode 100644 test/unit/helpers/tasks_helper_test.rb create mode 100644 test/unit/project_test.rb create mode 100644 test/unit/task_test.rb create mode 100644 vendor/plugins/jrails/CHANGELOG create mode 100644 vendor/plugins/jrails/README create mode 100644 vendor/plugins/jrails/init.rb create mode 100644 vendor/plugins/jrails/install.rb create mode 100644 vendor/plugins/jrails/javascripts/jquery-ui.js create mode 100644 vendor/plugins/jrails/javascripts/jquery.js create mode 100644 vendor/plugins/jrails/javascripts/jrails.js create mode 100644 vendor/plugins/jrails/javascripts/sources/jrails.js create mode 100644 vendor/plugins/jrails/lib/jrails.rb create mode 100644 vendor/plugins/jrails/tasks/jrails.rake diff --git a/README b/README new file mode 100644 index 0000000..37ec8ea --- /dev/null +++ b/README @@ -0,0 +1,243 @@ +== Welcome to Rails + +Rails is a web-application framework that includes everything needed to create +database-backed web applications according to the Model-View-Control pattern. + +This pattern splits the view (also called the presentation) into "dumb" templates +that are primarily responsible for inserting pre-built data in between HTML tags. +The model contains the "smart" domain objects (such as Account, Product, Person, +Post) that holds all the business logic and knows how to persist themselves to +a database. The controller handles the incoming requests (such as Save New Account, +Update Product, Show Post) by manipulating the model and directing data to the view. + +In Rails, the model is handled by what's called an object-relational mapping +layer entitled Active Record. This layer allows you to present the data from +database rows as objects and embellish these data objects with business logic +methods. You can read more about Active Record in +link:files/vendor/rails/activerecord/README.html. + +The controller and view are handled by the Action Pack, which handles both +layers by its two parts: Action View and Action Controller. These two layers +are bundled in a single package due to their heavy interdependence. This is +unlike the relationship between the Active Record and Action Pack that is much +more separate. Each of these packages can be used independently outside of +Rails. You can read more about Action Pack in +link:files/vendor/rails/actionpack/README.html. + + +== Getting Started + +1. At the command prompt, start a new Rails application using the rails command + and your application name. Ex: rails myapp +2. Change directory into myapp and start the web server: script/server (run with --help for options) +3. Go to http://localhost:3000/ and get "Welcome aboard: You're riding the Rails!" +4. Follow the guidelines to start developing your application + + +== Web Servers + +By default, Rails will try to use Mongrel if it's are installed when started with script/server, otherwise Rails will use WEBrick, the webserver that ships with Ruby. But you can also use Rails +with a variety of other web servers. + +Mongrel is a Ruby-based webserver with a C component (which requires compilation) that is +suitable for development and deployment of Rails applications. If you have Ruby Gems installed, +getting up and running with mongrel is as easy as: gem install mongrel. +More info at: http://mongrel.rubyforge.org + +Say other Ruby web servers like Thin and Ebb or regular web servers like Apache or LiteSpeed or +Lighttpd or IIS. The Ruby web servers are run through Rack and the latter can either be setup to use +FCGI or proxy to a pack of Mongrels/Thin/Ebb servers. + +== Apache .htaccess example for FCGI/CGI + +# General Apache options +AddHandler fastcgi-script .fcgi +AddHandler cgi-script .cgi +Options +FollowSymLinks +ExecCGI + +# If you don't want Rails to look in certain directories, +# use the following rewrite rules so that Apache won't rewrite certain requests +# +# Example: +# RewriteCond %{REQUEST_URI} ^/notrails.* +# RewriteRule .* - [L] + +# Redirect all requests not available on the filesystem to Rails +# By default the cgi dispatcher is used which is very slow +# +# For better performance replace the dispatcher with the fastcgi one +# +# Example: +# RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] +RewriteEngine On + +# If your Rails application is accessed via an Alias directive, +# then you MUST also set the RewriteBase in this htaccess file. +# +# Example: +# Alias /myrailsapp /path/to/myrailsapp/public +# RewriteBase /myrailsapp + +RewriteRule ^$ index.html [QSA] +RewriteRule ^([^.]+)$ $1.html [QSA] +RewriteCond %{REQUEST_FILENAME} !-f +RewriteRule ^(.*)$ dispatch.cgi [QSA,L] + +# In case Rails experiences terminal errors +# Instead of displaying this message you can supply a file here which will be rendered instead +# +# Example: +# ErrorDocument 500 /500.html + +ErrorDocument 500 "

Application error

Rails application failed to start properly" + + +== Debugging Rails + +Sometimes your application goes wrong. Fortunately there are a lot of tools that +will help you debug it and get it back on the rails. + +First area to check is the application log files. Have "tail -f" commands running +on the server.log and development.log. Rails will automatically display debugging +and runtime information to these files. Debugging info will also be shown in the +browser on requests from 127.0.0.1. + +You can also log your own messages directly into the log file from your code using +the Ruby logger class from inside your controllers. Example: + + class WeblogController < ActionController::Base + def destroy + @weblog = Weblog.find(params[:id]) + @weblog.destroy + logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!") + end + end + +The result will be a message in your log file along the lines of: + + Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1 + +More information on how to use the logger is at http://www.ruby-doc.org/core/ + +Also, Ruby documentation can be found at http://www.ruby-lang.org/ including: + +* The Learning Ruby (Pickaxe) Book: http://www.ruby-doc.org/docs/ProgrammingRuby/ +* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide) + +These two online (and free) books will bring you up to speed on the Ruby language +and also on programming in general. + + +== Debugger + +Debugger support is available through the debugger command when you start your Mongrel or +Webrick server with --debugger. This means that you can break out of execution at any point +in the code, investigate and change the model, AND then resume execution! +You need to install ruby-debug to run the server in debugging mode. With gems, use 'gem install ruby-debug' +Example: + + class WeblogController < ActionController::Base + def index + @posts = Post.find(:all) + debugger + end + end + +So the controller will accept the action, run the first line, then present you +with a IRB prompt in the server window. Here you can do things like: + + >> @posts.inspect + => "[#nil, \"body\"=>nil, \"id\"=>\"1\"}>, + #\"Rails you know!\", \"body\"=>\"Only ten..\", \"id\"=>\"2\"}>]" + >> @posts.first.title = "hello from a debugger" + => "hello from a debugger" + +...and even better is that you can examine how your runtime objects actually work: + + >> f = @posts.first + => #nil, "body"=>nil, "id"=>"1"}> + >> f. + Display all 152 possibilities? (y or n) + +Finally, when you're ready to resume execution, you enter "cont" + + +== Console + +You can interact with the domain model by starting the console through script/console. +Here you'll have all parts of the application configured, just like it is when the +application is running. You can inspect domain models, change values, and save to the +database. Starting the script without arguments will launch it in the development environment. +Passing an argument will specify a different environment, like script/console production. + +To reload your controllers and models after launching the console run reload! + +== dbconsole + +You can go to the command line of your database directly through script/dbconsole. +You would be connected to the database with the credentials defined in database.yml. +Starting the script without arguments will connect you to the development database. Passing an +argument will connect you to a different database, like script/dbconsole production. +Currently works for mysql, postgresql and sqlite. + +== Description of Contents + +app + Holds all the code that's specific to this particular application. + +app/controllers + Holds controllers that should be named like weblogs_controller.rb for + automated URL mapping. All controllers should descend from ApplicationController + which itself descends from ActionController::Base. + +app/models + Holds models that should be named like post.rb. + Most models will descend from ActiveRecord::Base. + +app/views + Holds the template files for the view that should be named like + weblogs/index.html.erb for the WeblogsController#index action. All views use eRuby + syntax. + +app/views/layouts + Holds the template files for layouts to be used with views. This models the common + header/footer method of wrapping views. In your views, define a layout using the + layout :default and create a file named default.html.erb. Inside default.html.erb, + call <% yield %> to render the view using this layout. + +app/helpers + Holds view helpers that should be named like weblogs_helper.rb. These are generated + for you automatically when using script/generate for controllers. Helpers can be used to + wrap functionality for your views into methods. + +config + Configuration files for the Rails environment, the routing map, the database, and other dependencies. + +db + Contains the database schema in schema.rb. db/migrate contains all + the sequence of Migrations for your schema. + +doc + This directory is where your application documentation will be stored when generated + using rake doc:app + +lib + Application specific libraries. Basically, any kind of custom code that doesn't + belong under controllers, models, or helpers. This directory is in the load path. + +public + The directory available for the web server. Contains subdirectories for images, stylesheets, + and javascripts. Also contains the dispatchers and the default HTML files. This should be + set as the DOCUMENT_ROOT of your web server. + +script + Helper scripts for automation and generation. + +test + Unit and functional tests along with fixtures. When using the script/generate scripts, template + test files will be generated for you and placed in this directory. + +vendor + External libraries that the application depends on. Also includes the plugins subdirectory. + If the app has frozen rails, those gems also go here, under vendor/rails/. + This directory is in the load path. diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..3bb0e85 --- /dev/null +++ b/Rakefile @@ -0,0 +1,10 @@ +# Add your own tasks in files placed in lib/tasks ending in .rake, +# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. + +require(File.join(File.dirname(__FILE__), 'config', 'boot')) + +require 'rake' +require 'rake/testtask' +require 'rake/rdoctask' + +require 'tasks/rails' diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb new file mode 100644 index 0000000..8e93168 --- /dev/null +++ b/app/controllers/application_controller.rb @@ -0,0 +1,10 @@ +# 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 < 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 +end diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb new file mode 100644 index 0000000..766b4d1 --- /dev/null +++ b/app/controllers/projects_controller.rb @@ -0,0 +1,85 @@ +class ProjectsController < ApplicationController + # GET /projects + # GET /projects.xml + def index + @projects = Project.all + + respond_to do |format| + format.html # index.html.erb + format.xml { render :xml => @projects } + end + end + + # GET /projects/1 + # GET /projects/1.xml + def show + @project = Project.find(params[:id]) + + respond_to do |format| + format.html # show.html.erb + format.xml { render :xml => @project } + end + end + + # GET /projects/new + # GET /projects/new.xml + def new + @project = Project.new + + respond_to do |format| + format.html # new.html.erb + format.xml { render :xml => @project } + end + end + + # GET /projects/1/edit + def edit + @project = Project.find(params[:id]) + end + + # POST /projects + # POST /projects.xml + def create + @project = Project.new(params[:project]) + + respond_to do |format| + if @project.save + flash[:notice] = 'Project was successfully created.' + format.html { redirect_to(@project) } + format.xml { render :xml => @project, :status => :created, :location => @project } + else + format.html { render :action => "new" } + format.xml { render :xml => @project.errors, :status => :unprocessable_entity } + end + end + end + + # PUT /projects/1 + # PUT /projects/1.xml + def update + @project = Project.find(params[:id]) + + respond_to do |format| + if @project.update_attributes(params[:project]) + flash[:notice] = 'Project was successfully updated.' + format.html { redirect_to(@project) } + format.xml { head :ok } + else + format.html { render :action => "edit" } + format.xml { render :xml => @project.errors, :status => :unprocessable_entity } + end + end + end + + # DELETE /projects/1 + # DELETE /projects/1.xml + def destroy + @project = Project.find(params[:id]) + @project.destroy + + respond_to do |format| + format.html { redirect_to(projects_url) } + format.xml { head :ok } + end + end +end diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb new file mode 100644 index 0000000..e6df259 --- /dev/null +++ b/app/controllers/tasks_controller.rb @@ -0,0 +1,100 @@ +class TasksController < ApplicationController + + before_filter :load_project + + def load_project + @project = Project.find(params[:project_id]) + + rescue ActiveRecord::RecordNotFound + flash[:error] = "There was an error finding the parent project" + redirect_to projects_path + + end + + + # GET /tasks + # GET /tasks.xml + def index + @tasks = Task.all + + respond_to do |format| + format.html # index.html.erb + format.xml { render :xml => @tasks } + end + end + + # GET /tasks/1 + # GET /tasks/1.xml + def show + @task = Task.find(params[:id]) + + respond_to do |format| + format.html # show.html.erb + format.xml { render :xml => @task } + end + end + + # GET /tasks/new + # GET /tasks/new.xml + def new + @task = Task.new + + respond_to do |format| + format.html # new.html.erb + format.xml { render :xml => @task } + end + end + + # GET /tasks/1/edit + def edit + @task = Task.find(params[:id]) + end + + # POST /tasks + # POST /tasks.xml + def create + params[:task][:project] = @project.id + @task = Task.new(params[:task]) + + respond_to do |format| + if @task.save + flash[:success] = 'Task was successfully created.' + format.html { redirect_to project_task_path(@project, @task) } + format.xml { render :xml => @task, :status => :created, :location => @task } + else + format.html { render :action => "new" } + format.xml { render :xml => @task.errors, :status => :unprocessable_entity } + end + end + end + + # PUT /tasks/1 + # PUT /tasks/1.xml + def update + params[:task][:project] = @project + @task = Task.find(params[:id]) + + respond_to do |format| + if @task.update_attributes(params[:task]) + flash[:success] = 'Task was successfully updated.' + format.html { redirect_to project_task_path(@project, @task) } + format.xml { head :ok } + else + format.html { render :action => "edit" } + format.xml { render :xml => @task.errors, :status => :unprocessable_entity } + end + end + end + + # DELETE /tasks/1 + # DELETE /tasks/1.xml + def destroy + @task = Task.find(params[:id]) + @task.destroy + + respond_to do |format| + format.html { redirect_to(tasks_url) } + format.xml { head :ok } + end + end +end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb new file mode 100644 index 0000000..48f74d7 --- /dev/null +++ b/app/helpers/application_helper.rb @@ -0,0 +1,10 @@ +# Methods added to this helper will be available to all templates in the application. +module ApplicationHelper + + def csrf_meta_tag + out = '' + out << tag(:meta, :name => 'csrf-token', :content => form_authenticity_token) + out << tag(:meta, :name => 'csrf-param', :content => 'authenticity_token') + end + +end diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb new file mode 100644 index 0000000..db5c5ce --- /dev/null +++ b/app/helpers/projects_helper.rb @@ -0,0 +1,2 @@ +module ProjectsHelper +end diff --git a/app/helpers/tasks_helper.rb b/app/helpers/tasks_helper.rb new file mode 100644 index 0000000..ce894d0 --- /dev/null +++ b/app/helpers/tasks_helper.rb @@ -0,0 +1,2 @@ +module TasksHelper +end diff --git a/app/models/project.rb b/app/models/project.rb new file mode 100644 index 0000000..f8e90d2 --- /dev/null +++ b/app/models/project.rb @@ -0,0 +1,4 @@ +class Project < ActiveRecord::Base + has_many :tasks + validates_presence_of :name +end diff --git a/app/models/task.rb b/app/models/task.rb new file mode 100644 index 0000000..14b0b98 --- /dev/null +++ b/app/models/task.rb @@ -0,0 +1,7 @@ +class Task < ActiveRecord::Base + belongs_to :project + has_many :tasks, :foreign_key => :parent + + validates_presence_of :name, :description, :project_id + validates_associated :project +end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb new file mode 100644 index 0000000..a2e3ec8 --- /dev/null +++ b/app/views/layouts/application.html.erb @@ -0,0 +1,19 @@ + + + <%= csrf_meta_tag %> + <%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js", + "http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js", + :defaults %> + <%= stylesheet_link_tag 'scaffold', 'style' %> + + + + <% flash.each_key do |flash_key| %> +
+ <%= flash[flash_key] %> +
+ <% end %> + + <%= yield %> + + \ No newline at end of file diff --git a/app/views/projects/edit.html.erb b/app/views/projects/edit.html.erb new file mode 100644 index 0000000..0ad35af --- /dev/null +++ b/app/views/projects/edit.html.erb @@ -0,0 +1,16 @@ +

Editing project

+ +<% form_for(@project) do |f| %> + <%= f.error_messages %> + +

+ <%= f.label :name %>
+ <%= f.text_field :name %> +

+

+ <%= f.submit 'Update' %> +

+<% end %> + +<%= link_to 'Show', @project %> | +<%= link_to 'Back', projects_path %> \ No newline at end of file diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb new file mode 100644 index 0000000..cb43c94 --- /dev/null +++ b/app/views/projects/index.html.erb @@ -0,0 +1,20 @@ +

Listing projects

+ + + + + + +<% @projects.each do |project| %> + + + + + + +<% end %> +
Name
<%=h project.name %><%= link_to 'Show', project %><%= link_to 'Edit', edit_project_path(project) %><%= link_to 'Destroy', project, :confirm => 'Are you sure?', :method => :delete %>
+ +
+ +<%= link_to 'New project', new_project_path %> \ No newline at end of file diff --git a/app/views/projects/new.html.erb b/app/views/projects/new.html.erb new file mode 100644 index 0000000..14b77f8 --- /dev/null +++ b/app/views/projects/new.html.erb @@ -0,0 +1,15 @@ +

New project

+ +<% form_for(@project) do |f| %> + <%= f.error_messages %> + +

+ <%= f.label :name %>
+ <%= f.text_field :name %> +

+

+ <%= f.submit 'Create' %> +

+<% end %> + +<%= link_to 'Back', projects_path %> \ No newline at end of file diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb new file mode 100644 index 0000000..ab0b305 --- /dev/null +++ b/app/views/projects/show.html.erb @@ -0,0 +1,8 @@ +

+ Name: + <%=h @project.name %> +

+ + +<%= link_to 'Edit', edit_project_path(@project) %> | +<%= link_to 'Back', projects_path %> \ No newline at end of file diff --git a/app/views/tasks/edit.html.erb b/app/views/tasks/edit.html.erb new file mode 100644 index 0000000..f4181cf --- /dev/null +++ b/app/views/tasks/edit.html.erb @@ -0,0 +1,28 @@ +

Editing task

+ +<% form_for(@task, :url => project_task_path(@project, @task)) do |f| %> + <%= f.error_messages %> + +

+ <%= f.label :name %>
+ <%= f.text_field :name %> +

+

+ <%= f.label :project %>
+ <%= f.select :project, Project.all.map {|p| [p.name, p.id]} %> +

+

+ <%= f.label :description %>
+ <%= f.text_area :description %> +

+

+ <%= f.label :parent %>
+ <%= f.text_field :parent %> +

+

+ <%= f.submit 'Update' %> +

+<% end %> + +<%= link_to 'show', project_task_path(@project, @task) %> | +<%= link_to 'Back', project_tasks_path(@project) %> \ No newline at end of file diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb new file mode 100644 index 0000000..0791ce2 --- /dev/null +++ b/app/views/tasks/index.html.erb @@ -0,0 +1,26 @@ +

Listing tasks

+ + + + + + + + + +<% @tasks.each do |task| %> + + + + + + + + + +<% end %> +
NameProjectDescriptionParent
<%=h task.name %><%= link_to h(task.project.name), project_path(task.project) %><%=h task.description %><%=h task.parent %><%= link_to 'Show', project_task_path(@project, task) %><%= link_to 'Edit', edit_project_task_path(@project, task) %><%= link_to 'Destroy', project_task_path(@project, task), :confirm => 'Are you sure?', :method => :delete %>
+ +
+ +<%= link_to 'New task', new_project_task_path(@project) %> \ No newline at end of file diff --git a/app/views/tasks/new.html.erb b/app/views/tasks/new.html.erb new file mode 100644 index 0000000..4e5666c --- /dev/null +++ b/app/views/tasks/new.html.erb @@ -0,0 +1,23 @@ +

New task

+ +<% form_for(@task, :url => project_tasks_path(@project)) do |f| %> + <%= f.error_messages %> + +

+ <%= f.label :name %>
+ <%= f.text_field :name %> +

+

+ <%= f.label :description %>
+ <%= f.text_area :description %> +

+

+ <%= f.label :parent %>
+ <%= f.text_field :parent %> +

+

+ <%= f.submit 'Create' %> +

+<% end %> + +<%= link_to 'Back', project_tasks_path(@project) %> \ No newline at end of file diff --git a/app/views/tasks/show.html.erb b/app/views/tasks/show.html.erb new file mode 100644 index 0000000..c69b0ab --- /dev/null +++ b/app/views/tasks/show.html.erb @@ -0,0 +1,23 @@ +

+ Name: + <%=h @task.name %> +

+ +

+ Project: + <%=h @task.project.name %> +

+ +

+ Description: + <%=h @task.description %> +

+ +

+ Parent: + <%=h @task.parent %> +

+ + +<%= link_to 'Edit', edit_project_task_path(@project, @task) %> | +<%= link_to 'Back', project_tasks_path(@project) %> \ No newline at end of file diff --git a/config/boot.rb b/config/boot.rb new file mode 100644 index 0000000..dd5e3b6 --- /dev/null +++ b/config/boot.rb @@ -0,0 +1,110 @@ +# Don't change this file! +# Configure your app in config/environment.rb and config/environments/*.rb + +RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT) + +module Rails + class << self + def boot! + unless booted? + preinitialize + pick_boot.run + end + end + + def booted? + defined? Rails::Initializer + end + + def pick_boot + (vendor_rails? ? VendorBoot : GemBoot).new + end + + def vendor_rails? + File.exist?("#{RAILS_ROOT}/vendor/rails") + end + + def preinitialize + load(preinitializer_path) if File.exist?(preinitializer_path) + end + + def preinitializer_path + "#{RAILS_ROOT}/config/preinitializer.rb" + end + end + + class Boot + def run + load_initializer + Rails::Initializer.run(:set_load_path) + end + end + + class VendorBoot < Boot + def load_initializer + require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer" + Rails::Initializer.run(:install_gem_spec_stubs) + Rails::GemDependency.add_frozen_gem_path + end + end + + class GemBoot < Boot + def load_initializer + self.class.load_rubygems + load_rails_gem + require 'initializer' + end + + def load_rails_gem + if version = self.class.gem_version + gem 'rails', version + else + gem 'rails' + end + rescue Gem::LoadError => load_error + $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.) + exit 1 + end + + class << self + def rubygems_version + Gem::RubyGemsVersion rescue nil + end + + def gem_version + if defined? RAILS_GEM_VERSION + RAILS_GEM_VERSION + elsif ENV.include?('RAILS_GEM_VERSION') + ENV['RAILS_GEM_VERSION'] + else + parse_gem_version(read_environment_rb) + end + end + + def load_rubygems + min_version = '1.3.2' + require 'rubygems' + unless rubygems_version >= min_version + $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.) + exit 1 + end + + rescue LoadError + $stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org) + exit 1 + end + + def parse_gem_version(text) + $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/ + end + + private + def read_environment_rb + File.read("#{RAILS_ROOT}/config/environment.rb") + end + end + end +end + +# All that for this: +Rails.boot! diff --git a/config/database.yml b/config/database.yml new file mode 100644 index 0000000..025d62a --- /dev/null +++ b/config/database.yml @@ -0,0 +1,22 @@ +# SQLite version 3.x +# gem install sqlite3-ruby (not necessary on OS X Leopard) +development: + adapter: sqlite3 + database: db/development.sqlite3 + pool: 5 + timeout: 5000 + +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + adapter: sqlite3 + database: db/test.sqlite3 + pool: 5 + timeout: 5000 + +production: + adapter: sqlite3 + database: db/production.sqlite3 + pool: 5 + timeout: 5000 diff --git a/config/environment.rb b/config/environment.rb new file mode 100644 index 0000000..029a58b --- /dev/null +++ b/config/environment.rb @@ -0,0 +1,41 @@ +# Be sure to restart your server when you modify this file + +# Specifies gem version of Rails to use when vendor/rails is not present +RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION + +# Bootstrap the Rails environment, frameworks, and default configuration +require File.join(File.dirname(__FILE__), 'boot') + +Rails::Initializer.run do |config| + # Settings in config/environments/* take precedence over those specified here. + # 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 "bj" + # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net" + # config.gem "sqlite3-ruby", :lib => "sqlite3" + # config.gem "aws-s3", :lib => "aws/s3" + + # 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 ] + + # 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 + + # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. + # Run "rake -D time" 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 --git a/config/environments/development.rb b/config/environments/development.rb new file mode 100644 index 0000000..85c9a60 --- /dev/null +++ b/config/environments/development.rb @@ -0,0 +1,17 @@ +# Settings specified here will take precedence over those in config/environment.rb + +# In the development environment your application's code is reloaded on +# every request. This slows down response time but is perfect for development +# since you don't have to restart the webserver when you make code changes. +config.cache_classes = false + +# Log error messages when you accidentally call methods on nil. +config.whiny_nils = true + +# Show full error reports and disable caching +config.action_controller.consider_all_requests_local = true +config.action_view.debug_rjs = true +config.action_controller.perform_caching = false + +# Don't care if the mailer can't send +config.action_mailer.raise_delivery_errors = false \ No newline at end of file diff --git a/config/environments/production.rb b/config/environments/production.rb new file mode 100644 index 0000000..27119d2 --- /dev/null +++ b/config/environments/production.rb @@ -0,0 +1,28 @@ +# Settings specified here will take precedence over those in config/environment.rb + +# The production environment is meant for finished, "live" apps. +# Code is not reloaded between requests +config.cache_classes = true + +# Full error reports are disabled and caching is turned on +config.action_controller.consider_all_requests_local = false +config.action_controller.perform_caching = true +config.action_view.cache_template_loading = true + +# See everything in the log (default is :info) +# config.log_level = :debug + +# Use a different logger for distributed setups +# config.logger = SyslogLogger.new + +# Use a different cache store in production +# config.cache_store = :mem_cache_store + +# Enable serving of images, stylesheets, and javascripts from an asset server +# config.action_controller.asset_host = "http://assets.example.com" + +# Disable delivery errors, bad email addresses will be ignored +# config.action_mailer.raise_delivery_errors = false + +# Enable threaded mode +# config.threadsafe! \ No newline at end of file diff --git a/config/environments/test.rb b/config/environments/test.rb new file mode 100644 index 0000000..d6f80a4 --- /dev/null +++ b/config/environments/test.rb @@ -0,0 +1,28 @@ +# Settings specified here will take precedence over those in config/environment.rb + +# The test environment is used exclusively to run your application's +# test suite. You never need to work with it otherwise. Remember that +# your test database is "scratch space" for the test suite and is wiped +# and recreated between test runs. Don't rely on the data there! +config.cache_classes = true + +# Log error messages when you accidentally call methods on nil. +config.whiny_nils = true + +# Show full error reports and disable caching +config.action_controller.consider_all_requests_local = true +config.action_controller.perform_caching = false +config.action_view.cache_template_loading = true + +# Disable request forgery protection in test environment +config.action_controller.allow_forgery_protection = false + +# Tell Action Mailer not to deliver emails to the real world. +# The :test delivery method accumulates sent emails in the +# ActionMailer::Base.deliveries array. +config.action_mailer.delivery_method = :test + +# Use SQL instead of Active Record's schema dumper when creating the test database. +# This is necessary if your schema can't be completely dumped by the schema dumper, +# like if you have constraints or database-specific column types +# config.active_record.schema_format = :sql \ No newline at end of file diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb new file mode 100644 index 0000000..c2169ed --- /dev/null +++ b/config/initializers/backtrace_silencers.rb @@ -0,0 +1,7 @@ +# Be sure to restart your server when you modify this file. + +# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. +# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } + +# You can also remove all the silencers if you're trying do debug a problem that might steem from framework code. +# Rails.backtrace_cleaner.remove_silencers! \ No newline at end of file diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb new file mode 100644 index 0000000..d531b8b --- /dev/null +++ b/config/initializers/inflections.rb @@ -0,0 +1,10 @@ +# Be sure to restart your server when you modify this file. + +# Add new inflection rules using the following format +# (all these examples are active by default): +# ActiveSupport::Inflector.inflections do |inflect| +# inflect.plural /^(ox)$/i, '\1en' +# inflect.singular /^(ox)en/i, '\1' +# inflect.irregular 'person', 'people' +# inflect.uncountable %w( fish sheep ) +# end diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb new file mode 100644 index 0000000..72aca7e --- /dev/null +++ b/config/initializers/mime_types.rb @@ -0,0 +1,5 @@ +# Be sure to restart your server when you modify this file. + +# Add new mime types for use in respond_to blocks: +# Mime::Type.register "text/richtext", :rtf +# Mime::Type.register_alias "text/html", :iphone diff --git a/config/initializers/new_rails_defaults.rb b/config/initializers/new_rails_defaults.rb new file mode 100644 index 0000000..c94db0a --- /dev/null +++ b/config/initializers/new_rails_defaults.rb @@ -0,0 +1,21 @@ +# Be sure to restart your server when you modify this file. + +# These settings change the behavior of Rails 2 apps and will be defaults +# for Rails 3. You can remove this initializer when Rails 3 is released. + +if defined?(ActiveRecord) + # Include Active Record class name as root for JSON serialized output. + ActiveRecord::Base.include_root_in_json = true + + # Store the full class name (including module namespace) in STI type column. + ActiveRecord::Base.store_full_sti_class = true +end + +ActionController::Routing.generate_best_match = false + +# Use ISO 8601 format for JSON serialized times and dates. +ActiveSupport.use_standard_json_time_format = true + +# Don't escape HTML entities in JSON, leave that for the #json_escape helper. +# if you're including raw json in an HTML page. +ActiveSupport.escape_html_entities_in_json = false \ No newline at end of file diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb new file mode 100644 index 0000000..2f64745 --- /dev/null +++ b/config/initializers/session_store.rb @@ -0,0 +1,15 @@ +# Be sure to restart your server when you modify this file. + +# Your secret key for verifying cookie session data integrity. +# If you change this key, all old sessions will become invalid! +# Make sure the secret is at least 30 characters and all random, +# no regular words or you'll be exposed to dictionary attacks. +ActionController::Base.session = { + :key => '_collab_session', + :secret => 'bae3c8270cc7ea60f86949290218ac4912db86f6f915babc14216e4f3e206a28854e72aae7ae28c5d36e74d1554e4159bfb94ec2669d924ad7192b85da6956cc' +} + +# Use the database for sessions instead of the cookie-based default, +# which shouldn't be used to store highly confidential information +# (create the session table with "rake db:sessions:create") +# ActionController::Base.session_store = :active_record_store diff --git a/config/locales/en.yml b/config/locales/en.yml new file mode 100644 index 0000000..f265c06 --- /dev/null +++ b/config/locales/en.yml @@ -0,0 +1,5 @@ +# Sample localization file for English. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +en: + hello: "Hello world" \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb new file mode 100644 index 0000000..1b86422 --- /dev/null +++ b/config/routes.rb @@ -0,0 +1,49 @@ +ActionController::Routing::Routes.draw do |map| + # The priority is based upon order of creation: first created -> highest priority. + + # Sample of regular route: + # map.connect 'products/:id', :controller => 'catalog', :action => 'view' + # Keep in mind you can assign values other than :controller and :action + + # Sample of named route: + # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase' + # This route can be invoked with purchase_url(:id => product.id) + + # Sample resource route (maps HTTP verbs to controller actions automatically): + # map.resources :products + + # Sample resource route with options: + # map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get } + + # Sample resource route with sub-resources: + # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller + + # Sample resource route with more complex sub-resources + # map.resources :products do |products| + # products.resources :comments + # products.resources :sales, :collection => { :recent => :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 => "welcome" + + # See how all your routes lay out with "rake routes" + + map.resources :projects do |projects| + projects.resources :tasks + end + + + # 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' + map.root :controller => :projects, :action =>:index +end diff --git a/db/development.sqlite3 b/db/development.sqlite3 new file mode 100644 index 0000000000000000000000000000000000000000..8323589369ede9ee50bfc9464422565efa99d899 GIT binary patch literal 12288 zcmeI2(QDH{9LMjHwzrAGR7Rc(M?h)VM$@LP8W5}+q}a7vZJC8ZiS2ERu4$WG$6l+? zf`688zKidB(g*(nFX`%%c5^7c6n?)Xm%DH7ciiuDf#VnQYPafeMh^yF-{#anD+pus zgi?gis<@(-5Dgp=qV*M{>?et$DENcI?Kj7a z+x|O0EK<)JR=H`>X8CE=qH3tAG^08_l~!s^>xI>zJB`YAxzVOCtu`&Un)OOeIBi?C zCau-Q)v8uEsp{H&rqUDJ>mJ!&CSNRSLL7R7x2(%M!Dx=l*&*|U+GBp#bB5d*xGLrB zlm|U+kGVYBtLrhFvtGv*YERU-(`TaNco;O|vbK{*DH|KO9R}x*j>V49@!4q1+%B7I zCSw85Jqk-6PhwJALQSvjf!rf*_v<(W+H;Tb5Yv=hkZh_zHKG)@xK<7$gY!gn53jnA!*v zB`YR!d%6(U&OnM|{Nv!UckB0?rv-bnM7|;NLlj^@00;m9AOHk_z|s>~lO!##=XBlB z3*r#fH5^flV#zRWh$toU6_M|v00RO*00;m9AOHlGoWLDf!|~l;ib>)2kAwUllP^e| zU_bx}00AHX1c1PD63F5tS~m>Nd>-umTe`8O7pPt^b=}kpmq^p^|7VE&BxlPRGRztX z00AHX1b_e#xPri{Br7=lJ4L>Uv-nMUansf4fb)6L>s{%-`* EF9k0^DF6Tf literal 0 HcmV?d00001 diff --git a/db/migrate/20100304035633_create_projects.rb b/db/migrate/20100304035633_create_projects.rb new file mode 100644 index 0000000..76915ac --- /dev/null +++ b/db/migrate/20100304035633_create_projects.rb @@ -0,0 +1,13 @@ +class CreateProjects < ActiveRecord::Migration + def self.up + create_table :projects do |t| + t.string :name + + t.timestamps + end + end + + def self.down + drop_table :projects + end +end diff --git a/db/migrate/20100304040201_create_tasks.rb b/db/migrate/20100304040201_create_tasks.rb new file mode 100644 index 0000000..26314ed --- /dev/null +++ b/db/migrate/20100304040201_create_tasks.rb @@ -0,0 +1,16 @@ +class CreateTasks < ActiveRecord::Migration + def self.up + create_table :tasks do |t| + t.string :name + t.belongs_to :project + t.text :description + t.integer :parent + + t.timestamps + end + end + + def self.down + drop_table :tasks + end +end diff --git a/db/schema.rb b/db/schema.rb new file mode 100644 index 0000000..d143fc1 --- /dev/null +++ b/db/schema.rb @@ -0,0 +1,29 @@ +# This file is auto-generated from the current state of the database. Instead of editing this file, +# please use the migrations feature of Active Record to incrementally modify your database, and +# then regenerate this schema definition. +# +# Note that this schema.rb definition is the authoritative source for your database schema. If you need +# to create the application database on another system, you should be using db:schema:load, not running +# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations +# you'll amass, the slower it'll run and the greater likelihood for issues). +# +# It's strongly recommended to check this file into your version control system. + +ActiveRecord::Schema.define(:version => 20100304040201) do + + create_table "projects", :force => true do |t| + t.string "name" + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "tasks", :force => true do |t| + t.string "name" + t.integer "project_id" + t.text "description" + t.integer "parent" + t.datetime "created_at" + t.datetime "updated_at" + end + +end diff --git a/db/seeds.rb b/db/seeds.rb new file mode 100644 index 0000000..3174d0c --- /dev/null +++ b/db/seeds.rb @@ -0,0 +1,7 @@ +# This file should contain all the record creation needed to seed the database with its default values. +# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). +# +# Examples: +# +# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }]) +# Major.create(:name => 'Daley', :city => cities.first) diff --git a/doc/README_FOR_APP b/doc/README_FOR_APP new file mode 100644 index 0000000..fe41f5c --- /dev/null +++ b/doc/README_FOR_APP @@ -0,0 +1,2 @@ +Use this README file to introduce your application and point to useful places in the API for learning more. +Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries. diff --git a/log/development.log b/log/development.log new file mode 100644 index 0000000..949d55b --- /dev/null +++ b/log/development.log @@ -0,0 +1,1268 @@ + SQL (0.3ms)  SELECT name + FROM sqlite_master + WHERE type = 'table' AND NOT name = 'sqlite_sequence' + + SQL (0.2ms) select sqlite_version(*) + SQL (2.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  + SQL (35.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") + SQL (0.3ms)  SELECT name + FROM sqlite_master + WHERE type = 'table' AND NOT name = 'sqlite_sequence' + + SQL (0.1ms) SELECT version FROM schema_migrations +Migrating to CreateProjects (20100304035633) + SQL (0.6ms) CREATE TABLE "projects" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  + SQL (0.2ms) INSERT INTO schema_migrations (version) VALUES ('20100304035633') + SQL (0.3ms)  SELECT name + FROM sqlite_master + WHERE type = 'table' AND NOT name = 'sqlite_sequence' + + SQL (0.1ms) SELECT version FROM schema_migrations + SQL (0.2ms)  SELECT name + FROM sqlite_master + WHERE type = 'table' AND NOT name = 'sqlite_sequence' + + SQL (0.1ms) PRAGMA index_list("projects") + + +Processing ProjectsController#index (for 127.0.0.1 at 2010-03-03 22:59:59) [GET] + Project Load (0.5ms) SELECT * FROM "projects"  +Rendering template within layouts/projects +Rendering projects/index +Completed in 37ms (View: 32, DB: 0) | 200 OK [http://0.0.0.0/projects] + + +Processing ProjectsController#new (for 127.0.0.1 at 2010-03-03 23:00:01) [GET] +Rendering template within layouts/projects +Rendering projects/new +Completed in 16ms (View: 10, DB: 0) | 200 OK [http://0.0.0.0/projects/new] + + +Processing ProjectsController#create (for 127.0.0.1 at 2010-03-03 23:00:03) [POST] + Parameters: {"commit"=>"Create", "authenticity_token"=>"4WmwQ8mR0ytoM1bkwyKkewkM6Xj4W1soBL2jypo2XGY=", "project"=>{"name"=>"test"}} + Project Create (0.6ms) INSERT INTO "projects" ("name", "created_at", "updated_at") VALUES('test', '2010-03-04 04:00:04', '2010-03-04 04:00:04') +Redirected to http://0.0.0.0:3000/projects/1 +Completed in 64ms (DB: 1) | 302 Found [http://0.0.0.0/projects] + + +Processing ProjectsController#show (for 127.0.0.1 at 2010-03-03 23:00:04) [GET] + Parameters: {"id"=>"1"} + Project Load (0.3ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  +Rendering template within layouts/projects +Rendering projects/show +Completed in 14ms (View: 8, DB: 0) | 200 OK [http://0.0.0.0/projects/1] + + +Processing ProjectsController#edit (for 127.0.0.1 at 2010-03-03 23:00:06) [GET] + Parameters: {"id"=>"1"} + Project Load (0.2ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  +Rendering template within layouts/projects +Rendering projects/edit +Completed in 16ms (View: 11, DB: 0) | 200 OK [http://0.0.0.0/projects/1/edit] + + +Processing ProjectsController#index (for 127.0.0.1 at 2010-03-03 23:00:08) [GET] + Project Load (0.5ms) SELECT * FROM "projects"  +Rendering template within layouts/projects +Rendering projects/index +Completed in 11ms (View: 6, DB: 0) | 200 OK [http://0.0.0.0/projects] + SQL (0.5ms)  SELECT name + FROM sqlite_master + WHERE type = 'table' AND NOT name = 'sqlite_sequence' + + SQL (0.2ms) SELECT version FROM schema_migrations +Migrating to CreateProjects (20100304035633) +Migrating to CreateTasks (20100304040201) + SQL (0.1ms) select sqlite_version(*) + SQL (0.6ms) CREATE TABLE "tasks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "project_id" integer, "description" text, "parent" integer, "created_at" datetime, "updated_at" datetime)  + SQL (0.2ms) INSERT INTO schema_migrations (version) VALUES ('20100304040201') + SQL (0.3ms)  SELECT name + FROM sqlite_master + WHERE type = 'table' AND NOT name = 'sqlite_sequence' + + SQL (0.2ms) SELECT version FROM schema_migrations + SQL (0.2ms)  SELECT name + FROM sqlite_master + WHERE type = 'table' AND NOT name = 'sqlite_sequence' + + SQL (0.1ms) PRAGMA index_list("projects") + SQL (0.0ms) PRAGMA index_list("tasks") + + +Processing ProjectsController#index (for 127.0.0.1 at 2010-03-03 23:02:10) [GET] + Project Load (0.5ms) SELECT * FROM "projects"  +Rendering template within layouts/projects +Rendering projects/index +Completed in 12ms (View: 7, DB: 1) | 200 OK [http://0.0.0.0/projects] + + +Processing ProjectsController#show (for 127.0.0.1 at 2010-03-03 23:02:14) [GET] + Parameters: {"id"=>"1"} + Project Load (0.2ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  +Rendering template within layouts/projects +Rendering projects/show +Completed in 8ms (View: 3, DB: 0) | 200 OK [http://0.0.0.0/projects/1] + + +Processing TasksController#index (for 127.0.0.1 at 2010-03-03 23:02:18) [GET] + Parameters: {"project_id"=>"1"} + Task Load (0.4ms) SELECT * FROM "tasks"  +Rendering template within layouts/tasks +Rendering tasks/index +Completed in 34ms (View: 11, DB: 0) | 200 OK [http://0.0.0.0/projects/1/tasks] + + +Processing TasksController#new (for 127.0.0.1 at 2010-03-03 23:02:22) [GET] +Rendering template within layouts/tasks +Rendering tasks/new +Completed in 18ms (View: 12, DB: 0) | 200 OK [http://0.0.0.0/tasks/new] + + +Processing TasksController#index (for 127.0.0.1 at 2010-03-03 23:03:38) [GET] + Parameters: {"project_id"=>"1"} + Task Load (0.4ms) SELECT * FROM "tasks"  +Rendering template within layouts/application +Rendering tasks/index +Completed in 12ms (View: 6, DB: 0) | 200 OK [http://0.0.0.0/projects/1/tasks] + + +Processing TasksController#index (for 127.0.0.1 at 2010-03-03 23:06:59) [GET] + Task Load (0.4ms) SELECT * FROM "tasks"  +Rendering template within layouts/application +Rendering tasks/index +Completed in 86ms (View: 81, DB: 0) | 200 OK [http://0.0.0.0/tasks] + + +Processing ApplicationController#index (for 127.0.0.1 at 2010-03-03 23:06:59) [GET] + +ActionController::RoutingError (No route matches "/javascripts/jquery-ui.js" with {:method=>:get}): + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendering rescues/layout (not_found) + + +Processing ApplicationController#index (for 127.0.0.1 at 2010-03-03 23:06:59) [GET] + +ActionController::RoutingError (No route matches "/javascripts/jquery.js" with {:method=>:get}): + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendering rescues/layout (not_found) + + +Processing TasksController#index (for 127.0.0.1 at 2010-03-03 23:09:02) [GET] + Task Load (0.4ms) SELECT * FROM "tasks"  +Rendering template within layouts/application +Rendering tasks/index + +ActionView::TemplateError (undefined local variable or method `csrf_meta_tag' for #) on line #3 of app/views/layouts/application.html.erb: +1: +2: +3: <%= csrf_meta_tag %> +4: <%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js", +5: "http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js", :defaults %> +6: <%= stylesheet_link_tag 'scaffold' %> + + app/views/layouts/application.html.erb:3 + app/controllers/tasks_controller.rb:7:in `index' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendered rescues/_trace (137.3ms) +Rendered rescues/_request_and_response (1.4ms) +Rendering rescues/layout (internal_server_error) +/!\ FAILSAFE /!\ Wed Mar 03 23:10:54 -0500 2010 + Status: 500 Internal Server Error + /Users/sdavis/collab/app/helpers/application_helper.rb:5: syntax error, unexpected tSYMBEG, expecting kDO or '{' or '(' + out << tag :meta, :name => 'csrf-token', :... + ^ +/Users/sdavis/collab/app/helpers/application_helper.rb:5: syntax error, unexpected ',', expecting kEND +... :meta, :name => 'csrf-token', :content => form_authenticity... + ^ +/Users/sdavis/collab/app/helpers/application_helper.rb:6: syntax error, unexpected tSYMBEG, expecting kDO or '{' or '(' + out << tag :meta, :name => 'csrf-param', :... + ^ +/Users/sdavis/collab/app/helpers/application_helper.rb:6: syntax error, unexpected ',', expecting kEND +... :meta, :name => 'csrf-param', :content => authenticity_toke... + ^ + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in `load_without_new_constant_marking' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in `load_file' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379:in `load_file' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in `require_or_load' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:224:in `depend_on' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:136:in `require_dependency' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-2.3.5/lib/action_controller/helpers.rb:197:in `default_helper_module!' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-2.3.5/lib/action_controller/helpers.rb:212:in `__send__' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-2.3.5/lib/action_controller/helpers.rb:212:in `inherited' + /Users/sdavis/collab/app/controllers/application_controller.rb:4 + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in `load_without_new_constant_marking' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in `load_file' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379:in `load_file' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in `require_or_load' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in `load_missing_constant' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in `const_missing' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:89:in `dispatch' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:121:in `_call' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:130 + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:29:in `call' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:29:in `call' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:9:in `cache' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:28:in `call' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-2.3.5/lib/action_controller/string_coercion.rb:25:in `call' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/rack-1.0.1/lib/rack/head.rb:9:in `call' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in `call' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-2.3.5/lib/action_controller/params_parser.rb:15:in `call' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-2.3.5/lib/action_controller/session/cookie_store.rb:93:in `call' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-2.3.5/lib/action_controller/failsafe.rb:26:in `call' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/rack-1.0.1/lib/rack/lock.rb:11:in `synchronize' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:114:in `call' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-2.3.5/lib/action_controller/reloader.rb:34:in `run' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:108:in `call' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/rails-2.3.5/lib/rails/rack/static.rb:31:in `call' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/rack-1.0.1/lib/rack/urlmap.rb:46:in `call' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `each' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `call' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/rails-2.3.5/lib/rails/rack/log_tailer.rb:17:in `call' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/rack-1.0.1/lib/rack/content_length.rb:13:in `call' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/rack-1.0.1/lib/rack/handler/webrick.rb:50:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/rack-1.0.1/lib/rack/handler/webrick.rb:14:in `run' + /Users/sdavis/.rvm/gems/ruby-1.8.7-p249/gems/rails-2.3.5/lib/commands/server.rb:111 + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' + script/server:3 + + +Processing TasksController#index (for 127.0.0.1 at 2010-03-03 23:11:24) [GET] + Task Load (0.4ms) SELECT * FROM "tasks"  +Rendering template within layouts/application +Rendering tasks/index + +ActionView::TemplateError (undefined local variable or method `out' for #) on line #3 of app/views/layouts/application.html.erb: +1: +2: +3: <%= csrf_meta_tag %> +4: <%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js", +5: "http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js", :defaults %> +6: <%= stylesheet_link_tag 'scaffold' %> + + app/helpers/application_helper.rb:5:in `csrf_meta_tag' + app/views/layouts/application.html.erb:3 + app/controllers/tasks_controller.rb:7:in `index' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendered rescues/_trace (61.1ms) +Rendered rescues/_request_and_response (0.3ms) +Rendering rescues/layout (internal_server_error) + + +Processing TasksController#index (for 127.0.0.1 at 2010-03-03 23:11:36) [GET] + Task Load (0.4ms) SELECT * FROM "tasks"  +Rendering template within layouts/application +Rendering tasks/index + +ActionView::TemplateError (undefined local variable or method `authenticity_token' for #) on line #3 of app/views/layouts/application.html.erb: +1: +2: +3: <%= csrf_meta_tag %> +4: <%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js", +5: "http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js", :defaults %> +6: <%= stylesheet_link_tag 'scaffold' %> + + app/helpers/application_helper.rb:7:in `csrf_meta_tag' + app/views/layouts/application.html.erb:3 + app/controllers/tasks_controller.rb:7:in `index' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendered rescues/_trace (63.4ms) +Rendered rescues/_request_and_response (0.3ms) +Rendering rescues/layout (internal_server_error) + + +Processing TasksController#index (for 127.0.0.1 at 2010-03-03 23:11:47) [GET] + Task Load (0.4ms) SELECT * FROM "tasks"  +Rendering template within layouts/application +Rendering tasks/index +Completed in 9ms (View: 4, DB: 0) | 200 OK [http://0.0.0.0/tasks] + + +Processing ApplicationController#index (for 127.0.0.1 at 2010-03-03 23:11:47) [GET] + +ActionController::RoutingError (No route matches "/javascripts/jquery.js" with {:method=>:get}): + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendering rescues/layout (not_found) + + +Processing ApplicationController#index (for 127.0.0.1 at 2010-03-03 23:11:47) [GET] + +ActionController::RoutingError (No route matches "/javascripts/jquery-ui.js" with {:method=>:get}): + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendering rescues/layout (not_found) + + +Processing TasksController#index (for 127.0.0.1 at 2010-03-03 23:15:33) [GET] + Task Load (0.4ms) SELECT * FROM "tasks"  +Rendering template within layouts/application +Rendering tasks/index +Completed in 10ms (View: 4, DB: 0) | 200 OK [http://0.0.0.0/tasks] + + +Processing ApplicationController#index (for 127.0.0.1 at 2010-03-03 23:15:33) [GET] + +ActionController::RoutingError (No route matches "/javascripts/jquery.js" with {:method=>:get}): + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendering rescues/layout (not_found) + + +Processing ApplicationController#index (for 127.0.0.1 at 2010-03-03 23:15:33) [GET] + +ActionController::RoutingError (No route matches "/javascripts/jquery-ui.js" with {:method=>:get}): + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendering rescues/layout (not_found) + + +Processing TasksController#index (for 127.0.0.1 at 2010-03-03 23:16:25) [GET] + Task Load (0.6ms) SELECT * FROM "tasks"  +Rendering template within layouts/application +Rendering tasks/index +Completed in 12ms (View: 6, DB: 1) | 200 OK [http://0.0.0.0/tasks] + + +Processing ApplicationController#index (for 127.0.0.1 at 2010-03-03 23:16:26) [GET] + +ActionController::RoutingError (No route matches "/javascripts/jquery.js" with {:method=>:get}): + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendering rescues/layout (not_found) + + +Processing ApplicationController#index (for 127.0.0.1 at 2010-03-03 23:16:26) [GET] + +ActionController::RoutingError (No route matches "/javascripts/jquery-ui.js" with {:method=>:get}): + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendering rescues/layout (not_found) + + +Processing ApplicationController#index (for 127.0.0.1 at 2010-03-03 23:16:27) [GET] + +ActionController::RoutingError (No route matches "/javascripts/jquery.js" with {:method=>:get}): + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendering rescues/layout (not_found) + + +Processing ApplicationController#index (for 127.0.0.1 at 2010-03-03 23:16:28) [GET] + +ActionController::RoutingError (No route matches "/javascripts/jquery-ui.js" with {:method=>:get}): + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendering rescues/layout (not_found) + + +Processing TasksController#index (for 127.0.0.1 at 2010-03-03 23:16:34) [GET] + Task Load (0.4ms) SELECT * FROM "tasks"  +Rendering template within layouts/application +Rendering tasks/index +Completed in 10ms (View: 5, DB: 0) | 200 OK [http://0.0.0.0/tasks] + + +Processing ApplicationController#index (for 127.0.0.1 at 2010-03-03 23:16:34) [GET] + +ActionController::RoutingError (No route matches "/javascripts/jquery.js" with {:method=>:get}): + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendering rescues/layout (not_found) + + +Processing ApplicationController#index (for 127.0.0.1 at 2010-03-03 23:16:34) [GET] + +ActionController::RoutingError (No route matches "/javascripts/jquery-ui.js" with {:method=>:get}): + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendering rescues/layout (not_found) + + +Processing ApplicationController#index (for 127.0.0.1 at 2010-03-03 23:16:34) [GET] + +ActionController::RoutingError (No route matches "/javascripts/jquery.js" with {:method=>:get}): + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendering rescues/layout (not_found) + + +Processing ApplicationController#index (for 127.0.0.1 at 2010-03-03 23:16:34) [GET] + +ActionController::RoutingError (No route matches "/javascripts/jquery-ui.js" with {:method=>:get}): + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendering rescues/layout (not_found) + + +Processing TasksController#index (for 127.0.0.1 at 2010-03-03 23:17:10) [GET] + Task Load (0.6ms) SELECT * FROM "tasks"  +Rendering template within layouts/application +Rendering tasks/index +Completed in 48ms (View: 27, DB: 1) | 200 OK [http://0.0.0.0/tasks] + + +Processing TasksController#index (for 127.0.0.1 at 2010-03-03 23:17:29) [GET] + Parameters: {"project_id"=>"1"} + Task Load (0.6ms) SELECT * FROM "tasks"  +Rendering template within layouts/application +Rendering tasks/index +Completed in 13ms (View: 7, DB: 1) | 200 OK [http://0.0.0.0/projects/1/tasks] + + +Processing ProjectsController#index (for 127.0.0.1 at 2010-03-03 23:18:20) [GET] + Project Load (0.6ms) SELECT * FROM "projects"  +Rendering template within layouts/application +Rendering projects/index +Completed in 65ms (View: 59, DB: 1) | 200 OK [http://0.0.0.0/] + + +Processing ProjectsController#index (for 127.0.0.1 at 2010-03-03 23:19:06) [GET] + Project Load (0.5ms) SELECT * FROM "projects"  +Rendering template within layouts/application +Rendering projects/index +Completed in 18ms (View: 12, DB: 1) | 200 OK [http://0.0.0.0/] + + +Processing ProjectsController#index (for 127.0.0.1 at 2010-03-03 23:19:16) [GET] + Project Load (0.9ms) SELECT * FROM "projects"  +Rendering template within layouts/application +Rendering projects/index +Completed in 15ms (View: 9, DB: 1) | 200 OK [http://0.0.0.0/] + + +Processing ProjectsController#index (for 127.0.0.1 at 2010-03-03 23:19:58) [GET] + Project Load (0.6ms) SELECT * FROM "projects"  +Rendering template within layouts/application +Rendering projects/index +Completed in 85ms (View: 79, DB: 1) | 200 OK [http://0.0.0.0/] + + +Processing ProjectsController#show (for 127.0.0.1 at 2010-03-03 23:20:01) [GET] + Parameters: {"id"=>"1"} + Project Load (0.3ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  +Rendering template within layouts/application +Rendering projects/show +Completed in 17ms (View: 8, DB: 0) | 200 OK [http://0.0.0.0/projects/1] + + +Processing ProjectsController#edit (for 127.0.0.1 at 2010-03-03 23:20:02) [GET] + Parameters: {"id"=>"1"} + Project Load (0.2ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  +Rendering template within layouts/application +Rendering projects/edit +Completed in 31ms (View: 25, DB: 0) | 200 OK [http://0.0.0.0/projects/1/edit] + + +Processing ProjectsController#index (for 127.0.0.1 at 2010-03-03 23:20:06) [GET] + Project Load (0.5ms) SELECT * FROM "projects"  +Rendering template within layouts/application +Rendering projects/index +Completed in 14ms (View: 9, DB: 1) | 200 OK [http://0.0.0.0/projects] + + +Processing ProjectsController#show (for 127.0.0.1 at 2010-03-03 23:20:09) [GET] + Parameters: {"id"=>"1"} + Project Load (1.0ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  +Rendering template within layouts/application +Rendering projects/show +Completed in 12ms (View: 4, DB: 1) | 200 OK [http://0.0.0.0/projects/1] + + +Processing ApplicationController#index (for 127.0.0.1 at 2010-03-03 23:20:12) [GET] + +ActionController::RoutingError (No route matches "/project/1" with {:method=>:get}): + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendering rescues/layout (not_found) + + +Processing ProjectsController#show (for 127.0.0.1 at 2010-03-03 23:20:21) [GET] + Parameters: {"id"=>"1"} + Project Load (0.3ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  +Rendering template within layouts/application +Rendering projects/show +Completed in 14ms (View: 5, DB: 0) | 200 OK [http://0.0.0.0/projects/1] + + +Processing ProjectsController#index (for 127.0.0.1 at 2010-03-03 23:20:33) [GET] + Project Load (0.8ms) SELECT * FROM "projects"  +Rendering template within layouts/application +Rendering projects/index +Completed in 13ms (View: 8, DB: 1) | 200 OK [http://0.0.0.0/projects] + + +Processing ProjectsController#show (for 127.0.0.1 at 2010-03-03 23:20:39) [GET] + Parameters: {"id"=>"1"} + Project Load (0.2ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  +Rendering template within layouts/application +Rendering projects/show +Completed in 13ms (View: 7, DB: 0) | 200 OK [http://0.0.0.0/projects/1] + + +Processing ApplicationController#show (for 127.0.0.1 at 2010-03-03 23:20:42) [GET] + Parameters: {"id"=>"1"} + +NameError (uninitialized constant ProjectController): + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendered rescues/_trace (39.9ms) +Rendered rescues/_request_and_response (1.3ms) +Rendering rescues/layout (internal_server_error) + + +Processing ProjectsController#show (for 127.0.0.1 at 2010-03-03 23:21:36) [GET] + Parameters: {"id"=>"1"} + Project Load (0.2ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  +Rendering template within layouts/application +Rendering projects/show +Completed in 12ms (View: 5, DB: 0) | 200 OK [http://0.0.0.0/projects/1] + + +Processing ProjectsController#edit (for 127.0.0.1 at 2010-03-03 23:21:38) [GET] + Parameters: {"id"=>"1"} + Project Load (0.2ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  +Rendering template within layouts/application +Rendering projects/edit +Completed in 13ms (View: 7, DB: 0) | 200 OK [http://0.0.0.0/projects/1/edit] + + +Processing ProjectsController#edit (for 127.0.0.1 at 2010-03-03 23:25:04) [GET] + Parameters: {"id"=>"1"} + Project Load (0.2ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  +Rendering template within layouts/application +Rendering projects/edit +Completed in 19ms (View: 14, DB: 0) | 200 OK [http://0.0.0.0/projects/1/edit] + + +Processing ProjectsController#edit (for 127.0.0.1 at 2010-03-03 23:25:11) [GET] + Parameters: {"id"=>"10"} + Project Load (0.2ms) SELECT * FROM "projects" WHERE ("projects"."id" = 10)  + +ActiveRecord::RecordNotFound (Couldn't find Project with ID=10): + app/controllers/projects_controller.rb:37:in `edit' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendered rescues/_trace (50.2ms) +Rendered rescues/_request_and_response (0.3ms) +Rendering rescues/layout (not_found) + + +Processing TasksController#index (for 127.0.0.1 at 2010-03-03 23:25:19) [GET] + Parameters: {"project_id"=>"10"} + Project Load (0.1ms) SELECT * FROM "projects" WHERE ("projects"."id" = 10)  +Redirected to http://0.0.0.0:3000/projects +Filter chain halted as [:load_project] rendered_or_redirected. +Completed in 5ms (DB: 0) | 302 Found [http://0.0.0.0/projects/10/tasks] + + +Processing ProjectsController#index (for 127.0.0.1 at 2010-03-03 23:25:19) [GET] + Project Load (0.5ms) SELECT * FROM "projects"  +Rendering template within layouts/application +Rendering projects/index +Completed in 13ms (View: 8, DB: 1) | 200 OK [http://0.0.0.0/projects] + + +Processing ApplicationController#index (for 127.0.0.1 at 2010-03-03 23:26:12) [GET] + +ActionController::RoutingError (No route matches "/projects/10/taks" with {:method=>:get}): + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendering rescues/layout (not_found) + + +Processing TasksController#index (for 127.0.0.1 at 2010-03-03 23:26:15) [GET] + Parameters: {"project_id"=>"10"} + Project Load (0.1ms) SELECT * FROM "projects" WHERE ("projects"."id" = 10)  +Redirected to http://0.0.0.0:3000/projects +Filter chain halted as [:load_project] rendered_or_redirected. +Completed in 5ms (DB: 0) | 302 Found [http://0.0.0.0/projects/10/tasks] + + +Processing ProjectsController#index (for 127.0.0.1 at 2010-03-03 23:26:15) [GET] + Project Load (0.5ms) SELECT * FROM "projects"  +Rendering template within layouts/application +Rendering projects/index +Completed in 17ms (View: 12, DB: 1) | 200 OK [http://0.0.0.0/projects] + + +Processing ApplicationController#index (for 127.0.0.1 at 2010-03-03 23:28:24) [GET] + +ActionController::RoutingError (No route matches "/tasks/new" with {:method=>:get}): + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendering rescues/layout (not_found) + + +Processing ApplicationController#index (for 127.0.0.1 at 2010-03-03 23:28:31) [GET] + +ActionController::RoutingError (No route matches "/project/1/tasks/new" with {:method=>:get}): + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendering rescues/layout (not_found) + + +Processing TasksController#new (for 127.0.0.1 at 2010-03-03 23:28:38) [GET] + Parameters: {"project_id"=>"1"} + Project Load (0.3ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  +Rendering template within layouts/application +Rendering tasks/new + +ActionView::TemplateError (undefined method `tasks_path' for #) on line #3 of app/views/tasks/new.html.erb: +1:

New task

+2: +3: <% form_for(@task) do |f| %> +4: <%= f.error_messages %> +5: +6:

+ + app/views/tasks/new.html.erb:3 + app/controllers/tasks_controller.rb:42:in `new' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendered rescues/_trace (169.4ms) +Rendered rescues/_request_and_response (0.3ms) +Rendering rescues/layout (internal_server_error) + + +Processing TasksController#new (for 127.0.0.1 at 2010-03-03 23:30:03) [GET] + Parameters: {"project_id"=>"1"} + Project Load (0.3ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  +Rendering template within layouts/application +Rendering tasks/new + +ActionView::TemplateError (undefined method `tasks_path' for #) on line #3 of app/views/tasks/new.html.erb: +1:

New task

+2: +3: <% form_for(@task) do |f| %> +4: <%= f.error_messages %> +5: +6:

+ + app/views/tasks/new.html.erb:3 + app/controllers/tasks_controller.rb:42:in `new' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendered rescues/_trace (145.3ms) +Rendered rescues/_request_and_response (0.3ms) +Rendering rescues/layout (internal_server_error) + + +Processing TasksController#new (for 127.0.0.1 at 2010-03-03 23:30:05) [GET] + Parameters: {"project_id"=>"1"} + Project Load (0.3ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  +Rendering template within layouts/application +Rendering tasks/new + +ActionView::TemplateError (undefined method `tasks_path' for #) on line #3 of app/views/tasks/new.html.erb: +1:

New task

+2: +3: <% form_for(@task) do |f| %> +4: <%= f.error_messages %> +5: +6:

+ + app/views/tasks/new.html.erb:3 + app/controllers/tasks_controller.rb:42:in `new' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendered rescues/_trace (76.4ms) +Rendered rescues/_request_and_response (0.4ms) +Rendering rescues/layout (internal_server_error) + + +Processing TasksController#new (for 127.0.0.1 at 2010-03-03 23:30:32) [GET] + Parameters: {"project_id"=>"1"} + Project Load (0.3ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  +Rendering template within layouts/application +Rendering tasks/new + +ActionView::TemplateError (undefined method `tasks_path' for #) on line #3 of app/views/tasks/new.html.erb: +1:

New task

+2: +3: <% form_for(@task, :action => project_tasks_path(@project)) do |f| %> +4: <%= f.error_messages %> +5: +6:

+ + app/views/tasks/new.html.erb:3 + app/controllers/tasks_controller.rb:42:in `new' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendered rescues/_trace (69.8ms) +Rendered rescues/_request_and_response (0.3ms) +Rendering rescues/layout (internal_server_error) + + +Processing TasksController#new (for 127.0.0.1 at 2010-03-03 23:30:39) [GET] + Parameters: {"project_id"=>"1"} + Project Load (0.2ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  +Rendering template within layouts/application +Rendering tasks/new +Completed in 28ms (View: 13, DB: 0) | 200 OK [http://0.0.0.0/projects/1/tasks/new] + + +Processing TasksController#create (for 127.0.0.1 at 2010-03-03 23:30:54) [POST] + Parameters: {"commit"=>"Create", "project_id"=>"1", "authenticity_token"=>"4WmwQ8mR0ytoM1bkwyKkewkM6Xj4W1soBL2jypo2XGY=", "task"=>{"name"=>"test", "parent"=>"", "description"=>"foo"}} + Project Load (0.3ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  + Task Create (0.5ms) INSERT INTO "tasks" ("name", "parent", "created_at", "project_id", "updated_at", "description") VALUES('test', NULL, '2010-03-04 04:30:54', 1, '2010-03-04 04:30:54', 'foo') + +NoMethodError (undefined method `task_url' for #): + app/controllers/tasks_controller.rb:62 + app/controllers/tasks_controller.rb:59:in `create' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendered rescues/_trace (56.8ms) +Rendered rescues/_request_and_response (0.4ms) +Rendering rescues/layout (internal_server_error) + + +Processing TasksController#create (for 127.0.0.1 at 2010-03-03 23:31:36) [POST] + Parameters: {"commit"=>"Create", "project_id"=>"1", "authenticity_token"=>"4WmwQ8mR0ytoM1bkwyKkewkM6Xj4W1soBL2jypo2XGY=", "task"=>{"name"=>"test", "parent"=>"", "description"=>"foo"}} + Project Load (0.2ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  + Task Create (0.5ms) INSERT INTO "tasks" ("name", "parent", "created_at", "project_id", "updated_at", "description") VALUES('test', NULL, '2010-03-04 04:31:36', 1, '2010-03-04 04:31:36', 'foo') + +NoMethodError (undefined method `project_task' for #): + app/controllers/tasks_controller.rb:62 + app/controllers/tasks_controller.rb:59:in `create' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendered rescues/_trace (124.5ms) +Rendered rescues/_request_and_response (0.4ms) +Rendering rescues/layout (internal_server_error) + + +Processing TasksController#create (for 127.0.0.1 at 2010-03-03 23:31:58) [POST] + Parameters: {"commit"=>"Create", "project_id"=>"1", "authenticity_token"=>"4WmwQ8mR0ytoM1bkwyKkewkM6Xj4W1soBL2jypo2XGY=", "task"=>{"name"=>"test", "parent"=>"", "description"=>"foo"}} + Project Load (0.2ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  + Task Create (0.4ms) INSERT INTO "tasks" ("name", "parent", "created_at", "project_id", "updated_at", "description") VALUES('test', NULL, '2010-03-04 04:31:58', 1, '2010-03-04 04:31:58', 'foo') +Redirected to http://0.0.0.0:3000/projects/1/tasks/3 +Completed in 17ms (DB: 1) | 302 Found [http://0.0.0.0/projects/1/tasks] + + +Processing TasksController#show (for 127.0.0.1 at 2010-03-03 23:31:58) [GET] + Parameters: {"project_id"=>"1", "id"=>"3"} + Project Load (0.2ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  + Task Load (0.3ms) SELECT * FROM "tasks" WHERE ("tasks"."id" = 3)  +Rendering template within layouts/application +Rendering tasks/show + CACHE (0.0ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  +Completed in 35ms (View: 25, DB: 1) | 200 OK [http://0.0.0.0/projects/1/tasks/3] + + +Processing TasksController#index (for 127.0.0.1 at 2010-03-03 23:32:03) [GET] + Parameters: {"project_id"=>"1"} + Project Load (0.2ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  + Task Load (0.5ms) SELECT * FROM "tasks"  +Rendering template within layouts/application +Rendering tasks/index + CACHE (0.0ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  + +ActionView::TemplateError (undefined method `task_path' for #) on line #17 of app/views/tasks/index.html.erb: +14: <%=h task.project %> +15: <%=h task.description %> +16: <%=h task.parent %> +17: <%= link_to 'Show', task %> +18: <%= link_to 'Edit', edit_task_path(task) %> +19: <%= link_to 'Destroy', task, :confirm => 'Are you sure?', :method => :delete %> +20: + + app/views/tasks/index.html.erb:17 + app/views/tasks/index.html.erb:11:in `each' + app/views/tasks/index.html.erb:11 + app/controllers/tasks_controller.rb:20:in `index' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendered rescues/_trace (171.4ms) +Rendered rescues/_request_and_response (0.3ms) +Rendering rescues/layout (internal_server_error) + + +Processing TasksController#index (for 127.0.0.1 at 2010-03-03 23:33:18) [GET] + Parameters: {"project_id"=>"1"} + Project Load (0.2ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  + Task Load (0.6ms) SELECT * FROM "tasks"  +Rendering template within layouts/application +Rendering tasks/index + CACHE (0.0ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  + +ActionView::TemplateError (undefined method `task_path' for #) on line #19 of app/views/tasks/index.html.erb: +16: <%=h task.parent %> +17: <%= link_to 'Show', project_task_path(@project, task) %> +18: <%= link_to 'Edit', edit_project_task_path(@project, task) %> +19: <%= link_to 'Destroy', task, :confirm => 'Are you sure?', :method => :delete %> +20: +21: <% end %> +22: + + app/views/tasks/index.html.erb:19 + app/views/tasks/index.html.erb:11:in `each' + app/views/tasks/index.html.erb:11 + app/controllers/tasks_controller.rb:20:in `index' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendered rescues/_trace (167.4ms) +Rendered rescues/_request_and_response (0.4ms) +Rendering rescues/layout (internal_server_error) + + +Processing TasksController#index (for 127.0.0.1 at 2010-03-03 23:33:29) [GET] + Parameters: {"project_id"=>"1"} + Project Load (0.3ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  + Task Load (0.5ms) SELECT * FROM "tasks"  +Rendering template within layouts/application +Rendering tasks/index + CACHE (0.0ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  + CACHE (0.0ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  + CACHE (0.0ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  +Completed in 33ms (View: 23, DB: 1) | 200 OK [http://0.0.0.0/projects/1/tasks] + + +Processing TasksController#index (for 127.0.0.1 at 2010-03-03 23:33:35) [GET] + Parameters: {"project_id"=>"1"} + Project Load (0.2ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  + Task Load (0.5ms) SELECT * FROM "tasks"  +Rendering template within layouts/application +Rendering tasks/index + CACHE (0.0ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  + CACHE (0.0ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  + CACHE (0.0ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  +Completed in 36ms (View: 22, DB: 1) | 200 OK [http://0.0.0.0/projects/1/tasks] + + +Processing TasksController#index (for 127.0.0.1 at 2010-03-03 23:34:02) [GET] + Parameters: {"project_id"=>"1"} + Project Load (0.3ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  + Task Load (0.5ms) SELECT * FROM "tasks"  +Rendering template within layouts/application +Rendering tasks/index + CACHE (0.0ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  + CACHE (0.0ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  + CACHE (0.0ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  +Completed in 33ms (View: 23, DB: 1) | 200 OK [http://0.0.0.0/projects/1/tasks] + + +Processing ProjectsController#show (for 127.0.0.1 at 2010-03-03 23:34:07) [GET] + Parameters: {"id"=>"1"} + Project Load (0.2ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  +Rendering template within layouts/application +Rendering projects/show +Completed in 47ms (View: 41, DB: 0) | 200 OK [http://0.0.0.0/projects/1] + + +Processing TasksController#edit (for 127.0.0.1 at 2010-03-03 23:37:51) [GET] + Parameters: {"project_id"=>"1", "id"=>"3"} + Project Load (0.4ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  + Task Load (0.3ms) SELECT * FROM "tasks" WHERE ("tasks"."id" = 3)  +Rendering template within layouts/application +Rendering tasks/edit + +ActionView::TemplateError (undefined method `task_path' for #) on line #3 of app/views/tasks/edit.html.erb: +1:

Editing task

+2: +3: <% form_for(@task) do |f| %> +4: <%= f.error_messages %> +5: +6:

+ + app/views/tasks/edit.html.erb:3 + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendered rescues/_trace (61.1ms) +Rendered rescues/_request_and_response (0.4ms) +Rendering rescues/layout (internal_server_error) + + +Processing TasksController#edit (for 127.0.0.1 at 2010-03-03 23:38:09) [GET] + Parameters: {"project_id"=>"1", "id"=>"3"} + Project Load (0.2ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  + Task Load (0.4ms) SELECT * FROM "tasks" WHERE ("tasks"."id" = 3)  +Rendering template within layouts/application +Rendering tasks/edit + Project Load (0.4ms) SELECT * FROM "projects"  + CACHE (0.0ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  +Completed in 30ms (View: 18, DB: 1) | 200 OK [http://0.0.0.0/projects/1/tasks/3/edit] + + +Processing TasksController#update (for 127.0.0.1 at 2010-03-03 23:38:13) [PUT] + Parameters: {"commit"=>"Update", "project_id"=>"1", "authenticity_token"=>"4WmwQ8mR0ytoM1bkwyKkewkM6Xj4W1soBL2jypo2XGY=", "id"=>"3", "task"=>{"name"=>"test", "parent"=>"1", "project"=>"1", "description"=>"foo"}} + Project Load (0.3ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  + Task Load (0.3ms) SELECT * FROM "tasks" WHERE ("tasks"."id" = 3)  + +ActiveRecord::AssociationTypeMismatch (Project(#2175605500) expected, got String(#2148389880)): + app/controllers/tasks_controller.rb:78 + app/controllers/tasks_controller.rb:77:in `update' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendered rescues/_trace (54.5ms) +Rendered rescues/_request_and_response (0.5ms) +Rendering rescues/layout (internal_server_error) + + +Processing TasksController#update (for 127.0.0.1 at 2010-03-03 23:39:08) [PUT] + Parameters: {"commit"=>"Update", "project_id"=>"1", "authenticity_token"=>"4WmwQ8mR0ytoM1bkwyKkewkM6Xj4W1soBL2jypo2XGY=", "id"=>"3", "task"=>{"name"=>"test", "parent"=>"1", "project"=>"1", "description"=>"foo"}} + Project Load (0.2ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  + Task Load (0.4ms) SELECT * FROM "tasks" WHERE ("tasks"."id" = 3)  + +ActiveRecord::AssociationTypeMismatch (Project(#2174360920) expected, got Fixnum(#2148379240)): + app/controllers/tasks_controller.rb:78 + app/controllers/tasks_controller.rb:77:in `update' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start' + /Users/sdavis/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendered rescues/_trace (66.4ms) +Rendered rescues/_request_and_response (0.4ms) +Rendering rescues/layout (internal_server_error) + + +Processing TasksController#update (for 127.0.0.1 at 2010-03-03 23:39:25) [PUT] + Parameters: {"commit"=>"Update", "project_id"=>"1", "authenticity_token"=>"4WmwQ8mR0ytoM1bkwyKkewkM6Xj4W1soBL2jypo2XGY=", "id"=>"3", "task"=>{"name"=>"test", "parent"=>"1", "project"=>"1", "description"=>"foo"}} + Project Load (0.3ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  + Task Load (0.3ms) SELECT * FROM "tasks" WHERE ("tasks"."id" = 3)  + Task Update (0.4ms) UPDATE "tasks" SET "updated_at" = '2010-03-04 04:39:25', "parent" = 1 WHERE "id" = 3 +Redirected to http://0.0.0.0:3000/projects/1/tasks/3 +Completed in 21ms (DB: 1) | 302 Found [http://0.0.0.0/projects/1/tasks/3] + + +Processing TasksController#show (for 127.0.0.1 at 2010-03-03 23:39:25) [GET] + Parameters: {"project_id"=>"1", "id"=>"3"} + Project Load (0.2ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  + Task Load (0.3ms) SELECT * FROM "tasks" WHERE ("tasks"."id" = 3)  +Rendering template within layouts/application +Rendering tasks/show + CACHE (0.0ms) SELECT * FROM "projects" WHERE ("projects"."id" = 1)  +Completed in 18ms (View: 7, DB: 1) | 200 OK [http://0.0.0.0/projects/1/tasks/3] + Task Load (0.6ms) SELECT * FROM "tasks" LIMIT 1 + Task Load (0.4ms) SELECT * FROM "tasks" WHERE ("tasks".parent = 1)  + SQL (0.5ms)  SELECT name + FROM sqlite_master + WHERE type = 'table' AND NOT name = 'sqlite_sequence' + + Task Load (0.2ms) SELECT * FROM "tasks" WHERE ("tasks".parent = 3)  diff --git a/log/production.log b/log/production.log new file mode 100644 index 0000000..e69de29 diff --git a/log/server.log b/log/server.log new file mode 100644 index 0000000..e69de29 diff --git a/log/test.log b/log/test.log new file mode 100644 index 0000000..e69de29 diff --git a/public/404.html b/public/404.html new file mode 100644 index 0000000..eff660b --- /dev/null +++ b/public/404.html @@ -0,0 +1,30 @@ + + + + + + + The page you were looking for doesn't exist (404) + + + + + +

+

The page you were looking for doesn't exist.

+

You may have mistyped the address or the page may have moved.

+
+ + \ No newline at end of file diff --git a/public/422.html b/public/422.html new file mode 100644 index 0000000..b54e4a3 --- /dev/null +++ b/public/422.html @@ -0,0 +1,30 @@ + + + + + + + The change you wanted was rejected (422) + + + + + +
+

The change you wanted was rejected.

+

Maybe you tried to change something you didn't have access to.

+
+ + \ No newline at end of file diff --git a/public/500.html b/public/500.html new file mode 100644 index 0000000..ec3bbf0 --- /dev/null +++ b/public/500.html @@ -0,0 +1,30 @@ + + + + + + + We're sorry, but something went wrong (500) + + + + + +
+

We're sorry, but something went wrong.

+

We've been notified about this issue and we'll take a look at it shortly.

+
+ + diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..e69de29 diff --git a/public/images/rails.png b/public/images/rails.png new file mode 100644 index 0000000000000000000000000000000000000000..d5edc04e65f555e3ba4dcdaad39dc352e75b575e GIT binary patch literal 6646 zcmVpVcQya!6@Dsmj@#jv7C*qh zIhOJ6_K0n?*d`*T7TDuW-}m`9Kz3~>+7`DUkbAraU%yi+R{N~~XA2B%zt-4=tLimUer9!2M~N{G5bftFij_O&)a zsHnOppFIzebQ`RA0$!yUM-lg#*o@_O2wf422iLnM6cU(ktYU8#;*G!QGhIy9+ZfzKjLuZo%@a z-i@9A`X%J{^;2q&ZHY3C(B%gqCPW!8{9C0PMcNZccefK){s|V5-xxtHQc@uf>XqhD z7#N^siWqetgq29aX>G^olMf=bbRF6@Y(}zYxw6o!9WBdG1unP}<(V;zKlcR2p86fq zYjaqB^;Ycq>Wy@5T1xOzG3tucG3e%nPvajaN{CrFbnzv^9&K3$NrDm*eQe4`BGQ2bI;dFEwyt>hK%X!L6)82aOZp zsrGcJ#7PoX7)s|~t6is?FfX*7vWdREi58tiY4S)t6u*|kv?J)d_$r+CH#eZ?Ef+I_ z(eVlX8dh~4QP?o*E`_MgaNFIKj*rtN(0Raj3ECjSXcWfd#27NYs&~?t`QZFT}!Zaf=ldZIhi}LhQlqLo+o5(Pvui&{7PD__^53f9j>HW`Q z_V8X5j~$|GP9qXu0C#!@RX2}lXD35@3N5{BkUi%jtaPQ*H6OX2zIz4QPuqmTv3`vG{zc>l3t0B9E75h< z8&twGh%dp7WPNI+tRl%#gf2}Epg8st+~O4GjtwJsXfN;EjAmyr6z5dnaFU(;IV~QK zW62fogF~zA``(Q>_SmD!izc6Y4zq*97|NAPHp1j5X7Op2%;GLYm>^HEMyObo6s7l) zE3n|aOHi5~B84!}b^b*-aL2E)>OEJX_tJ~t<#VJ?bT?lDwyDB&5SZ$_1aUhmAY}#* zs@V1I+c5md9%R-o#_DUfqVtRk>59{+Opd5Yu%dAU#VQW}^m}x-30ftBx#527{^pI4 z6l2C6C7QBG$~NLYb3rVdLD#Z{+SleOp`(Lg5J}`kxdTHe(nV5BdpLrD=l|)e$gEqA zwI6vuX-PFCtcDIH>bGY2dwq&^tf+&R?)nY-@7_j%4CMRAF}C9w%p86W<2!aSY$p+k zrkFtG=cGo38RnrG28;?PNk%7a@faaXq&MS*&?1Z`7Ojw7(#>}ZG4nMAs3VXxfdW>i zY4VX02c5;f7jDPY_7@Oa)CHH}cH<3y#}_!nng^W+h1e-RL*YFYOteC@h?BtJZ+?sE zy)P5^8Mregx{nQaw1NY-|3>{Z)|0`?zc?G2-acYiSU`tj#sSGfm7k86ZQ0SQgPevcklHxM9<~4yW zR796sisf1|!#{Z=e^)0;_8iUhL8g(;j$l=02FTPZ(dZV@s#aQ`DHkLM6=YsbE4iQ!b#*374l0Jw5;jD%J;vQayq=nD8-kHI~f9Ux|32SJUM`> zGp2UGK*4t?cRKi!2he`zI#j0f${I#f-jeT?u_C7S4WsA0)ryi-1L0(@%pa^&g5x=e z=KW9+Nn(=)1T&S8g_ug%dgk*~l2O-$r9#zEGBdQsweO%t*6F4c8JC36JtTizCyy+E4h%G(+ z5>y$%0txMuQ$e~wjFgN(xrAndHQo`Za+K*?gUVDTBV&Ap^}|{w#CIq{DRe}+l@(Ec zCCV6f_?dY_{+f{}6XGn!pL_up?}@>KijT^$w#Lb6iHW&^8RP~g6y=vZBXx~B9nI^i zGexaPjcd(%)zGw!DG_dDwh-7x6+ST#R^${iz_M$uM!da8SxgB_;Z0G%Y*HpvLjKw; zX=ir7i1O$-T|*TBoH$dlW+TLf5j5sep^DlDtkox;Kg{Q%EXWedJq@J@%VAcK)j3y1 zShM!CS#qax;D@RND%2t3W6kv+#Ky0F9<3YKDbV^XJ=^$s(Vtza8V72YY)577nnldI zHMA0PUo!F3j(ubV*CM@PiK<^|RM2(DuCbG7`W}Rg(xdYC>C~ z;1KJGLN&$cRxSZunjXcntykmpFJ7;dk>shY(DdK&3K_JDJ6R%D`e~6Qv67@Rwu+q9 z*|NG{r}4F8f{Dfzt0+cZMd$fvlX3Q`dzM46@r?ISxr;9gBTG2rmfiGOD*#c*3f)cc zF+PFZobY$-^}J8 z%n=h4;x2}cP!@SiVd!v;^Wwo0(N??-ygDr7gG^NKxDjSo{5T{?$|Qo5;8V!~D6O;F*I zuY!gd@+2j_8Rn=UWDa#*4E2auWoGYDddMW7t0=yuC(xLWky?vLimM~!$3fgu!dR>p z?L?!8z>6v$|MsLb&dU?ob)Zd!B)!a*Z2eTE7 zKCzP&e}XO>CT%=o(v+WUY`Az*`9inbTG& z_9_*oQKw;sc8{ipoBC`S4Tb7a%tUE)1fE+~ib$;|(`|4QbXc2>VzFi%1nX%ti;^s3~NIL0R}!!a{0A zyCRp0F7Y&vcP&3`&Dzv5!&#h}F2R-h&QhIfq*ts&qO13{_CP}1*sLz!hI9VoTSzTu zok5pV0+~jrGymE~{TgbS#nN5+*rF7ij)cnSLQw0Ltc70zmk|O!O(kM<3zw-sUvkx~ z2`y+{xAwKSa-0}n7{$I@Zop7CWy%_xIeN1e-7&OjQ6vZZPbZ^3_ z(~=;ZSP98S2oB#35b1~_x`2gWiPdIVddEf`AD9<@c_s)TM;3J$T_l?pr{<7PTgdiy zBc5IGx)g~n=s+Z$RzYCmv8PlJu%gkh^;%mTGMc)UwRINVD~K;`Rl!5@hhGg;y>5qj zq|u-Yf0q_~Y+Mbivkkfa0nAOzB1acnytogsj_m7FB(-FjihMek#GAU4M!iXCgdK8a zjoKm?*|iz7;dHm4$^hh(`Ufl>yb>$hjIA-;>{>C}G0Di%bGvUsJkfLAV|xq32c>RqJqTBJ3Dx zYC;*Dt|S$b6)aCJFnK(Eey$M1DpVV~_MIhwK> zygo(jWC|_IRw|456`roEyXtkNLWNAt-4N1qyN$I@DvBzt;e|?g<*HK1%~cq|^u*}C zmMrwh>{QAq?Ar~4l^DqT%SQ)w)FA(#7#u+N;>E975rYML>)LgE`2<7nN=C1pC{IkV zVw}_&v6j&S?QVh*)wF3#XmE@0($^BVl1969csLKUBNer{suVd!a~B!0MxWY?=(GD6 zy$G&ERFR#i6G4=2F?R4}Mz3B?3tnpoX3)qFF2sh9-Jn*e%9F>i{WG7$_~XyOO2!+@ z6k+38KyD@-0=uee54D0!Z1@B^ilj~StchdOn(*qvg~s5QJpWGc!6U^Aj!xt-HZn_V zS%|fyQ5YS@EP2lBIodXCLjG_+a)%En+7jzngk@J>6D~^xbxKkvf-R0-c%mX+o{?&j zZZ%RxFeav8Y0gkwtdtrwUb-i0Egd2C=ADu%w5VV-hNJvl)GZ?M;y$!?b=S+wKRK7Q zcOjPT!p<*#8m;TsBih=@Xc&c)?Vy`Ys>IvK@|1%N+M6J-^RCRaZcPP2eQh9DEGZr+ z?8B~wF14mk4Xkuen{wY^CWwS1PI<8gikY*)3?RSo5l8es4*J z43k_BIwc}of=6Pfs%xIxlMDGOJN zvl!a>G)52XMqA%fbgkZi%)%bN*ZzZw2!rn4@+J)2eK#kWuEW{)W~-`y1vhA5-7p%R z&f5N!a9f8cK1Xa=O}=9{wg%}Ur^+8Y(!UCeqw>%wj@|bYHD-bZO~mk3L$9_^MmF3G zvCiK^e@q6G?tHkM8%GqsBMZaB20W$UEt_5r~jc#WlR>Bv{6W>A=!#InoY zLOd04@Rz?*7PpW8u|+}bt`?+Z(GsX{Br4A2$ZZ(26Degmr9`O=t2KgHTL*==R3xcP z&Y(J7hC@6_x8zVz!CX3l4Xtss6i7r#E6kXMNN1~>9KTRzewfp))ij%)SBBl0fZdYP zd!zzQD5u8yk-u|41|Rqz7_tCFUMThZJVj)yQf6^Cwtn|Ew6cm5J|u1Bq>MWX-AfB&NE;C z62@=-0le`E6-CurMKjoIy)BuUmhMGJb}pPx!@GLWMT+wH2R?wA=MEy)o57~feFp8P zY@YXAyt4<1FD<|iw{FGQu~GEI<4C64)V*QiVk+VzOV^9GWf4ir#oYgHJz!wq>iZV#_6@_{)&lum)4x z_Of*CLVQ7wdT#XT-(h0qH%mcIF7yzMIvvTN3bPceK>PpJi(=3Nny zbSn}p$dGKQUlX&-t~RR)#F7I<8NCD^yke(vdf#4^aAh}M-{tS9-&^tC4`KU_pToXy z+|K8sx}a)Kh{h{;*V1#hs1xB%(?j>)g~`Wv(9F)f=Qn)(daVB7hZtcp^#LrEr1T1J zZSJ*lVyVVjhy)mkex9Whn=EinKDHe@KlfQI-Fl7M?-c~HnW0;C;+MbUY8?FToy;A+ zs&Nc7VZ=Of+e!G6s#+S5WBU)kgQq_I1@!uH74GJ-+O|%0HXm9Mqlvp|j%0`T>fr9^ zK;qo>XdwZW<>%tTA+<(1^6(>=-2N;hRgBnjvEjN;VbKMbFg--WrGy|XESoH1p|M4` z86(gC^vB4qScASZ&cdpT{~QDN-jC|GJ(RYoW1VW4!SSn- zhQds9&RBKn6M&GVK_Aayt(Hekbnw=tr>f z^o@v9_*iQO1*zeOrts9Q-$pc@!StS&kz$cF`s@pM`rmJXTP&h5G)A74!0e%ZJbl}( zssI|_!%~_hZFypv*S^JE5N&Kvmx7KiG<|fGMO=WrH+@Yhuj+KwiS#l4>@%2nl zS)mDikfmokO4q2A)hRVZBq2-5q&XC>%HOLkOYxZ66(s86?=0s4z5xbiOV)}L-&6b)h6(~CIaR#JNw~46+WBiU7IhB zq!NuR4!TsYnyBg>@G=Ib*cMq^k<}AMpCeYEf&dzfiGI-wOQ7hb+nA zkN7_){y&c3xC0 AQ~&?~ literal 0 HcmV?d00001 diff --git a/public/javascripts/application.js b/public/javascripts/application.js new file mode 100644 index 0000000..fe45776 --- /dev/null +++ b/public/javascripts/application.js @@ -0,0 +1,2 @@ +// Place your application-specific JavaScript functions and classes here +// This file is automatically included by javascript_include_tag :defaults diff --git a/public/javascripts/jrails.js b/public/javascripts/jrails.js new file mode 100644 index 0000000..1d67293 --- /dev/null +++ b/public/javascripts/jrails.js @@ -0,0 +1 @@ +(function($){$().ajaxSend(function(a,xhr,s){xhr.setRequestHeader("Accept","text/javascript, text/html, application/xml, text/xml, */*")})})(jQuery);(function($){$.fn.reset=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};$.fn.enable=function(){return this.each(function(){this.disabled=false})};$.fn.disable=function(){return this.each(function(){this.disabled=true})}})(jQuery);(function($){$.extend({fieldEvent:function(el,obs){var field=el[0]||el,e="change";if(field.type=="radio"||field.type=="checkbox"){e="click"}else{if(obs&&field.type=="text"||field.type=="textarea"){e="keyup"}}return e}});$.fn.extend({delayedObserver:function(delay,callback){var el=$(this);if(typeof window.delayedObserverStack=="undefined"){window.delayedObserverStack=[]}if(typeof window.delayedObserverCallback=="undefined"){window.delayedObserverCallback=function(stackPos){observed=window.delayedObserverStack[stackPos];if(observed.timer){clearTimeout(observed.timer)}observed.timer=setTimeout(function(){observed.timer=null;observed.callback(observed.obj,observed.obj.formVal())},observed.delay*1000);observed.oldVal=observed.obj.formVal()}}window.delayedObserverStack.push({obj:el,timer:null,delay:delay,oldVal:el.formVal(),callback:callback});var stackPos=window.delayedObserverStack.length-1;if(el[0].tagName=="FORM"){$(":input",el).each(function(){var field=$(this);field.bind($.fieldEvent(field,delay),function(){observed=window.delayedObserverStack[stackPos];if(observed.obj.formVal()==observed.obj.oldVal){return}else{window.delayedObserverCallback(stackPos)}})})}else{el.bind($.fieldEvent(el,delay),function(){observed=window.delayedObserverStack[stackPos];if(observed.obj.formVal()==observed.obj.oldVal){return}else{window.delayedObserverCallback(stackPos)}})}},formVal:function(){var el=this[0];if(el.tagName=="FORM"){return this.serialize()}if(el.type=="checkbox"||self.type=="radio"){return this.filter("input:checked").val()||""}else{return this.val()}}})})(jQuery);(function($){$.fn.extend({visualEffect:function(o){e=o.replace(/\_(.)/g,function(m,l){return l.toUpperCase()});return eval("$(this)."+e+"()")},appear:function(speed,callback){return this.fadeIn(speed,callback)},blindDown:function(speed,callback){return this.show("blind",{direction:"vertical"},speed,callback)},blindUp:function(speed,callback){return this.hide("blind",{direction:"vertical"},speed,callback)},blindRight:function(speed,callback){return this.show("blind",{direction:"horizontal"},speed,callback)},blindLeft:function(speed,callback){this.hide("blind",{direction:"horizontal"},speed,callback);return this},dropOut:function(speed,callback){return this.hide("drop",{direction:"down"},speed,callback)},dropIn:function(speed,callback){return this.show("drop",{direction:"up"},speed,callback)},fade:function(speed,callback){return this.fadeOut(speed,callback)},fadeToggle:function(speed,callback){return this.animate({opacity:"toggle"},speed,callback)},fold:function(speed,callback){return this.hide("fold",{},speed,callback)},foldOut:function(speed,callback){return this.show("fold",{},speed,callback)},grow:function(speed,callback){return this.show("scale",{},speed,callback)},highlight:function(speed,callback){return this.show("highlight",{},speed,callback)},puff:function(speed,callback){return this.hide("puff",{},speed,callback)},pulsate:function(speed,callback){return this.show("pulsate",{},speed,callback)},shake:function(speed,callback){return this.show("shake",{},speed,callback)},shrink:function(speed,callback){return this.hide("scale",{},speed,callback)},squish:function(speed,callback){return this.hide("scale",{origin:["top","left"]},speed,callback)},slideUp:function(speed,callback){return this.hide("slide",{direction:"up"},speed,callback)},slideDown:function(speed,callback){return this.show("slide",{direction:"up"},speed,callback)},switchOff:function(speed,callback){return this.hide("clip",{},speed,callback)},switchOn:function(speed,callback){return this.show("clip",{},speed,callback)}})})(jQuery); \ No newline at end of file diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..085187f --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,5 @@ +# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file +# +# To ban all spiders from the entire site uncomment the next two lines: +# User-Agent: * +# Disallow: / diff --git a/public/stylesheets/scaffold.css b/public/stylesheets/scaffold.css new file mode 100644 index 0000000..093c209 --- /dev/null +++ b/public/stylesheets/scaffold.css @@ -0,0 +1,54 @@ +body { background-color: #fff; color: #333; } + +body, p, ol, ul, td { + font-family: verdana, arial, helvetica, sans-serif; + font-size: 13px; + line-height: 18px; +} + +pre { + background-color: #eee; + padding: 10px; + font-size: 11px; +} + +a { color: #000; } +a:visited { color: #666; } +a:hover { color: #fff; background-color:#000; } + +.fieldWithErrors { + padding: 2px; + background-color: red; + display: table; +} + +#errorExplanation { + width: 400px; + border: 2px solid red; + padding: 7px; + padding-bottom: 12px; + margin-bottom: 20px; + background-color: #f0f0f0; +} + +#errorExplanation h2 { + text-align: left; + font-weight: bold; + padding: 5px 5px 5px 15px; + font-size: 12px; + margin: -7px; + background-color: #c00; + color: #fff; +} + +#errorExplanation p { + color: #333; + margin-bottom: 0; + padding: 5px; +} + +#errorExplanation ul li { + font-size: 12px; + list-style: square; +} + diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css new file mode 100644 index 0000000..3783a50 --- /dev/null +++ b/public/stylesheets/style.css @@ -0,0 +1,11 @@ +#flash_error { + color:red; +} + +#flash_notice { + color:blue; +} + +#flash_success { + color:green; +} \ No newline at end of file diff --git a/script/about b/script/about new file mode 100755 index 0000000..1eeb6eb --- /dev/null +++ b/script/about @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +require File.expand_path('../../config/boot', __FILE__) +$LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info" +require 'commands/about' diff --git a/script/console b/script/console new file mode 100755 index 0000000..235a1f2 --- /dev/null +++ b/script/console @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +require File.expand_path('../../config/boot', __FILE__) +require 'commands/console' diff --git a/script/dbconsole b/script/dbconsole new file mode 100755 index 0000000..83c8436 --- /dev/null +++ b/script/dbconsole @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +require File.expand_path('../../config/boot', __FILE__) +require 'commands/dbconsole' diff --git a/script/destroy b/script/destroy new file mode 100755 index 0000000..88d295f --- /dev/null +++ b/script/destroy @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +require File.expand_path('../../config/boot', __FILE__) +require 'commands/destroy' diff --git a/script/generate b/script/generate new file mode 100755 index 0000000..62a8a4c --- /dev/null +++ b/script/generate @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +require File.expand_path('../../config/boot', __FILE__) +require 'commands/generate' diff --git a/script/performance/benchmarker b/script/performance/benchmarker new file mode 100755 index 0000000..3bff809 --- /dev/null +++ b/script/performance/benchmarker @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +require File.expand_path('../../../config/boot', __FILE__) +require 'commands/performance/benchmarker' diff --git a/script/performance/profiler b/script/performance/profiler new file mode 100755 index 0000000..0764057 --- /dev/null +++ b/script/performance/profiler @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +require File.expand_path('../../../config/boot', __FILE__) +require 'commands/performance/profiler' diff --git a/script/plugin b/script/plugin new file mode 100755 index 0000000..b82201f --- /dev/null +++ b/script/plugin @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +require File.expand_path('../../config/boot', __FILE__) +require 'commands/plugin' diff --git a/script/runner b/script/runner new file mode 100755 index 0000000..be4c5d4 --- /dev/null +++ b/script/runner @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +require File.expand_path('../../config/boot', __FILE__) +require 'commands/runner' diff --git a/script/server b/script/server new file mode 100755 index 0000000..b9fcb71 --- /dev/null +++ b/script/server @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +require File.expand_path('../../config/boot', __FILE__) +require 'commands/server' diff --git a/test/fixtures/projects.yml b/test/fixtures/projects.yml new file mode 100644 index 0000000..157d747 --- /dev/null +++ b/test/fixtures/projects.yml @@ -0,0 +1,7 @@ +# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html + +one: + name: MyString + +two: + name: MyString diff --git a/test/fixtures/tasks.yml b/test/fixtures/tasks.yml new file mode 100644 index 0000000..c840dec --- /dev/null +++ b/test/fixtures/tasks.yml @@ -0,0 +1,13 @@ +# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html + +one: + name: MyString + project: + description: MyText + parent: 1 + +two: + name: MyString + project: + description: MyText + parent: 1 diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb new file mode 100644 index 0000000..17a69cf --- /dev/null +++ b/test/functional/projects_controller_test.rb @@ -0,0 +1,45 @@ +require 'test_helper' + +class ProjectsControllerTest < ActionController::TestCase + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:projects) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create project" do + assert_difference('Project.count') do + post :create, :project => { } + end + + assert_redirected_to project_path(assigns(:project)) + end + + test "should show project" do + get :show, :id => projects(:one).to_param + assert_response :success + end + + test "should get edit" do + get :edit, :id => projects(:one).to_param + assert_response :success + end + + test "should update project" do + put :update, :id => projects(:one).to_param, :project => { } + assert_redirected_to project_path(assigns(:project)) + end + + test "should destroy project" do + assert_difference('Project.count', -1) do + delete :destroy, :id => projects(:one).to_param + end + + assert_redirected_to projects_path + end +end diff --git a/test/functional/tasks_controller_test.rb b/test/functional/tasks_controller_test.rb new file mode 100644 index 0000000..21b6bfe --- /dev/null +++ b/test/functional/tasks_controller_test.rb @@ -0,0 +1,45 @@ +require 'test_helper' + +class TasksControllerTest < ActionController::TestCase + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:tasks) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create task" do + assert_difference('Task.count') do + post :create, :task => { } + end + + assert_redirected_to task_path(assigns(:task)) + end + + test "should show task" do + get :show, :id => tasks(:one).to_param + assert_response :success + end + + test "should get edit" do + get :edit, :id => tasks(:one).to_param + assert_response :success + end + + test "should update task" do + put :update, :id => tasks(:one).to_param, :task => { } + assert_redirected_to task_path(assigns(:task)) + end + + test "should destroy task" do + assert_difference('Task.count', -1) do + delete :destroy, :id => tasks(:one).to_param + end + + assert_redirected_to tasks_path + end +end diff --git a/test/performance/browsing_test.rb b/test/performance/browsing_test.rb new file mode 100644 index 0000000..4b60558 --- /dev/null +++ b/test/performance/browsing_test.rb @@ -0,0 +1,9 @@ +require 'test_helper' +require 'performance_test_help' + +# Profiling results for each test method are written to tmp/performance. +class BrowsingTest < ActionController::PerformanceTest + def test_homepage + get '/' + end +end diff --git a/test/test_helper.rb b/test/test_helper.rb new file mode 100644 index 0000000..b9fe251 --- /dev/null +++ b/test/test_helper.rb @@ -0,0 +1,38 @@ +ENV["RAILS_ENV"] = "test" +require File.expand_path(File.dirname(__FILE__) + "/../config/environment") +require 'test_help' + +class ActiveSupport::TestCase + # Transactional fixtures accelerate your tests by wrapping each test method + # in a transaction that's rolled back on completion. This ensures that the + # test database remains unchanged so your fixtures don't have to be reloaded + # between every test method. Fewer database queries means faster tests. + # + # Read Mike Clark's excellent walkthrough at + # http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting + # + # Every Active Record database supports transactions except MyISAM tables + # in MySQL. Turn off transactional fixtures in this case; however, if you + # don't care one way or the other, switching from MyISAM to InnoDB tables + # is recommended. + # + # The only drawback to using transactional fixtures is when you actually + # need to test transactions. Since your test is bracketed by a transaction, + # any transactions started in your code will be automatically rolled back. + self.use_transactional_fixtures = true + + # Instantiated fixtures are slow, but give you @david where otherwise you + # would need people(:david). If you don't want to migrate your existing + # test cases which use the @david style and don't mind the speed hit (each + # instantiated fixtures translates to a database query per test method), + # then set this back to true. + self.use_instantiated_fixtures = false + + # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order. + # + # Note: You'll currently still have to declare fixtures explicitly in integration tests + # -- they do not yet inherit this setting + fixtures :all + + # Add more helper methods to be used by all tests here... +end diff --git a/test/unit/helpers/projects_helper_test.rb b/test/unit/helpers/projects_helper_test.rb new file mode 100644 index 0000000..a591e4e --- /dev/null +++ b/test/unit/helpers/projects_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class ProjectsHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/tasks_helper_test.rb b/test/unit/helpers/tasks_helper_test.rb new file mode 100644 index 0000000..440239e --- /dev/null +++ b/test/unit/helpers/tasks_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class TasksHelperTest < ActionView::TestCase +end diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb new file mode 100644 index 0000000..bc23a8a --- /dev/null +++ b/test/unit/project_test.rb @@ -0,0 +1,8 @@ +require 'test_helper' + +class ProjectTest < ActiveSupport::TestCase + # Replace this with your real tests. + test "the truth" do + assert true + end +end diff --git a/test/unit/task_test.rb b/test/unit/task_test.rb new file mode 100644 index 0000000..b667a66 --- /dev/null +++ b/test/unit/task_test.rb @@ -0,0 +1,8 @@ +require 'test_helper' + +class TaskTest < ActiveSupport::TestCase + # Replace this with your real tests. + test "the truth" do + assert true + end +end diff --git a/vendor/plugins/jrails/CHANGELOG b/vendor/plugins/jrails/CHANGELOG new file mode 100644 index 0000000..fd5cd09 --- /dev/null +++ b/vendor/plugins/jrails/CHANGELOG @@ -0,0 +1,35 @@ +SVN +* better approximate scriptaculous effect names +* add support for page[:element_id].visual_effect(:effect) as well as page.visual_effect(:effect, :element_id) +* added a reset form function to jrails.js (stolen from jquery form) +* can now use jquery selectors in all functions +* added javascript_function helper to render inline rjs helpers +* better support for sortable_element +* updated to jquery-ui 1.5.1 + +0.4.0 (16 June 2008) +* updated to jquery-ui 1.5 & merged js into single file +* Added jQuery.noConflict support +* support for value/val +* additional support for update/delete methods +* support for success/failure hash +* setRequestHeader now gets called globally +* Better support for droppables, sortables +* Add support for prototype AJAX callbacks +* better support for AJAX form calls + +0.3.0 (22 Feb 2008) +* updated to jquery-fx 1.0b and jquery-ui 1.5b +* Add text/javascript request header to fix format.js +* Added Tasks (thanks ggarside) +* Improve visual_effects methods +* Fixed some RJS calls +* Fixed observer code for ie + +0.2.0 (26 Nov 2007) +* Vastly Improved FX +* Improved Form Observers +* Fixed Rails <= 1.2.6 Compatibility + +0.1.0 (15 Nov 2007) +* Initial release diff --git a/vendor/plugins/jrails/README b/vendor/plugins/jrails/README new file mode 100644 index 0000000..162691a --- /dev/null +++ b/vendor/plugins/jrails/README @@ -0,0 +1,21 @@ += jRails + +jRails is a drop-in jQuery replacement for the Rails Prototype/script.aculo.us helpers. + +== Resources + +Install + +* .script/plugin install http://ennerchi.googlecode.com/svn/trunk/plugins/jrails + +Project Site + +* http://code.google.com/p/ennerchi/ + +Web Site + +* http://www.ennerchi.com/projects/jrails + +Group Site + +* http://groups.google.com/group/jrails \ No newline at end of file diff --git a/vendor/plugins/jrails/init.rb b/vendor/plugins/jrails/init.rb new file mode 100644 index 0000000..dfc6ccb --- /dev/null +++ b/vendor/plugins/jrails/init.rb @@ -0,0 +1,6 @@ +# uncomment to use jQuery.noConflict() +#ActionView::Helpers::PrototypeHelper::JQUERY_VAR = 'jQuery' + +ActionView::Helpers::AssetTagHelper::JAVASCRIPT_DEFAULT_SOURCES = ['jrails'] +ActionView::Helpers::AssetTagHelper::reset_javascript_include_default +require 'jrails' diff --git a/vendor/plugins/jrails/install.rb b/vendor/plugins/jrails/install.rb new file mode 100644 index 0000000..d8f6e9b --- /dev/null +++ b/vendor/plugins/jrails/install.rb @@ -0,0 +1,9 @@ +# Install hook code here +puts "Copying files..." +dir = "javascripts" +["jquery-ui.js", "jquery.js", "jrails.js"].each do |js_file| + dest_file = File.join(RAILS_ROOT, "public", dir, js_file) + src_file = File.join(File.dirname(__FILE__) , dir, js_file) + FileUtils.cp_r(src_file, dest_file) +end +puts "Files copied - Installation complete!" diff --git a/vendor/plugins/jrails/javascripts/jquery-ui.js b/vendor/plugins/jrails/javascripts/jquery-ui.js new file mode 100644 index 0000000..6e928f9 --- /dev/null +++ b/vendor/plugins/jrails/javascripts/jquery-ui.js @@ -0,0 +1,160 @@ +;(function($){$.ui={plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]]);}},call:function(instance,name,args){var set=instance.plugins[name];if(!set){return;} +for(var i=0;i').addClass(name).css({position:'absolute',top:'-5000px',left:'-5000px',display:'block'}).appendTo('body');$.ui.cssCache[name]=!!((!(/auto|default/).test(tmp.css('cursor'))||(/^[1-9]/).test(tmp.css('height'))||(/^[1-9]/).test(tmp.css('width'))||!(/none/).test(tmp.css('backgroundImage'))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor'))));try{$('body').get(0).removeChild(tmp.get(0));}catch(e){} +return $.ui.cssCache[name];},disableSelection:function(e){e.unselectable="on";e.onselectstart=function(){return false;};if(e.style){e.style.MozUserSelect="none";}},enableSelection:function(e){e.unselectable="off";e.onselectstart=function(){return true;};if(e.style){e.style.MozUserSelect="";}},hasScroll:function(e,a){var scroll=/top/.test(a||"top")?'scrollTop':'scrollLeft',has=false;if(e[scroll]>0)return true;e[scroll]=1;has=e[scroll]>0?true:false;e[scroll]=0;return has;}};var _remove=$.fn.remove;$.fn.remove=function(){$("*",this).add(this).trigger("remove");return _remove.apply(this,arguments);};function getter(namespace,plugin,method){var methods=$[namespace][plugin].getter||[];methods=(typeof methods=="string"?methods.split(/,?\s+/):methods);return($.inArray(method,methods)!=-1);} +$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=='string'),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&getter(namespace,name,options)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined);} +return this.each(function(){var instance=$.data(this,name);if(isMethodCall&&instance&&$.isFunction(instance[options])){instance[options].apply(instance,args);}else if(!isMethodCall){$.data(this,name,new $[namespace][name](this,options));}});};$[namespace][name]=function(element,options){var self=this;this.widgetName=name;this.widgetBaseClass=namespace+'-'+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,options);this.element=$(element).bind('setData.'+name,function(e,key,value){return self.setData(key,value);}).bind('getData.'+name,function(e,key){return self.getData(key);}).bind('remove',function(){return self.destroy();});this.init();};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);};$.widget.prototype={init:function(){},destroy:function(){this.element.removeData(this.widgetName);},getData:function(key){return this.options[key];},setData:function(key,value){this.options[key]=value;if(key=='disabled'){this.element[value?'addClass':'removeClass'](this.widgetBaseClass+'-disabled');}},enable:function(){this.setData('disabled',false);},disable:function(){this.setData('disabled',true);}};$.widget.defaults={disabled:false};$.ui.mouse={mouseInit:function(){var self=this;this.element.bind('mousedown.'+this.widgetName,function(e){return self.mouseDown(e);});if($.browser.msie){this._mouseUnselectable=this.element.attr('unselectable');this.element.attr('unselectable','on');} +this.started=false;},mouseDestroy:function(){this.element.unbind('.'+this.widgetName);($.browser.msie&&this.element.attr('unselectable',this._mouseUnselectable));},mouseDown:function(e){(this._mouseStarted&&this.mouseUp(e));this._mouseDownEvent=e;var self=this,btnIsLeft=(e.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(e.target).is(this.options.cancel):false);if(!btnIsLeft||elIsCancel||!this.mouseCapture(e)){return true;} +this._mouseDelayMet=!this.options.delay;if(!this._mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self._mouseDelayMet=true;},this.options.delay);} +if(this.mouseDistanceMet(e)&&this.mouseDelayMet(e)){this._mouseStarted=(this.mouseStart(e)!==false);if(!this._mouseStarted){e.preventDefault();return true;}} +this._mouseMoveDelegate=function(e){return self.mouseMove(e);};this._mouseUpDelegate=function(e){return self.mouseUp(e);};$(document).bind('mousemove.'+this.widgetName,this._mouseMoveDelegate).bind('mouseup.'+this.widgetName,this._mouseUpDelegate);return false;},mouseMove:function(e){if($.browser.msie&&!e.button){return this.mouseUp(e);} +if(this._mouseStarted){this.mouseDrag(e);return false;} +if(this.mouseDistanceMet(e)&&this.mouseDelayMet(e)){this._mouseStarted=(this.mouseStart(this._mouseDownEvent,e)!==false);(this._mouseStarted?this.mouseDrag(e):this.mouseUp(e));} +return!this._mouseStarted;},mouseUp:function(e){$(document).unbind('mousemove.'+this.widgetName,this._mouseMoveDelegate).unbind('mouseup.'+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this.mouseStop(e);} +return false;},mouseDistanceMet:function(e){return(Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance);},mouseDelayMet:function(e){return this._mouseDelayMet;},mouseStart:function(e){},mouseDrag:function(e){},mouseStop:function(e){},mouseCapture:function(e){return true;}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0};})(jQuery);(function($){$.widget("ui.draggable",$.extend($.ui.mouse,{init:function(){var o=this.options;if(o.helper=='original'&&!(/(relative|absolute|fixed)/).test(this.element.css('position'))) +this.element.css('position','relative');this.element.addClass('ui-draggable');(o.disabled&&this.element.addClass('ui-draggable-disabled'));this.mouseInit();},mouseStart:function(e){var o=this.options;if(this.helper||o.disabled||$(e.target).is('.ui-resizable-handle'))return false;var handle=!this.options.handle||!$(this.options.handle,this.element).length?true:false;$(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==e.target)handle=true;});if(!handle)return false;if($.ui.ddmanager)$.ui.ddmanager.current=this;this.helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[e])):(o.helper=='clone'?this.element.clone():this.element);if(!this.helper.parents('body').length)this.helper.appendTo((o.appendTo=='parent'?this.element[0].parentNode:o.appendTo));if(this.helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(this.helper.css("position")))this.helper.css("position","absolute");this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)};this.cssPosition=this.helper.css("position");this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top};this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.offsetParent[0]==document.body&&$.browser.mozilla)po={top:0,left:0};this.offset.parent={top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};var p=this.element.position();this.offset.relative=this.cssPosition=="relative"?{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.offsetParent[0].scrollTop,left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.offsetParent[0].scrollLeft}:{top:0,left:0};this.originalPosition=this.generatePosition(e);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(o.cursorAt){if(o.cursorAt.left!=undefined)this.offset.click.left=o.cursorAt.left+this.margins.left;if(o.cursorAt.right!=undefined)this.offset.click.left=this.helperProportions.width-o.cursorAt.right+this.margins.left;if(o.cursorAt.top!=undefined)this.offset.click.top=o.cursorAt.top+this.margins.top;if(o.cursorAt.bottom!=undefined)this.offset.click.top=this.helperProportions.height-o.cursorAt.bottom+this.margins.top;} +if(o.containment){if(o.containment=='parent')o.containment=this.helper[0].parentNode;if(o.containment=='document'||o.containment=='window')this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,$(o.containment=='document'?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),($(o.containment=='document'?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)];if(!(/^(document|window|parent)$/).test(o.containment)){var ce=$(o.containment)[0];var co=$(o.containment).offset();this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top,co.left+Math.max(ce.scrollWidth,ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),co.top+Math.max(ce.scrollHeight,ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)];}} +this.propagate("start",e);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if($.ui.ddmanager&&!o.dropBehaviour)$.ui.ddmanager.prepareOffsets(this,e);this.helper.addClass("ui-draggable-dragging");this.mouseDrag(e);return true;},convertPositionTo:function(d,pos){if(!pos)pos=this.position;var mod=d=="absolute"?1:-1;return{top:(pos.top ++this.offset.relative.top*mod ++this.offset.parent.top*mod +-(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollTop)*mod ++(this.cssPosition=="fixed"?$(document).scrollTop():0)*mod ++this.margins.top*mod),left:(pos.left ++this.offset.relative.left*mod ++this.offset.parent.left*mod +-(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollLeft)*mod ++(this.cssPosition=="fixed"?$(document).scrollLeft():0)*mod ++this.margins.left*mod)};},generatePosition:function(e){var o=this.options;var position={top:(e.pageY +-this.offset.click.top +-this.offset.relative.top +-this.offset.parent.top ++(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollTop) +-(this.cssPosition=="fixed"?$(document).scrollTop():0)),left:(e.pageX +-this.offset.click.left +-this.offset.relative.left +-this.offset.parent.left ++(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollLeft) +-(this.cssPosition=="fixed"?$(document).scrollLeft():0))};if(!this.originalPosition)return position;if(this.containment){if(position.leftthis.containment[2])position.left=this.containment[2];if(position.top>this.containment[3])position.top=this.containment[3];} +if(o.grid){var top=this.originalPosition.top+Math.round((position.top-this.originalPosition.top)/o.grid[1])*o.grid[1];position.top=this.containment?(!(topthis.containment[3])?top:(!(topthis.containment[2])?left:(!(left').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css($(this).offset()).appendTo("body");});},stop:function(e,ui){$("div.DragDropIframeFix").each(function(){this.parentNode.removeChild(this);});}});$.ui.plugin.add("draggable","scroll",{start:function(e,ui){var o=ui.options;var i=$(this).data("draggable");o.scrollSensitivity=o.scrollSensitivity||20;o.scrollSpeed=o.scrollSpeed||20;i.overflowY=function(el){do{if(/auto|scroll/.test(el.css('overflow'))||(/auto|scroll/).test(el.css('overflow-y')))return el;el=el.parent();}while(el[0].parentNode);return $(document);}(this);i.overflowX=function(el){do{if(/auto|scroll/.test(el.css('overflow'))||(/auto|scroll/).test(el.css('overflow-x')))return el;el=el.parent();}while(el[0].parentNode);return $(document);}(this);if(i.overflowY[0]!=document&&i.overflowY[0].tagName!='HTML')i.overflowYOffset=i.overflowY.offset();if(i.overflowX[0]!=document&&i.overflowX[0].tagName!='HTML')i.overflowXOffset=i.overflowX.offset();},drag:function(e,ui){var o=ui.options;var i=$(this).data("draggable");if(i.overflowY[0]!=document&&i.overflowY[0].tagName!='HTML'){if((i.overflowYOffset.top+i.overflowY[0].offsetHeight)-e.pageY=0;i--){var l=inst.snapElements[i].left,r=l+inst.snapElements[i].width,t=inst.snapElements[i].top,b=t+inst.snapElements[i].height;if(!((l-d=t&&y1<=b)||(y2>=t&&y2<=b)||(y1b))&&((x1>=l&&x1<=r)||(x2>=l&&x2<=r)||(x1r));break;default:return false;break;}};$.ui.ddmanager={current:null,droppables:[],prepareOffsets:function(t,e){var m=$.ui.ddmanager.droppables;var type=e?e.type:null;for(var i=0;iitem[this.floating?'width':'height'])){return(y1+this.offset.click.top>t&&y1+this.offset.click.topl&&x1+this.offset.click.leftitem[this.floating?'width':'height'])){if(!(y1+this.offset.click.top>t&&y1+this.offset.click.topl&&x1+this.offset.click.leftl&&x1+this.offset.click.leftl+item.width/2&&x1+this.offset.click.leftt&&y1+this.offset.click.topt+item.height/2&&y1+this.offset.click.topl&&x1r)return 1;}else{if(y2>t&&y1b)return 2;}} +return false;},refresh:function(){this.refreshItems();this.refreshPositions();},refreshItems:function(){this.items=[];this.containers=[this];var items=this.items;var self=this;var queries=[[$.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):$(this.options.items,this.element),this]];if(this.options.connectWith){for(var i=this.options.connectWith.length-1;i>=0;i--){var cur=$(this.options.connectWith[i]);for(var j=cur.length-1;j>=0;j--){var inst=$.data(cur[j],'sortable');if(inst&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element):$(inst.options.items,inst.element),inst]);this.containers.push(inst);}};};} +for(var i=queries.length-1;i>=0;i--){queries[i][0].each(function(){$.data(this,'sortable-item',queries[i][1]);items.push({item:$(this),instance:queries[i][1],width:0,height:0,left:0,top:0});});};},refreshPositions:function(fast){if(this.offsetParent){var po=this.offsetParent.offset();this.offset.parent={top:po.top+this.offsetParentBorders.top,left:po.left+this.offsetParentBorders.left};} +for(var i=this.items.length-1;i>=0;i--){if(this.items[i].instance!=this.currentContainer&&this.currentContainer&&this.items[i].item[0]!=this.currentItem[0]) +continue;var t=this.options.toleranceElement?$(this.options.toleranceElement,this.items[i].item):this.items[i].item;if(!fast){this.items[i].width=t.outerWidth();this.items[i].height=t.outerHeight();} +var p=t.offset();this.items[i].left=p.left;this.items[i].top=p.top;};for(var i=this.containers.length-1;i>=0;i--){var p=this.containers[i].element.offset();this.containers[i].containerCache.left=p.left;this.containers[i].containerCache.top=p.top;this.containers[i].containerCache.width=this.containers[i].element.outerWidth();this.containers[i].containerCache.height=this.containers[i].element.outerHeight();};},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this.mouseDestroy();for(var i=this.items.length-1;i>=0;i--) +this.items[i].item.removeData("sortable-item");},createPlaceholder:function(that){var self=that||this,o=self.options;if(o.placeholder.constructor==String){var className=o.placeholder;o.placeholder={element:function(){return $('
').addClass(className)[0];},update:function(i,p){p.css(i.offset()).css({width:i.outerWidth(),height:i.outerHeight()});}};} +self.placeholder=$(o.placeholder.element.call(self.element,self.currentItem)).appendTo('body').css({position:'absolute'});o.placeholder.update.call(self.element,self.currentItem,self.placeholder);},contactContainers:function(e){for(var i=this.containers.length-1;i>=0;i--){if(this.intersectsWith(this.containers[i].containerCache)){if(!this.containers[i].containerCache.over){if(this.currentContainer!=this.containers[i]){var dist=10000;var itemWithLeastDistance=null;var base=this.positionAbs[this.containers[i].floating?'left':'top'];for(var j=this.items.length-1;j>=0;j--){if(!contains(this.containers[i].element[0],this.items[j].item[0]))continue;var cur=this.items[j][this.containers[i].floating?'left':'top'];if(Math.abs(cur-base)=0;i--){this.containers[i].propagate("activate",e,this);}} +if($.ui.ddmanager)$.ui.ddmanager.current=this;if($.ui.ddmanager&&!o.dropBehaviour)$.ui.ddmanager.prepareOffsets(this,e);this.dragging=true;this.mouseDrag(e);return true;},convertPositionTo:function(d,pos){if(!pos)pos=this.position;var mod=d=="absolute"?1:-1;return{top:(pos.top ++this.offset.parent.top*mod +-(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)*mod ++this.margins.top*mod),left:(pos.left ++this.offset.parent.left*mod +-(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft)*mod ++this.margins.left*mod)};},generatePosition:function(e){var o=this.options;var position={top:(e.pageY +-this.offset.click.top +-this.offset.parent.top ++(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)),left:(e.pageX +-this.offset.click.left +-this.offset.parent.left ++(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft))};if(!this.originalPosition)return position;if(this.containment){if(position.leftthis.containment[2])position.left=this.containment[2];if(position.top>this.containment[3])position.top=this.containment[3];} +if(o.grid){var top=this.originalPosition.top+Math.round((position.top-this.originalPosition.top)/o.grid[1])*o.grid[1];position.top=this.containment?(!(topthis.containment[3])?top:(!(topthis.containment[2])?left:(!(left=0;i--){var intersection=this.intersectsWithEdge(this.items[i]);if(!intersection)continue;if(this.items[i].item[0]!=this.currentItem[0]&&this.currentItem[intersection==1?"next":"prev"]()[0]!=this.items[i].item[0]&&!contains(this.currentItem[0],this.items[i].item[0])&&(this.options.type=='semi-dynamic'?!contains(this.element[0],this.items[i].item[0]):true)){this.direction=intersection==1?"down":"up";this.rearrange(e,this.items[i]);this.propagate("change",e);break;}} +this.contactContainers(e);this.propagate("sort",e);if(!this.options.axis||this.options.axis=="x")this.helper[0].style.left=this.position.left+'px';if(!this.options.axis||this.options.axis=="y")this.helper[0].style.top=this.position.top+'px';if($.ui.ddmanager)$.ui.ddmanager.drag(this,e);return false;},rearrange:function(e,i,a,hardRefresh){a?a.append(this.currentItem):i.item[this.direction=='down'?'before':'after'](this.currentItem);this.counter=this.counter?++this.counter:1;var self=this,counter=this.counter;window.setTimeout(function(){if(counter==self.counter)self.refreshPositions(!hardRefresh);},0);if(this.options.placeholder) +this.options.placeholder.update.call(this.element,this.currentItem,this.placeholder);},mouseStop:function(e,noPropagation){if($.ui.ddmanager&&!this.options.dropBehaviour) +$.ui.ddmanager.drop(this,e);if(this.options.revert){var self=this;var cur=self.currentItem.offset();if(self.placeholder)self.placeholder.animate({opacity:'hide'},(parseInt(this.options.revert,10)||500)-50);$(this.helper).animate({left:cur.left-this.offset.parent.left-self.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:cur.top-this.offset.parent.top-self.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){self.clear(e);});}else{this.clear(e,noPropagation);} +return false;},clear:function(e,noPropagation){if(this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])this.propagate("update",e,null,noPropagation);if(!contains(this.element[0],this.currentItem[0])){this.propagate("remove",e,null,noPropagation);for(var i=this.containers.length-1;i>=0;i--){if(contains(this.containers[i].element[0],this.currentItem[0])){this.containers[i].propagate("update",e,this,noPropagation);this.containers[i].propagate("receive",e,this,noPropagation);}};};for(var i=this.containers.length-1;i>=0;i--){this.containers[i].propagate("deactivate",e,this,noPropagation);if(this.containers[i].containerCache.over){this.containers[i].propagate("out",e,this);this.containers[i].containerCache.over=0;}} +this.dragging=false;if(this.cancelHelperRemoval){this.propagate("stop",e,null,noPropagation);return false;} +$(this.currentItem).css('visibility','');if(this.placeholder)this.placeholder.remove();this.helper.remove();this.helper=null;this.propagate("stop",e,null,noPropagation);return true;}}));$.extend($.ui.sortable,{getter:"serialize toArray",defaults:{helper:"clone",tolerance:"guess",distance:1,delay:0,scroll:true,scrollSensitivity:20,scrollSpeed:20,cancel:":input",items:'> *',zIndex:1000,dropOnEmpty:true,appendTo:"parent"}});$.ui.plugin.add("sortable","cursor",{start:function(e,ui){var t=$('body');if(t.css("cursor"))ui.options._cursor=t.css("cursor");t.css("cursor",ui.options.cursor);},stop:function(e,ui){if(ui.options._cursor)$('body').css("cursor",ui.options._cursor);}});$.ui.plugin.add("sortable","zIndex",{start:function(e,ui){var t=ui.helper;if(t.css("zIndex"))ui.options._zIndex=t.css("zIndex");t.css('zIndex',ui.options.zIndex);},stop:function(e,ui){if(ui.options._zIndex)$(ui.helper).css('zIndex',ui.options._zIndex);}});$.ui.plugin.add("sortable","opacity",{start:function(e,ui){var t=ui.helper;if(t.css("opacity"))ui.options._opacity=t.css("opacity");t.css('opacity',ui.options.opacity);},stop:function(e,ui){if(ui.options._opacity)$(ui.helper).css('opacity',ui.options._opacity);}});$.ui.plugin.add("sortable","scroll",{start:function(e,ui){var o=ui.options;var i=$(this).data("sortable");i.overflowY=function(el){do{if(/auto|scroll/.test(el.css('overflow'))||(/auto|scroll/).test(el.css('overflow-y')))return el;el=el.parent();}while(el[0].parentNode);return $(document);}(i.currentItem);i.overflowX=function(el){do{if(/auto|scroll/.test(el.css('overflow'))||(/auto|scroll/).test(el.css('overflow-x')))return el;el=el.parent();}while(el[0].parentNode);return $(document);}(i.currentItem);if(i.overflowY[0]!=document&&i.overflowY[0].tagName!='HTML')i.overflowYOffset=i.overflowY.offset();if(i.overflowX[0]!=document&&i.overflowX[0].tagName!='HTML')i.overflowXOffset=i.overflowX.offset();},sort:function(e,ui){var o=ui.options;var i=$(this).data("sortable");if(i.overflowY[0]!=document&&i.overflowY[0].tagName!='HTML'){if((i.overflowYOffset.top+i.overflowY[0].offsetHeight)-e.pageY").addClass("ui-slider-handle").appendTo(self.element);if(this.id) +handle.attr("id",this.id);return handle[0];});} +var handleclass=function(el){this.element=$(el);this.element.data("mouse",this);this.options=self.options;this.element.bind("mousedown",function(){if(self.currentHandle)this.blur(self.currentHandle);self.focus(this,1);});this.mouseInit();};$.extend(handleclass.prototype,$.ui.mouse,{mouseStart:function(e){return self.start.call(self,e,this.element[0]);},mouseStop:function(e){return self.stop.call(self,e,this.element[0]);},mouseDrag:function(e){return self.drag.call(self,e,this.element[0]);},mouseCapture:function(){return true;},trigger:function(e){this.mouseDown(e);}});$(this.handle).each(function(){new handleclass(this);}).wrap('').parent().bind('focus',function(e){self.focus(this.firstChild);}).bind('blur',function(e){self.blur(this.firstChild);}).bind('keydown',function(e){if(!self.options.noKeyboard)self.keydown(e.keyCode,this.firstChild);});this.element.bind('mousedown.slider',function(e){self.click.apply(self,[e]);self.currentHandle.data("mouse").trigger(e);self.firstValue=self.firstValue+1;});$.each(this.options.handles||[],function(index,handle){self.moveTo(handle.start,index,true);});if(!isNaN(this.options.startValue)) +this.moveTo(this.options.startValue,0,true);this.previousHandle=$(this.handle[0]);if(this.handle.length==2&&this.options.range)this.createRange();},initBoundaries:function(){var element=this.element[0],o=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};$.extend(o,{axis:o.axis||(element.offsetWidth').addClass('ui-slider-range').css({position:'absolute'}).appendTo(this.element);this.updateRange();},removeRange:function(){this.rangeElement.remove();this.rangeElement=null;},updateRange:function(){var prop=this.options.axis=="vertical"?"top":"left";var size=this.options.axis=="vertical"?"height":"width";this.rangeElement.css(prop,(parseInt($(this.handle[0]).css(prop),10)||0)+this.handleSize(0,this.options.axis=="vertical"?"y":"x")/2);this.rangeElement.css(size,(parseInt($(this.handle[1]).css(prop),10)||0)-(parseInt($(this.handle[0]).css(prop),10)||0));},getRange:function(){return this.rangeElement?this.convertValue(parseInt(this.rangeElement.css(this.options.axis=="vertical"?"height":"width"),10),this.options.axis=="vertical"?"y":"x"):null;},handleIndex:function(){return this.handle.index(this.currentHandle[0]);},value:function(handle,axis){if(this.handle.length==1)this.currentHandle=this.handle;if(!axis)axis=this.options.axis=="vertical"?"y":"x";var curHandle=$(handle!=undefined&&handle!==null?this.handle[handle]||handle:this.currentHandle);if(curHandle.data("mouse").sliderValue){return parseInt(curHandle.data("mouse").sliderValue[axis],10);}else{return parseInt(((parseInt(curHandle.css(axis=="x"?"left":"top"),10)/(this.actualSize[axis=="x"?"width":"height"]-this.handleSize(handle,axis)))*this.options.realMax[axis])+this.options.min[axis],10);}},convertValue:function(value,axis){return this.options.min[axis]+(value/(this.actualSize[axis=="x"?"width":"height"]-this.handleSize(null,axis)))*this.options.realMax[axis];},translateValue:function(value,axis){return((value-this.options.min[axis])/this.options.realMax[axis])*(this.actualSize[axis=="x"?"width":"height"]-this.handleSize(null,axis));},translateRange:function(value,axis){if(this.rangeElement){if(this.currentHandle[0]==this.handle[0]&&value>=this.translateValue(this.value(1),axis)) +value=this.translateValue(this.value(1,axis)-this.oneStep(axis),axis);if(this.currentHandle[0]==this.handle[1]&&value<=this.translateValue(this.value(0),axis)) +value=this.translateValue(this.value(0,axis)+this.oneStep(axis),axis);} +if(this.options.handles){var handle=this.options.handles[this.handleIndex()];if(valuethis.translateValue(handle.max,axis)){value=this.translateValue(handle.max,axis);}} +return value;},translateLimits:function(value,axis){if(value>=this.actualSize[axis=="x"?"width":"height"]-this.handleSize(null,axis)) +value=this.actualSize[axis=="x"?"width":"height"]-this.handleSize(null,axis);if(value<=0) +value=0;return value;},handleSize:function(handle,axis){return $(handle!=undefined&&handle!==null?this.handle[handle]:this.currentHandle)[0]["offset"+(axis=="x"?"Width":"Height")];},oneStep:function(axis){return this.options.stepping[axis]||1;},start:function(e,handle){var o=this.options;if(o.disabled)return false;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(!this.currentHandle) +this.focus(this.previousHandle,true);this.offset=this.element.offset();this.handleOffset=this.currentHandle.offset();this.clickOffset={top:e.pageY-this.handleOffset.top,left:e.pageX-this.handleOffset.left};this.firstValue=this.value();this.propagate('start',e);this.drag(e,handle);return true;},stop:function(e){this.propagate('stop',e);if(this.firstValue!=this.value()) +this.propagate('change',e);this.focus(this.currentHandle,true);return false;},drag:function(e,handle){var o=this.options;var position={top:e.pageY-this.offset.top-this.clickOffset.top,left:e.pageX-this.offset.left-this.clickOffset.left};if(!this.currentHandle)this.focus(this.previousHandle,true);position.left=this.translateLimits(position.left,"x");position.top=this.translateLimits(position.top,"y");if(o.stepping.x){var value=this.convertValue(position.left,"x");value=Math.round(value/o.stepping.x)*o.stepping.x;position.left=this.translateValue(value,"x");} +if(o.stepping.y){var value=this.convertValue(position.top,"y");value=Math.round(value/o.stepping.y)*o.stepping.y;position.top=this.translateValue(value,"y");} +position.left=this.translateRange(position.left,"x");position.top=this.translateRange(position.top,"y");if(o.axis!="vertical")this.currentHandle.css({left:position.left});if(o.axis!="horizontal")this.currentHandle.css({top:position.top});this.currentHandle.data("mouse").sliderValue={x:Math.round(this.convertValue(position.left,"x"))||0,y:Math.round(this.convertValue(position.top,"y"))||0};if(this.rangeElement) +this.updateRange();this.propagate('slide',e);return false;},moveTo:function(value,handle,noPropagation){var o=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(handle==undefined&&!this.currentHandle&&this.handle.length!=1) +return false;if(handle==undefined&&!this.currentHandle) +handle=0;if(handle!=undefined) +this.currentHandle=this.previousHandle=$(this.handle[handle]||handle);if(value.x!==undefined&&value.y!==undefined){var x=value.x,y=value.y;}else{var x=value,y=value;} +if(x!==undefined&&x.constructor!=Number){var me=/^\-\=/.test(x),pe=/^\+\=/.test(x);if(me||pe){x=this.value(null,"x")+parseInt(x.replace(me?'=':'+=',''),10);}else{x=isNaN(parseInt(x,10))?undefined:parseInt(x,10);}} +if(y!==undefined&&y.constructor!=Number){var me=/^\-\=/.test(y),pe=/^\+\=/.test(y);if(me||pe){y=this.value(null,"y")+parseInt(y.replace(me?'=':'+=',''),10);}else{y=isNaN(parseInt(y,10))?undefined:parseInt(y,10);}} +if(o.axis!="vertical"&&x!==undefined){if(o.stepping.x)x=Math.round(x/o.stepping.x)*o.stepping.x;x=this.translateValue(x,"x");x=this.translateLimits(x,"x");x=this.translateRange(x,"x");this.currentHandle.css({left:x});} +if(o.axis!="horizontal"&&y!==undefined){if(o.stepping.y)y=Math.round(y/o.stepping.y)*o.stepping.y;y=this.translateValue(y,"y");y=this.translateLimits(y,"y");y=this.translateRange(y,"y");this.currentHandle.css({top:y});} +if(this.rangeElement) +this.updateRange();this.currentHandle.data("mouse").sliderValue={x:Math.round(this.convertValue(x,"x"))||0,y:Math.round(this.convertValue(y,"y"))||0};if(!noPropagation){this.propagate('start',null);this.propagate('stop',null);this.propagate('change',null);this.propagate("slide",null);}}});$.ui.slider.getter="value";$.ui.slider.defaults={handle:".ui-slider-handle",distance:1};})(jQuery);;(function($){$.effects=$.effects||{};$.extend($.effects,{save:function(el,set){for(var i=0;i');var wrapper=el.parent();if(el.css('position')=='static'){wrapper.css({position:'relative'});el.css({position:'relative'});}else{var top=parseInt(el.css('top'),10);if(isNaN(top))top='auto';var left=parseInt(el.css('left'),10);if(isNaN(left))left='auto';wrapper.css({position:el.css('position'),top:top,left:left,zIndex:el.css('z-index')}).show();el.css({position:'relative',top:0,left:0});} +wrapper.css(props);return wrapper;},removeWrapper:function(el){if(el.parent().attr('id')=='fxWrapper') +return el.parent().replaceWith(el);return el;},setTransition:function(el,list,factor,val){val=val||{};$.each(list,function(i,x){unit=el.cssUnit(x);if(unit[0]>0)val[x]=unit[0]*factor+unit[1];});return val;},animateClass:function(value,duration,easing,callback){var cb=(typeof easing=="function"?easing:(callback?callback:null));var ea=(typeof easing=="object"?easing:null);return this.each(function(){var offset={};var that=$(this);var oldStyleAttr=that.attr("style")||'';if(typeof oldStyleAttr=='object')oldStyleAttr=oldStyleAttr["cssText"];if(value.toggle){that.hasClass(value.toggle)?value.remove=value.toggle:value.add=value.toggle;} +var oldStyle=$.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(value.add)that.addClass(value.add);if(value.remove)that.removeClass(value.remove);var newStyle=$.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(value.add)that.removeClass(value.add);if(value.remove)that.addClass(value.remove);for(var n in newStyle){if(typeof newStyle[n]!="function"&&newStyle[n]&&n.indexOf("Moz")==-1&&n.indexOf("length")==-1&&newStyle[n]!=oldStyle[n]&&(n.match(/color/i)||(!n.match(/color/i)&&!isNaN(parseInt(newStyle[n],10))))&&(oldStyle.position!="static"||(oldStyle.position=="static"&&!n.match(/left|top|bottom|right/))))offset[n]=newStyle[n];} +that.animate(offset,duration,ea,function(){if(typeof $(this).attr("style")=='object'){$(this).attr("style")["cssText"]="";$(this).attr("style")["cssText"]=oldStyleAttr;}else $(this).attr("style",oldStyleAttr);if(value.add)$(this).addClass(value.add);if(value.remove)$(this).removeClass(value.remove);if(cb)cb.apply(this,arguments);});});}});$.fn.extend({_show:$.fn.show,_hide:$.fn.hide,__toggle:$.fn.toggle,_addClass:$.fn.addClass,_removeClass:$.fn.removeClass,_toggleClass:$.fn.toggleClass,effect:function(fx,o,speed,callback){return $.effects[fx]?$.effects[fx].call(this,{method:fx,options:o||{},duration:speed,callback:callback}):null;},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))) +return this._show.apply(this,arguments);else{var o=arguments[1]||{};o['mode']='show';return this.effect.apply(this,[arguments[0],o,arguments[2]||o.duration,arguments[3]||o.callback]);}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))) +return this._hide.apply(this,arguments);else{var o=arguments[1]||{};o['mode']='hide';return this.effect.apply(this,[arguments[0],o,arguments[2]||o.duration,arguments[3]||o.callback]);}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))||(arguments[0].constructor==Function)) +return this.__toggle.apply(this,arguments);else{var o=arguments[1]||{};o['mode']='toggle';return this.effect.apply(this,[arguments[0],o,arguments[2]||o.duration,arguments[3]||o.callback]);}},addClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.apply(this,[{add:classNames},speed,easing,callback]):this._addClass(classNames);},removeClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.apply(this,[{remove:classNames},speed,easing,callback]):this._removeClass(classNames);},toggleClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.apply(this,[{toggle:classNames},speed,easing,callback]):this._toggleClass(classNames);},morph:function(remove,add,speed,easing,callback){return $.effects.animateClass.apply(this,[{add:add,remove:remove},speed,easing,callback]);},switchClass:function(){return this.morph.apply(this,arguments);},cssUnit:function(key){var style=this.css(key),val=[];$.each(['em','px','%','pt'],function(i,unit){if(style.indexOf(unit)>0) +val=[parseFloat(style),unit];});return val;}});jQuery.each(['backgroundColor','borderBottomColor','borderLeftColor','borderRightColor','borderTopColor','color','outlineColor'],function(i,attr){jQuery.fx.step[attr]=function(fx){if(fx.state==0){fx.start=getColor(fx.elem,attr);fx.end=getRGB(fx.end);} +fx.elem.style[attr]="rgb("+[Math.max(Math.min(parseInt((fx.pos*(fx.end[0]-fx.start[0]))+fx.start[0]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[1]-fx.start[1]))+fx.start[1]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[2]-fx.start[2]))+fx.start[2]),255),0)].join(",")+")";}});function getRGB(color){var result;if(color&&color.constructor==Array&&color.length==3) +return color;if(result=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color)) +return[parseInt(result[1]),parseInt(result[2]),parseInt(result[3])];if(result=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color)) +return[parseFloat(result[1])*2.55,parseFloat(result[2])*2.55,parseFloat(result[3])*2.55];if(result=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color)) +return[parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)];if(result=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color)) +return[parseInt(result[1]+result[1],16),parseInt(result[2]+result[2],16),parseInt(result[3]+result[3],16)];if(result=/rgba\(0, 0, 0, 0\)/.exec(color)) +return colors['transparent'] +return colors[jQuery.trim(color).toLowerCase()];} +function getColor(elem,attr){var color;do{color=jQuery.curCSS(elem,attr);if(color!=''&&color!='transparent'||jQuery.nodeName(elem,"body")) +break;attr="backgroundColor";}while(elem=elem.parentNode);return getRGB(color);};var colors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else +return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value===undefined)return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else +return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else +selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else +this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else +return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else +jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}function now(){return+new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==i){target=this;--i;}for(;i-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else +jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&style&&style[name])ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)stack.unshift(a);for(;i]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("",""]||!tags.indexOf("",""]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!tags.indexOf("",""]||(!tags.indexOf("",""]||!tags.indexOf("",""]||jQuery.browser.msie&&[1,"div
","
"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf(""&&tags.indexOf("=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else +ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(name in elem&¬xml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))return elem.getAttributeNode(name).nodeValue;return elem[name];}if(msie&¬xml&&name=="style")return jQuery.attr(elem.style,"cssText",value);if(set)elem.setAttribute(name,""+value);var attr=msie&¬xml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)ret[0]=array;else +while(i)ret[--i]=array[i];}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return im[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else +for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}data[0].type=type;if(exclusive)data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}return val;},fix:function(event){if(event[expando]==true)return event;var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("
").append(res.responseText.replace(//g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username)xhr.open(type,s.url,s.async,s.username,s.password);else +xhr.open(type,s.url,s.async);try{if(s.data)xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}if(s.global)jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else +jQuery.handleError(s,xhr,status);complete();if(s.async)xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xhr){xhr.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xhr,s]);}function complete(){if(s.complete)s.complete(xhr,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(filter)data=filter(data,type);if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else +for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else +s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return opt.complete.call(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else +e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.call(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));}return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].call(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;ithis.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done)this.options.complete.call(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&css(offsetParent,"position")=="fixed")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}return results;};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br);};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+num(this,"border"+tl+"Width")+num(this,"border"+br+"Width")+(margin?num(this,"margin"+tl)+num(this,"margin"+br):0);};});})(); \ No newline at end of file diff --git a/vendor/plugins/jrails/javascripts/jrails.js b/vendor/plugins/jrails/javascripts/jrails.js new file mode 100644 index 0000000..85da8c2 --- /dev/null +++ b/vendor/plugins/jrails/javascripts/jrails.js @@ -0,0 +1,128 @@ +(function($){$().ajaxSend(function(a,xhr,s){xhr.setRequestHeader("Accept","text/javascript, text/html, application/xml, text/xml, */*")})})(jQuery);(function($){$.fn.reset=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};$.fn.enable=function(){return this.each(function(){this.disabled=false})};$.fn.disable=function(){return this.each(function(){this.disabled=true})}})(jQuery);(function($){$.extend({fieldEvent:function(el,obs){var field=el[0]||el,e="change";if(field.type=="radio"||field.type=="checkbox"){e="click"}else{if(obs&&field.type=="text"||field.type=="textarea"){e="keyup"}}return e}});$.fn.extend({delayedObserver:function(delay,callback){var el=$(this);if(typeof window.delayedObserverStack=="undefined"){window.delayedObserverStack=[]}if(typeof window.delayedObserverCallback=="undefined"){window.delayedObserverCallback=function(stackPos){observed=window.delayedObserverStack[stackPos];if(observed.timer){clearTimeout(observed.timer)}observed.timer=setTimeout(function(){observed.timer=null;observed.callback(observed.obj,observed.obj.formVal())},observed.delay*1000);observed.oldVal=observed.obj.formVal()}}window.delayedObserverStack.push({obj:el,timer:null,delay:delay,oldVal:el.formVal(),callback:callback});var stackPos=window.delayedObserverStack.length-1;if(el[0].tagName=="FORM"){$(":input",el).each(function(){var field=$(this);field.bind($.fieldEvent(field,delay),function(){observed=window.delayedObserverStack[stackPos];if(observed.obj.formVal()==observed.obj.oldVal){return}else{window.delayedObserverCallback(stackPos)}})})}else{el.bind($.fieldEvent(el,delay),function(){observed=window.delayedObserverStack[stackPos];if(observed.obj.formVal()==observed.obj.oldVal){return}else{window.delayedObserverCallback(stackPos)}})}},formVal:function(){var el=this[0];if(el.tagName=="FORM"){return this.serialize()}if(el.type=="checkbox"||self.type=="radio"){return this.filter("input:checked").val()||""}else{return this.val()}}})})(jQuery);(function($){$.fn.extend({visualEffect:function(o){e=o.replace(/\_(.)/g,function(m,l){return l.toUpperCase()});return eval("$(this)."+e+"()")},appear:function(speed,callback){return this.fadeIn(speed,callback)},blindDown:function(speed,callback){return this.show("blind",{direction:"vertical"},speed,callback)},blindUp:function(speed,callback){return this.hide("blind",{direction:"vertical"},speed,callback)},blindRight:function(speed,callback){return this.show("blind",{direction:"horizontal"},speed,callback)},blindLeft:function(speed,callback){this.hide("blind",{direction:"horizontal"},speed,callback);return this},dropOut:function(speed,callback){return this.hide("drop",{direction:"down"},speed,callback)},dropIn:function(speed,callback){return this.show("drop",{direction:"up"},speed,callback)},fade:function(speed,callback){return this.fadeOut(speed,callback)},fadeToggle:function(speed,callback){return this.animate({opacity:"toggle"},speed,callback)},fold:function(speed,callback){return this.hide("fold",{},speed,callback)},foldOut:function(speed,callback){return this.show("fold",{},speed,callback)},grow:function(speed,callback){return this.show("scale",{},speed,callback)},highlight:function(speed,callback){return this.show("highlight",{},speed,callback)},puff:function(speed,callback){return this.hide("puff",{},speed,callback)},pulsate:function(speed,callback){return this.show("pulsate",{},speed,callback)},shake:function(speed,callback){return this.show("shake",{},speed,callback)},shrink:function(speed,callback){return this.hide("scale",{},speed,callback)},squish:function(speed,callback){return this.hide("scale",{origin:["top","left"]},speed,callback)},slideUp:function(speed,callback){return this.hide("slide",{direction:"up"},speed,callback)},slideDown:function(speed,callback){return this.show("slide",{direction:"up"},speed,callback)},switchOff:function(speed,callback){return this.hide("clip",{},speed,callback)},switchOn:function(speed,callback){return this.show("clip",{},speed,callback)}})})(jQuery); + +jQuery(function ($) { + var csrf_token = $('meta[name=csrf-token]').attr('content'), + csrf_param = $('meta[name=csrf-param]').attr('content'); + + $.fn.extend({ + /** + * Triggers a custom event on an element and returns the event result + * this is used to get around not being able to ensure callbacks are placed + * at the end of the chain. + * + * TODO: deprecate with jQuery 1.4.2 release, in favor of subscribing to our + * own events and placing ourselves at the end of the chain. + */ + triggerAndReturn: function (name, data) { + var event = new $.Event(name); + this.trigger(event, data); + + return event.result !== false; + }, + + /** + * Handles execution of remote calls firing overridable events along the way + */ + callRemote: function () { + var el = this, + data = el.is('form') ? el.serializeArray() : [], + method = el.attr('method') || el.attr('data-method') || 'GET', + url = el.attr('action') || el.attr('href'); + + if (url === undefined) { + throw "No URL specified for remote call (action or href must be present)."; + } else { + if (el.triggerAndReturn('ajax:before')) { + $.ajax({ + url: url, + data: data, + dataType: 'script', + type: method.toUpperCase(), + beforeSend: function (xhr) { + el.trigger('ajax:loading', xhr); + }, + success: function (data, status, xhr) { + el.trigger('ajax:success', [data, status, xhr]); + }, + complete: function (xhr) { + el.trigger('ajax:complete', xhr); + }, + error: function (xhr, status, error) { + el.trigger('ajax:failure', [xhr, status, error]); + } + }); + } + + el.trigger('ajax:after'); + } + } + }); + + /** + * confirmation handler + */ + $('a[data-confirm],input[data-confirm]').live('click', function () { + var el = $(this); + if (el.triggerAndReturn('confirm')) { + if (!confirm(el.attr('data-confirm'))) { + return false; + } + } + }); + + + /** + * remote handlers + */ + $('form[data-remote]').live('submit', function (e) { + $(this).callRemote(); + e.preventDefault(); + }); + + $('a[data-remote],input[data-remote]').live('click', function (e) { + $(this).callRemote(); + e.preventDefault(); + }); + + $('a[data-method]:not([data-remote])').live('click', function (e){ + var link = $(this), + href = link.attr('href'), + method = link.attr('data-method'), + form = $('
'), + metadata_input = ''; + + if (csrf_param != null && csrf_token != null) { + metadata_input += ''; + } + + form.hide() + .append(metadata_input) + .appendTo('body'); + + e.preventDefault(); + form.submit(); + }); + + /** + * disable-with handlers + */ + var disable_with_input_selector = 'input[data-disable-with]'; + var disable_with_form_selector = 'form[data-remote]:has(' + disable_with_input_selector + ')'; + + $(disable_with_form_selector).live('ajax:before', function () { + $(this).find(disable_with_input_selector).each(function () { + var input = $(this); + input.data('enable-with', input.val()) + .attr('value', input.attr('data-disable-with')) + .attr('disabled', 'disabled'); + }); + }); + + $(disable_with_form_selector).live('ajax:after', function () { + $(this).find(disable_with_input_selector).each(function () { + var input = $(this); + input.removeAttr('disabled') + .val(input.data('enable-with')); + }); + }); +}); \ No newline at end of file diff --git a/vendor/plugins/jrails/javascripts/sources/jrails.js b/vendor/plugins/jrails/javascripts/sources/jrails.js new file mode 100644 index 0000000..f2d5b93 --- /dev/null +++ b/vendor/plugins/jrails/javascripts/sources/jrails.js @@ -0,0 +1,194 @@ +/* +* +* jRails ajax extras +* version 0.1 +* | http://www.ennerchi.com +* +*/ + +(function($) { + $().ajaxSend(function(a, xhr, s){ //Set request headers globally + xhr.setRequestHeader("Accept", "text/javascript, text/html, application/xml, text/xml, */*"); + }); +})(jQuery); + + +/* +* +* jRails form extras +* | http://www.ennerchi.com +* +*/ + + +(function($) { + // reset a form + $.fn.reset = function() { + return this.each(function() { + // guard against an input with the name of 'reset' + // note that IE reports the reset function as an 'object' + if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType)) + this.reset(); + }); + }; + // enable a form element + $.fn.enable = function() { + return this.each(function() { + this.disabled = false; + }); + }; + // disable a form element + $.fn.disable = function() { + return this.each(function() { + this.disabled = true; + }); + }; + +})(jQuery); + +/* +* +* jRails form observer plugin +* version 0.2 +* | http://www.ennerchi.com +* +*/ + +(function($) { + $.extend({ // Translate field to event + fieldEvent: function(el, obs) { + var field = el[0] || el, e = 'change'; + if (field.type == 'radio' || field.type == 'checkbox') e = 'click'; + else if (obs && field.type == 'text' || field.type == 'textarea') e = 'keyup'; + return e; + } + }); + $.fn.extend({ // Delayed observer for fields and forms + delayedObserver: function(delay, callback){ + var el = $(this); + if (typeof window.delayedObserverStack == 'undefined') window.delayedObserverStack = []; + if (typeof window.delayedObserverCallback == 'undefined') { + window.delayedObserverCallback = function(stackPos) { + var observed = window.delayedObserverStack[stackPos]; + if (observed.timer) clearTimeout(observed.timer); + observed.timer = setTimeout(function(){ + observed.timer = null; + observed.callback(observed.obj, observed.obj.formVal()); + }, observed.delay * 1000); + observed.oldVal = observed.obj.formVal(); + }; + } + window.delayedObserverStack.push({ + obj: el, timer: null, delay: delay, + oldVal: el.formVal(), callback: callback + }); + var stackPos = window.delayedObserverStack.length-1; + if (el[0].tagName == 'FORM') { + $(':input', el).each(function(){ + var field = $(this); + field.bind($.fieldEvent(field, delay), function(){ + var observed = window.delayedObserverStack[stackPos]; + if (observed.obj.formVal() == observed.oldVal) return; + else window.delayedObserverCallback(stackPos); + }); + }); + } else { + el.bind($.fieldEvent(el, delay), function(){ + var observed = window.delayedObserverStack[stackPos]; + if (observed.obj.formVal() == observed.oldVal) return; + else window.delayedObserverCallback(stackPos); + }); + }; + }, + formVal: function() { // Gets form values + var el = this[0]; + if(el.tagName == 'FORM') return this.serialize(); + if(el.type == 'checkbox' || el.type == 'radio') return this.filter('input:checked').val() || ''; + else return this.val(); + } + }); +})(jQuery); + +/* +* +* jRails visual effects stubs +* version 0.2 +* | http://www.ennerchi.com +* +*/ + +(function($) { + $.fn.extend({ + visualEffect : function(o) { + e = o.replace(/\_(.)/g, function(m, l){return l.toUpperCase()}); + return eval('$(this).'+e+'()'); + }, + appear : function(speed, callback) { + return this.fadeIn(speed, callback); + }, + blindDown : function(speed, callback) { + return this.show('blind', { direction: 'vertical' }, speed, callback); + }, + blindUp : function(speed, callback) { + return this.hide('blind', { direction: 'vertical' }, speed, callback); + }, + blindRight : function(speed, callback) { + return this.show('blind', { direction: 'horizontal' }, speed, callback); + }, + blindLeft : function(speed, callback) { + this.hide('blind', { direction: 'horizontal' }, speed, callback); + return this; + }, + dropOut : function(speed, callback) { + return this.hide('drop', {direction: 'down' }, speed, callback); + }, + dropIn : function(speed, callback) { + return this.show('drop', { direction: 'up' }, speed, callback); + }, + fade : function(speed, callback) { + return this.fadeOut(speed, callback); + }, + fadeToggle : function(speed, callback) { + return this.animate({opacity: 'toggle'}, speed, callback); + }, + fold : function(speed, callback) { + return this.hide('fold', {}, speed, callback); + }, + foldOut : function(speed, callback) { + return this.show('fold', {}, speed, callback); + }, + grow : function(speed, callback) { + return this.show('scale', {}, speed, callback); + }, + highlight : function(speed, callback) { + return this.show('highlight', {}, speed, callback); + }, + puff : function(speed, callback) { + return this.hide('puff', {}, speed, callback); + }, + pulsate : function(speed, callback) { + return this.show('pulsate', {}, speed, callback); + }, + shake : function(speed, callback) { + return this.show('shake', {}, speed, callback); + }, + shrink : function(speed, callback) { + return this.hide('scale', {}, speed, callback); + }, + squish : function(speed, callback) { + return this.hide('scale', { origin: ['top', 'left'] }, speed, callback); + }, + slideUp : function(speed, callback) { + return this.hide('slide', { direction: 'up'}, speed, callback); + }, + slideDown : function(speed, callback) { + return this.show('slide', { direction: 'up'}, speed, callback); + }, + switchOff : function(speed, callback) { + return this.hide('clip', {}, speed, callback); + }, + switchOn : function(speed, callback) { + return this.show('clip', {}, speed, callback); + } + }); +})(jQuery); diff --git a/vendor/plugins/jrails/lib/jrails.rb b/vendor/plugins/jrails/lib/jrails.rb new file mode 100644 index 0000000..72d01ac --- /dev/null +++ b/vendor/plugins/jrails/lib/jrails.rb @@ -0,0 +1,406 @@ +module ActionView + module Helpers + + module JavaScriptHelper + + # This function can be used to render rjs inline + # + # <%= javascript_function do |page| + # page.replace_html :list, :partial => 'list', :object => @list + # end %> + # + def javascript_function(*args, &block) + html_options = args.extract_options! + function = args[0] || '' + + html_options.symbolize_keys! + function = update_page(&block) if block_given? + javascript_tag(function) + end + + def jquery_id(id) + id.to_s.count('#.*,>+~:[/ ') == 0 ? "##{id}" : id + end + + def jquery_ids(ids) + Array(ids).map{|id| jquery_id(id)}.join(',') + end + + end + + module PrototypeHelper + + unless const_defined? :JQUERY_VAR + JQUERY_VAR = '$' + end + + unless const_defined? :JQCALLBACKS + JQCALLBACKS = Set.new([ :beforeSend, :complete, :error, :success ] + (100..599).to_a) + AJAX_OPTIONS = Set.new([ :before, :after, :condition, :url, + :asynchronous, :method, :insertion, :position, + :form, :with, :update, :script ]).merge(JQCALLBACKS) + end + + def periodically_call_remote(options = {}) + frequency = options[:frequency] || 10 # every ten seconds by default + code = "setInterval(function() {#{remote_function(options)}}, #{frequency} * 1000)" + javascript_tag(code) + end + + def remote_function(options) + javascript_options = options_for_ajax(options) + + update = '' + if options[:update] && options[:update].is_a?(Hash) + update = [] + update << "success:'#{options[:update][:success]}'" if options[:update][:success] + update << "failure:'#{options[:update][:failure]}'" if options[:update][:failure] + update = '{' + update.join(',') + '}' + elsif options[:update] + update << "'#{options[:update]}'" + end + + function = "#{JQUERY_VAR}.ajax(#{javascript_options})" + + function = "#{options[:before]}; #{function}" if options[:before] + function = "#{function}; #{options[:after]}" if options[:after] + function = "if (#{options[:condition]}) { #{function}; }" if options[:condition] + function = "if (confirm('#{escape_javascript(options[:confirm])}')) { #{function}; }" if options[:confirm] + return function + end + + class JavaScriptGenerator + module GeneratorMethods + + def insert_html(position, id, *options_for_render) + insertion = position.to_s.downcase + insertion = 'append' if insertion == 'bottom' + insertion = 'prepend' if insertion == 'top' + call "#{JQUERY_VAR}(\"#{jquery_id(id)}\").#{insertion}", render(*options_for_render) + end + + def replace_html(id, *options_for_render) + insert_html(:html, id, *options_for_render) + end + + def replace(id, *options_for_render) + call "#{JQUERY_VAR}(\"#{jquery_id(id)}\").replaceWith", render(*options_for_render) + end + + def remove(*ids) + call "#{JQUERY_VAR}(\"#{jquery_ids(ids)}\").remove" + end + + def show(*ids) + call "#{JQUERY_VAR}(\"#{jquery_ids(ids)}\").show" + end + + def hide(*ids) + call "#{JQUERY_VAR}(\"#{jquery_ids(ids)}\").hide" + end + + def toggle(*ids) + call "#{JQUERY_VAR}(\"#{jquery_ids(ids)}\").toggle" + end + + def jquery_id(id) + id.to_s.count('#.*,>+~:[/ ') == 0 ? "##{id}" : id + end + + def jquery_ids(ids) + Array(ids).map{|id| jquery_id(id)}.join(',') + end + + end + end + + protected + def options_for_ajax(options) + js_options = build_callbacks(options) + + url_options = options[:url] + url_options = url_options.merge(:escape => false) if url_options.is_a?(Hash) + js_options['url'] = "'#{url_for(url_options)}'" + js_options['async'] = false if options[:type] == :synchronous + js_options['type'] = options[:method] ? method_option_to_s(options[:method]) : ( options[:form] ? "'post'" : nil ) + js_options['dataType'] = options[:datatype] ? "'#{options[:datatype]}'" : (options[:update] ? nil : "'script'") + + if options[:form] + js_options['data'] = "#{JQUERY_VAR}.param(#{JQUERY_VAR}(this).serializeArray())" + elsif options[:submit] + js_options['data'] = "#{JQUERY_VAR}(\"##{options[:submit]} :input\").serialize()" + elsif options[:with] + js_options['data'] = options[:with].gsub("Form.serialize(this.form)","#{JQUERY_VAR}.param(#{JQUERY_VAR}(this.form).serializeArray())") + end + + js_options['type'] ||= "'post'" + if options[:method] + if method_option_to_s(options[:method]) == "'put'" || method_option_to_s(options[:method]) == "'delete'" + js_options['type'] = "'post'" + if js_options['data'] + js_options['data'] << " + '&" + else + js_options['data'] = "'" + end + js_options['data'] << "_method=#{options[:method]}'" + end + end + + if respond_to?('protect_against_forgery?') && protect_against_forgery? + if js_options['data'] + js_options['data'] << " + '&" + else + js_options['data'] = "'" + end + js_options['data'] << "#{request_forgery_protection_token}=' + encodeURIComponent('#{escape_javascript form_authenticity_token}')" + end + js_options['data'] = "''" if js_options['type'] == "'post'" && js_options['data'].nil? + options_for_javascript(js_options.reject {|key, value| value.nil?}) + end + + def build_update_for_success(html_id, insertion=nil) + insertion = build_insertion(insertion) + "#{JQUERY_VAR}('#{jquery_id(html_id)}').#{insertion}(request);" + end + + def build_update_for_error(html_id, insertion=nil) + insertion = build_insertion(insertion) + "#{JQUERY_VAR}('#{jquery_id(html_id)}').#{insertion}(request.responseText);" + end + + def build_insertion(insertion) + insertion = insertion ? insertion.to_s.downcase : 'html' + insertion = 'append' if insertion == 'bottom' + insertion = 'prepend' if insertion == 'top' + insertion + end + + def build_observer(klass, name, options = {}) + if options[:with] && (options[:with] !~ /[\{=(.]/) + options[:with] = "'#{options[:with]}=' + value" + else + options[:with] ||= 'value' unless options[:function] + end + + callback = options[:function] || remote_function(options) + javascript = "#{JQUERY_VAR}('#{jquery_id(name)}').delayedObserver(" + javascript << "#{options[:frequency] || 0}, " + javascript << "function(element, value) {" + javascript << "#{callback}}" + #javascript << ", '#{options[:on]}'" if options[:on] + javascript << ")" + javascript_tag(javascript) + end + + def build_callbacks(options) + callbacks = {} + options[:beforeSend] = ''; + [:uninitialized,:loading,:loaded].each do |key| + options[:beforeSend] << (options[key].last == ';' ? options.delete(key) : options.delete(key) << ';') if options[key] + end + options.delete(:beforeSend) if options[:beforeSend].blank? + options[:error] = options.delete(:failure) if options[:failure] + if options[:update] + if options[:update].is_a?(Hash) + options[:update][:error] = options[:update].delete(:failure) if options[:update][:failure] + if options[:update][:success] + options[:success] = build_update_for_success(options[:update][:success], options[:position]) << (options[:success] ? options[:success] : '') + end + if options[:update][:error] + options[:error] = build_update_for_error(options[:update][:error], options[:position]) << (options[:error] ? options[:error] : '') + end + else + options[:success] = build_update_for_success(options[:update], options[:position]) << (options[:success] ? options[:success] : '') + end + end + options.each do |callback, code| + if JQCALLBACKS.include?(callback) + callbacks[callback] = "function(request){#{code}}" + end + end + callbacks + end + + end + + class JavaScriptElementProxy < JavaScriptProxy #:nodoc: + + unless const_defined? :JQUERY_VAR + JQUERY_VAR = ActionView::Helpers::PrototypeHelper::JQUERY_VAR + end + + def initialize(generator, id) + id = id.to_s.count('#.*,>+~:[/ ') == 0 ? "##{id}" : id + @id = id + super(generator, "#{JQUERY_VAR}(\"#{id}\")") + end + + def replace_html(*options_for_render) + call 'html', @generator.send(:render, *options_for_render) + end + + def replace(*options_for_render) + call 'replaceWith', @generator.send(:render, *options_for_render) + end + + def value() + call 'val()' + end + + def value=(value) + call 'val', value + end + + end + + class JavaScriptElementCollectionProxy < JavaScriptCollectionProxy #:nodoc:\ + + unless const_defined? :JQUERY_VAR + JQUERY_VAR = ActionView::Helpers::PrototypeHelper::JQUERY_VAR + end + + def initialize(generator, pattern) + super(generator, "#{JQUERY_VAR}(#{pattern.to_json})") + end + end + + module ScriptaculousHelper + + unless const_defined? :JQUERY_VAR + JQUERY_VAR = ActionView::Helpers::PrototypeHelper::JQUERY_VAR + end + + unless const_defined? :SCRIPTACULOUS_EFFECTS + SCRIPTACULOUS_EFFECTS = { + :appear => {:method => 'fadeIn'}, + :blind_down => {:method => 'blind', :mode => 'show', :options => {:direction => 'vertical'}}, + :blind_up => {:method => 'blind', :mode => 'hide', :options => {:direction => 'vertical'}}, + :blind_right => {:method => 'blind', :mode => 'show', :options => {:direction => 'horizontal'}}, + :blind_left => {:method => 'blind', :mode => 'hide', :options => {:direction => 'horizontal'}}, + :bounce_in => {:method => 'bounce', :mode => 'show', :options => {:direction => 'up'}}, + :bounce_out => {:method => 'bounce', :mode => 'hide', :options => {:direction => 'up'}}, + :drop_in => {:method => 'drop', :mode => 'show', :options => {:direction => 'up'}}, + :drop_out => {:method => 'drop', :mode => 'hide', :options => {:direction => 'down'}}, + :fade => {:method => 'fadeOut'}, + :fold_in => {:method => 'fold', :mode => 'hide'}, + :fold_out => {:method => 'fold', :mode => 'show'}, + :grow => {:method => 'scale', :mode => 'show'}, + :shrink => {:method => 'scale', :mode => 'hide'}, + :slide_down => {:method => 'slide', :mode => 'show', :options => {:direction => 'up'}}, + :slide_up => {:method => 'slide', :mode => 'hide', :options => {:direction => 'up'}}, + :slide_right => {:method => 'slide', :mode => 'show', :options => {:direction => 'left'}}, + :slide_left => {:method => 'slide', :mode => 'hide', :options => {:direction => 'left'}}, + :squish => {:method => 'scale', :mode => 'hide', :options => {:origin => "['top','left']"}}, + :switch_on => {:method => 'clip', :mode => 'show', :options => {:direction => 'vertical'}}, + :switch_off => {:method => 'clip', :mode => 'hide', :options => {:direction => 'vertical'}}, + :toggle_appear => {:method => 'fadeToggle'}, + :toggle_slide => {:method => 'slide', :mode => 'toggle', :options => {:direction => 'up'}}, + :toggle_blind => {:method => 'blind', :mode => 'toggle', :options => {:direction => 'vertical'}}, + } + end + + def visual_effect(name, element_id = false, js_options = {}) + element = element_id ? element_id : "this" + + if SCRIPTACULOUS_EFFECTS.has_key? name.to_sym + effect = SCRIPTACULOUS_EFFECTS[name.to_sym] + name = effect[:method] + mode = effect[:mode] + js_options = js_options.merge(effect[:options]) if effect[:options] + end + + [:color, :direction].each do |option| + js_options[option] = "'#{js_options[option]}'" if js_options[option] + end + + if js_options.has_key? :duration + speed = js_options.delete :duration + speed = (speed * 1000).to_i unless speed.nil? + else + speed = js_options.delete :speed + end + + if ['fadeIn','fadeOut','fadeToggle'].include?(name) + javascript = "#{JQUERY_VAR}('#{jquery_id(element_id)}').#{name}(" + javascript << "#{speed}" unless speed.nil? + javascript << ");" + else + javascript = "#{JQUERY_VAR}('#{jquery_id(element_id)}').#{mode || 'effect'}('#{name}'" + javascript << ",#{options_for_javascript(js_options)}" unless speed.nil? && js_options.empty? + javascript << ",#{speed}" unless speed.nil? + javascript << ");" + end + + end + + def sortable_element_js(element_id, options = {}) #:nodoc: + #convert similar attributes + options[:handle] = ".#{options[:handle]}" if options[:handle] + if options[:tag] || options[:only] + options[:items] = "> " + options[:items] << options.delete(:tag) if options[:tag] + options[:items] << ".#{options.delete(:only)}" if options[:only] + end + options[:connectWith] = options.delete(:containment).map {|x| "##{x}"} if options[:containment] + options[:containment] = options.delete(:container) if options[:container] + options[:dropOnEmpty] = false unless options[:dropOnEmpty] + options[:helper] = "'clone'" if options[:ghosting] == true + options[:axis] = case options.delete(:constraint) + when "vertical" + "y" + when "horizontal" + "x" + when false + nil + when nil + "y" + end + options.delete(:axis) if options[:axis].nil? + options.delete(:overlap) + options.delete(:ghosting) + + if options[:onUpdate] || options[:url] + options[:with] ||= "#{JQUERY_VAR}(this).sortable('serialize',{key:'#{element_id}'})" + options[:onUpdate] ||= "function(){" + remote_function(options) + "}" + end + + options.delete_if { |key, value| PrototypeHelper::AJAX_OPTIONS.include?(key) } + options[:update] = options.delete(:onUpdate) if options[:onUpdate] + + [:axis, :cancel, :containment, :cursor, :handle, :tolerance, :items, :placeholder].each do |option| + options[option] = "'#{options[option]}'" if options[option] + end + + options[:connectWith] = array_or_string_for_javascript(options[:connectWith]) if options[:connectWith] + + %(#{JQUERY_VAR}('#{jquery_id(element_id)}').sortable(#{options_for_javascript(options)});) + end + + def draggable_element_js(element_id, options = {}) + %(#{JQUERY_VAR}("#{jquery_id(element_id)}").draggable(#{options_for_javascript(options)});) + end + + def drop_receiving_element_js(element_id, options = {}) + #convert similar options + options[:hoverClass] = options.delete(:hoverclass) if options[:hoverclass] + options[:drop] = options.delete(:onDrop) if options[:onDrop] + + if options[:drop] || options[:url] + options[:with] ||= "'id=' + encodeURIComponent(#{JQUERY_VAR}(ui.draggable).attr('id'))" + options[:drop] ||= "function(ev, ui){" + remote_function(options) + "}" + end + + options.delete_if { |key, value| PrototypeHelper::AJAX_OPTIONS.include?(key) } + + options[:accept] = array_or_string_for_javascript(options[:accept]) if options[:accept] + [:activeClass, :hoverClass, :tolerance].each do |option| + options[option] = "'#{options[option]}'" if options[option] + end + + %(#{JQUERY_VAR}('#{jquery_id(element_id)}').droppable(#{options_for_javascript(options)});) + end + + end + + end +end diff --git a/vendor/plugins/jrails/tasks/jrails.rake b/vendor/plugins/jrails/tasks/jrails.rake new file mode 100644 index 0000000..c6271ff --- /dev/null +++ b/vendor/plugins/jrails/tasks/jrails.rake @@ -0,0 +1,19 @@ +namespace :jrails do + namespace :update do + desc "Copies the jQuery and jRails javascripts to public/javascripts" + task :javascripts do + puts "Copying files..." + project_dir = RAILS_ROOT + '/public/javascripts/' + scripts = Dir[File.join(File.dirname(__FILE__), '..') + '/javascripts/*.js'] + FileUtils.cp(scripts, project_dir) + puts "files copied successfully." + end + end + + namespace :install do + desc "Installs the jQuery and jRails javascripts to public/javascripts" + task :javascripts do + Rake::Task['jrails:update:javascripts'].invoke + end + end +end