Skip to content

Commit

Permalink
Fix stuck datetimepicker.
Browse files Browse the repository at this point in the history
  • Loading branch information
countxyz committed Jun 24, 2014
1 parent 13374fb commit d024a5c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
1 change: 0 additions & 1 deletion app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
//= require bootstrap
//= require moment
//= require bootstrap-datetimepicker
//= require datetimepicker
3 changes: 0 additions & 3 deletions app/assets/javascripts/datetimepicker.js.coffee

This file was deleted.

3 changes: 3 additions & 0 deletions app/views/tasks/_datetimepicker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$(document).ready(function() {
$('#datetimepicker1').datetimepicker();
});
3 changes: 2 additions & 1 deletion app/views/tasks/_task.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
</span>

<span class="edit">
<%= link_to task, remote: true, method: :delete, data: { confirm: 'Are you sure?' } do %>
<%= link_to task, remote: true, method: :delete,
data: { confirm: 'Are you sure?' } do %>
<button class="btn btn-danger btn-xs">Delete!</button>
<% end %>
</span>
Expand Down
2 changes: 2 additions & 0 deletions app/views/tasks/edit.js.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
$('#task-form').html("<%= escape_javascript(render 'form') %>");
$('#task-form').slideDown(350);

<%= render 'datetimepicker' %>
4 changes: 3 additions & 1 deletion app/views/tasks/new.js.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
$('#task-form').html("<%= escape_javascript(render 'form') %>");
$('#task-form').html("<%= j (render 'form') %>");
$('#task-form').slideDown(350);

<%= render 'datetimepicker' %>

0 comments on commit d024a5c

Please sign in to comment.