-
Notifications
You must be signed in to change notification settings - Fork 211
Open
Description
I am hoping that I am not barking up the wrong tree--
I am working with a SIMPLE wice grid to filter descriptions (Which are strings)
The first time I change the filter, the page reloads and everything is alright--after that point, I can change the drop down and nothing happens. I click on reset filter and nothing happens either. I have checked and see that JQuery is indeed loaded along with all of wice grid js files.
I have attached the files I would imagine you would need:
View:
'<link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
<%= grid(@conversation_grid, show_filters: :always) do |g|
g.column name: 'Description', attribute: 'description', auto_reload: true, custom_filter: :auto
end -%>
<%= link_to 'New Conversation', new_conversation_path, {class: "btn btn-info"} %>`
Controller:
`def index
@conversations = Conversation.all
@conversation_grid = initialize_grid(Conversation)
@current_user = UserUtils.get_current_employee_observer(session)
end`
Application.js:
`// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require bootstrap-sprockets
//= require bootstrap
//= require jquery_ujs
//= require jquery-ui
//= require wice_grid
//= require jquery-ui/datepicker
//= require_tree .
//= require turbolinks
//= require Chart.bundle
//= require chartkick
//= require_tree .
function remove_fields(link, row) {
$(link).prev("input[type=hidden]").val("1");
$(row).hide()
}
function add_fields(link, association, content, table) {
var new_id = new Date().getTime();
var regexp = new RegExp("new_" + association, "g")
var row = $('#' + table + " tr:nth-last-child(1)")
row.before(content.replace(regexp, new_id));
}`
Many thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels