jquery-ui-middleman 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +2 -0
  3. data/.gitmodules +3 -0
  4. data/.travis.yml +2 -0
  5. data/Gemfile +3 -0
  6. data/History.md +115 -0
  7. data/License.txt +2 -0
  8. data/README.md +226 -0
  9. data/Rakefile +221 -0
  10. data/VERSIONS.md +27 -0
  11. data/app/assets/images/jquery-ui/animated-overlay.gif +0 -0
  12. data/app/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  13. data/app/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
  14. data/app/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  15. data/app/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
  16. data/app/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
  17. data/app/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  18. data/app/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  19. data/app/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  20. data/app/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
  21. data/app/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
  22. data/app/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
  23. data/app/assets/images/jquery-ui/ui-icons_888888_256x240.png +0 -0
  24. data/app/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
  25. data/app/assets/javascripts/jquery.ui.accordion.js +575 -0
  26. data/app/assets/javascripts/jquery.ui.all.js +34 -0
  27. data/app/assets/javascripts/jquery.ui.autocomplete.js +615 -0
  28. data/app/assets/javascripts/jquery.ui.button.js +422 -0
  29. data/app/assets/javascripts/jquery.ui.core.js +320 -0
  30. data/app/assets/javascripts/jquery.ui.datepicker-af.js +23 -0
  31. data/app/assets/javascripts/jquery.ui.datepicker-ar-DZ.js +23 -0
  32. data/app/assets/javascripts/jquery.ui.datepicker-ar.js +23 -0
  33. data/app/assets/javascripts/jquery.ui.datepicker-az.js +23 -0
  34. data/app/assets/javascripts/jquery.ui.datepicker-be.js +23 -0
  35. data/app/assets/javascripts/jquery.ui.datepicker-bg.js +24 -0
  36. data/app/assets/javascripts/jquery.ui.datepicker-bs.js +23 -0
  37. data/app/assets/javascripts/jquery.ui.datepicker-ca.js +23 -0
  38. data/app/assets/javascripts/jquery.ui.datepicker-cs.js +23 -0
  39. data/app/assets/javascripts/jquery.ui.datepicker-cy-GB.js +23 -0
  40. data/app/assets/javascripts/jquery.ui.datepicker-da.js +23 -0
  41. data/app/assets/javascripts/jquery.ui.datepicker-de.js +23 -0
  42. data/app/assets/javascripts/jquery.ui.datepicker-el.js +23 -0
  43. data/app/assets/javascripts/jquery.ui.datepicker-en-AU.js +23 -0
  44. data/app/assets/javascripts/jquery.ui.datepicker-en-GB.js +23 -0
  45. data/app/assets/javascripts/jquery.ui.datepicker-en-NZ.js +23 -0
  46. data/app/assets/javascripts/jquery.ui.datepicker-eo.js +23 -0
  47. data/app/assets/javascripts/jquery.ui.datepicker-es.js +23 -0
  48. data/app/assets/javascripts/jquery.ui.datepicker-et.js +23 -0
  49. data/app/assets/javascripts/jquery.ui.datepicker-eu.js +23 -0
  50. data/app/assets/javascripts/jquery.ui.datepicker-fa.js +59 -0
  51. data/app/assets/javascripts/jquery.ui.datepicker-fi.js +23 -0
  52. data/app/assets/javascripts/jquery.ui.datepicker-fo.js +23 -0
  53. data/app/assets/javascripts/jquery.ui.datepicker-fr-CA.js +23 -0
  54. data/app/assets/javascripts/jquery.ui.datepicker-fr-CH.js +23 -0
  55. data/app/assets/javascripts/jquery.ui.datepicker-fr.js +25 -0
  56. data/app/assets/javascripts/jquery.ui.datepicker-gl.js +23 -0
  57. data/app/assets/javascripts/jquery.ui.datepicker-he.js +23 -0
  58. data/app/assets/javascripts/jquery.ui.datepicker-hi.js +23 -0
  59. data/app/assets/javascripts/jquery.ui.datepicker-hr.js +23 -0
  60. data/app/assets/javascripts/jquery.ui.datepicker-hu.js +23 -0
  61. data/app/assets/javascripts/jquery.ui.datepicker-hy.js +23 -0
  62. data/app/assets/javascripts/jquery.ui.datepicker-id.js +23 -0
  63. data/app/assets/javascripts/jquery.ui.datepicker-is.js +23 -0
  64. data/app/assets/javascripts/jquery.ui.datepicker-it.js +23 -0
  65. data/app/assets/javascripts/jquery.ui.datepicker-ja.js +23 -0
  66. data/app/assets/javascripts/jquery.ui.datepicker-ka.js +21 -0
  67. data/app/assets/javascripts/jquery.ui.datepicker-kk.js +23 -0
  68. data/app/assets/javascripts/jquery.ui.datepicker-km.js +23 -0
  69. data/app/assets/javascripts/jquery.ui.datepicker-ko.js +23 -0
  70. data/app/assets/javascripts/jquery.ui.datepicker-ky.js +24 -0
  71. data/app/assets/javascripts/jquery.ui.datepicker-lb.js +23 -0
  72. data/app/assets/javascripts/jquery.ui.datepicker-lt.js +23 -0
  73. data/app/assets/javascripts/jquery.ui.datepicker-lv.js +23 -0
  74. data/app/assets/javascripts/jquery.ui.datepicker-mk.js +23 -0
  75. data/app/assets/javascripts/jquery.ui.datepicker-ml.js +23 -0
  76. data/app/assets/javascripts/jquery.ui.datepicker-ms.js +23 -0
  77. data/app/assets/javascripts/jquery.ui.datepicker-nb.js +22 -0
  78. data/app/assets/javascripts/jquery.ui.datepicker-nl-BE.js +23 -0
  79. data/app/assets/javascripts/jquery.ui.datepicker-nl.js +23 -0
  80. data/app/assets/javascripts/jquery.ui.datepicker-nn.js +22 -0
  81. data/app/assets/javascripts/jquery.ui.datepicker-no.js +23 -0
  82. data/app/assets/javascripts/jquery.ui.datepicker-pl.js +23 -0
  83. data/app/assets/javascripts/jquery.ui.datepicker-pt-BR.js +23 -0
  84. data/app/assets/javascripts/jquery.ui.datepicker-pt.js +22 -0
  85. data/app/assets/javascripts/jquery.ui.datepicker-rm.js +21 -0
  86. data/app/assets/javascripts/jquery.ui.datepicker-ro.js +26 -0
  87. data/app/assets/javascripts/jquery.ui.datepicker-ru.js +23 -0
  88. data/app/assets/javascripts/jquery.ui.datepicker-sk.js +23 -0
  89. data/app/assets/javascripts/jquery.ui.datepicker-sl.js +24 -0
  90. data/app/assets/javascripts/jquery.ui.datepicker-sq.js +23 -0
  91. data/app/assets/javascripts/jquery.ui.datepicker-sr-SR.js +23 -0
  92. data/app/assets/javascripts/jquery.ui.datepicker-sr.js +23 -0
  93. data/app/assets/javascripts/jquery.ui.datepicker-sv.js +23 -0
  94. data/app/assets/javascripts/jquery.ui.datepicker-ta.js +23 -0
  95. data/app/assets/javascripts/jquery.ui.datepicker-th.js +23 -0
  96. data/app/assets/javascripts/jquery.ui.datepicker-tj.js +23 -0
  97. data/app/assets/javascripts/jquery.ui.datepicker-tr.js +23 -0
  98. data/app/assets/javascripts/jquery.ui.datepicker-uk.js +24 -0
  99. data/app/assets/javascripts/jquery.ui.datepicker-vi.js +23 -0
  100. data/app/assets/javascripts/jquery.ui.datepicker-zh-CN.js +23 -0
  101. data/app/assets/javascripts/jquery.ui.datepicker-zh-HK.js +23 -0
  102. data/app/assets/javascripts/jquery.ui.datepicker-zh-TW.js +23 -0
  103. data/app/assets/javascripts/jquery.ui.datepicker.js +2040 -0
  104. data/app/assets/javascripts/jquery.ui.dialog.js +815 -0
  105. data/app/assets/javascripts/jquery.ui.draggable.js +962 -0
  106. data/app/assets/javascripts/jquery.ui.droppable.js +377 -0
  107. data/app/assets/javascripts/jquery.ui.effect-blind.js +84 -0
  108. data/app/assets/javascripts/jquery.ui.effect-bounce.js +115 -0
  109. data/app/assets/javascripts/jquery.ui.effect-clip.js +69 -0
  110. data/app/assets/javascripts/jquery.ui.effect-drop.js +67 -0
  111. data/app/assets/javascripts/jquery.ui.effect-explode.js +99 -0
  112. data/app/assets/javascripts/jquery.ui.effect-fade.js +32 -0
  113. data/app/assets/javascripts/jquery.ui.effect-fold.js +78 -0
  114. data/app/assets/javascripts/jquery.ui.effect-highlight.js +52 -0
  115. data/app/assets/javascripts/jquery.ui.effect-pulsate.js +65 -0
  116. data/app/assets/javascripts/jquery.ui.effect-scale.js +320 -0
  117. data/app/assets/javascripts/jquery.ui.effect-shake.js +76 -0
  118. data/app/assets/javascripts/jquery.ui.effect-slide.js +66 -0
  119. data/app/assets/javascripts/jquery.ui.effect-transfer.js +49 -0
  120. data/app/assets/javascripts/jquery.ui.effect.all.js +14 -0
  121. data/app/assets/javascripts/jquery.ui.effect.js +1289 -0
  122. data/app/assets/javascripts/jquery.ui.menu.js +625 -0
  123. data/app/assets/javascripts/jquery.ui.mouse.js +172 -0
  124. data/app/assets/javascripts/jquery.ui.position.js +497 -0
  125. data/app/assets/javascripts/jquery.ui.progressbar.js +148 -0
  126. data/app/assets/javascripts/jquery.ui.resizable.js +972 -0
  127. data/app/assets/javascripts/jquery.ui.selectable.js +281 -0
  128. data/app/assets/javascripts/jquery.ui.slider.js +676 -0
  129. data/app/assets/javascripts/jquery.ui.sortable.js +1289 -0
  130. data/app/assets/javascripts/jquery.ui.spinner.js +497 -0
  131. data/app/assets/javascripts/jquery.ui.tabs.js +849 -0
  132. data/app/assets/javascripts/jquery.ui.tooltip.js +406 -0
  133. data/app/assets/javascripts/jquery.ui.widget.js +521 -0
  134. data/app/assets/stylesheets/jquery.ui.accordion.css.erb +42 -0
  135. data/app/assets/stylesheets/jquery.ui.all.css.erb +14 -0
  136. data/app/assets/stylesheets/jquery.ui.autocomplete.css.erb +21 -0
  137. data/app/assets/stylesheets/jquery.ui.base.css.erb +27 -0
  138. data/app/assets/stylesheets/jquery.ui.button.css.erb +118 -0
  139. data/app/assets/stylesheets/jquery.ui.core.css.erb +93 -0
  140. data/app/assets/stylesheets/jquery.ui.datepicker.css.erb +182 -0
  141. data/app/assets/stylesheets/jquery.ui.dialog.css.erb +75 -0
  142. data/app/assets/stylesheets/jquery.ui.menu.css.erb +83 -0
  143. data/app/assets/stylesheets/jquery.ui.progressbar.css.erb +32 -0
  144. data/app/assets/stylesheets/jquery.ui.resizable.css.erb +82 -0
  145. data/app/assets/stylesheets/jquery.ui.selectable.css.erb +19 -0
  146. data/app/assets/stylesheets/jquery.ui.slider.css.erb +77 -0
  147. data/app/assets/stylesheets/jquery.ui.spinner.css.erb +70 -0
  148. data/app/assets/stylesheets/jquery.ui.tabs.css.erb +56 -0
  149. data/app/assets/stylesheets/jquery.ui.theme.css.erb +409 -0
  150. data/app/assets/stylesheets/jquery.ui.tooltip.css.erb +23 -0
  151. data/lib/jquery-ui-middleman.rb +1 -0
  152. data/lib/jquery/ui/version.rb +6 -0
  153. metadata +209 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 926ebd0ca7550e8732d55426f07c3b4167c56f85
