Skip to content

Commit 0a21231

Browse files
author
Mattia Roccoberton
committed
Minor improvements
1 parent d063ebe commit 0a21231

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

app/assets/javascripts/activeadmin/dynamic_fields.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function dfSetValue( el, val ) {
8989
}
9090

9191
$(document).ready( function() {
92-
$('[data-df-dialog]').on( 'click', function( event ) {
92+
$('.active_admin [data-df-dialog]').on( 'click', function( event ) {
9393
event.preventDefault();
9494
if( $('#df-dialog').length == 0 ) $('body').append( '<div id="df-dialog"></div>' );
9595
var title = $(this).attr( 'title' );
@@ -102,12 +102,12 @@ $(document).ready( function() {
102102
});
103103
});
104104

105-
$('[data-if], [data-function], [data-eq], [data-not]').each( function() {
105+
$('.active_admin [data-if], .active_admin [data-function], .active_admin [data-eq], .active_admin [data-not]').each( function() {
106106
dfSetupField( $(this) );
107107
});
108108

109-
$('.has_many_container').on( 'has_many_add:after', function( e, fieldset, container ) {
110-
$('[data-if], [data-function], [data-eq], [data-not]').each( function() {
109+
$('.active_admin .has_many_container').on( 'has_many_add:after', function( e, fieldset, container ) {
110+
$('.active_admin [data-if], .active_admin [data-function], .active_admin [data-eq], .active_admin [data-not]').each( function() {
111111
dfSetupField( $(this) );
112112
});
113113
});

0 commit comments

Comments
 (0)