compass-jquery-plugin 0.3.2.6 → 0.3.2.7.nil
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -1
- data/VERSION.yml +2 -2
- data/lib/handle_js_files.rb +21 -2
- data/templates/dynatree/jquery.dynatree.js +23 -20
- data/templates/dynatree/jquery.dynatree.min.js +38 -38
- data/templates/dynatree/jquery/dynatree/aero.scss +1 -1
- data/templates/dynatree/jquery/dynatree/aqua.scss +1 -1
- data/templates/dynatree/jquery/dynatree/crystal.scss +1 -1
- data/templates/dynatree/jquery/dynatree/xp.scss +2 -2
- data/templates/ical/jquery/ical.scss +10 -10
- data/templates/jqgrid/i18n/jqgrid/locale-lt.js +134 -0
- data/templates/jqgrid/i18n/jqgrid/locale-lt.min.js +7 -0
- data/templates/jqgrid/jquery.jqGrid.js +155 -65
- data/templates/jqgrid/jquery.jqGrid.min.js +396 -393
- data/templates/jqgrid/manifest.rb +2 -0
- data/templates/jqtouch/jquery.jqtouch.js +166 -195
- data/templates/jqtouch/jquery.jqtouch.min.js +1 -1
- data/templates/jqtouch/jquery/touch/apple.scss +5 -5
- data/templates/jqtouch/jquery/touch/default.scss +5 -5
- data/templates/jqtouch/jquery/touch/jqt.scss +12 -7
- data/templates/jqtouch/jquery/touch/jqtouch.scss +11 -13
- data/templates/jquery/history.adapter.jquery.js +54 -67
- data/templates/jquery/history.adapter.jquery.min.js +2 -2
- data/templates/jquery/history.html4.js +587 -680
- data/templates/jquery/history.html4.min.js +8 -18
- data/templates/jquery/history.js +1670 -1289
- data/templates/jquery/history.min.js +25 -21
- data/templates/jquery/i18n/jquery.ui/datepicker-ar.js +1 -1
- data/templates/jquery/i18n/jquery.ui/datepicker-ar.min.js +1 -1
- data/templates/jquery/i18n/jquery.ui/datepicker-tj.js +23 -0
- data/templates/jquery/i18n/jquery.ui/datepicker-tj.min.js +2 -0
- data/templates/jquery/jquery-ui.js +97 -61
- data/templates/jquery/jquery-ui.min.js +175 -175
- data/templates/jquery/jquery.dst.js +86 -151
- data/templates/jquery/jquery/ui/_theme.scss +13 -13
- data/templates/jquery/json2.js +214 -214
- data/templates/jquery/manifest.rb +2 -0
- data/templates/mobile/jquery.mobile.js +324 -225
- data/templates/mobile/jquery.mobile.min.js +4 -4
- data/templates/mobile/jquery/mobile/_base.scss +60 -48
- data/templates/mobile/jquery/mobile/default.scss +57 -80
- data/templates/mobile/jquery/mobile/default/icons-18-black.png +0 -0
- data/templates/mobile/jquery/mobile/default/icons-18-white.png +0 -0
- data/templates/mobile/jquery/mobile/default/icons-36-black.png +0 -0
- data/templates/mobile/jquery/mobile/default/icons-36-white.png +0 -0
- data/templates/mobile/jquery/mobile/valencia.scss +61 -73
- data/templates/mobile/jquery/mobile/valencia/icons-18-black.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icons-18-white.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icons-36-black.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icons-36-white.png +0 -0
- data/templates/mobile/manifest.rb +0 -8
- data/templates/ribbon/jquery/ribbon/office.scss +12 -12
- data/templates/ribbon/jquery/ribbon/windows7.scss +12 -12
- data/templates/tiny_mce/manifest.rb +16 -0
- data/templates/tiny_mce/tiny_mce/jquery.tinymce.js +1 -1
- data/templates/tiny_mce/tiny_mce/langs/de.js +1 -0
- data/templates/tiny_mce/tiny_mce/langs/en.js +1 -222
- data/templates/tiny_mce/tiny_mce/plugins/advhr/css/advhr.css +1 -5
- data/templates/tiny_mce/tiny_mce/plugins/advhr/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/advhr/editor_plugin_src.js +1 -57
- data/templates/tiny_mce/tiny_mce/plugins/advhr/js/rule.js +1 -43
- data/templates/tiny_mce/tiny_mce/plugins/advhr/langs/de_dlg.js +1 -0
- data/templates/tiny_mce/tiny_mce/plugins/advhr/langs/en_dlg.js +1 -7
- data/templates/tiny_mce/tiny_mce/plugins/advhr/rule.htm +1 -58
- data/templates/tiny_mce/tiny_mce/plugins/advimage/css/advimage.css +1 -13
- data/templates/tiny_mce/tiny_mce/plugins/advimage/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/advimage/editor_plugin_src.js +1 -50
- data/templates/tiny_mce/tiny_mce/plugins/advimage/image.htm +1 -235
- data/templates/tiny_mce/tiny_mce/plugins/advimage/js/image.js +1 -445
- data/templates/tiny_mce/tiny_mce/plugins/advimage/langs/de_dlg.js +1 -0
- data/templates/tiny_mce/tiny_mce/plugins/advimage/langs/en_dlg.js +1 -45
- data/templates/tiny_mce/tiny_mce/plugins/advlink/css/advlink.css +1 -8
- data/templates/tiny_mce/tiny_mce/plugins/advlink/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/advlink/editor_plugin_src.js +1 -61
- data/templates/tiny_mce/tiny_mce/plugins/advlink/js/advlink.js +1 -525
- data/templates/tiny_mce/tiny_mce/plugins/advlink/langs/de_dlg.js +1 -0
- data/templates/tiny_mce/tiny_mce/plugins/advlink/langs/en_dlg.js +1 -54
- data/templates/tiny_mce/tiny_mce/plugins/advlink/link.htm +1 -338
- data/templates/tiny_mce/tiny_mce/plugins/advlist/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/advlist/editor_plugin_src.js +1 -154
- data/templates/tiny_mce/tiny_mce/plugins/autoresize/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/autoresize/editor_plugin_src.js +1 -119
- data/templates/tiny_mce/tiny_mce/plugins/autosave/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/autosave/editor_plugin_src.js +1 -431
- data/templates/tiny_mce/tiny_mce/plugins/autosave/langs/en.js +1 -4
- data/templates/tiny_mce/tiny_mce/plugins/bbcode/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/bbcode/editor_plugin_src.js +1 -120
- data/templates/tiny_mce/tiny_mce/plugins/contextmenu/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/contextmenu/editor_plugin_src.js +1 -154
- data/templates/tiny_mce/tiny_mce/plugins/directionality/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/directionality/editor_plugin_src.js +1 -82
- data/templates/tiny_mce/tiny_mce/plugins/emotions/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/emotions/editor_plugin_src.js +1 -43
- data/templates/tiny_mce/tiny_mce/plugins/emotions/emotions.htm +1 -41
- data/templates/tiny_mce/tiny_mce/plugins/emotions/js/emotions.js +1 -22
- data/templates/tiny_mce/tiny_mce/plugins/emotions/langs/de_dlg.js +1 -0
- data/templates/tiny_mce/tiny_mce/plugins/emotions/langs/en_dlg.js +1 -20
- data/templates/tiny_mce/tiny_mce/plugins/example/dialog.htm +1 -22
- data/templates/tiny_mce/tiny_mce/plugins/example/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/example/editor_plugin_src.js +1 -84
- data/templates/tiny_mce/tiny_mce/plugins/example/js/dialog.js +1 -19
- data/templates/tiny_mce/tiny_mce/plugins/example/langs/en.js +1 -3
- data/templates/tiny_mce/tiny_mce/plugins/example/langs/en_dlg.js +1 -3
- data/templates/tiny_mce/tiny_mce/plugins/fullpage/css/fullpage.css +1 -182
- data/templates/tiny_mce/tiny_mce/plugins/fullpage/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/fullpage/editor_plugin_src.js +1 -166
- data/templates/tiny_mce/tiny_mce/plugins/fullpage/fullpage.htm +1 -571
- data/templates/tiny_mce/tiny_mce/plugins/fullpage/js/fullpage.js +1 -492
- data/templates/tiny_mce/tiny_mce/plugins/fullpage/langs/de_dlg.js +1 -0
- data/templates/tiny_mce/tiny_mce/plugins/fullpage/langs/en_dlg.js +1 -85
- data/templates/tiny_mce/tiny_mce/plugins/fullscreen/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/fullscreen/editor_plugin_src.js +1 -159
- data/templates/tiny_mce/tiny_mce/plugins/fullscreen/fullscreen.htm +1 -109
- data/templates/tiny_mce/tiny_mce/plugins/iespell/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/iespell/editor_plugin_src.js +1 -54
- data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +1 -696
- data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +1 -90
- data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/template.htm +1 -387
- data/templates/tiny_mce/tiny_mce/plugins/insertdatetime/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +1 -83
- data/templates/tiny_mce/tiny_mce/plugins/layer/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/layer/editor_plugin_src.js +1 -214
- data/templates/tiny_mce/tiny_mce/plugins/legacyoutput/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/legacyoutput/editor_plugin_src.js +1 -139
- data/templates/tiny_mce/tiny_mce/plugins/media/css/media.css +1 -17
- data/templates/tiny_mce/tiny_mce/plugins/media/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/media/editor_plugin_src.js +1 -770
- data/templates/tiny_mce/tiny_mce/plugins/media/js/embed.js +1 -73
- data/templates/tiny_mce/tiny_mce/plugins/media/js/media.js +1 -340
- data/templates/tiny_mce/tiny_mce/plugins/media/langs/de_dlg.js +1 -0
- data/templates/tiny_mce/tiny_mce/plugins/media/langs/en_dlg.js +1 -109
- data/templates/tiny_mce/tiny_mce/plugins/media/media.htm +1 -812
- data/templates/tiny_mce/tiny_mce/plugins/nonbreaking/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +1 -53
- data/templates/tiny_mce/tiny_mce/plugins/noneditable/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/noneditable/editor_plugin_src.js +1 -90
- data/templates/tiny_mce/tiny_mce/plugins/pagebreak/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/pagebreak/editor_plugin_src.js +1 -74
- data/templates/tiny_mce/tiny_mce/plugins/paste/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/paste/editor_plugin_src.js +1 -899
- data/templates/tiny_mce/tiny_mce/plugins/paste/js/pastetext.js +1 -36
- data/templates/tiny_mce/tiny_mce/plugins/paste/js/pasteword.js +1 -51
- data/templates/tiny_mce/tiny_mce/plugins/paste/langs/de_dlg.js +1 -0
- data/templates/tiny_mce/tiny_mce/plugins/paste/langs/en_dlg.js +1 -5
- data/templates/tiny_mce/tiny_mce/plugins/paste/pastetext.htm +1 -27
- data/templates/tiny_mce/tiny_mce/plugins/paste/pasteword.htm +1 -21
- data/templates/tiny_mce/tiny_mce/plugins/preview/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/preview/editor_plugin_src.js +1 -53
- data/templates/tiny_mce/tiny_mce/plugins/preview/example.html +17 -16
- data/templates/tiny_mce/tiny_mce/plugins/preview/jscripts/embed.js +1 -73
- data/templates/tiny_mce/tiny_mce/plugins/preview/preview.html +10 -9
- data/templates/tiny_mce/tiny_mce/plugins/print/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/print/editor_plugin_src.js +1 -34
- data/templates/tiny_mce/tiny_mce/plugins/save/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/save/editor_plugin_src.js +1 -101
- data/templates/tiny_mce/tiny_mce/plugins/searchreplace/css/searchreplace.css +1 -6
- data/templates/tiny_mce/tiny_mce/plugins/searchreplace/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/searchreplace/editor_plugin_src.js +1 -61
- data/templates/tiny_mce/tiny_mce/plugins/searchreplace/js/searchreplace.js +1 -140
- data/templates/tiny_mce/tiny_mce/plugins/searchreplace/langs/de_dlg.js +1 -0
- data/templates/tiny_mce/tiny_mce/plugins/searchreplace/langs/en_dlg.js +1 -16
- data/templates/tiny_mce/tiny_mce/plugins/searchreplace/searchreplace.htm +1 -100
- data/templates/tiny_mce/tiny_mce/plugins/spellchecker/css/content.css +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/spellchecker/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/spellchecker/editor_plugin_src.js +1 -415
- data/templates/tiny_mce/tiny_mce/plugins/style/css/props.css +1 -13
- data/templates/tiny_mce/tiny_mce/plugins/style/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/style/editor_plugin_src.js +1 -55
- data/templates/tiny_mce/tiny_mce/plugins/style/js/props.js +1 -635
- data/templates/tiny_mce/tiny_mce/plugins/style/langs/de_dlg.js +1 -0
- data/templates/tiny_mce/tiny_mce/plugins/style/langs/en_dlg.js +1 -70
- data/templates/tiny_mce/tiny_mce/plugins/style/props.htm +1 -838
- data/templates/tiny_mce/tiny_mce/plugins/tabfocus/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/tabfocus/editor_plugin_src.js +1 -114
- data/templates/tiny_mce/tiny_mce/plugins/table/cell.htm +1 -178
- data/templates/tiny_mce/tiny_mce/plugins/table/css/cell.css +1 -17
- data/templates/tiny_mce/tiny_mce/plugins/table/css/row.css +1 -25
- data/templates/tiny_mce/tiny_mce/plugins/table/css/table.css +1 -13
- data/templates/tiny_mce/tiny_mce/plugins/table/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/table/editor_plugin_src.js +1 -1183
- data/templates/tiny_mce/tiny_mce/plugins/table/js/cell.js +1 -284
- data/templates/tiny_mce/tiny_mce/plugins/table/js/merge_cells.js +1 -27
- data/templates/tiny_mce/tiny_mce/plugins/table/js/row.js +1 -232
- data/templates/tiny_mce/tiny_mce/plugins/table/js/table.js +1 -450
- data/templates/tiny_mce/tiny_mce/plugins/table/langs/de_dlg.js +1 -0
- data/templates/tiny_mce/tiny_mce/plugins/table/langs/en_dlg.js +1 -74
- data/templates/tiny_mce/tiny_mce/plugins/table/merge_cells.htm +1 -32
- data/templates/tiny_mce/tiny_mce/plugins/table/row.htm +1 -157
- data/templates/tiny_mce/tiny_mce/plugins/table/table.htm +1 -188
- data/templates/tiny_mce/tiny_mce/plugins/template/blank.htm +1 -12
- data/templates/tiny_mce/tiny_mce/plugins/template/css/template.css +1 -23
- data/templates/tiny_mce/tiny_mce/plugins/template/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/template/editor_plugin_src.js +1 -159
- data/templates/tiny_mce/tiny_mce/plugins/template/js/template.js +1 -106
- data/templates/tiny_mce/tiny_mce/plugins/template/langs/de_dlg.js +1 -0
- data/templates/tiny_mce/tiny_mce/plugins/template/langs/en_dlg.js +1 -15
- data/templates/tiny_mce/tiny_mce/plugins/template/template.htm +1 -31
- data/templates/tiny_mce/tiny_mce/plugins/visualchars/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/visualchars/editor_plugin_src.js +1 -83
- data/templates/tiny_mce/tiny_mce/plugins/wordcount/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/wordcount/editor_plugin_src.js +1 -114
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/abbr.htm +1 -142
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/acronym.htm +1 -142
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/attributes.htm +1 -149
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/cite.htm +1 -142
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/css/attributes.css +1 -11
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/css/popup.css +1 -9
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/del.htm +1 -162
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +1 -132
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/ins.htm +1 -162
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/js/abbr.js +1 -28
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/js/acronym.js +1 -28
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/js/attributes.js +1 -125
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/js/cite.js +1 -28
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/js/del.js +1 -53
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/js/element_common.js +1 -229
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/js/ins.js +1 -53
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/langs/de_dlg.js +1 -0
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js +1 -32
- data/templates/tiny_mce/tiny_mce/themes/advanced/about.htm +1 -52
- data/templates/tiny_mce/tiny_mce/themes/advanced/anchor.htm +1 -26
- data/templates/tiny_mce/tiny_mce/themes/advanced/charmap.htm +1 -51
- data/templates/tiny_mce/tiny_mce/themes/advanced/color_picker.htm +1 -74
- data/templates/tiny_mce/tiny_mce/themes/advanced/editor_template.js +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/editor_template_src.js +1 -1328
- data/templates/tiny_mce/tiny_mce/themes/advanced/image.htm +1 -80
- data/templates/tiny_mce/tiny_mce/themes/advanced/js/about.js +1 -73
- data/templates/tiny_mce/tiny_mce/themes/advanced/js/anchor.js +1 -42
- data/templates/tiny_mce/tiny_mce/themes/advanced/js/charmap.js +1 -354
- data/templates/tiny_mce/tiny_mce/themes/advanced/js/color_picker.js +1 -329
- data/templates/tiny_mce/tiny_mce/themes/advanced/js/image.js +1 -247
- data/templates/tiny_mce/tiny_mce/themes/advanced/js/link.js +1 -153
- data/templates/tiny_mce/tiny_mce/themes/advanced/js/source_editor.js +1 -56
- data/templates/tiny_mce/tiny_mce/themes/advanced/langs/de.js +1 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/langs/de_dlg.js +1 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/langs/en.js +1 -68
- data/templates/tiny_mce/tiny_mce/themes/advanced/langs/en_dlg.js +1 -54
- data/templates/tiny_mce/tiny_mce/themes/advanced/link.htm +1 -57
- data/templates/tiny_mce/tiny_mce/themes/advanced/shortcuts.htm +1 -47
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/content.css +1 -47
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/dialog.css +1 -117
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/ui.css +1 -213
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/highcontrast/content.css +1 -23
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/highcontrast/dialog.css +1 -105
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/highcontrast/ui.css +1 -101
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/content.css +1 -46
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/dialog.css +1 -116
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/ui.css +1 -215
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +1 -8
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +1 -5
- data/templates/tiny_mce/tiny_mce/themes/advanced/source_editor.htm +1 -25
- data/templates/tiny_mce/tiny_mce/themes/simple/editor_template.js +1 -1
- data/templates/tiny_mce/tiny_mce/themes/simple/editor_template_src.js +1 -84
- data/templates/tiny_mce/tiny_mce/themes/simple/langs/de.js +1 -0
- data/templates/tiny_mce/tiny_mce/themes/simple/langs/en.js +1 -11
- data/templates/tiny_mce/tiny_mce/themes/simple/skins/default/content.css +1 -25
- data/templates/tiny_mce/tiny_mce/themes/simple/skins/default/ui.css +1 -32
- data/templates/tiny_mce/tiny_mce/themes/simple/skins/o2k7/content.css +1 -17
- data/templates/tiny_mce/tiny_mce/themes/simple/skins/o2k7/ui.css +1 -35
- data/templates/tiny_mce/tiny_mce/tiny_mce.js +1 -1
- data/templates/tiny_mce/tiny_mce/tiny_mce_popup.js +1 -5
- data/templates/tiny_mce/tiny_mce/utils/editable_selects.js +1 -70
- data/templates/tiny_mce/tiny_mce/utils/form_utils.js +1 -207
- data/templates/tiny_mce/tiny_mce/utils/mctabs.js +1 -162
- data/templates/tiny_mce/tiny_mce/utils/validate.js +1 -252
- metadata +32 -17
- data/templates/mobile/jquery/mobile/default/form-check-off.png +0 -0
- data/templates/mobile/jquery/mobile/default/form-check-on.png +0 -0
- data/templates/mobile/jquery/mobile/default/form-radio-off.png +0 -0
- data/templates/mobile/jquery/mobile/default/form-radio-on.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/form-check-off.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/form-check-on.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/form-radio-off.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/form-radio-on.png +0 -0
@@ -204,6 +204,8 @@ javascript 'i18n/jquery.ui/datepicker-ta.js'
|
|
204
204
|
javascript 'i18n/jquery.ui/datepicker-ta.min.js'
|
205
205
|
javascript 'i18n/jquery.ui/datepicker-th.js'
|
206
206
|
javascript 'i18n/jquery.ui/datepicker-th.min.js'
|
207
|
+
javascript 'i18n/jquery.ui/datepicker-tj.js'
|
208
|
+
javascript 'i18n/jquery.ui/datepicker-tj.min.js'
|
207
209
|
javascript 'i18n/jquery.ui/datepicker-tr.js'
|
208
210
|
javascript 'i18n/jquery.ui/datepicker-tr.min.js'
|
209
211
|
javascript 'i18n/jquery.ui/datepicker-uk.js'
|
@@ -277,7 +277,7 @@
|
|
277
277
|
var elem = this.element,
|
278
278
|
options = {};
|
279
279
|
$.each(this.options, function(option) {
|
280
|
-
var value = elem.
|
280
|
+
var value = elem.jqmData(option.replace(/[A-Z]/g, function(c) {
|
281
281
|
return "-" + c.toLowerCase();
|
282
282
|
}));
|
283
283
|
if (value !== undefined) {
|
@@ -475,6 +475,16 @@
|
|
475
475
|
|
476
476
|
;
|
477
477
|
|
478
|
+
|
479
|
+
//non-UA-based IE version check by James Padolsey, modified by jdalton - from http://gist.github.com/527683
|
480
|
+
//allows for inclusion of IE 6+, including Windows Mobile 7
|
481
|
+
$.mobile.browser = {};
|
482
|
+
$.mobile.browser.ie = (function() {
|
483
|
+
var v = 3, div = document.createElement('div'), a = div.all || [];
|
484
|
+
while (div.innerHTML = '<!--[if gt IE ' + (++v) + ']><br><![endif]-->',a[0]);
|
485
|
+
return v > 4 ? v : !v;
|
486
|
+
}());
|
487
|
+
|
478
488
|
$.extend($.support, {
|
479
489
|
orientation: "orientation" in window,
|
480
490
|
touch: "ontouchend" in document,
|
@@ -564,13 +574,13 @@
|
|
564
574
|
.bind("mousedown touchstart", function(event) {
|
565
575
|
if (event.which && event.which !== 1 ||
|
566
576
|
//check if event fired once already by a device that fires both mousedown and touchstart (while supporting both events)
|
567
|
-
$this.
|
577
|
+
$this.jqmData("prevEvent") && $this.jqmData("prevEvent") !== event.type) {
|
568
578
|
return false;
|
569
579
|
}
|
570
580
|
|
571
581
|
//save event type so only this type is let through for a temp duration,
|
572
582
|
//allowing quick repetitive taps but not duplicative events
|
573
|
-
$this.
|
583
|
+
$this.jqmData("prevEvent", event.type);
|
574
584
|
setTimeout(function() {
|
575
585
|
$this.removeData("prevEvent");
|
576
586
|
}, 800);
|
@@ -1211,7 +1221,7 @@
|
|
1211
1221
|
var $elem = this.element,
|
1212
1222
|
o = this.options;
|
1213
1223
|
|
1214
|
-
this.keepNative = "
|
1224
|
+
this.keepNative = ":jqmData(role='none'), :jqmData(role='nojs')" + (o.keepNative ? ", " + o.keepNative : "");
|
1215
1225
|
|
1216
1226
|
if (this._trigger("beforeCreate") === false) {
|
1217
1227
|
return;
|
@@ -1220,21 +1230,21 @@
|
|
1220
1230
|
//some of the form elements currently rely on the presence of ui-page and ui-content
|
1221
1231
|
// classes so we'll handle page and content roles outside of the main role processing
|
1222
1232
|
// loop below.
|
1223
|
-
$elem.find("
|
1224
|
-
$(this).addClass("ui-" + $(this).
|
1233
|
+
$elem.find(":jqmData(role='page'), :jqmData(role='content')").andSelf().each(function() {
|
1234
|
+
$(this).addClass("ui-" + $(this).jqmData("role"));
|
1225
1235
|
});
|
1226
1236
|
|
1227
|
-
$elem.find("
|
1237
|
+
$elem.find(":jqmData(role='nojs')").addClass("ui-nojs");
|
1228
1238
|
|
1229
1239
|
// pre-find data els
|
1230
|
-
var $dataEls = $elem.find("
|
1240
|
+
var $dataEls = $elem.find(":jqmData(role)").andSelf().each(function() {
|
1231
1241
|
var $this = $(this),
|
1232
|
-
role = $this.
|
1233
|
-
theme = $this.
|
1242
|
+
role = $this.jqmData("role"),
|
1243
|
+
theme = $this.jqmData("theme");
|
1234
1244
|
|
1235
1245
|
//apply theming and markup modifications to page,header,content,footer
|
1236
1246
|
if (role === "header" || role === "footer") {
|
1237
|
-
$this.addClass("ui-bar-" + (theme || $this.parent(
|
1247
|
+
$this.addClass("ui-bar-" + (theme || $this.parent(":jqmData(role='page')").jqmData("theme") || "a"));
|
1238
1248
|
|
1239
1249
|
// add ARIA role
|
1240
1250
|
$this.attr("role", role === "header" ? "banner" : "contentinfo");
|
@@ -1255,10 +1265,10 @@
|
|
1255
1265
|
// auto-add back btn on pages beyond first view
|
1256
1266
|
if (o.addBackBtn && role === "header" &&
|
1257
1267
|
$(".ui-page").length > 1 &&
|
1258
|
-
$elem.
|
1259
|
-
!leftbtn && $this.
|
1268
|
+
$elem.jqmData("url") !== $.mobile.path.stripHash(location.hash) &&
|
1269
|
+
!leftbtn && $this.jqmData("backbtn") !== false) {
|
1260
1270
|
|
1261
|
-
$("<a href='#' class='ui-btn-left' data-rel='back' data-icon='arrow-l'>" + o.backBtnText + "</a>").prependTo($this);
|
1271
|
+
$("<a href='#' class='ui-btn-left' data-" + $.mobile.ns + "rel='back' data-" + $.mobile.ns + "icon='arrow-l'>" + o.backBtnText + "</a>").prependTo($this);
|
1262
1272
|
}
|
1263
1273
|
|
1264
1274
|
//page title
|
@@ -1299,14 +1309,14 @@
|
|
1299
1309
|
//enhance form controls
|
1300
1310
|
this._enhanceControls();
|
1301
1311
|
|
1302
|
-
//links in bars, or those with
|
1303
|
-
$elem.find("
|
1312
|
+
//links in bars, or those with data-role become buttons
|
1313
|
+
$elem.find(":jqmData(role='button'), .ui-bar > a, .ui-header > a, .ui-footer > a")
|
1304
1314
|
.not(".ui-btn")
|
1305
1315
|
.not(this.keepNative)
|
1306
1316
|
.buttonMarkup();
|
1307
1317
|
|
1308
1318
|
$elem
|
1309
|
-
.find("
|
1319
|
+
.find(":jqmData(role='controlgroup')")
|
1310
1320
|
.controlgroup();
|
1311
1321
|
|
1312
1322
|
//links within content areas
|
@@ -1318,8 +1328,10 @@
|
|
1318
1328
|
$elem.fixHeaderFooter();
|
1319
1329
|
},
|
1320
1330
|
|
1331
|
+
_typeAttributeRegex: /\s+type=["']?\w+['"]?/,
|
1332
|
+
|
1321
1333
|
_enhanceControls: function() {
|
1322
|
-
var o = this.options;
|
1334
|
+
var o = this.options, self = this;
|
1323
1335
|
|
1324
1336
|
// degrade inputs to avoid poorly implemented native functionality
|
1325
1337
|
this.element.find("input").not(this.keepNative).each(function() {
|
@@ -1329,7 +1341,7 @@
|
|
1329
1341
|
if (o.degradeInputs[ type ]) {
|
1330
1342
|
$(this).replaceWith(
|
1331
1343
|
$("<div>").html($(this).clone()).html()
|
1332
|
-
.replace(
|
1344
|
+
.replace(self._typeAttributeRegex, " type=\"" + optType + "\" data-" + $.mobile.ns + "type=\"" + type + "\" "));
|
1333
1345
|
}
|
1334
1346
|
});
|
1335
1347
|
|
@@ -1371,11 +1383,11 @@
|
|
1371
1383
|
|
1372
1384
|
nonNativeControls
|
1373
1385
|
.filter("input, select")
|
1374
|
-
.filter("
|
1386
|
+
.filter(":jqmData(role='slider'), :jqmData(type='range')")
|
1375
1387
|
.slider();
|
1376
1388
|
|
1377
1389
|
nonNativeControls
|
1378
|
-
.filter("select:not(
|
1390
|
+
.filter("select:not(:jqmData(role='slider'))")
|
1379
1391
|
.selectmenu();
|
1380
1392
|
}
|
1381
1393
|
});
|
@@ -1393,15 +1405,19 @@
|
|
1393
1405
|
*/
|
1394
1406
|
|
1395
1407
|
(function($, window, undefined) {
|
1408
|
+
|
1396
1409
|
//jQuery.mobile configurable options
|
1397
1410
|
$.extend($.mobile, {
|
1398
1411
|
|
1412
|
+
//namespace used framework-wide for data-attrs. Default is no namespace
|
1413
|
+
ns: "",
|
1414
|
+
|
1399
1415
|
//define the url parameter used for referencing widget-generated sub-pages.
|
1400
1416
|
//Translates to to example.html&ui-page=subpageIdentifier
|
1401
1417
|
//hash segment before &ui-page= is used to make Ajax request
|
1402
1418
|
subPageUrlKey: "ui-page",
|
1403
1419
|
|
1404
|
-
//anchor links with a data-rel, or pages with a
|
1420
|
+
//anchor links with a data-rel, or pages with a data-role, that match these selectors will be untrackable in history
|
1405
1421
|
//(no change in URL, not bookmarkable)
|
1406
1422
|
nonHistorySelectors: "dialog",
|
1407
1423
|
|
@@ -1433,11 +1449,14 @@
|
|
1433
1449
|
loadingMessage: "loading",
|
1434
1450
|
|
1435
1451
|
//configure meta viewport tag's content attr:
|
1452
|
+
//note: this feature is deprecated in A4 in favor of adding
|
1453
|
+
//the meta viewport element directly in the markup
|
1436
1454
|
metaViewportContent: "width=device-width, minimum-scale=1, maximum-scale=1",
|
1437
1455
|
|
1438
1456
|
//support conditions that must be met in order to proceed
|
1457
|
+
//default enhanced qualifications are media query support OR IE 7+
|
1439
1458
|
gradeA: function() {
|
1440
|
-
return $.support.mediaquery;
|
1459
|
+
return $.support.mediaquery || $.mobile.browser.ie && $.mobile.browser.ie >= 7;
|
1441
1460
|
},
|
1442
1461
|
|
1443
1462
|
//TODO might be useful upstream in jquery itself ?
|
@@ -1476,6 +1495,7 @@
|
|
1476
1495
|
WINDOWS: 91 // COMMAND
|
1477
1496
|
},
|
1478
1497
|
|
1498
|
+
//scroll page vertically: scroll to 0 to hide iOS address bar, or pass a Y value
|
1479
1499
|
silentScroll: function(ypos) {
|
1480
1500
|
ypos = ypos || 0;
|
1481
1501
|
// prevent scrollstart and scrollstop events
|
@@ -1491,6 +1511,48 @@
|
|
1491
1511
|
}, 150);
|
1492
1512
|
}
|
1493
1513
|
});
|
1514
|
+
|
1515
|
+
//mobile version of data and removeData and hasData methods
|
1516
|
+
//ensures all data is set and retrieved using jQuery Mobile's data namespace
|
1517
|
+
$.fn.jqmData = function(prop, value) {
|
1518
|
+
return this.data(prop ? $.mobile.ns + prop : prop, value);
|
1519
|
+
};
|
1520
|
+
|
1521
|
+
$.jqmData = function(elem, prop, value) {
|
1522
|
+
return $.data(elem, prop && $.mobile.ns + prop, value);
|
1523
|
+
};
|
1524
|
+
|
1525
|
+
$.fn.jqmRemoveData = function(prop) {
|
1526
|
+
return this.removeData($.mobile.ns + prop);
|
1527
|
+
};
|
1528
|
+
|
1529
|
+
$.jqmRemoveData = function(elem, prop) {
|
1530
|
+
return $.removeData(elem, prop && $.mobile.ns + prop);
|
1531
|
+
};
|
1532
|
+
|
1533
|
+
$.jqmHasData = function(elem, prop) {
|
1534
|
+
return $.hasData(elem, prop && $.mobile.ns + prop);
|
1535
|
+
};
|
1536
|
+
|
1537
|
+
|
1538
|
+
// Monkey-patching Sizzle to filter the :jqmData selector
|
1539
|
+
var oldFind = $.find;
|
1540
|
+
|
1541
|
+
$.find = function(selector, context, ret, extra) {
|
1542
|
+
selector = selector.replace(/:jqmData\(([^)]*)\)/g, "[data-" + ($.mobile.ns || "") + "$1]");
|
1543
|
+
|
1544
|
+
return oldFind.call(this, selector, context, ret, extra);
|
1545
|
+
};
|
1546
|
+
|
1547
|
+
$.extend($.find, oldFind);
|
1548
|
+
|
1549
|
+
$.find.matches = function(expr, set) {
|
1550
|
+
return $.find(expr, null, null, set);
|
1551
|
+
};
|
1552
|
+
|
1553
|
+
$.find.matchesSelector = function(node, expr) {
|
1554
|
+
return $.find(expr, null, null, [node]).length > 0;
|
1555
|
+
};
|
1494
1556
|
})(jQuery, this);
|
1495
1557
|
|
1496
1558
|
|
@@ -1541,9 +1603,13 @@
|
|
1541
1603
|
return path.get() + url;
|
1542
1604
|
},
|
1543
1605
|
|
1544
|
-
//return a url path with the window's location protocol/hostname removed
|
1606
|
+
//return a url path with the window's location protocol/hostname/pathname removed
|
1545
1607
|
clean: function(url) {
|
1546
|
-
|
1608
|
+
// Replace the protocol, host, and pathname only once at the beginning of the url to avoid
|
1609
|
+
// problems when it's included as a part of a param
|
1610
|
+
// Also, since all urls are absolute in IE, we need to remove the pathname as well.
|
1611
|
+
var leadingUrlRootRegex = new RegExp("^" + location.protocol + "//" + location.host + location.pathname);
|
1612
|
+
return url.replace(leadingUrlRootRegex, "");
|
1547
1613
|
},
|
1548
1614
|
|
1549
1615
|
//just return the url without an initial #
|
@@ -1699,7 +1765,7 @@
|
|
1699
1765
|
|
1700
1766
|
//set the generated BASE element's href attribute to a new page's base path
|
1701
1767
|
set: function(href) {
|
1702
|
-
base.element.attr('href', docBase + path.get(href)
|
1768
|
+
base.element.attr('href', docBase + path.get(href));
|
1703
1769
|
},
|
1704
1770
|
|
1705
1771
|
//set the generated BASE element's href attribute to a new page's base path
|
@@ -1769,8 +1835,10 @@
|
|
1769
1835
|
//history stack
|
1770
1836
|
$.mobile.urlHistory = urlHistory;
|
1771
1837
|
|
1838
|
+
//enable cross-domain page support
|
1839
|
+
$.mobile.allowCrossDomainPages = false;
|
1840
|
+
|
1772
1841
|
// changepage function
|
1773
|
-
// TODO : consider moving args to an object hash
|
1774
1842
|
$.mobile.changePage = function(to, transition, reverse, changeHash, fromHashChange) {
|
1775
1843
|
//from is always the currently viewed page
|
1776
1844
|
var toIsArray = $.type(to) === "array",
|
@@ -1870,16 +1938,16 @@
|
|
1870
1938
|
|
1871
1939
|
//support deep-links to generated sub-pages
|
1872
1940
|
if (url.indexOf("&" + $.mobile.subPageUrlKey) > -1) {
|
1873
|
-
to = $("
|
1941
|
+
to = $(":jqmData(url='" + url + "')");
|
1874
1942
|
}
|
1875
1943
|
|
1876
1944
|
if (from) {
|
1877
1945
|
//set as data for returning to that spot
|
1878
|
-
from.
|
1946
|
+
from.jqmData("lastScroll", currScroll);
|
1879
1947
|
//trigger before show/hide events
|
1880
|
-
from.data("page")._trigger("beforehide", { nextPage: to });
|
1948
|
+
from.data("page")._trigger("beforehide", null, { nextPage: to });
|
1881
1949
|
}
|
1882
|
-
to.data("page")._trigger("beforeshow", { prevPage: from || $("") });
|
1950
|
+
to.data("page")._trigger("beforeshow", null, { prevPage: from || $("") });
|
1883
1951
|
|
1884
1952
|
function loadComplete() {
|
1885
1953
|
|
@@ -1898,7 +1966,7 @@
|
|
1898
1966
|
removeActiveLinkClass();
|
1899
1967
|
|
1900
1968
|
//jump to top or prev scroll, sometimes on iOS the page has not rendered yet. I could only get by this with a setTimeout, but would like to avoid that.
|
1901
|
-
$.mobile.silentScroll(to.
|
1969
|
+
$.mobile.silentScroll(to.jqmData("lastScroll"));
|
1902
1970
|
|
1903
1971
|
reFocus(to);
|
1904
1972
|
|
@@ -1975,10 +2043,10 @@
|
|
1975
2043
|
function enhancePage() {
|
1976
2044
|
|
1977
2045
|
//set next page role, if defined
|
1978
|
-
if (nextPageRole || to.
|
2046
|
+
if (nextPageRole || to.jqmData('role') === 'dialog') {
|
1979
2047
|
url = urlHistory.getActive().url + dialogHashKey;
|
1980
2048
|
if (nextPageRole) {
|
1981
|
-
to.attr("data-role", nextPageRole);
|
2049
|
+
to.attr("data-" + $.mobile.ns + "role", nextPageRole);
|
1982
2050
|
nextPageRole = null;
|
1983
2051
|
}
|
1984
2052
|
}
|
@@ -1989,11 +2057,11 @@
|
|
1989
2057
|
|
1990
2058
|
//if url is a string
|
1991
2059
|
if (url) {
|
1992
|
-
to = $("
|
2060
|
+
to = $(":jqmData(url='" + url + "')");
|
1993
2061
|
fileUrl = path.getFilePath(url);
|
1994
2062
|
}
|
1995
2063
|
else { //find base url of element, if avail
|
1996
|
-
var toID = to.attr(
|
2064
|
+
var toID = to.attr("data-" + $.mobile.ns + "url"),
|
1997
2065
|
toIDfileurl = path.getFilePath(toID);
|
1998
2066
|
|
1999
2067
|
if (toID !== toIDfileurl) {
|
@@ -2024,15 +2092,14 @@
|
|
2024
2092
|
url: fileUrl,
|
2025
2093
|
type: type,
|
2026
2094
|
data: data,
|
2027
|
-
dataType: "html",
|
2028
2095
|
success: function(html) {
|
2029
2096
|
//pre-parse html to check for a data-url,
|
2030
2097
|
//use it as the new fileUrl, base path, etc
|
2031
2098
|
var all = $("<div></div>"),
|
2032
2099
|
redirectLoc,
|
2033
2100
|
// TODO handle dialogs again
|
2034
|
-
pageElemRegex =
|
2035
|
-
dataUrlRegex =
|
2101
|
+
pageElemRegex = new RegExp(".*(<[^>]+\\bdata-" + $.mobile.ns + "role=[\"']?page[\"']?[^>]*>).*"),
|
2102
|
+
dataUrlRegex = new RegExp("\\bdata-" + $.mobile.ns + "url=[\"']?([^\"'>]*)[\"']?");
|
2036
2103
|
|
2037
2104
|
// data-url must be provided for the base tag so resource requests can be directed to the
|
2038
2105
|
// correct url. loading into a temprorary element makes these requests immediately
|
@@ -2054,7 +2121,7 @@
|
|
2054
2121
|
|
2055
2122
|
//workaround to allow scripts to execute when included in page divs
|
2056
2123
|
all.get(0).innerHTML = html;
|
2057
|
-
to = all.find(
|
2124
|
+
to = all.find(":jqmData(role='page'), :jqmData(role='dialog')").first();
|
2058
2125
|
|
2059
2126
|
//rewrite src and href attrs to use a base url
|
2060
2127
|
if (!$.support.dynamicBaseTag) {
|
@@ -2074,7 +2141,7 @@
|
|
2074
2141
|
|
2075
2142
|
//append to page and enhance
|
2076
2143
|
to
|
2077
|
-
.attr("data-url", fileUrl)
|
2144
|
+
.attr("data-" + $.mobile.ns + "url", fileUrl)
|
2078
2145
|
.appendTo($.mobile.pageContainer);
|
2079
2146
|
|
2080
2147
|
enhancePage();
|
@@ -2106,18 +2173,20 @@
|
|
2106
2173
|
/* Event Bindings - hashchange, submit, and click */
|
2107
2174
|
|
2108
2175
|
//bind to form submit events, handle with Ajax
|
2109
|
-
$("form
|
2176
|
+
$("form").live('submit', function(event) {
|
2110
2177
|
if (!$.mobile.ajaxEnabled ||
|
2111
2178
|
//TODO: deprecated - remove at 1.0
|
2112
|
-
!$.mobile.ajaxFormsEnabled
|
2179
|
+
!$.mobile.ajaxFormsEnabled ||
|
2180
|
+
$(this).is(":jqmData(ajax='false')")) {
|
2113
2181
|
return;
|
2114
2182
|
}
|
2115
2183
|
|
2116
2184
|
var type = $(this).attr("method"),
|
2117
|
-
url = path.clean($(this).attr("action"))
|
2185
|
+
url = path.clean($(this).attr("action")),
|
2186
|
+
target = $(this).attr("target");
|
2118
2187
|
|
2119
2188
|
//external submits use regular HTTP
|
2120
|
-
if (path.isExternal(url)) {
|
2189
|
+
if (path.isExternal(url) || target) {
|
2121
2190
|
return;
|
2122
2191
|
}
|
2123
2192
|
|
@@ -2127,12 +2196,12 @@
|
|
2127
2196
|
}
|
2128
2197
|
|
2129
2198
|
$.mobile.changePage({
|
2130
|
-
url: url,
|
2131
|
-
type: type,
|
2199
|
+
url: url.length && url || path.get(),
|
2200
|
+
type: type.length && type.toLowerCase() || "get",
|
2132
2201
|
data: $(this).serialize()
|
2133
2202
|
},
|
2134
|
-
|
2135
|
-
|
2203
|
+
$(this).jqmData("transition"),
|
2204
|
+
$(this).jqmData("direction"),
|
2136
2205
|
true
|
2137
2206
|
);
|
2138
2207
|
event.preventDefault();
|
@@ -2147,6 +2216,12 @@
|
|
2147
2216
|
//get href, if defined, otherwise fall to null #
|
2148
2217
|
href = $this.attr("href") || "#",
|
2149
2218
|
|
2219
|
+
//cache a check for whether the link had a protocol
|
2220
|
+
//if this is true and the link was same domain, we won't want
|
2221
|
+
//to prefix the url with a base (esp helpful in IE, where every
|
2222
|
+
//url is absolute
|
2223
|
+
hadProtocol = path.hasProtocol(href),
|
2224
|
+
|
2150
2225
|
//get href, remove same-domain protocol and host
|
2151
2226
|
url = path.clean(href),
|
2152
2227
|
|
@@ -2156,24 +2231,34 @@
|
|
2156
2231
|
//rel set to external
|
2157
2232
|
isEmbeddedPage = path.isEmbeddedPage(url),
|
2158
2233
|
|
2234
|
+
// Some embedded browsers, like the web view in Phone Gap, allow cross-domain XHR
|
2235
|
+
// requests if the document doing the request was loaded via the file:// protocol.
|
2236
|
+
// This is usually to allow the application to "phone home" and fetch app specific
|
2237
|
+
// data. We normally let the browser handle external/cross-domain urls, but if the
|
2238
|
+
// allowCrossDomainPages option is true, we will allow cross-domain http/https
|
2239
|
+
// requests to go through our page loading logic.
|
2240
|
+
isCrossDomainPageLoad = ($.mobile.allowCrossDomainPages && location.protocol === "file:" && url.search(/^https?:/) != -1),
|
2241
|
+
|
2159
2242
|
//check for protocol or rel and its not an embedded page
|
2160
2243
|
//TODO overlap in logic from isExternal, rel=external check should be
|
2161
2244
|
// moved into more comprehensive isExternalLink
|
2162
|
-
isExternal = path.isExternal(url) || (isRelExternal && !isEmbeddedPage),
|
2245
|
+
isExternal = (path.isExternal(url) && !isCrossDomainPageLoad) || (isRelExternal && !isEmbeddedPage),
|
2163
2246
|
|
2164
2247
|
//if target attr is specified we mimic _blank... for now
|
2165
2248
|
hasTarget = $this.is("[target]"),
|
2166
2249
|
|
2167
2250
|
//if data-ajax attr is set to false, use the default behavior of a link
|
2168
|
-
hasAjaxDisabled = $this.is("
|
2251
|
+
hasAjaxDisabled = $this.is(":jqmData(ajax='false')");
|
2169
2252
|
|
2170
2253
|
//if there's a data-rel=back attr, go back in history
|
2171
|
-
if ($this.is("
|
2254
|
+
if ($this.is(":jqmData(rel='back')")) {
|
2172
2255
|
window.history.back();
|
2173
2256
|
return false;
|
2174
2257
|
}
|
2175
2258
|
|
2176
|
-
|
2259
|
+
//prevent # urls from bubbling
|
2260
|
+
//path.get() is replaced to combat abs url prefixing in IE
|
2261
|
+
if (url.replace(path.get(), "") == "#") {
|
2177
2262
|
//for links created purely for interaction - ignore
|
2178
2263
|
event.preventDefault();
|
2179
2264
|
return;
|
@@ -2185,32 +2270,26 @@
|
|
2185
2270
|
// TODO: deprecated - remove at 1.0
|
2186
2271
|
!$.mobile.ajaxLinksEnabled) {
|
2187
2272
|
//remove active link class if external (then it won't be there if you come back)
|
2188
|
-
|
2273
|
+
window.setTimeout(function() {
|
2274
|
+
removeActiveLinkClass(true);
|
2275
|
+
}, 200);
|
2189
2276
|
|
2190
|
-
//
|
2191
|
-
|
2192
|
-
window.open(url);
|
2193
|
-
}
|
2194
|
-
else if (hasAjaxDisabled) {
|
2195
|
-
return;
|
2196
|
-
}
|
2197
|
-
else {
|
2198
|
-
location.href = url;
|
2199
|
-
}
|
2277
|
+
//use default click handling
|
2278
|
+
return;
|
2200
2279
|
}
|
2201
2280
|
else {
|
2202
2281
|
//use ajax
|
2203
|
-
var transition = $this.
|
2204
|
-
direction = $this.
|
2282
|
+
var transition = $this.jqmData("transition"),
|
2283
|
+
direction = $this.jqmData("direction"),
|
2205
2284
|
reverse = (direction && direction === "reverse") ||
|
2206
2285
|
// deprecated - remove by 1.0
|
2207
|
-
$this.
|
2286
|
+
$this.jqmData("back");
|
2208
2287
|
|
2209
2288
|
//this may need to be more specific as we use data-rel more
|
2210
|
-
nextPageRole = $this.attr("data-rel");
|
2289
|
+
nextPageRole = $this.attr("data-" + $.mobile.ns + "rel");
|
2211
2290
|
|
2212
2291
|
//if it's a relative href, prefix href with base url
|
2213
|
-
if (path.isRelative(url)) {
|
2292
|
+
if (path.isRelative(url) && !hadProtocol) {
|
2214
2293
|
url = path.makeAbsolute(url);
|
2215
2294
|
}
|
2216
2295
|
|
@@ -2285,11 +2364,11 @@
|
|
2285
2364
|
return this.each(function() {
|
2286
2365
|
var $this = $(this);
|
2287
2366
|
|
2288
|
-
if ($this.
|
2367
|
+
if ($this.jqmData('fullscreen')) {
|
2289
2368
|
$this.addClass('ui-page-fullscreen');
|
2290
2369
|
}
|
2291
|
-
$this.find(
|
2292
|
-
$this.find(
|
2370
|
+
$this.find(".ui-header:jqmData(position='fixed')").addClass('ui-header-fixed ui-fixed-inline fade'); //should be slidedown
|
2371
|
+
$this.find(".ui-footer:jqmData(position='fixed')").addClass('ui-footer-fixed ui-fixed-inline fade'); //should be slideup
|
2293
2372
|
});
|
2294
2373
|
};
|
2295
2374
|
|
@@ -2391,11 +2470,11 @@
|
|
2391
2470
|
//before page is shown, check for duplicate footer
|
2392
2471
|
$('.ui-page').live('pagebeforeshow', function(event, ui) {
|
2393
2472
|
var page = $(event.target),
|
2394
|
-
footer = page.find(
|
2395
|
-
id = footer.
|
2473
|
+
footer = page.find(":jqmData(role='footer'):not(.ui-sticky-footer)"),
|
2474
|
+
id = footer.jqmData('id');
|
2396
2475
|
stickyFooter = null;
|
2397
2476
|
if (id) {
|
2398
|
-
stickyFooter = $(
|
2477
|
+
stickyFooter = $(".ui-footer:jqmData(id='" + id + "').ui-sticky-footer");
|
2399
2478
|
if (stickyFooter.length == 0) {
|
2400
2479
|
// No sticky footer exists for this data-id. We'll use this
|
2401
2480
|
// footer as the sticky footer for the group and then create
|
@@ -2565,7 +2644,9 @@
|
|
2565
2644
|
_create: function() {
|
2566
2645
|
var self = this,
|
2567
2646
|
input = this.element,
|
2568
|
-
|
2647
|
+
//NOTE: Windows Phone could not find the label through a selector
|
2648
|
+
//filter works though.
|
2649
|
+
label = input.closest("form,fieldset,:jqmData(role='page')").find("label").filter("[for=" + input[0].id + "]"),
|
2569
2650
|
inputtype = input.attr("type"),
|
2570
2651
|
checkedicon = "ui-icon-" + inputtype + "-on",
|
2571
2652
|
uncheckedicon = "ui-icon-" + inputtype + "-off";
|
@@ -2574,15 +2655,23 @@
|
|
2574
2655
|
return;
|
2575
2656
|
}
|
2576
2657
|
|
2658
|
+
//expose for other methods
|
2659
|
+
$.extend(this, {
|
2660
|
+
label : label,
|
2661
|
+
inputtype : inputtype,
|
2662
|
+
checkedicon : checkedicon,
|
2663
|
+
uncheckedicon : uncheckedicon
|
2664
|
+
});
|
2665
|
+
|
2577
2666
|
// If there's no selected theme...
|
2578
2667
|
if (!this.options.theme) {
|
2579
|
-
this.options.theme = this.element.
|
2668
|
+
this.options.theme = this.element.jqmData("theme");
|
2580
2669
|
}
|
2581
2670
|
|
2582
2671
|
label
|
2583
2672
|
.buttonMarkup({
|
2584
2673
|
theme: this.options.theme,
|
2585
|
-
icon: this.element.parents("
|
2674
|
+
icon: this.element.parents(":jqmData(type='horizontal')").length ? undefined : uncheckedicon,
|
2586
2675
|
shadow: false
|
2587
2676
|
});
|
2588
2677
|
|
@@ -2600,14 +2689,14 @@
|
|
2600
2689
|
|
2601
2690
|
"touchmove": function(event) {
|
2602
2691
|
var oe = event.originalEvent.touches[0];
|
2603
|
-
if (label.
|
2604
|
-
if (Math.abs(label.
|
2605
|
-
Math.abs(label.
|
2606
|
-
label.
|
2692
|
+
if (label.jqmData("movestart")) {
|
2693
|
+
if (Math.abs(label.jqmData("movestart")[0] - oe.pageX) > 10 ||
|
2694
|
+
Math.abs(label.jqmData("movestart")[1] - oe.pageY) > 10) {
|
2695
|
+
label.jqmData("moved", true);
|
2607
2696
|
}
|
2608
2697
|
}
|
2609
2698
|
else {
|
2610
|
-
label.
|
2699
|
+
label.jqmData("movestart", [ parseFloat(oe.pageX), parseFloat(oe.pageY) ]);
|
2611
2700
|
}
|
2612
2701
|
},
|
2613
2702
|
|
@@ -2618,14 +2707,14 @@
|
|
2618
2707
|
}
|
2619
2708
|
|
2620
2709
|
label.removeData("movestart");
|
2621
|
-
if (label.
|
2710
|
+
if (label.jqmData("etype") && label.jqmData("etype") !== event.type || label.jqmData("moved")) {
|
2622
2711
|
label.removeData("etype").removeData("moved");
|
2623
|
-
if (label.
|
2712
|
+
if (label.jqmData("moved")) {
|
2624
2713
|
label.removeData("moved");
|
2625
2714
|
}
|
2626
2715
|
return false;
|
2627
2716
|
}
|
2628
|
-
label.
|
2717
|
+
label.jqmData("etype", event.type);
|
2629
2718
|
self._cacheVals();
|
2630
2719
|
input.attr("checked", inputtype === "radio" && true || !input.is(":checked"));
|
2631
2720
|
self._updateAll();
|
@@ -2661,20 +2750,20 @@
|
|
2661
2750
|
|
2662
2751
|
_cacheVals: function() {
|
2663
2752
|
this._getInputSet().each(function() {
|
2664
|
-
$(this).
|
2753
|
+
$(this).jqmData("cacheVal", $(this).is(":checked"));
|
2665
2754
|
});
|
2666
2755
|
},
|
2667
2756
|
|
2668
2757
|
//returns either a set of radios with the same name attribute, or a single checkbox
|
2669
2758
|
_getInputSet: function() {
|
2670
|
-
return this.element.closest("form,fieldset
|
2671
|
-
.find("input[name='" + this.element.attr("name") + "'][type='" + this.
|
2759
|
+
return this.element.closest("form,fieldset,:jqmData(role='page')")
|
2760
|
+
.find("input[name='" + this.element.attr("name") + "'][type='" + this.inputtype + "']");
|
2672
2761
|
},
|
2673
2762
|
|
2674
2763
|
_updateAll: function() {
|
2675
2764
|
this._getInputSet().each(function() {
|
2676
|
-
var dVal = $(this).
|
2677
|
-
if (dVal && dVal !== $(this).is(":checked") ||
|
2765
|
+
var dVal = $(this).jqmData("cacheVal");
|
2766
|
+
if (dVal && dVal !== $(this).is(":checked") || this.inputtype === "checkbox") {
|
2678
2767
|
$(this).trigger("change");
|
2679
2768
|
}
|
2680
2769
|
})
|
@@ -2683,21 +2772,16 @@
|
|
2683
2772
|
|
2684
2773
|
refresh: function() {
|
2685
2774
|
var input = this.element,
|
2686
|
-
label =
|
2687
|
-
|
2688
|
-
icon = label.find(".ui-icon"),
|
2689
|
-
checkedicon = "ui-icon-" + inputtype + "-on",
|
2690
|
-
uncheckedicon = "ui-icon-" + inputtype + "-off";
|
2775
|
+
label = this.label,
|
2776
|
+
icon = label.find(".ui-icon");
|
2691
2777
|
|
2692
2778
|
if (input[0].checked) {
|
2693
|
-
label.addClass(
|
2694
|
-
icon.addClass(checkedicon);
|
2695
|
-
icon.removeClass(uncheckedicon);
|
2779
|
+
label.addClass($.mobile.activeBtnClass);
|
2780
|
+
icon.addClass(this.checkedicon).removeClass(this.uncheckedicon);
|
2696
2781
|
|
2697
2782
|
} else {
|
2698
|
-
label.removeClass(
|
2699
|
-
icon.removeClass(checkedicon);
|
2700
|
-
icon.addClass(uncheckedicon);
|
2783
|
+
label.removeClass($.mobile.activeBtnClass);
|
2784
|
+
icon.removeClass(this.checkedicon).addClass(this.uncheckedicon);
|
2701
2785
|
}
|
2702
2786
|
|
2703
2787
|
if (input.is(":disabled")) {
|
@@ -2752,7 +2836,7 @@
|
|
2752
2836
|
var focusedEl = input;
|
2753
2837
|
|
2754
2838
|
//"search" input widget
|
2755
|
-
if (input.is(
|
2839
|
+
if (input.is("[type='search'],:jqmData(type='search')")) {
|
2756
2840
|
focusedEl = input.wrap('<div class="ui-input-search ui-shadow-inset ui-btn-corner-all ui-btn-shadow ui-icon-searchfield' + themeclass + '"></div>').parent();
|
2757
2841
|
var clearbtn = $('<a href="#" class="ui-input-clear" title="clear text">clear text</a>')
|
2758
2842
|
.tap(function(e) {
|
@@ -2808,11 +2892,11 @@
|
|
2808
2892
|
},
|
2809
2893
|
|
2810
2894
|
disable: function() {
|
2811
|
-
( this.element.attr("disabled", true).is(
|
2895
|
+
( this.element.attr("disabled", true).is("[type='search'],:jqmData(type='search')") ? this.element.parent() : this.element ).addClass("ui-disabled");
|
2812
2896
|
},
|
2813
2897
|
|
2814
2898
|
enable: function() {
|
2815
|
-
( this.element.attr("disabled", false).is(
|
2899
|
+
( this.element.attr("disabled", false).is("[type='search'],:jqmData(type='search')") ? this.element.parent() : this.element ).removeClass("ui-disabled");
|
2816
2900
|
}
|
2817
2901
|
});
|
2818
2902
|
})(jQuery);
|
@@ -2839,7 +2923,7 @@
|
|
2839
2923
|
overlayTheme: 'a',
|
2840
2924
|
hidePlaceholderMenuItems: true,
|
2841
2925
|
closeText: 'Close',
|
2842
|
-
nativeMenu:
|
2926
|
+
nativeMenu: true
|
2843
2927
|
},
|
2844
2928
|
_create: function() {
|
2845
2929
|
|
@@ -2854,6 +2938,11 @@
|
|
2854
2938
|
|
2855
2939
|
label = $("label[for=" + selectID + "]").addClass("ui-select"),
|
2856
2940
|
|
2941
|
+
//IE throws an exception at options.item() function when
|
2942
|
+
//there is no selected item
|
2943
|
+
//select first in this case
|
2944
|
+
selectedIndex = select[0].selectedIndex == -1 ? 0 : select[0].selectedIndex,
|
2945
|
+
|
2857
2946
|
button = ( self.options.nativeMenu ? $("<div/>") : $("<a>", {
|
2858
2947
|
"href": "#",
|
2859
2948
|
"role": "button",
|
@@ -2861,7 +2950,7 @@
|
|
2861
2950
|
"aria-haspopup": "true",
|
2862
2951
|
"aria-owns": menuId
|
2863
2952
|
}) )
|
2864
|
-
.text($(select[0].options.item(
|
2953
|
+
.text($(select[0].options.item(selectedIndex)).text())
|
2865
2954
|
.insertBefore(select)
|
2866
2955
|
.buttonMarkup({
|
2867
2956
|
theme: o.theme,
|
@@ -2897,11 +2986,11 @@
|
|
2897
2986
|
//button theme
|
2898
2987
|
theme = /ui-btn-up-([a-z])/.exec(button.attr("class"))[1],
|
2899
2988
|
|
2900
|
-
menuPage = $("<div data-role='dialog' data-theme='" + o.menuPageTheme + "'>" +
|
2901
|
-
"<div data-role='header'>" +
|
2989
|
+
menuPage = $("<div data-" + $.mobile.ns + "role='dialog' data-" + $.mobile.ns + "theme='" + o.menuPageTheme + "'>" +
|
2990
|
+
"<div data-" + $.mobile.ns + "role='header'>" +
|
2902
2991
|
"<div class='ui-title'>" + label.text() + "</div>" +
|
2903
2992
|
"</div>" +
|
2904
|
-
"<div data-role='content'></div>" +
|
2993
|
+
"<div data-" + $.mobile.ns + "role='content'></div>" +
|
2905
2994
|
"</div>")
|
2906
2995
|
.appendTo($.mobile.pageContainer)
|
2907
2996
|
.page(),
|
@@ -2920,9 +3009,9 @@
|
|
2920
3009
|
"class": "ui-selectmenu-list",
|
2921
3010
|
"id": menuId,
|
2922
3011
|
"role": "listbox",
|
2923
|
-
"aria-labelledby": buttonId
|
2924
|
-
"data-theme": theme
|
3012
|
+
"aria-labelledby": buttonId
|
2925
3013
|
})
|
3014
|
+
.attr("data-" + $.mobile.ns + "theme", theme)
|
2926
3015
|
.appendTo(listbox),
|
2927
3016
|
|
2928
3017
|
header = $("<div>", {
|
@@ -2936,12 +3025,12 @@
|
|
2936
3025
|
.appendTo(header),
|
2937
3026
|
|
2938
3027
|
headerClose = $("<a>", {
|
2939
|
-
"data-iconpos": "notext",
|
2940
|
-
"data-icon": "delete",
|
2941
3028
|
"text": o.closeText,
|
2942
3029
|
"href": "#",
|
2943
3030
|
"class": "ui-btn-left"
|
2944
3031
|
})
|
3032
|
+
.attr("data-" + $.mobile.ns + "iconpos", "notext")
|
3033
|
+
.attr("data-" + $.mobile.ns + "icon", "delete")
|
2945
3034
|
.appendTo(header)
|
2946
3035
|
.buttonMarkup(),
|
2947
3036
|
|
@@ -3011,7 +3100,7 @@
|
|
3011
3100
|
.removeClass($.mobile.activeBtnClass);
|
3012
3101
|
});
|
3013
3102
|
|
3014
|
-
|
3103
|
+
|
3015
3104
|
} else {
|
3016
3105
|
|
3017
3106
|
//create list from select, update state
|
@@ -3028,11 +3117,11 @@
|
|
3028
3117
|
button
|
3029
3118
|
.bind("touchstart", function(event) {
|
3030
3119
|
//set startTouches to cached copy of
|
3031
|
-
$(this).
|
3120
|
+
$(this).jqmData("startTouches", $.extend({}, event.originalEvent.touches[ 0 ]));
|
3032
3121
|
})
|
3033
3122
|
.bind($.support.touch ? "touchend" : "mouseup", function(event) {
|
3034
3123
|
//if it's a scroll, don't open
|
3035
|
-
if ($(this).
|
3124
|
+
if ($(this).jqmData("moved")) {
|
3036
3125
|
$(this).removeData("moved");
|
3037
3126
|
} else {
|
3038
3127
|
self.open();
|
@@ -3042,12 +3131,12 @@
|
|
3042
3131
|
.bind("touchmove", function(event) {
|
3043
3132
|
//if touch moved enough, set data moved and don't open menu
|
3044
3133
|
var thisTouches = event.originalEvent.touches[ 0 ],
|
3045
|
-
startTouches = $(this).
|
3134
|
+
startTouches = $(this).jqmData("startTouches"),
|
3046
3135
|
deltaX = Math.abs(thisTouches.pageX - startTouches.pageX),
|
3047
3136
|
deltaY = Math.abs(thisTouches.pageY - startTouches.pageY);
|
3048
3137
|
|
3049
3138
|
if (deltaX > 10 || deltaY > 10) {
|
3050
|
-
$(this).
|
3139
|
+
$(this).jqmData("moved", true);
|
3051
3140
|
}
|
3052
3141
|
});
|
3053
3142
|
|
@@ -3088,22 +3177,10 @@
|
|
3088
3177
|
});
|
3089
3178
|
|
3090
3179
|
//events on "screen" overlay + close button
|
3091
|
-
screen
|
3092
|
-
.add(headerClose)
|
3093
|
-
.add(menuPageClose)
|
3094
|
-
.bind("click", function(event) {
|
3180
|
+
screen.click(function(event) {
|
3095
3181
|
self.close();
|
3096
|
-
event.preventDefault();
|
3097
|
-
|
3098
|
-
// if the dialog's close icon was clicked, prevent the dialog's close
|
3099
|
-
// handler from firing. selectmenu's should take precedence
|
3100
|
-
if ($.contains(menuPageClose[0], event.target)) {
|
3101
|
-
event.stopImmediatePropagation();
|
3102
|
-
}
|
3103
3182
|
});
|
3104
3183
|
}
|
3105
|
-
|
3106
|
-
|
3107
3184
|
},
|
3108
3185
|
|
3109
3186
|
_buildList: function() {
|
@@ -3131,13 +3208,13 @@
|
|
3131
3208
|
|
3132
3209
|
// has this optgroup already been built yet?
|
3133
3210
|
if ($.inArray(optLabel, optgroups) === -1) {
|
3134
|
-
lis.push("<li data-role='list-divider'>" + optLabel + "</li>");
|
3211
|
+
lis.push("<li data-" + $.mobile.ns + "role='list-divider'>" + optLabel + "</li>");
|
3135
3212
|
optgroups.push(optLabel);
|
3136
3213
|
}
|
3137
3214
|
}
|
3138
3215
|
|
3139
3216
|
//find placeholder text
|
3140
|
-
if (!this.getAttribute('value') || text.length == 0 || $this.
|
3217
|
+
if (!this.getAttribute('value') || text.length == 0 || $this.jqmData('placeholder')) {
|
3141
3218
|
if (o.hidePlaceholderMenuItems) {
|
3142
3219
|
classes.push("ui-selectmenu-placeholder");
|
3143
3220
|
}
|
@@ -3150,7 +3227,7 @@
|
|
3150
3227
|
extraAttrs.push("aria-disabled='true'");
|
3151
3228
|
}
|
3152
3229
|
|
3153
|
-
lis.push("<li data-icon='" + dataIcon + "' class='" + classes.join(" ") + "' " + extraAttrs.join(" ") + ">" + anchor + "</li>")
|
3230
|
+
lis.push("<li data-" + $.mobile.ns + "icon='" + dataIcon + "' class='" + classes.join(" ") + "' " + extraAttrs.join(" ") + ">" + anchor + "</li>")
|
3154
3231
|
});
|
3155
3232
|
|
3156
3233
|
self.list.html(lis.join(" "));
|
@@ -3184,7 +3261,7 @@
|
|
3184
3261
|
return options.index(this);
|
3185
3262
|
}).get();
|
3186
3263
|
|
3187
|
-
if (!self.options.nativeMenu && ( forceRebuild || select[0].options.length
|
3264
|
+
if (!self.options.nativeMenu && ( forceRebuild || select[0].options.length != self.list.find('li').length )) {
|
3188
3265
|
self._buildList();
|
3189
3266
|
}
|
3190
3267
|
|
@@ -3235,8 +3312,8 @@
|
|
3235
3312
|
}
|
3236
3313
|
|
3237
3314
|
var self = this,
|
3238
|
-
menuHeight = self.list.outerHeight(),
|
3239
|
-
menuWidth = self.list.outerWidth(),
|
3315
|
+
menuHeight = self.list.parent().outerHeight(),
|
3316
|
+
menuWidth = self.list.parent().outerWidth(),
|
3240
3317
|
scrollTop = $(window).scrollTop(),
|
3241
3318
|
btnOffset = self.button.offset().top,
|
3242
3319
|
screenHeight = window.innerHeight,
|
@@ -3246,6 +3323,11 @@
|
|
3246
3323
|
//add active class to button
|
3247
3324
|
self.button.addClass($.mobile.activeBtnClass);
|
3248
3325
|
|
3326
|
+
//remove after delay
|
3327
|
+
setTimeout(function() {
|
3328
|
+
self.button.removeClass($.mobile.activeBtnClass);
|
3329
|
+
}, 300);
|
3330
|
+
|
3249
3331
|
function focusMenuItem() {
|
3250
3332
|
self.list.find(".ui-btn-active").focus();
|
3251
3333
|
}
|
@@ -3257,7 +3339,7 @@
|
|
3257
3339
|
//for webos (set lastscroll using button offset)
|
3258
3340
|
if (scrollTop == 0 && btnOffset > screenHeight) {
|
3259
3341
|
self.thisPage.one('pagehide', function() {
|
3260
|
-
$(this).
|
3342
|
+
$(this).jqmData('lastScroll', btnOffset);
|
3261
3343
|
});
|
3262
3344
|
}
|
3263
3345
|
|
@@ -3287,7 +3369,8 @@
|
|
3287
3369
|
var roomtop = btnOffset - scrollTop,
|
3288
3370
|
roombot = scrollTop + screenHeight - btnOffset,
|
3289
3371
|
halfheight = menuHeight / 2,
|
3290
|
-
|
3372
|
+
maxwidth = parseFloat(self.list.parent().css('max-width')),
|
3373
|
+
newtop, newleft;
|
3291
3374
|
|
3292
3375
|
if (roomtop > menuHeight / 2 && roombot > menuHeight / 2) {
|
3293
3376
|
newtop = btnOffset + ( self.button.outerHeight() / 2 ) - halfheight;
|
@@ -3297,8 +3380,18 @@
|
|
3297
3380
|
newtop = roomtop > roombot ? scrollTop + screenHeight - menuHeight - 30 : scrollTop + 30;
|
3298
3381
|
}
|
3299
3382
|
|
3300
|
-
|
3301
|
-
|
3383
|
+
// if the menuwidth is smaller than the screen center is
|
3384
|
+
if (menuWidth < maxwidth) {
|
3385
|
+
newleft = (screenWidth - menuWidth) / 2;
|
3386
|
+
} else { //otherwise insure a >= 30px offset from the left
|
3387
|
+
newleft = self.button.offset().left + self.button.outerWidth() / 2 - menuWidth / 2;
|
3388
|
+
// 30px tolerance off the edges
|
3389
|
+
if (newleft < 30) {
|
3390
|
+
newleft = 30;
|
3391
|
+
} else if ((newleft + menuWidth) > screenWidth) {
|
3392
|
+
newleft = screenWidth - menuWidth - 30;
|
3393
|
+
}
|
3394
|
+
}
|
3302
3395
|
|
3303
3396
|
self.listbox
|
3304
3397
|
.append(self.list)
|
@@ -3327,9 +3420,6 @@
|
|
3327
3420
|
function focusButton() {
|
3328
3421
|
setTimeout(function() {
|
3329
3422
|
self.button.focus();
|
3330
|
-
|
3331
|
-
//remove active class from button
|
3332
|
-
self.button.removeClass($.mobile.activeBtnClass);
|
3333
3423
|
}, 40);
|
3334
3424
|
|
3335
3425
|
self.listbox.removeAttr('style').append(self.list);
|
@@ -3376,7 +3466,7 @@
|
|
3376
3466
|
$.fn.buttonMarkup = function(options) {
|
3377
3467
|
return this.each(function() {
|
3378
3468
|
var el = $(this),
|
3379
|
-
o = $.extend({}, $.fn.buttonMarkup.defaults, el.
|
3469
|
+
o = $.extend({}, $.fn.buttonMarkup.defaults, el.jqmData(), options),
|
3380
3470
|
|
3381
3471
|
// Classes Defined
|
3382
3472
|
buttonClass,
|
@@ -3430,7 +3520,7 @@
|
|
3430
3520
|
}
|
3431
3521
|
|
3432
3522
|
el
|
3433
|
-
.attr("data-theme", o.theme)
|
3523
|
+
.attr("data-" + $.mobile.ns + "theme", o.theme)
|
3434
3524
|
.addClass(buttonClass);
|
3435
3525
|
|
3436
3526
|
var wrap = ("<D class='" + innerClass + "'><D class='ui-btn-text'></D>" +
|
@@ -3451,19 +3541,19 @@
|
|
3451
3541
|
var attachEvents = function() {
|
3452
3542
|
$(".ui-btn:not(.ui-disabled)").live({
|
3453
3543
|
"touchstart mousedown": function() {
|
3454
|
-
var theme = $(this).attr("data-theme");
|
3544
|
+
var theme = $(this).attr("data-" + $.mobile.ns + "theme");
|
3455
3545
|
$(this).removeClass("ui-btn-up-" + theme).addClass("ui-btn-down-" + theme);
|
3456
3546
|
},
|
3457
3547
|
"touchmove touchend mouseup": function() {
|
3458
|
-
var theme = $(this).attr("data-theme");
|
3548
|
+
var theme = $(this).attr("data-" + $.mobile.ns + "theme");
|
3459
3549
|
$(this).removeClass("ui-btn-down-" + theme).addClass("ui-btn-up-" + theme);
|
3460
3550
|
},
|
3461
3551
|
"mouseover focus": function() {
|
3462
|
-
var theme = $(this).attr("data-theme");
|
3552
|
+
var theme = $(this).attr("data-" + $.mobile.ns + "theme");
|
3463
3553
|
$(this).removeClass("ui-btn-up-" + theme).addClass("ui-btn-hover-" + theme);
|
3464
3554
|
},
|
3465
3555
|
"mouseout blur": function() {
|
3466
|
-
var theme = $(this).attr("data-theme");
|
3556
|
+
var theme = $(this).attr("data-" + $.mobile.ns + "theme");
|
3467
3557
|
$(this).removeClass("ui-btn-hover-" + theme).addClass("ui-btn-up-" + theme);
|
3468
3558
|
}
|
3469
3559
|
});
|
@@ -3524,6 +3614,7 @@
|
|
3524
3614
|
});
|
3525
3615
|
});
|
3526
3616
|
}
|
3617
|
+
this.refresh();
|
3527
3618
|
|
3528
3619
|
},
|
3529
3620
|
|
@@ -3537,6 +3628,15 @@
|
|
3537
3628
|
this.element.attr("disabled", true);
|
3538
3629
|
this.button.addClass("ui-disabled").attr("aria-disabled", true);
|
3539
3630
|
return this._setOption("disabled", true);
|
3631
|
+
},
|
3632
|
+
|
3633
|
+
refresh: function() {
|
3634
|
+
if (this.element.attr('disabled')) {
|
3635
|
+
this.disable();
|
3636
|
+
}
|
3637
|
+
else {
|
3638
|
+
this.enable();
|
3639
|
+
}
|
3540
3640
|
}
|
3541
3641
|
});
|
3542
3642
|
})(jQuery);
|
@@ -3853,7 +3953,7 @@
|
|
3853
3953
|
collapsibleContain = $el.addClass('ui-collapsible-contain'),
|
3854
3954
|
collapsibleHeading = $el.find(o.heading).eq(0),
|
3855
3955
|
collapsibleContent = collapsibleContain.wrapInner('<div class="ui-collapsible-content"></div>').find('.ui-collapsible-content'),
|
3856
|
-
collapsibleParent = $el.closest(
|
3956
|
+
collapsibleParent = $el.closest(":jqmData(role='collapsible-set')").addClass('ui-collapsible-set');
|
3857
3957
|
|
3858
3958
|
//replace collapsibleHeading if it's a legend
|
3859
3959
|
if (collapsibleHeading.is('legend')) {
|
@@ -3894,7 +3994,7 @@
|
|
3894
3994
|
.addClass('ui-corner-all');
|
3895
3995
|
}
|
3896
3996
|
else {
|
3897
|
-
if (collapsibleContain.
|
3997
|
+
if (collapsibleContain.jqmData('collapsible-last')) {
|
3898
3998
|
collapsibleHeading
|
3899
3999
|
.find('a:eq(0), .ui-btn-inner')
|
3900
4000
|
.addClass('ui-corner-bottom');
|
@@ -3914,7 +4014,7 @@
|
|
3914
4014
|
collapsibleHeading.find('.ui-icon').removeClass('ui-icon-minus').addClass('ui-icon-plus');
|
3915
4015
|
collapsibleContent.addClass('ui-collapsible-content-collapsed').attr('aria-hidden', true);
|
3916
4016
|
|
3917
|
-
if (collapsibleContain.
|
4017
|
+
if (collapsibleContain.jqmData('collapsible-last')) {
|
3918
4018
|
collapsibleHeading
|
3919
4019
|
.find('a:eq(0), .ui-btn-inner')
|
3920
4020
|
.addClass('ui-corner-bottom');
|
@@ -3932,7 +4032,7 @@
|
|
3932
4032
|
collapsibleHeading.find('.ui-icon').removeClass('ui-icon-plus').addClass('ui-icon-minus');
|
3933
4033
|
collapsibleContent.removeClass('ui-collapsible-content-collapsed').attr('aria-hidden', false);
|
3934
4034
|
|
3935
|
-
if (collapsibleContain.
|
4035
|
+
if (collapsibleContain.jqmData('collapsible-last')) {
|
3936
4036
|
collapsibleHeading
|
3937
4037
|
.find('a:eq(0), .ui-btn-inner')
|
3938
4038
|
.removeClass('ui-corner-bottom');
|
@@ -3944,16 +4044,16 @@
|
|
3944
4044
|
|
3945
4045
|
|
3946
4046
|
//close others in a set
|
3947
|
-
if (collapsibleParent.length && !collapsibleParent.
|
4047
|
+
if (collapsibleParent.length && !collapsibleParent.jqmData("collapsiblebound")) {
|
3948
4048
|
collapsibleParent
|
3949
|
-
.
|
4049
|
+
.jqmData("collapsiblebound", true)
|
3950
4050
|
.bind("expand", function(event) {
|
3951
4051
|
$(this).find(".ui-collapsible-contain")
|
3952
4052
|
.not($(event.target).closest(".ui-collapsible-contain"))
|
3953
4053
|
.not("> .ui-collapsible-contain .ui-collapsible-contain")
|
3954
4054
|
.trigger("collapse");
|
3955
|
-
})
|
3956
|
-
var set = collapsibleParent.find(
|
4055
|
+
});
|
4056
|
+
var set = collapsibleParent.find(":jqmData(role=collapsible)")
|
3957
4057
|
|
3958
4058
|
set.first()
|
3959
4059
|
.find('a:eq(0)')
|
@@ -3961,7 +4061,7 @@
|
|
3961
4061
|
.find('.ui-btn-inner')
|
3962
4062
|
.addClass('ui-corner-top');
|
3963
4063
|
|
3964
|
-
set.last().
|
4064
|
+
set.last().jqmData('collapsible-last', true)
|
3965
4065
|
}
|
3966
4066
|
|
3967
4067
|
collapsibleHeading
|
@@ -3992,7 +4092,7 @@
|
|
3992
4092
|
|
3993
4093
|
return this.each(function() {
|
3994
4094
|
var o = $.extend({
|
3995
|
-
direction: $(this).
|
4095
|
+
direction: $(this).jqmData("type") || "vertical",
|
3996
4096
|
shadow: false
|
3997
4097
|
}, options);
|
3998
4098
|
var groupheading = $(this).find('>legend'),
|
@@ -4148,25 +4248,18 @@
|
|
4148
4248
|
}
|
4149
4249
|
});
|
4150
4250
|
|
4151
|
-
// tapping the whole LI triggers click on the first link
|
4152
|
-
$list.delegate("li", "click", function(event) {
|
4153
|
-
if (!$(event.target).closest("a").length) {
|
4154
|
-
$(this).find("a").first().trigger("click");
|
4155
|
-
return false;
|
4156
|
-
}
|
4157
|
-
});
|
4158
4251
|
},
|
4159
4252
|
|
4160
4253
|
_itemApply: function($list, item) {
|
4161
4254
|
// TODO class has to be defined in markup
|
4162
4255
|
item.find(".ui-li-count")
|
4163
|
-
.addClass("ui-btn-up-" + ($list.
|
4256
|
+
.addClass("ui-btn-up-" + ($list.jqmData("counttheme") || this.options.countTheme) + " ui-btn-corner-all");
|
4164
4257
|
|
4165
4258
|
item.find("h1, h2, h3, h4, h5, h6").addClass("ui-li-heading");
|
4166
4259
|
|
4167
4260
|
item.find("p, dl").addClass("ui-li-desc");
|
4168
4261
|
|
4169
|
-
|
4262
|
+
$list.find("li").find(">img:eq(0), >a:first>img:eq(0)").addClass("ui-li-thumb").each(function() {
|
4170
4263
|
$(this).closest("li")
|
4171
4264
|
.addClass($(this).is(".ui-li-icon") ? "ui-li-has-icon" : "ui-li-has-thumb");
|
4172
4265
|
});
|
@@ -4196,7 +4289,7 @@
|
|
4196
4289
|
var o = this.options,
|
4197
4290
|
$list = this.element,
|
4198
4291
|
self = this,
|
4199
|
-
dividertheme = $list.
|
4292
|
+
dividertheme = $list.jqmData("dividertheme") || o.dividerTheme,
|
4200
4293
|
li = $list.children("li"),
|
4201
4294
|
counter = $.support.cssPseudoElement || !$.nodeName($list[0], "ol") ? 0 : 1;
|
4202
4295
|
|
@@ -4208,6 +4301,7 @@
|
|
4208
4301
|
|
4209
4302
|
li.first().attr("tabindex", "0");
|
4210
4303
|
|
4304
|
+
|
4211
4305
|
li.each(function(pos) {
|
4212
4306
|
var item = $(this),
|
4213
4307
|
itemClass = "ui-li";
|
@@ -4217,12 +4311,12 @@
|
|
4217
4311
|
return;
|
4218
4312
|
}
|
4219
4313
|
|
4220
|
-
var itemTheme = item.
|
4314
|
+
var itemTheme = item.jqmData("theme") || o.theme;
|
4221
4315
|
|
4222
4316
|
var a = item.find("a");
|
4223
4317
|
|
4224
4318
|
if (a.length) {
|
4225
|
-
var icon = item.
|
4319
|
+
var icon = item.jqmData("icon");
|
4226
4320
|
|
4227
4321
|
item
|
4228
4322
|
.buttonMarkup({
|
@@ -4240,7 +4334,7 @@
|
|
4240
4334
|
itemClass += " ui-li-has-alt";
|
4241
4335
|
|
4242
4336
|
var last = a.last(),
|
4243
|
-
splittheme = $list.
|
4337
|
+
splittheme = $list.jqmData("splittheme") || last.jqmData("theme") || o.splitTheme;
|
4244
4338
|
|
4245
4339
|
last
|
4246
4340
|
.appendTo(item)
|
@@ -4260,11 +4354,11 @@
|
|
4260
4354
|
corners: true,
|
4261
4355
|
theme: splittheme,
|
4262
4356
|
iconpos: "notext",
|
4263
|
-
icon: $list.
|
4357
|
+
icon: $list.jqmData("spliticon") || last.jqmData("icon") || o.splitIcon
|
4264
4358
|
}));
|
4265
4359
|
}
|
4266
4360
|
|
4267
|
-
} else if (item.
|
4361
|
+
} else if (item.jqmData("role") === "list-divider") {
|
4268
4362
|
itemClass += " ui-li-divider ui-btn ui-bar-" + dividertheme;
|
4269
4363
|
item.attr("role", "heading");
|
4270
4364
|
|
@@ -4319,7 +4413,7 @@
|
|
4319
4413
|
.prepend("<span class='ui-li-dec'>" + (counter++) + ". </span>");
|
4320
4414
|
}
|
4321
4415
|
|
4322
|
-
item.addClass(itemClass);
|
4416
|
+
item.add(item.find(".ui-btn-inner")).addClass(itemClass);
|
4323
4417
|
|
4324
4418
|
if (!create) {
|
4325
4419
|
self._itemApply($list, item);
|
@@ -4335,10 +4429,10 @@
|
|
4335
4429
|
_createSubPages: function() {
|
4336
4430
|
var parentList = this.element,
|
4337
4431
|
parentPage = parentList.closest(".ui-page"),
|
4338
|
-
parentId = parentPage.
|
4432
|
+
parentId = parentPage.jqmData("url"),
|
4339
4433
|
o = this.options,
|
4340
4434
|
self = this,
|
4341
|
-
persistentFooterID = parentPage.find("
|
4435
|
+
persistentFooterID = parentPage.find(":jqmData(role='footer')").jqmData("id");
|
4342
4436
|
|
4343
4437
|
$(parentList.find("ul, ol").toArray().reverse()).each(
|
4344
4438
|
function(i) {
|
@@ -4346,21 +4440,18 @@
|
|
4346
4440
|
parent = list.parent(),
|
4347
4441
|
title = $.trim(parent.contents()[ 0 ].nodeValue) || parent.find('a:first').text(),
|
4348
4442
|
id = parentId + "&" + $.mobile.subPageUrlKey + "=" + self._idStringEscape(title + " " + i),
|
4349
|
-
theme = list.
|
4350
|
-
countTheme = list.
|
4351
|
-
newPage = list.wrap("<div data-role='page'><div data-role='content'></div></div>")
|
4443
|
+
theme = list.jqmData("theme") || o.theme,
|
4444
|
+
countTheme = list.jqmData("counttheme") || parentList.jqmData("counttheme") || o.countTheme,
|
4445
|
+
newPage = list.wrap("<div data-" + $.mobile.ns + "role='page'><div data-" + $.mobile.ns + "role='content'></div></div>")
|
4352
4446
|
.parent()
|
4353
|
-
.before("<div
|
4354
|
-
.after(persistentFooterID ? $("<div
|
4447
|
+
.before("<div data-" + $.mobile.ns + "role='header' data-" + $.mobile.ns + "theme='" + o.headerTheme + "'><div class='ui-title'>" + title + "</div></div>")
|
4448
|
+
.after(persistentFooterID ? $("<div data-" + $.mobile.ns + "role='footer' data-" + $.mobile.ns + "id='" + persistentFooterID + "'>") : "")
|
4355
4449
|
.parent()
|
4356
|
-
.attr(
|
4357
|
-
|
4358
|
-
|
4359
|
-
"data-count-theme": countTheme
|
4360
|
-
})
|
4450
|
+
.attr("data-" + $.mobile.ns + "url", id)
|
4451
|
+
.attr("data-" + $.mobile.ns + "theme", theme)
|
4452
|
+
.attr("data-" + $.mobile.ns + "count-theme", countTheme)
|
4361
4453
|
.appendTo($.mobile.pageContainer);
|
4362
4454
|
|
4363
|
-
|
4364
4455
|
newPage.page();
|
4365
4456
|
var anchor = parent.find('a:first');
|
4366
4457
|
if (!anchor.length) {
|
@@ -4384,9 +4475,10 @@
|
|
4384
4475
|
|
4385
4476
|
$.mobile.listview.prototype.options.filter = false;
|
4386
4477
|
|
4387
|
-
$("
|
4478
|
+
$(":jqmData(role='listview')").live("listviewcreate", function() {
|
4388
4479
|
var list = $(this),
|
4389
4480
|
listview = list.data("listview");
|
4481
|
+
|
4390
4482
|
if (!listview.options.filter) {
|
4391
4483
|
return;
|
4392
4484
|
}
|
@@ -4394,9 +4486,9 @@
|
|
4394
4486
|
var wrapper = $("<form>", { "class": "ui-listview-filter ui-bar-c", "role": "search" }),
|
4395
4487
|
|
4396
4488
|
search = $("<input>", {
|
4397
|
-
placeholder: "Filter results..."
|
4398
|
-
"data-type": "search"
|
4489
|
+
placeholder: "Filter results..."
|
4399
4490
|
})
|
4491
|
+
.attr("data-" + $.mobile.ns + "type", "search")
|
4400
4492
|
.bind("keyup change", function() {
|
4401
4493
|
var val = this.value.toLowerCase(),
|
4402
4494
|
listItems = list.children();
|
@@ -4409,7 +4501,7 @@
|
|
4409
4501
|
|
4410
4502
|
for (var i = listItems.length; i >= 0; i--) {
|
4411
4503
|
item = $(listItems[i]);
|
4412
|
-
if (item.is("li
|
4504
|
+
if (item.is("li:jqmData(role=list-divider)")) {
|
4413
4505
|
if (!childItems) {
|
4414
4506
|
item.hide();
|
4415
4507
|
}
|
@@ -4427,6 +4519,10 @@
|
|
4427
4519
|
.appendTo(wrapper)
|
4428
4520
|
.textinput();
|
4429
4521
|
|
4522
|
+
if ($(this).jqmData("inset")) {
|
4523
|
+
wrapper.addClass("ui-listview-filter-inset");
|
4524
|
+
}
|
4525
|
+
|
4430
4526
|
wrapper.insertBefore(list);
|
4431
4527
|
});
|
4432
4528
|
|
@@ -4451,14 +4547,14 @@
|
|
4451
4547
|
//add ARIA role
|
4452
4548
|
.attr("role", "dialog")
|
4453
4549
|
.addClass('ui-page ui-dialog ui-body-a')
|
4454
|
-
.find(
|
4550
|
+
.find(":jqmData(role=header)")
|
4455
4551
|
.addClass('ui-corner-top ui-overlay-shadow')
|
4456
|
-
.prepend(
|
4552
|
+
.prepend("<a href='#' data-" + $.mobile.ns + "icon='delete' data-" + $.mobile.ns + "rel='back' data-" + $.mobile.ns + "iconpos='notext'>Close</a>")
|
4457
4553
|
.end()
|
4458
4554
|
.find('.ui-content:not([class*="ui-body-"])')
|
4459
4555
|
.addClass('ui-body-c')
|
4460
4556
|
.end()
|
4461
|
-
.find(
|
4557
|
+
.find(".ui-content,:jqmData(role='footer')")
|
4462
4558
|
.last()
|
4463
4559
|
.addClass('ui-corner-bottom ui-overlay-shadow');
|
4464
4560
|
|
@@ -4477,10 +4573,10 @@
|
|
4477
4573
|
$targetel = $(e.target).closest("form");
|
4478
4574
|
}
|
4479
4575
|
|
4480
|
-
if ($targetel.length && !$targetel.
|
4576
|
+
if ($targetel.length && !$targetel.jqmData("transition")) {
|
4481
4577
|
$targetel
|
4482
|
-
.attr("data-transition", $.mobile.urlHistory.getActive().transition)
|
4483
|
-
.attr("data-direction", "reverse");
|
4578
|
+
.attr("data-" + $.mobile.ns + "transition", $.mobile.urlHistory.getActive().transition)
|
4579
|
+
.attr("data-" + $.mobile.ns + "direction", "reverse");
|
4484
4580
|
}
|
4485
4581
|
});
|
4486
4582
|
|
@@ -4508,7 +4604,7 @@
|
|
4508
4604
|
_create: function() {
|
4509
4605
|
var $navbar = this.element,
|
4510
4606
|
$navbtns = $navbar.find("a"),
|
4511
|
-
iconpos = $navbtns.filter(
|
4607
|
+
iconpos = $navbtns.filter(":jqmData(icon)").length ? this.options.iconpos : undefined;
|
4512
4608
|
|
4513
4609
|
$navbar
|
4514
4610
|
.addClass('ui-navbar')
|
@@ -4550,7 +4646,7 @@
|
|
4550
4646
|
|
4551
4647
|
|
4552
4648
|
var $kids = $(this).children(),
|
4553
|
-
gridCols = {a:
|
4649
|
+
gridCols = {solo:1, a:2, b:3, c:4, d:5},
|
4554
4650
|
grid = o.grid,
|
4555
4651
|
iterator;
|
4556
4652
|
|
@@ -4571,8 +4667,9 @@
|
|
4571
4667
|
$(this).addClass('ui-grid-' + grid);
|
4572
4668
|
|
4573
4669
|
$kids.filter(':nth-child(' + iterator + 'n+1)').addClass('ui-block-a');
|
4574
|
-
|
4575
|
-
|
4670
|
+
if (iterator > 1) {
|
4671
|
+
$kids.filter(':nth-child(' + iterator + 'n+2)').addClass('ui-block-b');
|
4672
|
+
}
|
4576
4673
|
if (iterator > 2) {
|
4577
4674
|
$kids.filter(':nth-child(3n+3)').addClass('ui-block-c');
|
4578
4675
|
}
|
@@ -4587,8 +4684,6 @@
|
|
4587
4684
|
};
|
4588
4685
|
})(jQuery);
|
4589
4686
|
|
4590
|
-
|
4591
|
-
|
4592
4687
|
/*!
|
4593
4688
|
* jQuery Mobile v@VERSION
|
4594
4689
|
* http://jquerymobile.com/
|
@@ -4617,17 +4712,17 @@
|
|
4617
4712
|
$html.addClass("ui-mobile ui-mobile-rendering");
|
4618
4713
|
|
4619
4714
|
//define & prepend meta viewport tag, if content is defined
|
4620
|
-
|
4715
|
+
//NOTE: this is now deprecated. We recommend placing the meta viewport element in
|
4716
|
+
//the markup from the start.
|
4717
|
+
$.mobile.metaViewportContent && !$head.find("meta[name='viewport']").length ? $("<meta>", { name: "viewport", content: $.mobile.metaViewportContent}).prependTo($head) : undefined;
|
4621
4718
|
|
4622
4719
|
//loading div which appears during Ajax requests
|
4623
4720
|
//will not appear if $.mobile.loadingMessage is false
|
4624
|
-
var $loader = $.mobile.loadingMessage ?
|
4625
|
-
$("<div class='ui-loader ui-body-a ui-corner-all'>" +
|
4626
|
-
"<span class='ui-icon ui-icon-loading spin'></span>" +
|
4627
|
-
"<h1>" + $.mobile.loadingMessage + "</h1>" +
|
4628
|
-
"</div>")
|
4629
|
-
: undefined;
|
4721
|
+
var $loader = $.mobile.loadingMessage ? $("<div class='ui-loader ui-body-a ui-corner-all'>" + "<span class='ui-icon ui-icon-loading spin'></span>" + "<h1>" + $.mobile.loadingMessage + "</h1>" + "</div>") : undefined;
|
4630
4722
|
|
4723
|
+
if (typeof $loader === "undefined") {
|
4724
|
+
alert($.mobile.loadingMessage);
|
4725
|
+
}
|
4631
4726
|
|
4632
4727
|
$.extend($.mobile, {
|
4633
4728
|
// turn on/off page loading message.
|
@@ -4638,6 +4733,11 @@
|
|
4638
4733
|
if ($.mobile.loadingMessage) {
|
4639
4734
|
var activeBtn = $("." + $.mobile.activeBtnClass).first();
|
4640
4735
|
|
4736
|
+
|
4737
|
+
if (typeof $loader === "undefined") {
|
4738
|
+
alert($.mobile.loadingMessage);
|
4739
|
+
}
|
4740
|
+
|
4641
4741
|
$loader
|
4642
4742
|
.appendTo($.mobile.pageContainer)
|
4643
4743
|
//position at y center (if scrollTop supported), above the activeBtn (if defined), or just 100px from top
|
@@ -4654,15 +4754,15 @@
|
|
4654
4754
|
// find and enhance the pages in the dom and transition to the first page.
|
4655
4755
|
initializePage: function() {
|
4656
4756
|
//find present pages
|
4657
|
-
var $pages = $("
|
4757
|
+
var $pages = $(":jqmData(role='page')");
|
4658
4758
|
|
4659
4759
|
//add dialogs, set data-url attrs
|
4660
|
-
$pages.add("
|
4760
|
+
$pages.add(":jqmData(role='dialog')").each(function() {
|
4661
4761
|
var $this = $(this);
|
4662
4762
|
|
4663
4763
|
// unless the data url is already set set it to the id
|
4664
|
-
if (!$this.
|
4665
|
-
$this.attr("data-url", $this.attr("id"));
|
4764
|
+
if (!$this.jqmData('url')) {
|
4765
|
+
$this.attr("data-" + $.mobile.ns + "url", $this.attr("id"));
|
4666
4766
|
}
|
4667
4767
|
});
|
4668
4768
|
|
@@ -4698,25 +4798,24 @@
|
|
4698
4798
|
//quick & dirty theme switcher, written to potentially work as a bookmarklet
|
4699
4799
|
(function($) {
|
4700
4800
|
$.themeswitcher = function() {
|
4701
|
-
if ($('[data-url=themeswitcher]').length) {
|
4801
|
+
if ($('[data-' + $.mobile.ns + '-url=themeswitcher]').length) {
|
4702
4802
|
return;
|
4703
4803
|
}
|
4704
|
-
var
|
4705
|
-
themesDir = '/stylesheets/compiled/jquery/mobile/',
|
4804
|
+
var themesDir = '/stylesheets/compiled/jquery/mobile/',
|
4706
4805
|
themes = ['default','valencia'],
|
4707
4806
|
currentPage = $.mobile.activePage,
|
4708
|
-
menuPage = $('<div data-url="themeswitcher" data-role=\'dialog\' data-theme=\'a\'>' +
|
4709
|
-
'<div data-role=\'header\' data-theme=\'b\'>' +
|
4807
|
+
menuPage = $('<div data-' + $.mobile.ns + 'url="themeswitcher" data-' + $.mobile.ns + 'role=\'dialog\' data-' + $.mobile.ns + 'theme=\'a\'>' +
|
4808
|
+
'<div data-' + $.mobile.ns + 'role=\'header\' data-' + $.mobile.ns + 'theme=\'b\'>' +
|
4710
4809
|
'<div class=\'ui-title\'>Switch Theme:</div>' +
|
4711
4810
|
'</div>' +
|
4712
|
-
'<div data-role=\'content\' data-theme=\'c\'><ul data-role=\'listview\' data-inset=\'true\'></ul></div>' +
|
4811
|
+
'<div data-' + $.mobile.ns + 'role=\'content\' data-' + $.mobile.ns + 'theme=\'c\'><ul data-' + $.mobile.ns + 'role=\'listview\' data-' + $.mobile.ns + 'inset=\'true\'></ul></div>' +
|
4713
4812
|
'</div>')
|
4714
4813
|
.appendTo($.mobile.pageContainer),
|
4715
4814
|
menu = menuPage.find('ul');
|
4716
4815
|
|
4717
4816
|
//menu items
|
4718
4817
|
$.each(themes, function(i) {
|
4719
|
-
$('<li><a href="#" data-rel="back">' + themes[ i ].charAt(0).toUpperCase() + themes[ i ].substr(1) + '</a></li>')
|
4818
|
+
$('<li><a href="#" data-' + $.mobile.ns + 'rel="back">' + themes[ i ].charAt(0).toUpperCase() + themes[ i ].substr(1) + '</a></li>')
|
4720
4819
|
.click(function() {
|
4721
4820
|
addTheme(themes[i]);
|
4722
4821
|
return false;
|
@@ -4726,7 +4825,7 @@
|
|
4726
4825
|
|
4727
4826
|
//remover, adder
|
4728
4827
|
function addTheme(theme) {
|
4729
|
-
$('head').append('<link rel=\'stylesheet\' href=\'' + themesDir + theme + '
|
4828
|
+
$('head').append('<link rel=\'stylesheet\' href=\'' + themesDir + theme + '/\' />');
|
4730
4829
|
}
|
4731
4830
|
|
4732
4831
|
//create page, listview
|