Fix task form

This commit is contained in:
wvengen 2015-05-08 20:54:48 +02:00
parent a34c462c59
commit 1a62ce55e3
3 changed files with 16 additions and 13 deletions

View file

@ -9,3 +9,5 @@
= form.input :due_date, as: :date_picker = form.input :due_date, as: :date_picker
- unless local_assigns[:periodic] - unless local_assigns[:periodic]
= form.input :done = form.input :done
= render 'form_javascript'

View file

@ -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'
});
});

View file

@ -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 - content_for :sidebar do
= render "shared/workgroup_members" = render "shared/workgroup_members"