Skip to content

Fix “define is not defined” error when jquery-ui file is loaded #113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ task :javascripts => :submodule do
mod.gsub!('/ui', '')
out.write("//= require #{mod}\n")
end
# core.js is deprecated and uses define function which is usually unavailable
# so we need only dependency loading there with no file contents
next if clean_path == 'jquery-ui/core.js'
out.write("\n") unless dep_modules.empty?
source_code = File.read(path)
source_code.gsub!('@VERSION', version)
Expand Down
22 changes: 0 additions & 22 deletions app/assets/javascripts/jquery-ui/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,3 @@
//= require jquery-ui/tabbable
//= require jquery-ui/unique-id
//= require jquery-ui/version

// This file is deprecated in 1.12.0 to be removed in 1.13
( function() {
define( [
"jquery",
"./data",
"./disable-selection",
"./focusable",
"./form",
"./ie",
"./keycode",
"./labels",
"./jquery-1-7",
"./plugin",
"./safe-active-element",
"./safe-blur",
"./scroll-parent",
"./tabbable",
"./unique-id",
"./version"
] );
} )();