mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 07:40:12 +01:00
Fixed recurring todo input form behavior
The form for new recurring todos has different id's, causing it to not get the awesome JavaScript. Duplicated to make it work.
This commit is contained in:
parent
1cf9373bfe
commit
7883145bdb
2 changed files with 19 additions and 0 deletions
|
|
@ -337,6 +337,13 @@ $(document).ready(function() {
|
|||
$('#recurring_edit_'+this.id.split('_')[5]).show();
|
||||
});
|
||||
|
||||
$("#recurring_period input").live('click', function(){
|
||||
$.each(['daily', 'weekly', 'monthly', 'yearly', 'target'], function(){
|
||||
$('#recurring_'+this).hide();
|
||||
});
|
||||
$('#recurring_'+this.id.split('_')[4]).show();
|
||||
});
|
||||
|
||||
$('div.context span#context_name').editable(function(value, settings){
|
||||
context_id = $(this).parents('.container.context').get(0).id.split('c')[1];
|
||||
highlight = function(){
|
||||
|
|
|
|||
12
test/selenium/recurring_todos/switch_recurrence_options.rsel
Normal file
12
test/selenium/recurring_todos/switch_recurrence_options.rsel
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
setup :fixtures => :users, :clear_tables => [:projects, :contexts, :todos]
|
||||
login :as => 'admin'
|
||||
open "/recurring_todos"
|
||||
click "css=#recurring_new_container a"
|
||||
click "recurring_todo_recurring_period_daily"
|
||||
assert_visible "recurring_daily"
|
||||
click "recurring_todo_recurring_period_weekly"
|
||||
assert_visible "recurring_weekly"
|
||||
click "recurring_todo_recurring_period_monthly"
|
||||
assert_visible "recurring_monthly"
|
||||
click "recurring_todo_recurring_period_yearly"
|
||||
assert_visible "recurring_yearly"
|
||||
Loading…
Add table
Add a link
Reference in a new issue