compass-jquery-plugin 0.3.0.0 → 0.3.1.beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (322) hide show
  1. data/README.textile +69 -13
  2. data/Rakefile +1 -1
  3. data/VERSION.yml +2 -2
  4. data/gem_tasks/jqgrid.rake +119 -0
  5. data/gem_tasks/jrails.rake +78 -77
  6. data/gem_tasks/mobile.rake +156 -0
  7. data/gem_tasks/rubygems.rake +5 -1
  8. data/gem_tasks/secret_sauce.rake +64 -0
  9. data/lib/jquery/gridify.rb +42 -0
  10. data/lib/jquery/gridify/assertions.rb +37 -0
  11. data/lib/jquery/gridify/grid.rb +210 -0
  12. data/lib/jquery/gridify/grid_column.rb +134 -0
  13. data/lib/jquery/gridify/grid_finder.rb +223 -0
  14. data/lib/jquery/gridify/grid_options.rb +279 -0
  15. data/lib/jquery/gridify/grid_view.rb +435 -0
  16. data/lib/jquery/jqgrid.rb +5 -0
  17. data/lib/jquery/jqgrid/jqgrid.rb +438 -0
  18. data/lib/jquery/mobile.rb +3 -0
  19. data/lib/jquery/secret_sauce.rb +9 -0
  20. data/lib/jquery/secret_sauce/controller/ui_dialog_controls.rb +14 -0
  21. data/lib/jquery/secret_sauce/controller/ui_grid_controls.rb +18 -0
  22. data/lib/jquery/secret_sauce/helpers/ui_dialog_helper.rb +6 -0
  23. data/lib/jquery/secret_sauce/helpers/ui_form_helper.rb +118 -0
  24. data/lib/jquery/secret_sauce/helpers/ui_grid_helper.rb +226 -0
  25. data/lib/jquery/secret_sauce/model/find_for_grid.rb +42 -0
  26. data/templates/dynatree/jquery.dynatree.js +258 -147
  27. data/templates/dynatree/jquery.dynatree.min.js +81 -79
  28. data/templates/dynatree/jquery/dynatree/aero.scss +35 -18
  29. data/templates/dynatree/jquery/dynatree/aero/drop_sibling_here.png +0 -0
  30. data/templates/dynatree/jquery/dynatree/aqua.scss +36 -19
  31. data/templates/dynatree/jquery/dynatree/aqua/drop_sibling_here.png +0 -0
  32. data/templates/dynatree/jquery/dynatree/crystal.scss +38 -21
  33. data/templates/dynatree/jquery/dynatree/crystal/drop_sibling_here.png +0 -0
  34. data/templates/dynatree/jquery/dynatree/xp.scss +59 -42
  35. data/templates/dynatree/jquery/dynatree/xp/drop_sibling_here.png +0 -0
  36. data/templates/dynatree/manifest.rb +4 -0
  37. data/templates/jqgrid/config/initializers/jqgrid.rb +4 -0
  38. data/templates/jqgrid/config/locales/jquery/jqgrid/de.yml +7 -0
  39. data/templates/jqgrid/config/locales/jquery/jqgrid/en.yml +7 -0
  40. data/templates/jqgrid/i18n/jqgrid/locale-bg.js +132 -0
  41. data/templates/jqgrid/i18n/jqgrid/locale-bg.min.js +6 -0
  42. data/templates/jqgrid/i18n/jqgrid/locale-bg1251.js +132 -0
  43. data/templates/jqgrid/i18n/jqgrid/locale-bg1251.min.js +6 -0
  44. data/templates/jqgrid/i18n/jqgrid/locale-cat.js +128 -0
  45. data/templates/jqgrid/i18n/jqgrid/locale-cat.min.js +6 -0
  46. data/templates/jqgrid/i18n/jqgrid/locale-cn.js +132 -0
  47. data/templates/jqgrid/i18n/jqgrid/locale-cn.min.js +5 -0
  48. data/templates/jqgrid/i18n/jqgrid/locale-cs.js +128 -0
  49. data/templates/jqgrid/i18n/jqgrid/locale-cs.min.js +6 -0
  50. data/templates/jqgrid/i18n/jqgrid/locale-da.js +128 -0
  51. data/templates/jqgrid/i18n/jqgrid/locale-da.min.js +6 -0
  52. data/templates/jqgrid/i18n/jqgrid/locale-de.js +133 -0
  53. data/templates/jqgrid/i18n/jqgrid/locale-de.min.js +7 -0
  54. data/templates/jqgrid/i18n/jqgrid/locale-el.js +126 -0
  55. data/templates/jqgrid/i18n/jqgrid/locale-el.min.js +7 -0
  56. data/templates/jqgrid/i18n/jqgrid/locale-en.js +128 -0
  57. data/templates/jqgrid/i18n/jqgrid/locale-en.min.js +6 -0
  58. data/templates/jqgrid/i18n/jqgrid/locale-es.js +128 -0
  59. data/templates/jqgrid/i18n/jqgrid/locale-es.min.js +7 -0
  60. data/templates/jqgrid/i18n/jqgrid/locale-fa.js +125 -0
  61. data/templates/jqgrid/i18n/jqgrid/locale-fa.min.js +6 -0
  62. data/templates/jqgrid/i18n/jqgrid/locale-fi.js +130 -0
  63. data/templates/jqgrid/i18n/jqgrid/locale-fi.min.js +6 -0
  64. data/templates/jqgrid/i18n/jqgrid/locale-fr.js +126 -0
  65. data/templates/jqgrid/i18n/jqgrid/locale-fr.min.js +7 -0
  66. data/templates/jqgrid/i18n/jqgrid/locale-gl.js +126 -0
  67. data/templates/jqgrid/i18n/jqgrid/locale-gl.min.js +7 -0
  68. data/templates/jqgrid/i18n/jqgrid/locale-he.js +127 -0
  69. data/templates/jqgrid/i18n/jqgrid/locale-he.min.js +6 -0
  70. data/templates/jqgrid/i18n/jqgrid/locale-hu.js +129 -0
  71. data/templates/jqgrid/i18n/jqgrid/locale-hu.min.js +6 -0
  72. data/templates/jqgrid/i18n/jqgrid/locale-is.js +126 -0
  73. data/templates/jqgrid/i18n/jqgrid/locale-is.min.js +6 -0
  74. data/templates/jqgrid/i18n/jqgrid/locale-it.js +1 -0
  75. data/templates/jqgrid/i18n/jqgrid/locale-it.min.js +7 -0
  76. data/templates/jqgrid/i18n/jqgrid/locale-ja.js +155 -0
  77. data/templates/jqgrid/i18n/jqgrid/locale-ja.min.js +5 -0
  78. data/templates/jqgrid/i18n/jqgrid/locale-nl.js +149 -0
  79. data/templates/jqgrid/i18n/jqgrid/locale-nl.min.js +6 -0
  80. data/templates/jqgrid/i18n/jqgrid/locale-no.js +1 -0
  81. data/templates/jqgrid/i18n/jqgrid/locale-no.min.js +6 -0
  82. data/templates/jqgrid/i18n/jqgrid/locale-pl.js +127 -0
  83. data/templates/jqgrid/i18n/jqgrid/locale-pl.min.js +6 -0
  84. data/templates/jqgrid/i18n/jqgrid/locale-pt-br.js +127 -0
  85. data/templates/jqgrid/i18n/jqgrid/locale-pt-br.min.js +6 -0
  86. data/templates/jqgrid/i18n/jqgrid/locale-pt.js +125 -0
  87. data/templates/jqgrid/i18n/jqgrid/locale-pt.min.js +6 -0
  88. data/templates/jqgrid/i18n/jqgrid/locale-ro.js +139 -0
  89. data/templates/jqgrid/i18n/jqgrid/locale-ro.min.js +7 -0
  90. data/templates/jqgrid/i18n/jqgrid/locale-ru.js +127 -0
  91. data/templates/jqgrid/i18n/jqgrid/locale-ru.min.js +7 -0
  92. data/templates/jqgrid/i18n/jqgrid/locale-sk.js +127 -0
  93. data/templates/jqgrid/i18n/jqgrid/locale-sk.min.js +6 -0
  94. data/templates/jqgrid/i18n/jqgrid/locale-sr.js +128 -0
  95. data/templates/jqgrid/i18n/jqgrid/locale-sr.min.js +6 -0
  96. data/templates/jqgrid/i18n/jqgrid/locale-sv.js +127 -0
  97. data/templates/jqgrid/i18n/jqgrid/locale-sv.min.js +6 -0
  98. data/templates/jqgrid/i18n/jqgrid/locale-tr.js +126 -0
  99. data/templates/jqgrid/i18n/jqgrid/locale-tr.min.js +6 -0
  100. data/templates/jqgrid/i18n/jqgrid/locale-ua.js +127 -0
  101. data/templates/jqgrid/i18n/jqgrid/locale-ua.min.js +7 -0
  102. data/templates/jqgrid/jquery.jqGrid.js +11604 -0
  103. data/templates/jqgrid/jquery.jqGrid.min.js +472 -0
  104. data/templates/jqgrid/jquery/jqGrid.scss +692 -0
  105. data/templates/jqgrid/manifest.rb +72 -0
  106. data/templates/jqgrid/public/stylesheets/ellipsis-xbl.xml +13 -0
  107. data/templates/jqtouch/jquery/touch/apple.scss +5 -5
  108. data/templates/jqtouch/jquery/touch/default.scss +5 -5
  109. data/templates/jqtouch/jquery/touch/jqt.scss +5 -5
  110. data/templates/jrails/config/initializers/jrails.rb +3 -0
  111. data/templates/jrails/jquery-ui.js +45 -62
  112. data/templates/jrails/jquery-ui.min.js +22 -22
  113. data/templates/jrails/jquery.js +340 -206
  114. data/templates/jrails/jquery.min.js +152 -151
  115. data/templates/jrails/jquery.tmpl.js +489 -0
  116. data/templates/jrails/jquery.tmpl.min.js +12 -0
  117. data/templates/jrails/jquery.tmplPlus.js +98 -0
  118. data/templates/jrails/jquery.tmplPlus.min.js +3 -0
  119. data/templates/jrails/jquery/ui/_theme.scss +3 -1
  120. data/templates/jrails/manifest.rb +4 -0
  121. data/templates/jstree/jquery.jstree.js +4479 -4468
  122. data/templates/jstree/jquery.jstree.min.js +4 -3
  123. data/templates/mobile/config/initializers/mobile.rb +6 -0
  124. data/templates/mobile/glyphish/Read me first - license.txt +14 -0
  125. data/templates/mobile/glyphish/icons-black/01-refresh.png +0 -0
  126. data/templates/mobile/glyphish/icons-black/02-redo.png +0 -0
  127. data/templates/mobile/glyphish/icons-black/03-loopback.png +0 -0
  128. data/templates/mobile/glyphish/icons-black/04-squiggle.png +0 -0
  129. data/templates/mobile/glyphish/icons-black/05-shuffle.png +0 -0
  130. data/templates/mobile/glyphish/icons-black/06-magnifying-glass.png +0 -0
  131. data/templates/mobile/glyphish/icons-black/07-map-marker.png +0 -0
  132. data/templates/mobile/glyphish/icons-black/08-chat.png +0 -0
  133. data/templates/mobile/glyphish/icons-black/09-chat2.png +0 -0
  134. data/templates/mobile/glyphish/icons-black/10-medical.png +0 -0
  135. data/templates/mobile/glyphish/icons-black/100-coffee.png +0 -0
  136. data/templates/mobile/glyphish/icons-black/101-gameplan.png +0 -0
  137. data/templates/mobile/glyphish/icons-black/102-walk.png +0 -0
  138. data/templates/mobile/glyphish/icons-black/103-map.png +0 -0
  139. data/templates/mobile/glyphish/icons-black/104-index-cards.png +0 -0
  140. data/templates/mobile/glyphish/icons-black/105-piano.png +0 -0
  141. data/templates/mobile/glyphish/icons-black/106-sliders.png +0 -0
  142. data/templates/mobile/glyphish/icons-black/107-widescreen.png +0 -0
  143. data/templates/mobile/glyphish/icons-black/108-badge.png +0 -0
  144. data/templates/mobile/glyphish/icons-black/109-chicken.png +0 -0
  145. data/templates/mobile/glyphish/icons-black/11-clock.png +0 -0
  146. data/templates/mobile/glyphish/icons-black/110-bug.png +0 -0
  147. data/templates/mobile/glyphish/icons-black/111-user.png +0 -0
  148. data/templates/mobile/glyphish/icons-black/112-group.png +0 -0
  149. data/templates/mobile/glyphish/icons-black/113-navigation.png +0 -0
  150. data/templates/mobile/glyphish/icons-black/114-balloon.png +0 -0
  151. data/templates/mobile/glyphish/icons-black/115-bow-and-arrow.png +0 -0
  152. data/templates/mobile/glyphish/icons-black/116-controller.png +0 -0
  153. data/templates/mobile/glyphish/icons-black/117-todo.png +0 -0
  154. data/templates/mobile/glyphish/icons-black/118-coathanger.png +0 -0
  155. data/templates/mobile/glyphish/icons-black/119-piggybank.png +0 -0
  156. data/templates/mobile/glyphish/icons-black/12-eye.png +0 -0
  157. data/templates/mobile/glyphish/icons-black/120-headphones.png +0 -0
  158. data/templates/mobile/glyphish/icons-black/121-lanscape.png +0 -0
  159. data/templates/mobile/glyphish/icons-black/122-stats.png +0 -0
  160. data/templates/mobile/glyphish/icons-black/123-id-card.png +0 -0
  161. data/templates/mobile/glyphish/icons-black/124-bullhorn.png +0 -0
  162. data/templates/mobile/glyphish/icons-black/125-food.png +0 -0
  163. data/templates/mobile/glyphish/icons-black/126-moon.png +0 -0
  164. data/templates/mobile/glyphish/icons-black/127-sock.png +0 -0
  165. data/templates/mobile/glyphish/icons-black/128-bone.png +0 -0
  166. data/templates/mobile/glyphish/icons-black/129-golf.png +0 -0
  167. data/templates/mobile/glyphish/icons-black/13-target.png +0 -0
  168. data/templates/mobile/glyphish/icons-black/130-dice.png +0 -0
  169. data/templates/mobile/glyphish/icons-black/14-tag.png +0 -0
  170. data/templates/mobile/glyphish/icons-black/15-tags.png +0 -0
  171. data/templates/mobile/glyphish/icons-black/16-line-chart.png +0 -0
  172. data/templates/mobile/glyphish/icons-black/17-bar-chart.png +0 -0
  173. data/templates/mobile/glyphish/icons-black/18-envelope.png +0 -0
  174. data/templates/mobile/glyphish/icons-black/19-gear.png +0 -0
  175. data/templates/mobile/glyphish/icons-black/20-gear2.png +0 -0
  176. data/templates/mobile/glyphish/icons-black/21-skull.png +0 -0
  177. data/templates/mobile/glyphish/icons-black/22-skull-n-crossbones.png +0 -0
  178. data/templates/mobile/glyphish/icons-black/23-bird.png +0 -0
  179. data/templates/mobile/glyphish/icons-black/24-gift.png +0 -0
  180. data/templates/mobile/glyphish/icons-black/25-weather.png +0 -0
  181. data/templates/mobile/glyphish/icons-black/26-bandaid.png +0 -0
  182. data/templates/mobile/glyphish/icons-black/27-planet.png +0 -0
  183. data/templates/mobile/glyphish/icons-black/28-star.png +0 -0
  184. data/templates/mobile/glyphish/icons-black/29-heart.png +0 -0
  185. data/templates/mobile/glyphish/icons-black/30-key.png +0 -0
  186. data/templates/mobile/glyphish/icons-black/31-ipod.png +0 -0
  187. data/templates/mobile/glyphish/icons-black/32-iphone.png +0 -0
  188. data/templates/mobile/glyphish/icons-black/33-cabinet.png +0 -0
  189. data/templates/mobile/glyphish/icons-black/34-coffee.png +0 -0
  190. data/templates/mobile/glyphish/icons-black/35-shopping-bag.png +0 -0
  191. data/templates/mobile/glyphish/icons-black/36-toolbox.png +0 -0
  192. data/templates/mobile/glyphish/icons-black/37-suitcase.png +0 -0
  193. data/templates/mobile/glyphish/icons-black/38-airplane.png +0 -0
  194. data/templates/mobile/glyphish/icons-black/39-spraycan.png +0 -0
  195. data/templates/mobile/glyphish/icons-black/40-inbox.png +0 -0
  196. data/templates/mobile/glyphish/icons-black/41-picture-frame.png +0 -0
  197. data/templates/mobile/glyphish/icons-black/42-photos.png +0 -0
  198. data/templates/mobile/glyphish/icons-black/43-film-roll.png +0 -0
  199. data/templates/mobile/glyphish/icons-black/44-shoebox.png +0 -0
  200. data/templates/mobile/glyphish/icons-black/45-movie1.png +0 -0
  201. data/templates/mobile/glyphish/icons-black/46-movie2.png +0 -0
  202. data/templates/mobile/glyphish/icons-black/47-fuel.png +0 -0
  203. data/templates/mobile/glyphish/icons-black/48-fork-and-knife.png +0 -0
  204. data/templates/mobile/glyphish/icons-black/49-battery.png +0 -0
  205. data/templates/mobile/glyphish/icons-black/50-beaker.png +0 -0
  206. data/templates/mobile/glyphish/icons-black/51-outlet.png +0 -0
  207. data/templates/mobile/glyphish/icons-black/52-pinetree.png +0 -0
  208. data/templates/mobile/glyphish/icons-black/53-house.png +0 -0
  209. data/templates/mobile/glyphish/icons-black/54-lock.png +0 -0
  210. data/templates/mobile/glyphish/icons-black/55-network.png +0 -0
  211. data/templates/mobile/glyphish/icons-black/56-cloud.png +0 -0
  212. data/templates/mobile/glyphish/icons-black/57-download.png +0 -0
  213. data/templates/mobile/glyphish/icons-black/58-bookmark.png +0 -0
  214. data/templates/mobile/glyphish/icons-black/59-flag.png +0 -0
  215. data/templates/mobile/glyphish/icons-black/60-signpost.png +0 -0
  216. data/templates/mobile/glyphish/icons-black/61-brightness.png +0 -0
  217. data/templates/mobile/glyphish/icons-black/62-contrast.png +0 -0
  218. data/templates/mobile/glyphish/icons-black/63-runner.png +0 -0
  219. data/templates/mobile/glyphish/icons-black/64-zap.png +0 -0
  220. data/templates/mobile/glyphish/icons-black/65-note.png +0 -0
  221. data/templates/mobile/glyphish/icons-black/66-microphone.png +0 -0
  222. data/templates/mobile/glyphish/icons-black/67-tshirt.png +0 -0
  223. data/templates/mobile/glyphish/icons-black/68-paperclip.png +0 -0
  224. data/templates/mobile/glyphish/icons-black/69-display.png +0 -0
  225. data/templates/mobile/glyphish/icons-black/70-tv.png +0 -0
  226. data/templates/mobile/glyphish/icons-black/71-compass.png +0 -0
  227. data/templates/mobile/glyphish/icons-black/72-pin.png +0 -0
  228. data/templates/mobile/glyphish/icons-black/73-radar.png +0 -0
  229. data/templates/mobile/glyphish/icons-black/74-location.png +0 -0
  230. data/templates/mobile/glyphish/icons-black/75-phone.png +0 -0
  231. data/templates/mobile/glyphish/icons-black/76-baby.png +0 -0
  232. data/templates/mobile/glyphish/icons-black/77-ekg.png +0 -0
  233. data/templates/mobile/glyphish/icons-black/78-stopwatch.png +0 -0
  234. data/templates/mobile/glyphish/icons-black/79-medical-bag.png +0 -0
  235. data/templates/mobile/glyphish/icons-black/80-shopping-cart.png +0 -0
  236. data/templates/mobile/glyphish/icons-black/81-dashboard.png +0 -0
  237. data/templates/mobile/glyphish/icons-black/82-dogpaw.png +0 -0
  238. data/templates/mobile/glyphish/icons-black/83-calendar.png +0 -0
  239. data/templates/mobile/glyphish/icons-black/84-lightbulb.png +0 -0
  240. data/templates/mobile/glyphish/icons-black/85-trophy.png +0 -0
  241. data/templates/mobile/glyphish/icons-black/86-camera.png +0 -0
  242. data/templates/mobile/glyphish/icons-black/87-wineglass.png +0 -0
  243. data/templates/mobile/glyphish/icons-black/88-beermug.png +0 -0
  244. data/templates/mobile/glyphish/icons-black/89-dumbbell.png +0 -0
  245. data/templates/mobile/glyphish/icons-black/90-lifebuoy.png +0 -0
  246. data/templates/mobile/glyphish/icons-black/91-beaker2.png +0 -0
  247. data/templates/mobile/glyphish/icons-black/92-testtube.png +0 -0
  248. data/templates/mobile/glyphish/icons-black/93-thermometer.png +0 -0
  249. data/templates/mobile/glyphish/icons-black/94-pill.png +0 -0
  250. data/templates/mobile/glyphish/icons-black/95-equalizer.png +0 -0
  251. data/templates/mobile/glyphish/icons-black/96-book.png +0 -0
  252. data/templates/mobile/glyphish/icons-black/97-puzzle.png +0 -0
  253. data/templates/mobile/glyphish/icons-black/98-palette.png +0 -0
  254. data/templates/mobile/glyphish/icons-black/99-umbrella.png +0 -0
  255. data/templates/mobile/glyphish/icons-white/09-chat2.png +0 -0
  256. data/templates/mobile/glyphish/icons-white/100-coffee.png +0 -0
  257. data/templates/mobile/glyphish/icons-white/18-envelope.png +0 -0
  258. data/templates/mobile/glyphish/icons-white/19-gear.png +0 -0
  259. data/templates/mobile/glyphish/icons-white/21-skull.png +0 -0
  260. data/templates/mobile/glyphish/icons-white/30-key.png +0 -0
  261. data/templates/mobile/glyphish/icons-white/34-coffee.png +0 -0
  262. data/templates/mobile/glyphish/icons-white/88-beermug.png +0 -0
  263. data/templates/mobile/glyphish/mini-icons-black/band-aid.png +0 -0
  264. data/templates/mobile/glyphish/mini-icons-black/chat.png +0 -0
  265. data/templates/mobile/glyphish/mini-icons-black/clock.png +0 -0
  266. data/templates/mobile/glyphish/mini-icons-black/eye.png +0 -0
  267. data/templates/mobile/glyphish/mini-icons-black/flag.png +0 -0
  268. data/templates/mobile/glyphish/mini-icons-black/fork-and-knife.png +0 -0
  269. data/templates/mobile/glyphish/mini-icons-black/gear.png +0 -0
  270. data/templates/mobile/glyphish/mini-icons-black/heart.png +0 -0
  271. data/templates/mobile/glyphish/mini-icons-black/lightning-bolt.png +0 -0
  272. data/templates/mobile/glyphish/mini-icons-black/magnifying-glass.png +0 -0
  273. data/templates/mobile/glyphish/mini-icons-black/map-marker.png +0 -0
  274. data/templates/mobile/glyphish/mini-icons-black/map-pin.png +0 -0
  275. data/templates/mobile/glyphish/mini-icons-black/microphone.png +0 -0
  276. data/templates/mobile/glyphish/mini-icons-black/music-note.png +0 -0
  277. data/templates/mobile/glyphish/mini-icons-black/paw.png +0 -0
  278. data/templates/mobile/glyphish/mini-icons-black/plus.png +0 -0
  279. data/templates/mobile/glyphish/mini-icons-black/puzzle.png +0 -0
  280. data/templates/mobile/glyphish/mini-icons-black/star.png +0 -0
  281. data/templates/mobile/glyphish/mini-icons-black/tag.png +0 -0
  282. data/templates/mobile/glyphish/mini-icons-black/tshirt.png +0 -0
  283. data/templates/mobile/jquery.mobile.js +3995 -0
  284. data/templates/mobile/jquery.mobile.min.js +28 -0
  285. data/templates/mobile/jquery/mobile/_base.scss +1344 -0
  286. data/templates/mobile/jquery/mobile/default.scss +745 -0
  287. data/templates/mobile/jquery/mobile/default/ajax-loader.png +0 -0
  288. data/templates/mobile/jquery/mobile/default/form-check-off.png +0 -0
  289. data/templates/mobile/jquery/mobile/default/form-check-on.png +0 -0
  290. data/templates/mobile/jquery/mobile/default/form-radio-off.png +0 -0
  291. data/templates/mobile/jquery/mobile/default/form-radio-on.png +0 -0
  292. data/templates/mobile/jquery/mobile/default/icon-search-black.png +0 -0
  293. data/templates/mobile/jquery/mobile/default/icons-18-black.png +0 -0
  294. data/templates/mobile/jquery/mobile/default/icons-18-white.png +0 -0
  295. data/templates/mobile/jquery/mobile/default/icons-36-black.png +0 -0
  296. data/templates/mobile/jquery/mobile/default/icons-36-white.png +0 -0
  297. data/templates/mobile/jquery/mobile/valencia.scss +807 -0
  298. data/templates/mobile/jquery/mobile/valencia/ajax-loader.png +0 -0
  299. data/templates/mobile/jquery/mobile/valencia/form-check-off.png +0 -0
  300. data/templates/mobile/jquery/mobile/valencia/form-check-on.png +0 -0
  301. data/templates/mobile/jquery/mobile/valencia/form-radio-off.png +0 -0
  302. data/templates/mobile/jquery/mobile/valencia/form-radio-on.png +0 -0
  303. data/templates/mobile/jquery/mobile/valencia/icon-search-black.png +0 -0
  304. data/templates/mobile/jquery/mobile/valencia/icons-18-black.png +0 -0
  305. data/templates/mobile/jquery/mobile/valencia/icons-18-white.png +0 -0
  306. data/templates/mobile/jquery/mobile/valencia/icons-36-black.png +0 -0
  307. data/templates/mobile/jquery/mobile/valencia/icons-36-white.png +0 -0
  308. data/templates/mobile/jquery/mobile/valencia/texture_05.png +0 -0
  309. data/templates/mobile/jquery/mobile/valencia/texture_075.png +0 -0
  310. data/templates/mobile/lib/tasks/jquery.mobile.rake +106 -0
  311. data/templates/mobile/manifest.rb +191 -0
  312. data/templates/secret_sauce/app/views/shared/_ui_form_error_messages.html.haml +6 -0
  313. data/templates/secret_sauce/app/views/shared/_ui_grid_for_without_block.js.haml +144 -0
  314. data/templates/secret_sauce/app/views/shared/_ui_static_dialog.html.haml +6 -0
  315. data/templates/secret_sauce/config/initializers/secret_sauce.rb +8 -0
  316. data/templates/secret_sauce/jquery/secret_sauce.scss +33 -0
  317. data/templates/secret_sauce/manifest.rb +10 -0
  318. data/templates/secret_sauce/secret_sauce.js +12 -0
  319. data/templates/secret_sauce/secret_sauce.min.js +1 -0
  320. metadata +313 -17
  321. data/.gitignore +0 -22
  322. data/compass-jquery-plugin.gemspec +0 -1064
