mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-27 12:28:48 +01:00
Bug #300: Added infrastructure for collapsible dependency block, similar to todo notes.
Conflicts: app/views/layouts/standard.html.erb public/javascripts/application.js
This commit is contained in:
parent
42cbe52224
commit
2bf48a15cb
4 changed files with 13 additions and 0 deletions
|
|
@ -29,6 +29,7 @@ parameters += "&_tag_name=#{@tag_name}" if @source_view == 'tag'
|
|||
<%= deferred_due_date %>
|
||||
<%= project_and_context_links( parent_container_type, :suppress_context => suppress_context, :suppress_project => suppress_project ) %>
|
||||
<%= render(:partial => "todos/toggle_notes", :locals => { :item => todo }) if todo.notes? %>
|
||||
<%= render(:partial => "todos/toggle_dependencies", :locals => { :item => todo }) if todo.uncompleted_predecessors.empty? or !todo.successors.empty? %>
|
||||
</div>
|
||||
</div>
|
||||
<div id="<%= dom_id(todo, 'edit') %>" class="edit-form" style="display:none">
|
||||
|
|
|
|||
5
app/views/todos/_toggle_dependencies.rhtml
Normal file
5
app/views/todos/_toggle_dependencies.rhtml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<%= link_to(image_tag( 'blank.png', :width=>'16', :height=>'16', :border=>'0' ), "#", {:class => 'show_dependencies', :title => 'Show dependencies'}) %>
|
||||
|
||||
<div class="todo_dependencies" id="<%= dom_id(item, 'dependencies') %>" style="display:none">
|
||||
<p>Links</p>
|
||||
</div>
|
||||
|
|
@ -247,6 +247,10 @@ $(document).ready(function() {
|
|||
$(this).next().toggle("fast"); return false;
|
||||
});
|
||||
|
||||
$(".show_dependencies").live('click', function () {
|
||||
$(this).next().toggle("fast"); return false;
|
||||
});
|
||||
|
||||
/* fade flashes and alerts in automatically */
|
||||
$(".alert").fadeOut(8000);
|
||||
|
||||
|
|
|
|||
|
|
@ -99,6 +99,9 @@ a.to_bottom:hover {background: transparent url(/images/bottom_on.png) no-repeat;
|
|||
a.show_notes, a.link_to_notes {background-image: url(/images/notes_off.png); background-repeat: no-repeat; padding: 1px; background-color: transparent;}
|
||||
a.show_notes:hover, a.link_to_notes:hover {background-image: url(/images/notes_on.png); background-repeat: no-repeat; padding: 1px; background-color: transparent;}
|
||||
|
||||
a.show_dependencies, a.link_to_dependencies {background-image: url(/images/notes_off.png); background-repeat: no-repeat; padding: 1px; background-color: transparent;}
|
||||
a.show_dependencies:hover, a.link_to_dependencies:hover {background-image: url(/images/notes_on.png); background-repeat: no-repeat; padding: 1px; background-color: transparent;}
|
||||
|
||||
/* Structural divs */
|
||||
|
||||
#content {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue