Skip to content

Commit e38f4c8

Browse files
authored
Merge pull request #6 from rvdb/aspace-v4.0.0
reformulated deprecated jQuery calls
2 parents 50b2680 + 6b2ce1a commit e38f4c8

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

frontend/assets/user_defined_in_basic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ UserDefinedInBasic.prototype.init = function(fields, read_only_view, hide_user_d
1414
var user_defined_section = $('section.subrecord-form[data-object-name="user_defined"]');
1515
var remove_btn = user_defined_section.find('.subrecord-form-remove');
1616
if (remove_btn.length == 0) {
17-
user_defined_section.find('.btn-default').filter(':visible').click();
17+
user_defined_section.find('.btn-default').filter(':visible').trigger('click');
1818
window.scrollTo(0,0);
1919
}
2020

frontend/views/layout_head.html.erb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ end
2626
}
2727

2828
// For Resource record updates
29-
$(document).bind("loadedrecordform.aspace", init);
29+
$(document).on("loadedrecordform.aspace", init);
3030

3131
// For everything else
3232
// had to bind this call to window load because a bare call to init()
3333
// was causing Firefox to jump the gun ... javascript, sheesh
34-
$(window).load(init);
34+
$(window).on('load', function(){
35+
init
36+
})
3537

3638
</script>
3739

0 commit comments

Comments
 (0)