@@ -0,0 +1,72 @@
1
+ # Generated by compass-jquery-plugin/gem-tasks/jqgrid.rake
2
+ # Install with: compass install jquery/jqgrid
3
+
4
+ file 'config/initializers/jqgrid.rb'
5
+ file 'config/locales/jquery/jqgrid/de.yml'
6
+ file 'config/locales/jquery/jqgrid/en.yml'
7
+ javascript 'jquery.jqGrid.js'
8
+ javascript 'jquery.jqGrid.min.js'
9
+ javascript 'i18n/jqgrid/locale-bg.js'
10
+ javascript 'i18n/jqgrid/locale-bg.min.js'
11
+ javascript 'i18n/jqgrid/locale-bg1251.js'
12
+ javascript 'i18n/jqgrid/locale-bg1251.min.js'
13
+ javascript 'i18n/jqgrid/locale-cat.js'
14
+ javascript 'i18n/jqgrid/locale-cat.min.js'
15
+ javascript 'i18n/jqgrid/locale-cn.js'
16
+ javascript 'i18n/jqgrid/locale-cn.min.js'
17
+ javascript 'i18n/jqgrid/locale-cs.js'
18
+ javascript 'i18n/jqgrid/locale-cs.min.js'
19
+ javascript 'i18n/jqgrid/locale-da.js'
20
+ javascript 'i18n/jqgrid/locale-da.min.js'
21
+ javascript 'i18n/jqgrid/locale-de.js'
22
+ javascript 'i18n/jqgrid/locale-de.min.js'
23
+ javascript 'i18n/jqgrid/locale-el.js'
24
+ javascript 'i18n/jqgrid/locale-el.min.js'
25
+ javascript 'i18n/jqgrid/locale-en.js'
26
+ javascript 'i18n/jqgrid/locale-en.min.js'
27
+ javascript 'i18n/jqgrid/locale-es.js'
28
+ javascript 'i18n/jqgrid/locale-es.min.js'
29
+ javascript 'i18n/jqgrid/locale-fa.js'
30
+ javascript 'i18n/jqgrid/locale-fa.min.js'
31
+ javascript 'i18n/jqgrid/locale-fi.js'
32
+ javascript 'i18n/jqgrid/locale-fi.min.js'
33
+ javascript 'i18n/jqgrid/locale-fr.js'
34
+ javascript 'i18n/jqgrid/locale-fr.min.js'
35
+ javascript 'i18n/jqgrid/locale-gl.js'
36
+ javascript 'i18n/jqgrid/locale-gl.min.js'
37
+ javascript 'i18n/jqgrid/locale-he.js'
38
+ javascript 'i18n/jqgrid/locale-he.min.js'
39
+ javascript 'i18n/jqgrid/locale-hu.js'
40
+ javascript 'i18n/jqgrid/locale-hu.min.js'
41
+ javascript 'i18n/jqgrid/locale-is.js'
42
+ javascript 'i18n/jqgrid/locale-is.min.js'
43
+ javascript 'i18n/jqgrid/locale-it.js'
44
+ javascript 'i18n/jqgrid/locale-it.min.js'
45
+ javascript 'i18n/jqgrid/locale-ja.js'
46
+ javascript 'i18n/jqgrid/locale-ja.min.js'
47
+ javascript 'i18n/jqgrid/locale-nl.js'
48
+ javascript 'i18n/jqgrid/locale-nl.min.js'
49
+ javascript 'i18n/jqgrid/locale-no.js'
50
+ javascript 'i18n/jqgrid/locale-no.min.js'
51
+ javascript 'i18n/jqgrid/locale-pl.js'
52
+ javascript 'i18n/jqgrid/locale-pl.min.js'
53
+ javascript 'i18n/jqgrid/locale-pt-br.js'
54
+ javascript 'i18n/jqgrid/locale-pt-br.min.js'
55
+ javascript 'i18n/jqgrid/locale-pt.js'
56
+ javascript 'i18n/jqgrid/locale-pt.min.js'
57
+ javascript 'i18n/jqgrid/locale-ro.js'
58
+ javascript 'i18n/jqgrid/locale-ro.min.js'
59
+ javascript 'i18n/jqgrid/locale-ru.js'
60
+ javascript 'i18n/jqgrid/locale-ru.min.js'
61
+ javascript 'i18n/jqgrid/locale-sk.js'
62
+ javascript 'i18n/jqgrid/locale-sk.min.js'
63
+ javascript 'i18n/jqgrid/locale-sr.js'
64
+ javascript 'i18n/jqgrid/locale-sr.min.js'
65
+ javascript 'i18n/jqgrid/locale-sv.js'
66
+ javascript 'i18n/jqgrid/locale-sv.min.js'
67
+ javascript 'i18n/jqgrid/locale-tr.js'
68
+ javascript 'i18n/jqgrid/locale-tr.min.js'
69
+ javascript 'i18n/jqgrid/locale-ua.js'
70
+ javascript 'i18n/jqgrid/locale-ua.min.js'
71
+ stylesheet 'jquery/jqGrid.scss'
72
+ file 'public/stylesheets/ellipsis-xbl.xml'
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0"?>
2
+ <bindings
3
+ xmlns="http://www.mozilla.org/xbl"
4
+ xmlns:xbl="http://www.mozilla.org/xbl"
5
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
6
+ <binding id="ellipsis">
7
+ <content>
8
+ <xul:window><!-- xul:window tag required for FF2 -->
9
+ <xul:description crop="end" xbl:inherits="value=xbl:text"><children/></xul:description>
10
+ </xul:window>
11
+ </content>
12
+ </binding>
13
+ </bindings>
@@ -39,7 +39,7 @@ body {
39
39
  &.landscape .toolbar > h1 {
40
40
  margin-left: -125px;
41
41
  width: 250px; }
42
- .button, .back, .cancel, .add {
42
+ .button, .back, .cancel, .add, .backRemote {
43
43
  position: absolute;
44
44
  overflow: hidden;
45
45
  top: 8px;
@@ -65,15 +65,15 @@ body {
65
65
  .blueButton {
66
66
  -webkit-border-image: image_url("jquery/touch/apple/activeButton.png") 0 5 0 5;
67
67
  border-width: 0 5px; }
68
- .back {
68
+ .back, .backRemote {
69
69
  left: 6px;
70
70
  right: auto;
71
71
  padding: 0;
72
72
  max-width: 55px;
73
73
  border-width: 0 8px 0 14px;
74
- -webkit-border-image: image_url("jquery/touch/apple/backButton.png") 0 8 0 14;
75
- &.active {
76
- -webkit-border-image: image_url("jquery/touch/apple/backButton.png") 0 8 0 14; } }
74
+ -webkit-border-image: image_url("jquery/touch/apple/backButton.png") 0 8 0 14; }
75
+ .back.active, .backRemote.active {
76
+ -webkit-border-image: image_url("jquery/touch/apple/backButton.png") 0 8 0 14; }
77
77
  .leftButton, .cancel {
78
78
  left: 6px;
79
79
  right: auto; }
@@ -40,7 +40,7 @@ body {
40
40
  &.landscape .toolbar > h1 {
41
41
  margin-left: -125px;
42
42
  width: 250px; }
43
- .button, .back, .cancel, .add {
43
+ .button, .back, .cancel, .add, .backRemote {
44
44
  position: absolute;
45
45
  overflow: hidden;
46
46
  top: 8px;
@@ -63,15 +63,15 @@ body {
63
63
  -webkit-border-image: image_url("jquery/touch/default/button.png") 0 5 0 5; }
64
64
  .button.active, .cancel.active, .add.active {
65
65
  -webkit-border-image: image_url("jquery/touch/default/buttonActive.png") 0 5 0 5; }
66
- .back {
66
+ .back, .backRemote {
67
67
  left: 6px;
68
68
  right: auto;
69
69
  padding: 0;
70
70
  max-width: 55px;
71
71
  border-width: 0 8px 0 14px;
72
- -webkit-border-image: image_url("jquery/touch/default/backButton.png") 0 8 0 14;
73
- &.active {
74
- -webkit-border-image: image_url("jquery/touch/default/backButtonActive.png") 0 8 0 14; } }
72
+ -webkit-border-image: image_url("jquery/touch/default/backButton.png") 0 8 0 14; }
73
+ .back.active, .backRemote.active {
74
+ -webkit-border-image: image_url("jquery/touch/default/backButtonActive.png") 0 8 0 14; }
75
75
  .leftButton, .cancel {
76
76
  left: 6px;
77
77
  right: auto; }
@@ -40,7 +40,7 @@ body {
40
40
  &.landscape .toolbar > h1 {
41
41
  margin-left: -125px;
42
42
  width: 250px; }
43
- .button, .back, .cancel, .add {
43
+ .button, .back, .cancel, .add, .backRemote {
44
44
  position: absolute;
45
45
  overflow: hidden;
46
46
  top: 8px;
@@ -67,15 +67,15 @@ body {
67
67
  .blueButton {
68
68
  -webkit-border-image: image_url("jquery/touch/jqt/blueButton.png") 0 5 0 5;
69
69
  border-width: 0 5px; }
70
- .back {
70
+ .back, .backRemote {
71
71
  left: 6px;
72
72
  right: auto;
73
73
  padding: 0;
74
74
  max-width: 55px;
75
75
  border-width: 0 8px 0 14px;
76
- -webkit-border-image: image_url("jquery/touch/jqt/back_button.png") 0 8 0 14;
77
- &.active {
78
- -webkit-border-image: image_url("jquery/touch/jqt/back_button_clicked.png") 0 8 0 14; } }
76
+ -webkit-border-image: image_url("jquery/touch/jqt/back_button.png") 0 8 0 14; }
77
+ .back.active, .backRemote.active {
78
+ -webkit-border-image: image_url("jquery/touch/jqt/back_button_clicked.png") 0 8 0 14; }
79
79
  .leftButton, .cancel {
80
80
  left: 6px;
81
81
  right: auto; }
@@ -33,8 +33,11 @@ ActionView::Helpers::AssetTagHelper.register_javascript_expansion :layout => ['j
33
33
  ActionView::Helpers::AssetTagHelper.register_javascript_expansion :pngFix => ['jquery.pngFix.min']
34
34
  ActionView::Helpers::AssetTagHelper.register_javascript_expansion :sparklines => ['jquery.sparkline.min']
35
35
  ActionView::Helpers::AssetTagHelper.register_javascript_expansion :themeSwitcher => ['jquery.themeswitchertool.min']
36
+ ActionView::Helpers::AssetTagHelper.register_javascript_expansion :tmpl => ['jquery.tmpl.min']
37
+ ActionView::Helpers::AssetTagHelper.register_javascript_expansion :tmpl_plus => ['jquery.tmplPlus.min']
36
38
 
37
39
  require 'jquery/jrails'
40
+ require 'handle_attributes'
38
41
  require 'jquery/jquery_selector_assertions' if RAILS_ENV == 'test'
39
42
  require 'jquery/jquery_auto_complete'
40
43
  require 'jquery/flash_messages'
@@ -20587,13 +20587,19 @@ $.widget("ui.selectmenu", {
20587
20587
  eventPrefix: "selectmenu",
20588
20588
  options: {
20589
20589
  transferClasses: true,
20590
- style: 'popup',
20590
+ style: 'dropdown',
20591
+ positionOptions: {
20592
+ my: "left top",
20593
+ at: "left bottom",
20594
+ offset: null
20595
+ },
20591
20596
  width: null,
20592
20597
  menuWidth: null,
20593
20598
  handleWidth: 26,
20594
20599
  maxHeight: null,
20595
20600
  icons: null,
20596
- format: null
20601
+ format: null,
20602
+ bgImage: function() {}
20597
20603
  },
20598
20604
 
20599
20605
  _create: function() {
@@ -20671,17 +20677,17 @@ $.widget("ui.selectmenu", {
20671
20677
  ret = true;
20672
20678
  break;
20673
20679
  default:
20674
- ret = false;
20680
+ ret = true;
20675
20681
  self._typeAhead(event.keyCode, 'mouseup');
20676
20682
  break;
20677
20683
  }
20678
20684
  return ret;
20679
20685
  })
20680
20686
  .bind('mouseover focus', function(){
20681
- $(this).addClass(self.widgetBaseClass+'-focus ui-state-hover');
20687
+ if (!o.disabled) $(this).addClass(self.widgetBaseClass+'-focus ui-state-hover');
20682
20688
  })
20683
20689
  .bind('mouseout blur', function(){
20684
- $(this).removeClass(self.widgetBaseClass+'-focus ui-state-hover');
20690
+ if (!o.disabled) $(this).removeClass(self.widgetBaseClass+'-focus ui-state-hover');
20685
20691
  });
20686
20692
 
20687
20693
  //document click closes menu
@@ -20709,7 +20715,8 @@ $.widget("ui.selectmenu", {
20709
20715
  text: self._formatText(jQuery(this).text()),
20710
20716
  selected: $(this).attr('selected'),
20711
20717
  classes: $(this).attr('class'),
20712
- parentOptGroup: $(this).parent('optgroup').attr('label')
20718
+ parentOptGroup: $(this).parent('optgroup').attr('label'),
20719
+ bgImage: o.bgImage.call($(this))
20713
20720
  });
20714
20721
  });
20715
20722
 
@@ -20741,7 +20748,7 @@ $.widget("ui.selectmenu", {
20741
20748
  $(this).removeClass('ui-state-active').addClass(self.widgetBaseClass + '-item-focus ui-state-hover');
20742
20749
  })
20743
20750
  .bind('mouseout blur', function(){
20744
- if($(this).is( self._selectedOptionLi() )){ $(this).addClass(activeClass); }
20751
+ if ($(this).is( self._selectedOptionLi().selector )){ $(this).addClass(activeClass); }
20745
20752
  $(this).removeClass(self.widgetBaseClass + '-item-focus ui-state-hover');
20746
20753
  });
20747
20754
 
@@ -20773,11 +20780,13 @@ $.widget("ui.selectmenu", {
20773
20780
  thisLi
20774
20781
  .data('optionClasses', selectOptionData[i].classes + ' ' + self.widgetBaseClass + '-hasIcon')
20775
20782
  .addClass(self.widgetBaseClass + '-hasIcon');
20776
- var iconClass = o.icons[j].icon || "";
20777
-
20783
+ var iconClass = o.icons[j].icon || "";
20778
20784
  thisLi
20779
20785
  .find('a:eq(0)')
20780
- .prepend('<span class="'+self.widgetBaseClass+'-item-icon ui-icon '+iconClass + '"></span>');
20786
+ .prepend('<span class="'+self.widgetBaseClass+'-item-icon ui-icon ' +iconClass + '"></span>');
20787
+ if (selectOptionData[i].bgImage) {
20788
+ thisLi.find('span').css('background-image', selectOptionData[i].bgImage);
20789
+ }
20781
20790
  }
20782
20791
  }
20783
20792
  }
@@ -20803,9 +20812,16 @@ $.widget("ui.selectmenu", {
20803
20812
  if(o.style == 'dropdown'){ this.list.width( (o.menuWidth) ? o.menuWidth : ((o.width) ? o.width : selectWidth)); }
20804
20813
  else { this.list.width( (o.menuWidth) ? o.menuWidth : ((o.width) ? o.width - o.handleWidth : selectWidth - o.handleWidth)); }
20805
20814
 
20806
- //set max height from option
20807
- if(o.maxHeight && o.maxHeight < this.list.height()){ this.list.height(o.maxHeight); }
20808
-
20815
+ // calculate default max height
20816
+ if(o.maxHeight) {
20817
+ //set max height from option
20818
+ if (o.maxHeight < this.list.height()){ this.list.height(o.maxHeight); }
20819
+ } else {
20820
+ if (!o.format && ($(window).height() / 3) < this.list.height()) {
20821
+ o.maxHeight = $(window).height() / 3;
20822
+ this.list.height(o.maxHeight);
20823
+ }
20824
+ }
20809
20825
  //save reference to actionable li's (not group label li's)
20810
20826
  this._optionLis = this.list.find('li:not(.'+ self.widgetBaseClass +'-group)');
20811
20827
 
@@ -20814,8 +20830,6 @@ $.widget("ui.selectmenu", {
20814
20830
  .keydown(function(event){
20815
20831
  var ret = true;
20816
20832
  switch (event.keyCode) {
20817
- // this needs to be fixed as _moveFocus doesnt work correctly
20818
- /*
20819
20833
  case $.ui.keyCode.UP:
20820
20834
  case $.ui.keyCode.LEFT:
20821
20835
  ret = false;
@@ -20826,7 +20840,6 @@ $.widget("ui.selectmenu", {
20826
20840
  ret = false;
20827
20841
  self._moveFocus(1);
20828
20842
  break;
20829
- */
20830
20843
  case $.ui.keyCode.HOME:
20831
20844
  ret = false;
20832
20845
  self._moveFocus(':first');
@@ -20856,11 +20869,7 @@ $.widget("ui.selectmenu", {
20856
20869
  case $.ui.keyCode.ESCAPE:
20857
20870
  ret = false;
20858
20871
  self.close(event,true);
20859
- break;
20860
- default:
20861
- ret = false;
20862
- self._typeAhead(event.keyCode,'focus');
20863
- break;
20872
+ break;
20864
20873
  }
20865
20874
  return ret;
20866
20875
  });
@@ -21013,7 +21022,7 @@ $.widget("ui.selectmenu", {
21013
21022
  },
21014
21023
  _moveFocus: function(amt){
21015
21024
  if(!isNaN(amt)){
21016
- var currIndex = parseInt(this._focusedOptionLi().data('index'), 10);
21025
+ var currIndex = parseInt(this._focusedOptionLi().data('index') || 0, 10);
21017
21026
  var newIndex = currIndex + amt;
21018
21027
  }
21019
21028
  else { var newIndex = parseInt(this._optionLis.filter(amt).data('index'), 10); }
@@ -21025,7 +21034,7 @@ $.widget("ui.selectmenu", {
21025
21034
  var activeID = this.widgetBaseClass + '-item-' + Math.round(Math.random() * 1000);
21026
21035
 
21027
21036
  this._focusedOptionLi().find('a:eq(0)').attr('id','');
21028
- this._optionLis.eq(newIndex).find('a:eq(0)').attr('id',activeID)[0].focus();
21037
+ this._optionLis.eq(newIndex).find('a:eq(0)').attr('id',activeID).focus();
21029
21038
  this.list.attr('aria-activedescendant', activeID);
21030
21039
  },
21031
21040
  _scrollPage: function(direction){
@@ -21088,46 +21097,20 @@ $.widget("ui.selectmenu", {
21088
21097
  this.list.attr('aria-activedescendant', activeID);
21089
21098
  },
21090
21099
  _refreshPosition: function(){
21091
- var self = this, o = this.options;
21092
-
21093
- // get some vars
21094
- var pageScroll = self._pageScroll();
21095
- var menuTop = this.newelement.offset().top;
21096
- var viewportHeight = $(window).height();
21097
- var listHeight = $(this.list[0]).outerHeight();
21098
-
21099
- // check if there's enough room to expand to the bottom
21100
- if ((menuTop + listHeight) > (viewportHeight + pageScroll)) {
21101
- menuTop -= listHeight;
21102
- } else {
21103
- if (this.newelement.is('.'+this.widgetBaseClass+'-popup')) {
21104
- var scrolledAmt = this.list[0].scrollTop;
21105
- this.list.find('li:lt('+this._selectedIndex()+')').each(function() {
21106
- scrolledAmt -= $(this).outerHeight();
21107
- });
21108
- menuTop+=scrolledAmt;
21109
- } else {
21110
- menuTop += this.newelement.height();
21111
- }
21112
- }
21113
- // set values
21114
- this.list.css({
21115
- top: menuTop,
21116
- left: this.newelement.offset().left
21100
+ var o = this.options;
21101
+ // if its a native pop-up we need to calculate the position of the selected li
21102
+ if (o.style == "popup" && !o.positionOptions.offset) {
21103
+ var selected = this.list.find('li:not(.ui-selectmenu-group):eq('+this._selectedIndex()+')');
21104
+ // var _offset = "0 -" + (selected.outerHeight() + selected.offset().top - this.list.offset().top);
21105
+ var _offset = "0 -" + (selected.outerHeight() + selected.offset().top - this.list.offset().top);
21106
+ }
21107
+ this.list.position({
21108
+ // set options for position plugin
21109
+ of: o.positionOptions.of || this.newelement,
21110
+ my: o.positionOptions.my,
21111
+ at: o.positionOptions.at,
21112
+ offset: o.positionOptions.offset || _offset
21117
21113
  });
21118
- },
21119
- _pageScroll: function() {
21120
- var yScroll;
21121
- if (self.pageYOffset) {
21122
- yScroll = self.pageYOffset;
21123
- // Explorer 6 Strict
21124
- } else if (document.documentElement && document.documentElement.scrollTop) {
21125
- yScroll = document.documentElement.scrollTop;
21126
- // all other Explorers
21127
- } else if (document.body) {
21128
- yScroll = document.body.scrollTop;
21129
- }
21130
- return yScroll;
21131
21114
  }
21132
21115
  });
21133
21116
  })(jQuery);
@@ -708,28 +708,28 @@ this.options,e=this.opos[0],a=this.opos[1],f=d.pageX,i=d.pageY;if(e>f){var k=f;f
708
708
  l.unselecting=false}if(!l.selecting){l.$element.addClass("ui-selecting");l.selecting=true;h._trigger("selecting",d,{selecting:l.element})}}else{if(l.selecting)if(d.metaKey&&l.startselected){l.$element.removeClass("ui-selecting");l.selecting=false;l.$element.addClass("ui-selected");l.selected=true}else{l.$element.removeClass("ui-selecting");l.selecting=false;if(l.startselected){l.$element.addClass("ui-unselecting");l.unselecting=true}h._trigger("unselecting",d,{unselecting:l.element})}if(l.selected)if(!d.metaKey&&
709
709
  !l.startselected){l.$element.removeClass("ui-selected");l.selected=false;l.$element.addClass("ui-unselecting");l.unselecting=true;h._trigger("unselecting",d,{unselecting:l.element})}}}});return false}},_mouseStop:function(d){var h=this;this.dragged=false;b(".ui-unselecting",this.element[0]).each(function(){var g=b.data(this,"selectable-item");g.$element.removeClass("ui-unselecting");g.unselecting=false;g.startselected=false;h._trigger("unselected",d,{unselected:g.element})});b(".ui-selecting",this.element[0]).each(function(){var g=
710
710
  b.data(this,"selectable-item");g.$element.removeClass("ui-selecting").addClass("ui-selected");g.selecting=false;g.selected=true;g.startselected=true;h._trigger("selected",d,{selected:g.element})});this._trigger("stop",d);this.helper.remove();return false}});b.extend(b.ui.selectable,{version:"1.8.6"})})(jQuery);
711
- (function(b){b.widget("ui.selectmenu",{getter:"value",version:"1.8",eventPrefix:"selectmenu",options:{transferClasses:true,style:"popup",width:null,menuWidth:null,handleWidth:26,maxHeight:null,icons:null,format:null},_create:function(){var d=this,h=this.options,g=this.element.attr("id")||"ui-selectmenu-"+Math.random().toString(16).slice(2,10);this.ids=[g+"-button",g+"-menu"];this._safemouseup=true;this.newelement=b('<a class="'+this.widgetBaseClass+' ui-widget ui-state-default ui-corner-all" id="'+
712
- this.ids[0]+'" role="button" href="#" aria-haspopup="true" aria-owns="'+this.ids[1]+'"></a>').insertAfter(this.element);(g=this.element.attr("tabindex"))&&this.newelement.attr("tabindex",g);this.newelement.data("selectelement",this.element);this.selectmenuIcon=b('<span class="'+this.widgetBaseClass+'-icon ui-icon"></span>').prependTo(this.newelement).addClass(h.style=="popup"?"ui-icon-triangle-2-n-s":"ui-icon-triangle-1-s");b("label[for="+this.element.attr("id")+"]").attr("for",this.ids[0]).bind("click",
713
- function(){d.newelement[0].focus();return false});this.newelement.bind("mousedown",function(l){d._toggle(l);if(h.style=="popup"){d._safemouseup=false;setTimeout(function(){d._safemouseup=true},300)}return false}).bind("click",function(){return false}).keydown(function(l){var o=true;switch(l.keyCode){case b.ui.keyCode.ENTER:o=true;break;case b.ui.keyCode.SPACE:o=false;d._toggle(l);break;case b.ui.keyCode.UP:case b.ui.keyCode.LEFT:o=false;d._moveSelection(-1);break;case b.ui.keyCode.DOWN:case b.ui.keyCode.RIGHT:o=
714
- false;d._moveSelection(1);break;case b.ui.keyCode.TAB:o=true;break;default:o=false;d._typeAhead(l.keyCode,"mouseup")}return o}).bind("mouseover focus",function(){b(this).addClass(d.widgetBaseClass+"-focus ui-state-hover")}).bind("mouseout blur",function(){b(this).removeClass(d.widgetBaseClass+"-focus ui-state-hover")});b(document).mousedown(function(l){d.close(l)});this.element.click(function(){this._refreshValue()}).focus(function(){this.newelement&&this.newelement[0].focus()});this.list=b('<ul class="'+
715
- d.widgetBaseClass+"-menu ui-widget ui-widget-content"+(h.style=="dropdown"?" ui-corner-bottom":" ui-corner-all")+'" aria-hidden="true" role="listbox" aria-labelledby="'+this.ids[0]+'" id="'+this.ids[1]+'"></ul>').appendTo("body");var e=[];this.element.find("option").each(function(){e.push({value:b(this).attr("value"),text:d._formatText(jQuery(this).text()),selected:b(this).attr("selected"),classes:b(this).attr("class"),parentOptGroup:b(this).parent("optgroup").attr("label")})});var a=d.options.style==
716
- "popup"?" ui-state-active":"";for(g=0;g<e.length;g++){var f=b('<li role="presentation"><a href="#" tabindex="-1" role="option" aria-selected="false">'+e[g].text+"</a></li>").data("index",g).addClass(e[g].classes).data("optionClasses",e[g].classes||"").mouseup(function(l){if(d._safemouseup){var o=b(this).data("index")!=d._selectedIndex();d.value(b(this).data("index"));d.select(l);o&&d.change(l);d.close(l,true)}return false}).click(function(){return false}).bind("mouseover focus",function(){d._selectedOptionLi().addClass(a);
717
- d._focusedOptionLi().removeClass(d.widgetBaseClass+"-item-focus ui-state-hover");b(this).removeClass("ui-state-active").addClass(d.widgetBaseClass+"-item-focus ui-state-hover")}).bind("mouseout blur",function(){b(this).is(d._selectedOptionLi())&&b(this).addClass(a);b(this).removeClass(d.widgetBaseClass+"-item-focus ui-state-hover")});if(e[g].parentOptGroup){var i=d.widgetBaseClass+"-group-"+e[g].parentOptGroup.replace(/[^a-zA-Z0-9]/g,"");this.list.find("li."+i).size()?this.list.find("li."+i+":last ul").append(f):
718
- b('<li role="presentation" class="'+d.widgetBaseClass+"-group "+i+'"><span class="'+d.widgetBaseClass+'-group-label">'+e[g].parentOptGroup+"</span><ul></ul></li>").appendTo(this.list).find("ul").append(f)}else f.appendTo(this.list);this.list.bind("mousedown mouseup",function(){return false});if(h.icons)for(var k in h.icons)if(f.is(h.icons[k].find)){f.data("optionClasses",e[g].classes+" "+d.widgetBaseClass+"-hasIcon").addClass(d.widgetBaseClass+"-hasIcon");i=h.icons[k].icon||"";f.find("a:eq(0)").prepend('<span class="'+
719
- d.widgetBaseClass+"-item-icon ui-icon "+i+'"></span>')}}this.list.find("li:last").addClass("ui-corner-bottom");h.style=="popup"&&this.list.find("li:first").addClass("ui-corner-top");if(h.transferClasses){k=this.element.attr("class")||"";this.newelement.add(this.list).addClass(k)}k=this.element.width();this.newelement.width(h.width?h.width:k);h.style=="dropdown"?this.list.width(h.menuWidth?h.menuWidth:h.width?h.width:k):this.list.width(h.menuWidth?h.menuWidth:h.width?h.width-h.handleWidth:k-h.handleWidth);
720
- h.maxHeight&&h.maxHeight<this.list.height()&&this.list.height(h.maxHeight);this._optionLis=this.list.find("li:not(."+d.widgetBaseClass+"-group)");this.list.keydown(function(l){var o=true;switch(l.keyCode){case b.ui.keyCode.HOME:o=false;d._moveFocus(":first");break;case b.ui.keyCode.PAGE_UP:o=false;d._scrollPage("up");break;case b.ui.keyCode.PAGE_DOWN:o=false;d._scrollPage("down");break;case b.ui.keyCode.END:o=false;d._moveFocus(":last");break;case b.ui.keyCode.ENTER:case b.ui.keyCode.SPACE:o=false;
721
- d.close(l,true);b(l.target).parents("li:eq(0)").trigger("mouseup");break;case b.ui.keyCode.TAB:o=true;d.close(l,true);break;case b.ui.keyCode.ESCAPE:o=false;d.close(l,true);break;default:o=false;d._typeAhead(l.keyCode,"focus")}return o});if(h.style=="dropdown"){this.newelement.addClass(d.widgetBaseClass+"-dropdown");this.list.addClass(d.widgetBaseClass+"-menu-dropdown")}else{this.newelement.addClass(d.widgetBaseClass+"-popup");this.list.addClass(d.widgetBaseClass+"-menu-popup")}this.newelement.prepend('<span class="'+
722
- d.widgetBaseClass+'-status">'+e[this._selectedIndex()].text+"</span>");this.element.hide();this.element.attr("disabled")==true&&this.disable();this.value(this._selectedIndex());b(window).resize(function(){d._refreshPosition()})},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled").unbind("click");b("label[for="+this.newelement.attr("id")+"]").attr("for",this.element.attr("id")).unbind("click");
723
- this.newelement.remove();this.list.remove();this.element.show();b.Widget.prototype.destroy.apply(this,arguments)},_typeAhead:function(d,h){var g=this;if(!g._prevChar)g._prevChar=["",0];var e=String.fromCharCode(d);c=e.toLowerCase();var a=false;this.list.find("li a").each(function(f){if(!a){var i=b(this).text();if(i.indexOf(e)==0||i.indexOf(c)==0)if(g._prevChar[0]==e){if(g._prevChar[1]<f){a=true;b(this).trigger(h);g._prevChar[1]=f}}else{a=true;b(this).trigger(h);g._prevChar[1]=f}}});this._prevChar[0]=
724
- e},_uiHash:function(){var d=this.value();return{index:d,option:b("option",this.element).get(d),value:this.element[0].value}},open:function(d){if(this.newelement.attr("aria-disabled")!="true"){this._refreshPosition();this._closeOthers(d);this.newelement.addClass("ui-state-active");this.list.appendTo("body").addClass(this.widgetBaseClass+"-open").attr("aria-hidden",false).find("li:not(."+this.widgetBaseClass+"-group):eq("+this._selectedIndex()+") a")[0].focus();this.options.style=="dropdown"&&this.newelement.removeClass("ui-corner-all").addClass("ui-corner-top");
725
- this._refreshPosition();this._trigger("open",d,this._uiHash())}},close:function(d,h){if(this.newelement.is(".ui-state-active")){this.newelement.removeClass("ui-state-active");this.list.attr("aria-hidden",true).removeClass(this.widgetBaseClass+"-open");this.options.style=="dropdown"&&this.newelement.removeClass("ui-corner-top").addClass("ui-corner-all");h&&this.newelement[0].focus();this._trigger("close",d,this._uiHash())}},change:function(d){this.element.trigger("change");this._trigger("change",d,
726
- this._uiHash())},select:function(d){this._trigger("select",d,this._uiHash())},_closeOthers:function(d){b("."+this.widgetBaseClass+".ui-state-active").not(this.newelement).each(function(){b(this).data("selectelement").selectmenu("close",d)});b("."+this.widgetBaseClass+".ui-state-hover").trigger("mouseout")},_toggle:function(d,h){this.list.is("."+this.widgetBaseClass+"-open")?this.close(d,h):this.open(d)},_formatText:function(d){return this.options.format?this.options.format(d):d},_selectedIndex:function(){return this.element[0].selectedIndex},
727
- _selectedOptionLi:function(){return this._optionLis.eq(this._selectedIndex())},_focusedOptionLi:function(){return this.list.find("."+this.widgetBaseClass+"-item-focus")},_moveSelection:function(d){return this._optionLis.eq(parseInt(this._selectedOptionLi().data("index"),10)+d).trigger("mouseup")},_moveFocus:function(d){d=isNaN(d)?parseInt(this._optionLis.filter(d).data("index"),10):parseInt(this._focusedOptionLi().data("index"),10)+d;if(d<0)d=0;if(d>this._optionLis.size()-1)d=this._optionLis.size()-
728
- 1;var h=this.widgetBaseClass+"-item-"+Math.round(Math.random()*1E3);this._focusedOptionLi().find("a:eq(0)").attr("id","");this._optionLis.eq(d).find("a:eq(0)").attr("id",h)[0].focus();this.list.attr("aria-activedescendant",h)},_scrollPage:function(d){var h=Math.floor(this.list.outerHeight()/this.list.find("li:first").outerHeight());h=d=="up"?-h:h;this._moveFocus(h)},_setOption:function(d,h){this.options[d]=h;if(d=="disabled"){this.close();this.element.add(this.newelement).add(this.list)[h?"addClass":
729
- "removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",h)}},value:function(d){if(arguments.length){this.element[0].selectedIndex=d;this._refreshValue();this._refreshPosition()}return this.element[0].selectedIndex},_refreshValue:function(){var d=this.options.style=="popup"?" ui-state-active":"",h=this.widgetBaseClass+"-item-"+Math.round(Math.random()*1E3);this.list.find("."+this.widgetBaseClass+"-item-selected").removeClass(this.widgetBaseClass+"-item-selected"+
730
- d).find("a").attr("aria-selected","false").attr("id","");this._selectedOptionLi().addClass(this.widgetBaseClass+"-item-selected"+d).find("a").attr("aria-selected","true").attr("id",h);d=this.newelement.data("optionClasses")?this.newelement.data("optionClasses"):"";var g=this._selectedOptionLi().data("optionClasses")?this._selectedOptionLi().data("optionClasses"):"";this.newelement.removeClass(d).data("optionClasses",g).addClass(g).find("."+this.widgetBaseClass+"-status").html(this._selectedOptionLi().find("a:eq(0)").html());
731
- this.list.attr("aria-activedescendant",h)},_refreshPosition:function(){var d=this._pageScroll(),h=this.newelement.offset().top,g=b(window).height(),e=b(this.list[0]).outerHeight();if(h+e>g+d)h-=e;else if(this.newelement.is("."+this.widgetBaseClass+"-popup")){var a=this.list[0].scrollTop;this.list.find("li:lt("+this._selectedIndex()+")").each(function(){a-=b(this).outerHeight()});h+=a}else h+=this.newelement.height();this.list.css({top:h,left:this.newelement.offset().left})},_pageScroll:function(){var d;
732
- if(self.pageYOffset)d=self.pageYOffset;else if(document.documentElement&&document.documentElement.scrollTop)d=document.documentElement.scrollTop;else if(document.body)d=document.body.scrollTop;return d}})})(jQuery);
711
+ (function(b){b.widget("ui.selectmenu",{getter:"value",version:"1.8",eventPrefix:"selectmenu",options:{transferClasses:true,style:"dropdown",positionOptions:{my:"left top",at:"left bottom",offset:null},width:null,menuWidth:null,handleWidth:26,maxHeight:null,icons:null,format:null,bgImage:function(){}},_create:function(){var d=this,h=this.options,g=this.element.attr("id")||"ui-selectmenu-"+Math.random().toString(16).slice(2,10);this.ids=[g+"-button",g+"-menu"];this._safemouseup=true;this.newelement=
712
+ b('<a class="'+this.widgetBaseClass+' ui-widget ui-state-default ui-corner-all" id="'+this.ids[0]+'" role="button" href="#" aria-haspopup="true" aria-owns="'+this.ids[1]+'"></a>').insertAfter(this.element);(g=this.element.attr("tabindex"))&&this.newelement.attr("tabindex",g);this.newelement.data("selectelement",this.element);this.selectmenuIcon=b('<span class="'+this.widgetBaseClass+'-icon ui-icon"></span>').prependTo(this.newelement).addClass(h.style=="popup"?"ui-icon-triangle-2-n-s":"ui-icon-triangle-1-s");
713
+ b("label[for="+this.element.attr("id")+"]").attr("for",this.ids[0]).bind("click",function(){d.newelement[0].focus();return false});this.newelement.bind("mousedown",function(l){d._toggle(l);if(h.style=="popup"){d._safemouseup=false;setTimeout(function(){d._safemouseup=true},300)}return false}).bind("click",function(){return false}).keydown(function(l){var o=true;switch(l.keyCode){case b.ui.keyCode.ENTER:o=true;break;case b.ui.keyCode.SPACE:o=false;d._toggle(l);break;case b.ui.keyCode.UP:case b.ui.keyCode.LEFT:o=
714
+ false;d._moveSelection(-1);break;case b.ui.keyCode.DOWN:case b.ui.keyCode.RIGHT:o=false;d._moveSelection(1);break;case b.ui.keyCode.TAB:o=true;break;default:o=true;d._typeAhead(l.keyCode,"mouseup")}return o}).bind("mouseover focus",function(){h.disabled||b(this).addClass(d.widgetBaseClass+"-focus ui-state-hover")}).bind("mouseout blur",function(){h.disabled||b(this).removeClass(d.widgetBaseClass+"-focus ui-state-hover")});b(document).mousedown(function(l){d.close(l)});this.element.click(function(){this._refreshValue()}).focus(function(){this.newelement&&
715
+ this.newelement[0].focus()});this.list=b('<ul class="'+d.widgetBaseClass+"-menu ui-widget ui-widget-content"+(h.style=="dropdown"?" ui-corner-bottom":" ui-corner-all")+'" aria-hidden="true" role="listbox" aria-labelledby="'+this.ids[0]+'" id="'+this.ids[1]+'"></ul>').appendTo("body");var e=[];this.element.find("option").each(function(){e.push({value:b(this).attr("value"),text:d._formatText(jQuery(this).text()),selected:b(this).attr("selected"),classes:b(this).attr("class"),parentOptGroup:b(this).parent("optgroup").attr("label"),
716
+ bgImage:h.bgImage.call(b(this))})});var a=d.options.style=="popup"?" ui-state-active":"";for(g=0;g<e.length;g++){var f=b('<li role="presentation"><a href="#" tabindex="-1" role="option" aria-selected="false">'+e[g].text+"</a></li>").data("index",g).addClass(e[g].classes).data("optionClasses",e[g].classes||"").mouseup(function(l){if(d._safemouseup){var o=b(this).data("index")!=d._selectedIndex();d.value(b(this).data("index"));d.select(l);o&&d.change(l);d.close(l,true)}return false}).click(function(){return false}).bind("mouseover focus",
717
+ function(){d._selectedOptionLi().addClass(a);d._focusedOptionLi().removeClass(d.widgetBaseClass+"-item-focus ui-state-hover");b(this).removeClass("ui-state-active").addClass(d.widgetBaseClass+"-item-focus ui-state-hover")}).bind("mouseout blur",function(){b(this).is(d._selectedOptionLi().selector)&&b(this).addClass(a);b(this).removeClass(d.widgetBaseClass+"-item-focus ui-state-hover")});if(e[g].parentOptGroup){var i=d.widgetBaseClass+"-group-"+e[g].parentOptGroup.replace(/[^a-zA-Z0-9]/g,"");this.list.find("li."+
718
+ i).size()?this.list.find("li."+i+":last ul").append(f):b('<li role="presentation" class="'+d.widgetBaseClass+"-group "+i+'"><span class="'+d.widgetBaseClass+'-group-label">'+e[g].parentOptGroup+"</span><ul></ul></li>").appendTo(this.list).find("ul").append(f)}else f.appendTo(this.list);this.list.bind("mousedown mouseup",function(){return false});if(h.icons)for(var k in h.icons)if(f.is(h.icons[k].find)){f.data("optionClasses",e[g].classes+" "+d.widgetBaseClass+"-hasIcon").addClass(d.widgetBaseClass+
719
+ "-hasIcon");i=h.icons[k].icon||"";f.find("a:eq(0)").prepend('<span class="'+d.widgetBaseClass+"-item-icon ui-icon "+i+'"></span>');e[g].bgImage&&f.find("span").css("background-image",e[g].bgImage)}}this.list.find("li:last").addClass("ui-corner-bottom");h.style=="popup"&&this.list.find("li:first").addClass("ui-corner-top");if(h.transferClasses){k=this.element.attr("class")||"";this.newelement.add(this.list).addClass(k)}k=this.element.width();this.newelement.width(h.width?h.width:k);h.style=="dropdown"?
720
+ this.list.width(h.menuWidth?h.menuWidth:h.width?h.width:k):this.list.width(h.menuWidth?h.menuWidth:h.width?h.width-h.handleWidth:k-h.handleWidth);if(h.maxHeight)h.maxHeight<this.list.height()&&this.list.height(h.maxHeight);else if(!h.format&&b(window).height()/3<this.list.height()){h.maxHeight=b(window).height()/3;this.list.height(h.maxHeight)}this._optionLis=this.list.find("li:not(."+d.widgetBaseClass+"-group)");this.list.keydown(function(l){var o=true;switch(l.keyCode){case b.ui.keyCode.UP:case b.ui.keyCode.LEFT:o=
721
+ false;d._moveFocus(-1);break;case b.ui.keyCode.DOWN:case b.ui.keyCode.RIGHT:o=false;d._moveFocus(1);break;case b.ui.keyCode.HOME:o=false;d._moveFocus(":first");break;case b.ui.keyCode.PAGE_UP:o=false;d._scrollPage("up");break;case b.ui.keyCode.PAGE_DOWN:o=false;d._scrollPage("down");break;case b.ui.keyCode.END:o=false;d._moveFocus(":last");break;case b.ui.keyCode.ENTER:case b.ui.keyCode.SPACE:o=false;d.close(l,true);b(l.target).parents("li:eq(0)").trigger("mouseup");break;case b.ui.keyCode.TAB:o=
722
+ true;d.close(l,true);break;case b.ui.keyCode.ESCAPE:o=false;d.close(l,true)}return o});if(h.style=="dropdown"){this.newelement.addClass(d.widgetBaseClass+"-dropdown");this.list.addClass(d.widgetBaseClass+"-menu-dropdown")}else{this.newelement.addClass(d.widgetBaseClass+"-popup");this.list.addClass(d.widgetBaseClass+"-menu-popup")}this.newelement.prepend('<span class="'+d.widgetBaseClass+'-status">'+e[this._selectedIndex()].text+"</span>");this.element.hide();this.element.attr("disabled")==true&&this.disable();
723
+ this.value(this._selectedIndex());b(window).resize(function(){d._refreshPosition()})},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled").unbind("click");b("label[for="+this.newelement.attr("id")+"]").attr("for",this.element.attr("id")).unbind("click");this.newelement.remove();this.list.remove();this.element.show();b.Widget.prototype.destroy.apply(this,arguments)},_typeAhead:function(d,
724
+ h){var g=this;if(!g._prevChar)g._prevChar=["",0];var e=String.fromCharCode(d);c=e.toLowerCase();var a=false;this.list.find("li a").each(function(f){if(!a){var i=b(this).text();if(i.indexOf(e)==0||i.indexOf(c)==0)if(g._prevChar[0]==e){if(g._prevChar[1]<f){a=true;b(this).trigger(h);g._prevChar[1]=f}}else{a=true;b(this).trigger(h);g._prevChar[1]=f}}});this._prevChar[0]=e},_uiHash:function(){var d=this.value();return{index:d,option:b("option",this.element).get(d),value:this.element[0].value}},open:function(d){if(this.newelement.attr("aria-disabled")!=
725
+ "true"){this._refreshPosition();this._closeOthers(d);this.newelement.addClass("ui-state-active");this.list.appendTo("body").addClass(this.widgetBaseClass+"-open").attr("aria-hidden",false).find("li:not(."+this.widgetBaseClass+"-group):eq("+this._selectedIndex()+") a")[0].focus();this.options.style=="dropdown"&&this.newelement.removeClass("ui-corner-all").addClass("ui-corner-top");this._refreshPosition();this._trigger("open",d,this._uiHash())}},close:function(d,h){if(this.newelement.is(".ui-state-active")){this.newelement.removeClass("ui-state-active");
726
+ this.list.attr("aria-hidden",true).removeClass(this.widgetBaseClass+"-open");this.options.style=="dropdown"&&this.newelement.removeClass("ui-corner-top").addClass("ui-corner-all");h&&this.newelement[0].focus();this._trigger("close",d,this._uiHash())}},change:function(d){this.element.trigger("change");this._trigger("change",d,this._uiHash())},select:function(d){this._trigger("select",d,this._uiHash())},_closeOthers:function(d){b("."+this.widgetBaseClass+".ui-state-active").not(this.newelement).each(function(){b(this).data("selectelement").selectmenu("close",
727
+ d)});b("."+this.widgetBaseClass+".ui-state-hover").trigger("mouseout")},_toggle:function(d,h){this.list.is("."+this.widgetBaseClass+"-open")?this.close(d,h):this.open(d)},_formatText:function(d){return this.options.format?this.options.format(d):d},_selectedIndex:function(){return this.element[0].selectedIndex},_selectedOptionLi:function(){return this._optionLis.eq(this._selectedIndex())},_focusedOptionLi:function(){return this.list.find("."+this.widgetBaseClass+"-item-focus")},_moveSelection:function(d){return this._optionLis.eq(parseInt(this._selectedOptionLi().data("index"),
728
+ 10)+d).trigger("mouseup")},_moveFocus:function(d){d=isNaN(d)?parseInt(this._optionLis.filter(d).data("index"),10):parseInt(this._focusedOptionLi().data("index")||0,10)+d;if(d<0)d=0;if(d>this._optionLis.size()-1)d=this._optionLis.size()-1;var h=this.widgetBaseClass+"-item-"+Math.round(Math.random()*1E3);this._focusedOptionLi().find("a:eq(0)").attr("id","");this._optionLis.eq(d).find("a:eq(0)").attr("id",h).focus();this.list.attr("aria-activedescendant",h)},_scrollPage:function(d){var h=Math.floor(this.list.outerHeight()/
729
+ this.list.find("li:first").outerHeight());h=d=="up"?-h:h;this._moveFocus(h)},_setOption:function(d,h){this.options[d]=h;if(d=="disabled"){this.close();this.element.add(this.newelement).add(this.list)[h?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",h)}},value:function(d){if(arguments.length){this.element[0].selectedIndex=d;this._refreshValue();this._refreshPosition()}return this.element[0].selectedIndex},_refreshValue:function(){var d=
730
+ this.options.style=="popup"?" ui-state-active":"",h=this.widgetBaseClass+"-item-"+Math.round(Math.random()*1E3);this.list.find("."+this.widgetBaseClass+"-item-selected").removeClass(this.widgetBaseClass+"-item-selected"+d).find("a").attr("aria-selected","false").attr("id","");this._selectedOptionLi().addClass(this.widgetBaseClass+"-item-selected"+d).find("a").attr("aria-selected","true").attr("id",h);d=this.newelement.data("optionClasses")?this.newelement.data("optionClasses"):"";var g=this._selectedOptionLi().data("optionClasses")?
731
+ this._selectedOptionLi().data("optionClasses"):"";this.newelement.removeClass(d).data("optionClasses",g).addClass(g).find("."+this.widgetBaseClass+"-status").html(this._selectedOptionLi().find("a:eq(0)").html());this.list.attr("aria-activedescendant",h)},_refreshPosition:function(){var d=this.options;if(d.style=="popup"&&!d.positionOptions.offset){var h=this.list.find("li:not(.ui-selectmenu-group):eq("+this._selectedIndex()+")");h="0 -"+(h.outerHeight()+h.offset().top-this.list.offset().top)}this.list.position({of:d.positionOptions.of||
732
+ this.newelement,my:d.positionOptions.my,at:d.positionOptions.at,offset:d.positionOptions.offset||h})}})})(jQuery);
733
733
  (function(b){b.widget("ui.slider",b.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var d=this,h=this.options;this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");h.disabled&&this.element.addClass("ui-slider-disabled ui-disabled");
734
734
  this.range=b([]);if(h.range){if(h.range===true){this.range=b("<div></div>");if(!h.values)h.values=[this._valueMin(),this._valueMin()];if(h.values.length&&h.values.length!==2)h.values=[h.values[0],h.values[0]]}else this.range=b("<div></div>");this.range.appendTo(this.element).addClass("ui-slider-range");if(h.range==="min"||h.range==="max")this.range.addClass("ui-slider-range-"+h.range);this.range.addClass("ui-widget-header")}b(".ui-slider-handle",this.element).length===0&&b("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");
735
735
  if(h.values&&h.values.length)for(;b(".ui-slider-handle",this.element).length<h.values.length;)b("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");this.handles=b(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(g){g.preventDefault()}).hover(function(){h.disabled||b(this).addClass("ui-state-hover")},function(){b(this).removeClass("ui-state-hover")}).focus(function(){if(h.disabled)b(this).blur();
@@ -332,8 +332,11 @@ jQuery.fn = jQuery.prototype = {
332
332
  jQuery.fn.init.prototype = jQuery.fn;
333
333
 
334
334
  jQuery.extend = jQuery.fn.extend = function() {
335
- // copy reference to target object
336
- var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options, name, src, copy, copyIsArray;
335
+ var options, name, src, copy, copyIsArray, clone,
336
+ target = arguments[0] || {},
337
+ i = 1,
338
+ length = arguments.length,
339
+ deep = false;
337
340
 
338
341
  // Handle a deep copy situation
339
342
  if ( typeof target === "boolean" ) {
@@ -435,18 +438,21 @@ jQuery.extend({
435
438
  // If there are functions bound, to execute
436
439
  if ( readyList ) {
437
440
  // Execute all of them
438
- var fn, i = 0;
439
- while ( (fn = readyList[ i++ ]) ) {
440
- fn.call( document, jQuery );
441
- }
441
+ var fn,
442
+ i = 0,
443
+ ready = readyList;
442
444
 
443
445
  // Reset the list of functions
444
446
  readyList = null;
445
- }
446
447
 
447
- // Trigger any bound ready events
448
- if ( jQuery.fn.triggerHandler ) {
449
- jQuery( document ).triggerHandler( "ready" );
448
+ while ( (fn = ready[ i++ ]) ) {
449
+ fn.call( document, jQuery );
450
+ }
451
+
452
+ // Trigger any bound ready events
453
+ if ( jQuery.fn.trigger ) {
454
+ jQuery( document ).trigger( "ready" ).unbind( "ready" );
455
+ }
450
456
  }
451
457
  }
452
458
  },
@@ -699,7 +705,8 @@ jQuery.extend({
699
705
  },
700
706
 
701
707
  merge: function( first, second ) {
702
- var i = first.length, j = 0;
708
+ var i = first.length,
709
+ j = 0;
703
710
 
704
711
  if ( typeof second.length === "number" ) {
705
712
  for ( var l = second.length; j < l; j++ ) {
@@ -968,6 +975,7 @@ return (window.jQuery = window.$ = jQuery);
968
975
  optSelected: opt.selected,
969
976
 
970
977
  // Will be defined later
978
+ deleteExpando: true,
971
979
  optDisabled: false,
972
980
  checkClone: false,
973
981
  scriptEval: false,
@@ -998,6 +1006,15 @@ return (window.jQuery = window.$ = jQuery);
998
1006
  delete window[ id ];
999
1007
  }
1000
1008
 
1009
+ // Test to see if it's possible to delete an expando from an element
1010
+ // Fails in Internet Explorer
1011
+ try {
1012
+ delete script.test;
1013
+
1014
+ } catch(e) {
1015
+ jQuery.support.deleteExpando = false;
1016
+ }
1017
+
1001
1018
  root.removeChild( script );
1002
1019
 
1003
1020
  if ( div.attachEvent && div.fireEvent ) {
@@ -1090,20 +1107,6 @@ return (window.jQuery = window.$ = jQuery);
1090
1107
  // release memory in IE
1091
1108
  root = script = div = all = a = null;
1092
1109
  })();
1093
-
1094
- jQuery.props = {
1095
- "for": "htmlFor",
1096
- "class": "className",
1097
- readonly: "readOnly",
1098
- maxlength: "maxLength",
1099
- cellspacing: "cellSpacing",
1100
- rowspan: "rowSpan",
1101
- colspan: "colSpan",
1102
- tabindex: "tabIndex",
1103
- usemap: "useMap",
1104
- frameborder: "frameBorder"
1105
- };
1106
-
1107
1110
  })( jQuery );
1108
1111
 
1109
1112
 
@@ -1243,8 +1246,24 @@ jQuery.extend({
1243
1246
 
1244
1247
  jQuery.fn.extend({
1245
1248
  data: function( key, value ) {
1249
+ var data = null;
1250
+
1246
1251
  if ( typeof key === "undefined" ) {
1247
- return this.length ? jQuery.data( this[0] ) : null;
1252
+ if ( this.length ) {
1253
+ var attr = this[0].attributes, name;
1254
+ data = jQuery.data( this[0] );
1255
+
1256
+ for ( var i = 0, l = attr.length; i < l; i++ ) {
1257
+ name = attr[i].name;
1258
+
1259
+ if ( name.indexOf( "data-" ) === 0 ) {
1260
+ name = name.substr( 5 );
1261
+ dataAttr( this[0], name, data[ name ] );
1262
+ }
1263
+ }
1264
+ }
1265
+
1266
+ return data;
1248
1267
 
1249
1268
  } else if ( typeof key === "object" ) {
1250
1269
  return this.each(function() {
@@ -1256,31 +1275,12 @@ jQuery.fn.extend({
1256
1275
  parts[1] = parts[1] ? "." + parts[1] : "";
1257
1276
 
1258
1277
  if ( value === undefined ) {
1259
- var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
1278
+ data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
1260
1279
 
1261
1280
  // Try to fetch any internally stored data first
1262
1281
  if ( data === undefined && this.length ) {
1263
1282
  data = jQuery.data( this[0], key );
1264
-
1265
- // If nothing was found internally, try to fetch any
1266
- // data from the HTML5 data-* attribute
1267
- if ( data === undefined && this[0].nodeType === 1 ) {
1268
- data = this[0].getAttribute( "data-" + key );
1269
-
1270
- if ( typeof data === "string" ) {
1271
- try {
1272
- data = data === "true" ? true :
1273
- data === "false" ? false :
1274
- data === "null" ? null :
1275
- !jQuery.isNaN( data ) ? parseFloat( data ) :
1276
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
1277
- data;
1278
- } catch( e ) {}
1279
-
1280
- } else {
1281
- data = undefined;
1282
- }
1283
- }
1283
+ data = dataAttr( this[0], key, data );
1284
1284
  }
1285
1285
 
1286
1286
  return data === undefined && parts[1] ?
@@ -1289,7 +1289,8 @@ jQuery.fn.extend({
1289
1289
 
1290
1290
  } else {
1291
1291
  return this.each(function() {
1292
- var $this = jQuery( this ), args = [ parts[0], value ];
1292
+ var $this = jQuery( this ),
1293
+ args = [ parts[0], value ];
1293
1294
 
1294
1295
  $this.triggerHandler( "setData" + parts[1] + "!", args );
1295
1296
  jQuery.data( this, key, value );
@@ -1305,6 +1306,33 @@ jQuery.fn.extend({
1305
1306
  }
1306
1307
  });
1307
1308
 
1309
+ function dataAttr( elem, key, data ) {
1310
+ // If nothing was found internally, try to fetch any
1311
+ // data from the HTML5 data-* attribute
1312
+ if ( data === undefined && elem.nodeType === 1 ) {
1313
+ data = elem.getAttribute( "data-" + key );
1314
+
1315
+ if ( typeof data === "string" ) {
1316
+ try {
1317
+ data = data === "true" ? true :
1318
+ data === "false" ? false :
1319
+ data === "null" ? null :
1320
+ !jQuery.isNaN( data ) ? parseFloat( data ) :
1321
+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
1322
+ data;
1323
+ } catch( e ) {}
1324
+
1325
+ // Make sure we set the data so it isn't changed later
1326
+ jQuery.data( elem, key, data );
1327
+
1328
+ } else {
1329
+ data = undefined;
1330
+ }
1331
+ }
1332
+
1333
+ return data;
1334
+ }
1335
+
1308
1336
  })( jQuery );
1309
1337
 
1310
1338
 
@@ -1337,7 +1365,8 @@ jQuery.extend({
1337
1365
  dequeue: function( elem, type ) {
1338
1366
  type = type || "fx";
1339
1367
 
1340
- var queue = jQuery.queue( elem, type ), fn = queue.shift();
1368
+ var queue = jQuery.queue( elem, type ),
1369
+ fn = queue.shift();
1341
1370
 
1342
1371
  // If the fx queue is dequeued, always remove the progress sentinel
1343
1372
  if ( fn === "inprogress" ) {
@@ -1415,6 +1444,19 @@ var rclass = /[\n\t]/g,
1415
1444
  rclickable = /^a(?:rea)?$/i,
1416
1445
  rradiocheck = /^(?:radio|checkbox)$/i;
1417
1446
 
1447
+ jQuery.props = {
1448
+ "for": "htmlFor",
1449
+ "class": "className",
1450
+ readonly: "readOnly",
1451
+ maxlength: "maxLength",
1452
+ cellspacing: "cellSpacing",
1453
+ rowspan: "rowSpan",
1454
+ colspan: "colSpan",
1455
+ tabindex: "tabIndex",
1456
+ usemap: "useMap",
1457
+ frameborder: "frameBorder"
1458
+ };
1459
+
1418
1460
  jQuery.fn.extend({
1419
1461
  attr: function( name, value ) {
1420
1462
  return jQuery.access( this, name, value, true, jQuery.attr );
@@ -1448,7 +1490,9 @@ jQuery.fn.extend({
1448
1490
  elem.className = value;
1449
1491
 
1450
1492
  } else {
1451
- var className = " " + elem.className + " ", setClass = elem.className;
1493
+ var className = " " + elem.className + " ",
1494
+ setClass = elem.className;
1495
+
1452
1496
  for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
1453
1497
  if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) {
1454
1498
  setClass += " " + classNames[c];
@@ -1496,7 +1540,8 @@ jQuery.fn.extend({
1496
1540
  },
1497
1541
 
1498
1542
  toggleClass: function( value, stateVal ) {
1499
- var type = typeof value, isBool = typeof stateVal === "boolean";
1543
+ var type = typeof value,
1544
+ isBool = typeof stateVal === "boolean";
1500
1545
 
1501
1546
  if ( jQuery.isFunction( value ) ) {
1502
1547
  return this.each(function(i) {
@@ -1508,7 +1553,9 @@ jQuery.fn.extend({
1508
1553
  return this.each(function() {
1509
1554
  if ( type === "string" ) {
1510
1555
  // toggle individual class names
1511
- var className, i = 0, self = jQuery(this),
1556
+ var className,
1557
+ i = 0,
1558
+ self = jQuery( this ),
1512
1559
  state = stateVal,
1513
1560
  classNames = value.split( rspaces );
1514
1561
 
@@ -1677,91 +1724,88 @@ jQuery.extend({
1677
1724
  // Try to normalize/fix the name
1678
1725
  name = notxml && jQuery.props[ name ] || name;
1679
1726
 
1680
- // Only do all the following if this is a node (faster for style)
1681
- if ( elem.nodeType === 1 ) {
1682
- // These attributes require special treatment
1683
- var special = rspecialurl.test( name );
1684
-
1685
- // Safari mis-reports the default selected property of an option
1686
- // Accessing the parent's selectedIndex property fixes it
1687
- if ( name === "selected" && !jQuery.support.optSelected ) {
1688
- var parent = elem.parentNode;
1689
- if ( parent ) {
1690
- parent.selectedIndex;
1691
-
1692
- // Make sure that it also works with optgroups, see #5701
1693
- if ( parent.parentNode ) {
1694
- parent.parentNode.selectedIndex;
1695
- }
1696
- }
1697
- }
1727
+ // These attributes require special treatment
1728
+ var special = rspecialurl.test( name );
1698
1729
 
1699
- // If applicable, access the attribute via the DOM 0 way
1700
- // 'in' checks fail in Blackberry 4.7 #6931
1701
- if ( (name in elem || elem[ name ] !== undefined) && notxml && !special ) {
1702
- if ( set ) {
1703
- // We can't allow the type property to be changed (since it causes problems in IE)
1704
- if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) {
1705
- jQuery.error( "type property can't be changed" );
1706
- }
1730
+ // Safari mis-reports the default selected property of an option
1731
+ // Accessing the parent's selectedIndex property fixes it
1732
+ if ( name === "selected" && !jQuery.support.optSelected ) {
1733
+ var parent = elem.parentNode;
1734
+ if ( parent ) {
1735
+ parent.selectedIndex;
1707
1736
 
1708
- if ( value === null ) {
1709
- if ( elem.nodeType === 1 ) {
1710
- elem.removeAttribute( name );
1711
- }
1712
-
1713
- } else {
1714
- elem[ name ] = value;
1715
- }
1737
+ // Make sure that it also works with optgroups, see #5701
1738
+ if ( parent.parentNode ) {
1739
+ parent.parentNode.selectedIndex;
1716
1740
  }
1741
+ }
1742
+ }
1717
1743
 
1718
- // browsers index elements by id/name on forms, give priority to attributes.
1719
- if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) {
1720
- return elem.getAttributeNode( name ).nodeValue;
1744
+ // If applicable, access the attribute via the DOM 0 way
1745
+ // 'in' checks fail in Blackberry 4.7 #6931
1746
+ if ( (name in elem || elem[ name ] !== undefined) && notxml && !special ) {
1747
+ if ( set ) {
1748
+ // We can't allow the type property to be changed (since it causes problems in IE)
1749
+ if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) {
1750
+ jQuery.error( "type property can't be changed" );
1721
1751
  }
1722
1752
 
1723
- // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
1724
- // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
1725
- if ( name === "tabIndex" ) {
1726
- var attributeNode = elem.getAttributeNode( "tabIndex" );
1753
+ if ( value === null ) {
1754
+ if ( elem.nodeType === 1 ) {
1755
+ elem.removeAttribute( name );
1756
+ }
1727
1757
 
1728
- return attributeNode && attributeNode.specified ?
1729
- attributeNode.value :
1730
- rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
1731
- 0 :
1732
- undefined;
1758
+ } else {
1759
+ elem[ name ] = value;
1733
1760
  }
1761
+ }
1734
1762
 
1735
- return elem[ name ];
1763
+ // browsers index elements by id/name on forms, give priority to attributes.
1764
+ if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) {
1765
+ return elem.getAttributeNode( name ).nodeValue;
1736
1766
  }
1737
1767
 
1738
- if ( !jQuery.support.style && notxml && name === "style" ) {
1739
- if ( set ) {
1740
- elem.style.cssText = "" + value;
1741
- }
1768
+ // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
1769
+ // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
1770
+ if ( name === "tabIndex" ) {
1771
+ var attributeNode = elem.getAttributeNode( "tabIndex" );
1742
1772
 
1743
- return elem.style.cssText;
1773
+ return attributeNode && attributeNode.specified ?
1774
+ attributeNode.value :
1775
+ rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
1776
+ 0 :
1777
+ undefined;
1744
1778
  }
1745
1779
 
1780
+ return elem[ name ];
1781
+ }
1782
+
1783
+ if ( !jQuery.support.style && notxml && name === "style" ) {
1746
1784
  if ( set ) {
1747
- // convert the value to a string (all browsers do this but IE) see #1070
1748
- elem.setAttribute( name, "" + value );
1785
+ elem.style.cssText = "" + value;
1749
1786
  }
1750
1787
 
1751
- // Ensure that missing attributes return undefined
1752
- // Blackberry 4.7 returns "" from getAttribute #6938
1753
- if ( !elem.attributes[ name ] && (elem.hasAttribute && !elem.hasAttribute( name )) ) {
1754
- return undefined;
1755
- }
1788
+ return elem.style.cssText;
1789
+ }
1756
1790
 
1757
- var attr = !jQuery.support.hrefNormalized && notxml && special ?
1758
- // Some attributes require a special call on IE
1759
- elem.getAttribute( name, 2 ) :
1760
- elem.getAttribute( name );
1791
+ if ( set ) {
1792
+ // convert the value to a string (all browsers do this but IE) see #1070
1793
+ elem.setAttribute( name, "" + value );
1794
+ }
1761
1795
 
1762
- // Non-existent attributes return null, we normalize to undefined
1763
- return attr === null ? undefined : attr;
1796
+ // Ensure that missing attributes return undefined
1797
+ // Blackberry 4.7 returns "" from getAttribute #6938
1798
+ if ( !elem.attributes[ name ] && (elem.hasAttribute && !elem.hasAttribute( name )) ) {
1799
+ return undefined;
1764
1800
  }
1801
+
1802
+ var attr = !jQuery.support.hrefNormalized && notxml && special ?
1803
+ // Some attributes require a special call on IE
1804
+ elem.getAttribute( name, 2 ) :
1805
+ elem.getAttribute( name );
1806
+
1807
+ // Non-existent attributes return null, we normalize to undefined
1808
+ return attr === null ? undefined : attr;
1765
1809
  }
1766
1810
  });
1767
1811
 
@@ -1802,6 +1846,9 @@ jQuery.event = {
1802
1846
 
1803
1847
  if ( handler === false ) {
1804
1848
  handler = returnFalse;
1849
+ } else if ( !handler ) {
1850
+ // Fixes bug #7229. Fix recommended by jdalton
1851
+ return;
1805
1852
  }
1806
1853
 
1807
1854
  var handleObjIn, handleObj;
@@ -2145,8 +2192,10 @@ jQuery.event = {
2145
2192
  jQuery.event.trigger( event, data, parent, true );
2146
2193
 
2147
2194
  } else if ( !event.isDefaultPrevented() ) {
2148
- var target = event.target, old, targetType = type.replace(rnamespaces, ""),
2149
- isClick = jQuery.nodeName(target, "a") && targetType === "click",
2195
+ var old,
2196
+ target = event.target,
2197
+ targetType = type.replace( rnamespaces, "" ),
2198
+ isClick = jQuery.nodeName( target, "a" ) && targetType === "click",
2150
2199
  special = jQuery.event.special[ targetType ] || {};
2151
2200
 
2152
2201
  if ( (!special._default || special._default.call( elem, event ) === false) &&
@@ -2178,7 +2227,9 @@ jQuery.event = {
2178
2227
  },
2179
2228
 
2180
2229
  handle: function( event ) {
2181
- var all, handlers, namespaces, namespace_sort = [], namespace_re, events, args = jQuery.makeArray( arguments );
2230
+ var all, handlers, namespaces, namespace_re, events,
2231
+ namespace_sort = [],
2232
+ args = jQuery.makeArray( arguments );
2182
2233
 
2183
2234
  event = args[0] = jQuery.event.fix( event || window.event );
2184
2235
  event.currentTarget = this;
@@ -2257,7 +2308,8 @@ jQuery.event = {
2257
2308
 
2258
2309
  // Fix target property, if necessary
2259
2310
  if ( !event.target ) {
2260
- event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either
2311
+ // Fixes #1925 where srcElement might not be defined either
2312
+ event.target = event.srcElement || document;
2261
2313
  }
2262
2314
 
2263
2315
  // check if target is a textnode (safari)
@@ -2272,7 +2324,9 @@ jQuery.event = {
2272
2324
 
2273
2325
  // Calculate pageX/Y if missing and clientX/Y available
2274
2326
  if ( event.pageX == null && event.clientX != null ) {
2275
- var doc = document.documentElement, body = document.body;
2327
+ var doc = document.documentElement,
2328
+ body = document.body;
2329
+
2276
2330
  event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
2277
2331
  event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
2278
2332
  }
@@ -2478,7 +2532,8 @@ if ( !jQuery.support.submitBubbles ) {
2478
2532
  setup: function( data, namespaces ) {
2479
2533
  if ( this.nodeName.toLowerCase() !== "form" ) {
2480
2534
  jQuery.event.add(this, "click.specialSubmit", function( e ) {
2481
- var elem = e.target, type = elem.type;
2535
+ var elem = e.target,
2536
+ type = elem.type;
2482
2537
 
2483
2538
  if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
2484
2539
  e.liveFired = undefined;
@@ -2487,7 +2542,8 @@ if ( !jQuery.support.submitBubbles ) {
2487
2542
  });
2488
2543
 
2489
2544
  jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
2490
- var elem = e.target, type = elem.type;
2545
+ var elem = e.target,
2546
+ type = elem.type;
2491
2547
 
2492
2548
  if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
2493
2549
  e.liveFired = undefined;
@@ -2728,7 +2784,8 @@ jQuery.fn.extend({
2728
2784
 
2729
2785
  toggle: function( fn ) {
2730
2786
  // Save reference to arguments for access in closure
2731
- var args = arguments, i = 1;
2787
+ var args = arguments,
2788
+ i = 1;
2732
2789
 
2733
2790
  // link all the functions, so any of them can unbind this click handler
2734
2791
  while ( i < args.length ) {
@@ -2823,8 +2880,9 @@ jQuery.each(["live", "die"], function( i, name ) {
2823
2880
  });
2824
2881
 
2825
2882
  function liveHandler( event ) {
2826
- var stop, maxLevel, elems = [], selectors = [],
2827
- related, match, handleObj, elem, j, i, l, data, close, namespace, ret,
2883
+ var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret,
2884
+ elems = [],
2885
+ selectors = [],
2828
2886
  events = jQuery.data( this, this.nodeType ? "events" : "__events__" );
2829
2887
 
2830
2888
  if ( typeof events === "function" ) {
@@ -2835,7 +2893,7 @@ function liveHandler( event ) {
2835
2893
  if ( event.liveFired === this || !events || !events.live || event.button && event.type === "click" ) {
2836
2894
  return;
2837
2895
  }
2838
-
2896
+
2839
2897
  if ( event.namespace ) {
2840
2898
  namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)");
2841
2899
  }
@@ -2899,6 +2957,9 @@ function liveHandler( event ) {
2899
2957
  if ( ret === false ) {
2900
2958
  stop = false;
2901
2959
  }
2960
+ if ( event.isImmediatePropagationStopped() ) {
2961
+ break;
2962
+ }
2902
2963
  }
2903
2964
  }
2904
2965
 
@@ -4287,7 +4348,8 @@ var runtil = /Until$/,
4287
4348
 
4288
4349
  jQuery.fn.extend({
4289
4350
  find: function( selector ) {
4290
- var ret = this.pushStack( "", "find", selector ), length = 0;
4351
+ var ret = this.pushStack( "", "find", selector ),
4352
+ length = 0;
4291
4353
 
4292
4354
  for ( var i = 0, l = this.length; i < l; i++ ) {
4293
4355
  length = ret.length;
@@ -4336,7 +4398,9 @@ jQuery.fn.extend({
4336
4398
  var ret = [], i, l, cur = this[0];
4337
4399
 
4338
4400
  if ( jQuery.isArray( selectors ) ) {
4339
- var match, matches = {}, selector, level = 1;
4401
+ var match, selector,
4402
+ matches = {},
4403
+ level = 1;
4340
4404
 
4341
4405
  if ( cur && selectors.length ) {
4342
4406
  for ( i = 0, l = selectors.length; i < l; i++ ) {
@@ -4502,7 +4566,9 @@ jQuery.extend({
4502
4566
  },
4503
4567
 
4504
4568
  dir: function( elem, dir, until ) {
4505
- var matched = [], cur = elem[dir];
4569
+ var matched = [],
4570
+ cur = elem[ dir ];
4571
+
4506
4572
  while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
4507
4573
  if ( cur.nodeType === 1 ) {
4508
4574
  matched.push( cur );
@@ -4580,7 +4646,8 @@ var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
4580
4646
  rtbody = /<tbody/i,
4581
4647
  rhtml = /<|&#?\w+;/,
4582
4648
  rnocache = /<(?:script|object|embed|option|style)/i,
4583
- rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, // checked="checked" or checked (html5)
4649
+ // checked="checked" or checked (html5)
4650
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
4584
4651
  raction = /\=([^="'>\s]+\/)>/g,
4585
4652
  wrapMap = {
4586
4653
  option: [ 1, "<select multiple='multiple'>", "</select>" ],
@@ -4606,7 +4673,8 @@ jQuery.fn.extend({
4606
4673
  text: function( text ) {
4607
4674
  if ( jQuery.isFunction(text) ) {
4608
4675
  return this.each(function(i) {
4609
- var self = jQuery(this);
4676
+ var self = jQuery( this );
4677
+
4610
4678
  self.text( text.call(this, i, self.text()) );
4611
4679
  });
4612
4680
  }
@@ -4655,7 +4723,8 @@ jQuery.fn.extend({
4655
4723
  }
4656
4724
 
4657
4725
  return this.each(function() {
4658
- var self = jQuery( this ), contents = self.contents();
4726
+ var self = jQuery( this ),
4727
+ contents = self.contents();
4659
4728
 
4660
4729
  if ( contents.length ) {
4661
4730
  contents.wrapAll( html );
@@ -4766,7 +4835,9 @@ jQuery.fn.extend({
4766
4835
  // attributes in IE that are actually only stored
4767
4836
  // as properties will not be copied (such as the
4768
4837
  // the name attribute on an input).
4769
- var html = this.outerHTML, ownerDocument = this.ownerDocument;
4838
+ var html = this.outerHTML,
4839
+ ownerDocument = this.ownerDocument;
4840
+
4770
4841
  if ( !html ) {
4771
4842
  var div = ownerDocument.createElement("div");
4772
4843
  div.appendChild( this.cloneNode(true) );
@@ -4821,7 +4892,8 @@ jQuery.fn.extend({
4821
4892
 
4822
4893
  } else if ( jQuery.isFunction( value ) ) {
4823
4894
  this.each(function(i){
4824
- var self = jQuery(this);
4895
+ var self = jQuery( this );
4896
+
4825
4897
  self.html( value.call(this, i, self.html()) );
4826
4898
  });
4827
4899
 
@@ -4844,13 +4916,14 @@ jQuery.fn.extend({
4844
4916
  }
4845
4917
 
4846
4918
  if ( typeof value !== "string" ) {
4847
- value = jQuery(value).detach();
4919
+ value = jQuery( value ).detach();
4848
4920
  }
4849
4921
 
4850
4922
  return this.each(function() {
4851
- var next = this.nextSibling, parent = this.parentNode;
4923
+ var next = this.nextSibling,
4924
+ parent = this.parentNode;
4852
4925
 
4853
- jQuery(this).remove();
4926
+ jQuery( this ).remove();
4854
4927
 
4855
4928
  if ( next ) {
4856
4929
  jQuery(next).before( value );
@@ -4868,7 +4941,9 @@ jQuery.fn.extend({
4868
4941
  },
4869
4942
 
4870
4943
  domManip: function( args, table, callback ) {
4871
- var results, first, value = args[0], scripts = [], fragment, parent;
4944
+ var results, first, fragment, parent,
4945
+ value = args[0],
4946
+ scripts = [];
4872
4947
 
4873
4948
  // We can't cloneNode fragments that contain checked, in WebKit
4874
4949
  if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
@@ -4943,7 +5018,9 @@ function cloneCopyEvent(orig, ret) {
4943
5018
  return;
4944
5019
  }
4945
5020
 
4946
- var oldData = jQuery.data( orig[i++] ), curData = jQuery.data( this, oldData ), events = oldData && oldData.events;
5021
+ var oldData = jQuery.data( orig[i++] ),
5022
+ curData = jQuery.data( this, oldData ),
5023
+ events = oldData && oldData.events;
4947
5024
 
4948
5025
  if ( events ) {
4949
5026
  delete curData.handle;
@@ -5000,7 +5077,8 @@ jQuery.each({
5000
5077
  replaceAll: "replaceWith"
5001
5078
  }, function( name, original ) {
5002
5079
  jQuery.fn[ name ] = function( selector ) {
5003
- var ret = [], insert = jQuery( selector ),
5080
+ var ret = [],
5081
+ insert = jQuery( selector ),
5004
5082
  parent = this.length === 1 && this[0].parentNode;
5005
5083
 
5006
5084
  if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
@@ -5186,8 +5264,8 @@ var ralpha = /alpha\([^)]*\)/i,
5186
5264
  cssHeight = [ "Top", "Bottom" ],
5187
5265
  curCSS,
5188
5266
 
5189
- // cache check for defaultView.getComputedStyle
5190
- getComputedStyle = document.defaultView && document.defaultView.getComputedStyle,
5267
+ getComputedStyle,
5268
+ currentStyle,
5191
5269
 
5192
5270
  fcamelCase = function( all, letter ) {
5193
5271
  return letter.toUpperCase();
@@ -5343,7 +5421,29 @@ jQuery.each(["height", "width"], function( i, name ) {
5343
5421
  });
5344
5422
  }
5345
5423
 
5346
- return val + "px";
5424
+ if ( val <= 0 ) {
5425
+ val = curCSS( elem, name, name );
5426
+
5427
+ if ( val === "0px" && currentStyle ) {
5428
+ val = currentStyle( elem, name, name );
5429
+ }
5430
+
5431
+ if ( val != null ) {
5432
+ // Should return "auto" instead of 0, use 0 for
5433
+ // temporary backwards-compat
5434
+ return val === "" || val === "auto" ? "0px" : val;
5435
+ }
5436
+ }
5437
+
5438
+ if ( val < 0 || val == null ) {
5439
+ val = elem.style[ name ];
5440
+
5441
+ // Should return "auto" instead of 0, use 0 for
5442
+ // temporary backwards-compat
5443
+ return val === "" || val === "auto" ? "0px" : val;
5444
+ }
5445
+
5446
+ return typeof val === "string" ? val : val + "px";
5347
5447
  }
5348
5448
  },
5349
5449
 
@@ -5392,8 +5492,8 @@ if ( !jQuery.support.opacity ) {
5392
5492
  };
5393
5493
  }
5394
5494
 
5395
- if ( getComputedStyle ) {
5396
- curCSS = function( elem, newName, name ) {
5495
+ if ( document.defaultView && document.defaultView.getComputedStyle ) {
5496
+ getComputedStyle = function( elem, newName, name ) {
5397
5497
  var ret, defaultView, computedStyle;
5398
5498
 
5399
5499
  name = name.replace( rupper, "-$1" ).toLowerCase();
@@ -5411,10 +5511,13 @@ if ( getComputedStyle ) {
5411
5511
 
5412
5512
  return ret;
5413
5513
  };
5514
+ }
5414
5515
 
5415
- } else if ( document.documentElement.currentStyle ) {
5416
- curCSS = function( elem, name ) {
5417
- var left, rsLeft, ret = elem.currentStyle && elem.currentStyle[ name ], style = elem.style;
5516
+ if ( document.documentElement.currentStyle ) {
5517
+ currentStyle = function( elem, name ) {
5518
+ var left, rsLeft,
5519
+ ret = elem.currentStyle && elem.currentStyle[ name ],
5520
+ style = elem.style;
5418
5521
 
5419
5522
  // From the awesome hack by Dean Edwards
5420
5523
  // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
@@ -5436,10 +5539,12 @@ if ( getComputedStyle ) {
5436
5539
  elem.runtimeStyle.left = rsLeft;
5437
5540
  }
5438
5541
 
5439
- return ret;
5542
+ return ret === "" ? "auto" : ret;
5440
5543
  };
5441
5544
  }
5442
5545
 
5546
+ curCSS = getComputedStyle || currentStyle;
5547
+
5443
5548
  function getWH( elem, name, extra ) {
5444
5549
  var which = name === "width" ? cssWidth : cssHeight,
5445
5550
  val = name === "width" ? elem.offsetWidth : elem.offsetHeight;
@@ -5466,7 +5571,8 @@ function getWH( elem, name, extra ) {
5466
5571
 
5467
5572
  if ( jQuery.expr && jQuery.expr.filters ) {
5468
5573
  jQuery.expr.filters.hidden = function( elem ) {
5469
- var width = elem.offsetWidth, height = elem.offsetHeight;
5574
+ var width = elem.offsetWidth,
5575
+ height = elem.offsetHeight;
5470
5576
 
5471
5577
  return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && (elem.style.display || jQuery.css( elem, "display" )) === "none");
5472
5578
  };
@@ -5485,7 +5591,7 @@ var jsc = jQuery.now(),
5485
5591
  rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
5486
5592
  rselectTextarea = /^(?:select|textarea)/i,
5487
5593
  rinput = /^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
5488
- rnoContent = /^(?:GET|HEAD|DELETE)$/,
5594
+ rnoContent = /^(?:GET|HEAD)$/,
5489
5595
  rbracket = /\[\]$/,
5490
5596
  jsre = /\=\?(&|$)/,
5491
5597
  rquery = /\?/,
@@ -5720,10 +5826,6 @@ jQuery.extend({
5720
5826
  var customJsonp = window[ jsonp ];
5721
5827
 
5722
5828
  window[ jsonp ] = function( tmp ) {
5723
- data = tmp;
5724
- jQuery.handleSuccess( s, xhr, status, data );
5725
- jQuery.handleComplete( s, xhr, status, data );
5726
-
5727
5829
  if ( jQuery.isFunction( customJsonp ) ) {
5728
5830
  customJsonp( tmp );
5729
5831
 
@@ -5735,6 +5837,10 @@ jQuery.extend({
5735
5837
  delete window[ jsonp ];
5736
5838
  } catch( jsonpError ) {}
5737
5839
  }
5840
+
5841
+ data = tmp;
5842
+ jQuery.handleSuccess( s, xhr, status, data );
5843
+ jQuery.handleComplete( s, xhr, status, data );
5738
5844
 
5739
5845
  if ( head ) {
5740
5846
  head.removeChild( script );
@@ -5746,7 +5852,7 @@ jQuery.extend({
5746
5852
  s.cache = false;
5747
5853
  }
5748
5854
 
5749
- if ( s.cache === false && type === "GET" ) {
5855
+ if ( s.cache === false && noContent ) {
5750
5856
  var ts = jQuery.now();
5751
5857
 
5752
5858
  // try replacing _= if it is there
@@ -5756,8 +5862,8 @@ jQuery.extend({
5756
5862
  s.url = ret + ((ret === s.url) ? (rquery.test(s.url) ? "&" : "?") + "_=" + ts : "");
5757
5863
  }
5758
5864
 
5759
- // If data is available, append data to url for get requests
5760
- if ( s.data && type === "GET" ) {
5865
+ // If data is available, append data to url for GET/HEAD requests
5866
+ if ( s.data && noContent ) {
5761
5867
  s.url += (rquery.test(s.url) ? "&" : "?") + s.data;
5762
5868
  }
5763
5869
 
@@ -5768,7 +5874,7 @@ jQuery.extend({
5768
5874
 
5769
5875
  // Matches an absolute URL, and saves the domain
5770
5876
  var parts = rurl.exec( s.url ),
5771
- remote = parts && (parts[1] && parts[1] !== location.protocol || parts[2] !== location.host);
5877
+ remote = parts && (parts[1] && parts[1].toLowerCase() !== location.protocol || parts[2].toLowerCase() !== location.host);
5772
5878
 
5773
5879
  // If we're requesting a remote document
5774
5880
  // and trying to load JSON or Script with a GET
@@ -5944,10 +6050,11 @@ jQuery.extend({
5944
6050
  try {
5945
6051
  var oldAbort = xhr.abort;
5946
6052
  xhr.abort = function() {
5947
- // xhr.abort in IE7 is not a native JS function
5948
- // and does not have a call property
5949
- if ( xhr && oldAbort.call ) {
5950
- oldAbort.call( xhr );
6053
+ if ( xhr ) {
6054
+ // oldAbort has no call property in IE7 so
6055
+ // just do it this way, which works in all
6056
+ // browsers
6057
+ Function.prototype.call.call( oldAbort, xhr );
5951
6058
  }
5952
6059
 
5953
6060
  onreadystatechange( "abort" );
@@ -5987,11 +6094,12 @@ jQuery.extend({
5987
6094
  // Serialize an array of form elements or a set of
5988
6095
  // key/values into a query string
5989
6096
  param: function( a, traditional ) {
5990
- var s = [], add = function( key, value ) {
5991
- // If value is a function, invoke it and return its value
5992
- value = jQuery.isFunction(value) ? value() : value;
5993
- s[ s.length ] = encodeURIComponent(key) + "=" + encodeURIComponent(value);
5994
- };
6097
+ var s = [],
6098
+ add = function( key, value ) {
6099
+ // If value is a function, invoke it and return its value
6100
+ value = jQuery.isFunction(value) ? value() : value;
6101
+ s[ s.length ] = encodeURIComponent(key) + "=" + encodeURIComponent(value);
6102
+ };
5995
6103
 
5996
6104
  // Set traditional to true for jQuery <= 1.3.2 behavior.
5997
6105
  if ( traditional === undefined ) {
@@ -6215,28 +6323,39 @@ var elemdisplay = {},
6215
6323
 
6216
6324
  jQuery.fn.extend({
6217
6325
  show: function( speed, easing, callback ) {
6326
+ var elem, display;
6327
+
6218
6328
  if ( speed || speed === 0 ) {
6219
6329
  return this.animate( genFx("show", 3), speed, easing, callback);
6330
+
6220
6331
  } else {
6221
6332
  for ( var i = 0, j = this.length; i < j; i++ ) {
6333
+ elem = this[i];
6334
+ display = elem.style.display;
6335
+
6222
6336
  // Reset the inline display of this element to learn if it is
6223
6337
  // being hidden by cascaded rules or not
6224
- if ( !jQuery.data(this[i], "olddisplay") && this[i].style.display === "none" ) {
6225
- this[i].style.display = "";
6338
+ if ( !jQuery.data(elem, "olddisplay") && display === "none" ) {
6339
+ display = elem.style.display = "";
6226
6340
  }
6227
6341
 
6228
6342
  // Set elements which have been overridden with display: none
6229
6343
  // in a stylesheet to whatever the default browser style is
6230
6344
  // for such an element
6231
- if ( this[i].style.display === "" && jQuery.css( this[i], "display" ) === "none" ) {
6232
- jQuery.data(this[i], "olddisplay", defaultDisplay(this[i].nodeName));
6345
+ if ( display === "" && jQuery.css( elem, "display" ) === "none" ) {
6346
+ jQuery.data(elem, "olddisplay", defaultDisplay(elem.nodeName));
6233
6347
  }
6234
6348
  }
6235
6349
 
6236
6350
  // Set the display of most of the elements in a second loop
6237
6351
  // to avoid the constant reflow
6238
6352
  for ( i = 0; i < j; i++ ) {
6239
- this[i].style.display = jQuery.data(this[i], "olddisplay") || "";
6353
+ elem = this[i];
6354
+ display = elem.style.display;
6355
+
6356
+ if ( display === "" || display === "none" ) {
6357
+ elem.style.display = jQuery.data(elem, "olddisplay") || "";
6358
+ }
6240
6359
  }
6241
6360
 
6242
6361
  return this;
@@ -6301,7 +6420,7 @@ jQuery.fn.extend({
6301
6420
  }
6302
6421
 
6303
6422
  return this[ optall.queue === false ? "each" : "queue" ](function() {
6304
- // XXX this does not always have a nodeName when running the
6423
+ // XXX 'this' does not always have a nodeName when running the
6305
6424
  // test suite
6306
6425
 
6307
6426
  var opt = jQuery.extend({}, optall), p,
@@ -6374,7 +6493,7 @@ jQuery.fn.extend({
6374
6493
 
6375
6494
  } else {
6376
6495
  var parts = rfxnum.exec(val),
6377
- start = e.cur(true) || 0;
6496
+ start = e.cur() || 0;
6378
6497
 
6379
6498
  if ( parts ) {
6380
6499
  var end = parseFloat( parts[2] ),
@@ -6383,7 +6502,7 @@ jQuery.fn.extend({
6383
6502
  // We need to compute starting value
6384
6503
  if ( unit !== "px" ) {
6385
6504
  jQuery.style( self, name, (end || 1) + unit);
6386
- start = ((end || 1) / e.cur(true)) * start;
6505
+ start = ((end || 1) / e.cur()) * start;
6387
6506
  jQuery.style( self, name, start + unit);
6388
6507
  }
6389
6508
 
@@ -6452,7 +6571,8 @@ jQuery.each({
6452
6571
  slideUp: genFx("hide", 1),
6453
6572
  slideToggle: genFx("toggle", 1),
6454
6573
  fadeIn: { opacity: "show" },
6455
- fadeOut: { opacity: "hide" }
6574
+ fadeOut: { opacity: "hide" },
6575
+ fadeToggle: { opacity: "toggle" }
6456
6576
  }, function( name, props ) {
6457
6577
  jQuery.fn[ name ] = function( speed, easing, callback ) {
6458
6578
  return this.animate( props, speed, easing, callback );
@@ -6530,6 +6650,9 @@ jQuery.fx.prototype = {
6530
6650
 
6531
6651
  // Start an animation from one number to another
6532
6652
  custom: function( from, to, unit ) {
6653
+ var self = this,
6654
+ fx = jQuery.fx;
6655
+
6533
6656
  this.startTime = jQuery.now();
6534
6657
  this.start = from;
6535
6658
  this.end = to;
@@ -6537,7 +6660,6 @@ jQuery.fx.prototype = {
6537
6660
  this.now = this.start;
6538
6661
  this.pos = this.state = 0;
6539
6662
 
6540
- var self = this, fx = jQuery.fx;
6541
6663
  function t( gotoEnd ) {
6542
6664
  return self.step(gotoEnd);
6543
6665
  }
@@ -6594,7 +6716,9 @@ jQuery.fx.prototype = {
6594
6716
  if ( done ) {
6595
6717
  // Reset the overflow
6596
6718
  if ( this.options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
6597
- var elem = this.elem, options = this.options;
6719
+ var elem = this.elem,
6720
+ options = this.options;
6721
+
6598
6722
  jQuery.each( [ "", "X", "Y" ], function (index, value) {
6599
6723
  elem.style[ "overflow" + value ] = options.overflow[index];
6600
6724
  } );
@@ -6775,11 +6899,16 @@ if ( "getBoundingClientRect" in document.documentElement ) {
6775
6899
 
6776
6900
  jQuery.offset.initialize();
6777
6901
 
6778
- var offsetParent = elem.offsetParent, prevOffsetParent = elem,
6779
- doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement,
6780
- body = doc.body, defaultView = doc.defaultView,
6902
+ var computedStyle,
6903
+ offsetParent = elem.offsetParent,
6904
+ prevOffsetParent = elem,
6905
+ doc = elem.ownerDocument,
6906
+ docElem = doc.documentElement,
6907
+ body = doc.body,
6908
+ defaultView = doc.defaultView,
6781
6909
  prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
6782
- top = elem.offsetTop, left = elem.offsetLeft;
6910
+ top = elem.offsetTop,
6911
+ left = elem.offsetLeft;
6783
6912
 
6784
6913
  while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
6785
6914
  if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
@@ -6861,7 +6990,8 @@ jQuery.offset = {
6861
6990
  },
6862
6991
 
6863
6992
  bodyOffset: function( body ) {
6864
- var top = body.offsetTop, left = body.offsetLeft;
6993
+ var top = body.offsetTop,
6994
+ left = body.offsetLeft;
6865
6995
 
6866
6996
  jQuery.offset.initialize();
6867
6997
 
@@ -7044,27 +7174,31 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
7044
7174
  });
7045
7175
  }
7046
7176
 
7047
- return jQuery.isWindow( elem ) ?
7177
+ if ( jQuery.isWindow( elem ) ) {
7048
7178
  // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
7049
- elem.document.compatMode === "CSS1Compat" && elem.document.documentElement[ "client" + name ] ||
7050
- elem.document.body[ "client" + name ] :
7051
-
7052
- // Get document width or height
7053
- (elem.nodeType === 9) ? // is it a document
7054
- // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
7055
- Math.max(
7056
- elem.documentElement["client" + name],
7057
- elem.body["scroll" + name], elem.documentElement["scroll" + name],
7058
- elem.body["offset" + name], elem.documentElement["offset" + name]
7059
- ) :
7060
-
7061
- // Get or set width or height on the element
7062
- size === undefined ?
7063
- // Get width or height on the element
7064
- parseFloat( jQuery.css( elem, type ) ) :
7065
-
7066
- // Set the width or height on the element (default to pixels if value is unitless)
7067
- this.css( type, typeof size === "string" ? size : size + "px" );
7179
+ return elem.document.compatMode === "CSS1Compat" && elem.document.documentElement[ "client" + name ] ||
7180
+ elem.document.body[ "client" + name ];
7181
+
7182
+ // Get document width or height
7183
+ } else if ( elem.nodeType === 9 ) {
7184
+ // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
7185
+ return Math.max(
7186
+ elem.documentElement["client" + name],
7187
+ elem.body["scroll" + name], elem.documentElement["scroll" + name],
7188
+ elem.body["offset" + name], elem.documentElement["offset" + name]
7189
+ );
7190
+
7191
+ // Get or set width or height on the element
7192
+ } else if ( size === undefined ) {
7193
+ var orig = jQuery.css( elem, type ),
7194
+ ret = parseFloat( orig );
7195
+
7196
+ return jQuery.isNaN( ret ) ? orig : ret;
7197
+
7198
+ // Set the width or height on the element (default to pixels if value is unitless)
7199
+ } else {
7200
+ return this.css( type, typeof size === "string" ? size : size + "px" );
7201
+ }
7068
7202
  };
7069
7203
 
7070
7204
  });