Project default tags

This commit is contained in:
Eric Allen 2009-10-16 19:15:50 -04:00
parent e1079b4bc7
commit bfc6189611
6 changed files with 23 additions and 3 deletions

View file

@ -20,9 +20,10 @@ else
page.replace_html dom_id(@project, 'container'), :partial => 'project_settings', :locals => { :project => @project }
page[dom_id(@project)].show
page << "$('#todo_context_name').val('#{@project.default_context.name}');" if @project.default_context
page['todo_context_name'].value = @project.default_context.name if @project.default_context
page['#todo_project_name'].value = @project.name
page['tag_list'].value = @project.default_tags if @project.default_tags
page << "$('input[name=default_context_name]').val('#{@project.default_context.name}');" if @project.default_context
page << "$('#todo_project_name').val('#{@project.name}');"
page << "defaultContexts = #{default_contexts_for_autocomplete};"
page << "defaultTags = #{default_tags_for_autocomplete};"
end

View file

@ -38,7 +38,7 @@
<div class="page_name_auto_complete" id="context_list" style="display:none"></div>
<label for="tag_list">Tags (separate with commas)</label>
<%= text_field_tag "tag_list", nil, :size => 30, :tabindex => 5 %>
<%= text_field_tag "tag_list", @default_tags, :size => 30, :tabindex => 5 %>
<%= content_tag("div", "", :id => "tag_list_auto_complete", :class => "auto_complete") %>
<div class="due_input">

View file

@ -9,6 +9,7 @@ if @saved
page.send :record, "$('#todo-form-new-action').clearForm();$('#todo-form-new-action input:first').focus();"
page['todo_context_name'].value = @initial_context_name
page['todo_project_name'].value = @initial_project_name
page['tag_list'].value = @default_tags
#page << "updateContextNamesForAutoComplete(#{context_names_for_autocomplete})" if @new_context_created
#page << "projectAutoCompleter.options.array = #{project_names_for_autocomplete}" if @new_project_created
if should_show_new_item()