jquery-ui-rails-dox-fork 7.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/.gitmodules +3 -0
- data/.travis.yml +2 -0
- data/CONTRIBUTING.txt +30 -0
- data/Gemfile +3 -0
- data/History.md +172 -0
- data/License.txt +2 -0
- data/README.md +311 -0
- data/Rakefile +263 -0
- data/VERSIONS.md +41 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_444444_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_555555_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_777620_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_777777_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_cc0000_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_ffffff_256x240.png +0 -0
- data/app/assets/javascripts/jquery-ui/core.js +15 -0
- data/app/assets/javascripts/jquery-ui/data.js +45 -0
- data/app/assets/javascripts/jquery-ui/disable-selection.js +51 -0
- data/app/assets/javascripts/jquery-ui/effect.all.js +15 -0
- data/app/assets/javascripts/jquery-ui/effect.js +975 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-blind.js +76 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-bounce.js +116 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-clip.js +71 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-drop.js +75 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-explode.js +117 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-fade.js +53 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-fold.js +95 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-highlight.js +63 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-puff.js +49 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-pulsate.js +70 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-scale.js +63 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-shake.js +80 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-size.js +199 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-slide.js +82 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-transfer.js +46 -0
- data/app/assets/javascripts/jquery-ui/focusable.js +89 -0
- data/app/assets/javascripts/jquery-ui/form-reset-mixin.js +83 -0
- data/app/assets/javascripts/jquery-ui/form.js +25 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-af.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar-DZ.js +42 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar.js +42 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-az.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-be.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-bg.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-bs.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ca.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-cs.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-cy-GB.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-da.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-de-AT.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-de.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-el.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-AU.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-GB.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-NZ.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-eo.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-es.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-et.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-eu.js +39 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fa.js +76 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fi.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fo.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CA.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CH.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr.js +42 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-gl.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-he.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hi.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hr.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hu.js +39 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hy.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-id.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-is.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-it-CH.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-it.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ja.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ka.js +51 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-kk.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-km.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ko.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ky.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-lb.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-lt.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-lv.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-mk.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ml.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ms.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nb.js +52 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl-BE.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nn.js +52 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-no.js +53 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-pl.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt-BR.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt.js +47 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-rm.js +64 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ro.js +43 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ru.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sk.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sl.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sq.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr-SR.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sv.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ta.js +56 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-th.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-tj.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-tr.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-uk.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-vi.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-CN.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-HK.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-TW.js +40 -0
- data/app/assets/javascripts/jquery-ui/ie.js +20 -0
- data/app/assets/javascripts/jquery-ui/jquery-patch.js +91 -0
- data/app/assets/javascripts/jquery-ui/jquery-var-for-color.js +24 -0
- data/app/assets/javascripts/jquery-ui/keycode.js +51 -0
- data/app/assets/javascripts/jquery-ui/labels.js +71 -0
- data/app/assets/javascripts/jquery-ui/plugin.js +49 -0
- data/app/assets/javascripts/jquery-ui/position.js +513 -0
- data/app/assets/javascripts/jquery-ui/safe-active-element.js +46 -0
- data/app/assets/javascripts/jquery-ui/safe-blur.js +27 -0
- data/app/assets/javascripts/jquery-ui/scroll-parent.js +50 -0
- data/app/assets/javascripts/jquery-ui/tabbable.js +41 -0
- data/app/assets/javascripts/jquery-ui/unique-id.js +54 -0
- data/app/assets/javascripts/jquery-ui/vendor/jquery-color/jquery.color.js +722 -0
- data/app/assets/javascripts/jquery-ui/version.js +20 -0
- data/app/assets/javascripts/jquery-ui/widget.js +758 -0
- data/app/assets/javascripts/jquery-ui/widgets/accordion.js +627 -0
- data/app/assets/javascripts/jquery-ui/widgets/autocomplete.js +685 -0
- data/app/assets/javascripts/jquery-ui/widgets/button.js +454 -0
- data/app/assets/javascripts/jquery-ui/widgets/checkboxradio.js +294 -0
- data/app/assets/javascripts/jquery-ui/widgets/controlgroup.js +304 -0
- data/app/assets/javascripts/jquery-ui/widgets/datepicker.js +2243 -0
- data/app/assets/javascripts/jquery-ui/widgets/dialog.js +968 -0
- data/app/assets/javascripts/jquery-ui/widgets/draggable.js +1268 -0
- data/app/assets/javascripts/jquery-ui/widgets/droppable.js +508 -0
- data/app/assets/javascripts/jquery-ui/widgets/menu.js +720 -0
- data/app/assets/javascripts/jquery-ui/widgets/mouse.js +241 -0
- data/app/assets/javascripts/jquery-ui/widgets/progressbar.js +184 -0
- data/app/assets/javascripts/jquery-ui/widgets/resizable.js +1225 -0
- data/app/assets/javascripts/jquery-ui/widgets/selectable.js +321 -0
- data/app/assets/javascripts/jquery-ui/widgets/selectmenu.js +702 -0
- data/app/assets/javascripts/jquery-ui/widgets/slider.js +760 -0
- data/app/assets/javascripts/jquery-ui/widgets/sortable.js +1622 -0
- data/app/assets/javascripts/jquery-ui/widgets/spinner.js +588 -0
- data/app/assets/javascripts/jquery-ui/widgets/tabs.js +931 -0
- data/app/assets/javascripts/jquery-ui/widgets/tooltip.js +533 -0
- data/app/assets/javascripts/jquery-ui.js +57 -0
- data/app/assets/stylesheets/jquery-ui/accordion.css +26 -0
- data/app/assets/stylesheets/jquery-ui/all.css +14 -0
- data/app/assets/stylesheets/jquery-ui/autocomplete.css +19 -0
- data/app/assets/stylesheets/jquery-ui/base.css +32 -0
- data/app/assets/stylesheets/jquery-ui/button.css +85 -0
- data/app/assets/stylesheets/jquery-ui/checkboxradio.css +37 -0
- data/app/assets/stylesheets/jquery-ui/controlgroup.css +68 -0
- data/app/assets/stylesheets/jquery-ui/core.css +100 -0
- data/app/assets/stylesheets/jquery-ui/datepicker.css +188 -0
- data/app/assets/stylesheets/jquery-ui/dialog.css +104 -0
- data/app/assets/stylesheets/jquery-ui/draggable.css +15 -0
- data/app/assets/stylesheets/jquery-ui/menu.css +67 -0
- data/app/assets/stylesheets/jquery-ui/progressbar.css +31 -0
- data/app/assets/stylesheets/jquery-ui/resizable.css +81 -0
- data/app/assets/stylesheets/jquery-ui/selectable.css +20 -0
- data/app/assets/stylesheets/jquery-ui/selectmenu.css +53 -0
- data/app/assets/stylesheets/jquery-ui/slider.css +78 -0
- data/app/assets/stylesheets/jquery-ui/sortable.css +15 -0
- data/app/assets/stylesheets/jquery-ui/spinner.css +55 -0
- data/app/assets/stylesheets/jquery-ui/tabs.css +54 -0
- data/app/assets/stylesheets/jquery-ui/theme.css.erb +456 -0
- data/app/assets/stylesheets/jquery-ui/tooltip.css +22 -0
- data/app/assets/stylesheets/jquery-ui.css +1 -0
- data/lib/jquery/ui/rails/engine.rb +8 -0
- data/lib/jquery/ui/rails/version.rb +8 -0
- data/lib/jquery/ui/rails.rb +2 -0
- data/lib/jquery-ui-rails.rb +1 -0
- metadata +250 -0
data/Rakefile
ADDED
@@ -0,0 +1,263 @@
|
|
1
|
+
Encoding.default_external = "UTF-8" if defined?(Encoding)
|
2
|
+
require 'json'
|
3
|
+
require 'bundler/gem_tasks'
|
4
|
+
|
5
|
+
# returns the source filename for a named file in the 'dependencies'
|
6
|
+
# array of a JSON build file
|
7
|
+
# (e.g., if the JSON build file contains
|
8
|
+
#
|
9
|
+
# "dependencies": {
|
10
|
+
# "jquery": ">=1.6",
|
11
|
+
# "ui.core": "1.9.2",
|
12
|
+
# "ui.widget": "1.9.2"
|
13
|
+
# },
|
14
|
+
#
|
15
|
+
# then "ui.widget" returns "widget.js")
|
16
|
+
#
|
17
|
+
# The only exception is "jquery", which doesn't follow the
|
18
|
+
# same naming conventions so it's a special case.
|
19
|
+
def source_file_for_dependency_entry(caller, dep_entry)
|
20
|
+
p = Pathname.new caller
|
21
|
+
parent_path = p.parent
|
22
|
+
parent_path.join(dep_entry + '.js').to_s
|
23
|
+
end
|
24
|
+
|
25
|
+
# return a Hash of dependency info, whose keys are jquery-ui
|
26
|
+
# source files and values are Arrays containing the source files
|
27
|
+
# they depend on
|
28
|
+
def map_dependencies
|
29
|
+
dependencies = {}
|
30
|
+
Dir.glob("jquery-ui/ui/**/*.js").each do |path|
|
31
|
+
basename = File.basename path
|
32
|
+
file = File.read path
|
33
|
+
|
34
|
+
matchdata = file.match(/define\(\s*\[\s*([\"\.\/\,\w\s\-\:]+)\]/m)
|
35
|
+
|
36
|
+
next if matchdata.nil?
|
37
|
+
|
38
|
+
deps = matchdata[1]
|
39
|
+
|
40
|
+
# remove lines with comments
|
41
|
+
deps = deps.gsub(/\/\/.+\s/, "")
|
42
|
+
|
43
|
+
# remove all non-path symbols
|
44
|
+
deps = deps.gsub(/[\r\n\t\"\[\]\s]/, "")
|
45
|
+
|
46
|
+
deps_paths = deps.split(',')
|
47
|
+
|
48
|
+
deps_paths.map!(&method(:remove_js_extension))
|
49
|
+
|
50
|
+
# None of jquery.ui files should depend on jquery.js,
|
51
|
+
# so we remove 'jquery' from the list of dependencies for all files
|
52
|
+
deps_paths.reject! {|d| d == "jquery" }
|
53
|
+
|
54
|
+
deps_paths.map! {|d| source_file_for_dependency_entry path, d }
|
55
|
+
|
56
|
+
dependencies[basename] = deps_paths
|
57
|
+
end
|
58
|
+
dependencies
|
59
|
+
end
|
60
|
+
|
61
|
+
def dependency_hash
|
62
|
+
@dependency_hash ||= map_dependencies
|
63
|
+
end
|
64
|
+
|
65
|
+
def version
|
66
|
+
JSON.load(File.read('jquery-ui/package.json'))['version']
|
67
|
+
end
|
68
|
+
|
69
|
+
task :submodule do
|
70
|
+
sh 'git submodule update --init' unless File.exist?('jquery-ui/README.md')
|
71
|
+
end
|
72
|
+
|
73
|
+
def get_js_dependencies(basename)
|
74
|
+
dependencies = dependency_hash[basename]
|
75
|
+
if dependencies.nil?
|
76
|
+
puts "Warning: No dependencies found for #{basename}"
|
77
|
+
dependencies = []
|
78
|
+
end
|
79
|
+
# Make sure we do not package assets with broken dependencies
|
80
|
+
dependencies.each do |dep|
|
81
|
+
unless File.exist?("#{dep}")
|
82
|
+
fail "#{basename}: missing #{dep}"
|
83
|
+
end
|
84
|
+
end
|
85
|
+
dependencies
|
86
|
+
end
|
87
|
+
|
88
|
+
def remove_js_extension(path)
|
89
|
+
path.chomp(".js")
|
90
|
+
end
|
91
|
+
|
92
|
+
def protect_copyright_notice(source_code)
|
93
|
+
# YUI does not minify comments starting with "/*!"
|
94
|
+
# The i18n files start with non-copyright comments, so we require a newline
|
95
|
+
# to avoid protecting those
|
96
|
+
source_code.gsub!(/\A\s*\/\*\r?\n/, "/*!\n")
|
97
|
+
end
|
98
|
+
|
99
|
+
def build_image_dependencies(source_code)
|
100
|
+
image_dependencies = Set.new source_code.scan(/url\("?images\/([-_.a-zA-Z0-9]+)"?\)/).map(&:first)
|
101
|
+
code = image_dependencies.inject("") do |acc, img|
|
102
|
+
acc += " *= depend_on_asset \"jquery-ui/#{img}\"\n"
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
desc "Remove the app directory"
|
107
|
+
task :clean do
|
108
|
+
rm_rf 'app'
|
109
|
+
end
|
110
|
+
|
111
|
+
desc "Generate the JavaScript assets"
|
112
|
+
task :javascripts => :submodule do
|
113
|
+
Rake.rake_output_message 'Generating javascripts'
|
114
|
+
|
115
|
+
target_dir = "app/assets/javascripts"
|
116
|
+
target_ui_dir = "#{target_dir}/jquery-ui"
|
117
|
+
mkdir_p target_ui_dir
|
118
|
+
mkdir_p target_ui_dir + '/effects'
|
119
|
+
mkdir_p target_ui_dir + '/widgets'
|
120
|
+
mkdir_p target_ui_dir + '/i18n'
|
121
|
+
mkdir_p target_ui_dir + '/vendor/jquery-color'
|
122
|
+
|
123
|
+
Dir.glob("jquery-ui/ui/**/*.js").each do |path|
|
124
|
+
basename = File.basename(path)
|
125
|
+
clean_path = path.gsub('/ui', '')
|
126
|
+
dep_modules = get_js_dependencies(basename).map(&method(:remove_js_extension))
|
127
|
+
File.open("#{target_dir}/#{clean_path}", "w") do |out|
|
128
|
+
dep_modules.each do |mod|
|
129
|
+
mod.gsub!('/ui', '')
|
130
|
+
out.write("//= require #{mod}\n")
|
131
|
+
end
|
132
|
+
# core.js is deprecated and uses define function which is usually unavailable
|
133
|
+
# so we need only dependency loading there with no file contents
|
134
|
+
next if clean_path == 'jquery-ui/core.js'
|
135
|
+
out.write("\n") unless dep_modules.empty?
|
136
|
+
source_code = File.read(path)
|
137
|
+
source_code.gsub!('@VERSION', version)
|
138
|
+
protect_copyright_notice(source_code)
|
139
|
+
out.write(source_code)
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
# process the i18n files separately for performance, since they will not have dependencies
|
144
|
+
# https://github.com/jquery-ui-rails/jquery-ui-rails/issues/9
|
145
|
+
Dir.glob("jquery-ui/ui/i18n/*.js").each do |path|
|
146
|
+
basename = File.basename(path)
|
147
|
+
File.open("#{target_ui_dir}/i18n/#{basename}", "w") do |out|
|
148
|
+
source_code = File.read(path)
|
149
|
+
source_code.gsub!('@VERSION', version)
|
150
|
+
protect_copyright_notice(source_code)
|
151
|
+
out.write(source_code)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
File.open("#{target_ui_dir}/effect.all.js", "w") do |out|
|
156
|
+
Dir.glob("jquery-ui/ui/effects/*.js").sort.each do |path|
|
157
|
+
clean_path = remove_js_extension(path).gsub('/ui', '')
|
158
|
+
out.write("//= require #{clean_path}\n")
|
159
|
+
end
|
160
|
+
end
|
161
|
+
File.open("#{target_dir}/jquery-ui.js", "w") do |out|
|
162
|
+
Dir.glob("jquery-ui/ui/*.js").sort.each do |path|
|
163
|
+
clean_path = remove_js_extension(path).gsub('/ui', '')
|
164
|
+
out.write("//= require #{clean_path}\n")
|
165
|
+
end
|
166
|
+
Dir.glob("jquery-ui/ui/effects/*.js").sort.each do |path|
|
167
|
+
clean_path = remove_js_extension(path).gsub('/ui', '')
|
168
|
+
out.write("//= require #{clean_path}\n")
|
169
|
+
end
|
170
|
+
Dir.glob("jquery-ui/ui/widgets/*.js").sort.each do |path|
|
171
|
+
clean_path = remove_js_extension(path).gsub('/ui', '')
|
172
|
+
out.write("//= require #{clean_path}\n")
|
173
|
+
end
|
174
|
+
Dir.glob("jquery-ui/ui/vendor/jquery-color/*.js").sort.each do |path|
|
175
|
+
clean_path = remove_js_extension(path).gsub('/ui', '')
|
176
|
+
out.write("//= require #{clean_path}\n")
|
177
|
+
end
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
desc "Generate the CSS assets"
|
182
|
+
task :stylesheets => :submodule do
|
183
|
+
Rake.rake_output_message 'Generating stylesheets'
|
184
|
+
|
185
|
+
target_dir = "app/assets/stylesheets"
|
186
|
+
target_ui_dir = "#{target_dir}/jquery-ui"
|
187
|
+
mkdir_p target_ui_dir
|
188
|
+
|
189
|
+
File.open("#{target_dir}/jquery-ui.css", "w") do |out|
|
190
|
+
out.write("//= require jquery-ui/all\n")
|
191
|
+
end
|
192
|
+
|
193
|
+
css_dir = "jquery-ui/themes/base"
|
194
|
+
Dir.glob("#{css_dir}/*.css").each do |path|
|
195
|
+
basename = File.basename(path)
|
196
|
+
source_code = File.read(path)
|
197
|
+
source_code.gsub!('@VERSION', version)
|
198
|
+
protect_copyright_notice(source_code)
|
199
|
+
extra_dependencies = []
|
200
|
+
# Is "theme" listed among the dependencies for the matching JS file?
|
201
|
+
unless basename =~ /\.(all|base|core)\./
|
202
|
+
if dependencies = dependency_hash[basename.sub(/\.css/, '.js')]
|
203
|
+
dependencies.each do |dependency|
|
204
|
+
dependency = dependency.sub(/\.js$/, '')
|
205
|
+
dependent_stylesheet = "#{dependency}.css"
|
206
|
+
extra_dependencies << dependency if File.exist?("#{css_dir}/#{dependent_stylesheet}")
|
207
|
+
end
|
208
|
+
extra_dependencies << 'theme'
|
209
|
+
end
|
210
|
+
end
|
211
|
+
extra_dependencies.reverse.each do |dep|
|
212
|
+
# Add after first comment block
|
213
|
+
source_code = source_code.sub(/\A((.*?\*\/\n)?)/m, "\\1/*\n *= require jquery-ui/#{dep}\n */\n")
|
214
|
+
end
|
215
|
+
# Use "require" instead of @import
|
216
|
+
source_code.gsub!(/^@import (.*)$/) { |s|
|
217
|
+
m = s.match(/^@import (url\()?"(?<module>[-_.a-zA-Z]+)\.css"\)?;/) \
|
218
|
+
or fail "Cannot parse import: #{s}"
|
219
|
+
"/*\n *= require jquery-ui/#{m['module']}\n */"
|
220
|
+
}
|
221
|
+
# Be cute: collapse multiple require comment blocks into one
|
222
|
+
source_code.gsub!(/^( \*= require .*)\n \*\/(\n+)\/\*\n(?= \*= require )/, '\1\2')
|
223
|
+
source_code.gsub!(/\A(\/\*!.+?\*\/\s)/m, "\\1\n/*\n#{build_image_dependencies(source_code)} */\n\n") unless build_image_dependencies(source_code).empty?
|
224
|
+
# Replace hard-coded image URLs with asset path helpers
|
225
|
+
image_re = /url\("?images\/([-_.a-zA-Z0-9]+)"?\)/
|
226
|
+
extname = source_code =~ image_re ? ".erb" : ""
|
227
|
+
source_code.gsub!(image_re, 'url(<%= image_path("jquery-ui/\1") %>)')
|
228
|
+
File.open("#{target_ui_dir}/#{basename}#{extname}", "w") do |out|
|
229
|
+
out.write(source_code)
|
230
|
+
end
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
desc "Generate the image assets"
|
235
|
+
task :images => :submodule do
|
236
|
+
Rake.rake_output_message 'Copying images'
|
237
|
+
|
238
|
+
target_dir = "app/assets/images/jquery-ui"
|
239
|
+
mkdir_p target_dir
|
240
|
+
|
241
|
+
FileUtils.cp(Dir.glob("jquery-ui/themes/base/images/*"), target_dir)
|
242
|
+
end
|
243
|
+
|
244
|
+
desc "Update Jquery::Ui::Rails::JQUERY_UI_VERSION"
|
245
|
+
task :version => :submodule do
|
246
|
+
Rake.rake_output_message "Setting Jquery::Ui::Rails::JQUERY_UI_VERSION = \"#{version}\""
|
247
|
+
|
248
|
+
versionRb = 'lib/jquery/ui/rails/version.rb'
|
249
|
+
versionRbSource = File.read(versionRb)
|
250
|
+
versionDefinition = "JQUERY_UI_VERSION = \"#{version}\""
|
251
|
+
versionRbSource.sub! /JQUERY_UI_VERSION = "[^"]*"/, versionDefinition \
|
252
|
+
or fail "Could not find JQUERY_UI_VERSION in #{versionRb}"
|
253
|
+
File.open(versionRb, 'w') do |out|
|
254
|
+
out.write(versionRbSource)
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
258
|
+
desc "Clean and then generate everything (default)"
|
259
|
+
task :assets => [:clean, :javascripts, :stylesheets, :images, :version]
|
260
|
+
|
261
|
+
task :build => :assets
|
262
|
+
|
263
|
+
task :default => :assets
|
data/VERSIONS.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# Bundled Versions
|
2
|
+
|
3
|
+
| Gem | jQuery UI |
|
4
|
+
|--------|-----------|
|
5
|
+
| 7.0.1 | 1.13.2 |
|
6
|
+
| 7.0.0 | 1.13.0 |
|
7
|
+
| 6.0.1 | 1.12.1 |
|
8
|
+
| 6.0.0 | 1.12.1 |
|
9
|
+
| 5.0.5 | 1.11.4 |
|
10
|
+
| 5.0.4 | 1.11.3 |
|
11
|
+
| 5.0.3 | 1.11.2 |
|
12
|
+
| 5.0.2 | 1.11.2 |
|
13
|
+
| 5.0.1 | 1.11.1 |
|
14
|
+
| 5.0.0 | 1.11.0 |
|
15
|
+
| 4.2.1 | 1.10.4 |
|
16
|
+
| 4.2.0 | 1.10.3 |
|
17
|
+
| 4.1.2 | 1.10.3 |
|
18
|
+
| 4.1.1 | 1.10.3 |
|
19
|
+
| 4.1.0 | 1.10.3 |
|
20
|
+
| 4.0.5 | 1.10.3 |
|
21
|
+
| 4.0.4 | 1.10.3 |
|
22
|
+
| 4.0.3 | 1.10.3 |
|
23
|
+
| 4.0.2 | 1.10.0 |
|
24
|
+
| 4.0.1 | 1.10.0 |
|
25
|
+
| 4.0.0 | 1.10.0 |
|
26
|
+
| 3.0.1 | 1.9.2 |
|
27
|
+
| 3.0.0 | 1.9.2 |
|
28
|
+
| 2.0.2 | 1.8.24 |
|
29
|
+
| 2.0.1 | 1.8.23 |
|
30
|
+
| 2.0.0 | 1.8.23 |
|
31
|
+
| 1.1.1 | 1.8.23 |
|
32
|
+
| 1.1.0 | 1.8.22 |
|
33
|
+
| 1.0.0 | 1.8.21 |
|
34
|
+
| 0.5.0 | 1.8.21 |
|
35
|
+
| 0.4.1 | 1.8.20 |
|
36
|
+
| 0.4.0 | 1.8.20 |
|
37
|
+
| 0.3.0 | 1.8.19 |
|
38
|
+
| 0.2.2 | 1.8.18 |
|
39
|
+
| 0.2.1 | 1.8.18 |
|
40
|
+
| 0.2.0 | 1.8.17 |
|
41
|
+
| 0.1.0 | 1.8.16 |
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,15 @@
|
|
1
|
+
//= require jquery-ui/data
|
2
|
+
//= require jquery-ui/disable-selection
|
3
|
+
//= require jquery-ui/focusable
|
4
|
+
//= require jquery-ui/form
|
5
|
+
//= require jquery-ui/ie
|
6
|
+
//= require jquery-ui/keycode
|
7
|
+
//= require jquery-ui/labels
|
8
|
+
//= require jquery-ui/jquery-patch
|
9
|
+
//= require jquery-ui/plugin
|
10
|
+
//= require jquery-ui/safe-active-element
|
11
|
+
//= require jquery-ui/safe-blur
|
12
|
+
//= require jquery-ui/scroll-parent
|
13
|
+
//= require jquery-ui/tabbable
|
14
|
+
//= require jquery-ui/unique-id
|
15
|
+
//= require jquery-ui/version
|
@@ -0,0 +1,45 @@
|
|
1
|
+
//= require jquery-ui/version
|
2
|
+
|
3
|
+
/*!
|
4
|
+
* jQuery UI :data 1.13.2
|
5
|
+
* http://jqueryui.com
|
6
|
+
*
|
7
|
+
* Copyright jQuery Foundation and other contributors
|
8
|
+
* Released under the MIT license.
|
9
|
+
* http://jquery.org/license
|
10
|
+
*/
|
11
|
+
|
12
|
+
//>>label: :data Selector
|
13
|
+
//>>group: Core
|
14
|
+
//>>description: Selects elements which have data stored under the specified key.
|
15
|
+
//>>docs: http://api.jqueryui.com/data-selector/
|
16
|
+
|
17
|
+
( function( factory ) {
|
18
|
+
"use strict";
|
19
|
+
|
20
|
+
if ( typeof define === "function" && define.amd ) {
|
21
|
+
|
22
|
+
// AMD. Register as an anonymous module.
|
23
|
+
define( [ "jquery", "./version" ], factory );
|
24
|
+
} else {
|
25
|
+
|
26
|
+
// Browser globals
|
27
|
+
factory( jQuery );
|
28
|
+
}
|
29
|
+
} )( function( $ ) {
|
30
|
+
"use strict";
|
31
|
+
|
32
|
+
return $.extend( $.expr.pseudos, {
|
33
|
+
data: $.expr.createPseudo ?
|
34
|
+
$.expr.createPseudo( function( dataName ) {
|
35
|
+
return function( elem ) {
|
36
|
+
return !!$.data( elem, dataName );
|
37
|
+
};
|
38
|
+
} ) :
|
39
|
+
|
40
|
+
// Support: jQuery <1.8
|
41
|
+
function( elem, i, match ) {
|
42
|
+
return !!$.data( elem, match[ 3 ] );
|
43
|
+
}
|
44
|
+
} );
|
45
|
+
} );
|
@@ -0,0 +1,51 @@
|
|
1
|
+
//= require jquery-ui/version
|
2
|
+
|
3
|
+
/*!
|
4
|
+
* jQuery UI Disable Selection 1.13.2
|
5
|
+
* http://jqueryui.com
|
6
|
+
*
|
7
|
+
* Copyright jQuery Foundation and other contributors
|
8
|
+
* Released under the MIT license.
|
9
|
+
* http://jquery.org/license
|
10
|
+
*/
|
11
|
+
|
12
|
+
//>>label: disableSelection
|
13
|
+
//>>group: Core
|
14
|
+
//>>description: Disable selection of text content within the set of matched elements.
|
15
|
+
//>>docs: http://api.jqueryui.com/disableSelection/
|
16
|
+
|
17
|
+
// This file is deprecated
|
18
|
+
( function( factory ) {
|
19
|
+
"use strict";
|
20
|
+
|
21
|
+
if ( typeof define === "function" && define.amd ) {
|
22
|
+
|
23
|
+
// AMD. Register as an anonymous module.
|
24
|
+
define( [ "jquery", "./version" ], factory );
|
25
|
+
} else {
|
26
|
+
|
27
|
+
// Browser globals
|
28
|
+
factory( jQuery );
|
29
|
+
}
|
30
|
+
} )( function( $ ) {
|
31
|
+
"use strict";
|
32
|
+
|
33
|
+
return $.fn.extend( {
|
34
|
+
disableSelection: ( function() {
|
35
|
+
var eventType = "onselectstart" in document.createElement( "div" ) ?
|
36
|
+
"selectstart" :
|
37
|
+
"mousedown";
|
38
|
+
|
39
|
+
return function() {
|
40
|
+
return this.on( eventType + ".ui-disableSelection", function( event ) {
|
41
|
+
event.preventDefault();
|
42
|
+
} );
|
43
|
+
};
|
44
|
+
} )(),
|
45
|
+
|
46
|
+
enableSelection: function() {
|
47
|
+
return this.off( ".ui-disableSelection" );
|
48
|
+
}
|
49
|
+
} );
|
50
|
+
|
51
|
+
} );
|
@@ -0,0 +1,15 @@
|
|
1
|
+
//= require jquery-ui/effects/effect-blind
|
2
|
+
//= require jquery-ui/effects/effect-bounce
|
3
|
+
//= require jquery-ui/effects/effect-clip
|
4
|
+
//= require jquery-ui/effects/effect-drop
|
5
|
+
//= require jquery-ui/effects/effect-explode
|
6
|
+
//= require jquery-ui/effects/effect-fade
|
7
|
+
//= require jquery-ui/effects/effect-fold
|
8
|
+
//= require jquery-ui/effects/effect-highlight
|
9
|
+
//= require jquery-ui/effects/effect-puff
|
10
|
+
//= require jquery-ui/effects/effect-pulsate
|
11
|
+
//= require jquery-ui/effects/effect-scale
|
12
|
+
//= require jquery-ui/effects/effect-shake
|
13
|
+
//= require jquery-ui/effects/effect-size
|
14
|
+
//= require jquery-ui/effects/effect-slide
|
15
|
+
//= require jquery-ui/effects/effect-transfer
|