Skip to content

Commit

Permalink
Fix task form
Browse files Browse the repository at this point in the history
  • Loading branch information
wvengen committed May 8, 2015
1 parent a34c462 commit 1a62ce5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
2 changes: 2 additions & 0 deletions app/views/tasks/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@
= form.input :due_date, as: :date_picker
- unless local_assigns[:periodic]
= form.input :done

= render 'form_javascript'
14 changes: 14 additions & 0 deletions app/views/tasks/_form_javascript.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
- content_for :javascript do
:javascript
$(function() {
$("#task_user_list").tokenInput("#{users_path(:format => :json)}", {
crossDomain: false,
prePopulate: $("#task_user_list").data("pre"),
hintText: '#{escape_javascript(t('tasks.form.search.hint'))}',
noResultText: '#{escape_javascript(t('tasks.form.search.noresult'))}',
searchingText: '#{escape_javascript(t('tasks.form.search.placeholder'))}',
theme: 'facebook'
});
});


13 changes: 0 additions & 13 deletions app/views/tasks/_form_sidebar.html.haml
Original file line number Diff line number Diff line change
@@ -1,15 +1,2 @@
- content_for :javascript do
:javascript
$(function() {
$("#task_user_list").tokenInput("#{users_path(:format => :json)}", {
crossDomain: false,
prePopulate: $("#task_user_list").data("pre"),
hintText: '#{escape_javascript(t('.search.hint'))}',
noResultText: '#{escape_javascript(t('.search.noresult'))}',
searchingText: '#{escape_javascript(t('.search.placeholder'))}',
theme: 'facebook'
});
});

- content_for :sidebar do
= render "shared/workgroup_members"

0 comments on commit 1a62ce5

Please sign in to comment.