diff --git a/tracks/app/views/contexts/create.rjs b/tracks/app/views/contexts/create.rjs index ffcb013f..2948bde0 100644 --- a/tracks/app/views/contexts/create.rjs +++ b/tracks/app/views/contexts/create.rjs @@ -2,6 +2,7 @@ if @saved page.hide 'contexts-empty-nd' page.insert_html :bottom, "list-contexts", :partial => 'context_listing', :locals => { :context_listing => @context } page.sortable "list-contexts", get_listing_sortable_options + page.hide 'status' page.call "Form.reset", "context-form" page.call "Form.focusFirstElement", "context-form" else diff --git a/tracks/app/views/contexts/index.rhtml b/tracks/app/views/contexts/index.rhtml index 171f013f..1e99ad66 100644 --- a/tracks/app/views/contexts/index.rhtml +++ b/tracks/app/views/contexts/index.rhtml @@ -1,6 +1,6 @@
-
+

Currently there are no contexts

<%= render :partial => 'context_listing', :collection => @contexts %> @@ -8,20 +8,35 @@
- Create new context » -
- <% form_remote_tag :url => contexts_path, :method => :post, :html=> { :id => 'context-form', :name => 'context', :class => 'inline-form' } do -%> - -
<%= error_messages_for('context') %>
- -
- <%= text_field( "context", "name" ) %>
- - - <%= check_box( "context", "hide" ) %>
+
+ Create new context » +
+ <% form_remote_tag( + :url => contexts_path, + :method => :post, + :html=> { :id => 'context-form', :name => 'context', :class => 'inline-form'}, + :before => "$('context_new_submit').startWaiting()", + :complete => "$('context_new_submit').stopWaiting()", + :condition => "!$('context_new_submit').isWaiting()") do -%> - - <% end -%> +
<%= error_messages_for('context') %>
+ +
+ <%= text_field( "context", "name" ) %>
+ + + <%= check_box( "context", "hide" ) %>
+ +
+
+ +
+
+

+ <% end -%> +
<% diff --git a/tracks/app/views/layouts/standard.rhtml b/tracks/app/views/layouts/standard.rhtml index e96fb27f..3f7a913f 100644 --- a/tracks/app/views/layouts/standard.rhtml +++ b/tracks/app/views/layouts/standard.rhtml @@ -16,6 +16,8 @@ diff --git a/tracks/app/views/projects/create.rjs b/tracks/app/views/projects/create.rjs index 7deb4402..d2f81bab 100644 --- a/tracks/app/views/projects/create.rjs +++ b/tracks/app/views/projects/create.rjs @@ -1,6 +1,7 @@ if @saved and @go_to_project page.redirect_to project_path(@project) elsif @saved + page.hide 'status' page.hide 'projects-empty-nd' page.show 'list-active-projects-container' page.replace_html "active-projects-count", @active_projects_count diff --git a/tracks/app/views/projects/index.rhtml b/tracks/app/views/projects/index.rhtml index 6ab77f89..099bca6e 100644 --- a/tracks/app/views/projects/index.rhtml +++ b/tracks/app/views/projects/index.rhtml @@ -1,7 +1,7 @@
-
-

Currently there are no projects

-
+
+

Currently there are no projects

+
<%= render :partial => 'project_state_group', :object => @active_projects, :locals => { :state => 'active'} %> <%= render :partial => 'project_state_group', :object => @hidden_projects, :locals => { :state => 'hidden'} %> <%= render :partial => 'project_state_group', :object => @completed_projects, :locals => { :state => 'completed'} %> @@ -9,33 +9,50 @@ <% @project = @new_project -%>
- <%= link_to_function("Create a new project »", - "Element.toggle('project_new');Form.focusFirstElement('project-form');", - {:title => "Add a next action", :accesskey => "n"}) %> - -
- <% form_remote_tag :url => projects_path, :method => :post, - :html=> { :id=>'project-form', :name=>'project', :class => 'inline-form' } do -%> - -
<%= error_messages_for('project') %>
- -
- <%= text_field 'project', 'name', "tabindex" => 1 %>
- -
- <%= text_area 'project', 'description', "cols" => 30, "rows" => 4, "tabindex" => 2 %>
- - <% unless @contexts.empty? -%> -
- <%= text_field_tag("project[default_context_name]", @project.default_context.name, :tabindex => 3) %> - <%= render :partial => 'default_context_autocomplete' %> -
- <% end -%> - -
+
+
-
- - <% end -%> + <%= link_to_function("Create a new project »", + "Element.toggle('project_new');Form.focusFirstElement('project-form');", + {:title => "Add a next action", :accesskey => "n"}) %> + +
+ <% form_remote_tag(:url => projects_path, :method => :post, + :html=> { :id=>'project-form', :name=>'project', :class => 'inline-form'}, + :before => "$('project_new_project_submit').startWaiting()", + :complete => "$('project_new_project_submit').stopWaiting()", + :condition => "!$('project_new_project_submit').isWaiting()") do -%> + +
<%= error_messages_for('project') %>
+ +
+ <%= text_field 'project', 'name', "tabindex" => 1 %>
+ +
+ <%= text_area 'project', 'description', "cols" => 30, "rows" => 4, "tabindex" => 2 %>
+ + <% unless @contexts.empty? -%> +
+ <%= text_field_tag("project[default_context_name]", @project.default_context.name, :tabindex => 3) %> + <%= render :partial => 'default_context_autocomplete' %> +
+ <% end -%> + +
+ +
+
+ +
+
+ +

+
+ + <% end -%> +
+
-
+
\ No newline at end of file diff --git a/tracks/public/stylesheets/standard.css b/tracks/public/stylesheets/standard.css index 953c1c58..f413a14d 100644 --- a/tracks/public/stylesheets/standard.css +++ b/tracks/public/stylesheets/standard.css @@ -665,7 +665,7 @@ form { .inline-form table td.label { width: 13ex; } -#todo_new_action_container { +#todo_new_action_container, #project_new_project_container, #context_new_container { background: #ddd; width: 270px; padding: 5px 10px; @@ -676,10 +676,22 @@ form { color: #eee; } -#todo_new_action_container input, #todo_new_action_container textarea { +#project_new_project_filler { + padding-top: 50px; +} + +#todo_new_action_container input, +#todo_new_action_container textarea, +#project_new_project_container input, +#project_new_project_container textarea, +#context_new_container input { width: 100%; } +input#go_to_project, input#context_hide { + width: 5%; +} + #todo_new_action_container .show_from_input, #todo_new_action_container .due_input { width: 45%; } @@ -688,7 +700,7 @@ form { float: right; } -#todo-form-new-action .submit_box { +#todo-form-new-action .submit_box, #project_form .submit_box, #context_form .submit_box { height: 25px; padding: 5px 0; text-align: center;