mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-21 00:16:09 +01:00
use twitter/typeahead for autocomplete. make go to project|context|tag work and show
project details in a popover
This commit is contained in:
parent
31386db3df
commit
c0edd1749c
19 changed files with 1924 additions and 187 deletions
|
|
@ -1,17 +0,0 @@
|
|||
<div id="tracks-go-project-dialog" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3 id="myModalLabel">Go to project</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-search">
|
||||
<input type="text" id="tracks-goto-project" class="input-medium search-query ajax-typeahead" placeholder="Type (part of) project name"
|
||||
data-link="/projects.autocomplete" autocomplete="off">
|
||||
<input type="hidden" id="tracks-json-result">
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
|
||||
<button class="btn btn-primary">Go to project</button>
|
||||
</div>
|
||||
</div>
|
||||
16
app/views/projects/_goto_item.html.erb
Normal file
16
app/views/projects/_goto_item.html.erb
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<div id="tracks-go-item-dialog" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3 id="myModalLabel">...</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-search" action="/goto" method="get" data-link="/goto">
|
||||
<input type="text" id="tracks-goto-item" class="input-medium search-query ajax-typeahead" placeholder="..."
|
||||
data-link="/from_go_item_dialog.autocomplete" autocomplete="off">
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
|
||||
<button class="btn btn-primary">Go to project</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<% project = project_settings -%>
|
||||
<div id="<%= dom_id(project) %>" class="project">
|
||||
<div class="project_settings"><%= t('projects.this_project') %>
|
||||
<div id='<%= dom_id(project) %>' class='project'>
|
||||
<div class='project_settings'><%= t('projects.this_project') %>
|
||||
<% if project.completed? -%><%= t('projects.was_marked_complete') %>
|
||||
<% elsif project.hidden? -%><%= t('projects.was_marked_hidden') %>
|
||||
<% else -%><%= t('projects.is_active') %>
|
||||
|
|
@ -18,9 +18,9 @@
|
|||
<%= link_to_edit_project(project, t('projects.edit_project_settings')) %>
|
||||
</div>
|
||||
<% unless project.description.blank? -%>
|
||||
<div class="project_description"><%= Tracks::Utils.render_text(project.description) %></div>
|
||||
<div class='project_description'><%= Tracks::Utils.render_text(project.description) %></div>
|
||||
<% end -%>
|
||||
</div>
|
||||
<div id="<%= dom_id(project, 'edit') %>" class="edit-form" style="display:none;">
|
||||
<div class="placeholder"> </div>
|
||||
<div id='<%= dom_id(project, 'edit') %>' class='edit-form' style='display:none;'>
|
||||
<div class='placeholder'> </div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="container project">
|
||||
<h2 id="project_name_container">
|
||||
<%= show_project_name(project) %>
|
||||
</h2>
|
||||
<%= show_project_settings(project) %>
|
||||
</div>
|
||||
<h2 id="project_name_container"><%= show_project_name(project) %> </h2>
|
||||
<a
|
||||
role="button" title=""
|
||||
data-placement="bottom" rel="tracks-popover" href="#"
|
||||
data-original-title="Details of project" data-html="true"
|
||||
data-content="<%= render(partial: "project_settings", object: project) %>"><i class="icon-info-sign"></i></a>
|
||||
|
|
|
|||
|
|
@ -13,9 +13,13 @@
|
|||
<div id="display_box">
|
||||
<%= project_next_prev %>
|
||||
|
||||
<%= render :partial => "project_settings_container", :locals => {:project => @project} %>
|
||||
<% cache @project do %>
|
||||
<%= render :partial => "project_settings_container", :locals => {:project => @project} %>
|
||||
<% end %>
|
||||
|
||||
<%= empty_message_holder("not_done_context", @not_done_todos.empty?) %>
|
||||
<% cache("not_done_project", @not_done_todos.empty?) do -%>
|
||||
<%= render partial: "todos/empty_message_container", locals: {:show => @not_done_todos.empty?, :container_name => "not_done"} %>
|
||||
<% end -%>
|
||||
|
||||
<%= show_grouped_todos({:collapsible => false, :show_empty_containers => false, :parent_container_type => 'project' }) %>
|
||||
|
||||
|
|
@ -35,12 +39,7 @@
|
|||
</div>
|
||||
|
||||
<div id="new-note" style="display:none;">
|
||||
<%= render :partial => "notes/note_edit_form", :object => @new_note, :locals => {:submit_text => t('projects.add_note_submit')} %>
|
||||
<%# render :partial => "notes/note_edit_form", :object => @new_note, :locals => {:submit_text => t('projects.add_note_submit')} %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="input_box">
|
||||
<%= render :partial => "shared/add_new_item_form" %>
|
||||
<%= render :file => "sidebar/sidebar" %>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue