rhodes 3.2.0.beta.4 → 3.2.0.beta.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (667) hide show
  1. data/CHANGELOG +2 -0
  2. data/Manifest.txt +517 -23
  3. data/Rakefile +52 -7
  4. data/doc/build.txt +7 -1
  5. data/doc/device-caps.txt +1 -1
  6. data/doc/install.txt +12 -0
  7. data/doc/jqt-jqm-transition.txt +121 -0
  8. data/doc/release.txt +6 -1
  9. data/doc/ui.txt +4 -2
  10. data/installer/icon.ico +0 -0
  11. data/lib/extensions/barcode/ext/barcode/shared/src/zbar.c +7 -0
  12. data/lib/extensions/barcode/ext/barcode/shared/zbar/rho_bridge.c +3 -3
  13. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/README.TXT +74 -3
  14. data/lib/extensions/fcntl/ext/Rakefile +57 -38
  15. data/lib/extensions/fcntl/ext/build.bat +1 -0
  16. data/lib/extensions/fcntl/ext/fcntl.vcproj +323 -0
  17. data/lib/extensions/fileutils/fileutils.rb +57 -33
  18. data/lib/extensions/net-http/net/ftp.rb +40 -36
  19. data/lib/extensions/net-http/net/http.rb +98 -38
  20. data/lib/extensions/net-http/net/https.rb +3 -13
  21. data/lib/extensions/net-http/net/protocol.rb +20 -4
  22. data/lib/extensions/rexml/rexml/document.rb +11 -9
  23. data/lib/extensions/rexml/rexml/element.rb +1 -1
  24. data/lib/extensions/rexml/rexml/entity.rb +1 -1
  25. data/lib/extensions/rexml/rexml/formatters/default.rb +3 -1
  26. data/lib/extensions/rexml/rexml/formatters/pretty.rb +1 -1
  27. data/lib/extensions/rexml/rexml/light/node.rb +1 -2
  28. data/lib/extensions/rexml/rexml/parent.rb +1 -0
  29. data/lib/extensions/rexml/rexml/parsers/xpathparser.rb +2 -1
  30. data/lib/extensions/rexml/rexml/quickpath.rb +4 -1
  31. data/lib/extensions/rexml/rexml/rexml.rb +1 -1
  32. data/lib/extensions/rexml/rexml/source.rb +25 -14
  33. data/lib/extensions/rexml/rexml/text.rb +20 -21
  34. data/lib/extensions/rexml/rexml/xmldecl.rb +2 -2
  35. data/lib/extensions/rexml/rexml/xmltokens.rb +2 -2
  36. data/lib/extensions/rexml/rexml/xpath_parser.rb +2 -1
  37. data/lib/extensions/set/set.rb +100 -25
  38. data/lib/extensions/uri/uri/common.rb +134 -4
  39. data/lib/extensions/uri/uri/ftp.rb +14 -3
  40. data/lib/extensions/uri/uri/generic.rb +53 -44
  41. data/lib/extensions/uri/uri/http.rb +1 -1
  42. data/lib/extensions/uri/uri/https.rb +1 -1
  43. data/lib/extensions/uri/uri/ldap.rb +1 -1
  44. data/lib/extensions/uri/uri/mailto.rb +9 -9
  45. data/lib/framework/rho/rhoviewhelpers.rb +3 -2
  46. data/lib/framework/rholang/localization_simplified.rb +5 -3
  47. data/platform/android/Rhodes/src/com/rhomobile/rhodes/Logger.java +14 -1
  48. data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/ImageCapture.java +1 -1
  49. data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/ImageCaptureCallback.java +0 -1
  50. data/platform/android/Rhodes/src/com/rhomobile/rhodes/file/RhoFileApi.java +12 -5
  51. data/platform/android/build/android.rake +7 -7
  52. data/platform/iphone/Classes/AppManager/AppManager.m +19 -7
  53. data/platform/iphone/rbuild/iphone.rake +1 -1
  54. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtCore.framework/Versions/4/QtCore +0 -0
  55. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtGui.framework/Versions/4/QtGui +0 -0
  56. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtNetwork.framework/Versions/4/QtNetwork +0 -0
  57. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtWebKit.framework/Versions/4/QtWebKit +0 -0
  58. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/phonon.framework/Versions/4/phonon +0 -0
  59. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Info.plist +1 -1
  60. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/MacOS/RhoSimulator +0 -0
  61. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/accessible/libqtaccessiblewidgets.dylib +0 -0
  62. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/bearer/libqgenericbearer.dylib +0 -0
  63. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqcncodecs.dylib +0 -0
  64. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqjpcodecs.dylib +0 -0
  65. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqkrcodecs.dylib +0 -0
  66. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqtwcodecs.dylib +0 -0
  67. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/graphicssystems/libqtracegraphicssystem.dylib +0 -0
  68. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqgif.dylib +0 -0
  69. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqico.dylib +0 -0
  70. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqjpeg.dylib +0 -0
  71. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqmng.dylib +0 -0
  72. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqtiff.dylib +0 -0
  73. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/phonon_backend/libphonon_qt7.dylib +0 -0
  74. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/qmltooling/libqmldbg_tcp.dylib +0 -0
  75. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Resources/rho.icns +0 -0
  76. data/platform/osx/build/osx.rake +25 -3
  77. data/platform/shared/common/AutoPointer.h +1 -1
  78. data/platform/shared/common/RhoStd.h +10 -10
  79. data/platform/shared/common/RhodesAppBase.cpp +3 -0
  80. data/platform/shared/logging/RhoLogConf.cpp +1 -1
  81. data/platform/shared/qt/rhodes/QtMainWindow.cpp +7 -0
  82. data/platform/shared/qt/rhodes/RhoSimulator.h +3 -1
  83. data/platform/shared/qt/rhodes/main.cpp +3 -0
  84. data/platform/shared/qt/rhodes/resources/rho.icns +0 -0
  85. data/platform/shared/qt/rhodes/resources/rho.ico +0 -0
  86. data/platform/shared/qt/rhodes/resources/rho.png +0 -0
  87. data/platform/shared/qt/rhodes/resources/simulator.qrc +5 -0
  88. data/platform/shared/qt/rhodes/rhodes.pro +2 -0
  89. data/platform/shared/ruby/ext/rho/rhosupport.c +21 -2
  90. data/platform/shared/ruby/ext/socket_192/addrinfo.h +191 -0
  91. data/platform/shared/ruby/ext/socket_192/ancdata.c +1800 -0
  92. data/platform/shared/ruby/ext/socket_192/basicsocket.c +771 -0
  93. data/platform/shared/ruby/ext/socket_192/constants.c +145 -0
  94. data/platform/shared/ruby/ext/socket_192/depend +25 -0
  95. data/platform/shared/ruby/ext/socket_192/extconf.rb +365 -0
  96. data/platform/shared/ruby/ext/socket_192/getaddrinfo.c +674 -0
  97. data/platform/shared/ruby/ext/socket_192/getnameinfo.c +260 -0
  98. data/platform/shared/ruby/ext/socket_192/init.c +575 -0
  99. data/platform/shared/ruby/ext/socket_192/ipsocket.c +308 -0
  100. data/platform/shared/ruby/ext/socket_192/lib/socket.rb +755 -0
  101. data/platform/shared/ruby/ext/socket_192/mkconstants.rb +696 -0
  102. data/platform/shared/ruby/ext/socket_192/option.c +692 -0
  103. data/platform/shared/ruby/ext/socket_192/raddrinfo.c +2211 -0
  104. data/platform/shared/ruby/ext/socket_192/rubysocket.h +306 -0
  105. data/platform/shared/ruby/ext/socket_192/socket.c +1870 -0
  106. data/platform/shared/ruby/ext/socket_192/sockport.h +84 -0
  107. data/platform/shared/ruby/ext/socket_192/sockssocket.c +58 -0
  108. data/platform/shared/ruby/ext/socket_192/tcpserver.c +145 -0
  109. data/platform/shared/ruby/ext/socket_192/tcpsocket.c +69 -0
  110. data/platform/shared/ruby/ext/socket_192/udpsocket.c +264 -0
  111. data/platform/shared/ruby/ext/socket_192/unixserver.c +154 -0
  112. data/platform/shared/ruby/ext/socket_192/unixsocket.c +514 -0
  113. data/platform/shared/ruby/ext/stringio/stringio.c +158 -61
  114. data/platform/shared/ruby/ext/strscan/strscan.c +18 -31
  115. data/platform/shared/ruby/iphone/ruby/config.h +2 -1
  116. data/platform/shared/ruby/linux/ruby/config.h +2 -1
  117. data/platform/shared/ruby/symbian/ruby/config.h +2 -1
  118. data/platform/shared/ruby/win32/ruby/config.h +1 -0
  119. data/platform/shared/ruby/win32/ruby/constdefs.c +5866 -0
  120. data/platform/shared/ruby/win32/ruby/constdefs.h +1788 -0
  121. data/platform/shared/ruby/wince/ruby/config.h +1 -0
  122. data/platform/shared/ruby/wince/ruby/constdefs.c +5866 -0
  123. data/platform/shared/ruby/wince/ruby/constdefs.h +1788 -0
  124. data/platform/symbian/build/symbian.rake +8 -0
  125. data/platform/symbian/rhodes/rhodes.pro +3 -3
  126. data/platform/win32/RhoSimulator/RhoSimulator.exe +0 -0
  127. data/platform/wm/build/wm.rake +1 -1
  128. data/platform/wm/rhodes/Rhodes.cpp +3 -0
  129. data/platform/wm/rhodes/rhodes.vcproj +612 -6
  130. data/platform/wm/rhodes/rhosim.rc +394 -0
  131. data/platform/wm/rhodes/simulator/MainWindowQt.cpp +2 -2
  132. data/platform/wp7/RhoRubyLib/common/RhodesApp.cs +8 -2
  133. data/platform/wp7/RhoRubyLib/net/NetRequest.cs +5 -1
  134. data/platform/wp7/build/wp.rake +1 -1
  135. data/rakefile.rb +52 -7
  136. data/res/generators/templates/application/app/layout.erb +4 -4
  137. data/res/generators/templates/application/public/jqmobile/{jquery.mobile-1.0b3.css → jquery.mobile-1.0rc1.css} +507 -457
  138. data/res/generators/templates/application/public/jqmobile/{jquery.mobile-1.0b3.js → jquery.mobile-1.0rc1.js} +565 -458
  139. data/res/generators/templates/application/public/jqmobile/jquery.mobile-1.0rc1.min.css +12 -0
  140. data/res/generators/templates/application/public/jqmobile/jquery.mobile-1.0rc1.min.js +170 -0
  141. data/res/generators/templates/application/public/jquery/{jquery-1.6.3.js → jquery-1.6.4.js} +10 -8
  142. data/res/generators/templates/application/public/jquery/jquery-1.6.4.min.js +4 -0
  143. data/res/generators/templates/application/public/js/jqmobile-patch.js +47 -1
  144. data/res/icons/rho.icns +0 -0
  145. data/res/icons/rho.ico +0 -0
  146. data/res/icons/rho.png +0 -0
  147. data/res/icons/rho.psd +0 -0
  148. data/res/icons/rhodes.icns +0 -0
  149. data/res/icons/rhodes.ico +0 -0
  150. data/res/icons/rhodes.png +0 -0
  151. data/res/icons/rhodes.psd +0 -0
  152. data/res/icons/rhosim.icns +0 -0
  153. data/res/icons/rhosim.ico +0 -0
  154. data/res/icons/rhosim.png +0 -0
  155. data/res/icons/rhosim.psd +0 -0
  156. data/rhodes.gemspec +1 -1
  157. data/spec/framework_spec/app/spec/core/file/expand_path_spec.rb +4 -4
  158. data/spec/framework_spec/app/spec/library/net/FTPError_spec.rb +8 -0
  159. data/spec/framework_spec/app/spec/library/net/FTPPermError_spec.rb +12 -0
  160. data/spec/framework_spec/app/spec/library/net/FTPProtoError_spec.rb +12 -0
  161. data/spec/framework_spec/app/spec/library/net/FTPReplyError_spec.rb +12 -0
  162. data/spec/framework_spec/app/spec/library/net/FTPTempError_spec.rb +12 -0
  163. data/spec/framework_spec/app/spec/library/net/ftp/abort_spec.rb +62 -0
  164. data/spec/framework_spec/app/spec/library/net/ftp/acct_spec.rb +58 -0
  165. data/spec/framework_spec/app/spec/library/net/ftp/binary_spec.rb +24 -0
  166. data/spec/framework_spec/app/spec/library/net/ftp/chdir_spec.rb +101 -0
  167. data/spec/framework_spec/app/spec/library/net/ftp/close_spec.rb +28 -0
  168. data/spec/framework_spec/app/spec/library/net/ftp/closed_spec.rb +21 -0
  169. data/spec/framework_spec/app/spec/library/net/ftp/connect_spec.rb +49 -0
  170. data/spec/framework_spec/app/spec/library/net/ftp/debug_mode_spec.rb +23 -0
  171. data/spec/framework_spec/app/spec/library/net/ftp/delete_spec.rb +59 -0
  172. data/spec/framework_spec/app/spec/library/net/ftp/dir_spec.rb +8 -0
  173. data/spec/framework_spec/app/spec/library/net/ftp/fixtures/putbinaryfile +3 -0
  174. data/spec/framework_spec/app/spec/library/net/ftp/fixtures/puttextfile +3 -0
  175. data/spec/framework_spec/app/spec/library/net/ftp/fixtures/server.rb +258 -0
  176. data/spec/framework_spec/app/spec/library/net/ftp/get_spec.rb +21 -0
  177. data/spec/framework_spec/app/spec/library/net/ftp/getbinaryfile_spec.rb +8 -0
  178. data/spec/framework_spec/app/spec/library/net/ftp/getdir_spec.rb +7 -0
  179. data/spec/framework_spec/app/spec/library/net/ftp/gettextfile_spec.rb +8 -0
  180. data/spec/framework_spec/app/spec/library/net/ftp/help_spec.rb +66 -0
  181. data/spec/framework_spec/app/spec/library/net/ftp/initialize_spec.rb +87 -0
  182. data/spec/framework_spec/app/spec/library/net/ftp/last_response_code_spec.rb +8 -0
  183. data/spec/framework_spec/app/spec/library/net/ftp/last_response_spec.rb +25 -0
  184. data/spec/framework_spec/app/spec/library/net/ftp/lastresp_spec.rb +8 -0
  185. data/spec/framework_spec/app/spec/library/net/ftp/list_spec.rb +8 -0
  186. data/spec/framework_spec/app/spec/library/net/ftp/login_spec.rb +216 -0
  187. data/spec/framework_spec/app/spec/library/net/ftp/ls_spec.rb +8 -0
  188. data/spec/framework_spec/app/spec/library/net/ftp/mdtm_spec.rb +38 -0
  189. data/spec/framework_spec/app/spec/library/net/ftp/mkdir_spec.rb +61 -0
  190. data/spec/framework_spec/app/spec/library/net/ftp/mtime_spec.rb +50 -0
  191. data/spec/framework_spec/app/spec/library/net/ftp/nlst_spec.rb +122 -0
  192. data/spec/framework_spec/app/spec/library/net/ftp/noop_spec.rb +38 -0
  193. data/spec/framework_spec/app/spec/library/net/ftp/open_spec.rb +55 -0
  194. data/spec/framework_spec/app/spec/library/net/ftp/passive_spec.rb +24 -0
  195. data/spec/framework_spec/app/spec/library/net/ftp/put_spec.rb +21 -0
  196. data/spec/framework_spec/app/spec/library/net/ftp/putbinaryfile_spec.rb +8 -0
  197. data/spec/framework_spec/app/spec/library/net/ftp/puttextfile_spec.rb +8 -0
  198. data/spec/framework_spec/app/spec/library/net/ftp/pwd_spec.rb +53 -0
  199. data/spec/framework_spec/app/spec/library/net/ftp/quit_spec.rb +33 -0
  200. data/spec/framework_spec/app/spec/library/net/ftp/rename_spec.rb +94 -0
  201. data/spec/framework_spec/app/spec/library/net/ftp/resume_spec.rb +23 -0
  202. data/spec/framework_spec/app/spec/library/net/ftp/retrbinary_spec.rb +31 -0
  203. data/spec/framework_spec/app/spec/library/net/ftp/retrlines_spec.rb +35 -0
  204. data/spec/framework_spec/app/spec/library/net/ftp/return_code_spec.rb +24 -0
  205. data/spec/framework_spec/app/spec/library/net/ftp/rmdir_spec.rb +58 -0
  206. data/spec/framework_spec/app/spec/library/net/ftp/sendcmd_spec.rb +54 -0
  207. data/spec/framework_spec/app/spec/library/net/ftp/set_socket_spec.rb +8 -0
  208. data/spec/framework_spec/app/spec/library/net/ftp/shared/getbinaryfile.rb +180 -0
  209. data/spec/framework_spec/app/spec/library/net/ftp/shared/gettextfile.rb +130 -0
  210. data/spec/framework_spec/app/spec/library/net/ftp/shared/last_response_code.rb +25 -0
  211. data/spec/framework_spec/app/spec/library/net/ftp/shared/list.rb +134 -0
  212. data/spec/framework_spec/app/spec/library/net/ftp/shared/putbinaryfile.rb +233 -0
  213. data/spec/framework_spec/app/spec/library/net/ftp/shared/puttextfile.rb +150 -0
  214. data/spec/framework_spec/app/spec/library/net/ftp/shared/pwd.rb +3 -0
  215. data/spec/framework_spec/app/spec/library/net/ftp/site_spec.rb +53 -0
  216. data/spec/framework_spec/app/spec/library/net/ftp/size_spec.rb +48 -0
  217. data/spec/framework_spec/app/spec/library/net/ftp/status_spec.rb +63 -0
  218. data/spec/framework_spec/app/spec/library/net/ftp/storbinary_spec.rb +49 -0
  219. data/spec/framework_spec/app/spec/library/net/ftp/storlines_spec.rb +44 -0
  220. data/spec/framework_spec/app/spec/library/net/ftp/system_spec.rb +48 -0
  221. data/spec/framework_spec/app/spec/library/net/ftp/voidcmd_spec.rb +54 -0
  222. data/spec/framework_spec/app/spec/library/net/ftp/welcome_spec.rb +25 -0
  223. data/spec/framework_spec/app/spec/library/net/http/HTTPBadResponse_spec.rb +8 -0
  224. data/spec/framework_spec/app/spec/library/net/http/HTTPError_spec.rb +12 -0
  225. data/spec/framework_spec/app/spec/library/net/http/HTTPFatalError_spec.rb +12 -0
  226. data/spec/framework_spec/app/spec/library/net/http/HTTPHeaderSyntaxError_spec.rb +8 -0
  227. data/spec/framework_spec/app/spec/library/net/http/HTTPRetriableError_spec.rb +12 -0
  228. data/spec/framework_spec/app/spec/library/net/http/HTTPServerException_spec.rb +12 -0
  229. data/spec/framework_spec/app/spec/library/net/http/http/Proxy_spec.rb +35 -0
  230. data/spec/framework_spec/app/spec/library/net/http/http/active_spec.rb +8 -0
  231. data/spec/framework_spec/app/spec/library/net/http/http/address_spec.rb +9 -0
  232. data/spec/framework_spec/app/spec/library/net/http/http/close_on_empty_response_spec.rb +10 -0
  233. data/spec/framework_spec/app/spec/library/net/http/http/copy_spec.rb +23 -0
  234. data/spec/framework_spec/app/spec/library/net/http/http/default_port_spec.rb +8 -0
  235. data/spec/framework_spec/app/spec/library/net/http/http/delete_spec.rb +23 -0
  236. data/spec/framework_spec/app/spec/library/net/http/http/finish_spec.rb +31 -0
  237. data/spec/framework_spec/app/spec/library/net/http/http/fixtures/http_server.rb +97 -0
  238. data/spec/framework_spec/app/spec/library/net/http/http/get2_spec.rb +8 -0
  239. data/spec/framework_spec/app/spec/library/net/http/http/get_print_spec.rb +29 -0
  240. data/spec/framework_spec/app/spec/library/net/http/http/get_response_spec.rb +29 -0
  241. data/spec/framework_spec/app/spec/library/net/http/http/get_spec.rb +52 -0
  242. data/spec/framework_spec/app/spec/library/net/http/http/head2_spec.rb +9 -0
  243. data/spec/framework_spec/app/spec/library/net/http/http/head_spec.rb +27 -0
  244. data/spec/framework_spec/app/spec/library/net/http/http/http_default_port_spec.rb +8 -0
  245. data/spec/framework_spec/app/spec/library/net/http/http/https_default_port_spec.rb +8 -0
  246. data/spec/framework_spec/app/spec/library/net/http/http/initialize_spec.rb +46 -0
  247. data/spec/framework_spec/app/spec/library/net/http/http/inspect_spec.rb +26 -0
  248. data/spec/framework_spec/app/spec/library/net/http/http/is_version_1_1_spec.rb +7 -0
  249. data/spec/framework_spec/app/spec/library/net/http/http/is_version_1_2_spec.rb +7 -0
  250. data/spec/framework_spec/app/spec/library/net/http/http/lock_spec.rb +23 -0
  251. data/spec/framework_spec/app/spec/library/net/http/http/mkcol_spec.rb +23 -0
  252. data/spec/framework_spec/app/spec/library/net/http/http/move_spec.rb +27 -0
  253. data/spec/framework_spec/app/spec/library/net/http/http/new_spec.rb +86 -0
  254. data/spec/framework_spec/app/spec/library/net/http/http/newobj_spec.rb +48 -0
  255. data/spec/framework_spec/app/spec/library/net/http/http/open_timeout_spec.rb +24 -0
  256. data/spec/framework_spec/app/spec/library/net/http/http/options_spec.rb +27 -0
  257. data/spec/framework_spec/app/spec/library/net/http/http/port_spec.rb +9 -0
  258. data/spec/framework_spec/app/spec/library/net/http/http/post2_spec.rb +8 -0
  259. data/spec/framework_spec/app/spec/library/net/http/http/post_form_spec.rb +21 -0
  260. data/spec/framework_spec/app/spec/library/net/http/http/post_spec.rb +40 -0
  261. data/spec/framework_spec/app/spec/library/net/http/http/propfind_spec.rb +26 -0
  262. data/spec/framework_spec/app/spec/library/net/http/http/proppatch_spec.rb +26 -0
  263. data/spec/framework_spec/app/spec/library/net/http/http/proxy_address_spec.rb +31 -0
  264. data/spec/framework_spec/app/spec/library/net/http/http/proxy_class_spec.rb +9 -0
  265. data/spec/framework_spec/app/spec/library/net/http/http/proxy_pass_spec.rb +39 -0
  266. data/spec/framework_spec/app/spec/library/net/http/http/proxy_port_spec.rb +39 -0
  267. data/spec/framework_spec/app/spec/library/net/http/http/proxy_user_spec.rb +39 -0
  268. data/spec/framework_spec/app/spec/library/net/http/http/put2_spec.rb +8 -0
  269. data/spec/framework_spec/app/spec/library/net/http/http/put_spec.rb +26 -0
  270. data/spec/framework_spec/app/spec/library/net/http/http/read_timeout_spec.rb +24 -0
  271. data/spec/framework_spec/app/spec/library/net/http/http/request_get_spec.rb +8 -0
  272. data/spec/framework_spec/app/spec/library/net/http/http/request_head_spec.rb +8 -0
  273. data/spec/framework_spec/app/spec/library/net/http/http/request_post_spec.rb +8 -0
  274. data/spec/framework_spec/app/spec/library/net/http/http/request_put_spec.rb +8 -0
  275. data/spec/framework_spec/app/spec/library/net/http/http/request_spec.rb +111 -0
  276. data/spec/framework_spec/app/spec/library/net/http/http/request_types_spec.rb +254 -0
  277. data/spec/framework_spec/app/spec/library/net/http/http/send_request_spec.rb +120 -0
  278. data/spec/framework_spec/app/spec/library/net/http/http/set_debug_output_spec.rb +35 -0
  279. data/spec/framework_spec/app/spec/library/net/http/http/shared/request_get.rb +45 -0
  280. data/spec/framework_spec/app/spec/library/net/http/http/shared/request_head.rb +45 -0
  281. data/spec/framework_spec/app/spec/library/net/http/http/shared/request_post.rb +45 -0
  282. data/spec/framework_spec/app/spec/library/net/http/http/shared/request_put.rb +45 -0
  283. data/spec/framework_spec/app/spec/library/net/http/http/shared/started.rb +28 -0
  284. data/spec/framework_spec/app/spec/library/net/http/http/shared/version_1_1.rb +19 -0
  285. data/spec/framework_spec/app/spec/library/net/http/http/shared/version_1_2.rb +6 -0
  286. data/spec/framework_spec/app/spec/library/net/http/http/socket_type_spec.rb +8 -0
  287. data/spec/framework_spec/app/spec/library/net/http/http/start_spec.rb +103 -0
  288. data/spec/framework_spec/app/spec/library/net/http/http/started_spec.rb +8 -0
  289. data/spec/framework_spec/app/spec/library/net/http/http/trace_spec.rb +26 -0
  290. data/spec/framework_spec/app/spec/library/net/http/http/unlock_spec.rb +26 -0
  291. data/spec/framework_spec/app/spec/library/net/http/http/use_ssl_spec.rb +9 -0
  292. data/spec/framework_spec/app/spec/library/net/http/http/version_1_1_spec.rb +22 -0
  293. data/spec/framework_spec/app/spec/library/net/http/http/version_1_2_spec.rb +20 -0
  294. data/spec/framework_spec/app/spec/library/net/http/httpexceptions/fixtures/classes.rb +5 -0
  295. data/spec/framework_spec/app/spec/library/net/http/httpexceptions/initialize_spec.rb +17 -0
  296. data/spec/framework_spec/app/spec/library/net/http/httpexceptions/response_spec.rb +10 -0
  297. data/spec/framework_spec/app/spec/library/net/http/httpgenericrequest/body_exist_spec.rb +27 -0
  298. data/spec/framework_spec/app/spec/library/net/http/httpgenericrequest/body_spec.rb +30 -0
  299. data/spec/framework_spec/app/spec/library/net/http/httpgenericrequest/body_stream_spec.rb +32 -0
  300. data/spec/framework_spec/app/spec/library/net/http/httpgenericrequest/exec_spec.rb +122 -0
  301. data/spec/framework_spec/app/spec/library/net/http/httpgenericrequest/inspect_spec.rb +25 -0
  302. data/spec/framework_spec/app/spec/library/net/http/httpgenericrequest/method_spec.rb +15 -0
  303. data/spec/framework_spec/app/spec/library/net/http/httpgenericrequest/path_spec.rb +12 -0
  304. data/spec/framework_spec/app/spec/library/net/http/httpgenericrequest/request_body_permitted_spec.rb +12 -0
  305. data/spec/framework_spec/app/spec/library/net/http/httpgenericrequest/response_body_permitted_spec.rb +12 -0
  306. data/spec/framework_spec/app/spec/library/net/http/httpgenericrequest/set_body_internal_spec.rb +21 -0
  307. data/spec/framework_spec/app/spec/library/net/http/httpheader/add_field_spec.rb +31 -0
  308. data/spec/framework_spec/app/spec/library/net/http/httpheader/basic_auth_spec.rb +14 -0
  309. data/spec/framework_spec/app/spec/library/net/http/httpheader/canonical_each_spec.rb +8 -0
  310. data/spec/framework_spec/app/spec/library/net/http/httpheader/chunked_spec.rb +22 -0
  311. data/spec/framework_spec/app/spec/library/net/http/httpheader/content_length_spec.rb +54 -0
  312. data/spec/framework_spec/app/spec/library/net/http/httpheader/content_range_spec.rb +34 -0
  313. data/spec/framework_spec/app/spec/library/net/http/httpheader/content_type_spec.rb +26 -0
  314. data/spec/framework_spec/app/spec/library/net/http/httpheader/delete_spec.rb +30 -0
  315. data/spec/framework_spec/app/spec/library/net/http/httpheader/each_capitalized_name_spec.rb +45 -0
  316. data/spec/framework_spec/app/spec/library/net/http/httpheader/each_capitalized_spec.rb +9 -0
  317. data/spec/framework_spec/app/spec/library/net/http/httpheader/each_header_spec.rb +8 -0
  318. data/spec/framework_spec/app/spec/library/net/http/httpheader/each_key_spec.rb +8 -0
  319. data/spec/framework_spec/app/spec/library/net/http/httpheader/each_name_spec.rb +8 -0
  320. data/spec/framework_spec/app/spec/library/net/http/httpheader/each_spec.rb +8 -0
  321. data/spec/framework_spec/app/spec/library/net/http/httpheader/each_value_spec.rb +46 -0
  322. data/spec/framework_spec/app/spec/library/net/http/httpheader/element_reference_spec.rb +39 -0
  323. data/spec/framework_spec/app/spec/library/net/http/httpheader/element_set_spec.rb +41 -0
  324. data/spec/framework_spec/app/spec/library/net/http/httpheader/fetch_spec.rb +69 -0
  325. data/spec/framework_spec/app/spec/library/net/http/httpheader/fixtures/classes.rb +11 -0
  326. data/spec/framework_spec/app/spec/library/net/http/httpheader/form_data_spec.rb +8 -0
  327. data/spec/framework_spec/app/spec/library/net/http/httpheader/get_fields_spec.rb +39 -0
  328. data/spec/framework_spec/app/spec/library/net/http/httpheader/initialize_http_header_spec.rb +29 -0
  329. data/spec/framework_spec/app/spec/library/net/http/httpheader/key_spec.rb +21 -0
  330. data/spec/framework_spec/app/spec/library/net/http/httpheader/length_spec.rb +8 -0
  331. data/spec/framework_spec/app/spec/library/net/http/httpheader/main_type_spec.rb +24 -0
  332. data/spec/framework_spec/app/spec/library/net/http/httpheader/proxy_basic_auth_spec.rb +14 -0
  333. data/spec/framework_spec/app/spec/library/net/http/httpheader/range_length_spec.rb +32 -0
  334. data/spec/framework_spec/app/spec/library/net/http/httpheader/range_spec.rb +48 -0
  335. data/spec/framework_spec/app/spec/library/net/http/httpheader/set_content_type_spec.rb +8 -0
  336. data/spec/framework_spec/app/spec/library/net/http/httpheader/set_form_data_spec.rb +8 -0
  337. data/spec/framework_spec/app/spec/library/net/http/httpheader/set_range_spec.rb +8 -0
  338. data/spec/framework_spec/app/spec/library/net/http/httpheader/shared/each_capitalized.rb +42 -0
  339. data/spec/framework_spec/app/spec/library/net/http/httpheader/shared/each_header.rb +42 -0
  340. data/spec/framework_spec/app/spec/library/net/http/httpheader/shared/each_name.rb +39 -0
  341. data/spec/framework_spec/app/spec/library/net/http/httpheader/shared/set_content_type.rb +18 -0
  342. data/spec/framework_spec/app/spec/library/net/http/httpheader/shared/set_form_data.rb +27 -0
  343. data/spec/framework_spec/app/spec/library/net/http/httpheader/shared/set_range.rb +89 -0
  344. data/spec/framework_spec/app/spec/library/net/http/httpheader/shared/size.rb +18 -0
  345. data/spec/framework_spec/app/spec/library/net/http/httpheader/size_spec.rb +8 -0
  346. data/spec/framework_spec/app/spec/library/net/http/httpheader/sub_type_spec.rb +32 -0
  347. data/spec/framework_spec/app/spec/library/net/http/httpheader/to_hash_spec.rb +25 -0
  348. data/spec/framework_spec/app/spec/library/net/http/httpheader/type_params_spec.rb +24 -0
  349. data/spec/framework_spec/app/spec/library/net/http/httprequest/initialize_spec.rb +45 -0
  350. data/spec/framework_spec/app/spec/library/net/http/httpresponse/body_permitted_spec.rb +13 -0
  351. data/spec/framework_spec/app/spec/library/net/http/httpresponse/body_spec.rb +7 -0
  352. data/spec/framework_spec/app/spec/library/net/http/httpresponse/code_spec.rb +24 -0
  353. data/spec/framework_spec/app/spec/library/net/http/httpresponse/code_type_spec.rb +24 -0
  354. data/spec/framework_spec/app/spec/library/net/http/httpresponse/entity_spec.rb +7 -0
  355. data/spec/framework_spec/app/spec/library/net/http/httpresponse/error_spec.rb +24 -0
  356. data/spec/framework_spec/app/spec/library/net/http/httpresponse/error_type_spec.rb +24 -0
  357. data/spec/framework_spec/app/spec/library/net/http/httpresponse/exception_type_spec.rb +13 -0
  358. data/spec/framework_spec/app/spec/library/net/http/httpresponse/header_spec.rb +9 -0
  359. data/spec/framework_spec/app/spec/library/net/http/httpresponse/http_version_spec.rb +12 -0
  360. data/spec/framework_spec/app/spec/library/net/http/httpresponse/initialize_spec.rb +11 -0
  361. data/spec/framework_spec/app/spec/library/net/http/httpresponse/inspect_spec.rb +15 -0
  362. data/spec/framework_spec/app/spec/library/net/http/httpresponse/message_spec.rb +9 -0
  363. data/spec/framework_spec/app/spec/library/net/http/httpresponse/msg_spec.rb +9 -0
  364. data/spec/framework_spec/app/spec/library/net/http/httpresponse/read_body_spec.rb +86 -0
  365. data/spec/framework_spec/app/spec/library/net/http/httpresponse/read_header_spec.rb +9 -0
  366. data/spec/framework_spec/app/spec/library/net/http/httpresponse/read_new_spec.rb +22 -0
  367. data/spec/framework_spec/app/spec/library/net/http/httpresponse/reading_body_spec.rb +58 -0
  368. data/spec/framework_spec/app/spec/library/net/http/httpresponse/response_spec.rb +9 -0
  369. data/spec/framework_spec/app/spec/library/net/http/httpresponse/shared/body.rb +18 -0
  370. data/spec/framework_spec/app/spec/library/net/http/httpresponse/to_ary_spec.rb +26 -0
  371. data/spec/framework_spec/app/spec/library/net/http/httpresponse/value_spec.rb +24 -0
  372. data/spec/framework_spec/app/spec/library/rexml/attribute/clone_spec.rb +11 -0
  373. data/spec/framework_spec/app/spec/library/rexml/attribute/element_spec.rb +23 -0
  374. data/spec/framework_spec/app/spec/library/rexml/attribute/equal_value_spec.rb +18 -0
  375. data/spec/framework_spec/app/spec/library/rexml/attribute/hash_spec.rb +13 -0
  376. data/spec/framework_spec/app/spec/library/rexml/attribute/initialize_spec.rb +29 -0
  377. data/spec/framework_spec/app/spec/library/rexml/attribute/inspect_spec.rb +20 -0
  378. data/spec/framework_spec/app/spec/library/rexml/attribute/namespace_spec.rb +24 -0
  379. data/spec/framework_spec/app/spec/library/rexml/attribute/node_type_spec.rb +10 -0
  380. data/spec/framework_spec/app/spec/library/rexml/attribute/prefix_spec.rb +18 -0
  381. data/spec/framework_spec/app/spec/library/rexml/attribute/remove_spec.rb +20 -0
  382. data/spec/framework_spec/app/spec/library/rexml/attribute/to_s_spec.rb +14 -0
  383. data/spec/framework_spec/app/spec/library/rexml/attribute/to_string_spec.rb +15 -0
  384. data/spec/framework_spec/app/spec/library/rexml/attribute/value_spec.rb +15 -0
  385. data/spec/framework_spec/app/spec/library/rexml/attribute/write_spec.rb +23 -0
  386. data/spec/framework_spec/app/spec/library/rexml/attribute/xpath_spec.rb +20 -0
  387. data/spec/framework_spec/app/spec/library/rexml/attributes/add_spec.rb +7 -0
  388. data/spec/framework_spec/app/spec/library/rexml/attributes/append_spec.rb +7 -0
  389. data/spec/framework_spec/app/spec/library/rexml/attributes/delete_all_spec.rb +31 -0
  390. data/spec/framework_spec/app/spec/library/rexml/attributes/delete_spec.rb +27 -0
  391. data/spec/framework_spec/app/spec/library/rexml/attributes/each_attribute_spec.rb +24 -0
  392. data/spec/framework_spec/app/spec/library/rexml/attributes/each_spec.rb +24 -0
  393. data/spec/framework_spec/app/spec/library/rexml/attributes/element_reference_spec.rb +19 -0
  394. data/spec/framework_spec/app/spec/library/rexml/attributes/element_set_spec.rb +26 -0
  395. data/spec/framework_spec/app/spec/library/rexml/attributes/get_attribute_ns_spec.rb +14 -0
  396. data/spec/framework_spec/app/spec/library/rexml/attributes/get_attribute_spec.rb +29 -0
  397. data/spec/framework_spec/app/spec/library/rexml/attributes/initialize_spec.rb +19 -0
  398. data/spec/framework_spec/app/spec/library/rexml/attributes/length_spec.rb +7 -0
  399. data/spec/framework_spec/app/spec/library/rexml/attributes/namespaces_spec.rb +6 -0
  400. data/spec/framework_spec/app/spec/library/rexml/attributes/prefixes_spec.rb +24 -0
  401. data/spec/framework_spec/app/spec/library/rexml/attributes/shared/add.rb +17 -0
  402. data/spec/framework_spec/app/spec/library/rexml/attributes/shared/length.rb +13 -0
  403. data/spec/framework_spec/app/spec/library/rexml/attributes/size_spec.rb +7 -0
  404. data/spec/framework_spec/app/spec/library/rexml/attributes/to_a_spec.rb +20 -0
  405. data/spec/framework_spec/app/spec/library/rexml/cdata/clone_spec.rb +10 -0
  406. data/spec/framework_spec/app/spec/library/rexml/cdata/initialize_spec.rb +25 -0
  407. data/spec/framework_spec/app/spec/library/rexml/cdata/shared/to_s.rb +11 -0
  408. data/spec/framework_spec/app/spec/library/rexml/cdata/to_s_spec.rb +7 -0
  409. data/spec/framework_spec/app/spec/library/rexml/cdata/value_spec.rb +7 -0
  410. data/spec/framework_spec/app/spec/library/rexml/document/add_element_spec.rb +31 -0
  411. data/spec/framework_spec/app/spec/library/rexml/document/add_spec.rb +61 -0
  412. data/spec/framework_spec/app/spec/library/rexml/document/clone_spec.rb +20 -0
  413. data/spec/framework_spec/app/spec/library/rexml/document/doctype_spec.rb +15 -0
  414. data/spec/framework_spec/app/spec/library/rexml/document/encoding_spec.rb +22 -0
  415. data/spec/framework_spec/app/spec/library/rexml/document/expanded_name_spec.rb +16 -0
  416. data/spec/framework_spec/app/spec/library/rexml/document/new_spec.rb +38 -0
  417. data/spec/framework_spec/app/spec/library/rexml/document/node_type_spec.rb +8 -0
  418. data/spec/framework_spec/app/spec/library/rexml/document/root_spec.rb +12 -0
  419. data/spec/framework_spec/app/spec/library/rexml/document/stand_alone_spec.rb +19 -0
  420. data/spec/framework_spec/app/spec/library/rexml/document/version_spec.rb +14 -0
  421. data/spec/framework_spec/app/spec/library/rexml/document/write_spec.rb +39 -0
  422. data/spec/framework_spec/app/spec/library/rexml/document/xml_decl_spec.rb +15 -0
  423. data/spec/framework_spec/app/spec/library/rexml/element/add_attribute_spec.rb +41 -0
  424. data/spec/framework_spec/app/spec/library/rexml/element/add_attributes_spec.rb +22 -0
  425. data/spec/framework_spec/app/spec/library/rexml/element/add_element_spec.rb +39 -0
  426. data/spec/framework_spec/app/spec/library/rexml/element/add_namespace_spec.rb +24 -0
  427. data/spec/framework_spec/app/spec/library/rexml/element/add_text_spec.rb +24 -0
  428. data/spec/framework_spec/app/spec/library/rexml/element/attribute_spec.rb +17 -0
  429. data/spec/framework_spec/app/spec/library/rexml/element/attributes_spec.rb +19 -0
  430. data/spec/framework_spec/app/spec/library/rexml/element/cdatas_spec.rb +24 -0
  431. data/spec/framework_spec/app/spec/library/rexml/element/clone_spec.rb +29 -0
  432. data/spec/framework_spec/app/spec/library/rexml/element/comments_spec.rb +21 -0
  433. data/spec/framework_spec/app/spec/library/rexml/element/delete_attribute_spec.rb +39 -0
  434. data/spec/framework_spec/app/spec/library/rexml/element/delete_element_spec.rb +51 -0
  435. data/spec/framework_spec/app/spec/library/rexml/element/delete_namespace_spec.rb +25 -0
  436. data/spec/framework_spec/app/spec/library/rexml/element/document_spec.rb +18 -0
  437. data/spec/framework_spec/app/spec/library/rexml/element/each_element_with_attribute_spec.rb +35 -0
  438. data/spec/framework_spec/app/spec/library/rexml/element/each_element_with_text_spec.rb +31 -0
  439. data/spec/framework_spec/app/spec/library/rexml/element/get_text_spec.rb +18 -0
  440. data/spec/framework_spec/app/spec/library/rexml/element/has_attributes_spec.rb +17 -0
  441. data/spec/framework_spec/app/spec/library/rexml/element/has_elements_spec.rb +18 -0
  442. data/spec/framework_spec/app/spec/library/rexml/element/has_text_spec.rb +16 -0
  443. data/spec/framework_spec/app/spec/library/rexml/element/inspect_spec.rb +27 -0
  444. data/spec/framework_spec/app/spec/library/rexml/element/instructions_spec.rb +21 -0
  445. data/spec/framework_spec/app/spec/library/rexml/element/namespace_spec.rb +27 -0
  446. data/spec/framework_spec/app/spec/library/rexml/element/namespaces_spec.rb +32 -0
  447. data/spec/framework_spec/app/spec/library/rexml/element/new_spec.rb +35 -0
  448. data/spec/framework_spec/app/spec/library/rexml/element/next_element_spec.rb +19 -0
  449. data/spec/framework_spec/app/spec/library/rexml/element/node_type_spec.rb +8 -0
  450. data/spec/framework_spec/app/spec/library/rexml/element/prefixes_spec.rb +23 -0
  451. data/spec/framework_spec/app/spec/library/rexml/element/previous_element_spec.rb +20 -0
  452. data/spec/framework_spec/app/spec/library/rexml/element/raw_spec.rb +24 -0
  453. data/spec/framework_spec/app/spec/library/rexml/element/root_spec.rb +28 -0
  454. data/spec/framework_spec/app/spec/library/rexml/element/text_spec.rb +46 -0
  455. data/spec/framework_spec/app/spec/library/rexml/element/texts_spec.rb +16 -0
  456. data/spec/framework_spec/app/spec/library/rexml/element/whitespace_spec.rb +23 -0
  457. data/spec/framework_spec/app/spec/library/rexml/node/each_recursive_spec.rb +21 -0
  458. data/spec/framework_spec/app/spec/library/rexml/node/find_first_recursive_spec.rb +25 -0
  459. data/spec/framework_spec/app/spec/library/rexml/node/index_in_parent_spec.rb +15 -0
  460. data/spec/framework_spec/app/spec/library/rexml/node/next_sibling_node_spec.rb +21 -0
  461. data/spec/framework_spec/app/spec/library/rexml/node/parent_spec.rb +21 -0
  462. data/spec/framework_spec/app/spec/library/rexml/node/previous_sibling_node_spec.rb +21 -0
  463. data/spec/framework_spec/app/spec/library/rexml/shared/each_element.rb +36 -0
  464. data/spec/framework_spec/app/spec/library/rexml/shared/elements_to_a.rb +36 -0
  465. data/spec/framework_spec/app/spec/library/rexml/text/append_spec.rb +10 -0
  466. data/spec/framework_spec/app/spec/library/rexml/text/clone_spec.rb +10 -0
  467. data/spec/framework_spec/app/spec/library/rexml/text/comparison_spec.rb +25 -0
  468. data/spec/framework_spec/app/spec/library/rexml/text/empty_spec.rb +12 -0
  469. data/spec/framework_spec/app/spec/library/rexml/text/indent_text_spec.rb +24 -0
  470. data/spec/framework_spec/app/spec/library/rexml/text/inspect_spec.rb +8 -0
  471. data/spec/framework_spec/app/spec/library/rexml/text/new_spec.rb +49 -0
  472. data/spec/framework_spec/app/spec/library/rexml/text/node_type_spec.rb +8 -0
  473. data/spec/framework_spec/app/spec/library/rexml/text/normalize_spec.rb +8 -0
  474. data/spec/framework_spec/app/spec/library/rexml/text/read_with_substitution_spec.rb +13 -0
  475. data/spec/framework_spec/app/spec/library/rexml/text/to_s_spec.rb +18 -0
  476. data/spec/framework_spec/app/spec/library/rexml/text/unnormalize_spec.rb +8 -0
  477. data/spec/framework_spec/app/spec/library/rexml/text/value_spec.rb +37 -0
  478. data/spec/framework_spec/app/spec/library/rexml/text/wrap_spec.rb +21 -0
  479. data/spec/framework_spec/app/spec/library/rexml/text/write_with_substitution_spec.rb +33 -0
  480. data/spec/framework_spec/app/spec/library/set/exclusion_spec.rb +2 -2
  481. data/spec/framework_spec/app/spec/library/set/merge_spec.rb +2 -2
  482. data/spec/framework_spec/app/spec/library/set/shared/difference.rb +2 -2
  483. data/spec/framework_spec/app/spec/library/set/shared/intersection.rb +2 -2
  484. data/spec/framework_spec/app/spec/library/set/shared/union.rb +2 -2
  485. data/spec/framework_spec/app/spec/library/set/sortedset/exclusion_spec.rb +2 -2
  486. data/spec/framework_spec/app/spec/library/set/sortedset/merge_spec.rb +2 -2
  487. data/spec/framework_spec/app/spec/library/set/sortedset/shared/difference.rb +2 -2
  488. data/spec/framework_spec/app/spec/library/set/sortedset/shared/intersection.rb +2 -2
  489. data/spec/framework_spec/app/spec/library/set/sortedset/shared/union.rb +2 -2
  490. data/spec/framework_spec/app/spec/library/timeout/timeout_spec.rb +37 -0
  491. data/spec/framework_spec/app/spec/library/uri/eql_spec.rb +12 -0
  492. data/spec/framework_spec/app/spec/library/uri/equality_spec.rb +48 -0
  493. data/spec/framework_spec/app/spec/library/uri/escape/decode_spec.rb +6 -0
  494. data/spec/framework_spec/app/spec/library/uri/escape/encode_spec.rb +6 -0
  495. data/spec/framework_spec/app/spec/library/uri/escape/escape_spec.rb +6 -0
  496. data/spec/framework_spec/app/spec/library/uri/escape/unescape_spec.rb +6 -0
  497. data/spec/framework_spec/app/spec/library/uri/extract_spec.rb +86 -0
  498. data/spec/framework_spec/app/spec/library/uri/fixtures/classes.rb +11 -0
  499. data/spec/framework_spec/app/spec/library/uri/fixtures/normalization.rb +54 -0
  500. data/spec/framework_spec/app/spec/library/uri/ftp/build_spec.rb +6 -0
  501. data/spec/framework_spec/app/spec/library/uri/ftp/merge_spec.rb +6 -0
  502. data/spec/framework_spec/app/spec/library/uri/ftp/new2_spec.rb +6 -0
  503. data/spec/framework_spec/app/spec/library/uri/ftp/path_spec.rb +56 -0
  504. data/spec/framework_spec/app/spec/library/uri/ftp/set_typecode_spec.rb +6 -0
  505. data/spec/framework_spec/app/spec/library/uri/ftp/to_s_spec.rb +25 -0
  506. data/spec/framework_spec/app/spec/library/uri/ftp/typecode_spec.rb +10 -0
  507. data/spec/framework_spec/app/spec/library/uri/generic/absolute_spec.rb +10 -0
  508. data/spec/framework_spec/app/spec/library/uri/generic/build2_spec.rb +6 -0
  509. data/spec/framework_spec/app/spec/library/uri/generic/build_spec.rb +6 -0
  510. data/spec/framework_spec/app/spec/library/uri/generic/coerce_spec.rb +6 -0
  511. data/spec/framework_spec/app/spec/library/uri/generic/component_ary_spec.rb +6 -0
  512. data/spec/framework_spec/app/spec/library/uri/generic/component_spec.rb +10 -0
  513. data/spec/framework_spec/app/spec/library/uri/generic/default_port_spec.rb +10 -0
  514. data/spec/framework_spec/app/spec/library/uri/generic/eql_spec.rb +6 -0
  515. data/spec/framework_spec/app/spec/library/uri/generic/equal_value_spec.rb +6 -0
  516. data/spec/framework_spec/app/spec/library/uri/generic/fragment_spec.rb +10 -0
  517. data/spec/framework_spec/app/spec/library/uri/generic/hash_spec.rb +6 -0
  518. data/spec/framework_spec/app/spec/library/uri/generic/hierarchical_spec.rb +6 -0
  519. data/spec/framework_spec/app/spec/library/uri/generic/host_spec.rb +10 -0
  520. data/spec/framework_spec/app/spec/library/uri/generic/inspect_spec.rb +6 -0
  521. data/spec/framework_spec/app/spec/library/uri/generic/merge_spec.rb +10 -0
  522. data/spec/framework_spec/app/spec/library/uri/generic/minus_spec.rb +6 -0
  523. data/spec/framework_spec/app/spec/library/uri/generic/normalize_spec.rb +10 -0
  524. data/spec/framework_spec/app/spec/library/uri/generic/opaque_spec.rb +10 -0
  525. data/spec/framework_spec/app/spec/library/uri/generic/password_spec.rb +10 -0
  526. data/spec/framework_spec/app/spec/library/uri/generic/path_spec.rb +10 -0
  527. data/spec/framework_spec/app/spec/library/uri/generic/plus_spec.rb +6 -0
  528. data/spec/framework_spec/app/spec/library/uri/generic/port_spec.rb +10 -0
  529. data/spec/framework_spec/app/spec/library/uri/generic/query_spec.rb +10 -0
  530. data/spec/framework_spec/app/spec/library/uri/generic/registry_spec.rb +10 -0
  531. data/spec/framework_spec/app/spec/library/uri/generic/relative_spec.rb +6 -0
  532. data/spec/framework_spec/app/spec/library/uri/generic/route_from_spec.rb +6 -0
  533. data/spec/framework_spec/app/spec/library/uri/generic/route_to_spec.rb +6 -0
  534. data/spec/framework_spec/app/spec/library/uri/generic/scheme_spec.rb +10 -0
  535. data/spec/framework_spec/app/spec/library/uri/generic/select_spec.rb +6 -0
  536. data/spec/framework_spec/app/spec/library/uri/generic/set_fragment_spec.rb +6 -0
  537. data/spec/framework_spec/app/spec/library/uri/generic/set_host_spec.rb +6 -0
  538. data/spec/framework_spec/app/spec/library/uri/generic/set_opaque_spec.rb +6 -0
  539. data/spec/framework_spec/app/spec/library/uri/generic/set_password_spec.rb +6 -0
  540. data/spec/framework_spec/app/spec/library/uri/generic/set_path_spec.rb +6 -0
  541. data/spec/framework_spec/app/spec/library/uri/generic/set_port_spec.rb +6 -0
  542. data/spec/framework_spec/app/spec/library/uri/generic/set_query_spec.rb +6 -0
  543. data/spec/framework_spec/app/spec/library/uri/generic/set_registry_spec.rb +6 -0
  544. data/spec/framework_spec/app/spec/library/uri/generic/set_scheme_spec.rb +6 -0
  545. data/spec/framework_spec/app/spec/library/uri/generic/set_user_spec.rb +6 -0
  546. data/spec/framework_spec/app/spec/library/uri/generic/set_userinfo_spec.rb +6 -0
  547. data/spec/framework_spec/app/spec/library/uri/generic/to_s_spec.rb +6 -0
  548. data/spec/framework_spec/app/spec/library/uri/generic/use_registry_spec.rb +6 -0
  549. data/spec/framework_spec/app/spec/library/uri/generic/user_spec.rb +10 -0
  550. data/spec/framework_spec/app/spec/library/uri/generic/userinfo_spec.rb +10 -0
  551. data/spec/framework_spec/app/spec/library/uri/http/build_spec.rb +6 -0
  552. data/spec/framework_spec/app/spec/library/uri/http/request_uri_spec.rb +16 -0
  553. data/spec/framework_spec/app/spec/library/uri/join_spec.rb +61 -0
  554. data/spec/framework_spec/app/spec/library/uri/ldap/attributes_spec.rb +10 -0
  555. data/spec/framework_spec/app/spec/library/uri/ldap/build_spec.rb +6 -0
  556. data/spec/framework_spec/app/spec/library/uri/ldap/dn_spec.rb +10 -0
  557. data/spec/framework_spec/app/spec/library/uri/ldap/extensions_spec.rb +10 -0
  558. data/spec/framework_spec/app/spec/library/uri/ldap/filter_spec.rb +10 -0
  559. data/spec/framework_spec/app/spec/library/uri/ldap/hierarchical_spec.rb +6 -0
  560. data/spec/framework_spec/app/spec/library/uri/ldap/scope_spec.rb +10 -0
  561. data/spec/framework_spec/app/spec/library/uri/ldap/set_attributes_spec.rb +6 -0
  562. data/spec/framework_spec/app/spec/library/uri/ldap/set_dn_spec.rb +6 -0
  563. data/spec/framework_spec/app/spec/library/uri/ldap/set_extensions_spec.rb +6 -0
  564. data/spec/framework_spec/app/spec/library/uri/ldap/set_filter_spec.rb +6 -0
  565. data/spec/framework_spec/app/spec/library/uri/ldap/set_scope_spec.rb +6 -0
  566. data/spec/framework_spec/app/spec/library/uri/mailto/build_spec.rb +99 -0
  567. data/spec/framework_spec/app/spec/library/uri/mailto/headers_spec.rb +10 -0
  568. data/spec/framework_spec/app/spec/library/uri/mailto/set_headers_spec.rb +6 -0
  569. data/spec/framework_spec/app/spec/library/uri/mailto/set_to_spec.rb +6 -0
  570. data/spec/framework_spec/app/spec/library/uri/mailto/to_mailtext_spec.rb +6 -0
  571. data/spec/framework_spec/app/spec/library/uri/mailto/to_rfc822text_spec.rb +6 -0
  572. data/spec/framework_spec/app/spec/library/uri/mailto/to_s_spec.rb +6 -0
  573. data/spec/framework_spec/app/spec/library/uri/mailto/to_spec.rb +10 -0
  574. data/spec/framework_spec/app/spec/library/uri/merge_spec.rb +22 -0
  575. data/spec/framework_spec/app/spec/library/uri/normalize_spec.rb +35 -0
  576. data/spec/framework_spec/app/spec/library/uri/parse_spec.rb +249 -0
  577. data/spec/framework_spec/app/spec/library/uri/plus_spec.rb +489 -0
  578. data/spec/framework_spec/app/spec/library/uri/regexp_spec.rb +18 -0
  579. data/spec/framework_spec/app/spec/library/uri/route_from_spec.rb +25 -0
  580. data/spec/framework_spec/app/spec/library/uri/route_to_spec.rb +28 -0
  581. data/spec/framework_spec/app/spec/library/uri/select_spec.rb +31 -0
  582. data/spec/framework_spec/app/spec/library/uri/set_component_spec.rb +47 -0
  583. data/spec/framework_spec/app/spec/library/uri/shared/eql.rb +17 -0
  584. data/spec/framework_spec/app/spec/library/uri/split_spec.rb +6 -0
  585. data/spec/framework_spec/app/spec/library/uri/uri_spec.rb +31 -0
  586. data/spec/framework_spec/app/spec/library/uri/util/make_components_hash_spec.rb +6 -0
  587. data/spec/framework_spec/build.yml +2 -2
  588. data/spec/framework_spec/extensions/test-libs/test/unit.rb +328 -0
  589. data/spec/framework_spec/extensions/test-libs/test/unit/assertionfailederror.rb +25 -0
  590. data/spec/framework_spec/extensions/test-libs/test/unit/assertions.rb +1878 -0
  591. data/spec/framework_spec/extensions/test-libs/test/unit/attribute.rb +129 -0
  592. data/spec/framework_spec/extensions/test-libs/test/unit/autorunner.rb +422 -0
  593. data/spec/framework_spec/extensions/test-libs/test/unit/collector.rb +38 -0
  594. data/spec/framework_spec/extensions/test-libs/test/unit/collector/descendant.rb +23 -0
  595. data/spec/framework_spec/extensions/test-libs/test/unit/collector/dir.rb +108 -0
  596. data/spec/framework_spec/extensions/test-libs/test/unit/collector/load.rb +187 -0
  597. data/spec/framework_spec/extensions/test-libs/test/unit/collector/objectspace.rb +34 -0
  598. data/spec/framework_spec/extensions/test-libs/test/unit/collector/xml.rb +250 -0
  599. data/spec/framework_spec/extensions/test-libs/test/unit/color-scheme.rb +153 -0
  600. data/spec/framework_spec/extensions/test-libs/test/unit/color.rb +123 -0
  601. data/spec/framework_spec/extensions/test-libs/test/unit/data.rb +80 -0
  602. data/spec/framework_spec/extensions/test-libs/test/unit/diff.rb +740 -0
  603. data/spec/framework_spec/extensions/test-libs/test/unit/error.rb +151 -0
  604. data/spec/framework_spec/extensions/test-libs/test/unit/exceptionhandler.rb +39 -0
  605. data/spec/framework_spec/extensions/test-libs/test/unit/failure.rb +136 -0
  606. data/spec/framework_spec/extensions/test-libs/test/unit/fixture.rb +214 -0
  607. data/spec/framework_spec/extensions/test-libs/test/unit/notification.rb +133 -0
  608. data/spec/framework_spec/extensions/test-libs/test/unit/omission.rb +191 -0
  609. data/spec/framework_spec/extensions/test-libs/test/unit/pending.rb +150 -0
  610. data/spec/framework_spec/extensions/test-libs/test/unit/priority.rb +182 -0
  611. data/spec/framework_spec/extensions/test-libs/test/unit/runner/console.rb +59 -0
  612. data/spec/framework_spec/extensions/test-libs/test/unit/runner/emacs.rb +8 -0
  613. data/spec/framework_spec/extensions/test-libs/test/unit/runner/tap.rb +8 -0
  614. data/spec/framework_spec/extensions/test-libs/test/unit/runner/xml.rb +15 -0
  615. data/spec/framework_spec/extensions/test-libs/test/unit/testcase.rb +601 -0
  616. data/spec/framework_spec/extensions/test-libs/test/unit/testresult.rb +125 -0
  617. data/spec/framework_spec/extensions/test-libs/test/unit/testsuite.rb +134 -0
  618. data/spec/framework_spec/extensions/test-libs/test/unit/testsuitecreator.rb +79 -0
  619. data/spec/framework_spec/extensions/test-libs/test/unit/ui/console/outputlevel.rb +15 -0
  620. data/spec/framework_spec/extensions/test-libs/test/unit/ui/console/testrunner.rb +561 -0
  621. data/spec/framework_spec/extensions/test-libs/test/unit/ui/emacs/testrunner.rb +63 -0
  622. data/spec/framework_spec/extensions/test-libs/test/unit/ui/tap/testrunner.rb +82 -0
  623. data/spec/framework_spec/extensions/test-libs/test/unit/ui/testrunner.rb +53 -0
  624. data/spec/framework_spec/extensions/test-libs/test/unit/ui/testrunnermediator.rb +86 -0
  625. data/spec/framework_spec/extensions/test-libs/test/unit/ui/testrunnerutilities.rb +41 -0
  626. data/spec/framework_spec/extensions/test-libs/test/unit/ui/xml/testrunner.rb +224 -0
  627. data/spec/framework_spec/extensions/test-libs/test/unit/util/backtracefilter.rb +42 -0
  628. data/spec/framework_spec/extensions/test-libs/test/unit/util/method-owner-finder.rb +28 -0
  629. data/spec/framework_spec/extensions/test-libs/test/unit/util/observable.rb +90 -0
  630. data/spec/framework_spec/extensions/test-libs/test/unit/util/output.rb +31 -0
  631. data/spec/framework_spec/extensions/test-libs/test/unit/util/procwrapper.rb +48 -0
  632. data/spec/framework_spec/extensions/test-libs/test/unit/version.rb +5 -0
  633. data/spec/framework_spec/extensions/test-libs/webrick/accesslog.rb +10 -2
  634. data/spec/framework_spec/extensions/test-libs/webrick/cgi.rb +1 -1
  635. data/spec/framework_spec/extensions/test-libs/webrick/config.rb +1 -1
  636. data/spec/framework_spec/extensions/test-libs/webrick/httpauth/digestauth.rb +1 -1
  637. data/spec/framework_spec/extensions/test-libs/webrick/httpresponse.rb +1 -1
  638. data/spec/framework_spec/extensions/test-libs/webrick/https.rb +2 -2
  639. data/spec/framework_spec/extensions/test-libs/webrick/httpservlet/abstract.rb +1 -2
  640. data/spec/framework_spec/extensions/test-libs/webrick/httpservlet/cgihandler.rb +2 -2
  641. data/spec/framework_spec/extensions/test-libs/webrick/httpservlet/filehandler.rb +9 -5
  642. data/spec/framework_spec/extensions/test-libs/webrick/httpstatus.rb +32 -321
  643. data/spec/framework_spec/extensions/test-libs/webrick/httputils.rb +3 -3
  644. data/spec/framework_spec/extensions/test-libs/webrick/ssl.rb +3 -2
  645. data/spec/phone_spec/build.yml +1 -1
  646. data/version +1 -0
  647. metadata +521 -27
  648. data/lib/extensions/net-http/monitor.rb +0 -265
  649. data/lib/extensions/net-http/thread.rb +0 -367
  650. data/lib/extensions/net-http/timeout.rb +0 -114
  651. data/lib/extensions/net-http/uri.rb +0 -29
  652. data/lib/extensions/net-http/uri/common.rb +0 -727
  653. data/lib/extensions/net-http/uri/ftp.rb +0 -198
  654. data/lib/extensions/net-http/uri/generic.rb +0 -1128
  655. data/lib/extensions/net-http/uri/http.rb +0 -100
  656. data/lib/extensions/net-http/uri/https.rb +0 -20
  657. data/lib/extensions/net-http/uri/ldap.rb +0 -190
  658. data/lib/extensions/net-http/uri/ldaps.rb +0 -12
  659. data/lib/extensions/net-http/uri/mailto.rb +0 -266
  660. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtDBus.framework/Versions/4/QtDBus +0 -0
  661. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtXml.framework/Versions/4/QtXml +0 -0
  662. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/qmltooling/libtcpserver.dylib +0 -0
  663. data/res/generators/templates/application/public/jqmobile/images/icon-search-black.png +0 -0
  664. data/res/generators/templates/application/public/jqmobile/jquery.mobile-1.0b3.min.css +0 -8
  665. data/res/generators/templates/application/public/jqmobile/jquery.mobile-1.0b3.min.js +0 -169
  666. data/res/generators/templates/application/public/jquery/jquery-1.6.3.min.js +0 -4
  667. data/spec/framework_spec/extensions/test-libs/thread.rb +0 -391
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * jQuery Mobile v1.0b3
2
+ * jQuery Mobile v1.0rc1
3
3
  * http://jquerymobile.com/
