mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 07:40:12 +01:00
move the two toggle links in top-right to view menu
This commit is contained in:
parent
7084c11263
commit
be1a9528d5
6 changed files with 30 additions and 11 deletions
|
|
@ -46,10 +46,6 @@
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<div id="minilinks">
|
<div id="minilinks">
|
||||||
<%= link_to(t('layouts.toggle_contexts'), "#", {:title => t('layouts.toggle_contexts_title'), :id => "toggle-contexts-nav"}) %>
|
|
||||||
|
|
|
||||||
<%= link_to(t('layouts.toggle_notes'), "#", {:accesskey => "S", :title => t('layouts.toggle_notes_title'), :id => "toggle-notes-nav"}) %>
|
|
||||||
|
|
|
||||||
<%= link_to("#{t('common.logout')} (#{current_user.display_name}) »".html_safe, logout_path) %>
|
<%= link_to("#{t('common.logout')} (#{current_user.display_name}) »".html_safe, logout_path) %>
|
||||||
</div>
|
</div>
|
||||||
<div id="navcontainer">
|
<div id="navcontainer">
|
||||||
|
|
@ -66,13 +62,15 @@
|
||||||
<li><%= navigation_link( t('layouts.navigation.recurring_todos'), {:controller => "recurring_todos", :action => "index"}, :title => t('layouts.navigation.recurring_todos_title')) %></li>
|
<li><%= navigation_link( t('layouts.navigation.recurring_todos'), {:controller => "recurring_todos", :action => "index"}, :title => t('layouts.navigation.recurring_todos_title')) %></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#"><%= t('layouts.navigation.view') %></a>
|
<li id="menu_view"><a href="#" id="menu_view_link"><%= t('layouts.navigation.view') %></a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><%= navigation_link( t('layouts.navigation.calendar'), calendar_path, :title => t('layouts.navigation.calendar_title')) %></li>
|
<li><%= navigation_link( t('layouts.navigation.calendar'), calendar_path, :title => t('layouts.navigation.calendar_title')) %></li>
|
||||||
<li><%= navigation_link( t('layouts.navigation.completed_tasks'), done_overview_path, {:accesskey=>"d", :title=>t('layouts.navigation.completed_tasks_title')} ) %></li>
|
<li><%= navigation_link( t('layouts.navigation.completed_tasks'), done_overview_path, {:accesskey=>"d", :title=>t('layouts.navigation.completed_tasks_title')} ) %></li>
|
||||||
<li><%= navigation_link( t('layouts.navigation.feeds'), feeds_path, :title => t('layouts.navigation.feeds_title')) %></li>
|
<li><%= navigation_link( t('layouts.navigation.feeds'), feeds_path, :title => t('layouts.navigation.feeds_title')) %></li>
|
||||||
<li><%= navigation_link( t('layouts.navigation.stats'), stats_path, :title => t('layouts.navigation.stats_title')) %></li>
|
<li><%= navigation_link( t('layouts.navigation.stats'), stats_path, :title => t('layouts.navigation.stats_title')) %></li>
|
||||||
<li><hr/></li>
|
<li><hr/></li>
|
||||||
|
<li id="menu_view_toggle_contexts"><%= link_to(t('layouts.toggle_contexts'), "#", {:title => t('layouts.toggle_contexts_title'), :id => "toggle-contexts-nav"}) %></li>
|
||||||
|
<li><%= link_to(t('layouts.toggle_notes'), "#", {:accesskey => "S", :title => t('layouts.toggle_notes_title'), :id => "toggle-notes-nav"}) %></li>
|
||||||
<%= group_view_by_menu_entry %>
|
<%= group_view_by_menu_entry %>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ Feature: View, add, remove notes
|
||||||
And I edit the first note to "edited note"
|
And I edit the first note to "edited note"
|
||||||
Then I should see "edited note"
|
Then I should see "edited note"
|
||||||
|
|
||||||
@javascript
|
@javascript
|
||||||
Scenario: Toggle all notes
|
Scenario: Toggle all notes
|
||||||
Given I have a context called "@pc"
|
Given I have a context called "@pc"
|
||||||
And I have a project "take notes" that has the following todos
|
And I have a project "take notes" that has the following todos
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,9 @@ When(/^I collapse the project container of "(.*?)"$/) do |project_name|
|
||||||
end
|
end
|
||||||
|
|
||||||
When /^I toggle all collapsed context containers$/ do
|
When /^I toggle all collapsed context containers$/ do
|
||||||
click_link 'Toggle collapsed contexts'
|
open_view_menu do
|
||||||
|
click_link 'Toggle collapsed contexts'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
####### Context #######
|
####### Context #######
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ When /^I edit the first note to "([^"]*)"$/ do |note_body|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
When /^I toggle the note of "([^"]*)"$/ do |todo_description|
|
When(/^I toggle the note of "([^"]*)"$/) do |todo_description|
|
||||||
todo = @current_user.todos.where(:description => todo_description).first
|
todo = @current_user.todos.where(:description => todo_description).first
|
||||||
todo.should_not be_nil
|
todo.should_not be_nil
|
||||||
|
|
||||||
|
|
@ -39,7 +39,9 @@ When /^I toggle the note of "([^"]*)"$/ do |todo_description|
|
||||||
end
|
end
|
||||||
|
|
||||||
When /^I click Toggle Notes$/ do
|
When /^I click Toggle Notes$/ do
|
||||||
click_link 'Toggle notes'
|
open_view_menu do
|
||||||
|
click_link 'Toggle notes'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
When /^I toggle all notes$/ do
|
When /^I toggle all notes$/ do
|
||||||
|
|
|
||||||
|
|
@ -97,6 +97,23 @@ module TracksStepHelper
|
||||||
execute_javascript("$('#{sortable_css}').simulateDragSortable({move: #{delta}, handle: '.grip'});")
|
execute_javascript("$('#{sortable_css}').simulateDragSortable({move: #{delta}, handle: '.grip'});")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def open_view_menu
|
||||||
|
view_menu = "ul.sf-menu li#menu_view"
|
||||||
|
|
||||||
|
# click menu
|
||||||
|
view_menu_link = "#{view_menu} a#menu_view_link"
|
||||||
|
page.should have_css(view_menu_link, :visible => true)
|
||||||
|
page.find(view_menu_link).click
|
||||||
|
|
||||||
|
# wait for menu to be visible
|
||||||
|
view_menu_item = "#{view_menu} li#menu_view_toggle_contexts"
|
||||||
|
page.should have_css(view_menu_item)
|
||||||
|
|
||||||
|
within view_menu do
|
||||||
|
yield
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def open_submenu_for(todo)
|
def open_submenu_for(todo)
|
||||||
submenu_arrow = "div#line_todo_#{todo.id} img.todo-submenu"
|
submenu_arrow = "div#line_todo_#{todo.id} img.todo-submenu"
|
||||||
page.should have_css(submenu_arrow, :visible=>true)
|
page.should have_css(submenu_arrow, :visible=>true)
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ Feature: Toggle the containers
|
||||||
And I should not see the todo "test 2"
|
And I should not see the todo "test 2"
|
||||||
And I should not see the todo "test 3"
|
And I should not see the todo "test 3"
|
||||||
|
|
||||||
@javascript
|
@javascript
|
||||||
Scenario: I can hide all collapsed context containers
|
Scenario: I can hide all collapsed context containers
|
||||||
Given I have the following contexts
|
Given I have the following contexts
|
||||||
| context | hide |
|
| context | hide |
|
||||||
|
|
@ -87,7 +87,7 @@ Feature: Toggle the containers
|
||||||
And I should not see the context container for "@boss"
|
And I should not see the context container for "@boss"
|
||||||
And I should not see the context container for "@ipad"
|
And I should not see the context container for "@ipad"
|
||||||
|
|
||||||
@javascript
|
@javascript
|
||||||
Scenario: I can hide all collapsed project containers
|
Scenario: I can hide all collapsed project containers
|
||||||
Given I have the following contexts
|
Given I have the following contexts
|
||||||
| context | hide |
|
| context | hide |
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue