Fix dynamic select2 usage (oops!)
This commit is contained in:
parent
326016dfb5
commit
d06a9ed3f0
7 changed files with 41 additions and 44 deletions
|
|
@ -53,7 +53,8 @@
|
|||
|
||||
$(document).on('#update_articles_summary', function() {
|
||||
// initialize add ordergroup control
|
||||
$('#group_order_article_ordergroup_id').select2().select2('data', null);
|
||||
$('#group_order_article_ordergroup_id').select2();
|
||||
$('#group_order_article_ordergroup_id').val('').trigger('change');
|
||||
});
|
||||
|
||||
$(function() {
|
||||
|
|
@ -64,7 +65,7 @@
|
|||
$(document).on('GroupOrderArticle#create', function(e) {
|
||||
var base_unit = $('#articles_by_articles').data('base-unit');
|
||||
// reset selection
|
||||
$('#group_order_article_ordergroup_id').select2('data', null);
|
||||
$('#group_order_article_ordergroup_id').val('').trigger('change');
|
||||
// update table
|
||||
$.ajax({
|
||||
url: '#{show_on_group_order_article_create_current_orders_articles_path}',
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
$(document).on('GroupOrderArticle#create', function(e) {
|
||||
var base_unit = $('#articles_by_groups_table').data('base-unit');
|
||||
// reset selection
|
||||
$('#group_order_article_order_article_id').select2('data', null);
|
||||
$('#group_order_article_order_article_id').val('').trigger('change');
|
||||
// update table
|
||||
$.ajax({
|
||||
url: '#{show_on_group_order_article_create_current_orders_ordergroups_path}',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue