nested_fields_rails 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -73,23 +73,23 @@ jQuery(function($) {
|
|
73
73
|
return {'associationName': associationName, 'objectId': objectId};
|
74
74
|
};
|
75
75
|
|
76
|
-
$('.add-nested-fields'
|
76
|
+
$(document).on('click', '.add-nested-fields', function() {
|
77
77
|
var link = $(this);
|
78
78
|
var associationName = link.attr('data-association');
|
79
79
|
new NestedFields(associationName).add();
|
80
80
|
});
|
81
81
|
|
82
|
-
$('.remove-nested-fields'
|
82
|
+
$(document).on('click', '.remove-nested-fields', function() {
|
83
83
|
var context = nestedFieldContext(this);
|
84
84
|
new NestedFields(context.associationName).remove(context.objectId);
|
85
85
|
});
|
86
86
|
|
87
|
-
$('.up-nested-fields'
|
87
|
+
$(document).on('click', '.up-nested-fields', function() {
|
88
88
|
var context = nestedFieldContext(this);
|
89
89
|
new NestedFields(context.associationName).up(context.objectId);
|
90
90
|
});
|
91
91
|
|
92
|
-
$('.down-nested-fields'
|
92
|
+
$(document).on('click', '.down-nested-fields', function() {
|
93
93
|
var context = nestedFieldContext(this);
|
94
94
|
new NestedFields(context.associationName).down(context.objectId);
|
95
95
|
});
|