ensure jQuery is loaded before running pageless on user_notes page

refs: CNVS-28781

I don't think this would have been a problem in production
but locally, jquery ($) was not loaded yet when
it tried to run this

test plan:
load http://c.dev/users/1/user_notes
it should not say "$ is not defined" in dev console

Change-Id: I5adcef12d6e6cee64431b6ff00a0856085ac2841
Reviewed-on: https://gerrit.instructure.com/84835
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
This commit is contained in:
Ryan Shaw 2016-07-11 12:49:03 -06:00
parent 75f1bb2adb
commit 6c6e58b919
1 changed files with 5 additions and 1 deletions

View File

@ -28,6 +28,10 @@ module UserNotesHelper
</div>'
}
javascript_tag("$('#user_note_list').pageless(#{opts.to_json});")
javascript_tag("
require(['jquery', 'vendor/jquery.pageless'], function(){
$('#user_note_list').pageless(#{opts.to_json});
});
")
end
end