Add messaging to order (closes #327)
This commit is contained in:
parent
65c7673a41
commit
124f77f2ab
4 changed files with 32 additions and 21 deletions
20
app/views/orders/_show_js.html.haml
Normal file
20
app/views/orders/_show_js.html.haml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
-# this needs to be in a separate file from show.html.erb to allow deface overrides
|
||||
- content_for :javascript do
|
||||
:javascript
|
||||
function activate_search(view, placeholder) {
|
||||
new List(document.body, {
|
||||
valueNames: ['name'],
|
||||
engine: 'unlist',
|
||||
plugins: [
|
||||
['reset', {highlightClass: 'btn-primary'}],
|
||||
['delay', {delayedSearchTime: 500}],
|
||||
],
|
||||
// make large pages work too (as we don't have paging)
|
||||
page: 10000,
|
||||
indexAsync: true
|
||||
});
|
||||
$('#query').attr('placeholder', placeholder);
|
||||
}
|
||||
$(function() {
|
||||
activate_search('#{j @view}', '#{j t(".search_placeholder.#{@view}")}');
|
||||
});
|
||||
|
|
@ -79,25 +79,5 @@
|
|||
#new_comment= render partial: 'order_comments/form', locals: { order_comment: @order.comments.build(user: current_user)}
|
||||
= link_to_top
|
||||
|
||||
|
||||
- content_for :javascript do
|
||||
:javascript
|
||||
function activate_search(view, placeholder) {
|
||||
new List(document.body, {
|
||||
valueNames: ['name'],
|
||||
engine: 'unlist',
|
||||
plugins: [
|
||||
['reset', {highlightClass: 'btn-primary'}],
|
||||
['delay', {delayedSearchTime: 500}],
|
||||
],
|
||||
// make large pages work too (as we don't have paging)
|
||||
page: 10000,
|
||||
indexAsync: true
|
||||
});
|
||||
$('#query').attr('placeholder', placeholder);
|
||||
}
|
||||
$(function() {
|
||||
activate_search('#{j @view}', '#{j t(".search_placeholder.#{@view}")}');
|
||||
});
|
||||
|
||||
= render 'show_js'
|
||||
= render 'shared/articles_by/common', order: @order
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue