enju_leaf 1.1.0.rc15 → 1.1.0.rc16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (213) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +2 -2
  3. data/app/assets/javascripts/mobile.js +1 -1
  4. data/app/assets/stylesheets/mobile.css +1 -1
  5. data/app/controllers/my_accounts_controller.rb +5 -5
  6. data/app/controllers/page_controller.rb +10 -2
  7. data/app/models/profile.rb +15 -5
  8. data/app/models/user_export_file.rb +1 -1
  9. data/app/models/user_import_file.rb +2 -2
  10. data/app/views/my_accounts/_edit_credential.html.erb +10 -0
  11. data/app/views/my_accounts/edit.html.erb +2 -4
  12. data/app/views/page/_header.html.erb +3 -3
  13. data/app/views/page/_menu.html.erb +3 -0
  14. data/app/views/page/configuration.html.erb +3 -0
  15. data/app/views/page/opensearch.xml.builder +1 -1
  16. data/app/views/page/system_information.html.erb +23 -0
  17. data/app/views/profiles/_edit_credential.html.erb +10 -0
  18. data/app/views/profiles/edit.html.erb +3 -4
  19. data/app/views/profiles/index.html.erb +4 -4
  20. data/app/views/profiles/new.html.erb +10 -0
  21. data/config/locales/translation_en.yml +3 -0
  22. data/config/locales/translation_ja.yml +3 -0
  23. data/config/routes.rb +1 -0
  24. data/db/migrate/20140524074813_create_user_import_file_transitions.rb +5 -1
  25. data/db/migrate/20140709113905_create_user_export_file_transitions.rb +5 -1
  26. data/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb +5 -0
  27. data/db/migrate/20141003182825_add_date_of_birth_to_profile.rb +5 -0
  28. data/lib/enju_leaf/controller.rb +4 -4
  29. data/lib/enju_leaf/helper.rb +7 -0
  30. data/lib/enju_leaf/version.rb +1 -1
  31. data/lib/enju_leaf.rb +0 -48
  32. data/lib/generators/enju_leaf/quick_install/quick_install_generator.rb +1 -1
  33. data/lib/generators/enju_leaf/setup/setup_generator.rb +9 -0
  34. data/lib/generators/enju_leaf/setup/templates/Procfile +1 -1
  35. data/lib/tasks/enju_leaf_tasks.rake +6 -0
  36. data/lib/tasks/profile.rb +1 -1
  37. data/spec/controllers/page_controller_spec.rb +15 -0
  38. data/spec/dummy/config/database.yml +23 -18
  39. data/spec/dummy/db/migrate/001_create_agents.rb +0 -2
  40. data/spec/dummy/db/migrate/005_create_manifestations.rb +1 -2
  41. data/spec/dummy/db/migrate/006_create_items.rb +0 -2
  42. data/spec/dummy/db/migrate/035_create_reserves.rb +0 -1
  43. data/spec/dummy/db/migrate/133_create_agent_merges.rb +15 -0
  44. data/spec/dummy/db/migrate/134_create_agent_merge_lists.rb +13 -0
  45. data/spec/dummy/db/migrate/20081212080038_create_manifestation_checkout_stats.rb +0 -1
  46. data/spec/dummy/db/migrate/20081212151614_create_bookmark_stats.rb +0 -3
  47. data/spec/dummy/db/migrate/20081215094302_create_user_checkout_stats.rb +0 -1
  48. data/spec/dummy/db/migrate/20081216190724_create_manifestation_reserve_stats.rb +0 -1
  49. data/spec/dummy/db/migrate/20081220023628_create_user_reserve_stats.rb +0 -1
  50. data/spec/dummy/db/migrate/20090321130448_add_completed_at_to_user_checkout_stat.rb +0 -4
  51. data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +0 -1
  52. data/spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb +5 -1
  53. data/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb +5 -1
  54. data/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb +5 -1
  55. data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +5 -1
  56. data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +5 -1
  57. data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +5 -1
  58. data/spec/dummy/db/migrate/20140524135607_create_bookmark_stat_transitions.rb +5 -1
  59. data/spec/dummy/db/migrate/20140528045518_create_user_checkout_stat_transitions.rb +5 -1
  60. data/spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb +5 -1
  61. data/spec/dummy/db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb +5 -1
  62. data/spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb +5 -1
  63. data/spec/dummy/db/migrate/20140529014410_create_item_transitions.rb +5 -1
  64. data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +5 -1
  65. data/spec/dummy/db/migrate/20140720140916_add_binding_item_identifier_to_item.rb +8 -0
  66. data/spec/dummy/db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb +5 -0
  67. data/spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb +6 -0
  68. data/spec/dummy/db/migrate/{20140810061942_add_user_id_to_stat.rb → 20140810061942_add_user_id_to_user_checkout_stat.rb} +1 -1
  69. data/spec/dummy/db/migrate/20140813182425_add_publication_place_to_manifestation.rb +5 -0
  70. data/spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb +5 -0
  71. data/spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb +5 -0
  72. data/spec/dummy/db/migrate/20141014065831_add_shelf_id_to_checkout.rb +6 -0
  73. data/spec/dummy/db/schema.rb +674 -663
  74. data/spec/fixtures/agent_import_results.yml +0 -3
  75. data/spec/fixtures/agents.yml +0 -12
  76. data/spec/fixtures/checked_items.yml +4 -4
  77. data/spec/fixtures/checkouts.yml +12 -12
  78. data/spec/fixtures/manifestation_checkout_stats.yml +0 -3
  79. data/spec/fixtures/manifestation_reserve_stats.yml +0 -3
  80. data/spec/fixtures/manifestations.yml +114 -114
  81. data/spec/fixtures/reserves.yml +17 -17
  82. data/spec/fixtures/user_checkout_stats.yml +0 -3
  83. data/spec/fixtures/user_reserve_stats.yml +0 -3
  84. data/spec/fixtures/users.yml +1 -1
  85. data/spec/spec_helper.rb +2 -0
  86. data/vendor/assets/javascripts/{jquery.mobile-1.4.3.js → jquery.mobile-1.4.4.js} +191 -116
  87. data/vendor/assets/stylesheets/{jquery.mobile-1.4.3.css → jquery.mobile-1.4.4.css} +10 -2
  88. metadata +79 -264
  89. data/app/models/local_patron.rb +0 -27
  90. data/lib/enju_leaf/bookmark_url.rb +0 -45
  91. data/spec/dummy/db/development.sqlite3 +0 -0
  92. data/spec/dummy/db/migrate/20111020063828_remove_dsbl_from_library_group.rb +0 -11
  93. data/spec/dummy/db/migrate/20130303104849_add_state_index_to_reserve.rb +0 -5
  94. data/spec/dummy/db/test.sqlite3 +0 -0
  95. data/spec/dummy/private/system/user_import_files/user_imports/980/190/963/original/user_delete_file.tsv +0 -4
  96. data/spec/dummy/private/system/user_import_files/user_imports/980/190/963/original/user_import_file_sample.tsv +0 -7
  97. data/spec/dummy/private/system/user_import_files/user_imports/980/190/963/original/user_update_file.tsv +0 -4
  98. data/spec/dummy/private/system/user_import_files/user_imports/980/190/964/original/user_delete_file.tsv +0 -4
  99. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140815-3963-1s1td26.txt +0 -8
  100. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140815-69229-i0rcty.txt +0 -8
  101. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140816-21120-1w731r8.txt +0 -8
  102. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140818-59118-14fm7df.txt +0 -8
  103. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140818-59989-vmovk5.txt +0 -8
  104. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140818-75062-kpzjyb.txt +0 -8
  105. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140818-75773-1lhgyub.txt +0 -8
  106. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140818-75927-j8wteq.txt +0 -8
  107. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140820-9103-mfcugd.txt +0 -8
  108. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140822-13160-wz7o56.txt +0 -8
  109. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140824-39018-fw3fdj.txt +0 -8
  110. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140828-69043-tbwoqv.txt +0 -8
  111. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140915-22971-1jmyywh.txt +0 -8
  112. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140915-23153-j4x3ru.txt +0 -8
  113. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140915-67244-1uo8pkb.txt +0 -8
  114. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-80298-14af9pc.txt +0 -8
  115. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-80450-1qhv5cf.txt +0 -8
  116. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-80529-1hahtrn.txt +0 -8
  117. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-80725-tqmhnv.txt +0 -8
  118. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-81018-wl1hgj.txt +0 -8
  119. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-81246-wll5s.txt +0 -8
  120. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-81371-8uz50r.txt +0 -8
  121. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-84122-1u96hw6.txt +0 -8
  122. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140926-7716-bbs13d.txt +0 -8
  123. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20141002-57000-yu6qop.txt +0 -8
  124. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20141002-57206-2j8sg2.txt +0 -8
  125. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20141002-57328-p8lryh.txt +0 -8
  126. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20141002-57609-1j3dd67.txt +0 -8
  127. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20141003-78097-dw5i2k.txt +0 -8
  128. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140711-28652-1dj3e98.txt +0 -148
  129. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140711-29117-13jb6ol.txt +0 -148
  130. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140721-65743-1tnagd4.txt +0 -8
  131. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140815-3963-1kk8o87.txt +0 -8
  132. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140815-69229-188nwub.txt +0 -8
  133. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140816-21120-twzfb6.txt +0 -8
  134. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140818-59118-1lhrtka.txt +0 -8
  135. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140818-59989-1prz707.txt +0 -8
  136. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140818-75062-10bxh78.txt +0 -8
  137. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140818-75773-ekgeho.txt +0 -8
  138. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140818-75927-uay97k.txt +0 -8
  139. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140820-9103-tuuox.txt +0 -8
  140. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140822-13160-17b5dbh.txt +0 -8
  141. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140824-39018-o12xa4.txt +0 -8
  142. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140915-22971-d4ul8o.txt +0 -8
  143. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140915-23153-1qmzqi6.txt +0 -8
  144. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140915-67244-1ps1qsi.txt +0 -8
  145. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-80298-121rh7h.txt +0 -8
  146. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-80450-wdetsg.txt +0 -8
  147. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-80529-lmet02.txt +0 -8
  148. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-80725-1l6tliy.txt +0 -8
  149. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-81018-azm74f.txt +0 -8
  150. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-81246-1rjpksn.txt +0 -8
  151. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-81371-aroaof.txt +0 -8
  152. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-84122-7d6kls.txt +0 -8
  153. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140926-7716-1nap0l.txt +0 -8
  154. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20141002-57000-3nb1bj.txt +0 -8
  155. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20141002-57206-197ca0p.txt +0 -8
  156. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20141002-57328-1kra77f.txt +0 -8
  157. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20141002-57609-iymry0.txt +0 -8
  158. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20141003-78097-1ocngi2.txt +0 -8
  159. data/spec/dummy/solr/conf/admin-extra.html +0 -31
  160. data/spec/dummy/solr/conf/elevate.xml +0 -36
  161. data/spec/dummy/solr/conf/mapping-ISOLatin1Accent.txt +0 -246
  162. data/spec/dummy/solr/conf/protwords.txt +0 -21
  163. data/spec/dummy/solr/conf/schema.xml +0 -255
  164. data/spec/dummy/solr/conf/scripts.conf +0 -24
  165. data/spec/dummy/solr/conf/solrconfig.xml +0 -667
  166. data/spec/dummy/solr/conf/spellings.txt +0 -2
  167. data/spec/dummy/solr/conf/stopwords.txt +0 -58
  168. data/spec/dummy/solr/conf/synonyms.txt +0 -31
  169. data/spec/dummy/solr/default/data/index/_7b.fdt +0 -0
  170. data/spec/dummy/solr/default/data/index/_7b.fdx +0 -0
  171. data/spec/dummy/solr/default/data/index/_7b.fnm +0 -0
  172. data/spec/dummy/solr/default/data/index/_7b.nvd +0 -0
  173. data/spec/dummy/solr/default/data/index/_7b.nvm +0 -0
  174. data/spec/dummy/solr/default/data/index/_7b.si +0 -0
  175. data/spec/dummy/solr/default/data/index/_7b_Lucene41_0.doc +0 -0
  176. data/spec/dummy/solr/default/data/index/_7b_Lucene41_0.pos +0 -0
  177. data/spec/dummy/solr/default/data/index/_7b_Lucene41_0.tim +0 -0
  178. data/spec/dummy/solr/default/data/index/_7b_Lucene41_0.tip +0 -0
  179. data/spec/dummy/solr/default/data/index/segments.gen +0 -0
  180. data/spec/dummy/solr/default/data/index/segments_ev +0 -0
  181. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000524 +0 -0
  182. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000525 +0 -0
  183. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000526 +0 -0
  184. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000527 +0 -0
  185. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000528 +0 -0
  186. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000529 +0 -0
  187. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000530 +0 -0
  188. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000531 +0 -0
  189. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000532 +0 -0
  190. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000533 +0 -0
  191. data/spec/dummy/solr/development/data/index/segments.gen +0 -0
  192. data/spec/dummy/solr/development/data/index/segments_1 +0 -0
  193. data/spec/dummy/solr/solr.xml +0 -8
  194. data/spec/dummy/solr/test/data/index/segments.gen +0 -0
  195. data/spec/dummy/solr/test/data/index/segments_1 +0 -0
  196. data/spec/dummy/tmp/cache/4F7/F90/default_role +0 -0
  197. data/spec/dummy/tmp/cache/ACB/B20/manifestation_search_total +0 -0
  198. data/spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  199. data/spec/dummy/tmp/cache/assets/test/sprockets/154f7b83f2da0e86effbe25f32135177 +0 -0
  200. data/spec/dummy/tmp/cache/assets/test/sprockets/1b984bdbd3204a51a82d0e01a1569e2d +0 -0
  201. data/spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  202. data/spec/dummy/tmp/cache/assets/test/sprockets/3054c50144654f9c7e57bb0639a276e9 +0 -0
  203. data/spec/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  204. data/spec/dummy/tmp/cache/assets/test/sprockets/3bd7a263237ba366f64d938fe5303757 +0 -0
  205. data/spec/dummy/tmp/cache/assets/test/sprockets/62899096da1a3e67660f3b88068be8c9 +0 -0
  206. data/spec/dummy/tmp/cache/assets/test/sprockets/65b2e4f67eab21b30217e29075f433b2 +0 -0
  207. data/spec/dummy/tmp/cache/assets/test/sprockets/87d24a3f43f175d4d17babe9203c79a7 +0 -0
  208. data/spec/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  209. data/spec/dummy/tmp/cache/assets/test/sprockets/d38d8658b30de1d068603968227680d4 +0 -0
  210. data/spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  211. data/spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  212. data/spec/dummy/tmp/cache/stdout +0 -1653
  213. data/spec/dummy/tmp/pids/redis-test.pid +0 -1
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * jQuery Mobile 1.4.3
3
- * Git HEAD hash: b9c6473e3d90af26570e6f14e5a0307897ab385c <> Date: Tue Jul 1 2014 15:37:36 UTC
2
+ * jQuery Mobile 1.4.4
3
+ * Git HEAD hash: b4150fb1c561b614da796c210877fb25e74cf622 <> Date: Fri Sep 12 2014 16:43:26 UTC
4
4
  * http://jquerymobile.com
5
5
  *
6
6
  * Copyright 2010, 2014 jQuery Foundation, Inc. and othercontributors
@@ -30,7 +30,7 @@
30
30
  $.extend( $.mobile, {
31
31
 
32
32
  // Version of the jQuery Mobile Framework
33
- version: "1.4.3",
33
+ version: "1.4.4",
34
34
 
35
35
  // Deprecated and no longer used in 1.4 remove in 1.5
36
36
  // Define the url parameter used for referencing widget-generated sub-pages.
@@ -2476,7 +2476,8 @@ if ( !$.support.boxShadow ) {
2476
2476
 
2477
2477
  //Returns true if both urls have the same domain.
2478
2478
  isSameDomain: function( absUrl1, absUrl2 ) {
2479
- return path.parseUrl( absUrl1 ).domain === path.parseUrl( absUrl2 ).domain;
2479
+ return path.parseUrl( absUrl1 ).domain.toLowerCase() ===
2480
+ path.parseUrl( absUrl2 ).domain.toLowerCase();
2480
2481
  },
2481
2482
 
2482
2483
  //Returns true for any relative variant.
@@ -2523,19 +2524,21 @@ if ( !$.support.boxShadow ) {
2523
2524
  },
2524
2525
 
2525
2526
  convertUrlToDataUrl: function( absUrl ) {
2526
- var u = path.parseUrl( absUrl );
2527
+ var result = absUrl,
2528
+ u = path.parseUrl( absUrl );
2529
+
2527
2530
  if ( path.isEmbeddedPage( u ) ) {
2528
2531
  // For embedded pages, remove the dialog hash key as in getFilePath(),
2529
2532
  // and remove otherwise the Data Url won't match the id of the embedded Page.
2530
- return u.hash
2533
+ result = u.hash
2531
2534
  .split( dialogHashKey )[0]
2532
2535
  .replace( /^#/, "" )
2533
2536
  .replace( /\?.*$/, "" );
2534
2537
  } else if ( path.isSameDomain( u, this.documentBase ) ) {
2535
- return u.hrefNoHash.replace( this.documentBase.domain, "" ).split( dialogHashKey )[0];
2538
+ result = u.hrefNoHash.replace( this.documentBase.domain, "" ).split( dialogHashKey )[0];
2536
2539
  }
2537
2540
 
2538
- return window.decodeURIComponent(absUrl);
2541
+ return window.decodeURIComponent( result );
2539
2542
  },
2540
2543
 
2541
2544
  //get path from current hash, or from a file path
@@ -2584,7 +2587,9 @@ if ( !$.support.boxShadow ) {
2584
2587
  //could be mailto, etc
2585
2588
  isExternal: function( url ) {
2586
2589
  var u = path.parseUrl( url );
2587
- return u.protocol && u.domain !== this.documentUrl.domain ? true : false;
2590
+
2591
+ return !!( u.protocol &&
2592
+ ( u.domain.toLowerCase() !== this.documentUrl.domain.toLowerCase() ) );
2588
2593
  },
2589
2594
 
2590
2595
  hasProtocol: function( url ) {
@@ -2606,14 +2611,25 @@ if ( !$.support.boxShadow ) {
2606
2611
  },
2607
2612
 
2608
2613
  squash: function( url, resolutionUrl ) {
2609
- var href, cleanedUrl, search, stateIndex,
2614
+ var href, cleanedUrl, search, stateIndex, docUrl,
2610
2615
  isPath = this.isPath( url ),
2611
2616
  uri = this.parseUrl( url ),
2612
2617
  preservedHash = uri.hash,
2613
2618
  uiState = "";
2614
2619
 
2615
- // produce a url against which we can resole the provided path
2616
- resolutionUrl = resolutionUrl || (path.isPath(url) ? path.getLocation() : path.getDocumentUrl());
2620
+ // produce a url against which we can resolve the provided path
2621
+ if ( !resolutionUrl ) {
2622
+ if ( isPath ) {
2623
+ resolutionUrl = path.getLocation();
2624
+ } else {
2625
+ docUrl = path.getDocumentUrl( true );
2626
+ if ( path.isPath( docUrl.hash ) ) {
2627
+ resolutionUrl = path.squash( docUrl.href );
2628
+ } else {
2629
+ resolutionUrl = docUrl.href;
2630
+ }
2631
+ }
2632
+ }
2617
2633
 
2618
2634
  // If the url is anything but a simple string, remove any preceding hash
2619
2635
  // eg #foo/bar -> foo/bar
@@ -2682,11 +2698,10 @@ if ( !$.support.boxShadow ) {
2682
2698
  return ( hasHash ? "#" : "" ) + hash.replace( /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g, "\\$1" );
2683
2699
  },
2684
2700
 
2685
- // return the substring of a filepath before the sub-page key, for making
2686
- // a server request
2701
+ // return the substring of a filepath before the dialogHashKey, for making a server
2702
+ // request
2687
2703
  getFilePath: function( path ) {
2688
- var splitkey = "&" + $.mobile.subPageUrlKey;
2689
- return path && path.split( splitkey )[0].split( dialogHashKey )[0];
2704
+ return path && path.split( dialogHashKey )[0];
2690
2705
  },
2691
2706
 
2692
2707
  // check if the specified url refers to the first page in the main
@@ -4023,7 +4038,7 @@ if ( eventCaptureSupported ) {
4023
4038
  emitted = false;
4024
4039
 
4025
4040
  context.move = function( event ) {
4026
- if ( !start ) {
4041
+ if ( !start || event.isDefaultPrevented() ) {
4027
4042
  return;
4028
4043
  }
4029
4044
 
@@ -4670,9 +4685,8 @@ $.widget( "mobile.page", {
4670
4685
  return $.mobile.navigate.history;
4671
4686
  },
4672
4687
 
4673
- // TODO use _getHistory
4674
4688
  _getActiveHistory: function() {
4675
- return $.mobile.navigate.history.getActive();
4689
+ return this._getHistory().getActive();
4676
4690
  },
4677
4691
 
4678
4692
  // TODO the document base should be determined at creation
@@ -4732,28 +4746,26 @@ $.widget( "mobile.page", {
4732
4746
  //
4733
4747
  // TODO move check to history object or path object?
4734
4748
  to = !$.mobile.path.isPath( to ) ? ( $.mobile.path.makeUrlAbsolute( "#" + to, this._getDocumentBase() ) ) : to;
4735
-
4736
- // If we're about to go to an initial URL that contains a
4737
- // reference to a non-existent internal page, go to the first
4738
- // page instead. We know that the initial hash refers to a
4739
- // non-existent page, because the initial hash did not end
4740
- // up in the initial history entry
4741
- // TODO move check to history object?
4742
- if ( to === $.mobile.path.makeUrlAbsolute( "#" + history.initialDst, this._getDocumentBase() ) &&
4743
- history.stack.length &&
4744
- history.stack[0].url !== history.initialDst.replace( $.mobile.dialogHashKey, "" ) ) {
4745
- to = this._getInitialContent();
4746
- }
4747
4749
  }
4748
4750
  return to || this._getInitialContent();
4749
4751
  },
4750
4752
 
4753
+ _transitionFromHistory: function( direction, defaultTransition ) {
4754
+ var history = this._getHistory(),
4755
+ entry = ( direction === "back" ? history.getLast() : history.getActive() );
4756
+
4757
+ return ( entry && entry.transition ) || defaultTransition;
4758
+ },
4759
+
4751
4760
  _handleDialog: function( changePageOptions, data ) {
4752
4761
  var to, active, activeContent = this.getActivePage();
4753
4762
 
4754
4763
  // If current active page is not a dialog skip the dialog and continue
4755
4764
  // in the same direction
4756
- if ( activeContent && !activeContent.hasClass( "ui-dialog" ) ) {
4765
+ // Note: The dialog widget is deprecated as of 1.4.0 and will be removed in 1.5.0.
4766
+ // Thus, as of 1.5.0 activeContent.data( "mobile-dialog" ) will always evaluate to
4767
+ // falsy, so the second condition in the if-statement below can be removed altogether.
4768
+ if ( activeContent && !activeContent.data( "mobile-dialog" ) ) {
4757
4769
  // determine if we're heading forward or backward and continue
4758
4770
  // accordingly past the current dialog
4759
4771
  if ( data.direction === "back" ) {
@@ -4774,7 +4786,9 @@ $.widget( "mobile.page", {
4774
4786
  // as most of this is lost by the domCache cleaning
4775
4787
  $.extend( changePageOptions, {
4776
4788
  role: active.role,
4777
- transition: active.transition,
4789
+ transition: this._transitionFromHistory(
4790
+ data.direction,
4791
+ changePageOptions.transition ),
4778
4792
  reverse: data.direction === "back"
4779
4793
  });
4780
4794
  }
@@ -4789,7 +4803,8 @@ $.widget( "mobile.page", {
4789
4803
 
4790
4804
  // transition is false if it's the first page, undefined
4791
4805
  // otherwise (and may be overridden by default)
4792
- transition = history.stack.length === 0 ? "none" : undefined,
4806
+ transition = history.stack.length === 0 ? "none" :
4807
+ this._transitionFromHistory( data.direction ),
4793
4808
 
4794
4809
  // default options for the changPage calls made after examining
4795
4810
  // the current state of the page and the hash, NOTE that the
@@ -4801,7 +4816,7 @@ $.widget( "mobile.page", {
4801
4816
  };
4802
4817
 
4803
4818
  $.extend( changePageOptions, data, {
4804
- transition: ( history.getLast() || {} ).transition || transition
4819
+ transition: transition
4805
4820
  });
4806
4821
 
4807
4822
  // TODO move to _handleDestination ?
@@ -4809,8 +4824,7 @@ $.widget( "mobile.page", {
4809
4824
  // key, and the initial destination isn't equal to the current target
4810
4825
  // page, use the special dialog handling
4811
4826
  if ( history.activeIndex > 0 &&
4812
- to.indexOf( $.mobile.dialogHashKey ) > -1 &&
4813
- history.initialDst !== to ) {
4827
+ to.indexOf( $.mobile.dialogHashKey ) > -1 ) {
4814
4828
 
4815
4829
  to = this._handleDialog( changePageOptions, data );
4816
4830
 
@@ -4861,7 +4875,8 @@ $.widget( "mobile.page", {
4861
4875
  // NOTE do _not_ use the :jqmData pseudo selector because parenthesis
4862
4876
  // are a valid url char and it breaks on the first occurence
4863
4877
  page = this.element
4864
- .children( "[data-" + this._getNs() +"url='" + dataUrl + "']" );
4878
+ .children( "[data-" + this._getNs() +
4879
+ "url='" + $.mobile.path.hashToSelector( dataUrl ) + "']" );
4865
4880
 
4866
4881
  // If we failed to find the page, check to see if the url is a
4867
4882
  // reference to an embedded page. If so, it may have been dynamically
@@ -4946,7 +4961,7 @@ $.widget( "mobile.page", {
4946
4961
  // TODO tagging a page with external to make sure that embedded pages aren't
4947
4962
  // removed by the various page handling code is bad. Having page handling code
4948
4963
  // in many places is bad. Solutions post 1.0
4949
- page.attr( "data-" + this._getNs() + "url", $.mobile.path.convertUrlToDataUrl(fileUrl) )
4964
+ page.attr( "data-" + this._getNs() + "url", this._createDataUrl( fileUrl ) )
4950
4965
  .attr( "data-" + this._getNs() + "external-page", true );
4951
4966
 
4952
4967
  return page;
@@ -4995,8 +5010,7 @@ $.widget( "mobile.page", {
4995
5010
  // or require ordering such that other bits are sprinkled in between parts that
4996
5011
  // could be abstracted out as a group
4997
5012
  _loadSuccess: function( absUrl, triggerData, settings, deferred ) {
4998
- var fileUrl = this._createFileUrl( absUrl ),
4999
- dataUrl = this._createDataUrl( absUrl );
5013
+ var fileUrl = this._createFileUrl( absUrl );
5000
5014
 
5001
5015
  return $.proxy(function( html, textStatus, xhr ) {
5002
5016
  //pre-parse html to check for a data-url,
@@ -5016,6 +5030,11 @@ $.widget( "mobile.page", {
5016
5030
  dataUrlRegex.test( RegExp.$1 ) &&
5017
5031
  RegExp.$1 ) {
5018
5032
  fileUrl = $.mobile.path.getFilePath( $("<div>" + RegExp.$1 + "</div>").text() );
5033
+
5034
+ // We specify that, if a data-url attribute is given on the page div, its value
5035
+ // must be given non-URL-encoded. However, in this part of the code, fileUrl is
5036
+ // assumed to be URL-encoded, so we URL-encode the retrieved value here
5037
+ fileUrl = this.window[ 0 ].encodeURIComponent( fileUrl );
5019
5038
  }
5020
5039
 
5021
5040
  //dont update the base tag if we are prefetching
@@ -5042,7 +5061,7 @@ $.widget( "mobile.page", {
5042
5061
  // Note that it is the responsibility of the listener/handler
5043
5062
  // that called preventDefault(), to resolve/reject the
5044
5063
  // deferred object within the triggerData.
5045
- if ( this._triggerWithDeprecated( "load" ).event.isDefaultPrevented() ) {
5064
+ if ( this._triggerWithDeprecated( "load", triggerData ).event.isDefaultPrevented() ) {
5046
5065
  return;
5047
5066
  }
5048
5067
 
@@ -5053,13 +5072,6 @@ $.widget( "mobile.page", {
5053
5072
 
5054
5073
  this._include( content, settings );
5055
5074
 
5056
- // Enhancing the content may result in new dialogs/sub content being inserted
5057
- // into the DOM. If the original absUrl refers to a sub-content, that is the
5058
- // real content we are interested in.
5059
- if ( absUrl.indexOf( "&" + $.mobile.subPageUrlKey ) > -1 ) {
5060
- content = this.element.children( "[data-" + this._getNs() +"url='" + dataUrl + "']" );
5061
- }
5062
-
5063
5075
  // Remove loading message.
5064
5076
  if ( settings.showLoadMsg ) {
5065
5077
  this._hideLoading();
@@ -5587,12 +5599,6 @@ $.widget( "mobile.page", {
5587
5599
  } else {
5588
5600
  url += "#" + $.mobile.dialogHashKey;
5589
5601
  }
5590
-
5591
- // tack on another dialogHashKey if this is the same as the initial hash
5592
- // this makes sure that a history entry is created for this dialog
5593
- if ( $.mobile.navigate.history.activeIndex === 0 && url === $.mobile.navigate.history.initialDst ) {
5594
- url += $.mobile.dialogHashKey;
5595
- }
5596
5602
  }
5597
5603
 
5598
5604
  // if title element wasn't found, try the page div data attr too
@@ -5635,7 +5641,7 @@ $.widget( "mobile.page", {
5635
5641
  };
5636
5642
 
5637
5643
  if ( settings.changeHash !== false && $.mobile.hashListeningEnabled ) {
5638
- $.mobile.navigate( url, params, true);
5644
+ $.mobile.navigate( this.window[ 0 ].encodeURI( url ), params, true);
5639
5645
  } else if ( toPage[ 0 ] !== $.mobile.firstPage[ 0 ] ) {
5640
5646
  $.mobile.navigate.history.add( url, params );
5641
5647
  }
@@ -6048,9 +6054,10 @@ $.widget( "mobile.page", {
6048
6054
  // lists and select dialogs, just write a hash in the link they
6049
6055
  // create. This means the actual URL path is based on whatever
6050
6056
  // the current value of the base tag is at the time this code
6051
- // is called. For now we are just assuming that any url with a
6052
- // hash in it is an application page reference.
6053
- if ( href.search( "#" ) !== -1 ) {
6057
+ // is called.
6058
+ if ( href.search( "#" ) !== -1 &&
6059
+ !( $.mobile.path.isExternal( href ) && $.mobile.path.isAbsoluteUrl( href ) ) ) {
6060
+
6054
6061
  href = href.replace( /[^#]*#/, "" );
6055
6062
  if ( !href ) {
6056
6063
  //link was an empty hash meant purely
@@ -6831,9 +6838,9 @@ $.widget( "mobile.collapsible", {
6831
6838
  this._renderedOptions = this._getOptions( this.options );
6832
6839
 
6833
6840
  if ( this.options.enhanced ) {
6834
- ui.heading = $( ".ui-collapsible-heading", this.element[ 0 ] );
6841
+ ui.heading = this.element.children( ".ui-collapsible-heading" );
6835
6842
  ui.content = ui.heading.next();
6836
- ui.anchor = $( "a", ui.heading[ 0 ] ).first();
6843
+ ui.anchor = ui.heading.children();
6837
6844
  ui.status = ui.anchor.children( ".ui-collapsible-heading-status" );
6838
6845
  } else {
6839
6846
  this._enhance( elem, ui );
@@ -7367,7 +7374,7 @@ $.widget( "mobile.navbar", {
7367
7374
  _create: function() {
7368
7375
 
7369
7376
  var $navbar = this.element,
7370
- $navbtns = $navbar.find( "a" ),
7377
+ $navbtns = $navbar.find( "a, button" ),
7371
7378
  iconpos = $navbtns.filter( ":jqmData(icon)" ).length ? this.options.iconpos : undefined;
7372
7379
 
7373
7380
  $navbar.addClass( "ui-navbar" )
@@ -8023,14 +8030,13 @@ $.widget( "mobile.checkboxradio", $.extend( {
8023
8030
  },
8024
8031
 
8025
8032
  refresh: function() {
8026
- var hasIcon = this._hasIcon(),
8027
- isChecked = this.element[ 0 ].checked,
8033
+ var isChecked = this.element[ 0 ].checked,
8028
8034
  active = $.mobile.activeBtnClass,
8029
8035
  iconposClass = "ui-btn-icon-" + this.options.iconpos,
8030
8036
  addClasses = [],
8031
8037
  removeClasses = [];
8032
8038
 
8033
- if ( hasIcon ) {
8039
+ if ( this._hasIcon() ) {
8034
8040
  removeClasses.push( active );
8035
8041
  addClasses.push( iconposClass );
8036
8042
  } else {
@@ -8046,6 +8052,8 @@ $.widget( "mobile.checkboxradio", $.extend( {
8046
8052
  removeClasses.push( this.checkedClass );
8047
8053
  }
8048
8054
 
8055
+ this.widget().toggleClass( "ui-state-disabled", this.element.prop( "disabled" ) );
8056
+
8049
8057
  this.label
8050
8058
  .addClass( addClasses.join( " " ) )
8051
8059
  .removeClass( removeClasses.join( " " ) );
@@ -8161,8 +8169,8 @@ $.widget( "mobile.button", {
8161
8169
  },
8162
8170
 
8163
8171
  _destroy: function() {
8164
- this.element.insertBefore( this.button );
8165
- this.button.remove();
8172
+ this.element.insertBefore( this.wrapper );
8173
+ this.wrapper.remove();
8166
8174
  },
8167
8175
 
8168
8176
  _getIconClasses: function( options ) {
@@ -8959,7 +8967,7 @@ $.widget( "mobile.slider", $.extend( {
8959
8967
 
8960
8968
  // update control"s value
8961
8969
  if ( isInput ) {
8962
- valueChanged = control.val() !== newval;
8970
+ valueChanged = parseFloat( control.val() ) !== newval;
8963
8971
  control.val( newval );
8964
8972
  } else {
8965
8973
  valueChanged = control[ 0 ].selectedIndex !== newval;
@@ -9030,6 +9038,8 @@ $.widget( "mobile.slider", $.extend( {
9030
9038
  this.slider
9031
9039
  .toggleClass( "ui-state-disabled", value )
9032
9040
  .attr( "aria-disabled", value );
9041
+
9042
+ this.element.toggleClass( "ui-state-disabled", value );
9033
9043
  }
9034
9044
 
9035
9045
  }, $.mobile.behaviors.formReset ) );
@@ -9453,6 +9463,7 @@ $.widget( "mobile.flipswitch", $.extend({
9453
9463
  //if the first handle is dragged send the event to the first slider
9454
9464
  $.data( this._inputFirst.get(0), "mobile-slider" ).dragging = true;
9455
9465
  $.data( this._inputFirst.get(0), "mobile-slider" ).refresh( event );
9466
+ $.data( this._inputFirst.get(0), "mobile-slider" )._trigger( "start" );
9456
9467
  return false;
9457
9468
  },
9458
9469
 
@@ -9505,6 +9516,11 @@ $.widget( "mobile.flipswitch", $.extend({
9505
9516
  if ( options.highlight !== undefined ) {
9506
9517
  this._setHighlight( options.highlight );
9507
9518
  }
9519
+
9520
+ if ( options.disabled !== undefined ) {
9521
+ this._setDisabled( options.disabled );
9522
+ }
9523
+
9508
9524
  this._super( options );
9509
9525
  this.refresh();
9510
9526
  },
@@ -9611,6 +9627,11 @@ $.widget( "mobile.flipswitch", $.extend({
9611
9627
  this._inputLast.slider( "option", "highlight", value );
9612
9628
  },
9613
9629
 
9630
+ _setDisabled: function( value ) {
9631
+ this._inputFirst.prop( "disabled", value );
9632
+ this._inputLast.prop( "disabled", value );
9633
+ },
9634
+
9614
9635
  _destroy: function() {
9615
9636
  this._label.prependTo( this.element );
9616
9637
  this.element.removeClass( "ui-rangeslider ui-mini" );
@@ -9635,16 +9656,21 @@ $.widget( "mobile.flipswitch", $.extend({
9635
9656
  _create: function() {
9636
9657
  this._super();
9637
9658
 
9638
- if ( !!this.options.clearBtn || this.isSearch ) {
9659
+ if ( this.isSearch ) {
9660
+ this.options.clearBtn = true;
9661
+ }
9662
+
9663
+ if ( !!this.options.clearBtn && this.inputNeedsWrap ) {
9639
9664
  this._addClearBtn();
9640
9665
  }
9641
9666
  },
9642
9667
 
9643
9668
  clearButton: function() {
9644
-
9645
- return $( "<a href='#' class='ui-input-clear ui-btn ui-icon-delete ui-btn-icon-notext ui-corner-all" +
9646
- "' title='" + this.options.clearBtnText + "'>" + this.options.clearBtnText + "</a>" );
9647
-
9669
+ return $( "<a href='#' tabindex='-1' aria-hidden='true' " +
9670
+ "class='ui-input-clear ui-btn ui-icon-delete ui-btn-icon-notext ui-corner-all'>" +
9671
+ "</a>" )
9672
+ .attr( "title", this.options.clearBtnText )
9673
+ .text( this.options.clearBtnText );
9648
9674
  },
9649
9675
 
9650
9676
  _clearBtnClick: function( event ) {
@@ -9737,7 +9763,9 @@ $.widget( "mobile.flipswitch", $.extend({
9737
9763
 
9738
9764
  _destroy: function() {
9739
9765
  this._super();
9740
- this._destroyClear();
9766
+ if ( this.options.clearBtn ) {
9767
+ this._destroyClear();
9768
+ }
9741
9769
  }
9742
9770
 
9743
9771
  });
@@ -9803,7 +9831,7 @@ $.widget( "mobile.flipswitch", $.extend({
9803
9831
  }, this ),
9804
9832
  "transition" );
9805
9833
  }
9806
- this._timeout();
9834
+ this._prepareHeightUpdate();
9807
9835
  }
9808
9836
  },
9809
9837
 
@@ -10496,7 +10524,9 @@ $.widget( "mobile.popup", {
10496
10524
  target = $( targetElement );
10497
10525
  if ( 0 === target.parents().filter( ui.container[ 0 ] ).length ) {
10498
10526
  $( this.document[ 0 ].activeElement ).one( "focus", function(/* theEvent */) {
10499
- target.blur();
10527
+ if ( targetElement.nodeName.toLowerCase() !== "body" ) {
10528
+ target.blur();
10529
+ }
10500
10530
  });
10501
10531
  ui.focusElement.focus();
10502
10532
  theEvent.preventDefault();
@@ -11100,11 +11130,6 @@ $.widget( "mobile.popup", {
11100
11130
  url = $.mobile.path.parseLocation().hash + hashkey;
11101
11131
  }
11102
11132
 
11103
- // Tack on an extra hashkey if this is the first page and we've just reconstructed the initial hash
11104
- if ( urlHistory.activeIndex === 0 && url === urlHistory.initialDst ) {
11105
- url += hashkey;
11106
- }
11107
-
11108
11133
  // swallow the the initial navigation event, and bind for the next
11109
11134
  this.window.one( "beforenavigate", function( theEvent ) {
11110
11135
  theEvent.preventDefault();
@@ -11618,10 +11643,15 @@ $.widget( "mobile.selectmenu", $.mobile.selectmenu, {
11618
11643
  }
11619
11644
 
11620
11645
  parent = option.parentNode;
11621
- text = $option.getEncodedText();
11622
- anchor = document.createElement( "a" );
11623
11646
  classes = [];
11624
11647
 
11648
+ // Although using .text() here raises the risk that, when we later paste this into the
11649
+ // list item we end up pasting possibly malicious things like <script> tags, that risk
11650
+ // only arises if we do something like $( "<li><a href='#'>" + text + "</a></li>" ). We
11651
+ // don't do that. We do document.createTextNode( text ) instead, which guarantees that
11652
+ // whatever we paste in will end up as text, with characters like <, > and & escaped.
11653
+ text = $option.text();
11654
+ anchor = document.createElement( "a" );
11625
11655
  anchor.setAttribute( "href", "#" );
11626
11656
  anchor.appendChild( document.createTextNode( text ) );
11627
11657
 
@@ -11992,7 +12022,7 @@ $.fn.buttonMarkup.defaults = {
11992
12022
  };
11993
12023
 
11994
12024
  $.extend( $.fn.buttonMarkup, {
11995
- initSelector: "a:jqmData(role='button'), .ui-bar > a, .ui-bar > :jqmData(role='controlgroup') > a, button"
12025
+ initSelector: "a:jqmData(role='button'), .ui-bar > a, .ui-bar > :jqmData(role='controlgroup') > a, button:not(:jqmData(role='navbar') button)"
11996
12026
  });
11997
12027
 
11998
12028
  })( jQuery );
@@ -12300,7 +12330,7 @@ $.widget( "mobile.controlgroup", $.extend( {
12300
12330
 
12301
12331
  // Skip back button creation if one is already present
12302
12332
  if ( !backButton.attached ) {
12303
- backButton.element = ( backButton.element ||
12333
+ this.backButton = backButton.element = ( backButton.element ||
12304
12334
  $( "<a role='button' href='javascript:void(0);' " +
12305
12335
  "class='ui-btn ui-corner-all ui-shadow ui-btn-left " +
12306
12336
  ( theme ? "ui-btn-" + theme + " " : "" ) +
@@ -12325,6 +12355,27 @@ $.widget( "mobile.controlgroup", $.extend( {
12325
12355
  "role": "heading",
12326
12356
  "aria-level": "1"
12327
12357
  });
12358
+ },
12359
+ _destroy: function() {
12360
+ var currentTheme;
12361
+
12362
+ this.element.children( "h1, h2, h3, h4, h5, h6" )
12363
+ .removeClass( "ui-title" )
12364
+ .removeAttr( "role" )
12365
+ .removeAttr( "aria-level" );
12366
+
12367
+ if ( this.role === "header" ) {
12368
+ this.element.children( "a, button" )
12369
+ .removeClass( "ui-btn-left ui-btn-right ui-btn ui-shadow ui-corner-all" );
12370
+ if ( this.backButton) {
12371
+ this.backButton.remove();
12372
+ }
12373
+ }
12374
+
12375
+ currentTheme = this.options.theme ? this.options.theme : "inherit";
12376
+ this.element.removeClass( "ui-bar-" + currentTheme );
12377
+
12378
+ this.element.removeClass( "ui-" + this.role ).removeAttr( "role" );
12328
12379
  }
12329
12380
  });
12330
12381
 
@@ -12358,6 +12409,7 @@ $.widget( "mobile.controlgroup", $.extend( {
12358
12409
 
12359
12410
  _create: function() {
12360
12411
  this._super();
12412
+ this.pagecontainer = $( ":mobile-pagecontainer" );
12361
12413
  if ( this.options.position === "fixed" && !this.options.supportBlacklist() ) {
12362
12414
  this._makeFixed();
12363
12415
  }
@@ -12600,12 +12652,30 @@ $.widget( "mobile.controlgroup", $.extend( {
12600
12652
  },
12601
12653
 
12602
12654
  _destroy: function() {
12603
- var $el = this.element,
12604
- header = $el.hasClass( "ui-header" );
12655
+ var pageClasses, toolbarClasses, hasFixed, header, hasFullscreen,
12656
+ page = this.pagecontainer.pagecontainer( "getActivePage" );
12605
12657
 
12606
- $el.closest( ".ui-page" ).css( "padding-" + ( header ? "top" : "bottom" ), "" );
12607
- $el.removeClass( "ui-header-fixed ui-footer-fixed ui-header-fullscreen ui-footer-fullscreen in out fade slidedown slideup ui-fixed-hidden" );
12608
- $el.closest( ".ui-page" ).removeClass( "ui-page-header-fixed ui-page-footer-fixed ui-page-header-fullscreen ui-page-footer-fullscreen" );
12658
+ this._super();
12659
+ if ( this.options.position === "fixed" ) {
12660
+ hasFixed = $( "body>.ui-" + this.role + "-fixed" )
12661
+ .add( page.find( ".ui-" + this.options.role + "-fixed" ) )
12662
+ .not( this.element ).length > 0;
12663
+ hasFullscreen = $( "body>.ui-" + this.role + "-fixed" )
12664
+ .add( page.find( ".ui-" + this.options.role + "-fullscreen" ) )
12665
+ .not( this.element ).length > 0;
12666
+ toolbarClasses = "ui-header-fixed ui-footer-fixed ui-header-fullscreen in out" +
12667
+ " ui-footer-fullscreen fade slidedown slideup ui-fixed-hidden";
12668
+ this.element.removeClass( toolbarClasses );
12669
+ if ( !hasFullscreen ) {
12670
+ pageClasses = "ui-page-" + this.role + "-fullscreen";
12671
+ }
12672
+ if ( !hasFixed ) {
12673
+ header = this.role === "header";
12674
+ pageClasses += " ui-page-" + this.role + "-fixed";
12675
+ page.css( "padding-" + ( header ? "top" : "bottom" ), "" );
12676
+ }
12677
+ page.removeClass( pageClasses );
12678
+ }
12609
12679
  }
12610
12680
 
12611
12681
  });
@@ -13808,6 +13878,9 @@ $.widget( "mobile.table", $.mobile.table, {
13808
13878
  },
13809
13879
 
13810
13880
  _addLabels: function( cells, label, contents ) {
13881
+ if ( contents.length === 1 && contents[ 0 ].nodeName.toLowerCase() === "abbr" ) {
13882
+ contents = contents.eq( 0 ).attr( "title" );
13883
+ }
13811
13884
  // .not fixes #6006
13812
13885
  cells
13813
13886
  .not( ":has(b." + label + ")" )
@@ -14188,6 +14261,24 @@ $.widget( "mobile.filterable", $.mobile.filterable, {
14188
14261
  return ret;
14189
14262
  },
14190
14263
 
14264
+ // The listview implementation accompanying this filterable backcompat layer will call
14265
+ // filterable.refresh() after it's done refreshing the listview to make sure the filterable
14266
+ // filters out any new items added. However, when the listview refresh has been initiated by
14267
+ // the filterable itself, then such filtering has already taken place, and calling the
14268
+ // filterable's refresh() method will cause an infinite recursion. We stop this by setting a
14269
+ // flag that will cause the filterable's refresh() method to short-circuit.
14270
+ _refreshChildWidget: function() {
14271
+ this._refreshingChildWidget = true;
14272
+ this._superApply( arguments );
14273
+ this._refreshingChildWidget = false;
14274
+ },
14275
+
14276
+ refresh: function() {
14277
+ if ( !this._refreshingChildWidget ) {
14278
+ this._superApply( arguments );
14279
+ }
14280
+ },
14281
+
14191
14282
  _destroy: function() {
14192
14283
  if ( this._isSearchInternal() ) {
14193
14284
  this._search.remove();
@@ -14235,29 +14326,18 @@ $.widget( "mobile.listview", $.mobile.listview, {
14235
14326
  return this._super();
14236
14327
  },
14237
14328
 
14238
- _afterListviewRefresh: function() {
14239
- var filterable = this.element.data( "mobile-filterable" );
14240
-
14241
- if ( this.options.filter === true && filterable ) {
14242
- this._preventRefreshLoop = true;
14243
- filterable.refresh();
14244
- }
14245
- },
14246
-
14247
- // Eliminate infinite recursion caused by the fact that we call filterable.refresh() from
14248
- // _afterListviewRefresh() above, which, in turn, calls _refreshChildWidget(), which, in
14249
- // turn, calls listview refresh(), which would, in turn, calls _afterListviewRefresh()
14250
- // above, if we wouldn't prevent that right here.
14251
14329
  refresh: function() {
14252
- var returnValue;
14330
+ var filterable;
14253
14331
 
14254
- if ( !this._preventRefreshLoop ) {
14255
- returnValue = this._superApply( arguments );
14256
- }
14332
+ this._superApply( arguments );
14257
14333
 
14258
- this._preventRefreshLoop = false;
14334
+ if ( this.options.filter === true ) {
14335
+ filterable = this.element.data( "mobile-filterable" );
14259
14336
 
14260
- return returnValue;
14337
+ if ( filterable ) {
14338
+ filterable.refresh();
14339
+ }
14340
+ }
14261
14341
  }
14262
14342
  });
14263
14343
 
@@ -15196,7 +15276,7 @@ $.widget( "ui.tabs", {
15196
15276
  $pages = $( ":jqmData(role='page'), :jqmData(role='dialog')" ),
15197
15277
  hash = path.stripHash( path.stripQueryParams(path.parseLocation().hash) ),
15198
15278
  theLocation = $.mobile.path.parseLocation(),
15199
- hashPage = document.getElementById( hash );
15279
+ hashPage = hash ? document.getElementById( hash ) : undefined;
15200
15280
 
15201
15281
  // if no pages are found, create one with body's inner html
15202
15282
  if ( !$pages.length ) {
@@ -15210,7 +15290,7 @@ $.widget( "ui.tabs", {
15210
15290
  // unless the data url is already set set it to the pathname
15211
15291
  if ( !$this[ 0 ].getAttribute( "data-" + $.mobile.ns + "url" ) ) {
15212
15292
  $this.attr( "data-" + $.mobile.ns + "url", $this.attr( "id" ) ||
15213
- theLocation.pathname + theLocation.search );
15293
+ path.convertUrlToDataUrl( theLocation.pathname + theLocation.search ) );
15214
15294
  }
15215
15295
  });
15216
15296
 
@@ -15247,11 +15327,6 @@ $.widget( "ui.tabs", {
15247
15327
  $.mobile.path.isPath( hash ) ||
15248
15328
  hash === $.mobile.dialogHashKey ) ) ) {
15249
15329
 
15250
- // Store the initial destination
15251
- if ( $.mobile.path.isHashValid( location.hash ) ) {
15252
- $.mobile.navigate.history.initialDst = hash.replace( "#", "" );
15253
- }
15254
-
15255
15330
  // make sure to set initial popstate state if it exists
15256
15331
  // so that navigation back to the initial page works properly
15257
15332
  if ( $.event.special.navigate.isPushStateEnabled() ) {