4
4
  *
5
5
  * Copyright 2010, jQuery Project
@@ -278,6 +278,16 @@ $.Widget.prototype = {
278
278
  (function( $, undefined ) {
279
279
 
280
280
  $.widget( "mobile.widget", {
281
+ // decorate the parent _createWidget to trigger `widgetinit` for users
282
+ // who wish to do post post `widgetcreate` alterations/additions
283
+ //
284
+ // TODO create a pull request for jquery ui to trigger this event
285
+ // in the original _createWidget
286
+ _createWidget: function() {
287
+ $.Widget.prototype._createWidget.apply( this, arguments );
288
+ this._trigger( 'init' );
289
+ },
290
+
281
291
  _getCreateOptions: function() {
282
292
 
283
293
  var elem = this.element,
@@ -301,7 +311,7 @@ $.widget( "mobile.widget", {
301
311
 
302
312
  })( jQuery );
303
313
  /*
304
- * jQuery Mobile Framework : resolution and CSS media query related helpers and behavior
314
+ * jQuery Mobile Framework : a workaround for window.matchMedia
305
315
  * Copyright (c) jQuery Project
306
316
  * Dual licensed under the MIT or GPL Version 2 licenses.
307
317
  * http://jquery.org/license
@@ -421,9 +431,7 @@ $.extend( $.support, {
421
431
  touchOverflow: !!propExists( "overflowScrolling" ),
422
432
  boxShadow: !!propExists( "boxShadow" ) && !bb,
423
433
  scrollTop: ( "pageXOffset" in window || "scrollTop" in document.documentElement || "scrollTop" in fakeBody[ 0 ] ) && !webos,
424
- dynamicBaseTag: baseTagTest(),
425
- // TODO: This is a weak test. We may want to beef this up later.
426
- eventCapture: "addEventListener" in document
434
+ dynamicBaseTag: baseTagTest()
427
435
  });
428
436
 
429
437
  fakeBody.remove();
@@ -502,7 +510,7 @@ var dataPropertyName = "virtualMouseBindings",
502
510
  clickBlockList = [],
503
511
  blockMouseTriggers = false,
504
512
  blockTouchTriggers = false,
505
- eventCaptureSupported = $.support.eventCapture,
513
+ eventCaptureSupported = "addEventListener" in document,
506
514
  $document = $( document ),
507
515
  nextTouchID = 1,
508
516
  lastTouchID = 0;
@@ -542,6 +550,12 @@ function createVirtualEvent( event, eventType ) {
542
550
  }
543
551
  }
544
552
 
553
+ // make sure that if the mouse and click virtual events are generated
554
+ // without a .which one is defined
555
+ if ( t.search(/mouse(down|up)|click/) > -1 && !event.which ){
556
+ event.which = 1;
557
+ }
558
+
545
559
  if ( t.search(/^touch/) !== -1 ) {
546
560
  ne = getNativeEvent( oe );
547
561
  t = ne.touches;
@@ -1809,11 +1823,19 @@ $.widget( "mobile.page", $.mobile.widget, {
1809
1823
  // Mobile version of data and removeData and hasData methods
1810
1824
  // ensures all data is set and retrieved using jQuery Mobile's data namespace
1811
1825
  $.fn.jqmData = function( prop, value ) {
1812
- return this.data( prop ? $.mobile.nsNormalize( prop ) : prop, value );
1826
+ var result;
1827
+ if ( typeof prop != "undefined" ) {
1828
+ result = this.data( prop ? $.mobile.nsNormalize( prop ) : prop, value );
1829
+ }
1830
+ return result;
1813
1831
  };
1814
1832
 
1815
1833
  $.jqmData = function( elem, prop, value ) {
1816
- return $.data( elem, $.mobile.nsNormalize( prop ), value );
1834
+ var result;
1835
+ if ( typeof prop != "undefined" ) {
1836
+ result = $.data( elem, prop ? $.mobile.nsNormalize( prop ) : prop, value );
1837
+ }
1838
+ return result;
1817
1839
  };
1818
1840
 
1819
1841
  $.fn.jqmRemoveData = function( prop ) {
@@ -1824,8 +1846,32 @@ $.widget( "mobile.page", $.mobile.widget, {
1824
1846
  return $.removeData( elem, $.mobile.nsNormalize( prop ) );
1825
1847
  };
1826
1848
 
1827
- $.jqmHasData = function( elem, prop ) {
1828
- return $.hasData( elem, $.mobile.nsNormalize( prop ) );
1849
+ $.fn.removeWithDependents = function() {
1850
+ $.removeWithDependents( this );
1851
+ };
1852
+
1853
+ $.removeWithDependents = function( elem ) {
1854
+ var $elem = $( elem );
1855
+
1856
+ ( $elem.jqmData('dependents') || $() ).remove();
1857
+ $elem.remove();
1858
+ };
1859
+
1860
+ $.fn.addDependents = function( newDependents ) {
1861
+ $.addDependents( $(this), newDependents );
1862
+ };
1863
+
1864
+ $.addDependents = function( elem, newDependents ) {
1865
+ var dependents = $(elem).jqmData( 'dependents' ) || $();
1866
+
1867
+ $(elem).jqmData( 'dependents', $.merge(dependents, newDependents) );
1868
+ };
1869
+
1870
+ // note that this helper doesn't attempt to handle the callback
1871
+ // or setting of an html elements text, its only purpose is
1872
+ // to return the html encoded version of the text in all cases. (thus the name)
1873
+ $.fn.getEncodedText = function() {
1874
+ return $( "<div/>" ).text( $(this).text() ).html();
1829
1875
  };
1830
1876
 
1831
1877
  // Monkey-patching Sizzle to filter the :jqmData selector
@@ -1875,20 +1921,21 @@ $.widget( "mobile.page", $.mobile.widget, {
1875
1921
  // [2]: http://jblas:password@mycompany.com:8080/mail/inbox
1876
1922
  // [3]: http://jblas:password@mycompany.com:8080
1877
1923
  // [4]: http:
1878
- // [5]: jblas:password@mycompany.com:8080
1879
- // [6]: jblas:password
1880
- // [7]: jblas
1881
- // [8]: password
1882
- // [9]: mycompany.com:8080
1883
- // [10]: mycompany.com
1884
- // [11]: 8080
1885
- // [12]: /mail/inbox
1886
- // [13]: /mail/
1887
- // [14]: inbox
1888
- // [15]: ?msg=1234&type=unread
1889
- // [16]: #msg-content
1924
+ // [5]: //
1925
+ // [6]: jblas:password@mycompany.com:8080
1926
+ // [7]: jblas:password
1927
+ // [8]: jblas
1928
+ // [9]: password
1929
+ // [10]: mycompany.com:8080
1930
+ // [11]: mycompany.com
1931
+ // [12]: 8080
1932
+ // [13]: /mail/inbox
1933
+ // [14]: /mail/
1934
+ // [15]: inbox
1935
+ // [16]: ?msg=1234&type=unread
1936
+ // [17]: #msg-content
1890
1937
  //
1891
- urlParseRE: /^(((([^:\/#\?]+:)?(?:\/\/((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,
1938
+ urlParseRE: /^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,
1892
1939
 
1893
1940
  //Parse a URL into a structure that allows easy access to
1894
1941
  //all of the URL components by name.
@@ -1899,34 +1946,31 @@ $.widget( "mobile.page", $.mobile.widget, {
1899
1946
  return url;
1900
1947
  }
1901
1948
 
1902
- var u = url || "",
1903
- matches = path.urlParseRE.exec( url ),
1904
- results;
1905
- if ( matches ) {
1949
+ var matches = path.urlParseRE.exec( url || "" ) || [];
1950
+
1906
1951
  // Create an object that allows the caller to access the sub-matches
1907
1952
  // by name. Note that IE returns an empty string instead of undefined,
1908
1953
  // like all other browsers do, so we normalize everything so its consistent
1909
1954
  // no matter what browser we're running on.
1910
- results = {
1911
- href: matches[0] || "",
1912
- hrefNoHash: matches[1] || "",
1913
- hrefNoSearch: matches[2] || "",
1914
- domain: matches[3] || "",
1915
- protocol: matches[4] || "",
1916
- authority: matches[5] || "",
1917
- username: matches[7] || "",
1918
- password: matches[8] || "",
1919
- host: matches[9] || "",
1920
- hostname: matches[10] || "",
1921
- port: matches[11] || "",
1922
- pathname: matches[12] || "",
1923
- directory: matches[13] || "",
1924
- filename: matches[14] || "",
1925
- search: matches[15] || "",
1926
- hash: matches[16] || ""
1955
+ return {
1956
+ href: matches[ 0 ] || "",
1957
+ hrefNoHash: matches[ 1 ] || "",
1958
+ hrefNoSearch: matches[ 2 ] || "",
1959
+ domain: matches[ 3 ] || "",
1960
+ protocol: matches[ 4 ] || "",
1961
+ doubleSlash: matches[ 5 ] || "",
1962
+ authority: matches[ 6 ] || "",
1963
+ username: matches[ 8 ] || "",
1964
+ password: matches[ 9 ] || "",
1965
+ host: matches[ 10 ] || "",
1966
+ hostname: matches[ 11 ] || "",
1967
+ port: matches[ 12 ] || "",
1968
+ pathname: matches[ 13 ] || "",
1969
+ directory: matches[ 14 ] || "",
1970
+ filename: matches[ 15 ] || "",
1971
+ search: matches[ 16 ] || "",
1972
+ hash: matches[ 17 ] || ""
1927
1973
  };
1928
- }
1929
- return results || {};
1930
1974
  },
1931
1975
 
1932
1976
  //Turn relPath into an asbolute path. absPath is
@@ -1986,13 +2030,14 @@ $.widget( "mobile.page", $.mobile.widget, {
1986
2030
  var relObj = path.parseUrl( relUrl ),
1987
2031
  absObj = path.parseUrl( absUrl ),
1988
2032
  protocol = relObj.protocol || absObj.protocol,
2033
+ doubleSlash = relObj.protocol ? relObj.doubleSlash : ( relObj.doubleSlash || absObj.doubleSlash );
1989
2034
  authority = relObj.authority || absObj.authority,
1990
2035
  hasPath = relObj.pathname !== "",
1991
2036
  pathname = path.makePathAbsolute( relObj.pathname || absObj.filename, absObj.pathname ),
1992
2037
  search = relObj.search || ( !hasPath && absObj.search ) || "",
1993
2038
  hash = relObj.hash;
1994
2039
 
1995
- return protocol + "//" + authority + pathname + search + hash;
2040
+ return protocol + doubleSlash + authority + pathname + search + hash;
1996
2041
  },
1997
2042
 
1998
2043
  //Add search (aka query) params to the specified url.
@@ -2248,41 +2293,83 @@ $.widget( "mobile.page", $.mobile.widget, {
2248
2293
  $.mobile.changePage.apply( null, pageTransitionQueue.pop() );
2249
2294
  }
2250
2295
  }
2251
-
2296
+
2252
2297
  // Save the last scroll distance per page, before it is hidden
2253
- var getLastScroll = (function( lastScrollEnabled ){
2254
- return function(){
2255
- if( !lastScrollEnabled ){
2256
- lastScrollEnabled = true;
2257
- return;
2258
- }
2259
-
2260
- lastScrollEnabled = false;
2261
-
2262
- var active = $.mobile.urlHistory.getActive(),
2263
- activePage = $( ".ui-page-active" ),
2264
- scrollElem = $( window ),
2265
- touchOverflow = $.support.touchOverflow && $.mobile.touchOverflowEnabled;
2266
-
2267
- if( touchOverflow ){
2268
- scrollElem = activePage.is( ".ui-native-fixed" ) ? activePage.find( ".ui-content" ) : activePage;
2269
- }
2270
-
2271
- if( active ){
2272
- var lastScroll = scrollElem.scrollTop();
2298
+ var setLastScrollEnabled = true,
2299
+ firstScrollElem, getScrollElem, setLastScroll, delayedSetLastScroll;
2300
+
2301
+ getScrollElem = function() {
2302
+ var scrollElem = $window, activePage,
2303
+ touchOverflow = $.support.touchOverflow && $.mobile.touchOverflowEnabled;
2304
+
2305
+ if( touchOverflow ){
2306
+ activePage = $( ".ui-page-active" );
2307
+ scrollElem = activePage.is( ".ui-native-fixed" ) ? activePage.find( ".ui-content" ) : activePage;
2308
+ }
2309
+
2310
+ return scrollElem;
2311
+ };
2312
+
2313
+ setLastScroll = function( scrollElem ) {
2314
+ // this barrier prevents setting the scroll value based on the browser
2315
+ // scrolling the window based on a hashchange
2316
+ if( !setLastScrollEnabled ) {
2317
+ return;
2318
+ }
2319
+
2320
+ var active = $.mobile.urlHistory.getActive();
2321
+
2322
+ if( active ) {
2323
+ var lastScroll = scrollElem && scrollElem.scrollTop();
2324
+
2325
+ // Set active page's lastScroll prop.
2326
+ // If the location we're scrolling to is less than minScrollBack, let it go.
2327
+ active.lastScroll = lastScroll < $.mobile.minScrollBack ? $.mobile.defaultHomeScroll : lastScroll;
2328
+ }
2329
+ };
2330
+
2331
+ // bind to scrollstop to gather scroll position. The delay allows for the hashchange
2332
+ // event to fire and disable scroll recording in the case where the browser scrolls
2333
+ // to the hash targets location (sometimes the top of the page). once pagechange fires
2334
+ // getLastScroll is again permitted to operate
2335
+ delayedSetLastScroll = function() {
2336
+ setTimeout( setLastScroll, 100, $(this) );
2337
+ };
2338
+
2339
+ // disable an scroll setting when a hashchange has been fired, this only works
2340
+ // because the recording of the scroll position is delayed for 100ms after
2341
+ // the browser might have changed the position because of the hashchange
2342
+ $window.bind( $.support.pushState ? "popstate" : "hashchange", function() {
2343
+ setLastScrollEnabled = false;
2344
+ });
2345
+
2346
+ // handle initial hashchange from chrome :(
2347
+ $window.one( $.support.pushState ? "popstate" : "hashchange", function() {
2348
+ setLastScrollEnabled = true;
2349
+ });
2350
+
2351
+ // wait until the mobile page container has been determined to bind to pagechange
2352
+ $window.one( "pagecontainercreate", function(){
2353
+ // once the page has changed, re-enable the scroll recording
2354
+ $.mobile.pageContainer.bind( "pagechange", function() {
2355
+ var scrollElem = getScrollElem();
2356
+
2357
+ setLastScrollEnabled = true;
2358
+
2359
+ // remove any binding that previously existed on the get scroll
2360
+ // which may or may not be different than the scroll element determined for
2361
+ // this page previously
2362
+ scrollElem.unbind( "scrollstop", delayedSetLastScroll );
2363
+
2364
+ // determine and bind to the current scoll element which may be the window
2365
+ // or in the case of touch overflow the element with touch overflow
2366
+ scrollElem.bind( "scrollstop", delayedSetLastScroll );
2367
+ });
2368
+ });
2369
+
2370
+ // bind to scrollstop for the first page as "pagechange" won't be fired in that case
2371
+ getScrollElem().bind( "scrollstop", delayedSetLastScroll );
2273
2372
 
2274
- // Set active page's lastScroll prop.
2275
- // If the Y location we're scrolling to is less than minScrollBack, let it go.
2276
- active.lastScroll = lastScroll < $.mobile.minScrollBack ? $.mobile.defaultHomeScroll : lastScroll;
2277
- }
2278
- };
2279
- })( true );
2280
-
2281
- // to get last scroll, we need to get scrolltop before the page change
2282
- // using beforechangepage or popstate/hashchange (whichever comes first)
2283
- $( document ).bind( "beforechangepage", getLastScroll );
2284
- $( window ).bind( $.support.pushState ? "popstate" : "hashchange", getLastScroll );
2285
-
2286
2373
  // Make the iOS clock quick-scroll work again if we're using native overflow scrolling
2287
2374
  /*
2288
2375
  if( $.support.touchOverflow ){
@@ -2304,7 +2391,7 @@ $.widget( "mobile.page", $.mobile.widget, {
2304
2391
  touchOverflow = $.support.touchOverflow && $.mobile.touchOverflowEnabled,
2305
2392
  toScroll = active.lastScroll || ( touchOverflow ? 0 : $.mobile.defaultHomeScroll ),
2306
2393
  screenHeight = getScreenHeight();
2307
-
2394
+
2308
2395
  // Scroll to top, hide addr bar
2309
2396
  window.scrollTo( 0, $.mobile.defaultHomeScroll );
2310
2397
 
@@ -2312,22 +2399,22 @@ $.widget( "mobile.page", $.mobile.widget, {
2312
2399
  //trigger before show/hide events
2313
2400
  fromPage.data( "page" )._trigger( "beforehide", null, { nextPage: toPage } );
2314
2401
  }
2315
-
2402
+
2316
2403
  if( !touchOverflow){
2317
2404
  toPage.height( screenHeight + toScroll );
2318
- }
2319
-
2405
+ }
2406
+
2320
2407
  toPage.data( "page" )._trigger( "beforeshow", null, { prevPage: fromPage || $( "" ) } );
2321
2408
 
2322
2409
  //clear page loader
2323
2410
  $.mobile.hidePageLoadingMsg();
2324
-
2411
+
2325
2412
  if( touchOverflow && toScroll ){
2326
-
2413
+
2327
2414
  toPage.addClass( "ui-mobile-pre-transition" );
2328
2415
  // Send focus to page as it is now display: block
2329
2416
  reFocus( toPage );
2330
-
2417
+
2331
2418
  //set page's scrollTop to remembered distance
2332
2419
  if( toPage.is( ".ui-native-fixed" ) ){
2333
2420
  toPage.find( ".ui-content" ).scrollTop( toScroll );
@@ -2350,7 +2437,7 @@ $.widget( "mobile.page", $.mobile.widget, {
2350
2437
  // Send focus to the newly shown page
2351
2438
  reFocus( toPage );
2352
2439
  }
2353
-
2440
+
2354
2441
  // Jump to top or prev scroll, sometimes on iOS the page has not rendered yet.
2355
2442
  if( !touchOverflow ){
2356
2443
  $.mobile.silentScroll( toScroll );
@@ -2361,7 +2448,7 @@ $.widget( "mobile.page", $.mobile.widget, {
2361
2448
  if( !touchOverflow ){
2362
2449
  fromPage.height( "" );
2363
2450
  }
2364
-
2451
+
2365
2452
  fromPage.data( "page" )._trigger( "hide", null, { nextPage: toPage } );
2366
2453
  }
2367
2454
 
@@ -2383,11 +2470,15 @@ $.widget( "mobile.page", $.mobile.widget, {
2383
2470
 
2384
2471
  return pageMin;
2385
2472
  }
2386
-
2473
+
2387
2474
  $.mobile.getScreenHeight = getScreenHeight;
2388
2475
 
2389
2476
  //simply set the active page's minimum height to screen height, depending on orientation
2390
2477
  function resetActivePageHeight(){
2478
+ // Don't apply this height in touch overflow enabled mode
2479
+ if( $.support.touchOverflow && $.mobile.touchOverflowEnabled ){
2480
+ return;
2481
+ }
2391
2482
  $( "." + $.mobile.activePageClass ).css( "min-height", getScreenHeight() );
2392
2483
  }
2393
2484
 
@@ -2417,20 +2508,12 @@ $.widget( "mobile.page", $.mobile.widget, {
2417
2508
  }
2418
2509
  };
2419
2510
 
2420
- //update location.hash, with or without triggering hashchange event
2421
- //TODO - deprecate this one at 1.0
2422
- $.mobile.updateHash = path.set;
2423
-
2424
2511
  //expose path object on $.mobile
2425
2512
  $.mobile.path = path;
2426
2513
 
2427
2514
  //expose base object on $.mobile
2428
2515
  $.mobile.base = base;
2429
2516
 
2430
- //url stack, useful when plugins need to be aware of previous pages viewed
2431
- //TODO: deprecate this one at 1.0
2432
- $.mobile.urlstack = urlHistory.stack;
2433
-
2434
2517
  //history stack
2435
2518
  $.mobile.urlHistory = urlHistory;
2436
2519
 
@@ -2467,6 +2550,26 @@ $.widget( "mobile.page", $.mobile.widget, {
2467
2550
  return asParsedObject ? $.extend( {}, documentBase ) : documentBase.href;
2468
2551
  };
2469
2552
 
2553
+ $.mobile._bindPageRemove = function() {
2554
+ var page = $(this);
2555
+
2556
+ // when dom caching is not enabled or the page is embedded bind to remove the page on hide
2557
+ if( !page.data("page").options.domCache
2558
+ && page.is(":jqmData(external-page='true')") ) {
2559
+
2560
+ page.bind( 'pagehide.remove', function() {
2561
+ var $this = $( this ),
2562
+ prEvent = new $.Event( "pageremove" );
2563
+
2564
+ $this.trigger( prEvent );
2565
+
2566
+ if( !prEvent.isDefaultPrevented() ){
2567
+ $this.removeWithDependents();
2568
+ }
2569
+ });
2570
+ }
2571
+ };
2572
+
2470
2573
  // Load a page into the DOM.
2471
2574
  $.mobile.loadPage = function( url, options ) {
2472
2575
  // This function uses deferred notifications to let callers
@@ -2504,6 +2607,11 @@ $.widget( "mobile.page", $.mobile.widget, {
2504
2607
  settings.data = undefined;
2505
2608
  }
2506
2609
 
2610
+ // If the caller is using a "post" request, reloadPage must be true
2611
+ if( settings.data && settings.type === "post" ){
2612
+ settings.reloadPage = true;
2613
+ }
2614
+
2507
2615
  // The absolute version of the URL minus any dialog/subpage params.
2508
2616
  // In otherwords the real URL of the page to be loaded.
2509
2617
  var fileUrl = path.getFilePath( absUrl ),
@@ -2521,6 +2629,15 @@ $.widget( "mobile.page", $.mobile.widget, {
2521
2629
  // Check to see if the page already exists in the DOM.
2522
2630
  page = settings.pageContainer.children( ":jqmData(url='" + dataUrl + "')" );
2523
2631
 
2632
+ // If we failed to find the page, check to see if the url is a
2633
+ // reference to an embedded page. If so, it may have been dynamically
2634
+ // injected by a developer, in which case it would be lacking a data-url
2635
+ // attribute and in need of enhancement.
2636
+ if ( page.length === 0 && !path.isPath( dataUrl ) ) {
2637
+ page = settings.pageContainer.children( "#" + dataUrl )
2638
+ .attr( "data-" + $.mobile.ns + "url", dataUrl )
2639
+ }
2640
+
2524
2641
  // If we failed to find a page in the DOM, check the URL to see if it
2525
2642
  // refers to the first page in the application.
2526
2643
  if ( page.length === 0 && $.mobile.firstPage && path.isFirstPageUrl( absUrl ) ) {
@@ -2545,6 +2662,18 @@ $.widget( "mobile.page", $.mobile.widget, {
2545
2662
  dupCachedPage = page;
2546
2663
  }
2547
2664
 
2665
+ var mpc = settings.pageContainer,
2666
+ pblEvent = new $.Event( "pagebeforeload" ),
2667
+ triggerData = { url: url, absUrl: absUrl, dataUrl: dataUrl, deferred: deferred, options: settings };
2668
+
2669
+ // Let listeners know we're about to load a page.
2670
+ mpc.trigger( pblEvent, triggerData );
2671
+
2672
+ // If the default behavior is prevented, stop here!
2673
+ if( pblEvent.isDefaultPrevented() ){
2674
+ return deferred.promise();
2675
+ }
2676
+
2548
2677
  if ( settings.showLoadMsg ) {
2549
2678
 
2550
2679
  // This configurable timeout allows cached pages a brief delay to load without showing a message
@@ -2581,7 +2710,7 @@ $.widget( "mobile.page", $.mobile.widget, {
2581
2710
  newPageTitle = html.match( /<title[^>]*>([^<]*)/ ) && RegExp.$1,
2582
2711
 
2583
2712
  // TODO handle dialogs again
2584
- pageElemRegex = new RegExp( ".*(<[^>]+\\bdata-" + $.mobile.ns + "role=[\"']?page[\"']?[^>]*>).*" ),
2713
+ pageElemRegex = new RegExp( "(<[^>]+\\bdata-" + $.mobile.ns + "role=[\"']?page[\"']?[^>]*>)" ),
2585
2714
  dataUrlRegex = new RegExp( "\\bdata-" + $.mobile.ns + "url=[\"']?([^\"'>]*)[\"']?" );
2586
2715
 
2587
2716
 
@@ -2593,9 +2722,6 @@ $.widget( "mobile.page", $.mobile.widget, {
2593
2722
  && RegExp.$1 ) {
2594
2723
  url = fileUrl = path.getFilePath( RegExp.$1 );
2595
2724
  }
2596
- else{
2597
-
2598
- }
2599
2725
 
2600
2726
  if ( base ) {
2601
2727
  base.set( fileUrl );
@@ -2634,20 +2760,16 @@ $.widget( "mobile.page", $.mobile.widget, {
2634
2760
  }
2635
2761
 
2636
2762
  //append to page and enhance
2763
+ // TODO taging a page with external to make sure that embedded pages aren't removed
2764
+ // by the various page handling code is bad. Having page handling code in many
2765
+ // places is bad. Solutions post 1.0
2637
2766
  page
2638
2767
  .attr( "data-" + $.mobile.ns + "url", path.convertUrlToDataUrl( fileUrl ) )
2768
+ .attr( "data-" + $.mobile.ns + "external-page", true )
2639
2769
  .appendTo( settings.pageContainer );
2640
2770
 
2641
2771
  // wait for page creation to leverage options defined on widget
2642
- page.one('pagecreate', function(){
2643
-
2644
- // when dom caching is not enabled bind to remove the page on hide
2645
- if( !page.data("page").options.domCache ){
2646
- page.bind( "pagehide.remove", function(){
2647
- $(this).remove();
2648
- });
2649
- }
2650
- });
2772
+ page.one( 'pagecreate', $.mobile._bindPageRemove );
2651
2773
 
2652
2774
  enhancePage( page, settings.role );
2653
2775
 
@@ -2665,6 +2787,12 @@ $.widget( "mobile.page", $.mobile.widget, {
2665
2787
  hideMsg();
2666
2788
  }
2667
2789
 
2790
+ // Add the page reference to our triggerData.
2791
+ triggerData.page = page;
2792
+
2793
+ // Let listeners know the page loaded successfully.
2794
+ settings.pageContainer.trigger( "pageload", triggerData );
2795
+
2668
2796
  deferred.resolve( absUrl, options, page, dupCachedPage );
2669
2797
  },
2670
2798
  error: function() {
@@ -2673,6 +2801,19 @@ $.widget( "mobile.page", $.mobile.widget, {
2673
2801
  base.set( path.get() );
2674
2802
  }
2675
2803
 
2804
+ var plfEvent = new $.Event( "pageloadfailed" );
2805
+
2806
+ // Let listeners know the page load failed.
2807
+ settings.pageContainer.trigger( plfEvent, triggerData );
2808
+
2809
+ // If the default behavior is prevented, stop here!
2810
+ // Note that it is the responsibility of the listener/handler
2811
+ // that called preventDefault(), to resolve/reject the
2812
+ // deferred object within the triggerData.
2813
+ if( plfEvent.isDefaultPrevented() ){
2814
+ return;
2815
+ }
2816
+
2676
2817
  // Remove loading message.
2677
2818
  if ( settings.showLoadMsg ) {
2678
2819
 
@@ -2709,43 +2850,6 @@ $.widget( "mobile.page", $.mobile.widget, {
2709
2850
 
2710
2851
  // Show a specific page in the page container.
2711
2852
  $.mobile.changePage = function( toPage, options ) {
2712
- // XXX: REMOVE_BEFORE_SHIPPING_1.0
2713
- // This is temporary code that makes changePage() compatible with previous alpha versions.
2714
- if ( typeof options !== "object" ) {
2715
- var opts = null;
2716
-
2717
- // Map old-style call signature for form submit to the new options object format.
2718
- if ( typeof toPage === "object" && toPage.url && toPage.type ) {
2719
- opts = {
2720
- type: toPage.type,
2721
- data: toPage.data,
2722
- forcePageLoad: true
2723
- };
2724
- toPage = toPage.url;
2725
- }
2726
-
2727
- // The arguments passed into the function need to be re-mapped
2728
- // to the new options object format.
2729
- var len = arguments.length;
2730
- if ( len > 1 ) {
2731
- var argNames = [ "transition", "reverse", "changeHash", "fromHashChange" ], i;
2732
- for ( i = 1; i < len; i++ ) {
2733
- var a = arguments[ i ];
2734
- if ( typeof a !== "undefined" ) {
2735
- opts = opts || {};
2736
- opts[ argNames[ i - 1 ] ] = a;
2737
- }
2738
- }
2739
- }
2740
-
2741
- // If an options object was created, then we know changePage() was called
2742
- // with an old signature.
2743
- if ( opts ) {
2744
- return $.mobile.changePage( toPage, opts );
2745
- }
2746
- }
2747
- // XXX: REMOVE_BEFORE_SHIPPING_1.0
2748
-
2749
2853
  // If we are in the midst of a transition, queue the current request.
2750
2854
  // We'll call changePage() once we're done with the current transition to
2751
2855
  // service the request.
@@ -2769,8 +2873,6 @@ $.widget( "mobile.page", $.mobile.widget, {
2769
2873
  // Let listeners know we're about to change the current page.
2770
2874
  mpc.trigger( pbcEvent, triggerData );
2771
2875
 
2772
- mpc.trigger( "beforechangepage", triggerData ); // XXX: DEPRECATED for 1.0
2773
-
2774
2876
  // If the default behavior is prevented, stop here!
2775
2877
  if( pbcEvent.isDefaultPrevented() ){
2776
2878
  return;
@@ -2799,7 +2901,6 @@ $.widget( "mobile.page", $.mobile.widget, {
2799
2901
  $.mobile.changePage( newPage, options );
2800
2902
  })
2801
2903
  .fail(function( url, options ) {
2802
- // XXX_jblas: Fire off changepagefailed notificaiton.
2803
2904
  isPageTransitioning = false;
2804
2905
 
2805
2906
  //clear out the active button state
@@ -2808,7 +2909,6 @@ $.widget( "mobile.page", $.mobile.widget, {
2808
2909
  //release transition lock so navigation is free again
2809
2910
  releasePageTransitionLock();
2810
2911
  settings.pageContainer.trigger( "pagechangefailed", triggerData );
2811
- settings.pageContainer.trigger( "changepagefailed", triggerData ); // XXX: DEPRECATED for 1.0
2812
2912
  });
2813
2913
  return;
2814
2914
  }
@@ -2826,16 +2926,19 @@ $.widget( "mobile.page", $.mobile.widget, {
2826
2926
  pageTitle = document.title,
2827
2927
  isDialog = settings.role === "dialog" || toPage.jqmData( "role" ) === "dialog";
2828
2928
 
2829
- // If we are trying to transition to the same page that we are currently on ignore the request.
2830
- // an illegal same page request is defined by the current page being the same as the url, as long as there's history
2831
- // and toPage is not an array or object (those are allowed to be "same")
2832
- //
2833
- // XXX_jblas: We need to remove this at some point when we allow for transitions
2834
- // to the same page.
2835
- if( fromPage && fromPage[0] === toPage[0] ) {
2929
+ // By default, we prevent changePage requests when the fromPage and toPage
2930
+ // are the same element, but folks that generate content manually/dynamically
2931
+ // and reuse pages want to be able to transition to the same page. To allow
2932
+ // this, they will need to change the default value of allowSamePageTransition
2933
+ // to true, *OR*, pass it in as an option when they manually call changePage().
2934
+ // It should be noted that our default transition animations assume that the
2935
+ // formPage and toPage are different elements, so they may behave unexpectedly.
2936
+ // It is up to the developer that turns on the allowSamePageTransitiona option
2937
+ // to either turn off transition animations, or make sure that an appropriate
2938
+ // animation transition is used.
2939
+ if( fromPage && fromPage[0] === toPage[0] && !settings.allowSamePageTransition ) {
2836
2940
  isPageTransitioning = false;
2837
2941
  mpc.trigger( "pagechange", triggerData );
2838
- mpc.trigger( "changepage", triggerData ); // XXX: DEPRECATED for 1.0
2839
2942
  return;
2840
2943
  }
2841
2944
 
@@ -2923,8 +3026,6 @@ $.widget( "mobile.page", $.mobile.widget, {
2923
3026
 
2924
3027
  // Let listeners know we're all done changing the current page.
2925
3028
  mpc.trigger( "pagechange", triggerData );
2926
-
2927
- mpc.trigger( "changepage", triggerData ); // XXX: DEPRECATED for 1.0
2928
3029
  });
2929
3030
  };
2930
3031
 
@@ -2938,7 +3039,8 @@ $.widget( "mobile.page", $.mobile.widget, {
2938
3039
  pageContainer: undefined,
2939
3040
  showLoadMsg: true, //loading message shows by default when pages are being fetched during changePage
2940
3041
  dataUrl: undefined,
2941
- fromPage: undefined
3042
+ fromPage: undefined,
3043
+ allowSamePageTransition: false
2942
3044
  };
2943
3045
 
2944
3046
  /* Event Bindings - hashchange, submit, and click */
@@ -3023,6 +3125,12 @@ $.widget( "mobile.page", $.mobile.widget, {
3023
3125
 
3024
3126
  //add active state on vclick
3025
3127
  $( document ).bind( "vclick", function( event ) {
3128
+ // if this isn't a left click we don't care. Its important to note
3129
+ // that when the virtual event is generated it will create
3130
+ if ( event.which > 1 ){
3131
+ return;
3132
+ }
3133
+
3026
3134
  var link = findClosestLink( event.target );
3027
3135
  if ( link ) {
3028
3136
  if ( path.parseUrl( link.getAttribute( "href" ) || "#" ).hash !== "#" ) {
@@ -3037,7 +3145,10 @@ $.widget( "mobile.page", $.mobile.widget, {
3037
3145
  // click routing - direct to HTTP or Ajax, accordingly
3038
3146
  $( document ).bind( "click", function( event ) {
3039
3147
  var link = findClosestLink( event.target );
3040
- if ( !link ) {
3148
+
3149
+ // If there is no link associated with the click or its not a left
3150
+ // click we want to ignore the click
3151
+ if ( !link || event.which > 1) {
3041
3152
  return;
3042
3153
  }
3043
3154
 
@@ -3053,18 +3164,18 @@ $.widget( "mobile.page", $.mobile.widget, {
3053
3164
  return false;
3054
3165
  }
3055
3166
 
3167
+ var baseUrl = getClosestBaseUrl( $link ),
3168
+
3169
+ //get href, if defined, otherwise default to empty hash
3170
+ href = path.makeUrlAbsolute( $link.attr( "href" ) || "#", baseUrl );
3171
+
3056
3172
  //if ajax is disabled, exit early
3057
- if( !$.mobile.ajaxEnabled ){
3173
+ if( !$.mobile.ajaxEnabled && !path.isEmbeddedPage( href ) ){
3058
3174
  httpCleanup();
3059
3175
  //use default click handling
3060
3176
  return;
3061
3177
  }
3062
3178
 
3063
- var baseUrl = getClosestBaseUrl( $link ),
3064
-
3065
- //get href, if defined, otherwise default to empty hash
3066
- href = path.makeUrlAbsolute( $link.attr( "href" ) || "#", baseUrl );
3067
-
3068
3179
  // XXX_jblas: Ideally links to application pages should be specified as
3069
3180
  // an url to the application document with a hash that is either
3070
3181
  // the site relative path or id to the page. But some of the
@@ -3172,7 +3283,7 @@ $.widget( "mobile.page", $.mobile.widget, {
3172
3283
  isForward: function() { window.history.forward(); }
3173
3284
  });
3174
3285
 
3175
- // prevent changepage
3286
+ // prevent changePage()
3176
3287
  return;
3177
3288
  } else {
3178
3289
  // if the current active page is a dialog and we're navigating
@@ -3201,7 +3312,12 @@ $.widget( "mobile.page", $.mobile.widget, {
3201
3312
 
3202
3313
  //if to is defined, load it
3203
3314
  if ( to ) {
3204
- to = ( typeof to === "string" && !path.isPath( to ) ) ? ( '#' + to ) : to;
3315
+ // At this point, 'to' can be one of 3 things, a cached page element from
3316
+ // a history stack entry, an id, or site-relative/absolute URL. If 'to' is
3317
+ // an id, we need to resolve it against the documentBase, not the location.href,
3318
+ // since the hashchange could've been the result of a forward/backward navigation
3319
+ // that crosses from an external page/dialog to an internal page/dialog.
3320
+ to = ( typeof to === "string" && !path.isPath( to ) ) ? ( path.makeUrlAbsolute( '#' + to, documentBase ) ) : to;
3205
3321
  $.mobile.changePage( to, changePageOptions );
3206
3322
  } else {
3207
3323
  //there's no hash, go to the first page in the dom
@@ -3271,28 +3387,47 @@ $.widget( "mobile.page", $.mobile.widget, {
3271
3387
  return url;
3272
3388
  },
3273
3389
 
3390
+ // TODO sort out a single barrier to hashchange functionality
3391
+ nextHashChangePrevented: function( value ) {
3392
+ $.mobile.urlHistory.ignoreNextHashChange = value;
3393
+ self.onHashChangeDisabled = value;
3394
+ },
3395
+
3274
3396
  // on hash change we want to clean up the url
3275
3397
  // NOTE this takes place *after* the vanilla navigation hash change
3276
3398
  // handling has taken place and set the state of the DOM
3277
3399
  onHashChange: function( e ) {
3278
- var href, state;
3279
-
3280
- self.hashchangeFired = true;
3281
-
3282
- // only replaceState when the hash doesn't represent an embeded page
3283
- if( $.mobile.path.isPath(location.hash) ) {
3400
+ // disable this hash change
3401
+ if( self.onHashChangeDisabled ){
3402
+ return;
3403
+ }
3404
+
3405
+ var href, state,
3406
+ hash = location.hash,
3407
+ isPath = $.mobile.path.isPath( hash );
3408
+ hash = isPath ? hash.replace( "#", "" ) : hash;
3284
3409
 
3285
- // propulate the hash when its not available
3286
- state = self.state();
3410
+ // propulate the hash when its not available
3411
+ state = self.state();
3287
3412
 
3288
- // make the hash abolute with the current href
3289
- href = $.mobile.path.makeUrlAbsolute( state.hash.replace("#", ""), location.href );
3413
+ // make the hash abolute with the current href
3414
+ href = $.mobile.path.makeUrlAbsolute( hash, location.href );
3290
3415
 
3416
+ if ( isPath ) {
3291
3417
  href = self.resetUIKeys( href );
3292
-
3293
- // replace the current url with the new href and store the state
3294
- history.replaceState( state, document.title, href );
3295
3418
  }
3419
+
3420
+ // replace the current url with the new href and store the state
3421
+ // Note that in some cases we might be replacing an url with the
3422
+ // same url. We do this anyways because we need to make sure that
3423
+ // all of our history entries have a state object associated with
3424
+ // them. This allows us to work around the case where window.history.back()
3425
+ // is called to transition from an external page to an embedded page.
3426
+ // In that particular case, a hashchange event is *NOT* generated by the browser.
3427
+ // Ensuring each history entry has a state object means that onPopState()
3428
+ // will always trigger our hashchange callback even when a hashchange event
3429
+ // is not fired.
3430
+ history.replaceState( state, document.title, href );
3296
3431
  },
3297
3432
 
3298
3433
  // on popstate (ie back or forward) we need to replace the hash that was there previously
@@ -3304,14 +3439,14 @@ $.widget( "mobile.page", $.mobile.widget, {
3304
3439
  // or forward popstate
3305
3440
  if( poppedState ) {
3306
3441
  // disable any hashchange triggered by the browser
3307
- $.mobile.urlHistory.ignoreNextHashChange = true;
3442
+ self.nextHashChangePrevented( true );
3308
3443
 
3309
3444
  // defer our manual hashchange until after the browser fired
3310
3445
  // version has come and gone
3311
3446
  setTimeout(function() {
3312
3447
  // make sure that the manual hash handling takes place
3313
- $.mobile.urlHistory.ignoreNextHashChange = false;
3314
-
3448
+ self.nextHashChangePrevented( false );
3449
+
3315
3450
  // change the page based on the hash
3316
3451
  $.mobile._handleHashChange( poppedState.hash );
3317
3452
  }, 100);
@@ -3356,7 +3491,7 @@ function css3TransitionHandler( name, reverse, $to, $from ) {
3356
3491
 
3357
3492
  $to.add( $from ).removeClass( "out in reverse " + name );
3358
3493
 
3359
- if ( $from ) {
3494
+ if ( $from && $from[ 0 ] !== $to[ 0 ] ) {
3360
3495
  $from.removeClass( $.mobile.activePageClass );
3361
3496
  }
3362
3497
 
@@ -3427,10 +3562,13 @@ $( document ).bind( "pagecreate enhance", function( e ){
3427
3562
  optType = o.degradeInputs[ type ] || "text";
3428
3563
 
3429
3564
  if ( o.degradeInputs[ type ] ) {
3430
- $this.replaceWith(
3431
- $( "<div>" ).html( $this.clone() ).html()
3432
- .replace( /\s+type=["']?\w+['"]?/, " type=\"" + optType + "\" data-" + $.mobile.ns + "type=\"" + type + "\" " )
3433
- );
3565
+ var html = $( "<div>" ).html( $this.clone() ).html(),
3566
+ // In IE browsers, the type sometimes doesn't exist in the cloned markup, so we replace the closing tag instead
3567
+ hasType = html.indexOf( " type=" ) > -1,
3568
+ findstr = hasType ? /\s+type=["']?\w+['"]?/ : /\/?>/,
3569
+ repstr = " type=\"" + optType + "\" data-" + $.mobile.ns + "type=\"" + type + "\"" + ( hasType ? "" : ">" );
3570
+
3571
+ $this.replaceWith( html.replace( findstr, repstr ) );
3434
3572
  }
3435
3573
  });
3436
3574
 
@@ -3451,27 +3589,36 @@ $.widget( "mobile.dialog", $.mobile.widget, {
3451
3589
  initSelector : ":jqmData(role='dialog')"
3452
3590
  },
3453
3591
  _create: function() {
3454
- var $el = this.element,
3455
- pageTheme = $el.attr( "class" ).match( /ui-body-[a-z]/ );
3456
-
3592
+ var self = this,
3593
+ $el = this.element,
3594
+ pageTheme = $el.attr( "class" ).match( /ui-body-[a-z]/ ),
3595
+ headerCloseButton = $( "<a href='#' data-" + $.mobile.ns + "icon='delete' data-" + $.mobile.ns + "iconpos='notext'>"+ this.options.closeBtnText + "</a>" );
3596
+
3457
3597
  if( pageTheme.length ){
3458
3598
  $el.removeClass( pageTheme[ 0 ] );
3459
- }
3460
-
3599
+ }
3600
+
3461
3601
  $el.addClass( "ui-body-" + this.options.theme );
3462
-
3602
+
3463
3603
  // Class the markup for dialog styling
3464
3604
  // Set aria role
3465
3605
  $el.attr( "role", "dialog" )
3466
3606
  .addClass( "ui-dialog" )
3467
3607
  .find( ":jqmData(role='header')" )
3468
3608
  .addClass( "ui-corner-top ui-overlay-shadow" )
3469
- .prepend( "<a href='#' data-" + $.mobile.ns + "icon='delete' data-" + $.mobile.ns + "rel='back' data-" + $.mobile.ns + "iconpos='notext'>"+ this.options.closeBtnText + "</a>" )
3609
+ .prepend( headerCloseButton )
3470
3610
  .end()
3471
3611
  .find( ":jqmData(role='content'),:jqmData(role='footer')" )
3472
3612
  .last()
3473
3613
  .addClass( "ui-corner-bottom ui-overlay-shadow" );
3474
3614
 
3615
+ // this must be an anonymous function so that select menu dialogs can replace
3616
+ // the close method. This is a change from previously just defining data-rel=back
3617
+ // on the button and letting nav handle it
3618
+ headerCloseButton.bind( "vclick", function() {
3619
+ self.close();
3620
+ });
3621
+
3475
3622
  /* bind events
3476
3623
  - clicks and submits should use the closing transition that the dialog opened with
3477
3624
  unless a data-transition is specified on the link/form
@@ -3613,6 +3760,7 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
3613
3760
  collapsed: true,
3614
3761
  heading: ">:header,>legend",
3615
3762
  theme: null,
3763
+ contentTheme: null,
3616
3764
  iconTheme: "d",
3617
3765
  initSelector: ":jqmData(role='collapsible')"
3618
3766
  },
@@ -3620,10 +3768,11 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
3620
3768
 
3621
3769
  var $el = this.element,
3622
3770
  o = this.options,
3623
- collapsibleContain = $el.addClass( "ui-collapsible-contain" ),
3771
+ collapsible = $el.addClass( "ui-collapsible" ),
3624
3772
  collapsibleHeading = $el.find( o.heading ).eq( 0 ),
3625
- collapsibleContent = collapsibleContain.wrapInner( "<div class='ui-collapsible-content'></div>" ).find( ".ui-collapsible-content" ),
3626
- collapsibleParent = $el.closest( ":jqmData(role='collapsible-set')" ).addClass( "ui-collapsible-set" );
3773
+ collapsibleContent = collapsible.wrapInner( "<div class='ui-collapsible-content'></div>" ).find( ".ui-collapsible-content" ),
3774
+ collapsibleSet = $el.closest( ":jqmData(role='collapsible-set')" ).addClass( "ui-collapsible-set" ),
3775
+ colllapsiblesInSet = collapsibleSet.children( ":jqmData(role='collapsible')" );
3627
3776
 
3628
3777
  // Replace collapsibleHeading if it's a legend
3629
3778
  if ( collapsibleHeading.is( "legend" ) ) {
@@ -3631,6 +3780,20 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
3631
3780
  collapsibleHeading.next().remove();
3632
3781
  }
3633
3782
 
3783
+ // If we are in a collapsible set
3784
+ if ( collapsibleSet.length ) {
3785
+ // Inherit the theme from collapsible-set
3786
+ if ( !o.theme ) {
3787
+ o.theme = collapsibleSet.jqmData( "theme" );
3788
+ }
3789
+ // Inherit the content-theme from collapsible-set
3790
+ if ( !o.contentTheme ) {
3791
+ o.contentTheme = collapsibleSet.jqmData( "content-theme" );
3792
+ }
3793
+ }
3794
+
3795
+ collapsibleContent.addClass( ( o.contentTheme ) ? ( "ui-body-" + o.contentTheme ) : "");
3796
+
3634
3797
  collapsibleHeading
3635
3798
  //drop heading in before content
3636
3799
  .insertBefore( collapsibleContent )
@@ -3640,117 +3803,96 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
3640
3803
  .wrapInner( "<a href='#' class='ui-collapsible-heading-toggle'></a>" )
3641
3804
  .find( "a:eq(0)" )
3642
3805
  .buttonMarkup({
3643
- shadow: !collapsibleParent.length,
3806
+ shadow: false,
3644
3807
  corners: false,
3645
3808
  iconPos: "left",
3646
3809
  icon: "plus",
3647
3810
  theme: o.theme
3648
- })
3649
- .find( ".ui-icon" )
3650
- .removeAttr( "class" )
3651
- .buttonMarkup({
3652
- shadow: true,
3653
- corners: true,
3654
- iconPos: "notext",
3655
- icon: "plus",
3656
- theme: o.iconTheme
3811
+ });
3812
+
3813
+ if ( !collapsibleSet.length ) {
3814
+ collapsibleHeading
3815
+ .find( "a:eq(0), .ui-btn-inner" )
3816
+ .addClass( "ui-corner-top ui-corner-bottom" );
3817
+ } else {
3818
+ // If we are in a collapsible set
3819
+
3820
+ // Initialize the collapsible set if it's not already initialized
3821
+ if ( !collapsibleSet.jqmData( "collapsiblebound" ) ) {
3822
+
3823
+ collapsibleSet
3824
+ .jqmData( "collapsiblebound", true )
3825
+ .bind( "expand", function( event ) {
3826
+
3827
+ $( event.target )
3828
+ .closest( ".ui-collapsible" )
3829
+ .siblings( ".ui-collapsible" )
3830
+ .trigger( "collapse" );
3831
+
3657
3832
  });
3833
+ }
3658
3834
 
3659
- if ( !collapsibleParent.length ) {
3660
- collapsibleHeading
3661
- .find( "a:eq(0)" )
3662
- .addClass( "ui-corner-all" )
3835
+ colllapsiblesInSet.first()
3836
+ .find( "a:eq(0)" )
3837
+ .addClass( "ui-corner-top" )
3838
+ .find( ".ui-btn-inner" )
3839
+ .addClass( "ui-corner-top" );
3840
+
3841
+ colllapsiblesInSet.last()
3842
+ .jqmData( "collapsible-last", true )
3843
+ .find( "a:eq(0)" )
3844
+ .addClass( "ui-corner-bottom" )
3663
3845
  .find( ".ui-btn-inner" )
3664
- .addClass( "ui-corner-all" );
3665
- } else {
3666
- if ( collapsibleContain.jqmData( "collapsible-last" ) ) {
3667
- collapsibleHeading
3668
- .find( "a:eq(0), .ui-btn-inner" )
3669
3846
  .addClass( "ui-corner-bottom" );
3670
- }
3847
+
3848
+
3849
+ if ( collapsible.jqmData( "collapsible-last" ) ) {
3850
+ collapsibleHeading
3851
+ .find( "a:eq(0), .ui-btn-inner" )
3852
+ .addClass( "ui-corner-bottom" );
3671
3853
  }
3854
+ }
3672
3855
 
3673
3856
  //events
3674
- collapsibleContain
3675
- .bind( "collapse", function( event ) {
3676
- if ( ! event.isDefaultPrevented() &&
3677
- $( event.target ).closest( ".ui-collapsible-contain" ).is( collapsibleContain ) ) {
3857
+ collapsible
3858
+ .bind( "expand collapse", function( event ) {
3859
+ if ( !event.isDefaultPrevented() ) {
3678
3860
 
3679
3861
  event.preventDefault();
3680
3862
 
3863
+ var $this = $( this ),
3864
+ isCollapse = ( event.type === "collapse" ),
3865
+ contentTheme = o.contentTheme;
3866
+
3681
3867
  collapsibleHeading
3682
- .addClass( "ui-collapsible-heading-collapsed" )
3868
+ .toggleClass( "ui-collapsible-heading-collapsed", isCollapse)
3683
3869
  .find( ".ui-collapsible-heading-status" )
3684
3870
  .text( o.expandCueText )
3685
3871
  .end()
3686
3872
  .find( ".ui-icon" )
3687
- .removeClass( "ui-icon-minus" )
3688
- .addClass( "ui-icon-plus" );
3873
+ .toggleClass( "ui-icon-minus", !isCollapse )
3874
+ .toggleClass( "ui-icon-plus", isCollapse );
3689
3875
 
3690
- collapsibleContent.addClass( "ui-collapsible-content-collapsed" ).attr( "aria-hidden", true );
3876
+ $this.toggleClass( "ui-collapsible-collapsed", isCollapse );
3877
+ collapsibleContent.toggleClass( "ui-collapsible-content-collapsed", isCollapse ).attr( "aria-hidden", isCollapse );
3691
3878
 
3692
- if ( collapsibleContain.jqmData( "collapsible-last" ) ) {
3879
+ if ( contentTheme && ( !collapsibleSet.length || collapsible.jqmData( "collapsible-last" ) ) ) {
3693
3880
  collapsibleHeading
3694
3881
  .find( "a:eq(0), .ui-btn-inner" )
3695
- .addClass( "ui-corner-bottom" );
3696
- }
3697
- }
3698
- })
3699
- .bind( "expand", function( event ) {
3700
- if ( !event.isDefaultPrevented() ) {
3701
-
3702
- event.preventDefault();
3703
-
3704
- collapsibleHeading
3705
- .removeClass( "ui-collapsible-heading-collapsed" )
3706
- .find( ".ui-collapsible-heading-status" ).text( o.collapseCueText );
3707
-
3708
- collapsibleHeading.find( ".ui-icon" ).removeClass( "ui-icon-plus" ).addClass( "ui-icon-minus" );
3709
-
3710
- collapsibleContent.removeClass( "ui-collapsible-content-collapsed" ).attr( "aria-hidden", false );
3711
-
3712
- if ( collapsibleContain.jqmData( "collapsible-last" ) ) {
3713
-
3714
- collapsibleHeading
3715
- .find( "a:eq(0), .ui-btn-inner" )
3716
- .removeClass( "ui-corner-bottom" );
3882
+ .toggleClass( "ui-corner-bottom", isCollapse );
3883
+ collapsibleContent.toggleClass( "ui-corner-bottom", !isCollapse );
3717
3884
  }
3718
3885
  }
3719
3886
  })
3720
3887
  .trigger( o.collapsed ? "collapse" : "expand" );
3721
3888
 
3722
- // Close others in a set
3723
- if ( collapsibleParent.length && !collapsibleParent.jqmData( "collapsiblebound" ) ) {
3724
-
3725
- collapsibleParent
3726
- .jqmData( "collapsiblebound", true )
3727
- .bind( "expand", function( event ) {
3728
-
3729
- $( event.target )
3730
- .closest( ".ui-collapsible-contain" )
3731
- .siblings( ".ui-collapsible-contain" )
3732
- .trigger( "collapse" );
3733
-
3734
- });
3735
-
3736
- var set = collapsibleParent.children( ":jqmData(role='collapsible')" );
3737
-
3738
- set.first()
3739
- .find( "a:eq(0)" )
3740
- .addClass( "ui-corner-top" )
3741
- .find( ".ui-btn-inner" )
3742
- .addClass( "ui-corner-top" );
3743
-
3744
- set.last().jqmData( "collapsible-last", true );
3745
- }
3746
-
3747
3889
  collapsibleHeading
3748
- .bind( "vclick", function( event ) {
3890
+ .bind( "click", function( event ) {
3749
3891
 
3750
3892
  var type = collapsibleHeading.is( ".ui-collapsible-heading-collapsed" ) ?
3751
3893
  "expand" : "collapse";
3752
3894
 
3753
- collapsibleContain.trigger( type );
3895
+ collapsible.trigger( type );
3754
3896
 
3755
3897
  event.preventDefault();
3756
3898
  });
@@ -3965,7 +4107,7 @@ $.widget( "mobile.listview", $.mobile.widget, {
3965
4107
  $li = this.element.children( "li" );
3966
4108
  // at create time the li are not visible yet so we need to rely on .ui-screen-hidden
3967
4109
  $visibleli = create?$li.not( ".ui-screen-hidden" ):$li.filter( ":visible" );
3968
-
4110
+
3969
4111
  this._removeCorners( $li );
3970
4112
 
3971
4113
  // Select the first visible li element
@@ -4092,7 +4234,7 @@ $.widget( "mobile.listview", $.mobile.widget, {
4092
4234
 
4093
4235
  self._itemApply( $list, item );
4094
4236
  }
4095
-
4237
+
4096
4238
  this._refreshCorners( create );
4097
4239
  },
4098
4240
 
@@ -4155,8 +4297,12 @@ $.widget( "mobile.listview", $.mobile.widget, {
4155
4297
 
4156
4298
  }).listview();
4157
4299
 
4158
- //on pagehide, remove any nested pages along with the parent page, as long as they aren't active
4159
- if( hasSubPages && parentPage.data("page").options.domCache === false ){
4300
+ // on pagehide, remove any nested pages along with the parent page, as long as they aren't active
4301
+ // and aren't embedded
4302
+ if( hasSubPages &&
4303
+ parentPage.is( ":jqmData(external-page='true')" ) &&
4304
+ parentPage.data("page").options.domCache === false ) {
4305
+
4160
4306
  var newRemove = function( e, ui ){
4161
4307
  var nextPage = ui.nextPage, npURL;
4162
4308
 
@@ -4308,7 +4454,7 @@ $( ":jqmData(role='listview')" ).live( "listviewcreate", function() {
4308
4454
  });
4309
4455
 
4310
4456
  })( jQuery );/*
4311
- * jQuery Mobile Framework : "fieldcontain" plugin - simple class additions to make form row separators
4457
+ * jQuery Mobile Framework : "nojs" plugin - class to make elements hidden to A grade browsers
4312
4458
  * Copyright (c) jQuery Project
4313
4459
  * Dual licensed under the MIT or GPL Version 2 licenses.
4314
4460
  * http://jquery.org/license
@@ -4538,7 +4684,9 @@ $.widget( "mobile.button", $.mobile.widget, {
4538
4684
  _create: function() {
4539
4685
  var $el = this.element,
4540
4686
  o = this.options,
4541
- type;
4687
+ type,
4688
+ name,
4689
+ $buttonPlaceholder;
4542
4690
 
4543
4691
  // Add ARIA role
4544
4692
  this.button = $( "<div></div>" )
@@ -4555,25 +4703,27 @@ $.widget( "mobile.button", $.mobile.widget, {
4555
4703
  .insertBefore( $el )
4556
4704
  .append( $el.addClass( "ui-btn-hidden" ) );
4557
4705
 
4558
- // Add hidden input during submit
4559
4706
  type = $el.attr( "type" );
4560
-
4561
- if ( type !== "button" && type !== "reset" ) {
4562
-
4563
- $el.bind( "vclick", function() {
4564
-
4565
- var $buttonPlaceholder = $( "<input>", {
4566
- type: "hidden",
4567
- name: $el.attr( "name" ),
4568
- value: $el.attr( "value" )
4569
- })
4570
- .insertBefore( $el );
4571
-
4572
- // Bind to doc to remove after submit handling
4573
- $( document ).submit(function(){
4574
- $buttonPlaceholder.remove();
4707
+ name = $el.attr( "name" );
4708
+
4709
+ // Add hidden input during submit if input type="submit" has a name.
4710
+ if ( type !== "button" && type !== "reset" && name ) {
4711
+ $el.bind( "vclick", function() {
4712
+ // Add hidden input if it doesn’t already exist.
4713
+ if( $buttonPlaceholder === undefined ) {
4714
+ $buttonPlaceholder = $( "<input>", {
4715
+ type: "hidden",
4716
+ name: $el.attr( "name" ),
4717
+ value: $el.attr( "value" )
4718
+ })
4719
+ .insertBefore( $el );
4720
+
4721
+ // Bind to doc to remove after submit handling
4722
+ $( document ).submit(function(){
4723
+ $buttonPlaceholder.remove();
4724
+ });
4725
+ }
4575
4726
  });
4576
- });
4577
4727
  }
4578
4728
 
4579
4729
  this.refresh();
@@ -4893,13 +5043,17 @@ $.widget( "mobile.slider", $.mobile.widget, {
4893
5043
  }
4894
5044
 
4895
5045
  if ( !preventInputUpdate ) {
5046
+ var valueChanged = false;
5047
+
4896
5048
  // update control"s value
4897
5049
  if ( cType === "input" ) {
5050
+ valueChanged = control.val() !== newval;
4898
5051
  control.val( newval );
4899
5052
  } else {
5053
+ valueChanged = control[ 0 ].selectedIndex !== newval;
4900
5054
  control[ 0 ].selectedIndex = newval;
4901
5055
  }
4902
- if ( !isfromControl ) {
5056
+ if ( !isfromControl && valueChanged ) {
4903
5057
  control.trigger( "change" );
4904
5058
  }
4905
5059
  }
@@ -4941,7 +5095,7 @@ $( document ).bind( "pagecreate create", function( e ){
4941
5095
  $.widget( "mobile.textinput", $.mobile.widget, {
4942
5096
  options: {
4943
5097
  theme: null,
4944
- initSelector: "input[type='text'], input[type='search'], :jqmData(type='search'), input[type='number'], :jqmData(type='number'), input[type='password'], input[type='email'], input[type='url'], input[type='tel'], textarea"
5098
+ initSelector: "input[type='text'], input[type='search'], :jqmData(type='search'), input[type='number'], :jqmData(type='number'), input[type='password'], input[type='email'], input[type='url'], input[type='tel'], textarea, input:not([type])"
4945
5099
  },
4946
5100
 
4947
5101
  _create: function() {
@@ -4964,18 +5118,21 @@ $.widget( "mobile.textinput", $.mobile.widget, {
4964
5118
  input.addClass("ui-input-text ui-body-"+ o.theme );
4965
5119
 
4966
5120
  focusedEl = input;
4967
-
4968
- // XXX: Temporary workaround for issue 785. Turn off autocorrect and
4969
- // autocomplete since the popup they use can't be dismissed by
4970
- // the user. Note that we test for the presence of the feature
4971
- // by looking for the autocorrect property on the input element.
4972
- if ( typeof input[0].autocorrect !== "undefined" ) {
5121
+
5122
+ // XXX: Temporary workaround for issue 785 (Apple bug 8910589).
5123
+ // Turn off autocorrect and autocomplete on non-iOS 5 devices
5124
+ // since the popup they use can't be dismissed by the user. Note
5125
+ // that we test for the presence of the feature by looking for
5126
+ // the autocorrect property on the input element. We currently
5127
+ // have no test for iOS 5 or newer so we're temporarily using
5128
+ // the touchOverflow support flag for jQM 1.0. Yes, I feel dirty. - jblas
5129
+ if ( typeof input[0].autocorrect !== "undefined" && !$.support.touchOverflow ) {
4973
5130
  // Set the attribute instead of the property just in case there
4974
5131
  // is code that attempts to make modifications via HTML.
4975
5132
  input[0].setAttribute( "autocorrect", "off" );
4976
5133
  input[0].setAttribute( "autocomplete", "off" );
4977
5134
  }
4978
-
5135
+
4979
5136
 
4980
5137
  //"search" input widget
4981
5138
  if ( input.is( "[type='search'],:jqmData(type='search')" ) ) {
@@ -5056,11 +5213,11 @@ $.widget( "mobile.textinput", $.mobile.widget, {
5056
5213
 
5057
5214
  //auto self-init widgets
5058
5215
  $( document ).bind( "pagecreate create", function( e ){
5059
-
5216
+
5060
5217
  $( $.mobile.textinput.prototype.options.initSelector, e.target )
5061
5218
  .not( ":jqmData(role='none'), :jqmData(role='nojs')" )
5062
5219
  .textinput();
5063
-
5220
+
5064
5221
  });
5065
5222
 
5066
5223
  })( jQuery );
@@ -5079,13 +5236,13 @@ $( document ).bind( "pagecreate create", function( e ){
5079
5236
  label = widget.label,
5080
5237
  thisPage = widget.select.closest( ".ui-page" ),
5081
5238
  screen = $( "<div>", {"class": "ui-selectmenu-screen ui-screen-hidden"} ).appendTo( thisPage ),
5082
- selectOptions = widget.select.find("option"),
5239
+ selectOptions = widget._selectOptions(),
5083
5240
  isMultiple = widget.isMultiple = widget.select[ 0 ].multiple,
5084
5241
  buttonId = selectID + "-button",
5085
5242
  menuId = selectID + "-menu",
5086
5243
  menuPage = $( "<div data-" + $.mobile.ns + "role='dialog' data-" +$.mobile.ns + "theme='"+ widget.options.menuPageTheme +"'>" +
5087
5244
  "<div data-" + $.mobile.ns + "role='header'>" +
5088
- "<div class='ui-title'>" + label.text() + "</div>"+
5245
+ "<div class='ui-title'>" + label.getEncodedText() + "</div>"+
5089
5246
  "</div>"+
5090
5247
  "<div data-" + $.mobile.ns + "role='content'></div>"+
5091
5248
  "</div>" ).appendTo( $.mobile.pageContainer ).page(),
@@ -5174,7 +5331,7 @@ $( document ).bind( "pagecreate create", function( e ){
5174
5331
  // index of option tag to be selected
5175
5332
  var oldIndex = self.select[ 0 ].selectedIndex,
5176
5333
  newIndex = self.list.find( "li:not(.ui-li-divider)" ).index( this ),
5177
- option = self.selectOptions.eq( newIndex )[ 0 ];
5334
+ option = self._selectOptions().eq( newIndex )[ 0 ];
5178
5335
 
5179
5336
  // toggle selected status on the tag for multi selects
5180
5337
  option.selected = self.isMultiple ? !option.selected : true;
@@ -5252,6 +5409,20 @@ $( document ).bind( "pagecreate create", function( e ){
5252
5409
  self.menuPage.bind( "pagehide", function() {
5253
5410
  self.list.appendTo( self.listbox );
5254
5411
  self._focusButton();
5412
+
5413
+ // TODO centralize page removal binding / handling in the page plugin.
5414
+ // Suggestion from @jblas to do refcounting
5415
+ //
5416
+ // TODO extremely confusing dependency on the open method where the pagehide.remove
5417
+ // bindings are stripped to prevent the parent page from disappearing. The way
5418
+ // we're keeping pages in the DOM right now sucks
5419
+ //
5420
+ // rebind the page remove that was unbound in the open function
5421
+ // to allow for the parent page removal from actions other than the use
5422
+ // of a dialog sized custom select
5423
+ //
5424
+ // doing this here provides for the back button on the custom select dialog
5425
+ $.mobile._bindPageRemove.call( self.thisPage );
5255
5426
  });
5256
5427
 
5257
5428
  // Events on "screen" overlay
@@ -5266,18 +5437,32 @@ $( document ).bind( "pagecreate create", function( e ){
5266
5437
  return false;
5267
5438
  }
5268
5439
  });
5440
+
5441
+ // track this dependency so that when the parent page
5442
+ // is removed on pagehide it will also remove the menupage
5443
+ self.thisPage.addDependents( this.menuPage );
5269
5444
  },
5270
5445
 
5271
- refresh: function( forceRebuild ){
5446
+ _isRebuildRequired: function() {
5447
+ var list = this.list.find( "li" ),
5448
+ options = this._selectOptions();
5449
+
5450
+ // TODO exceedingly naive method to determine difference
5451
+ // ignores value changes etc in favor of a forcedRebuild
5452
+ // from the user in the refresh method
5453
+ return options.text() !== list.text();
5454
+ },
5455
+
5456
+ refresh: function( forceRebuild , foo ){
5272
5457
  var self = this,
5273
5458
  select = this.element,
5274
5459
  isMultiple = this.isMultiple,
5275
- options = this.selectOptions = select.find( "option" ),
5460
+ options = this._selectOptions(),
5276
5461
  selected = this.selected(),
5277
5462
  // return an array of all selected index's
5278
5463
  indicies = this.selectedIndices();
5279
5464
 
5280
- if ( forceRebuild || select[0].options.length != self.list.find( "li" ).length ) {
5465
+ if ( forceRebuild || this._isRebuildRequired() ) {
5281
5466
  self._buildList();
5282
5467
  }
5283
5468
 
@@ -5313,18 +5498,6 @@ $( document ).bind( "pagecreate create", function( e ){
5313
5498
  var self = this;
5314
5499
 
5315
5500
  if ( self.menuType == "page" ) {
5316
- // TODO centralize page removal binding / handling in the page plugin.
5317
- // Suggestion from @jblas to do refcounting
5318
- //
5319
- // rebind the page remove that was unbound in the open function
5320
- // to allow for the parent page removal from actions other than the use
5321
- // of a dialog sized custom select
5322
- if( !self.thisPage.data("page").options.domCache ){
5323
- self.thisPage.bind( "pagehide.remove", function() {
5324
- $(self).remove();
5325
- });
5326
- }
5327
-
5328
5501
  // doesn't solve the possible issue with calling change page
5329
5502
  // where the objects don't define data urls which prevents dialog key
5330
5503
  // stripping - changePage has incoming refactor
@@ -5348,7 +5521,10 @@ $( document ).bind( "pagecreate create", function( e ){
5348
5521
  var self = this,
5349
5522
  menuHeight = self.list.parent().outerHeight(),
5350
5523
  menuWidth = self.list.parent().outerWidth(),
5351
- scrollTop = $( window ).scrollTop(),
5524
+ activePage = $( ".ui-page-active" ),
5525
+ tOverflow = $.support.touchOverflow && $.mobile.touchOverflowEnabled,
5526
+ tScrollElem = activePage.is( ".ui-native-fixed" ) ? activePage.find( ".ui-content" ) : activePage;
5527
+ scrollTop = tOverflow ? tScrollElem.scrollTop() : $( window ).scrollTop(),
5352
5528
  btnOffset = self.button.offset().top,
5353
5529
  screenHeight = window.innerHeight,
5354
5530
  screenWidth = window.innerWidth;
@@ -5461,7 +5637,7 @@ $( document ).bind( "pagecreate create", function( e ){
5461
5637
  self.select.find( "option" ).each( function( i ) {
5462
5638
  var $this = $( this ),
5463
5639
  $parent = $this.parent(),
5464
- text = $this.text(),
5640
+ text = $this.getEncodedText(),
5465
5641
  anchor = "<a href='#'>"+ text +"</a>",
5466
5642
  classes = [],
5467
5643
  extraAttrs = [];
@@ -5572,6 +5748,10 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
5572
5748
  },
5573
5749
 
5574
5750
  _theme: function(){
5751
+ if ( this.options.theme ){
5752
+ return this.options.theme;
5753
+ }
5754
+
5575
5755
  var themedParent, theme;
5576
5756
  // if no theme is defined, try to find closest theme container
5577
5757
  // TODO move to core as something like findCurrentTheme
@@ -5597,6 +5777,10 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
5597
5777
  }, 40);
5598
5778
  },
5599
5779
 
5780
+ _selectOptions: function() {
5781
+ return this.select.find( "option" );
5782
+ },
5783
+
5600
5784
  // setup items that are generally necessary for select menu extension
5601
5785
  _preExtension: function(){
5602
5786
  this.select = this.element.wrap( "<div class='ui-select'>" );
@@ -5604,7 +5788,6 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
5604
5788
  this.label = $( "label[for='"+ this.selectID +"']" ).addClass( "ui-select" );
5605
5789
  this.isMultiple = this.select[ 0 ].multiple;
5606
5790
  this.options.theme = this._theme();
5607
- this.selectOptions = this.select.find( "option" );
5608
5791
  },
5609
5792
 
5610
5793
  _create: function() {
@@ -5653,7 +5836,7 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
5653
5836
  this.buttonCount = $( "<span>" )
5654
5837
  .addClass( "ui-li-count ui-btn-up-c ui-btn-corner-all" )
5655
5838
  .hide()
5656
- .appendTo( button );
5839
+ .appendTo( button.addClass('ui-li-has-count') );
5657
5840
  }
5658
5841
 
5659
5842
  // Disable if specified
@@ -5695,14 +5878,14 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
5695
5878
  },
5696
5879
 
5697
5880
  selected: function() {
5698
- return this.selectOptions.filter( ":selected" );
5881
+ return this._selectOptions().filter( ":selected" );
5699
5882
  },
5700
5883
 
5701
5884
  selectedIndices: function() {
5702
5885
  var self = this;
5703
5886
 
5704
5887
  return this.selected().map( function() {
5705
- return self.selectOptions.index( this );
5888
+ return self._selectOptions().index( this );
5706
5889
  }).get();
5707
5890
  },
5708
5891
 
@@ -5734,6 +5917,11 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
5734
5917
  this.setButtonCount();
5735
5918
  },
5736
5919
 
5920
+ // open and close preserved in native selects
5921
+ // to simplify users code when looping over selects
5922
+ open: $.noop,
5923
+ close: $.noop,
5924
+
5737
5925
  disable: function() {
5738
5926
  this._setDisabled( true );
5739
5927
  this.button.addClass( "ui-disabled" );
@@ -5763,7 +5951,12 @@ $( document ).bind( "pagecreate create", function( e ){
5763
5951
  $.fn.buttonMarkup = function( options ) {
5764
5952
  return this.each( function() {
5765
5953
  var el = $( this ),
5766
- o = $.extend( {}, $.fn.buttonMarkup.defaults, el.jqmData(), options ),
5954
+ o = $.extend( {}, $.fn.buttonMarkup.defaults, {
5955
+ icon: el.jqmData( "icon" ),
5956
+ iconpos: el.jqmData( "iconpos" ),
5957
+ theme: el.jqmData( "theme" ),
5958
+ inline: el.jqmData( "inline" )
5959
+ }, options ),
5767
5960
 
5768
5961
  // Classes Defined
5769
5962
  innerClass = "ui-btn-inner",
@@ -5831,6 +6024,7 @@ $.fn.buttonMarkup.defaults = {
5831
6024
  corners: true,
5832
6025
  shadow: true,
5833
6026
  iconshadow: true,
6027
+ inline: false,
5834
6028
  wrapperEls: "span"
5835
6029
  };
5836
6030
 
@@ -5957,7 +6151,7 @@ $( document ).bind( "pagecreate create", function( e ){
5957
6151
  });
5958
6152
 
5959
6153
  })(jQuery);/*
5960
- * jQuery Mobile Framework : "fieldcontain" plugin - simple class additions to make form row separators
6154
+ * jQuery Mobile Framework : "links" plugin - simple class additions for links
5961
6155
  * Copyright (c) jQuery Project
5962
6156
  * Dual licensed under the MIT or GPL Version 2 licenses.
5963
6157
  * http://jquery.org/license
@@ -5992,7 +6186,7 @@ var slideDownClass = "ui-header-fixed ui-fixed-inline fade",
5992
6186
 
5993
6187
  $.fn.fixHeaderFooter = function( options ) {
5994
6188
 
5995
- if ( !$.support.scrollTop ) {
6189
+ if ( !$.support.scrollTop || ( $.support.touchOverflow && $.mobile.touchOverflowEnabled ) ) {
5996
6190
  return this;
5997
6191
  }
5998
6192
 
@@ -6014,7 +6208,7 @@ $.fn.fixHeaderFooter = function( options ) {
6014
6208
  // single controller for all showing,hiding,toggling
6015
6209
  $.mobile.fixedToolbars = (function() {
6016
6210
 
6017
- if ( !$.support.scrollTop || $.support.touchOverflow ) {
6211
+ if ( !$.support.scrollTop || ( $.support.touchOverflow && $.mobile.touchOverflowEnabled ) ) {
6018
6212
  return;
6019
6213
  }
6020
6214
 
@@ -6328,9 +6522,6 @@ $.mobile.fixedToolbars = (function() {
6328
6522
  };
6329
6523
  })();
6330
6524
 
6331
- // TODO - Deprecated namepace on $. Remove in a later release
6332
- $.fixedToolbars = $.mobile.fixedToolbars;
6333
-
6334
6525
  //auto self-init widgets
6335
6526
  $( document ).bind( "pagecreate create", function( event ) {
6336
6527
 
@@ -6338,7 +6529,7 @@ $( document ).bind( "pagecreate create", function( event ) {
6338
6529
 
6339
6530
  $( event.target ).each(function() {
6340
6531
 
6341
- if ( !$.support.scrollTop || $.support.touchOverflow ) {
6532
+ if ( !$.support.scrollTop || ( $.support.touchOverflow && $.mobile.touchOverflowEnabled ) ) {
6342
6533
  return this;
6343
6534
  }
6344
6535
 
@@ -6369,8 +6560,12 @@ $( document ).bind( "pagecreate create", function( event ) {
6369
6560
 
6370
6561
  (function( $, undefined ) {
6371
6562
 
6563
+ // Enable touch overflow scrolling when it's natively supported
6372
6564
  $.mobile.touchOverflowEnabled = false;
6373
6565
 
6566
+ // Enabled zoom when touch overflow is enabled. Can cause usability issues, unfortunately
6567
+ $.mobile.touchOverflowZoomEnabled = false;
6568
+
6374
6569
  $( document ).bind( "pagecreate", function( event ) {
6375
6570
  if( $.support.touchOverflow && $.mobile.touchOverflowEnabled ){
6376
6571
 
@@ -6419,108 +6614,7 @@ $( document ).bind( "pagecreate", function( event ) {
6419
6614
  });
6420
6615
 
6421
6616
  })( jQuery );
6422
- /*
6423
- * jQuery Mobile Framework : resolution and CSS media query related helpers and behavior
6424
- * Copyright (c) jQuery Project
6425
- * Dual licensed under the MIT or GPL Version 2 licenses.
6426
- * http://jquery.org/license
6427
- */
6428
- (function( $, undefined ) {
6429
-
6430
- var $window = $( window ),
6431
- $html = $( "html" ),
6432
-
6433
- //media-query-like width breakpoints, which are translated to classes on the html element
6434
- resolutionBreakpoints = [ 320, 480, 768, 1024 ];
6435
-
6436
- /*
6437
- private function for adding/removing breakpoint classes to HTML element for faux media-query support
6438
- It does not require media query support, instead using JS to detect screen width > cross-browser support
6439
- This function is called on orientationchange, resize, and mobileinit, and is bound via the 'htmlclass' event namespace
6440
- */
6441
- function detectResolutionBreakpoints() {
6442
- var currWidth = $window.width(),
6443
- minPrefix = "min-width-",
6444
- maxPrefix = "max-width-",
6445
- minBreakpoints = [],
6446
- maxBreakpoints = [],
6447
- unit = "px",
6448
- breakpointClasses;
6449
-
6450
- $html.removeClass( minPrefix + resolutionBreakpoints.join(unit + " " + minPrefix) + unit + " " +
6451
- maxPrefix + resolutionBreakpoints.join( unit + " " + maxPrefix) + unit );
6452
-
6453
- $.each( resolutionBreakpoints, function( i, breakPoint ) {
6454
- if( currWidth >= breakPoint ) {
6455
- minBreakpoints.push( minPrefix + breakPoint + unit );
6456
- }
6457
- if( currWidth <= breakPoint ) {
6458
- maxBreakpoints.push( maxPrefix + breakPoint + unit );
6459
- }
6460
- });
6461
-
6462
- if ( minBreakpoints.length ) {
6463
- breakpointClasses = minBreakpoints.join(" ");
6464
- }
6465
- if ( maxBreakpoints.length ) {
6466
- breakpointClasses += " " + maxBreakpoints.join(" ");
6467
- }
6468
-
6469
- $html.addClass( breakpointClasses );
6470
- };
6471
-
6472
- /* $.mobile.addResolutionBreakpoints method:
6473
- pass either a number or an array of numbers and they'll be added to the min/max breakpoint classes
6474
- Examples:
6475
- $.mobile.addResolutionBreakpoints( 500 );
6476
- $.mobile.addResolutionBreakpoints( [500, 1200] );
6477
- */
6478
- $.mobile.addResolutionBreakpoints = function( newbps ) {
6479
- if( $.type( newbps ) === "array" ){
6480
- resolutionBreakpoints = resolutionBreakpoints.concat( newbps );
6481
- } else {
6482
- resolutionBreakpoints.push( newbps );
6483
- }
6484
-
6485
- resolutionBreakpoints.sort(function( a, b ) {
6486
- return a - b;
6487
- });
6488
-
6489
- detectResolutionBreakpoints();
6490
- };
6491
-
6492
- /* on mobileinit, add classes to HTML element
6493
- and set handlers to update those on orientationchange and resize
6494
- */
6495
- $( document ).bind( "mobileinit.htmlclass", function() {
6496
- // bind to orientationchange and resize
6497
- // to add classes to HTML element for min/max breakpoints and orientation
6498
-
6499
- var ev = $.support.orientation;
6500
-
6501
- $window.bind( "orientationchange.htmlclass throttledresize.htmlclass", function( event ) {
6502
-
6503
- // add orientation class to HTML element on flip/resize.
6504
- if ( event.orientation ) {
6505
- $html.removeClass( "portrait landscape" ).addClass( event.orientation );
6506
- }
6507
-
6508
- // add classes to HTML element for min/max breakpoints
6509
- detectResolutionBreakpoints();
6510
- });
6511
- });
6512
-
6513
- /* Manually trigger an orientationchange event when the dom ready event fires.
6514
- This will ensure that any viewport meta tag that may have been injected
6515
- has taken effect already, allowing us to properly calculate the width of the
6516
- document.
6517
- */
6518
- $(function() {
6519
- //trigger event manually
6520
- $window.trigger( "orientationchange.htmlclass" );
6521
- });
6522
-
6523
- })(jQuery);/*!
6617
+ /*!
6524
6618
  * jQuery Mobile v@VERSION
6525
6619
  * http://jquerymobile.com/
6526
6620
  *
@@ -6582,15 +6676,6 @@ $(function() {
6582
6676
  $html.removeClass( "ui-loading" );
6583
6677
  },
6584
6678
 
6585
- // XXX: deprecate for 1.0
6586
- pageLoading: function ( done ) {
6587
- if ( done ) {
6588
- $.mobile.hidePageLoadingMsg();
6589
- } else {
6590
- $.mobile.showPageLoadingMsg();
6591
- }
6592
- },
6593
-
6594
6679
  // find and enhance the pages in the dom and transition to the first page.
6595
6680
  initializePage: function() {
6596
6681
  // find present pages
@@ -6617,6 +6702,10 @@ $(function() {
6617
6702
  // define page container
6618
6703
  $.mobile.pageContainer = $pages.first().parent().addClass( "ui-mobile-viewport" );
6619
6704
 
6705
+ // alert listeners that the pagecontainer has been determined for binding
6706
+ // to events triggered on it
6707
+ $window.trigger( "pagecontainercreate" );
6708
+
6620
6709
  // cue page loading message
6621
6710
  $.mobile.showPageLoadingMsg();
6622
6711
 
@@ -6630,6 +6719,24 @@ $(function() {
6630
6719
  }
6631
6720
  }
6632
6721
  });
6722
+
6723
+ // This function injects a meta viewport tag to prevent scaling. Off by default, on by default when touchOverflow scrolling is enabled
6724
+ function disableZoom() {
6725
+ var cont = "user-scalable=no",
6726
+ meta = $( "meta[name='viewport']" );
6727
+
6728
+ if( meta.length ){
6729
+ meta.attr( "content", meta.attr( "content" ) + ", " + cont );
6730
+ }
6731
+ else{
6732
+ $( "head" ).prepend( "<meta>", { "name": "viewport", "content": cont } );
6733
+ }
6734
+ }
6735
+
6736
+ // if touch-overflow is enabled, disable user scaling, as it creates usability issues
6737
+ if( $.support.touchOverflow && $.mobile.touchOverflowEnabled && !$.mobile.touchOverflowZoomEnabled ){
6738
+ disableZoom();
6739
+ }
6633
6740
 
6634
6741
  // initialize events now, after mobileinit has occurred
6635
6742
  $.mobile._registerInternalEvents();