mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-23 07:34:08 +01:00
replace old prototype/jrails code for periodic checks and start work on autocomplete and edit projects
Signed-off-by: Reinier Balt <lrbalt@gmail.com>
This commit is contained in:
parent
69c811e365
commit
c834403340
24 changed files with 588 additions and 53 deletions
|
|
@ -2,7 +2,7 @@
|
|||
project = project_form
|
||||
%>
|
||||
|
||||
<% form_remote_tag(:url => project_path(project), :html => { :id => dom_id(project, 'edit_form'), :class => "inline-form "+dom_id(project, 'edit_form')+"-edit-project-form", :method => :put }) do -%>
|
||||
<%# form_remote_tag(:url => project_path(project), :html => { :id => dom_id(project, 'edit_form'), :class => "inline-form "+dom_id(project, 'edit_form')+"-edit-project-form", :method => :put }) do -%>
|
||||
<div id="error_status"><%= error_messages_for("project") %></div>
|
||||
<%= source_view_tag( @source_view ) -%>
|
||||
|
||||
|
|
@ -40,5 +40,5 @@ project = project_form
|
|||
</div>
|
||||
<br/><br/>
|
||||
|
||||
<% end -%>
|
||||
<%# end -%>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,9 @@
|
|||
<% else -%>
|
||||
'<%= project.default_tags -%>' as the default tags.
|
||||
<% end -%>
|
||||
<%= link_to_remote(
|
||||
"Edit Project Settings",
|
||||
<a class ="project_edit_settings" id="link_edit_<%=dom_id(project)-%>" href="<%=url_for(:controller => 'projects', :action => 'edit', :id => project.id)%>">Edit Project Settings</a>
|
||||
<%#= link_to_remote(
|
||||
"",
|
||||
:url => {:controller => 'projects', :action => 'edit', :id => project.id},
|
||||
:method => 'get',
|
||||
:with => "'_source_view=#{@source_view}'",
|
||||
|
|
|
|||
11
app/views/projects/edit.js.erb
Normal file
11
app/views/projects/edit.js.erb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
newHtml = "<%= escape_javascript(render(:partial => 'project_form', :locals => { :project_form => @project })) %>"
|
||||
$('div#<%=dom_id(@project, 'edit')%>').html(newHtml);
|
||||
$('div#<%=dom_id(@project)%>').hide();
|
||||
$('div#<%=dom_id(@project, 'edit')%>').show();
|
||||
|
||||
$('input.project-name').focus();
|
||||
|
||||
<%#*page[dom_id(@project, 'edit')].replace_html :partial => 'project_form', :locals => { :project_form => @project }%>
|
||||
<%#*page[@project].hide%>
|
||||
<%#*page[dom_id(@project, 'edit')].show%>
|
||||
<%#*page[dom_id(@project, 'edit_form')].find('input.project-name').focus%>
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
page[dom_id(@project, 'edit')].replace_html :partial => 'project_form', :locals => { :project_form => @project }
|
||||
page[@project].hide
|
||||
page[dom_id(@project, 'edit')].show
|
||||
page[dom_id(@project, 'edit_form')].find('input.project-name').focus
|
||||
Loading…
Add table
Add a link
Reference in a new issue