4
+ data.tar.gz: 1d6fd588376245c4ba8f6568f4c5c56db8b00926
5
+ SHA512:
6
+ metadata.gz: c54465a94e0186bcff6bf5663c397620bd6f5e9815ae5cf0159fef87d55a366690c983f1b483050ecd03baef30d6ee56b965ee50b5b5eab9cf78a27be5473c3e
7
+ data.tar.gz: 1d71efbc3ac26cfe962e1714bd7a9edee3435dfa678b99e7e7350ac66d7ea0803006e79e0d65570aa01078271725b2f184667779442e89fa8966eae20daf998d
@@ -0,0 +1,2 @@
1
+ *.gem
2
+ Gemfile.lock
@@ -0,0 +1,3 @@
1
+ [submodule "jquery-ui"]
2
+ path = jquery-ui
3
+ url = git://github.com/jquery/jquery-ui.git
@@ -0,0 +1,2 @@
1
+ rvm:
2
+ - 1.9.3
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
@@ -0,0 +1,115 @@
1
+ # master
2
+
3
+ # 4.1.0
4
+
5
+ * Add Jquery::Ui::Rails::JQUERY_UI_VERSION constant
6
+
7
+ # 4.0.5
8
+
9
+ * Remove unused dependency on the `jquery-rails` gem. If you get an error
10
+ "couldn't find file 'jquery'", you may need to explicitly add `gem
11
+ 'jquery-rails'` to your Gemfile.
12
+
13
+ # 4.0.4
14
+
15
+ * Include license in gemspec
16
+
17
+ # 4.0.3
18
+
19
+ * Upgrade to jQuery UI 1.10.3
20
+
21
+ # 4.0.2
22
+
23
+ * Rails 4 compatibility
24
+
25
+ # 4.0.1
26
+
27
+ * Add missing animated-overlay.gif asset and fix image path
28
+
29
+ # 4.0.0
30
+
31
+ * Upgrade to jQuery UI 1.10.0
32
+
33
+ * No more automatic `//= require jquery`
34
+ ([#30](https://github.com/joliss/jquery-ui-rails/pull/30), original
35
+ discussion at [#17](https://github.com/joliss/jquery-ui-rails/pull/17)).
36
+ This means that you have to add `//= require jquery` to your application.js
37
+ file before you require any of the jQuery UI JavaScript modules.
38
+
39
+ # 3.0.1
40
+
41
+ * Fix stylesheet dependencies
42
+
43
+ # 3.0.0
44
+
45
+ * Upgrade to jQuery UI 1.9.2
46
+ * Switched from storing the map of file dependencies locally to leveraging
47
+ the grunt build system's .json files for determining file dependencies.
48
+ This simplifies the maintenance of this wrapper project, and allows us to
49
+ delete dependencies.js
50
+ * Renamed jquery.effects.all to jquery.ui.effect.all, to match the effects files
51
+ renamed in 1.9.2 (see [Renamed all effects files][1])
52
+ * Changed license to MIT only instead of MIT or GPL, to match jQuery UI's
53
+ license (see [commit][2])
54
+
55
+ [1]: http://jqueryui.com/upgrade-guide/1.9/#renamed-all-effects-files
56
+ [2]: https://github.com/jquery/jquery-ui/commit/485ca7192ac57d018b8ce4f03e7dec6e694a53b7
57
+
58
+ # 2.0.2
59
+
60
+ * Upgrade to jQuery UI 1.8.24
61
+
62
+ # 2.0.1
63
+
64
+ * Add draggable and resizable to the dependencies of dialog (#1)
65
+
66
+ # 2.0.0
67
+
68
+ * Do not require the main datepicker module from datepicker i18n modules.
69
+ Fixes Heroku precompilation timeouts. If you are using a datepicker i18n
70
+ module, be sure to also require jquery.ui.datepicker. (#9)
71
+
72
+ # 1.1.1
73
+
74
+ * Upgrade to jQuery UI 1.8.23
75
+
76
+ # 1.1.0
77
+
78
+ * Upgrade to jQuery UI 1.8.22
79
+
80
+ # 1.0.0
81
+
82
+ * No change. Bumping version to indicate that jquery-ui-rails is considered
83
+ stable, and that we are following semver.
84
+
85
+ # 0.5.0
86
+
87
+ * Upgrade to jQuery UI 1.8.21
88
+
89
+ # 0.4.1
90
+
91
+ * Add jquery.effects.all
92
+
93
+ # 0.4.0
94
+
95
+ * Upgrade to jQuery UI 1.8.20
96
+
97
+ # 0.3.0
98
+
99
+ * Upgrade to jQuery UI 1.8.19
100
+
101
+ # 0.2.2
102
+
103
+ * Protect copyright notices against minification with `/*! ... */`
104
+
105
+ # 0.2.1
106
+
107
+ * Upgrade to jQuery UI 1.8.18
108
+
109
+ # 0.2.0
110
+
111
+ * Upgrade to jQuery UI 1.8.17
112
+
113
+ # 0.1.0
114
+
115
+ * Initial release packaging jQuery UI 1.8.16
@@ -0,0 +1,2 @@
1
+ jQuery UI as well as this gem are licensed under the MIT license (see
2
+ jquery-ui/MIT-LICENSE.txt).
@@ -0,0 +1,226 @@
1
+ # jquery-ui-middleman
2
+
3
+ This gem packages the jQuery UI 1.10.0 assets (JavaScripts, stylesheets, and
4
+ images) for middleman, this is a fork of [jquery-ui-rails](https://github.com/joliss/jquery-ui-rails)
5
+
6
+ See [VERSIONS.md](VERSIONS.md) to see which versions of jquery-ui-rails bundle
7
+ which versions of jQuery UI.
8
+
9
+ ## Usage
10
+
11
+ In your Gemfile, add:
12
+
13
+ ```ruby
14
+ gem 'jquery-ui-middleman'
15
+ ```
16
+
17
+ ## Require Everything
18
+
19
+ To require all jQuery UI modules, add the following to your application.js:
20
+
21
+ ```javascript
22
+ //= require jquery.ui.all
23
+ ```
24
+
25
+ Also add the jQuery UI CSS to your application.css:
26
+
27
+ ```css
28
+ /*
29
+ *= require jquery.ui.all
30
+ */
31
+ ```
32
+
33
+ All images required by jQuery UI are automatically served through the asset
34
+ pipeline, so you are good to go! For example, this code will add a
35
+ [datepicker](http://jqueryui.com/demos/datepicker/):
36
+
37
+ ```javascript
38
+ $(function() {
39
+ $('.datepicker').datepicker();
40
+ });
41
+ ```
42
+
43
+ ## Require Specific Modules
44
+
45
+ The jQuery UI code weighs 51KB (minified + gzipped) and takes a while to
46
+ execute, so for production apps it's recommended to only include the modules
47
+ that your application actually uses. Dependencies are automatically resolved.
48
+ Simply pick one or more modules from the asset list below.
49
+
50
+ For example, if you only need the datepicker module, add this to your
51
+ application.js:
52
+
53
+ ```javascript
54
+ //= require jquery.ui.datepicker
55
+ ```
56
+
57
+ In your application.css, require the corresponding CSS module:
58
+
59
+ ```css
60
+ /*
61
+ *= require jquery.ui.datepicker
62
+ */
63
+ ```
64
+
65
+ ## JavaScript Assets
66
+
67
+ ### UI Core
68
+
69
+ ```javascript
70
+ //= require jquery.ui.core
71
+ //= require jquery.ui.widget
72
+ //= require jquery.ui.mouse
73
+ //= require jquery.ui.position
74
+ ```
75
+
76
+ You usually do not need to require these directly, as they are pulled in by the
77
+ other JavaScript modules as needed.
78
+
79
+ ### Interactions
80
+
81
+ ```javascript
82
+ //= require jquery.ui.draggable
83
+ //= require jquery.ui.droppable
84
+ //= require jquery.ui.resizable
85
+ //= require jquery.ui.selectable
86
+ //= require jquery.ui.sortable
87
+ ```
88
+
89
+ For `jquery.ui.resizable` and `jquery.ui.selectable`, remember to `require`
90
+ their matching CSS files in your application.css as well.
91
+
92
+ ### Widgets
93
+
94
+ ```javascript
95
+ //= require jquery.ui.accordion
96
+ //= require jquery.ui.autocomplete
97
+ //= require jquery.ui.button
98
+ //= require jquery.ui.datepicker
99
+ //= require jquery.ui.dialog
100
+ //= require jquery.ui.menu
101
+ //= require jquery.ui.progressbar
102
+ //= require jquery.ui.slider
103
+ //= require jquery.ui.spinner
104
+ //= require jquery.ui.tabs
105
+ //= require jquery.ui.tooltip
106
+ ```
107
+
108
+ For all of these, remember to `require` their matching CSS files in your
109
+ application.css as well.
110
+
111
+ #### I18n
112
+
113
+ Datepicker has optional i18n modules for non-US locales, named
114
+ `jquery.ui.datepicker-xx[-YY]`
115
+ ([list](https://github.com/joliss/jquery-ui-rails/tree/master/app/assets/javascripts)),
116
+ for example:
117
+
118
+ ```javascript
119
+ //= require jquery.ui.datepicker
120
+ //= require jquery.ui.datepicker-pt-BR
121
+ ```
122
+
123
+ Note that you still need to include the main datepicker module. It is not
124
+ required automatically [for performance
125
+ reasons](https://github.com/joliss/jquery-ui-rails/issues/9#issuecomment-6524987).
126
+
127
+ ### Effects
128
+
129
+ ```javascript
130
+ //= require jquery.ui.effect.all
131
+ //= require jquery.ui.effect
132
+ //= require jquery.ui.effect-blind
133
+ //= require jquery.ui.effect-bounce
134
+ //= require jquery.ui.effect-clip
135
+ //= require jquery.ui.effect-drop
136
+ //= require jquery.ui.effect-explode
137
+ //= require jquery.ui.effect-fade
138
+ //= require jquery.ui.effect-fold
139
+ //= require jquery.ui.effect-highlight
140
+ //= require jquery.ui.effect-pulsate
141
+ //= require jquery.ui.effect-scale
142
+ //= require jquery.ui.effect-shake
143
+ //= require jquery.ui.effect-slide
144
+ //= require jquery.ui.effect-transfer
145
+ ```
146
+
147
+ ## Stylesheet Assets
148
+
149
+ ### UI Core
150
+
151
+ ```css
152
+ /*
153
+ *= require jquery.ui.core
154
+ *= require jquery.ui.theme
155
+ */
156
+ ```
157
+
158
+ You might want to require these if you do not use any of the following modules,
159
+ but still want jQuery UI's basic theming CSS. Otherwise they are automatically
160
+ pulled in as dependencies.
161
+
162
+ ### Interactions
163
+
164
+ ```css
165
+ /*
166
+ *= require jquery.ui.resizable
167
+ *= require jquery.ui.selectable
168
+ */
169
+ ```
170
+
171
+ ### Widgets
172
+
173
+ ```css
174
+ /*
175
+ *= require jquery.ui.accordion
176
+ *= require jquery.ui.autocomplete
177
+ *= require jquery.ui.button
178
+ *= require jquery.ui.datepicker
179
+ *= require jquery.ui.dialog
180
+ *= require jquery.ui.menu
181
+ *= require jquery.ui.progressbar
182
+ *= require jquery.ui.slider
183
+ *= require jquery.ui.spinner
184
+ *= require jquery.ui.tabs
185
+ *= require jquery.ui.tooltip
186
+ */
187
+ ```
188
+
189
+ ## Contributing
190
+
191
+ ### Bug Reports
192
+
193
+ For bugs in jQuery UI itself, head to the [jQuery UI Development
194
+ Center](http://jqueryui.com/development).
195
+
196
+ For bugs in this gem distribution, use the GitHub issue tracker.
197
+
198
+ ## Limitations
199
+
200
+ * Only the base theme (Smoothness) is included. Once it becomes possible to
201
+ [generate all theme
202
+ files](https://forum.jquery.com/topic/downloading-bundling-all-themes#14737000003080244)
203
+ from the jQuery UI sources, we can package all the other themes in the
204
+ [ThemeRoller](http://jqueryui.com/themeroller/) gallery.
205
+
206
+ Perhaps we can also add helper tasks to help developers generate assets for
207
+ their own custom themes or for third-party themes (like
208
+ [Selene](http://gravityonmars.github.com/Selene/)).
209
+
210
+ If you still want a different theme right now, you could probably download
211
+ a custom theme and require the theme CSS *after* requiring any other jQuery
212
+ UI CSS files you need, making sure to serve up the theme images correctly.
213
+ (This is arguably cumbersome, not officially supported by this gem, and
214
+ adds 1 KB overhead as both the base theme and the custom theme are served
215
+ up.)
216
+
217
+ * The `jquery.ui.all.js` file is named `jquery-ui.js` in the official
218
+ distribution. We should follow their naming. But jquery-rails provides a
219
+ `jquery-ui.js` asset as well, so until that is removed from the
220
+ jquery-rails gem (see issue
221
+ [#46](https://github.com/rails/jquery-rails/issues/46)), we cannot
222
+ distribute `jquery-ui.js` without risking conflicts.
223
+
224
+ To reduce confusion, as long as there is no `jquery-ui.js`, we also do not
225
+ distribute the official `jquery-ui-i18n.js` and `jquery-ui.css`. The latter
226
+ is available as `jquery.ui.all.css` however.
@@ -0,0 +1,221 @@
1
+ require 'json'
2
+ require 'bundler/gem_tasks'
3
+
4
+ # returns the source filename for a given JSON build file
5
+ # (e.g., "ui.core.jquery.json" returns "jquery.ui.core.js")
6
+ def source_file_for_build_file(build_file)
7
+ "jquery.#{build_file.sub('.jquery.json', '')}.js"
8
+ end
9
+
10
+ # returns the source filename for a named file in the 'dependencies'
11
+ # array of a JSON build file
12
+ # (e.g., if the JSON build file contains
13
+ #
14
+ # "dependencies": {
15
+ # "jquery": ">=1.6",
16
+ # "ui.core": "1.9.2",
17
+ # "ui.widget": "1.9.2"
18
+ # },
19
+ #
20
+ # then "ui.widget" returns "jquery.ui.widget.js")
21
+ #
22
+ # The only exception is "jquery", which doesn't follow the
23
+ # same naming conventions so its a special case.
24
+ def source_file_for_dependency_entry(dep_entry)
25
+ # if the dependent file is jquery.js itself, return its filename
26
+ return "jquery.js" if dep_entry == 'jquery'
27
+
28
+ # otherwise, tack 'jquery.' on the front
29
+ "jquery.#{dep_entry}.js"
30
+ end
31
+
32
+ # return a Hash of dependency info, whose keys are jquery-ui
33
+ # source files and values are Arrays containing the source files
34
+ # they depend on
35
+ def map_dependencies
36
+ dependencies = {}
37
+ Dir.glob("jquery-ui/*.jquery.json").each do |build_file|
38
+ build_info = JSON.parse(File.read build_file)
39
+ source_file_name = source_file_for_build_file(File.basename(build_file))
40
+
41
+ deps = build_info['dependencies'].keys
42
+
43
+ # None of jquery.ui files should depend on jquery.js,
44
+ # so we remove 'jquery' from the list of dependencies for all files
45
+ deps.reject! {|d| d == "jquery" }
46
+
47
+ deps.map! {|d| source_file_for_dependency_entry d }
48
+
49
+ dependencies[source_file_name] = deps
50
+ end
51
+ dependencies
52
+ end
53
+
54
+ DEPENDENCY_HASH = map_dependencies
55
+
56
+ def version
57
+ JSON.load(File.read('jquery-ui/package.json'))['version']
58
+ end
59
+
60
+ task :submodule do
61
+ sh 'git submodule update --init' unless File.exist?('jquery-ui/README.md')
62
+ end
63
+
64
+ def get_js_dependencies(basename)
65
+ dependencies = DEPENDENCY_HASH[basename]
66
+ if dependencies.nil?
67
+ puts "Warning: No dependencies found for #{basename}"
68
+ dependencies = []
69
+ end
70
+ # Make sure we do not package assets with broken dependencies
71
+ dependencies.each do |dep|
72
+ unless File.exist?("jquery-ui/ui/#{dep}")
73
+ fail "#{basename}: missing #{dep}"
74
+ end
75
+ end
76
+ dependencies
77
+ end
78
+
79
+ def remove_js_extension(path)
80
+ path.chomp(".js")
81
+ end
82
+
83
+ def protect_copyright_notice(source_code)
84
+ # YUI does not minify comments starting with "/*!"
85
+ # The i18n files start with non-copyright comments, so we require a newline
86
+ # to avoid protecting those
87
+ source_code.gsub!(/\A\s*\/\*\r?\n/, "/*!\n")
88
+ end
89
+
90
+ desc "Remove the app directory"
91
+ task :clean do
92
+ rm_rf 'app'
93
+ end
94
+
95
+ desc "Generate the JavaScript assets"
96
+ task :javascripts => :submodule do
97
+ Rake.rake_output_message 'Generating javascripts'
98
+
99
+ target_dir = "app/assets/javascripts"
100
+ mkdir_p target_dir
101
+
102
+ Dir.glob("jquery-ui/ui/*.js").each do |path|
103
+ basename = File.basename(path)
104
+ dep_modules = get_js_dependencies(basename).map(&method(:remove_js_extension))
105
+ File.open("#{target_dir}/#{basename}", "w") do |out|
106
+ dep_modules.each do |mod|
107
+ out.write("//= require #{mod}\n")
108
+ end
109
+ out.write("\n") unless dep_modules.empty?
110
+ source_code = File.read(path)
111
+ source_code.gsub!('@VERSION', version)
112
+ protect_copyright_notice(source_code)
113
+ out.write(source_code)
114
+ end
115
+ end
116
+
117
+ # process the i18n files separately for performance, since they will not have dependencies
118
+ # https://github.com/joliss/jquery-ui-rails/issues/9
119
+ Dir.glob("jquery-ui/ui/i18n/*.js").each do |path|
120
+ basename = File.basename(path)
121
+ File.open("#{target_dir}/#{basename}", "w") do |out|
122
+ source_code = File.read(path)
123
+ source_code.gsub!('@VERSION', version)
124
+ protect_copyright_notice(source_code)
125
+ out.write(source_code)
126
+ end
127
+ end
128
+
129
+ File.open("#{target_dir}/jquery.ui.effect.all.js", "w") do |out|
130
+ Dir.glob("jquery-ui/ui/jquery.ui.effect*.js").sort.each do |path|
131
+ asset_name = remove_js_extension(File.basename(path))
132
+ out.write("//= require #{asset_name}\n")
133
+ end
134
+ end
135
+ File.open("#{target_dir}/jquery.ui.all.js", "w") do |out|
136
+ Dir.glob("jquery-ui/ui/*.js").sort.each do |path|
137
+ asset_name = remove_js_extension(File.basename(path))
138
+ out.write("//= require #{asset_name}\n")
139
+ end
140
+ end
141
+ end
142
+
143
+ desc "Generate the CSS assets"
144
+ task :stylesheets => :submodule do
145
+ Rake.rake_output_message 'Generating stylesheets'
146
+
147
+ target_dir = "app/assets/stylesheets"
148
+ mkdir_p target_dir
149
+
150
+ css_dir = "jquery-ui/themes/base"
151
+ Dir.glob("#{css_dir}/*.css").each do |path|
152
+ basename = File.basename(path)
153
+ source_code = File.read(path)
154
+ source_code.gsub!('@VERSION', version)
155
+ protect_copyright_notice(source_code)
156
+ extra_dependencies = []
157
+ # Is "theme" listed among the dependencies for the matching JS file?
158
+ unless basename =~ /\.(all|base|core)\./
159
+ dependencies = DEPENDENCY_HASH[basename.sub(/\.css/, '.js')]
160
+ if dependencies.nil?
161
+ puts "Warning: No matching JavaScript dependencies found for #{basename}"
162
+ extra_dependencies << 'jquery.ui.core'
163
+ else
164
+ dependencies.each do |dependency|
165
+ dependency = dependency.sub(/\.js$/, '')
166
+ dependent_stylesheet = "#{dependency}.css"
167
+ extra_dependencies << dependency if File.exists?("#{css_dir}/#{dependent_stylesheet}")
168
+ end
169
+ extra_dependencies << 'jquery.ui.theme'
170
+ end
171
+ end
172
+ extra_dependencies.reverse.each do |dep|
173
+ # Add after first comment block
174
+ source_code = source_code.sub(/\A((.*?\*\/\n)?)/m, "\\1/*\n *= require #{dep}\n */\n")
175
+ end
176
+ # Use "require" instead of @import
177
+ source_code.gsub!(/^@import (.*)$/) { |s|
178
+ m = s.match(/^@import (url\()?"(?<module>[-_.a-zA-Z]+)\.css"\)?;/) \
179
+ or fail "Cannot parse import: #{s}"
180
+ "/*\n *= require #{m['module']}\n */"
181
+ }
182
+ # Be cute: collapse multiple require comment blocks into one
183
+ source_code.gsub!(/^( \*= require .*)\n \*\/(\n+)\/\*\n(?= \*= require )/, '\1\2')
184
+ # Replace hard-coded image URLs with asset path helpers
185
+ source_code.gsub!(/url\("?images\/([-_.a-zA-Z0-9]+)"?\)/, 'url(<%= image_path("jquery-ui/\1") %>)')
186
+ File.open("#{target_dir}/#{basename}.erb", "w") do |out|
187
+ out.write(source_code)
188
+ end
189
+ end
190
+ end
191
+
192
+ desc "Generate the image assets"
193
+ task :images => :submodule do
194
+ Rake.rake_output_message 'Copying images'
195
+
196
+ target_dir = "app/assets/images/jquery-ui"
197
+ mkdir_p target_dir
198
+
199
+ FileUtils.cp(Dir.glob("jquery-ui/themes/base/images/*"), target_dir)
200
+ end
201
+
202
+ desc "Update Jquery::Ui::JQUERY_UI_VERSION"
203
+ task :version => :submodule do
204
+ Rake.rake_output_message "Setting Jquery::Ui::JQUERY_UI_VERSION = \"#{version}\""
205
+
206
+ versionRb = 'lib/jquery/ui/version.rb'
207
+ versionRbSource = File.read(versionRb)
208
+ versionDefinition = "JQUERY_UI_VERSION = \"#{version}\""
209
+ versionRbSource.sub! /JQUERY_UI_VERSION = "[^"]*"/, versionDefinition \
210
+ or fail "Could not find JQUERY_UI_VERSION in #{versionRb}"
211
+ File.open(versionRb, 'w') do |out|
212
+ out.write(versionRbSource)
213
+ end
214
+ end
215
+
216
+ desc "Clean and then generate everything (default)"
217
+ task :assets => [:clean, :javascripts, :stylesheets, :images, :version]
218
+
219
+ task :build => :assets
220
+
221
+ task :default => :assets