mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-05 23:41:48 +01:00
References to context.reset and project.reset are replaced by the correct Form.reset. Also replaced all instances of Form.focus_first with the correct Form.focusFirstElement. Tidied up the edit forms on the projects and contexts pages. There's a weird visual bug in Safari (doesn't happen in Firefox), where the selected input box appears to be empty and unselected. However, if you type, your input will replace the previous text, and if you tab immediately to another field, you'll see that the input field was '''not''' actually empty. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@150 a4c988fc-2ded-0310-b66e-134b36920a42
46 lines
No EOL
2.4 KiB
Text
46 lines
No EOL
2.4 KiB
Text
<% project = project_listing %>
|
|
<div id="container_<%= project.id %>" class="list">
|
|
<!-- %= error_messages_for 'project' % -->
|
|
<div id="project-<%= project.id %>" class="even_row" style="display:'';">
|
|
<div class="position">
|
|
<span class="handle">DRAG</span>
|
|
</div>
|
|
<div class="data">
|
|
<%= link_to( sanitize("#{project.name}"), :action => "show", :name => urlize(project.name) ) %><%= " (" + project.count_undone_todos("actions") + ")" %>
|
|
</div>
|
|
<div class="buttons">
|
|
<% if project.done == 1 -%>
|
|
<span class="grey">COMPLETED</span>
|
|
<% else -%>
|
|
<span class="grey">ACTIVE</span>
|
|
<% end -%>
|
|
|
|
<%= link_to_remote( image_tag("blank", :title =>"Delete project", :class=>"delete_item"),
|
|
:update => "container_#{project.id}",
|
|
:loading => visual_effect(:fade, "container_#{project.id}"),
|
|
:url => { :controller => "project", :action => "destroy", :id => project.id },
|
|
:confirm => "Are you sure that you want to delete the project \'#{project.name}\'?" ) + " " +
|
|
link_to_function(image_tag( "blank", :title => "Edit item", :class=>"edit_item"), "Element.toggle('project-#{project.id}','project-#{project.id}-edit-form'); new Effect.Appear('project-#{project.id}-edit-form'); Form.focusFirstElement('form-project-#{project.id}');" ) %>
|
|
</div>
|
|
</div><!-- [end:project-project.id] -->
|
|
|
|
<div id="project-<%= project.id %>-edit-form" class="edit-form" style="display:none;">
|
|
<%= form_remote_tag :url => { :controller => 'project', :action => 'update', :id => project.id },
|
|
:html => { :id => "form-project-#{project.id}", :class => "form" },
|
|
:update => "container_#{project.id}",
|
|
:complete => visual_effect(:appear, 'container_#{project.id}') %>
|
|
<table style="table-layout: fixed;" width="450">
|
|
<%= render_partial 'project_form', project %>
|
|
<tr>
|
|
<td width="150"> </td>
|
|
<td width="300"><input type="submit" value="Update" /> <a href="javascript:void(0);" onclick="Element.toggle('project-<%= project.id %>','project-<%= project.id %>-edit-form');Form.reset('form-project-<%= project.id %>');">Cancel</a></td>
|
|
</tr>
|
|
</table>
|
|
<%= end_form_tag %>
|
|
</div><!-- [end:project-project.id-edit-form] -->
|
|
</div><!-- [end:container_project.id] -->
|
|
<% if controller.action_name == 'new_project' %>
|
|
<script>
|
|
new Effect.Appear('project-<%= project.id %>');
|
|
</script>
|
|
<% end %> |