Skip to content

Commit

Permalink
modify dupulicate dom
Browse files Browse the repository at this point in the history
  • Loading branch information
amesel committed May 4, 2012
1 parent 34083d3 commit 12e7ea2
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/assets/javascripts/parties.js.coffee
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$ ->
$('#party_user_tokens').tokenInput '/users.json',
$('#party_member_tokens').tokenInput '/users.json',
hintText: 'メンバーを選択してください'
theme: 'facebook'
$('.best_in_place').best_in_place()
Expand Down
1 change: 1 addition & 0 deletions app/controllers/parties_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def show

def new
@party = Party.new
@party.member_tokens=[current_user.id]
respond_with @party
end

Expand Down
4 changes: 2 additions & 2 deletions app/views/tasks/create.js.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
$('#task_content').val("");
$('.backlog ul').prepend("<%= j(render @task) %>");
$('#task_content').val("")
$('.backlog ul').prepend("<%= j(render @task) %>").fadeIn()
4 changes: 2 additions & 2 deletions app/views/tasks/finish.js.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
$('#<%= dom_id(@task) %>').fadeOut();
$('.done ul').prepend("<%= j(render @task) %>");
$('#<%= dom_id(@task) %>').remove().fadeOut()
$('.done ul').prepend("<%= j(render @task) %>").fadeIn()
4 changes: 2 additions & 2 deletions app/views/tasks/hold.js.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
$('#<%= dom_id(@task) %>').fadeOut();
$('.backlog ul').prepend("<%= j(render @task) %>");
$('#<%= dom_id(@task) %>').remove().fadeOut()
$('.backlog ul').prepend("<%= j(render @task) %>").fadeIn()
6 changes: 3 additions & 3 deletions app/views/tasks/start.js.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% if @task.state == "backlog" %>
alert("You have a current task!");
alert("You have a current task!")
<% else %>
$('#<%= dom_id(@task) %>').fadeOut();
$('.current .doing ul').prepend("<%= j(render @task) %>");
$('#<%= dom_id(@task) %>').remove().fadeOut()
$('.current .doing ul').prepend("<%= j(render @task) %>").fadeIn()
<% end %>

0 comments on commit 12e7ea2

Please sign in to comment.