compass-jquery-plugin 0.3.2.8 → 0.3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +24 -6
- data/VERSION.yml +3 -3
- data/lib/jquery/gridify/grid_column.rb +6 -6
- data/lib/jquery/gridify/grid_options.rb +4 -4
- data/lib/jquery/mark_it_up.rb +2 -0
- data/lib/jquery/mobile.rb +0 -1
- data/templates/dynatree/jquery.dynatree.js +2896 -2880
- data/templates/dynatree/jquery.dynatree.min.js +55 -54
- data/templates/dynatree/jquery/dynatree/aero.scss +4 -2
- data/templates/dynatree/jquery/dynatree/aqua.scss +4 -2
- data/templates/dynatree/jquery/dynatree/crystal.scss +4 -2
- data/templates/dynatree/jquery/dynatree/xp.scss +5 -3
- data/templates/emulators/emulators/bb.playbook.landscape.png +0 -0
- data/templates/emulators/emulators/bb.playbook.landscape.scss +18 -0
- data/templates/emulators/emulators/bb.playbook.portrait.png +0 -0
- data/templates/emulators/emulators/bb.playbook.portrait.scss +18 -0
- data/templates/emulators/emulators/{blackberry.torch.landscape.png → bb.torch.landscape.png} +0 -0
- data/templates/emulators/emulators/{blackberry.torch.landscape.scss → bb.torch.landscape.scss} +1 -3
- data/templates/emulators/emulators/{blackberry.torch.portrait.png → bb.torch.portrait.png} +0 -0
- data/templates/emulators/emulators/{blackberry.torch.portrait.scss → bb.torch.portrait.scss} +1 -3
- data/templates/emulators/emulators/galaxy.ace.landscape.png +0 -0
- data/templates/emulators/emulators/galaxy.ace.landscape.scss +18 -0
- data/templates/emulators/emulators/galaxy.ace.portrait.png +0 -0
- data/templates/emulators/emulators/galaxy.ace.portrait.scss +18 -0
- data/templates/emulators/emulators/galaxy.s.landscape.scss +0 -2
- data/templates/emulators/emulators/galaxy.s.portrait.scss +0 -2
- data/templates/emulators/emulators/galaxy.s2.landscape.scss +0 -2
- data/templates/emulators/emulators/galaxy.s2.portrait.scss +0 -2
- data/templates/emulators/emulators/galaxy.tab.10.1.landscape.scss +0 -2
- data/templates/emulators/emulators/galaxy.tab.10.1.portrait.scss +0 -2
- data/templates/emulators/emulators/galaxy.tab.7.landscape.scss +0 -2
- data/templates/emulators/emulators/galaxy.tab.7.portrait.scss +0 -2
- data/templates/emulators/emulators/galaxy.tab.8.9.landscape.scss +0 -2
- data/templates/emulators/emulators/galaxy.tab.8.9.portrait.scss +0 -2
- data/templates/emulators/emulators/htc.sensation.landscape.png +0 -0
- data/templates/emulators/emulators/htc.sensation.landscape.scss +18 -0
- data/templates/emulators/emulators/htc.sensation.portrait.png +0 -0
- data/templates/emulators/emulators/htc.sensation.portrait.scss +18 -0
- data/templates/emulators/emulators/ipad.landscape.scss +0 -2
- data/templates/emulators/emulators/ipad.portrait.scss +0 -2
- data/templates/emulators/emulators/iphone.3.landscape.scss +0 -2
- data/templates/emulators/emulators/iphone.3.portrait.scss +0 -2
- data/templates/emulators/emulators/{iphone.4.landscape .scss → iphone.4.landscape.scss} +0 -2
- data/templates/emulators/emulators/iphone.4.portrait.scss +0 -2
- data/templates/emulators/emulators/palm.pre.2.landscape.scss +0 -2
- data/templates/emulators/emulators/palm.pre.2.portrait.scss +0 -2
- data/templates/emulators/manifest.rb +17 -5
- data/templates/graphics/highcharts/dark-blue.js +159 -159
- data/templates/graphics/highcharts/dark-green.js +159 -159
- data/templates/graphics/highcharts/gray.js +154 -154
- data/templates/graphics/highcharts/grid.js +84 -84
- data/templates/graphics/highcharts/highslide-config.js +2 -2
- data/templates/graphics/highcharts/highslide-full.js +3310 -3310
- data/templates/graphics/highcharts/skies.js +72 -72
- data/templates/graphics/jquery.ganttView.js +1550 -1550
- data/templates/graphics/jquery.highcharts.js +11277 -11285
- data/templates/graphics/jquery.sparkline.js +1072 -1072
- data/templates/ical/jquery.ical.js +7637 -7637
- data/templates/ical/jquery/ical.print.scss +3 -3
- data/templates/jqgrid/i18n/jqgrid/locale-ar.js +127 -127
- data/templates/jqgrid/i18n/jqgrid/locale-bg.js +131 -131
- data/templates/jqgrid/i18n/jqgrid/locale-bg1251.js +131 -131
- data/templates/jqgrid/i18n/jqgrid/locale-cat.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-cn.js +132 -132
- data/templates/jqgrid/i18n/jqgrid/locale-cs.js +129 -129
- data/templates/jqgrid/i18n/jqgrid/locale-da.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-de.js +134 -134
- data/templates/jqgrid/i18n/jqgrid/locale-el.js +127 -127
- data/templates/jqgrid/i18n/jqgrid/locale-en.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-es.js +129 -129
- data/templates/jqgrid/i18n/jqgrid/locale-fa.js +141 -141
- data/templates/jqgrid/i18n/jqgrid/locale-fi.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-fr.js +127 -127
- data/templates/jqgrid/i18n/jqgrid/locale-gl.js +127 -127
- data/templates/jqgrid/i18n/jqgrid/locale-he.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-hu.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-is.js +127 -127
- data/templates/jqgrid/i18n/jqgrid/locale-it.js +6 -6
- data/templates/jqgrid/i18n/jqgrid/locale-ja.js +153 -153
- data/templates/jqgrid/i18n/jqgrid/locale-lt.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-mne.js +134 -0
- data/templates/jqgrid/i18n/jqgrid/locale-mne.min.js +7 -0
- data/templates/jqgrid/i18n/jqgrid/locale-nl.js +145 -145
- data/templates/jqgrid/i18n/jqgrid/locale-no.js +12 -12
- data/templates/jqgrid/i18n/jqgrid/locale-pl.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-pt-br.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-pt.js +126 -126
- data/templates/jqgrid/i18n/jqgrid/locale-ro.js +140 -140
- data/templates/jqgrid/i18n/jqgrid/locale-ru.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-sk.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-sr.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-sv.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-tr.js +127 -127
- data/templates/jqgrid/i18n/jqgrid/locale-ua.js +128 -128
- data/templates/jqgrid/jquery.jqGrid.js +13477 -13443
- data/templates/jqgrid/jquery.jqGrid.min.js +292 -287
- data/templates/jqgrid/jquery/jqGrid.scss +13 -12
- data/templates/jqgrid/manifest.rb +2 -0
- data/templates/jqtouch/jquery.jqtouch.js +9601 -9556
- data/templates/jqtouch/jquery.jqtouch.min.js +3 -3
- data/templates/jqtouch/jquery/touch/default.scss +2 -2
- data/templates/jqtouch/jquery/touch/jqt.scss +2 -2
- data/templates/jqtouch/jquery/touch/jqtouch.scss +26 -5
- data/templates/jquery/amplify.store.js +211 -211
- data/templates/jquery/config/initializers/jquery.rb +2 -0
- data/templates/jquery/history.adapter.jquery.js +42 -36
- data/templates/jquery/history.html4.js +563 -563
- data/templates/jquery/history.html4.min.js +5 -5
- data/templates/jquery/history.js +1721 -1694
- data/templates/jquery/history.min.js +28 -27
- data/templates/jquery/i18n/jquery.ui/datepicker-af.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-ar-DZ.js +18 -18
- data/templates/jquery/i18n/jquery.ui/datepicker-ar.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-az.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-bg.js +21 -21
- data/templates/jquery/i18n/jquery.ui/datepicker-bs.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-ca.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-cs.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-da.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-de.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-el.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-en-AU.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-en-GB.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-en-NZ.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-eo.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-es.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-et.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-eu.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-fa.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-fi.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-fo.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-fr-CH.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-fr.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-gl.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-he.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-hr.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-hu.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-hy.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-id.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-is.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-it.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-ja.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-ko.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-kz.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-lt.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-lv.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-ml.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-ms.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-nl.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-nl.min.js +1 -1
- data/templates/jquery/i18n/jquery.ui/datepicker-no.js +18 -18
- data/templates/jquery/i18n/jquery.ui/datepicker-pl.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-pt-BR.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-pt.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-rm.js +17 -17
- data/templates/jquery/i18n/jquery.ui/datepicker-ro.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-ru.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-sk.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-sk.min.js +1 -1
- data/templates/jquery/i18n/jquery.ui/datepicker-sl.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-sq.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-sr-SR.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-sr.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-sv.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-ta.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-th.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-tj.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-tr.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-uk.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-vi.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-zh-CN.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-zh-HK.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-zh-TW.js +20 -20
- data/templates/jquery/jquery-ui.js +11913 -11882
- data/templates/jquery/jquery-ui.min.js +340 -339
- data/templates/jquery/jquery.bgiframe.js +27 -27
- data/templates/jquery/jquery.contextMenu.js +202 -202
- data/templates/jquery/jquery.cookie.js +26 -26
- data/templates/jquery/jquery.dotimeout.js +227 -227
- data/templates/jquery/jquery.dst.js +89 -89
- data/templates/jquery/jquery.easing.js +226 -0
- data/templates/jquery/jquery.easing.min.js +8 -0
- data/templates/jquery/jquery.farbtastic.js +294 -294
- data/templates/jquery/jquery.flashMessages.js +14 -14
- data/templates/jquery/jquery.form.js +761 -761
- data/templates/jquery/jquery.haml.js +247 -247
- data/templates/jquery/jquery.hotkeys.js +79 -79
- data/templates/jquery/jquery.js +1490 -928
- data/templates/jquery/jquery.layout.js +2454 -2454
- data/templates/jquery/jquery.mediahelpers.js +216 -0
- data/templates/jquery/jquery.mediahelpers.min.js +3 -0
- data/templates/jquery/jquery.min.js +177 -166
- data/templates/jquery/jquery.mousewheel.js +57 -57
- data/templates/jquery/jquery.offline.js +171 -171
- data/templates/jquery/jquery.pngFix.js +72 -72
- data/templates/jquery/jquery.rails.js +145 -145
- data/templates/jquery/jquery.replacetext.js +80 -80
- data/templates/jquery/jquery.themeswitchertool.js +195 -195
- data/templates/jquery/jquery.tmpl.js +460 -460
- data/templates/jquery/jquery.tmplPlus.js +78 -78
- data/templates/jquery/jquery.tokeninput.js +480 -475
- data/templates/jquery/jquery/ui/_theme.scss +14 -14
- data/templates/jquery/jquery/ui/black-tie/ui-icons_4ca300_256x240.png +0 -0
- data/templates/jquery/jquery/ui/black-tie/ui-icons_bbbbbb_256x240.png +0 -0
- data/templates/jquery/jquery/ui/black-tie/ui-icons_ededed_256x240.png +0 -0
- data/templates/jquery/jquery/ui/black-tie/ui-icons_ffcf29_256x240.png +0 -0
- data/templates/jquery/jquery/ui/vader/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/templates/jquery/jquery/ui/vader/ui-icons_bbbbbb_256x240.png +0 -0
- data/templates/jquery/jquery/ui/vader/ui-icons_c98000_256x240.png +0 -0
- data/templates/jquery/jquery/ui/vader/ui-icons_f29a00_256x240.png +0 -0
- data/templates/jquery/json.js +66 -66
- data/templates/jquery/json2.js +177 -177
- data/templates/jquery/manifest.rb +4 -0
- data/templates/jstree/jquery.jstree.js +5918 -5918
- data/templates/markitup/app/views/shared/_mark_it_up.parsed.preview.blue.html.haml +9 -0
- data/templates/markitup/app/views/shared/_mark_it_up.parsed.preview.html.haml +9 -0
- data/templates/markitup/app/views/shared/_mark_it_up.preview.blue.html.haml +8 -0
- data/templates/markitup/app/views/shared/_mark_it_up.preview.html.haml +8 -0
- data/templates/markitup/config/initializers/mark_it_up.rb +40 -0
- data/templates/markitup/jquery.markitup.js +586 -0
- data/templates/markitup/jquery.markitup.min.js +1 -0
- data/templates/markitup/jquery/markitup/preview/body.blue.png +0 -0
- data/templates/markitup/jquery/markitup/preview/bullet.blue.png +0 -0
- data/templates/markitup/jquery/markitup/preview/preview.blue.scss +58 -0
- data/templates/markitup/jquery/markitup/preview/preview.scss +7 -0
- data/templates/markitup/jquery/markitup/sets/bbcode.scss +34 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/clean.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/code.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/fonts.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/list-item.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/quotes.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/stroke.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/underline.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css.scss +54 -0
- data/templates/markitup/jquery/markitup/sets/css/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/css.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/stroke.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/tag.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_align_center.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_align_justify.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_align_left.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_align_right.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_indent.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_letterspacing.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_linespacing.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_lowercase.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_padding_bottom.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_padding_left.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_padding_right.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_padding_top.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_uppercase.png +0 -0
- data/templates/markitup/jquery/markitup/sets/default.scss +22 -0
- data/templates/markitup/jquery/markitup/sets/default/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/default/clean.png +0 -0
- data/templates/markitup/jquery/markitup/sets/default/image.png +0 -0
- data/templates/markitup/jquery/markitup/sets/default/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/default/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/default/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/default/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/default/stroke.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear.scss +38 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/code.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/h1.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/h2.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/h3.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/h4.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/h5.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/h6.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/quotes.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/stroke.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/url.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html.scss +42 -0
- data/templates/markitup/jquery/markitup/sets/html/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/clean.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/h1.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/h2.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/h3.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/h4.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/h5.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/h6.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/image.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/list-item.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/paragraph.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/stroke.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown.scss +38 -0
- data/templates/markitup/jquery/markitup/sets/markdown/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/code.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/h1.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/h2.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/h3.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/h4.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/h5.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/h6.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/quotes.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin.scss +38 -0
- data/templates/markitup/jquery/markitup/sets/markmin/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/code.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/h1.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/h2.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/h3.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/h4.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/h5.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/h6.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/quotes.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest.scss +38 -0
- data/templates/markitup/jquery/markitup/sets/rest/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/code.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/h1.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/h2.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/h3.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/h4.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/h5.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/quotes.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile.scss +44 -0
- data/templates/markitup/jquery/markitup/sets/textile/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/code.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/h1.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/h2.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/h3.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/h4.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/h5.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/h6.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/paragraph.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/quotes.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/stroke.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/table.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy.scss +40 -0
- data/templates/markitup/jquery/markitup/sets/texy/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/code.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/disconnect.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/h1.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/h2.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/h3.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/h4.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/h5.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/h6.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/page_white_code.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/quotes.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/stroke.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags.scss +44 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/code.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/disconnect.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/h1.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/h2.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/h3.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/h4.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/h5.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/quotes.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/stroke.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/underline.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki.scss +42 -0
- data/templates/markitup/jquery/markitup/sets/wiki/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/code.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/h1.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/h2.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/h3.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/h4.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/h5.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/h6.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/quotes.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/stroke.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/table.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/url.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode.scss +42 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/clean.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/h1.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/h2.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/h3.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/h4.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/h5.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/h6.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/image.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/list-item.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/paragraph.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/stroke.png +0 -0
- data/templates/markitup/jquery/markitup/skins/aqua.scss +136 -0
- data/templates/markitup/jquery/markitup/skins/aqua/bg-container-white.png +0 -0
- data/templates/markitup/jquery/markitup/skins/aqua/bg-container.png +0 -0
- data/templates/markitup/jquery/markitup/skins/aqua/bg-footer-white.png +0 -0
- data/templates/markitup/jquery/markitup/skins/aqua/bg-footer.png +0 -0
- data/templates/markitup/jquery/markitup/skins/aqua/bg-header-white.png +0 -0
- data/templates/markitup/jquery/markitup/skins/aqua/bg-header.png +0 -0
- data/templates/markitup/jquery/markitup/skins/aqua/handle.png +0 -0
- data/templates/markitup/jquery/markitup/skins/aqua/menu.png +0 -0
- data/templates/markitup/jquery/markitup/skins/aqua/spacer.gif +0 -0
- data/templates/markitup/jquery/markitup/skins/aqua/submenu.png +0 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor.scss +141 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor/bg-container.png +0 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor/bg-editor-bbcode.png +0 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor/bg-editor-dotclear.png +0 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor/bg-editor-html.png +0 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor/bg-editor-markdown.png +0 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor/bg-editor-textile.png +0 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor/bg-editor-wiki.png +0 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor/bg-editor.png +0 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor/handle.png +0 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor/menu.png +0 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor/submenu.png +0 -0
- data/templates/markitup/jquery/markitup/skins/live.scss +135 -0
- data/templates/markitup/jquery/markitup/skins/live/bg-container.png +0 -0
- data/templates/markitup/jquery/markitup/skins/live/bg-footer.png +0 -0
- data/templates/markitup/jquery/markitup/skins/live/bg-header.png +0 -0
- data/templates/markitup/jquery/markitup/skins/live/editor.png +0 -0
- data/templates/markitup/jquery/markitup/skins/live/handle.png +0 -0
- data/templates/markitup/jquery/markitup/skins/live/menu.png +0 -0
- data/templates/markitup/jquery/markitup/skins/live/submenu.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup.scss +150 -0
- data/templates/markitup/jquery/markitup/skins/markitup/bg-container.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/bg-editor-bbcode.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/bg-editor-dotclear.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/bg-editor-html.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/bg-editor-json.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/bg-editor-markdown.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/bg-editor-textile.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/bg-editor-wiki.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/bg-editor-xml.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/bg-editor.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/handle.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/menu.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/submenu.png +0 -0
- data/templates/markitup/jquery/markitup/skins/simple.scss +117 -0
- data/templates/markitup/jquery/markitup/skins/simple/handle.png +0 -0
- data/templates/markitup/jquery/markitup/skins/simple/menu.png +0 -0
- data/templates/markitup/jquery/markitup/skins/simple/submenu.png +0 -0
- data/templates/markitup/manifest.rb +311 -0
- data/templates/markitup/markitup/jquery.markitup.set.bbcode.js +40 -0
- data/templates/markitup/markitup/jquery.markitup.set.bbcode.min.js +3 -0
- data/templates/markitup/markitup/jquery.markitup.set.css.js +53 -0
- data/templates/markitup/markitup/jquery.markitup.set.css.min.js +5 -0
- data/templates/markitup/markitup/jquery.markitup.set.default.js +30 -0
- data/templates/markitup/markitup/jquery.markitup.set.default.min.js +2 -0
- data/templates/markitup/markitup/jquery.markitup.set.dotclear.js +38 -0
- data/templates/markitup/markitup/jquery.markitup.set.dotclear.min.js +3 -0
- data/templates/markitup/markitup/jquery.markitup.set.html.js +40 -0
- data/templates/markitup/markitup/jquery.markitup.set.html.min.js +4 -0
- data/templates/markitup/markitup/jquery.markitup.set.markdown.js +53 -0
- data/templates/markitup/markitup/jquery.markitup.set.markdown.min.js +3 -0
- data/templates/markitup/markitup/jquery.markitup.set.markmin.js +50 -0
- data/templates/markitup/markitup/jquery.markitup.set.markmin.min.js +3 -0
- data/templates/markitup/markitup/jquery.markitup.set.rest.js +52 -0
- data/templates/markitup/markitup/jquery.markitup.set.rest.min.js +3 -0
- data/templates/markitup/markitup/jquery.markitup.set.textile.js +58 -0
- data/templates/markitup/markitup/jquery.markitup.set.textile.min.js +4 -0
- data/templates/markitup/markitup/jquery.markitup.set.texy.js +52 -0
- data/templates/markitup/markitup/jquery.markitup.set.texy.min.js +4 -0
- data/templates/markitup/markitup/jquery.markitup.set.txt2tags.js +42 -0
- data/templates/markitup/markitup/jquery.markitup.set.txt2tags.min.js +3 -0
- data/templates/markitup/markitup/jquery.markitup.set.wiki.js +61 -0
- data/templates/markitup/markitup/jquery.markitup.set.wiki.min.js +4 -0
- data/templates/markitup/markitup/jquery.markitup.set.xbbcode.js +36 -0
- data/templates/markitup/markitup/jquery.markitup.set.xbbcode.min.js +4 -0
- data/templates/mobile/config/initializers/mobile.rb +2 -0
- data/templates/mobile/jquery.mobile.js +4545 -4454
- data/templates/mobile/jquery.mobile.min.js +16 -7
- data/templates/mobile/jquery/mobile/960.fluid.scss +191 -0
- data/templates/mobile/jquery/mobile/960.scss +213 -0
- data/templates/mobile/jquery/mobile/_base.scss +37 -20
- data/templates/mobile/jquery/mobile/default.scss +48 -56
- data/templates/mobile/jquery/mobile/valencia.scss +43 -44
- data/templates/mobile/manifest.rb +2 -0
- data/templates/ribbon/jquery.ribbon.js +195 -195
- data/templates/ribbon/jquery.ribbon.min.js +1 -1
- data/templates/ribbon/jquery/ribbon/office.scss +12 -12
- data/templates/ribbon/jquery/ribbon/windows7.scss +12 -12
- data/templates/secret_sauce/secret_sauce.js +8 -8
- data/templates/tools/flowplayer.js +897 -897
- data/templates/tools/jquery.tools.js +3647 -3647
- data/templates/tools/jquery.tools.min.js +47 -47
- data/templates/tools/swfobject.js +760 -760
- metadata +350 -22
|
@@ -12,88 +12,88 @@
|
|
|
12
12
|
|
|
13
13
|
(function(jQuery) {
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
15
|
+
jQuery.hotkeys = {
|
|
16
|
+
version: "0.8",
|
|
17
|
+
|
|
18
|
+
specialKeys: {
|
|
19
|
+
8: "backspace", 9: "tab", 13: "return", 16: "shift", 17: "ctrl", 18: "alt", 19: "pause",
|
|
20
|
+
20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home",
|
|
21
|
+
37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del",
|
|
22
|
+
96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7",
|
|
23
|
+
104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111 : "/",
|
|
24
|
+
112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8",
|
|
25
|
+
120: "f9", 121: "f10", 122: "f11", 123: "f12", 144: "numlock", 145: "scroll", 191: "/", 224: "meta"
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
shiftNums: {
|
|
29
|
+
"`": "~", "1": "!", "2": "@", "3": "#", "4": "$", "5": "%", "6": "^", "7": "&",
|
|
30
|
+
"8": "*", "9": "(", "0": ")", "-": "_", "=": "+", ";": ": ", "'": "\"", ",": "<",
|
|
31
|
+
".": ">", "/": "?", "\\": "|"
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
function keyHandler(handleObj) {
|
|
36
|
+
// Only care when a possible input has been specified
|
|
37
|
+
if (typeof handleObj.data !== "string") {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
34
40
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
41
|
+
var origHandler = handleObj.handler,
|
|
42
|
+
keys = handleObj.data.toLowerCase().split(" ");
|
|
43
|
+
|
|
44
|
+
handleObj.handler = function(event) {
|
|
45
|
+
// Don't fire in text-accepting inputs that we didn't directly bind to
|
|
46
|
+
if (this !== event.target && (/textarea|select/i.test(event.target.nodeName) ||
|
|
47
|
+
event.target.type === "text")) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Keypress represents characters, not special keys
|
|
52
|
+
var special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[ event.which ],
|
|
53
|
+
character = String.fromCharCode(event.which).toLowerCase(),
|
|
54
|
+
key, modif = "", possible = {};
|
|
55
|
+
|
|
56
|
+
// check combinations (alt|ctrl|shift+anything)
|
|
57
|
+
if (event.altKey && special !== "alt") {
|
|
58
|
+
modif += "alt+";
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (event.ctrlKey && special !== "ctrl") {
|
|
62
|
+
modif += "ctrl+";
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// TODO: Need to make sure this works consistently across platforms
|
|
66
|
+
if (event.metaKey && !event.ctrlKey && special !== "meta") {
|
|
67
|
+
modif += "meta+";
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (event.shiftKey && special !== "shift") {
|
|
71
|
+
modif += "shift+";
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (special) {
|
|
75
|
+
possible[ modif + special ] = true;
|
|
76
|
+
|
|
77
|
+
} else {
|
|
78
|
+
possible[ modif + character ] = true;
|
|
79
|
+
possible[ modif + jQuery.hotkeys.shiftNums[ character ] ] = true;
|
|
80
|
+
|
|
81
|
+
// "$" can be triggered as "Shift+4" or "Shift+$" or just "$"
|
|
82
|
+
if (modif === "shift+") {
|
|
83
|
+
possible[ jQuery.hotkeys.shiftNums[ character ] ] = true;
|
|
39
84
|
}
|
|
85
|
+
}
|
|
40
86
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// Keypress represents characters, not special keys
|
|
52
|
-
var special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[ event.which ],
|
|
53
|
-
character = String.fromCharCode(event.which).toLowerCase(),
|
|
54
|
-
key, modif = "", possible = {};
|
|
55
|
-
|
|
56
|
-
// check combinations (alt|ctrl|shift+anything)
|
|
57
|
-
if (event.altKey && special !== "alt") {
|
|
58
|
-
modif += "alt+";
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if (event.ctrlKey && special !== "ctrl") {
|
|
62
|
-
modif += "ctrl+";
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// TODO: Need to make sure this works consistently across platforms
|
|
66
|
-
if (event.metaKey && !event.ctrlKey && special !== "meta") {
|
|
67
|
-
modif += "meta+";
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (event.shiftKey && special !== "shift") {
|
|
71
|
-
modif += "shift+";
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
if (special) {
|
|
75
|
-
possible[ modif + special ] = true;
|
|
76
|
-
|
|
77
|
-
} else {
|
|
78
|
-
possible[ modif + character ] = true;
|
|
79
|
-
possible[ modif + jQuery.hotkeys.shiftNums[ character ] ] = true;
|
|
80
|
-
|
|
81
|
-
// "$" can be triggered as "Shift+4" or "Shift+$" or just "$"
|
|
82
|
-
if (modif === "shift+") {
|
|
83
|
-
possible[ jQuery.hotkeys.shiftNums[ character ] ] = true;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
for (var i = 0, l = keys.length; i < l; i++) {
|
|
88
|
-
if (possible[ keys[i] ]) {
|
|
89
|
-
return origHandler.apply(this, arguments);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
}
|
|
87
|
+
for (var i = 0, l = keys.length; i < l; i++) {
|
|
88
|
+
if (possible[ keys[i] ]) {
|
|
89
|
+
return origHandler.apply(this, arguments);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
94
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
jQuery.each([ "keydown", "keyup", "keypress" ], function() {
|
|
96
|
+
jQuery.event.special[ this ] = { add: keyHandler };
|
|
97
|
+
});
|
|
98
98
|
|
|
99
99
|
})(jQuery);
|
data/templates/jquery/jquery.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* jQuery JavaScript Library
|
|
2
|
+
* jQuery JavaScript Library v1.6.1
|
|
3
3
|
* http://jquery.com/
|
|
4
4
|
*
|
|
5
5
|
* Copyright 2011, John Resig
|
|
@@ -11,12 +11,14 @@
|
|
|
11
11
|
* Copyright 2011, The Dojo Foundation
|
|
12
12
|
* Released under the MIT, BSD, and GPL Licenses.
|
|
13
13
|
*
|
|
14
|
-
* Date:
|
|
14
|
+
* Date: Mon May 23 18:30:18 +0200 2011
|
|
15
15
|
*/
|
|
16
16
|
(function( window, undefined ) {
|
|
17
17
|
|
|
18
18
|
// Use the correct document accordingly with window argument (sandbox)
|
|
19
|
-
var document = window.document
|
|
19
|
+
var document = window.document,
|
|
20
|
+
navigator = window.navigator,
|
|
21
|
+
location = window.location;
|
|
20
22
|
|
|
21
23
|
|
|
22
24
|
var jQuery = (function() {
|
|
@@ -38,7 +40,7 @@ var jQuery = function( selector, context ) {
|
|
|
38
40
|
|
|
39
41
|
// A simple way to check for HTML strings or ID strings
|
|
40
42
|
// (both of which we optimize for)
|
|
41
|
-
quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]
|
|
43
|
+
quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
|
|
42
44
|
|
|
43
45
|
// Check if a string has a non-whitespace character in it
|
|
44
46
|
rnotwhite = /\S/,
|
|
@@ -109,7 +111,7 @@ jQuery.fn = jQuery.prototype = {
|
|
|
109
111
|
if ( selector === "body" && !context && document.body ) {
|
|
110
112
|
this.context = document;
|
|
111
113
|
this[0] = document.body;
|
|
112
|
-
this.selector =
|
|
114
|
+
this.selector = selector;
|
|
113
115
|
this.length = 1;
|
|
114
116
|
return this;
|
|
115
117
|
}
|
|
@@ -117,7 +119,13 @@ jQuery.fn = jQuery.prototype = {
|
|
|
117
119
|
// Handle HTML strings
|
|
118
120
|
if ( typeof selector === "string" ) {
|
|
119
121
|
// Are we dealing with HTML string or an ID?
|
|
120
|
-
|
|
122
|
+
if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
|
|
123
|
+
// Assume that strings that start and end with <> are HTML and skip the regex check
|
|
124
|
+
match = [ null, selector, null ];
|
|
125
|
+
|
|
126
|
+
} else {
|
|
127
|
+
match = quickExpr.exec( selector );
|
|
128
|
+
}
|
|
121
129
|
|
|
122
130
|
// Verify a match, and that no context was specified for #id
|
|
123
131
|
if ( match && (match[1] || !context) ) {
|
|
@@ -198,7 +206,7 @@ jQuery.fn = jQuery.prototype = {
|
|
|
198
206
|
selector: "",
|
|
199
207
|
|
|
200
208
|
// The current version of jQuery being used
|
|
201
|
-
jquery: "
|
|
209
|
+
jquery: "1.6.1",
|
|
202
210
|
|
|
203
211
|
// The default length of a jQuery object is 0
|
|
204
212
|
length: 0,
|
|
@@ -374,9 +382,11 @@ jQuery.extend = jQuery.fn.extend = function() {
|
|
|
374
382
|
|
|
375
383
|
jQuery.extend({
|
|
376
384
|
noConflict: function( deep ) {
|
|
377
|
-
window.$
|
|
385
|
+
if ( window.$ === jQuery ) {
|
|
386
|
+
window.$ = _$;
|
|
387
|
+
}
|
|
378
388
|
|
|
379
|
-
if ( deep ) {
|
|
389
|
+
if ( deep && window.jQuery === jQuery ) {
|
|
380
390
|
window.jQuery = _jQuery;
|
|
381
391
|
}
|
|
382
392
|
|
|
@@ -390,15 +400,19 @@ jQuery.extend({
|
|
|
390
400
|
// the ready event fires. See #6781
|
|
391
401
|
readyWait: 1,
|
|
392
402
|
|
|
393
|
-
//
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
403
|
+
// Hold (or release) the ready event
|
|
404
|
+
holdReady: function( hold ) {
|
|
405
|
+
if ( hold ) {
|
|
406
|
+
jQuery.readyWait++;
|
|
407
|
+
} else {
|
|
408
|
+
jQuery.ready( true );
|
|
398
409
|
}
|
|
410
|
+
},
|
|
399
411
|
|
|
400
|
-
|
|
401
|
-
|
|
412
|
+
// Handle when the DOM is ready
|
|
413
|
+
ready: function( wait ) {
|
|
414
|
+
// Either a released hold or an DOMready/load event and not yet ready
|
|
415
|
+
if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
|
|
402
416
|
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
|
|
403
417
|
if ( !document.body ) {
|
|
404
418
|
return setTimeout( jQuery.ready, 1 );
|
|
@@ -448,7 +462,7 @@ jQuery.extend({
|
|
|
448
462
|
} else if ( document.attachEvent ) {
|
|
449
463
|
// ensure firing before onload,
|
|
450
464
|
// maybe late but safe also for iframes
|
|
451
|
-
document.attachEvent("onreadystatechange", DOMContentLoaded);
|
|
465
|
+
document.attachEvent( "onreadystatechange", DOMContentLoaded );
|
|
452
466
|
|
|
453
467
|
// A fallback to window.onload, that will always work
|
|
454
468
|
window.attachEvent( "onload", jQuery.ready );
|
|
@@ -536,20 +550,21 @@ jQuery.extend({
|
|
|
536
550
|
// Make sure leading/trailing whitespace is removed (IE can't handle it)
|
|
537
551
|
data = jQuery.trim( data );
|
|
538
552
|
|
|
553
|
+
// Attempt to parse using the native JSON parser first
|
|
554
|
+
if ( window.JSON && window.JSON.parse ) {
|
|
555
|
+
return window.JSON.parse( data );
|
|
556
|
+
}
|
|
557
|
+
|
|
539
558
|
// Make sure the incoming data is actual JSON
|
|
540
559
|
// Logic borrowed from http://json.org/json2.js
|
|
541
|
-
if ( rvalidchars.test(data.replace(rvalidescape, "@")
|
|
542
|
-
.replace(rvalidtokens, "]")
|
|
543
|
-
.replace(rvalidbraces, "")) ) {
|
|
560
|
+
if ( rvalidchars.test( data.replace( rvalidescape, "@" )
|
|
561
|
+
.replace( rvalidtokens, "]" )
|
|
562
|
+
.replace( rvalidbraces, "")) ) {
|
|
544
563
|
|
|
545
|
-
|
|
546
|
-
return window.JSON && window.JSON.parse ?
|
|
547
|
-
window.JSON.parse( data ) :
|
|
548
|
-
(new Function("return " + data))();
|
|
564
|
+
return (new Function( "return " + data ))();
|
|
549
565
|
|
|
550
|
-
} else {
|
|
551
|
-
jQuery.error( "Invalid JSON: " + data );
|
|
552
566
|
}
|
|
567
|
+
jQuery.error( "Invalid JSON: " + data );
|
|
553
568
|
},
|
|
554
569
|
|
|
555
570
|
// Cross-browser xml parsing
|
|
@@ -576,24 +591,17 @@ jQuery.extend({
|
|
|
576
591
|
|
|
577
592
|
noop: function() {},
|
|
578
593
|
|
|
579
|
-
//
|
|
594
|
+
// Evaluates a script in a global context
|
|
595
|
+
// Workarounds based on findings by Jim Driscoll
|
|
596
|
+
// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
|
|
580
597
|
globalEval: function( data ) {
|
|
581
|
-
if ( data && rnotwhite.test(data) ) {
|
|
582
|
-
//
|
|
583
|
-
//
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
script.appendChild( document.createTextNode( data ) );
|
|
589
|
-
} else {
|
|
590
|
-
script.text = data;
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
// Use insertBefore instead of appendChild to circumvent an IE6 bug.
|
|
594
|
-
// This arises when a base node is used (#2709).
|
|
595
|
-
head.insertBefore( script, head.firstChild );
|
|
596
|
-
head.removeChild( script );
|
|
598
|
+
if ( data && rnotwhite.test( data ) ) {
|
|
599
|
+
// We use execScript on Internet Explorer
|
|
600
|
+
// We use an anonymous function so that context is window
|
|
601
|
+
// rather than jQuery in Firefox
|
|
602
|
+
( window.execScript || function( data ) {
|
|
603
|
+
window[ "eval" ].call( window, data );
|
|
604
|
+
} )( data );
|
|
597
605
|
}
|
|
598
606
|
},
|
|
599
607
|
|
|
@@ -605,7 +613,7 @@ jQuery.extend({
|
|
|
605
613
|
each: function( object, callback, args ) {
|
|
606
614
|
var name, i = 0,
|
|
607
615
|
length = object.length,
|
|
608
|
-
isObj = length === undefined || jQuery.isFunction(object);
|
|
616
|
+
isObj = length === undefined || jQuery.isFunction( object );
|
|
609
617
|
|
|
610
618
|
if ( args ) {
|
|
611
619
|
if ( isObj ) {
|
|
@@ -631,8 +639,11 @@ jQuery.extend({
|
|
|
631
639
|
}
|
|
632
640
|
}
|
|
633
641
|
} else {
|
|
634
|
-
for (
|
|
635
|
-
|
|
642
|
+
for ( ; i < length; ) {
|
|
643
|
+
if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
|
|
644
|
+
break;
|
|
645
|
+
}
|
|
646
|
+
}
|
|
636
647
|
}
|
|
637
648
|
}
|
|
638
649
|
|
|
@@ -663,7 +674,7 @@ jQuery.extend({
|
|
|
663
674
|
// The extra typeof function check is to prevent crashes
|
|
664
675
|
// in Safari 2 (See: #3039)
|
|
665
676
|
// Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
|
|
666
|
-
var type = jQuery.type(array);
|
|
677
|
+
var type = jQuery.type( array );
|
|
667
678
|
|
|
668
679
|
if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
|
|
669
680
|
push.call( ret, array );
|
|
@@ -676,8 +687,9 @@ jQuery.extend({
|
|
|
676
687
|
},
|
|
677
688
|
|
|
678
689
|
inArray: function( elem, array ) {
|
|
679
|
-
|
|
680
|
-
|
|
690
|
+
|
|
691
|
+
if ( indexOf ) {
|
|
692
|
+
return indexOf.call( array, elem );
|
|
681
693
|
}
|
|
682
694
|
|
|
683
695
|
for ( var i = 0, length = array.length; i < length; i++ ) {
|
|
@@ -727,15 +739,30 @@ jQuery.extend({
|
|
|
727
739
|
|
|
728
740
|
// arg is for internal usage only
|
|
729
741
|
map: function( elems, callback, arg ) {
|
|
730
|
-
var ret = [],
|
|
742
|
+
var value, key, ret = [],
|
|
743
|
+
i = 0,
|
|
744
|
+
length = elems.length,
|
|
745
|
+
// jquery objects are treated as arrays
|
|
746
|
+
isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
|
|
731
747
|
|
|
732
748
|
// Go through the array, translating each of the items to their
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
749
|
+
if ( isArray ) {
|
|
750
|
+
for ( ; i < length; i++ ) {
|
|
751
|
+
value = callback( elems[ i ], i, arg );
|
|
736
752
|
|
|
737
|
-
|
|
738
|
-
|
|
753
|
+
if ( value != null ) {
|
|
754
|
+
ret[ ret.length ] = value;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
// Go through every key on the object,
|
|
759
|
+
} else {
|
|
760
|
+
for ( key in elems ) {
|
|
761
|
+
value = callback( elems[ key ], key, arg );
|
|
762
|
+
|
|
763
|
+
if ( value != null ) {
|
|
764
|
+
ret[ ret.length ] = value;
|
|
765
|
+
}
|
|
739
766
|
}
|
|
740
767
|
}
|
|
741
768
|
|
|
@@ -746,31 +773,30 @@ jQuery.extend({
|
|
|
746
773
|
// A global GUID counter for objects
|
|
747
774
|
guid: 1,
|
|
748
775
|
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
776
|
+
// Bind a function to a context, optionally partially applying any
|
|
777
|
+
// arguments.
|
|
778
|
+
proxy: function( fn, context ) {
|
|
779
|
+
if ( typeof context === "string" ) {
|
|
780
|
+
var tmp = fn[ context ];
|
|
781
|
+
context = fn;
|
|
782
|
+
fn = tmp;
|
|
783
|
+
}
|
|
755
784
|
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
785
|
+
// Quick check to determine if target is callable, in the spec
|
|
786
|
+
// this throws a TypeError, but we will just return undefined.
|
|
787
|
+
if ( !jQuery.isFunction( fn ) ) {
|
|
788
|
+
return undefined;
|
|
760
789
|
}
|
|
761
790
|
|
|
762
|
-
|
|
791
|
+
// Simulated bind
|
|
792
|
+
var args = slice.call( arguments, 2 ),
|
|
763
793
|
proxy = function() {
|
|
764
|
-
return fn.apply(
|
|
794
|
+
return fn.apply( context, args.concat( slice.call( arguments ) ) );
|
|
765
795
|
};
|
|
766
|
-
}
|
|
767
796
|
|
|
768
797
|
// Set the guid of unique handler to the same of original handler, so it can be removed
|
|
769
|
-
|
|
770
|
-
proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
|
|
771
|
-
}
|
|
798
|
+
proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
|
|
772
799
|
|
|
773
|
-
// So proxy can be declared as an argument
|
|
774
800
|
return proxy;
|
|
775
801
|
},
|
|
776
802
|
|
|
@@ -822,24 +848,24 @@ jQuery.extend({
|
|
|
822
848
|
},
|
|
823
849
|
|
|
824
850
|
sub: function() {
|
|
825
|
-
function
|
|
826
|
-
return new
|
|
851
|
+
function jQuerySub( selector, context ) {
|
|
852
|
+
return new jQuerySub.fn.init( selector, context );
|
|
827
853
|
}
|
|
828
|
-
jQuery.extend( true,
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
if ( context && context instanceof jQuery && !(context instanceof
|
|
835
|
-
context =
|
|
854
|
+
jQuery.extend( true, jQuerySub, this );
|
|
855
|
+
jQuerySub.superclass = this;
|
|
856
|
+
jQuerySub.fn = jQuerySub.prototype = this();
|
|
857
|
+
jQuerySub.fn.constructor = jQuerySub;
|
|
858
|
+
jQuerySub.sub = this.sub;
|
|
859
|
+
jQuerySub.fn.init = function init( selector, context ) {
|
|
860
|
+
if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
|
|
861
|
+
context = jQuerySub( context );
|
|
836
862
|
}
|
|
837
863
|
|
|
838
|
-
return jQuery.fn.init.call( this, selector, context,
|
|
864
|
+
return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
|
|
839
865
|
};
|
|
840
|
-
|
|
841
|
-
var
|
|
842
|
-
return
|
|
866
|
+
jQuerySub.fn.init.prototype = jQuerySub.fn;
|
|
867
|
+
var rootjQuerySub = jQuerySub(document);
|
|
868
|
+
return jQuerySub;
|
|
843
869
|
},
|
|
844
870
|
|
|
845
871
|
browser: {}
|
|
@@ -861,12 +887,6 @@ if ( jQuery.browser.webkit ) {
|
|
|
861
887
|
jQuery.browser.safari = true;
|
|
862
888
|
}
|
|
863
889
|
|
|
864
|
-
if ( indexOf ) {
|
|
865
|
-
jQuery.inArray = function( elem, array ) {
|
|
866
|
-
return indexOf.call( array, elem );
|
|
867
|
-
};
|
|
868
|
-
}
|
|
869
|
-
|
|
870
890
|
// IE doesn't match non-breaking spaces with \s
|
|
871
891
|
if ( rnotwhite.test( "\xA0" ) ) {
|
|
872
892
|
trimLeft = /^[\s\xA0]+/;
|
|
@@ -921,7 +941,7 @@ return jQuery;
|
|
|
921
941
|
(function( jQuery ) {
|
|
922
942
|
|
|
923
943
|
var // Promise methods
|
|
924
|
-
promiseMethods = "
|
|
944
|
+
promiseMethods = "done fail isResolved isRejected promise then always pipe".split( " " ),
|
|
925
945
|
// Static reference to slice
|
|
926
946
|
sliceDeferred = [].slice;
|
|
927
947
|
|
|
@@ -1020,10 +1040,37 @@ jQuery.extend({
|
|
|
1020
1040
|
deferred.done( doneCallbacks ).fail( failCallbacks );
|
|
1021
1041
|
return this;
|
|
1022
1042
|
},
|
|
1043
|
+
always: function() {
|
|
1044
|
+
return deferred.done.apply( deferred, arguments ).fail.apply( this, arguments );
|
|
1045
|
+
},
|
|
1023
1046
|
fail: failDeferred.done,
|
|
1024
1047
|
rejectWith: failDeferred.resolveWith,
|
|
1025
1048
|
reject: failDeferred.resolve,
|
|
1026
1049
|
isRejected: failDeferred.isResolved,
|
|
1050
|
+
pipe: function( fnDone, fnFail ) {
|
|
1051
|
+
return jQuery.Deferred(function( newDefer ) {
|
|
1052
|
+
jQuery.each( {
|
|
1053
|
+
done: [ fnDone, "resolve" ],
|
|
1054
|
+
fail: [ fnFail, "reject" ]
|
|
1055
|
+
}, function( handler, data ) {
|
|
1056
|
+
var fn = data[ 0 ],
|
|
1057
|
+
action = data[ 1 ],
|
|
1058
|
+
returned;
|
|
1059
|
+
if ( jQuery.isFunction( fn ) ) {
|
|
1060
|
+
deferred[ handler ](function() {
|
|
1061
|
+
returned = fn.apply( this, arguments );
|
|
1062
|
+
if ( returned && jQuery.isFunction( returned.promise ) ) {
|
|
1063
|
+
returned.promise().then( newDefer.resolve, newDefer.reject );
|
|
1064
|
+
} else {
|
|
1065
|
+
newDefer[ action ]( returned );
|
|
1066
|
+
}
|
|
1067
|
+
});
|
|
1068
|
+
} else {
|
|
1069
|
+
deferred[ handler ]( newDefer[ action ] );
|
|
1070
|
+
}
|
|
1071
|
+
});
|
|
1072
|
+
}).promise();
|
|
1073
|
+
},
|
|
1027
1074
|
// Get a promise for this deferred
|
|
1028
1075
|
// If obj is provided, the promise aspect is added to the object
|
|
1029
1076
|
promise: function( obj ) {
|
|
@@ -1039,7 +1086,7 @@ jQuery.extend({
|
|
|
1039
1086
|
}
|
|
1040
1087
|
return obj;
|
|
1041
1088
|
}
|
|
1042
|
-
}
|
|
1089
|
+
});
|
|
1043
1090
|
// Make sure only one callback list will be used
|
|
1044
1091
|
deferred.done( failDeferred.cancel ).fail( deferred.cancel );
|
|
1045
1092
|
// Unexpose cancel
|
|
@@ -1091,48 +1138,64 @@ jQuery.extend({
|
|
|
1091
1138
|
|
|
1092
1139
|
})( jQuery );
|
|
1093
1140
|
|
|
1094
|
-
|
|
1095
1141
|
(function( jQuery ) {
|
|
1096
1142
|
|
|
1097
|
-
(function() {
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1143
|
+
jQuery.support = (function() {
|
|
1144
|
+
|
|
1145
|
+
var div = document.createElement( "div" ),
|
|
1146
|
+
documentElement = document.documentElement,
|
|
1147
|
+
all,
|
|
1148
|
+
a,
|
|
1149
|
+
select,
|
|
1150
|
+
opt,
|
|
1151
|
+
input,
|
|
1152
|
+
marginDiv,
|
|
1153
|
+
support,
|
|
1154
|
+
fragment,
|
|
1155
|
+
body,
|
|
1156
|
+
bodyStyle,
|
|
1157
|
+
tds,
|
|
1158
|
+
events,
|
|
1159
|
+
eventName,
|
|
1160
|
+
i,
|
|
1161
|
+
isSupported;
|
|
1102
1162
|
|
|
1103
|
-
|
|
1104
|
-
div.
|
|
1163
|
+
// Preliminary tests
|
|
1164
|
+
div.setAttribute("className", "t");
|
|
1165
|
+
div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
|
|
1105
1166
|
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
select = document.createElement("select"),
|
|
1109
|
-
opt = select.appendChild( document.createElement("option") ),
|
|
1110
|
-
input = div.getElementsByTagName("input")[0];
|
|
1167
|
+
all = div.getElementsByTagName( "*" );
|
|
1168
|
+
a = div.getElementsByTagName( "a" )[ 0 ];
|
|
1111
1169
|
|
|
1112
1170
|
// Can't get basic test support
|
|
1113
1171
|
if ( !all || !all.length || !a ) {
|
|
1114
|
-
return;
|
|
1172
|
+
return {};
|
|
1115
1173
|
}
|
|
1116
1174
|
|
|
1117
|
-
|
|
1175
|
+
// First batch of supports tests
|
|
1176
|
+
select = document.createElement( "select" );
|
|
1177
|
+
opt = select.appendChild( document.createElement("option") );
|
|
1178
|
+
input = div.getElementsByTagName( "input" )[ 0 ];
|
|
1179
|
+
|
|
1180
|
+
support = {
|
|
1118
1181
|
// IE strips leading whitespace when .innerHTML is used
|
|
1119
|
-
leadingWhitespace: div.firstChild.nodeType === 3,
|
|
1182
|
+
leadingWhitespace: ( div.firstChild.nodeType === 3 ),
|
|
1120
1183
|
|
|
1121
1184
|
// Make sure that tbody elements aren't automatically inserted
|
|
1122
1185
|
// IE will insert them into empty tables
|
|
1123
|
-
tbody: !div.getElementsByTagName("tbody").length,
|
|
1186
|
+
tbody: !div.getElementsByTagName( "tbody" ).length,
|
|
1124
1187
|
|
|
1125
1188
|
// Make sure that link elements get serialized correctly by innerHTML
|
|
1126
1189
|
// This requires a wrapper element in IE
|
|
1127
|
-
htmlSerialize: !!div.getElementsByTagName("link").length,
|
|
1190
|
+
htmlSerialize: !!div.getElementsByTagName( "link" ).length,
|
|
1128
1191
|
|
|
1129
1192
|
// Get the style information from getAttribute
|
|
1130
|
-
// (IE uses .cssText
|
|
1131
|
-
style: /
|
|
1193
|
+
// (IE uses .cssText instead)
|
|
1194
|
+
style: /top/.test( a.getAttribute("style") ),
|
|
1132
1195
|
|
|
1133
1196
|
// Make sure that URLs aren't manipulated
|
|
1134
1197
|
// (IE normalizes it by default)
|
|
1135
|
-
hrefNormalized: a.getAttribute("href") === "/a",
|
|
1198
|
+
hrefNormalized: ( a.getAttribute( "href" ) === "/a" ),
|
|
1136
1199
|
|
|
1137
1200
|
// Make sure that element opacity exists
|
|
1138
1201
|
// (IE uses filter instead)
|
|
@@ -1146,190 +1209,185 @@ jQuery.extend({
|
|
|
1146
1209
|
// Make sure that if no value is specified for a checkbox
|
|
1147
1210
|
// that it defaults to "on".
|
|
1148
1211
|
// (WebKit defaults to "" instead)
|
|
1149
|
-
checkOn: input.value === "on",
|
|
1212
|
+
checkOn: ( input.value === "on" ),
|
|
1150
1213
|
|
|
1151
1214
|
// Make sure that a selected-by-default option has a working selected property.
|
|
1152
1215
|
// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
|
|
1153
1216
|
optSelected: opt.selected,
|
|
1154
1217
|
|
|
1218
|
+
// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
|
|
1219
|
+
getSetAttribute: div.className !== "t",
|
|
1220
|
+
|
|
1155
1221
|
// Will be defined later
|
|
1222
|
+
submitBubbles: true,
|
|
1223
|
+
changeBubbles: true,
|
|
1224
|
+
focusinBubbles: false,
|
|
1156
1225
|
deleteExpando: true,
|
|
1157
|
-
optDisabled: false,
|
|
1158
|
-
checkClone: false,
|
|
1159
1226
|
noCloneEvent: true,
|
|
1160
|
-
noCloneChecked: true,
|
|
1161
|
-
boxModel: null,
|
|
1162
1227
|
inlineBlockNeedsLayout: false,
|
|
1163
1228
|
shrinkWrapBlocks: false,
|
|
1164
|
-
reliableHiddenOffsets: true,
|
|
1165
1229
|
reliableMarginRight: true
|
|
1166
1230
|
};
|
|
1167
1231
|
|
|
1232
|
+
// Make sure checked status is properly cloned
|
|
1168
1233
|
input.checked = true;
|
|
1169
|
-
|
|
1234
|
+
support.noCloneChecked = input.cloneNode( true ).checked;
|
|
1170
1235
|
|
|
1171
1236
|
// Make sure that the options inside disabled selects aren't marked as disabled
|
|
1172
|
-
// (WebKit marks them as
|
|
1237
|
+
// (WebKit marks them as disabled)
|
|
1173
1238
|
select.disabled = true;
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
var _scriptEval = null;
|
|
1177
|
-
jQuery.support.scriptEval = function() {
|
|
1178
|
-
if ( _scriptEval === null ) {
|
|
1179
|
-
var root = document.documentElement,
|
|
1180
|
-
script = document.createElement("script"),
|
|
1181
|
-
id = "script" + jQuery.now();
|
|
1182
|
-
|
|
1183
|
-
// Make sure that the execution of code works by injecting a script
|
|
1184
|
-
// tag with appendChild/createTextNode
|
|
1185
|
-
// (IE doesn't support this, fails, and uses .text instead)
|
|
1186
|
-
try {
|
|
1187
|
-
script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
|
|
1188
|
-
} catch(e) {}
|
|
1189
|
-
|
|
1190
|
-
root.insertBefore( script, root.firstChild );
|
|
1191
|
-
|
|
1192
|
-
if ( window[ id ] ) {
|
|
1193
|
-
_scriptEval = true;
|
|
1194
|
-
delete window[ id ];
|
|
1195
|
-
} else {
|
|
1196
|
-
_scriptEval = false;
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
|
-
root.removeChild( script );
|
|
1200
|
-
}
|
|
1201
|
-
|
|
1202
|
-
return _scriptEval;
|
|
1203
|
-
};
|
|
1239
|
+
support.optDisabled = !opt.disabled;
|
|
1204
1240
|
|
|
1205
1241
|
// Test to see if it's possible to delete an expando from an element
|
|
1206
1242
|
// Fails in Internet Explorer
|
|
1207
1243
|
try {
|
|
1208
1244
|
delete div.test;
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
jQuery.support.deleteExpando = false;
|
|
1245
|
+
} catch( e ) {
|
|
1246
|
+
support.deleteExpando = false;
|
|
1212
1247
|
}
|
|
1213
1248
|
|
|
1214
1249
|
if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
|
|
1215
|
-
div.attachEvent("onclick", function click() {
|
|
1250
|
+
div.attachEvent( "onclick", function click() {
|
|
1216
1251
|
// Cloning a node shouldn't copy over any
|
|
1217
1252
|
// bound event handlers (IE does this)
|
|
1218
|
-
|
|
1219
|
-
div.detachEvent("onclick", click);
|
|
1253
|
+
support.noCloneEvent = false;
|
|
1254
|
+
div.detachEvent( "onclick", click );
|
|
1220
1255
|
});
|
|
1221
|
-
div.cloneNode(true).fireEvent("onclick");
|
|
1256
|
+
div.cloneNode( true ).fireEvent( "onclick" );
|
|
1222
1257
|
}
|
|
1223
1258
|
|
|
1224
|
-
|
|
1225
|
-
|
|
1259
|
+
// Check if a radio maintains it's value
|
|
1260
|
+
// after being appended to the DOM
|
|
1261
|
+
input = document.createElement("input");
|
|
1262
|
+
input.value = "t";
|
|
1263
|
+
input.setAttribute("type", "radio");
|
|
1264
|
+
support.radioValue = input.value === "t";
|
|
1226
1265
|
|
|
1227
|
-
|
|
1266
|
+
input.setAttribute("checked", "checked");
|
|
1267
|
+
div.appendChild( input );
|
|
1268
|
+
fragment = document.createDocumentFragment();
|
|
1228
1269
|
fragment.appendChild( div.firstChild );
|
|
1229
1270
|
|
|
1230
1271
|
// WebKit doesn't clone checked state correctly in fragments
|
|
1231
|
-
|
|
1272
|
+
support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
|
|
1273
|
+
|
|
1274
|
+
div.innerHTML = "";
|
|
1232
1275
|
|
|
1233
1276
|
// Figure out if the W3C box model works as expected
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1277
|
+
div.style.width = div.style.paddingLeft = "1px";
|
|
1278
|
+
|
|
1279
|
+
// We use our own, invisible, body
|
|
1280
|
+
body = document.createElement( "body" );
|
|
1281
|
+
bodyStyle = {
|
|
1282
|
+
visibility: "hidden",
|
|
1283
|
+
width: 0,
|
|
1284
|
+
height: 0,
|
|
1285
|
+
border: 0,
|
|
1286
|
+
margin: 0,
|
|
1287
|
+
// Set background to avoid IE crashes when removing (#9028)
|
|
1288
|
+
background: "none"
|
|
1289
|
+
};
|
|
1290
|
+
for ( i in bodyStyle ) {
|
|
1291
|
+
body.style[ i ] = bodyStyle[ i ];
|
|
1292
|
+
}
|
|
1293
|
+
body.appendChild( div );
|
|
1294
|
+
documentElement.insertBefore( body, documentElement.firstChild );
|
|
1295
|
+
|
|
1296
|
+
// Check if a disconnected checkbox will retain its checked
|
|
1297
|
+
// value of true after appended to the DOM (IE6/7)
|
|
1298
|
+
support.appendChecked = input.checked;
|
|
1299
|
+
|
|
1300
|
+
support.boxModel = div.offsetWidth === 2;
|
|
1301
|
+
|
|
1302
|
+
if ( "zoom" in div.style ) {
|
|
1303
|
+
// Check if natively block-level elements act like inline-block
|
|
1304
|
+
// elements when setting their display to 'inline' and giving
|
|
1305
|
+
// them layout
|
|
1306
|
+
// (IE < 8 does this)
|
|
1307
|
+
div.style.display = "inline";
|
|
1308
|
+
div.style.zoom = 1;
|
|
1309
|
+
support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 );
|
|
1310
|
+
|
|
1311
|
+
// Check if elements with layout shrink-wrap their children
|
|
1312
|
+
// (IE 6 does this)
|
|
1313
|
+
div.style.display = "";
|
|
1314
|
+
div.innerHTML = "<div style='width:4px;'></div>";
|
|
1315
|
+
support.shrinkWrapBlocks = ( div.offsetWidth !== 2 );
|
|
1316
|
+
}
|
|
1238
1317
|
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1318
|
+
div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
|
|
1319
|
+
tds = div.getElementsByTagName( "td" );
|
|
1320
|
+
|
|
1321
|
+
// Check if table cells still have offsetWidth/Height when they are set
|
|
1322
|
+
// to display:none and there are still other visible table cells in a
|
|
1323
|
+
// table row; if so, offsetWidth/Height are not reliable for use when
|
|
1324
|
+
// determining if an element has been hidden directly using
|
|
1325
|
+
// display:none (it is still safe to use offsets if a parent element is
|
|
1326
|
+
// hidden; don safety goggles and see bug #4512 for more information).
|
|
1327
|
+
// (only IE 8 fails this test)
|
|
1328
|
+
isSupported = ( tds[ 0 ].offsetHeight === 0 );
|
|
1329
|
+
|
|
1330
|
+
tds[ 0 ].style.display = "";
|
|
1331
|
+
tds[ 1 ].style.display = "none";
|
|
1332
|
+
|
|
1333
|
+
// Check if empty table cells still have offsetWidth/Height
|
|
1334
|
+
// (IE < 8 fail this test)
|
|
1335
|
+
support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
|
|
1336
|
+
div.innerHTML = "";
|
|
1337
|
+
|
|
1338
|
+
// Check if div with explicit width and no margin-right incorrectly
|
|
1339
|
+
// gets computed margin-right based on width of container. For more
|
|
1340
|
+
// info see bug #3333
|
|
1341
|
+
// Fails in WebKit before Feb 2011 nightlies
|
|
1342
|
+
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
|
|
1343
|
+
if ( document.defaultView && document.defaultView.getComputedStyle ) {
|
|
1344
|
+
marginDiv = document.createElement( "div" );
|
|
1345
|
+
marginDiv.style.width = "0";
|
|
1346
|
+
marginDiv.style.marginRight = "0";
|
|
1347
|
+
div.appendChild( marginDiv );
|
|
1348
|
+
support.reliableMarginRight =
|
|
1349
|
+
( parseInt( ( document.defaultView.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
|
|
1350
|
+
}
|
|
1243
1351
|
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
if ( "zoom" in div.style ) {
|
|
1249
|
-
// Check if natively block-level elements act like inline-block
|
|
1250
|
-
// elements when setting their display to 'inline' and giving
|
|
1251
|
-
// them layout
|
|
1252
|
-
// (IE < 8 does this)
|
|
1253
|
-
div.style.display = "inline";
|
|
1254
|
-
div.style.zoom = 1;
|
|
1255
|
-
jQuery.support.inlineBlockNeedsLayout = div.offsetWidth === 2;
|
|
1256
|
-
|
|
1257
|
-
// Check if elements with layout shrink-wrap their children
|
|
1258
|
-
// (IE 6 does this)
|
|
1259
|
-
div.style.display = "";
|
|
1260
|
-
div.innerHTML = "<div style='width:4px;'></div>";
|
|
1261
|
-
jQuery.support.shrinkWrapBlocks = div.offsetWidth !== 2;
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
|
-
div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
|
|
1265
|
-
var tds = div.getElementsByTagName("td");
|
|
1266
|
-
|
|
1267
|
-
// Check if table cells still have offsetWidth/Height when they are set
|
|
1268
|
-
// to display:none and there are still other visible table cells in a
|
|
1269
|
-
// table row; if so, offsetWidth/Height are not reliable for use when
|
|
1270
|
-
// determining if an element has been hidden directly using
|
|
1271
|
-
// display:none (it is still safe to use offsets if a parent element is
|
|
1272
|
-
// hidden; don safety goggles and see bug #4512 for more information).
|
|
1273
|
-
// (only IE 8 fails this test)
|
|
1274
|
-
jQuery.support.reliableHiddenOffsets = tds[0].offsetHeight === 0;
|
|
1275
|
-
|
|
1276
|
-
tds[0].style.display = "";
|
|
1277
|
-
tds[1].style.display = "none";
|
|
1278
|
-
|
|
1279
|
-
// Check if empty table cells still have offsetWidth/Height
|
|
1280
|
-
// (IE < 8 fail this test)
|
|
1281
|
-
jQuery.support.reliableHiddenOffsets = jQuery.support.reliableHiddenOffsets && tds[0].offsetHeight === 0;
|
|
1282
|
-
div.innerHTML = "";
|
|
1283
|
-
|
|
1284
|
-
// Check if div with explicit width and no margin-right incorrectly
|
|
1285
|
-
// gets computed margin-right based on width of container. For more
|
|
1286
|
-
// info see bug #3333
|
|
1287
|
-
// Fails in WebKit before Feb 2011 nightlies
|
|
1288
|
-
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
|
|
1289
|
-
if ( document.defaultView && document.defaultView.getComputedStyle ) {
|
|
1290
|
-
div.style.width = "1px";
|
|
1291
|
-
div.style.marginRight = "0";
|
|
1292
|
-
jQuery.support.reliableMarginRight = ( parseInt(document.defaultView.getComputedStyle(div, null).marginRight, 10) || 0 ) === 0;
|
|
1293
|
-
}
|
|
1294
|
-
|
|
1295
|
-
body.removeChild( div ).style.display = "none";
|
|
1296
|
-
div = tds = null;
|
|
1297
|
-
});
|
|
1352
|
+
// Remove the body element we added
|
|
1353
|
+
body.innerHTML = "";
|
|
1354
|
+
documentElement.removeChild( body );
|
|
1298
1355
|
|
|
1299
1356
|
// Technique from Juriy Zaytsev
|
|
1300
1357
|
// http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1358
|
+
// We only care about the case where non-standard event systems
|
|
1359
|
+
// are used, namely in IE. Short-circuiting here helps us to
|
|
1360
|
+
// avoid an eval call (in setAttribute) which can cause CSP
|
|
1361
|
+
// to go haywire. See: https://developer.mozilla.org/en/Security/CSP
|
|
1362
|
+
if ( div.attachEvent ) {
|
|
1363
|
+
for( i in {
|
|
1364
|
+
submit: 1,
|
|
1365
|
+
change: 1,
|
|
1366
|
+
focusin: 1
|
|
1367
|
+
} ) {
|
|
1368
|
+
eventName = "on" + i;
|
|
1369
|
+
isSupported = ( eventName in div );
|
|
1370
|
+
if ( !isSupported ) {
|
|
1371
|
+
div.setAttribute( eventName, "return;" );
|
|
1372
|
+
isSupported = ( typeof div[ eventName ] === "function" );
|
|
1373
|
+
}
|
|
1374
|
+
support[ i + "Bubbles" ] = isSupported;
|
|
1311
1375
|
}
|
|
1376
|
+
}
|
|
1312
1377
|
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
el.setAttribute(eventName, "return;");
|
|
1316
|
-
isSupported = typeof el[eventName] === "function";
|
|
1317
|
-
}
|
|
1318
|
-
return isSupported;
|
|
1319
|
-
};
|
|
1378
|
+
return support;
|
|
1379
|
+
})();
|
|
1320
1380
|
|
|
1321
|
-
|
|
1322
|
-
|
|
1381
|
+
// Keep track of boxModel
|
|
1382
|
+
jQuery.boxModel = jQuery.support.boxModel;
|
|
1323
1383
|
|
|
1324
|
-
// release memory in IE
|
|
1325
|
-
div = all = a = null;
|
|
1326
|
-
})();
|
|
1327
1384
|
})( jQuery );
|
|
1328
1385
|
|
|
1329
1386
|
|
|
1330
1387
|
(function( jQuery ) {
|
|
1331
1388
|
|
|
1332
|
-
var rbrace = /^(?:\{.*\}|\[.*\])
|
|
1389
|
+
var rbrace = /^(?:\{.*\}|\[.*\])$/,
|
|
1390
|
+
rmultiDash = /([a-z])([A-Z])/g;
|
|
1333
1391
|
|
|
1334
1392
|
jQuery.extend({
|
|
1335
1393
|
cache: {},
|
|
@@ -1426,7 +1484,7 @@ jQuery.extend({
|
|
|
1426
1484
|
}
|
|
1427
1485
|
|
|
1428
1486
|
if ( data !== undefined ) {
|
|
1429
|
-
thisCache[ name ] = data;
|
|
1487
|
+
thisCache[ jQuery.camelCase( name ) ] = data;
|
|
1430
1488
|
}
|
|
1431
1489
|
|
|
1432
1490
|
// TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should
|
|
@@ -1436,7 +1494,7 @@ jQuery.extend({
|
|
|
1436
1494
|
return thisCache[ internalKey ] && thisCache[ internalKey ].events;
|
|
1437
1495
|
}
|
|
1438
1496
|
|
|
1439
|
-
return getByName ? thisCache[ name ] : thisCache;
|
|
1497
|
+
return getByName ? thisCache[ jQuery.camelCase( name ) ] : thisCache;
|
|
1440
1498
|
},
|
|
1441
1499
|
|
|
1442
1500
|
removeData: function( elem, name, pvt /* Internal Use Only */ ) {
|
|
@@ -1552,12 +1610,13 @@ jQuery.fn.extend({
|
|
|
1552
1610
|
data = jQuery.data( this[0] );
|
|
1553
1611
|
|
|
1554
1612
|
if ( this[0].nodeType === 1 ) {
|
|
1555
|
-
|
|
1613
|
+
var attr = this[0].attributes, name;
|
|
1556
1614
|
for ( var i = 0, l = attr.length; i < l; i++ ) {
|
|
1557
1615
|
name = attr[i].name;
|
|
1558
1616
|
|
|
1559
1617
|
if ( name.indexOf( "data-" ) === 0 ) {
|
|
1560
|
-
name = name.
|
|
1618
|
+
name = jQuery.camelCase( name.substring(5) );
|
|
1619
|
+
|
|
1561
1620
|
dataAttr( this[0], name, data[ name ] );
|
|
1562
1621
|
}
|
|
1563
1622
|
}
|
|
@@ -1611,7 +1670,9 @@ function dataAttr( elem, key, data ) {
|
|
|
1611
1670
|
// If nothing was found internally, try to fetch any
|
|
1612
1671
|
// data from the HTML5 data-* attribute
|
|
1613
1672
|
if ( data === undefined && elem.nodeType === 1 ) {
|
|
1614
|
-
|
|
1673
|
+
var name = "data-" + key.replace( rmultiDash, "$1-$2" ).toLowerCase();
|
|
1674
|
+
|
|
1675
|
+
data = elem.getAttribute( name );
|
|
1615
1676
|
|
|
1616
1677
|
if ( typeof data === "string" ) {
|
|
1617
1678
|
try {
|
|
@@ -1652,35 +1713,76 @@ function isEmptyDataObject( obj ) {
|
|
|
1652
1713
|
|
|
1653
1714
|
(function( jQuery ) {
|
|
1654
1715
|
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1716
|
+
function handleQueueMarkDefer( elem, type, src ) {
|
|
1717
|
+
var deferDataKey = type + "defer",
|
|
1718
|
+
queueDataKey = type + "queue",
|
|
1719
|
+
markDataKey = type + "mark",
|
|
1720
|
+
defer = jQuery.data( elem, deferDataKey, undefined, true );
|
|
1721
|
+
if ( defer &&
|
|
1722
|
+
( src === "queue" || !jQuery.data( elem, queueDataKey, undefined, true ) ) &&
|
|
1723
|
+
( src === "mark" || !jQuery.data( elem, markDataKey, undefined, true ) ) ) {
|
|
1724
|
+
// Give room for hard-coded callbacks to fire first
|
|
1725
|
+
// and eventually mark/queue something else on the element
|
|
1726
|
+
setTimeout( function() {
|
|
1727
|
+
if ( !jQuery.data( elem, queueDataKey, undefined, true ) &&
|
|
1728
|
+
!jQuery.data( elem, markDataKey, undefined, true ) ) {
|
|
1729
|
+
jQuery.removeData( elem, deferDataKey, true );
|
|
1730
|
+
defer.resolve();
|
|
1731
|
+
}
|
|
1732
|
+
}, 0 );
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
1660
1735
|
|
|
1661
|
-
|
|
1662
|
-
var q = jQuery._data( elem, type );
|
|
1736
|
+
jQuery.extend({
|
|
1663
1737
|
|
|
1664
|
-
|
|
1665
|
-
if (
|
|
1666
|
-
|
|
1738
|
+
_mark: function( elem, type ) {
|
|
1739
|
+
if ( elem ) {
|
|
1740
|
+
type = (type || "fx") + "mark";
|
|
1741
|
+
jQuery.data( elem, type, (jQuery.data(elem,type,undefined,true) || 0) + 1, true );
|
|
1667
1742
|
}
|
|
1743
|
+
},
|
|
1668
1744
|
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1745
|
+
_unmark: function( force, elem, type ) {
|
|
1746
|
+
if ( force !== true ) {
|
|
1747
|
+
type = elem;
|
|
1748
|
+
elem = force;
|
|
1749
|
+
force = false;
|
|
1674
1750
|
}
|
|
1751
|
+
if ( elem ) {
|
|
1752
|
+
type = type || "fx";
|
|
1753
|
+
var key = type + "mark",
|
|
1754
|
+
count = force ? 0 : ( (jQuery.data( elem, key, undefined, true) || 1 ) - 1 );
|
|
1755
|
+
if ( count ) {
|
|
1756
|
+
jQuery.data( elem, key, count, true );
|
|
1757
|
+
} else {
|
|
1758
|
+
jQuery.removeData( elem, key, true );
|
|
1759
|
+
handleQueueMarkDefer( elem, type, "mark" );
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
},
|
|
1675
1763
|
|
|
1676
|
-
|
|
1764
|
+
queue: function( elem, type, data ) {
|
|
1765
|
+
if ( elem ) {
|
|
1766
|
+
type = (type || "fx") + "queue";
|
|
1767
|
+
var q = jQuery.data( elem, type, undefined, true );
|
|
1768
|
+
// Speed up dequeue by getting out quickly if this is just a lookup
|
|
1769
|
+
if ( data ) {
|
|
1770
|
+
if ( !q || jQuery.isArray(data) ) {
|
|
1771
|
+
q = jQuery.data( elem, type, jQuery.makeArray(data), true );
|
|
1772
|
+
} else {
|
|
1773
|
+
q.push( data );
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
return q || [];
|
|
1777
|
+
}
|
|
1677
1778
|
},
|
|
1678
1779
|
|
|
1679
1780
|
dequeue: function( elem, type ) {
|
|
1680
1781
|
type = type || "fx";
|
|
1681
1782
|
|
|
1682
1783
|
var queue = jQuery.queue( elem, type ),
|
|
1683
|
-
fn = queue.shift()
|
|
1784
|
+
fn = queue.shift(),
|
|
1785
|
+
defer;
|
|
1684
1786
|
|
|
1685
1787
|
// If the fx queue is dequeued, always remove the progress sentinel
|
|
1686
1788
|
if ( fn === "inprogress" ) {
|
|
@@ -1701,6 +1803,7 @@ jQuery.extend({
|
|
|
1701
1803
|
|
|
1702
1804
|
if ( !queue.length ) {
|
|
1703
1805
|
jQuery.removeData( elem, type + "queue", true );
|
|
1806
|
+
handleQueueMarkDefer( elem, type, "queue" );
|
|
1704
1807
|
}
|
|
1705
1808
|
}
|
|
1706
1809
|
});
|
|
@@ -1715,7 +1818,7 @@ jQuery.fn.extend({
|
|
|
1715
1818
|
if ( data === undefined ) {
|
|
1716
1819
|
return jQuery.queue( this[0], type );
|
|
1717
1820
|
}
|
|
1718
|
-
return this.each(function(
|
|
1821
|
+
return this.each(function() {
|
|
1719
1822
|
var queue = jQuery.queue( this, type, data );
|
|
1720
1823
|
|
|
1721
1824
|
if ( type === "fx" && queue[0] !== "inprogress" ) {
|
|
@@ -1728,7 +1831,6 @@ jQuery.fn.extend({
|
|
|
1728
1831
|
jQuery.dequeue( this, type );
|
|
1729
1832
|
});
|
|
1730
1833
|
},
|
|
1731
|
-
|
|
1732
1834
|
// Based off of the plugin by Clint Helfers, with permission.
|
|
1733
1835
|
// http://blindsignals.com/index.php/2009/07/jquery-delay/
|
|
1734
1836
|
delay: function( time, type ) {
|
|
@@ -1742,9 +1844,41 @@ jQuery.fn.extend({
|
|
|
1742
1844
|
}, time );
|
|
1743
1845
|
});
|
|
1744
1846
|
},
|
|
1745
|
-
|
|
1746
1847
|
clearQueue: function( type ) {
|
|
1747
1848
|
return this.queue( type || "fx", [] );
|
|
1849
|
+
},
|
|
1850
|
+
// Get a promise resolved when queues of a certain type
|
|
1851
|
+
// are emptied (fx is the type by default)
|
|
1852
|
+
promise: function( type, object ) {
|
|
1853
|
+
if ( typeof type !== "string" ) {
|
|
1854
|
+
object = type;
|
|
1855
|
+
type = undefined;
|
|
1856
|
+
}
|
|
1857
|
+
type = type || "fx";
|
|
1858
|
+
var defer = jQuery.Deferred(),
|
|
1859
|
+
elements = this,
|
|
1860
|
+
i = elements.length,
|
|
1861
|
+
count = 1,
|
|
1862
|
+
deferDataKey = type + "defer",
|
|
1863
|
+
queueDataKey = type + "queue",
|
|
1864
|
+
markDataKey = type + "mark",
|
|
1865
|
+
tmp;
|
|
1866
|
+
function resolve() {
|
|
1867
|
+
if ( !( --count ) ) {
|
|
1868
|
+
defer.resolveWith( elements, [ elements ] );
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
while( i-- ) {
|
|
1872
|
+
if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
|
|
1873
|
+
( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
|
|
1874
|
+
jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
|
|
1875
|
+
jQuery.data( elements[ i ], deferDataKey, jQuery._Deferred(), true ) )) {
|
|
1876
|
+
count++;
|
|
1877
|
+
tmp.done( resolve );
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
resolve();
|
|
1881
|
+
return defer.promise();
|
|
1748
1882
|
}
|
|
1749
1883
|
});
|
|
1750
1884
|
|
|
@@ -1754,51 +1888,51 @@ jQuery.fn.extend({
|
|
|
1754
1888
|
(function( jQuery ) {
|
|
1755
1889
|
|
|
1756
1890
|
var rclass = /[\n\t\r]/g,
|
|
1757
|
-
|
|
1891
|
+
rspace = /\s+/,
|
|
1758
1892
|
rreturn = /\r/g,
|
|
1759
|
-
rspecialurl = /^(?:href|src|style)$/,
|
|
1760
1893
|
rtype = /^(?:button|input)$/i,
|
|
1761
1894
|
rfocusable = /^(?:button|input|object|select|textarea)$/i,
|
|
1762
1895
|
rclickable = /^a(?:rea)?$/i,
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
"for": "htmlFor",
|
|
1767
|
-
"class": "className",
|
|
1768
|
-
readonly: "readOnly",
|
|
1769
|
-
maxlength: "maxLength",
|
|
1770
|
-
cellspacing: "cellSpacing",
|
|
1771
|
-
rowspan: "rowSpan",
|
|
1772
|
-
colspan: "colSpan",
|
|
1773
|
-
tabindex: "tabIndex",
|
|
1774
|
-
usemap: "useMap",
|
|
1775
|
-
frameborder: "frameBorder"
|
|
1776
|
-
};
|
|
1896
|
+
rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
|
|
1897
|
+
rinvalidChar = /\:/,
|
|
1898
|
+
formHook, boolHook;
|
|
1777
1899
|
|
|
1778
1900
|
jQuery.fn.extend({
|
|
1779
1901
|
attr: function( name, value ) {
|
|
1780
1902
|
return jQuery.access( this, name, value, true, jQuery.attr );
|
|
1781
1903
|
},
|
|
1782
1904
|
|
|
1783
|
-
removeAttr: function( name
|
|
1784
|
-
return this.each(function(){
|
|
1785
|
-
jQuery.
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1905
|
+
removeAttr: function( name ) {
|
|
1906
|
+
return this.each(function() {
|
|
1907
|
+
jQuery.removeAttr( this, name );
|
|
1908
|
+
});
|
|
1909
|
+
},
|
|
1910
|
+
|
|
1911
|
+
prop: function( name, value ) {
|
|
1912
|
+
return jQuery.access( this, name, value, true, jQuery.prop );
|
|
1913
|
+
},
|
|
1914
|
+
|
|
1915
|
+
removeProp: function( name ) {
|
|
1916
|
+
name = jQuery.propFix[ name ] || name;
|
|
1917
|
+
return this.each(function() {
|
|
1918
|
+
// try/catch handles cases where IE balks (such as removing a property on window)
|
|
1919
|
+
try {
|
|
1920
|
+
this[ name ] = undefined;
|
|
1921
|
+
delete this[ name ];
|
|
1922
|
+
} catch( e ) {}
|
|
1789
1923
|
});
|
|
1790
1924
|
},
|
|
1791
1925
|
|
|
1792
1926
|
addClass: function( value ) {
|
|
1793
|
-
if ( jQuery.isFunction(value) ) {
|
|
1927
|
+
if ( jQuery.isFunction( value ) ) {
|
|
1794
1928
|
return this.each(function(i) {
|
|
1795
1929
|
var self = jQuery(this);
|
|
1796
|
-
self.addClass( value.call(this, i, self.attr("class")) );
|
|
1930
|
+
self.addClass( value.call(this, i, self.attr("class") || "") );
|
|
1797
1931
|
});
|
|
1798
1932
|
}
|
|
1799
1933
|
|
|
1800
1934
|
if ( value && typeof value === "string" ) {
|
|
1801
|
-
var classNames = (value || "").split(
|
|
1935
|
+
var classNames = (value || "").split( rspace );
|
|
1802
1936
|
|
|
1803
1937
|
for ( var i = 0, l = this.length; i < l; i++ ) {
|
|
1804
1938
|
var elem = this[i];
|
|
@@ -1834,7 +1968,7 @@ jQuery.fn.extend({
|
|
|
1834
1968
|
}
|
|
1835
1969
|
|
|
1836
1970
|
if ( (value && typeof value === "string") || value === undefined ) {
|
|
1837
|
-
var classNames = (value || "").split(
|
|
1971
|
+
var classNames = (value || "").split( rspace );
|
|
1838
1972
|
|
|
1839
1973
|
for ( var i = 0, l = this.length; i < l; i++ ) {
|
|
1840
1974
|
var elem = this[i];
|
|
@@ -1875,7 +2009,7 @@ jQuery.fn.extend({
|
|
|
1875
2009
|
i = 0,
|
|
1876
2010
|
self = jQuery( this ),
|
|
1877
2011
|
state = stateVal,
|
|
1878
|
-
classNames = value.split(
|
|
2012
|
+
classNames = value.split( rspace );
|
|
1879
2013
|
|
|
1880
2014
|
while ( (className = classNames[ i++ ]) ) {
|
|
1881
2015
|
// check each className given, space seperated list
|
|
@@ -1907,82 +2041,36 @@ jQuery.fn.extend({
|
|
|
1907
2041
|
},
|
|
1908
2042
|
|
|
1909
2043
|
val: function( value ) {
|
|
2044
|
+
var hooks, ret,
|
|
2045
|
+
elem = this[0];
|
|
2046
|
+
|
|
1910
2047
|
if ( !arguments.length ) {
|
|
1911
|
-
var elem = this[0];
|
|
1912
|
-
|
|
1913
2048
|
if ( elem ) {
|
|
1914
|
-
|
|
1915
|
-
// attributes.value is undefined in Blackberry 4.7 but
|
|
1916
|
-
// uses .value. See #6932
|
|
1917
|
-
var val = elem.attributes.value;
|
|
1918
|
-
return !val || val.specified ? elem.value : elem.text;
|
|
1919
|
-
}
|
|
1920
|
-
|
|
1921
|
-
// We need to handle select boxes special
|
|
1922
|
-
if ( jQuery.nodeName( elem, "select" ) ) {
|
|
1923
|
-
var index = elem.selectedIndex,
|
|
1924
|
-
values = [],
|
|
1925
|
-
options = elem.options,
|
|
1926
|
-
one = elem.type === "select-one";
|
|
1927
|
-
|
|
1928
|
-
// Nothing was selected
|
|
1929
|
-
if ( index < 0 ) {
|
|
1930
|
-
return null;
|
|
1931
|
-
}
|
|
2049
|
+
hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ];
|
|
1932
2050
|
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
var option = options[ i ];
|
|
1936
|
-
|
|
1937
|
-
// Don't return options that are disabled or in a disabled optgroup
|
|
1938
|
-
if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
|
|
1939
|
-
(!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
|
|
1940
|
-
|
|
1941
|
-
// Get the specific value for the option
|
|
1942
|
-
value = jQuery(option).val();
|
|
1943
|
-
|
|
1944
|
-
// We don't need an array for one selects
|
|
1945
|
-
if ( one ) {
|
|
1946
|
-
return value;
|
|
1947
|
-
}
|
|
1948
|
-
|
|
1949
|
-
// Multi-Selects return an array
|
|
1950
|
-
values.push( value );
|
|
1951
|
-
}
|
|
1952
|
-
}
|
|
1953
|
-
|
|
1954
|
-
// Fixes Bug #2551 -- select.val() broken in IE after form.reset()
|
|
1955
|
-
if ( one && !values.length && options.length ) {
|
|
1956
|
-
return jQuery( options[ index ] ).val();
|
|
1957
|
-
}
|
|
1958
|
-
|
|
1959
|
-
return values;
|
|
2051
|
+
if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
|
|
2052
|
+
return ret;
|
|
1960
2053
|
}
|
|
1961
2054
|
|
|
1962
|
-
// Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
|
|
1963
|
-
if ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) {
|
|
1964
|
-
return elem.getAttribute("value") === null ? "on" : elem.value;
|
|
1965
|
-
}
|
|
1966
|
-
|
|
1967
|
-
// Everything else, we just grab the value
|
|
1968
2055
|
return (elem.value || "").replace(rreturn, "");
|
|
1969
|
-
|
|
1970
2056
|
}
|
|
1971
2057
|
|
|
1972
2058
|
return undefined;
|
|
1973
2059
|
}
|
|
1974
2060
|
|
|
1975
|
-
var isFunction = jQuery.isFunction(value);
|
|
2061
|
+
var isFunction = jQuery.isFunction( value );
|
|
1976
2062
|
|
|
1977
|
-
return this.each(function(i) {
|
|
1978
|
-
var self = jQuery(this), val
|
|
2063
|
+
return this.each(function( i ) {
|
|
2064
|
+
var self = jQuery(this), val;
|
|
1979
2065
|
|
|
1980
2066
|
if ( this.nodeType !== 1 ) {
|
|
1981
2067
|
return;
|
|
1982
2068
|
}
|
|
1983
2069
|
|
|
1984
2070
|
if ( isFunction ) {
|
|
1985
|
-
val = value.call(this, i, self.val());
|
|
2071
|
+
val = value.call( this, i, self.val() );
|
|
2072
|
+
} else {
|
|
2073
|
+
val = value;
|
|
1986
2074
|
}
|
|
1987
2075
|
|
|
1988
2076
|
// Treat null/undefined as ""; convert numbers to string
|
|
@@ -1990,34 +2078,89 @@ jQuery.fn.extend({
|
|
|
1990
2078
|
val = "";
|
|
1991
2079
|
} else if ( typeof val === "number" ) {
|
|
1992
2080
|
val += "";
|
|
1993
|
-
} else if ( jQuery.isArray(val) ) {
|
|
1994
|
-
val = jQuery.map(val, function (value) {
|
|
2081
|
+
} else if ( jQuery.isArray( val ) ) {
|
|
2082
|
+
val = jQuery.map(val, function ( value ) {
|
|
1995
2083
|
return value == null ? "" : value + "";
|
|
1996
2084
|
});
|
|
1997
2085
|
}
|
|
1998
2086
|
|
|
1999
|
-
|
|
2000
|
-
|
|
2087
|
+
hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ];
|
|
2088
|
+
|
|
2089
|
+
// If set returns undefined, fall back to normal setting
|
|
2090
|
+
if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
|
|
2091
|
+
this.value = val;
|
|
2092
|
+
}
|
|
2093
|
+
});
|
|
2094
|
+
}
|
|
2095
|
+
});
|
|
2096
|
+
|
|
2097
|
+
jQuery.extend({
|
|
2098
|
+
valHooks: {
|
|
2099
|
+
option: {
|
|
2100
|
+
get: function( elem ) {
|
|
2101
|
+
// attributes.value is undefined in Blackberry 4.7 but
|
|
2102
|
+
// uses .value. See #6932
|
|
2103
|
+
var val = elem.attributes.value;
|
|
2104
|
+
return !val || val.specified ? elem.value : elem.text;
|
|
2105
|
+
}
|
|
2106
|
+
},
|
|
2107
|
+
select: {
|
|
2108
|
+
get: function( elem ) {
|
|
2109
|
+
var value,
|
|
2110
|
+
index = elem.selectedIndex,
|
|
2111
|
+
values = [],
|
|
2112
|
+
options = elem.options,
|
|
2113
|
+
one = elem.type === "select-one";
|
|
2114
|
+
|
|
2115
|
+
// Nothing was selected
|
|
2116
|
+
if ( index < 0 ) {
|
|
2117
|
+
return null;
|
|
2118
|
+
}
|
|
2119
|
+
|
|
2120
|
+
// Loop through all the selected options
|
|
2121
|
+
for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
|
|
2122
|
+
var option = options[ i ];
|
|
2001
2123
|
|
|
2002
|
-
|
|
2003
|
-
|
|
2124
|
+
// Don't return options that are disabled or in a disabled optgroup
|
|
2125
|
+
if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
|
|
2126
|
+
(!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
|
|
2127
|
+
|
|
2128
|
+
// Get the specific value for the option
|
|
2129
|
+
value = jQuery( option ).val();
|
|
2130
|
+
|
|
2131
|
+
// We don't need an array for one selects
|
|
2132
|
+
if ( one ) {
|
|
2133
|
+
return value;
|
|
2134
|
+
}
|
|
2135
|
+
|
|
2136
|
+
// Multi-Selects return an array
|
|
2137
|
+
values.push( value );
|
|
2138
|
+
}
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2141
|
+
// Fixes Bug #2551 -- select.val() broken in IE after form.reset()
|
|
2142
|
+
if ( one && !values.length && options.length ) {
|
|
2143
|
+
return jQuery( options[ index ] ).val();
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2146
|
+
return values;
|
|
2147
|
+
},
|
|
2004
2148
|
|
|
2005
|
-
|
|
2149
|
+
set: function( elem, value ) {
|
|
2150
|
+
var values = jQuery.makeArray( value );
|
|
2151
|
+
|
|
2152
|
+
jQuery(elem).find("option").each(function() {
|
|
2006
2153
|
this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
|
|
2007
2154
|
});
|
|
2008
2155
|
|
|
2009
2156
|
if ( !values.length ) {
|
|
2010
|
-
|
|
2157
|
+
elem.selectedIndex = -1;
|
|
2011
2158
|
}
|
|
2012
|
-
|
|
2013
|
-
} else {
|
|
2014
|
-
this.value = val;
|
|
2159
|
+
return values;
|
|
2015
2160
|
}
|
|
2016
|
-
}
|
|
2017
|
-
}
|
|
2018
|
-
});
|
|
2161
|
+
}
|
|
2162
|
+
},
|
|
2019
2163
|
|
|
2020
|
-
jQuery.extend({
|
|
2021
2164
|
attrFn: {
|
|
2022
2165
|
val: true,
|
|
2023
2166
|
css: true,
|
|
@@ -2028,115 +2171,335 @@ jQuery.extend({
|
|
|
2028
2171
|
height: true,
|
|
2029
2172
|
offset: true
|
|
2030
2173
|
},
|
|
2031
|
-
|
|
2174
|
+
|
|
2175
|
+
attrFix: {
|
|
2176
|
+
// Always normalize to ensure hook usage
|
|
2177
|
+
tabindex: "tabIndex"
|
|
2178
|
+
},
|
|
2179
|
+
|
|
2032
2180
|
attr: function( elem, name, value, pass ) {
|
|
2181
|
+
var nType = elem.nodeType;
|
|
2182
|
+
|
|
2033
2183
|
// don't get/set attributes on text, comment and attribute nodes
|
|
2034
|
-
if ( !elem ||
|
|
2184
|
+
if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
|
|
2035
2185
|
return undefined;
|
|
2036
2186
|
}
|
|
2037
2187
|
|
|
2038
2188
|
if ( pass && name in jQuery.attrFn ) {
|
|
2039
|
-
return jQuery(elem)[name](value);
|
|
2189
|
+
return jQuery( elem )[ name ]( value );
|
|
2040
2190
|
}
|
|
2041
2191
|
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2192
|
+
// Fallback to prop when attributes are not supported
|
|
2193
|
+
if ( !("getAttribute" in elem) ) {
|
|
2194
|
+
return jQuery.prop( elem, name, value );
|
|
2195
|
+
}
|
|
2045
2196
|
|
|
2046
|
-
|
|
2047
|
-
|
|
2197
|
+
var ret, hooks,
|
|
2198
|
+
notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
|
|
2199
|
+
|
|
2200
|
+
// Normalize the name if needed
|
|
2201
|
+
name = notxml && jQuery.attrFix[ name ] || name;
|
|
2202
|
+
|
|
2203
|
+
hooks = jQuery.attrHooks[ name ];
|
|
2048
2204
|
|
|
2049
|
-
|
|
2205
|
+
if ( !hooks ) {
|
|
2206
|
+
// Use boolHook for boolean attributes
|
|
2207
|
+
if ( rboolean.test( name ) &&
|
|
2208
|
+
(typeof value === "boolean" || value === undefined || value.toLowerCase() === name.toLowerCase()) ) {
|
|
2209
|
+
|
|
2210
|
+
hooks = boolHook;
|
|
2211
|
+
|
|
2212
|
+
// Use formHook for forms and if the name contains certain characters
|
|
2213
|
+
} else if ( formHook && (jQuery.nodeName( elem, "form" ) || rinvalidChar.test( name )) ) {
|
|
2214
|
+
hooks = formHook;
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2218
|
+
if ( value !== undefined ) {
|
|
2219
|
+
|
|
2220
|
+
if ( value === null ) {
|
|
2221
|
+
jQuery.removeAttr( elem, name );
|
|
2222
|
+
return undefined;
|
|
2223
|
+
|
|
2224
|
+
} else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
|
|
2225
|
+
return ret;
|
|
2226
|
+
|
|
2227
|
+
} else {
|
|
2228
|
+
elem.setAttribute( name, "" + value );
|
|
2229
|
+
return value;
|
|
2230
|
+
}
|
|
2231
|
+
|
|
2232
|
+
} else if ( hooks && "get" in hooks && notxml ) {
|
|
2233
|
+
return hooks.get( elem, name );
|
|
2234
|
+
|
|
2235
|
+
} else {
|
|
2236
|
+
|
|
2237
|
+
ret = elem.getAttribute( name );
|
|
2238
|
+
|
|
2239
|
+
// Non-existent attributes return null, we normalize to undefined
|
|
2240
|
+
return ret === null ?
|
|
2241
|
+
undefined :
|
|
2242
|
+
ret;
|
|
2243
|
+
}
|
|
2244
|
+
},
|
|
2245
|
+
|
|
2246
|
+
removeAttr: function( elem, name ) {
|
|
2247
|
+
var propName;
|
|
2050
2248
|
if ( elem.nodeType === 1 ) {
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2249
|
+
name = jQuery.attrFix[ name ] || name;
|
|
2250
|
+
|
|
2251
|
+
if ( jQuery.support.getSetAttribute ) {
|
|
2252
|
+
// Use removeAttribute in browsers that support it
|
|
2253
|
+
elem.removeAttribute( name );
|
|
2254
|
+
} else {
|
|
2255
|
+
jQuery.attr( elem, name, "" );
|
|
2256
|
+
elem.removeAttributeNode( elem.getAttributeNode( name ) );
|
|
2257
|
+
}
|
|
2258
|
+
|
|
2259
|
+
// Set corresponding property to false for boolean attributes
|
|
2260
|
+
if ( rboolean.test( name ) && (propName = jQuery.propFix[ name ] || name) in elem ) {
|
|
2261
|
+
elem[ propName ] = false;
|
|
2262
|
+
}
|
|
2263
|
+
}
|
|
2264
|
+
},
|
|
2265
|
+
|
|
2266
|
+
attrHooks: {
|
|
2267
|
+
type: {
|
|
2268
|
+
set: function( elem, value ) {
|
|
2269
|
+
// We can't allow the type property to be changed (since it causes problems in IE)
|
|
2270
|
+
if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
|
|
2271
|
+
jQuery.error( "type property can't be changed" );
|
|
2272
|
+
} else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
|
|
2273
|
+
// Setting the type on a radio button after the value resets the value in IE6-9
|
|
2274
|
+
// Reset value to it's default in case type is set after value
|
|
2275
|
+
// This is for element creation
|
|
2276
|
+
var val = elem.value;
|
|
2277
|
+
elem.setAttribute( "type", value );
|
|
2278
|
+
if ( val ) {
|
|
2279
|
+
elem.value = val;
|
|
2064
2280
|
}
|
|
2281
|
+
return value;
|
|
2065
2282
|
}
|
|
2066
2283
|
}
|
|
2284
|
+
},
|
|
2285
|
+
tabIndex: {
|
|
2286
|
+
get: function( elem ) {
|
|
2287
|
+
// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
|
|
2288
|
+
// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
|
|
2289
|
+
var attributeNode = elem.getAttributeNode("tabIndex");
|
|
2067
2290
|
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2291
|
+
return attributeNode && attributeNode.specified ?
|
|
2292
|
+
parseInt( attributeNode.value, 10 ) :
|
|
2293
|
+
rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
|
|
2294
|
+
0 :
|
|
2295
|
+
undefined;
|
|
2296
|
+
}
|
|
2297
|
+
}
|
|
2298
|
+
},
|
|
2076
2299
|
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2300
|
+
propFix: {
|
|
2301
|
+
tabindex: "tabIndex",
|
|
2302
|
+
readonly: "readOnly",
|
|
2303
|
+
"for": "htmlFor",
|
|
2304
|
+
"class": "className",
|
|
2305
|
+
maxlength: "maxLength",
|
|
2306
|
+
cellspacing: "cellSpacing",
|
|
2307
|
+
cellpadding: "cellPadding",
|
|
2308
|
+
rowspan: "rowSpan",
|
|
2309
|
+
colspan: "colSpan",
|
|
2310
|
+
usemap: "useMap",
|
|
2311
|
+
frameborder: "frameBorder",
|
|
2312
|
+
contenteditable: "contentEditable"
|
|
2313
|
+
},
|
|
2314
|
+
|
|
2315
|
+
prop: function( elem, name, value ) {
|
|
2316
|
+
var nType = elem.nodeType;
|
|
2081
2317
|
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2318
|
+
// don't get/set properties on text, comment and attribute nodes
|
|
2319
|
+
if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
|
|
2320
|
+
return undefined;
|
|
2321
|
+
}
|
|
2086
2322
|
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
return elem.getAttributeNode( name ).nodeValue;
|
|
2090
|
-
}
|
|
2323
|
+
var ret, hooks,
|
|
2324
|
+
notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
|
|
2091
2325
|
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2326
|
+
// Try to normalize/fix the name
|
|
2327
|
+
name = notxml && jQuery.propFix[ name ] || name;
|
|
2328
|
+
|
|
2329
|
+
hooks = jQuery.propHooks[ name ];
|
|
2096
2330
|
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2331
|
+
if ( value !== undefined ) {
|
|
2332
|
+
if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
|
|
2333
|
+
return ret;
|
|
2334
|
+
|
|
2335
|
+
} else {
|
|
2336
|
+
return (elem[ name ] = value);
|
|
2337
|
+
}
|
|
2103
2338
|
|
|
2339
|
+
} else {
|
|
2340
|
+
if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== undefined ) {
|
|
2341
|
+
return ret;
|
|
2342
|
+
|
|
2343
|
+
} else {
|
|
2104
2344
|
return elem[ name ];
|
|
2105
2345
|
}
|
|
2346
|
+
}
|
|
2347
|
+
},
|
|
2348
|
+
|
|
2349
|
+
propHooks: {}
|
|
2350
|
+
});
|
|
2106
2351
|
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2352
|
+
// Hook for boolean attributes
|
|
2353
|
+
boolHook = {
|
|
2354
|
+
get: function( elem, name ) {
|
|
2355
|
+
// Align boolean attributes with corresponding properties
|
|
2356
|
+
return elem[ jQuery.propFix[ name ] || name ] ?
|
|
2357
|
+
name.toLowerCase() :
|
|
2358
|
+
undefined;
|
|
2359
|
+
},
|
|
2360
|
+
set: function( elem, value, name ) {
|
|
2361
|
+
var propName;
|
|
2362
|
+
if ( value === false ) {
|
|
2363
|
+
// Remove boolean attributes when set to false
|
|
2364
|
+
jQuery.removeAttr( elem, name );
|
|
2365
|
+
} else {
|
|
2366
|
+
// value is true since we know at this point it's type boolean and not false
|
|
2367
|
+
// Set boolean attributes to the same name and set the DOM property
|
|
2368
|
+
propName = jQuery.propFix[ name ] || name;
|
|
2369
|
+
if ( propName in elem ) {
|
|
2370
|
+
// Only set the IDL specifically if it already exists on the element
|
|
2371
|
+
elem[ propName ] = value;
|
|
2372
|
+
}
|
|
2373
|
+
|
|
2374
|
+
elem.setAttribute( name, name.toLowerCase() );
|
|
2375
|
+
}
|
|
2376
|
+
return name;
|
|
2377
|
+
}
|
|
2378
|
+
};
|
|
2379
|
+
|
|
2380
|
+
// Use the value property for back compat
|
|
2381
|
+
// Use the formHook for button elements in IE6/7 (#1954)
|
|
2382
|
+
jQuery.attrHooks.value = {
|
|
2383
|
+
get: function( elem, name ) {
|
|
2384
|
+
if ( formHook && jQuery.nodeName( elem, "button" ) ) {
|
|
2385
|
+
return formHook.get( elem, name );
|
|
2386
|
+
}
|
|
2387
|
+
return elem.value;
|
|
2388
|
+
},
|
|
2389
|
+
set: function( elem, value, name ) {
|
|
2390
|
+
if ( formHook && jQuery.nodeName( elem, "button" ) ) {
|
|
2391
|
+
return formHook.set( elem, value, name );
|
|
2392
|
+
}
|
|
2393
|
+
// Does not return so that setAttribute is also used
|
|
2394
|
+
elem.value = value;
|
|
2395
|
+
}
|
|
2396
|
+
};
|
|
2397
|
+
|
|
2398
|
+
// IE6/7 do not support getting/setting some attributes with get/setAttribute
|
|
2399
|
+
if ( !jQuery.support.getSetAttribute ) {
|
|
2400
|
+
|
|
2401
|
+
// propFix is more comprehensive and contains all fixes
|
|
2402
|
+
jQuery.attrFix = jQuery.propFix;
|
|
2403
|
+
|
|
2404
|
+
// Use this for any attribute on a form in IE6/7
|
|
2405
|
+
formHook = jQuery.attrHooks.name = jQuery.valHooks.button = {
|
|
2406
|
+
get: function( elem, name ) {
|
|
2407
|
+
var ret;
|
|
2408
|
+
ret = elem.getAttributeNode( name );
|
|
2409
|
+
// Return undefined if nodeValue is empty string
|
|
2410
|
+
return ret && ret.nodeValue !== "" ?
|
|
2411
|
+
ret.nodeValue :
|
|
2412
|
+
undefined;
|
|
2413
|
+
},
|
|
2414
|
+
set: function( elem, value, name ) {
|
|
2415
|
+
// Check form objects in IE (multiple bugs related)
|
|
2416
|
+
// Only use nodeValue if the attribute node exists on the form
|
|
2417
|
+
var ret = elem.getAttributeNode( name );
|
|
2418
|
+
if ( ret ) {
|
|
2419
|
+
ret.nodeValue = value;
|
|
2420
|
+
return value;
|
|
2421
|
+
}
|
|
2422
|
+
}
|
|
2423
|
+
};
|
|
2424
|
+
|
|
2425
|
+
// Set width and height to auto instead of 0 on empty string( Bug #8150 )
|
|
2426
|
+
// This is for removals
|
|
2427
|
+
jQuery.each([ "width", "height" ], function( i, name ) {
|
|
2428
|
+
jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
|
|
2429
|
+
set: function( elem, value ) {
|
|
2430
|
+
if ( value === "" ) {
|
|
2431
|
+
elem.setAttribute( name, "auto" );
|
|
2432
|
+
return value;
|
|
2110
2433
|
}
|
|
2434
|
+
}
|
|
2435
|
+
});
|
|
2436
|
+
});
|
|
2437
|
+
}
|
|
2438
|
+
|
|
2111
2439
|
|
|
2112
|
-
|
|
2440
|
+
// Some attributes require a special call on IE
|
|
2441
|
+
if ( !jQuery.support.hrefNormalized ) {
|
|
2442
|
+
jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
|
|
2443
|
+
jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
|
|
2444
|
+
get: function( elem ) {
|
|
2445
|
+
var ret = elem.getAttribute( name, 2 );
|
|
2446
|
+
return ret === null ? undefined : ret;
|
|
2113
2447
|
}
|
|
2448
|
+
});
|
|
2449
|
+
});
|
|
2450
|
+
}
|
|
2114
2451
|
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2452
|
+
if ( !jQuery.support.style ) {
|
|
2453
|
+
jQuery.attrHooks.style = {
|
|
2454
|
+
get: function( elem ) {
|
|
2455
|
+
// Return undefined in the case of empty string
|
|
2456
|
+
// Normalize to lowercase since IE uppercases css property names
|
|
2457
|
+
return elem.style.cssText.toLowerCase() || undefined;
|
|
2458
|
+
},
|
|
2459
|
+
set: function( elem, value ) {
|
|
2460
|
+
return (elem.style.cssText = "" + value);
|
|
2461
|
+
}
|
|
2462
|
+
};
|
|
2463
|
+
}
|
|
2464
|
+
|
|
2465
|
+
// Safari mis-reports the default selected property of an option
|
|
2466
|
+
// Accessing the parent's selectedIndex property fixes it
|
|
2467
|
+
if ( !jQuery.support.optSelected ) {
|
|
2468
|
+
jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
|
|
2469
|
+
get: function( elem ) {
|
|
2470
|
+
var parent = elem.parentNode;
|
|
2471
|
+
|
|
2472
|
+
if ( parent ) {
|
|
2473
|
+
parent.selectedIndex;
|
|
2474
|
+
|
|
2475
|
+
// Make sure that it also works with optgroups, see #5701
|
|
2476
|
+
if ( parent.parentNode ) {
|
|
2477
|
+
parent.parentNode.selectedIndex;
|
|
2478
|
+
}
|
|
2118
2479
|
}
|
|
2480
|
+
}
|
|
2481
|
+
});
|
|
2482
|
+
}
|
|
2119
2483
|
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2484
|
+
// Radios and checkboxes getter/setter
|
|
2485
|
+
if ( !jQuery.support.checkOn ) {
|
|
2486
|
+
jQuery.each([ "radio", "checkbox" ], function() {
|
|
2487
|
+
jQuery.valHooks[ this ] = {
|
|
2488
|
+
get: function( elem ) {
|
|
2489
|
+
// Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
|
|
2490
|
+
return elem.getAttribute("value") === null ? "on" : elem.value;
|
|
2491
|
+
}
|
|
2492
|
+
};
|
|
2493
|
+
});
|
|
2494
|
+
}
|
|
2495
|
+
jQuery.each([ "radio", "checkbox" ], function() {
|
|
2496
|
+
jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
|
|
2497
|
+
set: function( elem, value ) {
|
|
2498
|
+
if ( jQuery.isArray( value ) ) {
|
|
2499
|
+
return (elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0);
|
|
2124
2500
|
}
|
|
2125
|
-
|
|
2126
|
-
var attr = !jQuery.support.hrefNormalized && notxml && special ?
|
|
2127
|
-
// Some attributes require a special call on IE
|
|
2128
|
-
elem.getAttribute( name, 2 ) :
|
|
2129
|
-
elem.getAttribute( name );
|
|
2130
|
-
|
|
2131
|
-
// Non-existent attributes return null, we normalize to undefined
|
|
2132
|
-
return attr === null ? undefined : attr;
|
|
2133
|
-
}
|
|
2134
|
-
// Handle everything which isn't a DOM element node
|
|
2135
|
-
if ( set ) {
|
|
2136
|
-
elem[ name ] = value;
|
|
2137
2501
|
}
|
|
2138
|
-
|
|
2139
|
-
}
|
|
2502
|
+
});
|
|
2140
2503
|
});
|
|
2141
2504
|
|
|
2142
2505
|
})( jQuery );
|
|
@@ -2144,10 +2507,11 @@ jQuery.extend({
|
|
|
2144
2507
|
|
|
2145
2508
|
(function( jQuery ) {
|
|
2146
2509
|
|
|
2147
|
-
var
|
|
2510
|
+
var hasOwn = Object.prototype.hasOwnProperty,
|
|
2511
|
+
rnamespaces = /\.(.*)$/,
|
|
2148
2512
|
rformElems = /^(?:textarea|input|select)$/i,
|
|
2149
2513
|
rperiod = /\./g,
|
|
2150
|
-
|
|
2514
|
+
rspaces = / /g,
|
|
2151
2515
|
rescape = /[^\w\s.|`]/g,
|
|
2152
2516
|
fcleanup = function( nm ) {
|
|
2153
2517
|
return nm.replace(rescape, "\\$&");
|
|
@@ -2167,17 +2531,6 @@ jQuery.event = {
|
|
|
2167
2531
|
return;
|
|
2168
2532
|
}
|
|
2169
2533
|
|
|
2170
|
-
// TODO :: Use a try/catch until it's safe to pull this out (likely 1.6)
|
|
2171
|
-
// Minor release fix for bug #8018
|
|
2172
|
-
try {
|
|
2173
|
-
// For whatever reason, IE has trouble passing the window object
|
|
2174
|
-
// around, causing it to be cloned in the process
|
|
2175
|
-
if ( jQuery.isWindow( elem ) && ( elem !== window && !elem.frameElement ) ) {
|
|
2176
|
-
elem = window;
|
|
2177
|
-
}
|
|
2178
|
-
}
|
|
2179
|
-
catch ( e ) {}
|
|
2180
|
-
|
|
2181
2534
|
if ( handler === false ) {
|
|
2182
2535
|
handler = returnFalse;
|
|
2183
2536
|
} else if ( !handler ) {
|
|
@@ -2215,9 +2568,9 @@ jQuery.event = {
|
|
|
2215
2568
|
|
|
2216
2569
|
if ( !eventHandle ) {
|
|
2217
2570
|
elemData.handle = eventHandle = function( e ) {
|
|
2218
|
-
//
|
|
2219
|
-
// an event is called after a page has unloaded
|
|
2220
|
-
return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
|
|
2571
|
+
// Discard the second event of a jQuery.event.trigger() and
|
|
2572
|
+
// when an event is called after a page has unloaded
|
|
2573
|
+
return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
|
|
2221
2574
|
jQuery.event.handle.apply( eventHandle.elem, arguments ) :
|
|
2222
2575
|
undefined;
|
|
2223
2576
|
};
|
|
@@ -2287,7 +2640,7 @@ jQuery.event = {
|
|
|
2287
2640
|
// Add the function to the element's handler list
|
|
2288
2641
|
handlers.push( handleObj );
|
|
2289
2642
|
|
|
2290
|
-
// Keep track of which events have been used, for
|
|
2643
|
+
// Keep track of which events have been used, for event optimization
|
|
2291
2644
|
jQuery.event.global[ type ] = true;
|
|
2292
2645
|
}
|
|
2293
2646
|
|
|
@@ -2420,182 +2773,185 @@ jQuery.event = {
|
|
|
2420
2773
|
}
|
|
2421
2774
|
}
|
|
2422
2775
|
},
|
|
2776
|
+
|
|
2777
|
+
// Events that are safe to short-circuit if no handlers are attached.
|
|
2778
|
+
// Native DOM events should not be added, they may have inline handlers.
|
|
2779
|
+
customEvent: {
|
|
2780
|
+
"getData": true,
|
|
2781
|
+
"setData": true,
|
|
2782
|
+
"changeData": true
|
|
2783
|
+
},
|
|
2423
2784
|
|
|
2424
|
-
|
|
2425
|
-
trigger: function( event, data, elem /*, bubbling */ ) {
|
|
2785
|
+
trigger: function( event, data, elem, onlyHandlers ) {
|
|
2426
2786
|
// Event object or event type
|
|
2427
2787
|
var type = event.type || event,
|
|
2428
|
-
|
|
2788
|
+
namespaces = [],
|
|
2789
|
+
exclusive;
|
|
2429
2790
|
|
|
2430
|
-
if ( !
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
jQuery.extend( jQuery.Event(type), event ) :
|
|
2436
|
-
// Just the event type (string)
|
|
2437
|
-
jQuery.Event(type);
|
|
2791
|
+
if ( type.indexOf("!") >= 0 ) {
|
|
2792
|
+
// Exclusive events trigger only for the exact event (no namespaces)
|
|
2793
|
+
type = type.slice(0, -1);
|
|
2794
|
+
exclusive = true;
|
|
2795
|
+
}
|
|
2438
2796
|
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2797
|
+
if ( type.indexOf(".") >= 0 ) {
|
|
2798
|
+
// Namespaced trigger; create a regexp to match event type in handle()
|
|
2799
|
+
namespaces = type.split(".");
|
|
2800
|
+
type = namespaces.shift();
|
|
2801
|
+
namespaces.sort();
|
|
2802
|
+
}
|
|
2443
2803
|
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
// Only trigger if we've ever bound an event for it
|
|
2450
|
-
if ( jQuery.event.global[ type ] ) {
|
|
2451
|
-
// XXX This code smells terrible. event.js should not be directly
|
|
2452
|
-
// inspecting the data cache
|
|
2453
|
-
jQuery.each( jQuery.cache, function() {
|
|
2454
|
-
// internalKey variable is just used to make it easier to find
|
|
2455
|
-
// and potentially change this stuff later; currently it just
|
|
2456
|
-
// points to jQuery.expando
|
|
2457
|
-
var internalKey = jQuery.expando,
|
|
2458
|
-
internalCache = this[ internalKey ];
|
|
2459
|
-
if ( internalCache && internalCache.events && internalCache.events[ type ] ) {
|
|
2460
|
-
jQuery.event.trigger( event, data, internalCache.handle.elem );
|
|
2461
|
-
}
|
|
2462
|
-
});
|
|
2463
|
-
}
|
|
2464
|
-
}
|
|
2804
|
+
if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
|
|
2805
|
+
// No jQuery handlers for this event type, and it can't have inline handlers
|
|
2806
|
+
return;
|
|
2807
|
+
}
|
|
2465
2808
|
|
|
2466
|
-
|
|
2809
|
+
// Caller can pass in an Event, Object, or just an event type string
|
|
2810
|
+
event = typeof event === "object" ?
|
|
2811
|
+
// jQuery.Event object
|
|
2812
|
+
event[ jQuery.expando ] ? event :
|
|
2813
|
+
// Object literal
|
|
2814
|
+
new jQuery.Event( type, event ) :
|
|
2815
|
+
// Just the event type (string)
|
|
2816
|
+
new jQuery.Event( type );
|
|
2467
2817
|
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2818
|
+
event.type = type;
|
|
2819
|
+
event.exclusive = exclusive;
|
|
2820
|
+
event.namespace = namespaces.join(".");
|
|
2821
|
+
event.namespace_re = new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)");
|
|
2822
|
+
|
|
2823
|
+
// triggerHandler() and global events don't bubble or run the default action
|
|
2824
|
+
if ( onlyHandlers || !elem ) {
|
|
2825
|
+
event.preventDefault();
|
|
2826
|
+
event.stopPropagation();
|
|
2827
|
+
}
|
|
2472
2828
|
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2829
|
+
// Handle a global trigger
|
|
2830
|
+
if ( !elem ) {
|
|
2831
|
+
// TODO: Stop taunting the data cache; remove global events and always attach to document
|
|
2832
|
+
jQuery.each( jQuery.cache, function() {
|
|
2833
|
+
// internalKey variable is just used to make it easier to find
|
|
2834
|
+
// and potentially change this stuff later; currently it just
|
|
2835
|
+
// points to jQuery.expando
|
|
2836
|
+
var internalKey = jQuery.expando,
|
|
2837
|
+
internalCache = this[ internalKey ];
|
|
2838
|
+
if ( internalCache && internalCache.events && internalCache.events[ type ] ) {
|
|
2839
|
+
jQuery.event.trigger( event, data, internalCache.handle.elem );
|
|
2840
|
+
}
|
|
2841
|
+
});
|
|
2842
|
+
return;
|
|
2843
|
+
}
|
|
2476
2844
|
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2845
|
+
// Don't do events on text and comment nodes
|
|
2846
|
+
if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
|
|
2847
|
+
return;
|
|
2480
2848
|
}
|
|
2481
2849
|
|
|
2482
|
-
event
|
|
2850
|
+
// Clean up the event in case it is being reused
|
|
2851
|
+
event.result = undefined;
|
|
2852
|
+
event.target = elem;
|
|
2483
2853
|
|
|
2484
|
-
//
|
|
2485
|
-
|
|
2854
|
+
// Clone any incoming data and prepend the event, creating the handler arg list
|
|
2855
|
+
data = data ? jQuery.makeArray( data ) : [];
|
|
2856
|
+
data.unshift( event );
|
|
2486
2857
|
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2858
|
+
var cur = elem,
|
|
2859
|
+
// IE doesn't like method names with a colon (#3533, #8272)
|
|
2860
|
+
ontype = type.indexOf(":") < 0 ? "on" + type : "";
|
|
2490
2861
|
|
|
2491
|
-
|
|
2862
|
+
// Fire event on the current element, then bubble up the DOM tree
|
|
2863
|
+
do {
|
|
2864
|
+
var handle = jQuery._data( cur, "handle" );
|
|
2492
2865
|
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
if ( elem[ "on" + type ] && elem[ "on" + type ].apply( elem, data ) === false ) {
|
|
2497
|
-
event.result = false;
|
|
2498
|
-
event.preventDefault();
|
|
2499
|
-
}
|
|
2866
|
+
event.currentTarget = cur;
|
|
2867
|
+
if ( handle ) {
|
|
2868
|
+
handle.apply( cur, data );
|
|
2500
2869
|
}
|
|
2501
2870
|
|
|
2502
|
-
|
|
2503
|
-
|
|
2871
|
+
// Trigger an inline bound script
|
|
2872
|
+
if ( ontype && jQuery.acceptData( cur ) && cur[ ontype ] && cur[ ontype ].apply( cur, data ) === false ) {
|
|
2873
|
+
event.result = false;
|
|
2874
|
+
event.preventDefault();
|
|
2875
|
+
}
|
|
2504
2876
|
|
|
2505
|
-
|
|
2506
|
-
|
|
2877
|
+
// Bubble up to document, then to window
|
|
2878
|
+
cur = cur.parentNode || cur.ownerDocument || cur === event.target.ownerDocument && window;
|
|
2879
|
+
} while ( cur && !event.isPropagationStopped() );
|
|
2507
2880
|
|
|
2508
|
-
|
|
2881
|
+
// If nobody prevented the default action, do it now
|
|
2882
|
+
if ( !event.isDefaultPrevented() ) {
|
|
2509
2883
|
var old,
|
|
2510
|
-
|
|
2511
|
-
targetType = type.replace( rnamespaces, "" ),
|
|
2512
|
-
isClick = jQuery.nodeName( target, "a" ) && targetType === "click",
|
|
2513
|
-
special = jQuery.event.special[ targetType ] || {};
|
|
2884
|
+
special = jQuery.event.special[ type ] || {};
|
|
2514
2885
|
|
|
2515
|
-
if ( (!special._default || special._default.call( elem, event ) === false) &&
|
|
2516
|
-
!
|
|
2886
|
+
if ( (!special._default || special._default.call( elem.ownerDocument, event ) === false) &&
|
|
2887
|
+
!(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
|
|
2517
2888
|
|
|
2889
|
+
// Call a native DOM method on the target with the same name name as the event.
|
|
2890
|
+
// Can't use an .isFunction)() check here because IE6/7 fails that test.
|
|
2891
|
+
// IE<9 dies on focus to hidden element (#1486), may want to revisit a try/catch.
|
|
2518
2892
|
try {
|
|
2519
|
-
if (
|
|
2520
|
-
//
|
|
2521
|
-
old =
|
|
2893
|
+
if ( ontype && elem[ type ] ) {
|
|
2894
|
+
// Don't re-trigger an onFOO event when we call its FOO() method
|
|
2895
|
+
old = elem[ ontype ];
|
|
2522
2896
|
|
|
2523
2897
|
if ( old ) {
|
|
2524
|
-
|
|
2898
|
+
elem[ ontype ] = null;
|
|
2525
2899
|
}
|
|
2526
2900
|
|
|
2527
|
-
jQuery.event.triggered =
|
|
2528
|
-
|
|
2901
|
+
jQuery.event.triggered = type;
|
|
2902
|
+
elem[ type ]();
|
|
2529
2903
|
}
|
|
2530
|
-
|
|
2531
|
-
// prevent IE from throwing an error for some elements with some event types, see #3533
|
|
2532
|
-
} catch (triggerError) {}
|
|
2904
|
+
} catch ( ieError ) {}
|
|
2533
2905
|
|
|
2534
2906
|
if ( old ) {
|
|
2535
|
-
|
|
2907
|
+
elem[ ontype ] = old;
|
|
2536
2908
|
}
|
|
2537
2909
|
|
|
2538
2910
|
jQuery.event.triggered = undefined;
|
|
2539
2911
|
}
|
|
2540
2912
|
}
|
|
2913
|
+
|
|
2914
|
+
return event.result;
|
|
2541
2915
|
},
|
|
2542
2916
|
|
|
2543
2917
|
handle: function( event ) {
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2918
|
+
event = jQuery.event.fix( event || window.event );
|
|
2919
|
+
// Snapshot the handlers list since a called handler may add/remove events.
|
|
2920
|
+
var handlers = ((jQuery._data( this, "events" ) || {})[ event.type ] || []).slice(0),
|
|
2921
|
+
run_all = !event.exclusive && !event.namespace,
|
|
2922
|
+
args = Array.prototype.slice.call( arguments, 0 );
|
|
2923
|
+
|
|
2924
|
+
// Use the fix-ed Event rather than the (read-only) native event
|
|
2925
|
+
args[0] = event;
|
|
2549
2926
|
event.currentTarget = this;
|
|
2550
2927
|
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
event.
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
for ( var j = 0, l = handlers.length; j < l; j++ ) {
|
|
2572
|
-
var handleObj = handlers[ j ];
|
|
2573
|
-
|
|
2574
|
-
// Filter the functions by class
|
|
2575
|
-
if ( all || namespace_re.test( handleObj.namespace ) ) {
|
|
2576
|
-
// Pass in a reference to the handler function itself
|
|
2577
|
-
// So that we can later remove it
|
|
2578
|
-
event.handler = handleObj.handler;
|
|
2579
|
-
event.data = handleObj.data;
|
|
2580
|
-
event.handleObj = handleObj;
|
|
2581
|
-
|
|
2582
|
-
var ret = handleObj.handler.apply( this, args );
|
|
2583
|
-
|
|
2584
|
-
if ( ret !== undefined ) {
|
|
2585
|
-
event.result = ret;
|
|
2586
|
-
if ( ret === false ) {
|
|
2587
|
-
event.preventDefault();
|
|
2588
|
-
event.stopPropagation();
|
|
2589
|
-
}
|
|
2928
|
+
for ( var j = 0, l = handlers.length; j < l; j++ ) {
|
|
2929
|
+
var handleObj = handlers[ j ];
|
|
2930
|
+
|
|
2931
|
+
// Triggered event must 1) be non-exclusive and have no namespace, or
|
|
2932
|
+
// 2) have namespace(s) a subset or equal to those in the bound event.
|
|
2933
|
+
if ( run_all || event.namespace_re.test( handleObj.namespace ) ) {
|
|
2934
|
+
// Pass in a reference to the handler function itself
|
|
2935
|
+
// So that we can later remove it
|
|
2936
|
+
event.handler = handleObj.handler;
|
|
2937
|
+
event.data = handleObj.data;
|
|
2938
|
+
event.handleObj = handleObj;
|
|
2939
|
+
|
|
2940
|
+
var ret = handleObj.handler.apply( this, args );
|
|
2941
|
+
|
|
2942
|
+
if ( ret !== undefined ) {
|
|
2943
|
+
event.result = ret;
|
|
2944
|
+
if ( ret === false ) {
|
|
2945
|
+
event.preventDefault();
|
|
2946
|
+
event.stopPropagation();
|
|
2590
2947
|
}
|
|
2948
|
+
}
|
|
2591
2949
|
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
}
|
|
2950
|
+
if ( event.isImmediatePropagationStopped() ) {
|
|
2951
|
+
break;
|
|
2595
2952
|
}
|
|
2596
2953
|
}
|
|
2597
2954
|
}
|
|
2598
|
-
|
|
2599
2955
|
return event.result;
|
|
2600
2956
|
},
|
|
2601
2957
|
|
|
@@ -2634,8 +2990,9 @@ jQuery.event = {
|
|
|
2634
2990
|
|
|
2635
2991
|
// Calculate pageX/Y if missing and clientX/Y available
|
|
2636
2992
|
if ( event.pageX == null && event.clientX != null ) {
|
|
2637
|
-
var
|
|
2638
|
-
|
|
2993
|
+
var eventDocument = event.target.ownerDocument || document,
|
|
2994
|
+
doc = eventDocument.documentElement,
|
|
2995
|
+
body = eventDocument.body;
|
|
2639
2996
|
|
|
2640
2997
|
event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
|
|
2641
2998
|
event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
|
|
@@ -2714,10 +3071,10 @@ jQuery.removeEvent = document.removeEventListener ?
|
|
|
2714
3071
|
}
|
|
2715
3072
|
};
|
|
2716
3073
|
|
|
2717
|
-
jQuery.Event = function( src ) {
|
|
3074
|
+
jQuery.Event = function( src, props ) {
|
|
2718
3075
|
// Allow instantiation without the 'new' keyword
|
|
2719
3076
|
if ( !this.preventDefault ) {
|
|
2720
|
-
return new jQuery.Event( src );
|
|
3077
|
+
return new jQuery.Event( src, props );
|
|
2721
3078
|
}
|
|
2722
3079
|
|
|
2723
3080
|
// Event object
|
|
@@ -2735,6 +3092,11 @@ jQuery.Event = function( src ) {
|
|
|
2735
3092
|
this.type = src;
|
|
2736
3093
|
}
|
|
2737
3094
|
|
|
3095
|
+
// Put explicitly provided properties onto the event object
|
|
3096
|
+
if ( props ) {
|
|
3097
|
+
jQuery.extend( this, props );
|
|
3098
|
+
}
|
|
3099
|
+
|
|
2738
3100
|
// timeStamp is buggy for some events on Firefox(#3843)
|
|
2739
3101
|
// So we won't rely on the native value
|
|
2740
3102
|
this.timeStamp = jQuery.now();
|
|
@@ -2799,6 +3161,9 @@ var withinElement = function( event ) {
|
|
|
2799
3161
|
// Check if mouse(over|out) are still within the same parent element
|
|
2800
3162
|
var parent = event.relatedTarget;
|
|
2801
3163
|
|
|
3164
|
+
// set the correct event type
|
|
3165
|
+
event.type = event.data;
|
|
3166
|
+
|
|
2802
3167
|
// Firefox sometimes assigns relatedTarget a XUL element
|
|
2803
3168
|
// which we cannot access the parentNode property of
|
|
2804
3169
|
try {
|
|
@@ -2808,15 +3173,13 @@ var withinElement = function( event ) {
|
|
|
2808
3173
|
if ( parent && parent !== document && !parent.parentNode ) {
|
|
2809
3174
|
return;
|
|
2810
3175
|
}
|
|
3176
|
+
|
|
2811
3177
|
// Traverse up the tree
|
|
2812
3178
|
while ( parent && parent !== this ) {
|
|
2813
3179
|
parent = parent.parentNode;
|
|
2814
3180
|
}
|
|
2815
3181
|
|
|
2816
3182
|
if ( parent !== this ) {
|
|
2817
|
-
// set the correct event type
|
|
2818
|
-
event.type = event.data;
|
|
2819
|
-
|
|
2820
3183
|
// handle event if we actually just moused on to a non sub-element
|
|
2821
3184
|
jQuery.event.handle.apply( this, arguments );
|
|
2822
3185
|
}
|
|
@@ -2852,7 +3215,7 @@ if ( !jQuery.support.submitBubbles ) {
|
|
|
2852
3215
|
|
|
2853
3216
|
jQuery.event.special.submit = {
|
|
2854
3217
|
setup: function( data, namespaces ) {
|
|
2855
|
-
if (
|
|
3218
|
+
if ( !jQuery.nodeName( this, "form" ) ) {
|
|
2856
3219
|
jQuery.event.add(this, "click.specialSubmit", function( e ) {
|
|
2857
3220
|
var elem = e.target,
|
|
2858
3221
|
type = elem.type;
|
|
@@ -2901,7 +3264,7 @@ if ( !jQuery.support.changeBubbles ) {
|
|
|
2901
3264
|
}).join("-") :
|
|
2902
3265
|
"";
|
|
2903
3266
|
|
|
2904
|
-
} else if (
|
|
3267
|
+
} else if ( jQuery.nodeName( elem, "select" ) ) {
|
|
2905
3268
|
val = elem.selectedIndex;
|
|
2906
3269
|
}
|
|
2907
3270
|
|
|
@@ -2941,9 +3304,9 @@ if ( !jQuery.support.changeBubbles ) {
|
|
|
2941
3304
|
beforedeactivate: testChange,
|
|
2942
3305
|
|
|
2943
3306
|
click: function( e ) {
|
|
2944
|
-
var elem = e.target, type = elem.type;
|
|
3307
|
+
var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
|
|
2945
3308
|
|
|
2946
|
-
if ( type === "radio" || type === "checkbox" ||
|
|
3309
|
+
if ( type === "radio" || type === "checkbox" || jQuery.nodeName( elem, "select" ) ) {
|
|
2947
3310
|
testChange.call( this, e );
|
|
2948
3311
|
}
|
|
2949
3312
|
},
|
|
@@ -2951,9 +3314,9 @@ if ( !jQuery.support.changeBubbles ) {
|
|
|
2951
3314
|
// Change has to be called before submit
|
|
2952
3315
|
// Keydown will be called before keypress, which is used in submit-event delegation
|
|
2953
3316
|
keydown: function( e ) {
|
|
2954
|
-
var elem = e.target, type = elem.type;
|
|
3317
|
+
var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
|
|
2955
3318
|
|
|
2956
|
-
if ( (e.keyCode === 13 &&
|
|
3319
|
+
if ( (e.keyCode === 13 && !jQuery.nodeName( elem, "textarea" ) ) ||
|
|
2957
3320
|
(e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
|
|
2958
3321
|
type === "select-multiple" ) {
|
|
2959
3322
|
testChange.call( this, e );
|
|
@@ -3010,12 +3373,12 @@ function trigger( type, elem, args ) {
|
|
|
3010
3373
|
}
|
|
3011
3374
|
|
|
3012
3375
|
// Create "bubbling" focus and blur events
|
|
3013
|
-
if (
|
|
3376
|
+
if ( !jQuery.support.focusinBubbles ) {
|
|
3014
3377
|
jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
|
|
3015
|
-
|
|
3378
|
+
|
|
3016
3379
|
// Attach a single capturing handler while someone wants focusin/focusout
|
|
3017
3380
|
var attaches = 0;
|
|
3018
|
-
|
|
3381
|
+
|
|
3019
3382
|
jQuery.event.special[ fix ] = {
|
|
3020
3383
|
setup: function() {
|
|
3021
3384
|
if ( attaches++ === 0 ) {
|
|
@@ -3045,6 +3408,8 @@ if ( document.addEventListener ) {
|
|
|
3045
3408
|
|
|
3046
3409
|
jQuery.each(["bind", "one"], function( i, name ) {
|
|
3047
3410
|
jQuery.fn[ name ] = function( type, data, fn ) {
|
|
3411
|
+
var handler;
|
|
3412
|
+
|
|
3048
3413
|
// Handle object literals
|
|
3049
3414
|
if ( typeof type === "object" ) {
|
|
3050
3415
|
for ( var key in type ) {
|
|
@@ -3053,15 +3418,20 @@ jQuery.each(["bind", "one"], function( i, name ) {
|
|
|
3053
3418
|
return this;
|
|
3054
3419
|
}
|
|
3055
3420
|
|
|
3056
|
-
if (
|
|
3421
|
+
if ( arguments.length === 2 || data === false ) {
|
|
3057
3422
|
fn = data;
|
|
3058
3423
|
data = undefined;
|
|
3059
3424
|
}
|
|
3060
3425
|
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3426
|
+
if ( name === "one" ) {
|
|
3427
|
+
handler = function( event ) {
|
|
3428
|
+
jQuery( this ).unbind( event, handler );
|
|
3429
|
+
return fn.apply( this, arguments );
|
|
3430
|
+
};
|
|
3431
|
+
handler.guid = fn.guid || jQuery.guid++;
|
|
3432
|
+
} else {
|
|
3433
|
+
handler = fn;
|
|
3434
|
+
}
|
|
3065
3435
|
|
|
3066
3436
|
if ( type === "unload" && name !== "one" ) {
|
|
3067
3437
|
this.one( type, data, fn );
|
|
@@ -3099,7 +3469,7 @@ jQuery.fn.extend({
|
|
|
3099
3469
|
|
|
3100
3470
|
undelegate: function( selector, types, fn ) {
|
|
3101
3471
|
if ( arguments.length === 0 ) {
|
|
3102
|
-
|
|
3472
|
+
return this.unbind( "live" );
|
|
3103
3473
|
|
|
3104
3474
|
} else {
|
|
3105
3475
|
return this.die( types, null, fn, selector );
|
|
@@ -3114,35 +3484,34 @@ jQuery.fn.extend({
|
|
|
3114
3484
|
|
|
3115
3485
|
triggerHandler: function( type, data ) {
|
|
3116
3486
|
if ( this[0] ) {
|
|
3117
|
-
|
|
3118
|
-
event.preventDefault();
|
|
3119
|
-
event.stopPropagation();
|
|
3120
|
-
jQuery.event.trigger( event, data, this[0] );
|
|
3121
|
-
return event.result;
|
|
3487
|
+
return jQuery.event.trigger( type, data, this[0], true );
|
|
3122
3488
|
}
|
|
3123
3489
|
},
|
|
3124
3490
|
|
|
3125
3491
|
toggle: function( fn ) {
|
|
3126
3492
|
// Save reference to arguments for access in closure
|
|
3127
3493
|
var args = arguments,
|
|
3128
|
-
|
|
3494
|
+
guid = fn.guid || jQuery.guid++,
|
|
3495
|
+
i = 0,
|
|
3496
|
+
toggler = function( event ) {
|
|
3497
|
+
// Figure out which function to execute
|
|
3498
|
+
var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i;
|
|
3499
|
+
jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 );
|
|
3500
|
+
|
|
3501
|
+
// Make sure that clicks stop
|
|
3502
|
+
event.preventDefault();
|
|
3503
|
+
|
|
3504
|
+
// and execute the function
|
|
3505
|
+
return args[ lastToggle ].apply( this, arguments ) || false;
|
|
3506
|
+
};
|
|
3129
3507
|
|
|
3130
3508
|
// link all the functions, so any of them can unbind this click handler
|
|
3509
|
+
toggler.guid = guid;
|
|
3131
3510
|
while ( i < args.length ) {
|
|
3132
|
-
|
|
3511
|
+
args[ i++ ].guid = guid;
|
|
3133
3512
|
}
|
|
3134
3513
|
|
|
3135
|
-
return this.click(
|
|
3136
|
-
// Figure out which function to execute
|
|
3137
|
-
var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
|
|
3138
|
-
jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
|
|
3139
|
-
|
|
3140
|
-
// Make sure that clicks stop
|
|
3141
|
-
event.preventDefault();
|
|
3142
|
-
|
|
3143
|
-
// and execute the function
|
|
3144
|
-
return args[ lastToggle ].apply( this, arguments ) || false;
|
|
3145
|
-
}));
|
|
3514
|
+
return this.click( toggler );
|
|
3146
3515
|
},
|
|
3147
3516
|
|
|
3148
3517
|
hover: function( fnOver, fnOut ) {
|
|
@@ -3171,8 +3540,16 @@ jQuery.each(["live", "die"], function( i, name ) {
|
|
|
3171
3540
|
return this;
|
|
3172
3541
|
}
|
|
3173
3542
|
|
|
3174
|
-
if (
|
|
3175
|
-
|
|
3543
|
+
if ( name === "die" && !types &&
|
|
3544
|
+
origSelector && origSelector.charAt(0) === "." ) {
|
|
3545
|
+
|
|
3546
|
+
context.unbind( origSelector );
|
|
3547
|
+
|
|
3548
|
+
return this;
|
|
3549
|
+
}
|
|
3550
|
+
|
|
3551
|
+
if ( data === false || jQuery.isFunction( data ) ) {
|
|
3552
|
+
fn = data || returnFalse;
|
|
3176
3553
|
data = undefined;
|
|
3177
3554
|
}
|
|
3178
3555
|
|
|
@@ -3194,7 +3571,7 @@ jQuery.each(["live", "die"], function( i, name ) {
|
|
|
3194
3571
|
|
|
3195
3572
|
preType = type;
|
|
3196
3573
|
|
|
3197
|
-
if (
|
|
3574
|
+
if ( liveMap[ type ] ) {
|
|
3198
3575
|
types.push( liveMap[ type ] + namespaces );
|
|
3199
3576
|
type = type + namespaces;
|
|
3200
3577
|
|
|
@@ -3265,6 +3642,11 @@ function liveHandler( event ) {
|
|
|
3265
3642
|
if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) {
|
|
3266
3643
|
event.type = handleObj.preType;
|
|
3267
3644
|
related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0];
|
|
3645
|
+
|
|
3646
|
+
// Make sure not to accidentally match a child element with the same selector
|
|
3647
|
+
if ( related && jQuery.contains( elem, related ) ) {
|
|
3648
|
+
related = elem;
|
|
3649
|
+
}
|
|
3268
3650
|
}
|
|
3269
3651
|
|
|
3270
3652
|
if ( !related || related !== elem ) {
|
|
@@ -3303,7 +3685,7 @@ function liveHandler( event ) {
|
|
|
3303
3685
|
}
|
|
3304
3686
|
|
|
3305
3687
|
function liveConvert( type, selector ) {
|
|
3306
|
-
return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(
|
|
3688
|
+
return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspaces, "&");
|
|
3307
3689
|
}
|
|
3308
3690
|
|
|
3309
3691
|
jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
|
|
@@ -3330,6 +3712,7 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
|
|
|
3330
3712
|
})( jQuery );
|
|
3331
3713
|
|
|
3332
3714
|
|
|
3715
|
+
|
|
3333
3716
|
/*!
|
|
3334
3717
|
* Sizzle CSS Selector Engine
|
|
3335
3718
|
* Copyright 2011, The Dojo Foundation
|
|
@@ -3957,42 +4340,50 @@ var Expr = Sizzle.selectors = {
|
|
|
3957
4340
|
var attr = elem.getAttribute( "type" ), type = elem.type;
|
|
3958
4341
|
// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
|
|
3959
4342
|
// use getAttribute instead to test this case
|
|
3960
|
-
return "text" === type && ( attr === type || attr === null );
|
|
4343
|
+
return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
|
|
3961
4344
|
},
|
|
3962
4345
|
|
|
3963
4346
|
radio: function( elem ) {
|
|
3964
|
-
return "radio" === elem.type;
|
|
4347
|
+
return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type;
|
|
3965
4348
|
},
|
|
3966
4349
|
|
|
3967
4350
|
checkbox: function( elem ) {
|
|
3968
|
-
return "checkbox" === elem.type;
|
|
4351
|
+
return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type;
|
|
3969
4352
|
},
|
|
3970
4353
|
|
|
3971
4354
|
file: function( elem ) {
|
|
3972
|
-
return "file" === elem.type;
|
|
4355
|
+
return elem.nodeName.toLowerCase() === "input" && "file" === elem.type;
|
|
3973
4356
|
},
|
|
4357
|
+
|
|
3974
4358
|
password: function( elem ) {
|
|
3975
|
-
return "password" === elem.type;
|
|
4359
|
+
return elem.nodeName.toLowerCase() === "input" && "password" === elem.type;
|
|
3976
4360
|
},
|
|
3977
4361
|
|
|
3978
4362
|
submit: function( elem ) {
|
|
3979
|
-
|
|
4363
|
+
var name = elem.nodeName.toLowerCase();
|
|
4364
|
+
return (name === "input" || name === "button") && "submit" === elem.type;
|
|
3980
4365
|
},
|
|
3981
4366
|
|
|
3982
4367
|
image: function( elem ) {
|
|
3983
|
-
return "image" === elem.type;
|
|
4368
|
+
return elem.nodeName.toLowerCase() === "input" && "image" === elem.type;
|
|
3984
4369
|
},
|
|
3985
4370
|
|
|
3986
4371
|
reset: function( elem ) {
|
|
3987
|
-
|
|
4372
|
+
var name = elem.nodeName.toLowerCase();
|
|
4373
|
+
return (name === "input" || name === "button") && "reset" === elem.type;
|
|
3988
4374
|
},
|
|
3989
4375
|
|
|
3990
4376
|
button: function( elem ) {
|
|
3991
|
-
|
|
4377
|
+
var name = elem.nodeName.toLowerCase();
|
|
4378
|
+
return name === "input" && "button" === elem.type || name === "button";
|
|
3992
4379
|
},
|
|
3993
4380
|
|
|
3994
4381
|
input: function( elem ) {
|
|
3995
4382
|
return (/input|select|textarea|button/i).test( elem.nodeName );
|
|
4383
|
+
},
|
|
4384
|
+
|
|
4385
|
+
focus: function( elem ) {
|
|
4386
|
+
return elem === elem.ownerDocument.activeElement;
|
|
3996
4387
|
}
|
|
3997
4388
|
},
|
|
3998
4389
|
setFilters: {
|
|
@@ -4245,6 +4636,16 @@ if ( document.documentElement.compareDocumentPosition ) {
|
|
|
4245
4636
|
|
|
4246
4637
|
} else {
|
|
4247
4638
|
sortOrder = function( a, b ) {
|
|
4639
|
+
// The nodes are identical, we can exit early
|
|
4640
|
+
if ( a === b ) {
|
|
4641
|
+
hasDuplicate = true;
|
|
4642
|
+
return 0;
|
|
4643
|
+
|
|
4644
|
+
// Fallback to using sourceIndex (in IE) if it's available on both nodes
|
|
4645
|
+
} else if ( a.sourceIndex && b.sourceIndex ) {
|
|
4646
|
+
return a.sourceIndex - b.sourceIndex;
|
|
4647
|
+
}
|
|
4648
|
+
|
|
4248
4649
|
var al, bl,
|
|
4249
4650
|
ap = [],
|
|
4250
4651
|
bp = [],
|
|
@@ -4252,13 +4653,8 @@ if ( document.documentElement.compareDocumentPosition ) {
|
|
|
4252
4653
|
bup = b.parentNode,
|
|
4253
4654
|
cur = aup;
|
|
4254
4655
|
|
|
4255
|
-
// The nodes are identical, we can exit early
|
|
4256
|
-
if ( a === b ) {
|
|
4257
|
-
hasDuplicate = true;
|
|
4258
|
-
return 0;
|
|
4259
|
-
|
|
4260
4656
|
// If the nodes are siblings (or identical) we can do a quick check
|
|
4261
|
-
|
|
4657
|
+
if ( aup === bup ) {
|
|
4262
4658
|
return siblingCheck( a, b );
|
|
4263
4659
|
|
|
4264
4660
|
// If no parents were found then the nodes are disconnected
|
|
@@ -4757,17 +5153,30 @@ var runtil = /Until$/,
|
|
|
4757
5153
|
|
|
4758
5154
|
jQuery.fn.extend({
|
|
4759
5155
|
find: function( selector ) {
|
|
5156
|
+
var self = this,
|
|
5157
|
+
i, l;
|
|
5158
|
+
|
|
5159
|
+
if ( typeof selector !== "string" ) {
|
|
5160
|
+
return jQuery( selector ).filter(function() {
|
|
5161
|
+
for ( i = 0, l = self.length; i < l; i++ ) {
|
|
5162
|
+
if ( jQuery.contains( self[ i ], this ) ) {
|
|
5163
|
+
return true;
|
|
5164
|
+
}
|
|
5165
|
+
}
|
|
5166
|
+
});
|
|
5167
|
+
}
|
|
5168
|
+
|
|
4760
5169
|
var ret = this.pushStack( "", "find", selector ),
|
|
4761
|
-
length
|
|
5170
|
+
length, n, r;
|
|
4762
5171
|
|
|
4763
|
-
for (
|
|
5172
|
+
for ( i = 0, l = this.length; i < l; i++ ) {
|
|
4764
5173
|
length = ret.length;
|
|
4765
5174
|
jQuery.find( selector, this[i], ret );
|
|
4766
5175
|
|
|
4767
5176
|
if ( i > 0 ) {
|
|
4768
5177
|
// Make sure that the results are unique
|
|
4769
|
-
for (
|
|
4770
|
-
for (
|
|
5178
|
+
for ( n = length; n < ret.length; n++ ) {
|
|
5179
|
+
for ( r = 0; r < length; r++ ) {
|
|
4771
5180
|
if ( ret[r] === ret[n] ) {
|
|
4772
5181
|
ret.splice(n--, 1);
|
|
4773
5182
|
break;
|
|
@@ -4800,12 +5209,15 @@ jQuery.fn.extend({
|
|
|
4800
5209
|
},
|
|
4801
5210
|
|
|
4802
5211
|
is: function( selector ) {
|
|
4803
|
-
return !!selector &&
|
|
5212
|
+
return !!selector && ( typeof selector === "string" ?
|
|
5213
|
+
jQuery.filter( selector, this ).length > 0 :
|
|
5214
|
+
this.filter( selector ).length > 0 );
|
|
4804
5215
|
},
|
|
4805
5216
|
|
|
4806
5217
|
closest: function( selectors, context ) {
|
|
4807
5218
|
var ret = [], i, l, cur = this[0];
|
|
4808
|
-
|
|
5219
|
+
|
|
5220
|
+
// Array
|
|
4809
5221
|
if ( jQuery.isArray( selectors ) ) {
|
|
4810
5222
|
var match, selector,
|
|
4811
5223
|
matches = {},
|
|
@@ -4815,8 +5227,8 @@ jQuery.fn.extend({
|
|
|
4815
5227
|
for ( i = 0, l = selectors.length; i < l; i++ ) {
|
|
4816
5228
|
selector = selectors[i];
|
|
4817
5229
|
|
|
4818
|
-
if ( !matches[selector] ) {
|
|
4819
|
-
matches[selector] =
|
|
5230
|
+
if ( !matches[ selector ] ) {
|
|
5231
|
+
matches[ selector ] = POS.test( selector ) ?
|
|
4820
5232
|
jQuery( selector, context || this.context ) :
|
|
4821
5233
|
selector;
|
|
4822
5234
|
}
|
|
@@ -4824,9 +5236,9 @@ jQuery.fn.extend({
|
|
|
4824
5236
|
|
|
4825
5237
|
while ( cur && cur.ownerDocument && cur !== context ) {
|
|
4826
5238
|
for ( selector in matches ) {
|
|
4827
|
-
match = matches[selector];
|
|
5239
|
+
match = matches[ selector ];
|
|
4828
5240
|
|
|
4829
|
-
if ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) {
|
|
5241
|
+
if ( match.jquery ? match.index( cur ) > -1 : jQuery( cur ).is( match ) ) {
|
|
4830
5242
|
ret.push({ selector: selector, elem: cur, level: level });
|
|
4831
5243
|
}
|
|
4832
5244
|
}
|
|
@@ -4839,8 +5251,10 @@ jQuery.fn.extend({
|
|
|
4839
5251
|
return ret;
|
|
4840
5252
|
}
|
|
4841
5253
|
|
|
4842
|
-
|
|
4843
|
-
|
|
5254
|
+
// String
|
|
5255
|
+
var pos = POS.test( selectors ) || typeof selectors !== "string" ?
|
|
5256
|
+
jQuery( selectors, context || this.context ) :
|
|
5257
|
+
0;
|
|
4844
5258
|
|
|
4845
5259
|
for ( i = 0, l = this.length; i < l; i++ ) {
|
|
4846
5260
|
cur = this[i];
|
|
@@ -4852,14 +5266,14 @@ jQuery.fn.extend({
|
|
|
4852
5266
|
|
|
4853
5267
|
} else {
|
|
4854
5268
|
cur = cur.parentNode;
|
|
4855
|
-
if ( !cur || !cur.ownerDocument || cur === context ) {
|
|
5269
|
+
if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) {
|
|
4856
5270
|
break;
|
|
4857
5271
|
}
|
|
4858
5272
|
}
|
|
4859
5273
|
}
|
|
4860
5274
|
}
|
|
4861
5275
|
|
|
4862
|
-
ret = ret.length > 1 ? jQuery.unique(ret) : ret;
|
|
5276
|
+
ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
|
|
4863
5277
|
|
|
4864
5278
|
return this.pushStack( ret, "closest", selectors );
|
|
4865
5279
|
},
|
|
@@ -4882,7 +5296,7 @@ jQuery.fn.extend({
|
|
|
4882
5296
|
add: function( selector, context ) {
|
|
4883
5297
|
var set = typeof selector === "string" ?
|
|
4884
5298
|
jQuery( selector, context ) :
|
|
4885
|
-
jQuery.makeArray( selector ),
|
|
5299
|
+
jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
|
|
4886
5300
|
all = jQuery.merge( this.get(), set );
|
|
4887
5301
|
|
|
4888
5302
|
return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
|
|
@@ -5020,6 +5434,11 @@ jQuery.extend({
|
|
|
5020
5434
|
|
|
5021
5435
|
// Implement the identical functionality for filter and not
|
|
5022
5436
|
function winnow( elements, qualifier, keep ) {
|
|
5437
|
+
|
|
5438
|
+
// Can't pass null or undefined to indexOf in Firefox 4
|
|
5439
|
+
// Set to 0 to skip string check
|
|
5440
|
+
qualifier = qualifier || 0;
|
|
5441
|
+
|
|
5023
5442
|
if ( jQuery.isFunction( qualifier ) ) {
|
|
5024
5443
|
return jQuery.grep(elements, function( elem, i ) {
|
|
5025
5444
|
var retVal = !!qualifier.call( elem, i, elem );
|
|
@@ -5062,6 +5481,8 @@ var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
|
|
|
5062
5481
|
rnocache = /<(?:script|object|embed|option|style)/i,
|
|
5063
5482
|
// checked="checked" or checked
|
|
5064
5483
|
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
|
|
5484
|
+
rscriptType = /\/(java|ecma)script/i,
|
|
5485
|
+
rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
|
|
5065
5486
|
wrapMap = {
|
|
5066
5487
|
option: [ 1, "<select multiple='multiple'>", "</select>" ],
|
|
5067
5488
|
legend: [ 1, "<fieldset>", "</fieldset>" ],
|
|
@@ -5122,7 +5543,7 @@ jQuery.fn.extend({
|
|
|
5122
5543
|
}
|
|
5123
5544
|
|
|
5124
5545
|
return elem;
|
|
5125
|
-
}).append(this);
|
|
5546
|
+
}).append( this );
|
|
5126
5547
|
}
|
|
5127
5548
|
|
|
5128
5549
|
return this;
|
|
@@ -5430,21 +5851,27 @@ function cloneCopyEvent( src, dest ) {
|
|
|
5430
5851
|
}
|
|
5431
5852
|
}
|
|
5432
5853
|
|
|
5433
|
-
function cloneFixAttributes(src, dest) {
|
|
5854
|
+
function cloneFixAttributes( src, dest ) {
|
|
5855
|
+
var nodeName;
|
|
5856
|
+
|
|
5434
5857
|
// We do not need to do anything for non-Elements
|
|
5435
5858
|
if ( dest.nodeType !== 1 ) {
|
|
5436
5859
|
return;
|
|
5437
5860
|
}
|
|
5438
5861
|
|
|
5439
|
-
var nodeName = dest.nodeName.toLowerCase();
|
|
5440
|
-
|
|
5441
5862
|
// clearAttributes removes the attributes, which we don't want,
|
|
5442
5863
|
// but also removes the attachEvent events, which we *do* want
|
|
5443
|
-
dest.clearAttributes
|
|
5864
|
+
if ( dest.clearAttributes ) {
|
|
5865
|
+
dest.clearAttributes();
|
|
5866
|
+
}
|
|
5444
5867
|
|
|
5445
5868
|
// mergeAttributes, in contrast, only merges back on the
|
|
5446
5869
|
// original attributes, not the events
|
|
5447
|
-
dest.mergeAttributes
|
|
5870
|
+
if ( dest.mergeAttributes ) {
|
|
5871
|
+
dest.mergeAttributes( src );
|
|
5872
|
+
}
|
|
5873
|
+
|
|
5874
|
+
nodeName = dest.nodeName.toLowerCase();
|
|
5448
5875
|
|
|
5449
5876
|
// IE6-8 fail to clone children inside object elements that use
|
|
5450
5877
|
// the proprietary classid attribute value (rather than the type
|
|
@@ -5494,11 +5921,10 @@ jQuery.buildFragment = function( args, nodes, scripts ) {
|
|
|
5494
5921
|
args[0].charAt(0) === "<" && !rnocache.test( args[0] ) && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) {
|
|
5495
5922
|
|
|
5496
5923
|
cacheable = true;
|
|
5924
|
+
|
|
5497
5925
|
cacheresults = jQuery.fragments[ args[0] ];
|
|
5498
|
-
if ( cacheresults ) {
|
|
5499
|
-
|
|
5500
|
-
fragment = cacheresults;
|
|
5501
|
-
}
|
|
5926
|
+
if ( cacheresults && cacheresults !== 1 ) {
|
|
5927
|
+
fragment = cacheresults;
|
|
5502
5928
|
}
|
|
5503
5929
|
}
|
|
5504
5930
|
|
|
@@ -5547,7 +5973,7 @@ jQuery.each({
|
|
|
5547
5973
|
function getAll( elem ) {
|
|
5548
5974
|
if ( "getElementsByTagName" in elem ) {
|
|
5549
5975
|
return elem.getElementsByTagName( "*" );
|
|
5550
|
-
|
|
5976
|
+
|
|
5551
5977
|
} else if ( "querySelectorAll" in elem ) {
|
|
5552
5978
|
return elem.querySelectorAll( "*" );
|
|
5553
5979
|
|
|
@@ -5556,6 +5982,21 @@ function getAll( elem ) {
|
|
|
5556
5982
|
}
|
|
5557
5983
|
}
|
|
5558
5984
|
|
|
5985
|
+
// Used in clean, fixes the defaultChecked property
|
|
5986
|
+
function fixDefaultChecked( elem ) {
|
|
5987
|
+
if ( elem.type === "checkbox" || elem.type === "radio" ) {
|
|
5988
|
+
elem.defaultChecked = elem.checked;
|
|
5989
|
+
}
|
|
5990
|
+
}
|
|
5991
|
+
// Finds all inputs and passes them to fixDefaultChecked
|
|
5992
|
+
function findInputs( elem ) {
|
|
5993
|
+
if ( jQuery.nodeName( elem, "input" ) ) {
|
|
5994
|
+
fixDefaultChecked( elem );
|
|
5995
|
+
} else if ( elem.getElementsByTagName ) {
|
|
5996
|
+
jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
|
|
5997
|
+
}
|
|
5998
|
+
}
|
|
5999
|
+
|
|
5559
6000
|
jQuery.extend({
|
|
5560
6001
|
clone: function( elem, dataAndEvents, deepDataAndEvents ) {
|
|
5561
6002
|
var clone = elem.cloneNode(true),
|
|
@@ -5602,8 +6043,11 @@ jQuery.extend({
|
|
|
5602
6043
|
|
|
5603
6044
|
// Return the cloned set
|
|
5604
6045
|
return clone;
|
|
5605
|
-
},
|
|
6046
|
+
},
|
|
6047
|
+
|
|
5606
6048
|
clean: function( elems, context, fragment, scripts ) {
|
|
6049
|
+
var checkScriptType;
|
|
6050
|
+
|
|
5607
6051
|
context = context || document;
|
|
5608
6052
|
|
|
5609
6053
|
// !context.createElement fails in IE with an error but returns typeof 'object'
|
|
@@ -5611,7 +6055,7 @@ jQuery.extend({
|
|
|
5611
6055
|
context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
|
|
5612
6056
|
}
|
|
5613
6057
|
|
|
5614
|
-
var ret = [];
|
|
6058
|
+
var ret = [], j;
|
|
5615
6059
|
|
|
5616
6060
|
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
|
|
5617
6061
|
if ( typeof elem === "number" ) {
|
|
@@ -5623,54 +6067,67 @@ jQuery.extend({
|
|
|
5623
6067
|
}
|
|
5624
6068
|
|
|
5625
6069
|
// Convert html string into DOM nodes
|
|
5626
|
-
if ( typeof elem === "string"
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
6070
|
+
if ( typeof elem === "string" ) {
|
|
6071
|
+
if ( !rhtml.test( elem ) ) {
|
|
6072
|
+
elem = context.createTextNode( elem );
|
|
6073
|
+
} else {
|
|
6074
|
+
// Fix "XHTML"-style tags in all browsers
|
|
6075
|
+
elem = elem.replace(rxhtmlTag, "<$1></$2>");
|
|
5632
6076
|
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
6077
|
+
// Trim whitespace, otherwise indexOf won't work as expected
|
|
6078
|
+
var tag = (rtagName.exec( elem ) || ["", ""])[1].toLowerCase(),
|
|
6079
|
+
wrap = wrapMap[ tag ] || wrapMap._default,
|
|
6080
|
+
depth = wrap[0],
|
|
6081
|
+
div = context.createElement("div");
|
|
5638
6082
|
|
|
5639
|
-
|
|
5640
|
-
|
|
6083
|
+
// Go to html and back, then peel off extra wrappers
|
|
6084
|
+
div.innerHTML = wrap[1] + elem + wrap[2];
|
|
5641
6085
|
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
6086
|
+
// Move to the right depth
|
|
6087
|
+
while ( depth-- ) {
|
|
6088
|
+
div = div.lastChild;
|
|
6089
|
+
}
|
|
5646
6090
|
|
|
5647
|
-
|
|
5648
|
-
|
|
6091
|
+
// Remove IE's autoinserted <tbody> from table fragments
|
|
6092
|
+
if ( !jQuery.support.tbody ) {
|
|
5649
6093
|
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
6094
|
+
// String was a <table>, *may* have spurious <tbody>
|
|
6095
|
+
var hasBody = rtbody.test(elem),
|
|
6096
|
+
tbody = tag === "table" && !hasBody ?
|
|
6097
|
+
div.firstChild && div.firstChild.childNodes :
|
|
5654
6098
|
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
6099
|
+
// String was a bare <thead> or <tfoot>
|
|
6100
|
+
wrap[1] === "<table>" && !hasBody ?
|
|
6101
|
+
div.childNodes :
|
|
6102
|
+
[];
|
|
5659
6103
|
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
6104
|
+
for ( j = tbody.length - 1; j >= 0 ; --j ) {
|
|
6105
|
+
if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
|
|
6106
|
+
tbody[ j ].parentNode.removeChild( tbody[ j ] );
|
|
6107
|
+
}
|
|
5663
6108
|
}
|
|
5664
6109
|
}
|
|
5665
6110
|
|
|
5666
|
-
|
|
6111
|
+
// IE completely kills leading whitespace when innerHTML is used
|
|
6112
|
+
if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
|
|
6113
|
+
div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
|
|
6114
|
+
}
|
|
5667
6115
|
|
|
5668
|
-
|
|
5669
|
-
if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
|
|
5670
|
-
div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
|
|
6116
|
+
elem = div.childNodes;
|
|
5671
6117
|
}
|
|
6118
|
+
}
|
|
5672
6119
|
|
|
5673
|
-
|
|
6120
|
+
// Resets defaultChecked for any radios and checkboxes
|
|
6121
|
+
// about to be appended to the DOM in IE 6/7 (#8060)
|
|
6122
|
+
var len;
|
|
6123
|
+
if ( !jQuery.support.appendChecked ) {
|
|
6124
|
+
if ( elem[0] && typeof (len = elem.length) === "number" ) {
|
|
6125
|
+
for ( j = 0; j < len; j++ ) {
|
|
6126
|
+
findInputs( elem[j] );
|
|
6127
|
+
}
|
|
6128
|
+
} else {
|
|
6129
|
+
findInputs( elem );
|
|
6130
|
+
}
|
|
5674
6131
|
}
|
|
5675
6132
|
|
|
5676
6133
|
if ( elem.nodeType ) {
|
|
@@ -5681,13 +6138,18 @@ jQuery.extend({
|
|
|
5681
6138
|
}
|
|
5682
6139
|
|
|
5683
6140
|
if ( fragment ) {
|
|
6141
|
+
checkScriptType = function( elem ) {
|
|
6142
|
+
return !elem.type || rscriptType.test( elem.type );
|
|
6143
|
+
};
|
|
5684
6144
|
for ( i = 0; ret[i]; i++ ) {
|
|
5685
6145
|
if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
|
|
5686
6146
|
scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
|
|
5687
6147
|
|
|
5688
6148
|
} else {
|
|
5689
6149
|
if ( ret[i].nodeType === 1 ) {
|
|
5690
|
-
|
|
6150
|
+
var jsTags = jQuery.grep( ret[i].getElementsByTagName( "script" ), checkScriptType );
|
|
6151
|
+
|
|
6152
|
+
ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
|
|
5691
6153
|
}
|
|
5692
6154
|
fragment.appendChild( ret[i] );
|
|
5693
6155
|
}
|
|
@@ -5749,7 +6211,7 @@ function evalScript( i, elem ) {
|
|
|
5749
6211
|
dataType: "script"
|
|
5750
6212
|
});
|
|
5751
6213
|
} else {
|
|
5752
|
-
jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
|
|
6214
|
+
jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) );
|
|
5753
6215
|
}
|
|
5754
6216
|
|
|
5755
6217
|
if ( elem.parentNode ) {
|
|
@@ -5769,6 +6231,8 @@ var ralpha = /alpha\([^)]*\)/i,
|
|
|
5769
6231
|
rupper = /([A-Z]|^ms)/g,
|
|
5770
6232
|
rnumpx = /^-?\d+(?:px)?$/i,
|
|
5771
6233
|
rnum = /^-?\d/,
|
|
6234
|
+
rrelNum = /^[+\-]=/,
|
|
6235
|
+
rrelNumFilter = /[^+\-\.\de]+/g,
|
|
5772
6236
|
|
|
5773
6237
|
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
|
|
5774
6238
|
cssWidth = [ "Left", "Right" ],
|
|
@@ -5819,7 +6283,9 @@ jQuery.extend({
|
|
|
5819
6283
|
"fontWeight": true,
|
|
5820
6284
|
"opacity": true,
|
|
5821
6285
|
"zoom": true,
|
|
5822
|
-
"lineHeight": true
|
|
6286
|
+
"lineHeight": true,
|
|
6287
|
+
"widows": true,
|
|
6288
|
+
"orphans": true
|
|
5823
6289
|
},
|
|
5824
6290
|
|
|
5825
6291
|
// Add in properties whose names you wish to fix before
|
|
@@ -5837,20 +6303,27 @@ jQuery.extend({
|
|
|
5837
6303
|
}
|
|
5838
6304
|
|
|
5839
6305
|
// Make sure that we're working with the right name
|
|
5840
|
-
var ret, origName = jQuery.camelCase( name ),
|
|
6306
|
+
var ret, type, origName = jQuery.camelCase( name ),
|
|
5841
6307
|
style = elem.style, hooks = jQuery.cssHooks[ origName ];
|
|
5842
6308
|
|
|
5843
6309
|
name = jQuery.cssProps[ origName ] || origName;
|
|
5844
6310
|
|
|
5845
6311
|
// Check if we're setting a value
|
|
5846
6312
|
if ( value !== undefined ) {
|
|
6313
|
+
type = typeof value;
|
|
6314
|
+
|
|
5847
6315
|
// Make sure that NaN and null values aren't set. See: #7116
|
|
5848
|
-
if (
|
|
6316
|
+
if ( type === "number" && isNaN( value ) || value == null ) {
|
|
5849
6317
|
return;
|
|
5850
6318
|
}
|
|
5851
6319
|
|
|
6320
|
+
// convert relative number strings (+= or -=) to relative numbers. #7345
|
|
6321
|
+
if ( type === "string" && rrelNum.test( value ) ) {
|
|
6322
|
+
value = +value.replace( rrelNumFilter, "" ) + parseFloat( jQuery.css( elem, name ) );
|
|
6323
|
+
}
|
|
6324
|
+
|
|
5852
6325
|
// If a number was passed in, add 'px' to the (except for certain CSS properties)
|
|
5853
|
-
if (
|
|
6326
|
+
if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
|
|
5854
6327
|
value += "px";
|
|
5855
6328
|
}
|
|
5856
6329
|
|
|
@@ -5875,11 +6348,17 @@ jQuery.extend({
|
|
|
5875
6348
|
},
|
|
5876
6349
|
|
|
5877
6350
|
css: function( elem, name, extra ) {
|
|
6351
|
+
var ret, hooks;
|
|
6352
|
+
|
|
5878
6353
|
// Make sure that we're working with the right name
|
|
5879
|
-
|
|
5880
|
-
|
|
6354
|
+
name = jQuery.camelCase( name );
|
|
6355
|
+
hooks = jQuery.cssHooks[ name ];
|
|
6356
|
+
name = jQuery.cssProps[ name ] || name;
|
|
5881
6357
|
|
|
5882
|
-
|
|
6358
|
+
// cssFloat needs a special treatment
|
|
6359
|
+
if ( name === "cssFloat" ) {
|
|
6360
|
+
name = "float";
|
|
6361
|
+
}
|
|
5883
6362
|
|
|
5884
6363
|
// If a hook was provided get the computed value from there
|
|
5885
6364
|
if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
|
|
@@ -5887,7 +6366,7 @@ jQuery.extend({
|
|
|
5887
6366
|
|
|
5888
6367
|
// Otherwise, if a way to get the computed value exists, use that
|
|
5889
6368
|
} else if ( curCSS ) {
|
|
5890
|
-
return curCSS( elem, name
|
|
6369
|
+
return curCSS( elem, name );
|
|
5891
6370
|
}
|
|
5892
6371
|
},
|
|
5893
6372
|
|
|
@@ -5978,27 +6457,28 @@ if ( !jQuery.support.opacity ) {
|
|
|
5978
6457
|
jQuery.cssHooks.opacity = {
|
|
5979
6458
|
get: function( elem, computed ) {
|
|
5980
6459
|
// IE uses filters for opacity
|
|
5981
|
-
return ropacity.test((computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "") ?
|
|
5982
|
-
(parseFloat(RegExp.$1) / 100) + "" :
|
|
6460
|
+
return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
|
|
6461
|
+
( parseFloat( RegExp.$1 ) / 100 ) + "" :
|
|
5983
6462
|
computed ? "1" : "";
|
|
5984
6463
|
},
|
|
5985
6464
|
|
|
5986
6465
|
set: function( elem, value ) {
|
|
5987
|
-
var style = elem.style
|
|
6466
|
+
var style = elem.style,
|
|
6467
|
+
currentStyle = elem.currentStyle;
|
|
5988
6468
|
|
|
5989
6469
|
// IE has trouble with opacity if it does not have layout
|
|
5990
6470
|
// Force it by setting the zoom level
|
|
5991
6471
|
style.zoom = 1;
|
|
5992
6472
|
|
|
5993
6473
|
// Set the alpha filter to set the opacity
|
|
5994
|
-
var opacity = jQuery.isNaN(value) ?
|
|
6474
|
+
var opacity = jQuery.isNaN( value ) ?
|
|
5995
6475
|
"" :
|
|
5996
6476
|
"alpha(opacity=" + value * 100 + ")",
|
|
5997
|
-
filter = style.filter || "";
|
|
6477
|
+
filter = currentStyle && currentStyle.filter || style.filter || "";
|
|
5998
6478
|
|
|
5999
|
-
style.filter = ralpha.test(filter) ?
|
|
6000
|
-
filter.replace(ralpha, opacity) :
|
|
6001
|
-
|
|
6479
|
+
style.filter = ralpha.test( filter ) ?
|
|
6480
|
+
filter.replace( ralpha, opacity ) :
|
|
6481
|
+
filter + " " + opacity;
|
|
6002
6482
|
}
|
|
6003
6483
|
};
|
|
6004
6484
|
}
|
|
@@ -6026,7 +6506,7 @@ jQuery(function() {
|
|
|
6026
6506
|
});
|
|
6027
6507
|
|
|
6028
6508
|
if ( document.defaultView && document.defaultView.getComputedStyle ) {
|
|
6029
|
-
getComputedStyle = function( elem,
|
|
6509
|
+
getComputedStyle = function( elem, name ) {
|
|
6030
6510
|
var ret, defaultView, computedStyle;
|
|
6031
6511
|
|
|
6032
6512
|
name = name.replace( rupper, "-$1" ).toLowerCase();
|
|
@@ -6139,10 +6619,6 @@ var r20 = /%20/g,
|
|
|
6139
6619
|
rselectTextarea = /^(?:select|textarea)/i,
|
|
6140
6620
|
rspacesAjax = /\s+/,
|
|
6141
6621
|
rts = /([?&])_=[^&]*/,
|
|
6142
|
-
rucHeaders = /(^|\-)([a-z])/g,
|
|
6143
|
-
rucHeadersFunc = function( _, $1, $2 ) {
|
|
6144
|
-
return $1 + $2.toUpperCase();
|
|
6145
|
-
},
|
|
6146
6622
|
rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
|
|
6147
6623
|
|
|
6148
6624
|
// Keep a copy of the old load method
|
|
@@ -6173,9 +6649,9 @@ var r20 = /%20/g,
|
|
|
6173
6649
|
ajaxLocParts;
|
|
6174
6650
|
|
|
6175
6651
|
// #8138, IE may throw an exception when accessing
|
|
6176
|
-
// a field from
|
|
6652
|
+
// a field from window.location if document.domain has been set
|
|
6177
6653
|
try {
|
|
6178
|
-
ajaxLocation =
|
|
6654
|
+
ajaxLocation = location.href;
|
|
6179
6655
|
} catch( e ) {
|
|
6180
6656
|
// Use the href attribute of an A element
|
|
6181
6657
|
// since IE will modify it given document.location
|
|
@@ -6223,7 +6699,7 @@ function addToPrefiltersOrTransports( structure ) {
|
|
|
6223
6699
|
};
|
|
6224
6700
|
}
|
|
6225
6701
|
|
|
6226
|
-
//Base inspection function for prefilters and transports
|
|
6702
|
+
// Base inspection function for prefilters and transports
|
|
6227
6703
|
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
|
|
6228
6704
|
dataType /* internal */, inspected /* internal */ ) {
|
|
6229
6705
|
|
|
@@ -6372,7 +6848,7 @@ jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".sp
|
|
|
6372
6848
|
jQuery.fn[ o ] = function( f ){
|
|
6373
6849
|
return this.bind( o, f );
|
|
6374
6850
|
};
|
|
6375
|
-
}
|
|
6851
|
+
});
|
|
6376
6852
|
|
|
6377
6853
|
jQuery.each( [ "get", "post" ], function( i, method ) {
|
|
6378
6854
|
jQuery[ method ] = function( url, data, callback, type ) {
|
|
@@ -6391,7 +6867,7 @@ jQuery.each( [ "get", "post" ], function( i, method ) {
|
|
|
6391
6867
|
dataType: type
|
|
6392
6868
|
});
|
|
6393
6869
|
};
|
|
6394
|
-
}
|
|
6870
|
+
});
|
|
6395
6871
|
|
|
6396
6872
|
jQuery.extend({
|
|
6397
6873
|
|
|
@@ -6517,6 +6993,7 @@ jQuery.extend({
|
|
|
6517
6993
|
ifModifiedKey,
|
|
6518
6994
|
// Headers (they are sent all at once)
|
|
6519
6995
|
requestHeaders = {},
|
|
6996
|
+
requestHeadersNames = {},
|
|
6520
6997
|
// Response headers
|
|
6521
6998
|
responseHeadersString,
|
|
6522
6999
|
responseHeaders,
|
|
@@ -6540,7 +7017,9 @@ jQuery.extend({
|
|
|
6540
7017
|
// Caches the header
|
|
6541
7018
|
setRequestHeader: function( name, value ) {
|
|
6542
7019
|
if ( !state ) {
|
|
6543
|
-
|
|
7020
|
+
var lname = name.toLowerCase();
|
|
7021
|
+
name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
|
|
7022
|
+
requestHeaders[ name ] = value;
|
|
6544
7023
|
}
|
|
6545
7024
|
return this;
|
|
6546
7025
|
},
|
|
@@ -6788,24 +7267,27 @@ jQuery.extend({
|
|
|
6788
7267
|
|
|
6789
7268
|
// Set the correct header, if data is being sent
|
|
6790
7269
|
if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
|
|
6791
|
-
|
|
7270
|
+
jqXHR.setRequestHeader( "Content-Type", s.contentType );
|
|
6792
7271
|
}
|
|
6793
7272
|
|
|
6794
7273
|
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
|
|
6795
7274
|
if ( s.ifModified ) {
|
|
6796
7275
|
ifModifiedKey = ifModifiedKey || s.url;
|
|
6797
7276
|
if ( jQuery.lastModified[ ifModifiedKey ] ) {
|
|
6798
|
-
|
|
7277
|
+
jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
|
|
6799
7278
|
}
|
|
6800
7279
|
if ( jQuery.etag[ ifModifiedKey ] ) {
|
|
6801
|
-
|
|
7280
|
+
jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );
|
|
6802
7281
|
}
|
|
6803
7282
|
}
|
|
6804
7283
|
|
|
6805
7284
|
// Set the Accepts header for the server, depending on the dataType
|
|
6806
|
-
|
|
6807
|
-
|
|
6808
|
-
s.accepts[
|
|
7285
|
+
jqXHR.setRequestHeader(
|
|
7286
|
+
"Accept",
|
|
7287
|
+
s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
|
|
7288
|
+
s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", */*; q=0.01" : "" ) :
|
|
7289
|
+
s.accepts[ "*" ]
|
|
7290
|
+
);
|
|
6809
7291
|
|
|
6810
7292
|
// Check for headers option
|
|
6811
7293
|
for ( i in s.headers ) {
|
|
@@ -6881,7 +7363,7 @@ jQuery.extend({
|
|
|
6881
7363
|
// Serialize the form elements
|
|
6882
7364
|
jQuery.each( a, function() {
|
|
6883
7365
|
add( this.name, this.value );
|
|
6884
|
-
}
|
|
7366
|
+
});
|
|
6885
7367
|
|
|
6886
7368
|
} else {
|
|
6887
7369
|
// If traditional, encode the "old" way (the way 1.3.2 or older
|
|
@@ -6897,7 +7379,7 @@ jQuery.extend({
|
|
|
6897
7379
|
});
|
|
6898
7380
|
|
|
6899
7381
|
function buildParams( prefix, obj, traditional, add ) {
|
|
6900
|
-
if ( jQuery.isArray( obj )
|
|
7382
|
+
if ( jQuery.isArray( obj ) ) {
|
|
6901
7383
|
// Serialize array item.
|
|
6902
7384
|
jQuery.each( obj, function( i, v ) {
|
|
6903
7385
|
if ( traditional || rbracket.test( prefix ) ) {
|
|
@@ -6917,16 +7399,9 @@ function buildParams( prefix, obj, traditional, add ) {
|
|
|
6917
7399
|
});
|
|
6918
7400
|
|
|
6919
7401
|
} else if ( !traditional && obj != null && typeof obj === "object" ) {
|
|
6920
|
-
// If we see an array here, it is empty and should be treated as an empty
|
|
6921
|
-
// object
|
|
6922
|
-
if ( jQuery.isArray( obj ) || jQuery.isEmptyObject( obj ) ) {
|
|
6923
|
-
add( prefix, "" );
|
|
6924
|
-
|
|
6925
7402
|
// Serialize object item.
|
|
6926
|
-
|
|
6927
|
-
|
|
6928
|
-
buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
|
|
6929
|
-
}
|
|
7403
|
+
for ( var name in obj ) {
|
|
7404
|
+
buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
|
|
6930
7405
|
}
|
|
6931
7406
|
|
|
6932
7407
|
} else {
|
|
@@ -7121,13 +7596,12 @@ jQuery.ajaxSetup({
|
|
|
7121
7596
|
// Detect, normalize options and install callbacks for jsonp requests
|
|
7122
7597
|
jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
|
|
7123
7598
|
|
|
7124
|
-
var
|
|
7599
|
+
var inspectData = s.contentType === "application/x-www-form-urlencoded" &&
|
|
7600
|
+
( typeof s.data === "string" );
|
|
7125
7601
|
|
|
7126
7602
|
if ( s.dataTypes[ 0 ] === "jsonp" ||
|
|
7127
|
-
originalSettings.jsonpCallback ||
|
|
7128
|
-
originalSettings.jsonp != null ||
|
|
7129
7603
|
s.jsonp !== false && ( jsre.test( s.url ) ||
|
|
7130
|
-
|
|
7604
|
+
inspectData && jsre.test( s.data ) ) ) {
|
|
7131
7605
|
|
|
7132
7606
|
var responseContainer,
|
|
7133
7607
|
jsonpCallback = s.jsonpCallback =
|
|
@@ -7135,20 +7609,12 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
|
|
|
7135
7609
|
previous = window[ jsonpCallback ],
|
|
7136
7610
|
url = s.url,
|
|
7137
7611
|
data = s.data,
|
|
7138
|
-
replace = "$1" + jsonpCallback + "$2"
|
|
7139
|
-
cleanUp = function() {
|
|
7140
|
-
// Set callback back to previous value
|
|
7141
|
-
window[ jsonpCallback ] = previous;
|
|
7142
|
-
// Call if it was a function and we have a response
|
|
7143
|
-
if ( responseContainer && jQuery.isFunction( previous ) ) {
|
|
7144
|
-
window[ jsonpCallback ]( responseContainer[ 0 ] );
|
|
7145
|
-
}
|
|
7146
|
-
};
|
|
7612
|
+
replace = "$1" + jsonpCallback + "$2";
|
|
7147
7613
|
|
|
7148
7614
|
if ( s.jsonp !== false ) {
|
|
7149
7615
|
url = url.replace( jsre, replace );
|
|
7150
7616
|
if ( s.url === url ) {
|
|
7151
|
-
if (
|
|
7617
|
+
if ( inspectData ) {
|
|
7152
7618
|
data = data.replace( jsre, replace );
|
|
7153
7619
|
}
|
|
7154
7620
|
if ( s.data === data ) {
|
|
@@ -7166,8 +7632,15 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
|
|
|
7166
7632
|
responseContainer = [ response ];
|
|
7167
7633
|
};
|
|
7168
7634
|
|
|
7169
|
-
//
|
|
7170
|
-
jqXHR.
|
|
7635
|
+
// Clean-up function
|
|
7636
|
+
jqXHR.always(function() {
|
|
7637
|
+
// Set callback back to previous value
|
|
7638
|
+
window[ jsonpCallback ] = previous;
|
|
7639
|
+
// Call if it was a function and we have a response
|
|
7640
|
+
if ( responseContainer && jQuery.isFunction( previous ) ) {
|
|
7641
|
+
window[ jsonpCallback ]( responseContainer[ 0 ] );
|
|
7642
|
+
}
|
|
7643
|
+
});
|
|
7171
7644
|
|
|
7172
7645
|
// Use data converter to retrieve json after script execution
|
|
7173
7646
|
s.converters["script json"] = function() {
|
|
@@ -7183,7 +7656,7 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
|
|
|
7183
7656
|
// Delegate to script
|
|
7184
7657
|
return "script";
|
|
7185
7658
|
}
|
|
7186
|
-
}
|
|
7659
|
+
});
|
|
7187
7660
|
|
|
7188
7661
|
})( jQuery );
|
|
7189
7662
|
|
|
@@ -7215,7 +7688,7 @@ jQuery.ajaxPrefilter( "script", function( s ) {
|
|
|
7215
7688
|
s.type = "GET";
|
|
7216
7689
|
s.global = false;
|
|
7217
7690
|
}
|
|
7218
|
-
}
|
|
7691
|
+
});
|
|
7219
7692
|
|
|
7220
7693
|
// Bind script tag hack transport
|
|
7221
7694
|
jQuery.ajaxTransport( "script", function(s) {
|
|
@@ -7243,7 +7716,7 @@ jQuery.ajaxTransport( "script", function(s) {
|
|
|
7243
7716
|
// Attach handlers for all browsers
|
|
7244
7717
|
script.onload = script.onreadystatechange = function( _, isAbort ) {
|
|
7245
7718
|
|
|
7246
|
-
if ( !script.readyState || /loaded|complete/.test( script.readyState ) ) {
|
|
7719
|
+
if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
|
|
7247
7720
|
|
|
7248
7721
|
// Handle memory leak in IE
|
|
7249
7722
|
script.onload = script.onreadystatechange = null;
|
|
@@ -7274,29 +7747,22 @@ jQuery.ajaxTransport( "script", function(s) {
|
|
|
7274
7747
|
}
|
|
7275
7748
|
};
|
|
7276
7749
|
}
|
|
7277
|
-
}
|
|
7750
|
+
});
|
|
7278
7751
|
|
|
7279
7752
|
})( jQuery );
|
|
7280
7753
|
|
|
7281
7754
|
|
|
7282
7755
|
(function( jQuery ) {
|
|
7283
7756
|
|
|
7284
|
-
var // #5280:
|
|
7285
|
-
|
|
7286
|
-
xhrCallbacks,
|
|
7287
|
-
|
|
7288
|
-
// XHR used to determine supports properties
|
|
7289
|
-
testXHR;
|
|
7290
|
-
|
|
7291
|
-
// #5280: Internet Explorer will keep connections alive if we don't abort on unload
|
|
7292
|
-
function xhrOnUnloadAbort() {
|
|
7293
|
-
jQuery( window ).unload(function() {
|
|
7757
|
+
var // #5280: Internet Explorer will keep connections alive if we don't abort on unload
|
|
7758
|
+
xhrOnUnloadAbort = window.ActiveXObject ? function() {
|
|
7294
7759
|
// Abort all pending requests
|
|
7295
7760
|
for ( var key in xhrCallbacks ) {
|
|
7296
7761
|
xhrCallbacks[ key ]( 0, 1 );
|
|
7297
7762
|
}
|
|
7298
|
-
}
|
|
7299
|
-
|
|
7763
|
+
} : false,
|
|
7764
|
+
xhrId = 0,
|
|
7765
|
+
xhrCallbacks;
|
|
7300
7766
|
|
|
7301
7767
|
// Functions to create xhrs
|
|
7302
7768
|
function createStandardXHR() {
|
|
@@ -7326,15 +7792,13 @@ jQuery.ajaxSettings.xhr = window.ActiveXObject ?
|
|
|
7326
7792
|
// For all other browsers, use the standard XMLHttpRequest object
|
|
7327
7793
|
createStandardXHR;
|
|
7328
7794
|
|
|
7329
|
-
//
|
|
7330
|
-
|
|
7331
|
-
jQuery.support
|
|
7332
|
-
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
// No need for the temporary xhr anymore
|
|
7337
|
-
testXHR = undefined;
|
|
7795
|
+
// Determine support properties
|
|
7796
|
+
(function( xhr ) {
|
|
7797
|
+
jQuery.extend( jQuery.support, {
|
|
7798
|
+
ajax: !!xhr,
|
|
7799
|
+
cors: !!xhr && ( "withCredentials" in xhr )
|
|
7800
|
+
});
|
|
7801
|
+
})( jQuery.ajaxSettings.xhr() );
|
|
7338
7802
|
|
|
7339
7803
|
// Create transport if the browser can provide an xhr
|
|
7340
7804
|
if ( jQuery.support.ajax ) {
|
|
@@ -7417,7 +7881,9 @@ if ( jQuery.support.ajax ) {
|
|
|
7417
7881
|
// Do not keep as active anymore
|
|
7418
7882
|
if ( handle ) {
|
|
7419
7883
|
xhr.onreadystatechange = jQuery.noop;
|
|
7420
|
-
|
|
7884
|
+
if ( xhrOnUnloadAbort ) {
|
|
7885
|
+
delete xhrCallbacks[ handle ];
|
|
7886
|
+
}
|
|
7421
7887
|
}
|
|
7422
7888
|
|
|
7423
7889
|
// If it's an abort
|
|
@@ -7478,15 +7944,18 @@ if ( jQuery.support.ajax ) {
|
|
|
7478
7944
|
if ( !s.async || xhr.readyState === 4 ) {
|
|
7479
7945
|
callback();
|
|
7480
7946
|
} else {
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
|
|
7947
|
+
handle = ++xhrId;
|
|
7948
|
+
if ( xhrOnUnloadAbort ) {
|
|
7949
|
+
// Create the active xhrs callbacks list if needed
|
|
7950
|
+
// and attach the unload handler
|
|
7951
|
+
if ( !xhrCallbacks ) {
|
|
7952
|
+
xhrCallbacks = {};
|
|
7953
|
+
jQuery( window ).unload( xhrOnUnloadAbort );
|
|
7954
|
+
}
|
|
7955
|
+
// Add to list of active xhrs callbacks
|
|
7956
|
+
xhrCallbacks[ handle ] = callback;
|
|
7486
7957
|
}
|
|
7487
|
-
|
|
7488
|
-
handle = xhrId++;
|
|
7489
|
-
xhr.onreadystatechange = xhrCallbacks[ handle ] = callback;
|
|
7958
|
+
xhr.onreadystatechange = callback;
|
|
7490
7959
|
}
|
|
7491
7960
|
},
|
|
7492
7961
|
|
|
@@ -7506,6 +7975,7 @@ if ( jQuery.support.ajax ) {
|
|
|
7506
7975
|
(function( jQuery ) {
|
|
7507
7976
|
|
|
7508
7977
|
var elemdisplay = {},
|
|
7978
|
+
iframe, iframeDoc,
|
|
7509
7979
|
rfxtypes = /^(?:toggle|show|hide)$/,
|
|
7510
7980
|
rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
|
|
7511
7981
|
timerId,
|
|
@@ -7516,7 +7986,11 @@ var elemdisplay = {},
|
|
|
7516
7986
|
[ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
|
|
7517
7987
|
// opacity animations
|
|
7518
7988
|
[ "opacity" ]
|
|
7519
|
-
]
|
|
7989
|
+
],
|
|
7990
|
+
fxNow,
|
|
7991
|
+
requestAnimationFrame = window.webkitRequestAnimationFrame ||
|
|
7992
|
+
window.mozRequestAnimationFrame ||
|
|
7993
|
+
window.oRequestAnimationFrame;
|
|
7520
7994
|
|
|
7521
7995
|
jQuery.fn.extend({
|
|
7522
7996
|
show: function( speed, easing, callback ) {
|
|
@@ -7528,19 +8002,22 @@ jQuery.fn.extend({
|
|
|
7528
8002
|
} else {
|
|
7529
8003
|
for ( var i = 0, j = this.length; i < j; i++ ) {
|
|
7530
8004
|
elem = this[i];
|
|
7531
|
-
display = elem.style.display;
|
|
7532
8005
|
|
|
7533
|
-
|
|
7534
|
-
|
|
7535
|
-
|
|
7536
|
-
|
|
7537
|
-
|
|
8006
|
+
if ( elem.style ) {
|
|
8007
|
+
display = elem.style.display;
|
|
8008
|
+
|
|
8009
|
+
// Reset the inline display of this element to learn if it is
|
|
8010
|
+
// being hidden by cascaded rules or not
|
|
8011
|
+
if ( !jQuery._data(elem, "olddisplay") && display === "none" ) {
|
|
8012
|
+
display = elem.style.display = "";
|
|
8013
|
+
}
|
|
7538
8014
|
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
8015
|
+
// Set elements which have been overridden with display: none
|
|
8016
|
+
// in a stylesheet to whatever the default browser style is
|
|
8017
|
+
// for such an element
|
|
8018
|
+
if ( display === "" && jQuery.css( elem, "display" ) === "none" ) {
|
|
8019
|
+
jQuery._data(elem, "olddisplay", defaultDisplay(elem.nodeName));
|
|
8020
|
+
}
|
|
7544
8021
|
}
|
|
7545
8022
|
}
|
|
7546
8023
|
|
|
@@ -7548,10 +8025,13 @@ jQuery.fn.extend({
|
|
|
7548
8025
|
// to avoid the constant reflow
|
|
7549
8026
|
for ( i = 0; i < j; i++ ) {
|
|
7550
8027
|
elem = this[i];
|
|
7551
|
-
display = elem.style.display;
|
|
7552
8028
|
|
|
7553
|
-
if (
|
|
7554
|
-
elem.style.display
|
|
8029
|
+
if ( elem.style ) {
|
|
8030
|
+
display = elem.style.display;
|
|
8031
|
+
|
|
8032
|
+
if ( display === "" || display === "none" ) {
|
|
8033
|
+
elem.style.display = jQuery._data(elem, "olddisplay") || "";
|
|
8034
|
+
}
|
|
7555
8035
|
}
|
|
7556
8036
|
}
|
|
7557
8037
|
|
|
@@ -7565,17 +8045,21 @@ jQuery.fn.extend({
|
|
|
7565
8045
|
|
|
7566
8046
|
} else {
|
|
7567
8047
|
for ( var i = 0, j = this.length; i < j; i++ ) {
|
|
7568
|
-
|
|
8048
|
+
if ( this[i].style ) {
|
|
8049
|
+
var display = jQuery.css( this[i], "display" );
|
|
7569
8050
|
|
|
7570
|
-
|
|
7571
|
-
|
|
8051
|
+
if ( display !== "none" && !jQuery._data( this[i], "olddisplay" ) ) {
|
|
8052
|
+
jQuery._data( this[i], "olddisplay", display );
|
|
8053
|
+
}
|
|
7572
8054
|
}
|
|
7573
8055
|
}
|
|
7574
8056
|
|
|
7575
8057
|
// Set the display of the elements in a second loop
|
|
7576
8058
|
// to avoid the constant reflow
|
|
7577
8059
|
for ( i = 0; i < j; i++ ) {
|
|
7578
|
-
this[i].style
|
|
8060
|
+
if ( this[i].style ) {
|
|
8061
|
+
this[i].style.display = "none";
|
|
8062
|
+
}
|
|
7579
8063
|
}
|
|
7580
8064
|
|
|
7581
8065
|
return this;
|
|
@@ -7613,32 +8097,54 @@ jQuery.fn.extend({
|
|
|
7613
8097
|
var optall = jQuery.speed(speed, easing, callback);
|
|
7614
8098
|
|
|
7615
8099
|
if ( jQuery.isEmptyObject( prop ) ) {
|
|
7616
|
-
return this.each( optall.complete );
|
|
8100
|
+
return this.each( optall.complete, [ false ] );
|
|
7617
8101
|
}
|
|
7618
8102
|
|
|
8103
|
+
// Do not change referenced properties as per-property easing will be lost
|
|
8104
|
+
prop = jQuery.extend( {}, prop );
|
|
8105
|
+
|
|
7619
8106
|
return this[ optall.queue === false ? "each" : "queue" ](function() {
|
|
7620
8107
|
// XXX 'this' does not always have a nodeName when running the
|
|
7621
8108
|
// test suite
|
|
7622
8109
|
|
|
7623
|
-
|
|
8110
|
+
if ( optall.queue === false ) {
|
|
8111
|
+
jQuery._mark( this );
|
|
8112
|
+
}
|
|
8113
|
+
|
|
8114
|
+
var opt = jQuery.extend( {}, optall ),
|
|
7624
8115
|
isElement = this.nodeType === 1,
|
|
7625
8116
|
hidden = isElement && jQuery(this).is(":hidden"),
|
|
7626
|
-
|
|
8117
|
+
name, val, p,
|
|
8118
|
+
display, e,
|
|
8119
|
+
parts, start, end, unit;
|
|
8120
|
+
|
|
8121
|
+
// will store per property easing and be used to determine when an animation is complete
|
|
8122
|
+
opt.animatedProperties = {};
|
|
7627
8123
|
|
|
7628
8124
|
for ( p in prop ) {
|
|
7629
|
-
var name = jQuery.camelCase( p );
|
|
7630
8125
|
|
|
8126
|
+
// property name normalization
|
|
8127
|
+
name = jQuery.camelCase( p );
|
|
7631
8128
|
if ( p !== name ) {
|
|
7632
8129
|
prop[ name ] = prop[ p ];
|
|
7633
8130
|
delete prop[ p ];
|
|
7634
|
-
p = name;
|
|
7635
8131
|
}
|
|
7636
8132
|
|
|
7637
|
-
|
|
7638
|
-
|
|
8133
|
+
val = prop[ name ];
|
|
8134
|
+
|
|
8135
|
+
// easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
|
|
8136
|
+
if ( jQuery.isArray( val ) ) {
|
|
8137
|
+
opt.animatedProperties[ name ] = val[ 1 ];
|
|
8138
|
+
val = prop[ name ] = val[ 0 ];
|
|
8139
|
+
} else {
|
|
8140
|
+
opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing';
|
|
8141
|
+
}
|
|
8142
|
+
|
|
8143
|
+
if ( val === "hide" && hidden || val === "show" && !hidden ) {
|
|
8144
|
+
return opt.complete.call( this );
|
|
7639
8145
|
}
|
|
7640
8146
|
|
|
7641
|
-
if ( isElement && (
|
|
8147
|
+
if ( isElement && ( name === "height" || name === "width" ) ) {
|
|
7642
8148
|
// Make sure that nothing sneaks out
|
|
7643
8149
|
// Record all 3 overflow attributes because IE does not
|
|
7644
8150
|
// change the overflow attribute when overflowX and
|
|
@@ -7654,7 +8160,7 @@ jQuery.fn.extend({
|
|
|
7654
8160
|
this.style.display = "inline-block";
|
|
7655
8161
|
|
|
7656
8162
|
} else {
|
|
7657
|
-
|
|
8163
|
+
display = defaultDisplay( this.nodeName );
|
|
7658
8164
|
|
|
7659
8165
|
// inline-level elements accept inline-block;
|
|
7660
8166
|
// block-level elements need to be inline with layout
|
|
@@ -7668,44 +8174,37 @@ jQuery.fn.extend({
|
|
|
7668
8174
|
}
|
|
7669
8175
|
}
|
|
7670
8176
|
}
|
|
7671
|
-
|
|
7672
|
-
if ( jQuery.isArray( prop[p] ) ) {
|
|
7673
|
-
// Create (if needed) and add to specialEasing
|
|
7674
|
-
(opt.specialEasing = opt.specialEasing || {})[p] = prop[p][1];
|
|
7675
|
-
prop[p] = prop[p][0];
|
|
7676
|
-
}
|
|
7677
8177
|
}
|
|
7678
8178
|
|
|
7679
8179
|
if ( opt.overflow != null ) {
|
|
7680
8180
|
this.style.overflow = "hidden";
|
|
7681
8181
|
}
|
|
7682
8182
|
|
|
7683
|
-
|
|
7684
|
-
|
|
7685
|
-
|
|
7686
|
-
var e = new jQuery.fx( self, opt, name );
|
|
8183
|
+
for ( p in prop ) {
|
|
8184
|
+
e = new jQuery.fx( this, opt, p );
|
|
8185
|
+
val = prop[ p ];
|
|
7687
8186
|
|
|
7688
8187
|
if ( rfxtypes.test(val) ) {
|
|
7689
|
-
e[ val === "toggle" ? hidden ? "show" : "hide" : val ](
|
|
8188
|
+
e[ val === "toggle" ? hidden ? "show" : "hide" : val ]();
|
|
7690
8189
|
|
|
7691
8190
|
} else {
|
|
7692
|
-
|
|
7693
|
-
|
|
8191
|
+
parts = rfxnum.exec( val );
|
|
8192
|
+
start = e.cur();
|
|
7694
8193
|
|
|
7695
8194
|
if ( parts ) {
|
|
7696
|
-
|
|
7697
|
-
|
|
8195
|
+
end = parseFloat( parts[2] );
|
|
8196
|
+
unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" );
|
|
7698
8197
|
|
|
7699
8198
|
// We need to compute starting value
|
|
7700
8199
|
if ( unit !== "px" ) {
|
|
7701
|
-
jQuery.style(
|
|
8200
|
+
jQuery.style( this, p, (end || 1) + unit);
|
|
7702
8201
|
start = ((end || 1) / e.cur()) * start;
|
|
7703
|
-
jQuery.style(
|
|
8202
|
+
jQuery.style( this, p, start + unit);
|
|
7704
8203
|
}
|
|
7705
8204
|
|
|
7706
8205
|
// If a +=/-= token was provided, we're doing a relative animation
|
|
7707
8206
|
if ( parts[1] ) {
|
|
7708
|
-
end = ((parts[1] === "-=" ? -1 : 1) * end) + start;
|
|
8207
|
+
end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start;
|
|
7709
8208
|
}
|
|
7710
8209
|
|
|
7711
8210
|
e.custom( start, end, unit );
|
|
@@ -7714,7 +8213,7 @@ jQuery.fn.extend({
|
|
|
7714
8213
|
e.custom( start, val, "" );
|
|
7715
8214
|
}
|
|
7716
8215
|
}
|
|
7717
|
-
}
|
|
8216
|
+
}
|
|
7718
8217
|
|
|
7719
8218
|
// For JS strict compliance
|
|
7720
8219
|
return true;
|
|
@@ -7722,15 +8221,18 @@ jQuery.fn.extend({
|
|
|
7722
8221
|
},
|
|
7723
8222
|
|
|
7724
8223
|
stop: function( clearQueue, gotoEnd ) {
|
|
7725
|
-
var timers = jQuery.timers;
|
|
7726
|
-
|
|
7727
8224
|
if ( clearQueue ) {
|
|
7728
8225
|
this.queue([]);
|
|
7729
8226
|
}
|
|
7730
8227
|
|
|
7731
8228
|
this.each(function() {
|
|
7732
|
-
|
|
7733
|
-
|
|
8229
|
+
var timers = jQuery.timers,
|
|
8230
|
+
i = timers.length;
|
|
8231
|
+
// clear marker counters if we know they won't be
|
|
8232
|
+
if ( !gotoEnd ) {
|
|
8233
|
+
jQuery._unmark( true, this );
|
|
8234
|
+
}
|
|
8235
|
+
while ( i-- ) {
|
|
7734
8236
|
if ( timers[i].elem === this ) {
|
|
7735
8237
|
if (gotoEnd) {
|
|
7736
8238
|
// force the next step to be the last
|
|
@@ -7752,6 +8254,17 @@ jQuery.fn.extend({
|
|
|
7752
8254
|
|
|
7753
8255
|
});
|
|
7754
8256
|
|
|
8257
|
+
// Animations created synchronously will run synchronously
|
|
8258
|
+
function createFxNow() {
|
|
8259
|
+
setTimeout( clearFxNow, 0 );
|
|
8260
|
+
return ( fxNow = jQuery.now() );
|
|
8261
|
+
}
|
|
8262
|
+
|
|
8263
|
+
function clearFxNow() {
|
|
8264
|
+
fxNow = undefined;
|
|
8265
|
+
}
|
|
8266
|
+
|
|
8267
|
+
// Generate parameters to create a standard animation
|
|
7755
8268
|
function genFx( type, num ) {
|
|
7756
8269
|
var obj = {};
|
|
7757
8270
|
|
|
@@ -7790,10 +8303,13 @@ jQuery.extend({
|
|
|
7790
8303
|
|
|
7791
8304
|
// Queueing
|
|
7792
8305
|
opt.old = opt.complete;
|
|
7793
|
-
opt.complete = function() {
|
|
8306
|
+
opt.complete = function( noUnmark ) {
|
|
7794
8307
|
if ( opt.queue !== false ) {
|
|
7795
|
-
jQuery
|
|
8308
|
+
jQuery.dequeue( this );
|
|
8309
|
+
} else if ( noUnmark !== false ) {
|
|
8310
|
+
jQuery._unmark( this );
|
|
7796
8311
|
}
|
|
8312
|
+
|
|
7797
8313
|
if ( jQuery.isFunction( opt.old ) ) {
|
|
7798
8314
|
opt.old.call( this );
|
|
7799
8315
|
}
|
|
@@ -7818,9 +8334,7 @@ jQuery.extend({
|
|
|
7818
8334
|
this.elem = elem;
|
|
7819
8335
|
this.prop = prop;
|
|
7820
8336
|
|
|
7821
|
-
|
|
7822
|
-
options.orig = {};
|
|
7823
|
-
}
|
|
8337
|
+
options.orig = options.orig || {};
|
|
7824
8338
|
}
|
|
7825
8339
|
|
|
7826
8340
|
});
|
|
@@ -7852,9 +8366,10 @@ jQuery.fx.prototype = {
|
|
|
7852
8366
|
// Start an animation from one number to another
|
|
7853
8367
|
custom: function( from, to, unit ) {
|
|
7854
8368
|
var self = this,
|
|
7855
|
-
fx = jQuery.fx
|
|
8369
|
+
fx = jQuery.fx,
|
|
8370
|
+
raf;
|
|
7856
8371
|
|
|
7857
|
-
this.startTime =
|
|
8372
|
+
this.startTime = fxNow || createFxNow();
|
|
7858
8373
|
this.start = from;
|
|
7859
8374
|
this.end = to;
|
|
7860
8375
|
this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" );
|
|
@@ -7868,7 +8383,20 @@ jQuery.fx.prototype = {
|
|
|
7868
8383
|
t.elem = this.elem;
|
|
7869
8384
|
|
|
7870
8385
|
if ( t() && jQuery.timers.push(t) && !timerId ) {
|
|
7871
|
-
|
|
8386
|
+
// Use requestAnimationFrame instead of setInterval if available
|
|
8387
|
+
if ( requestAnimationFrame ) {
|
|
8388
|
+
timerId = 1;
|
|
8389
|
+
raf = function() {
|
|
8390
|
+
// When timerId gets set to null at any point, this stops
|
|
8391
|
+
if ( timerId ) {
|
|
8392
|
+
requestAnimationFrame( raf );
|
|
8393
|
+
fx.tick();
|
|
8394
|
+
}
|
|
8395
|
+
};
|
|
8396
|
+
requestAnimationFrame( raf );
|
|
8397
|
+
} else {
|
|
8398
|
+
timerId = setInterval( fx.tick, fx.interval );
|
|
8399
|
+
}
|
|
7872
8400
|
}
|
|
7873
8401
|
},
|
|
7874
8402
|
|
|
@@ -7899,60 +8427,64 @@ jQuery.fx.prototype = {
|
|
|
7899
8427
|
|
|
7900
8428
|
// Each step of an animation
|
|
7901
8429
|
step: function( gotoEnd ) {
|
|
7902
|
-
var t =
|
|
8430
|
+
var t = fxNow || createFxNow(),
|
|
8431
|
+
done = true,
|
|
8432
|
+
elem = this.elem,
|
|
8433
|
+
options = this.options,
|
|
8434
|
+
i, n;
|
|
7903
8435
|
|
|
7904
|
-
if ( gotoEnd || t >=
|
|
8436
|
+
if ( gotoEnd || t >= options.duration + this.startTime ) {
|
|
7905
8437
|
this.now = this.end;
|
|
7906
8438
|
this.pos = this.state = 1;
|
|
7907
8439
|
this.update();
|
|
7908
8440
|
|
|
7909
|
-
|
|
8441
|
+
options.animatedProperties[ this.prop ] = true;
|
|
7910
8442
|
|
|
7911
|
-
for (
|
|
7912
|
-
if (
|
|
8443
|
+
for ( i in options.animatedProperties ) {
|
|
8444
|
+
if ( options.animatedProperties[i] !== true ) {
|
|
7913
8445
|
done = false;
|
|
7914
8446
|
}
|
|
7915
8447
|
}
|
|
7916
8448
|
|
|
7917
8449
|
if ( done ) {
|
|
7918
8450
|
// Reset the overflow
|
|
7919
|
-
if (
|
|
7920
|
-
var elem = this.elem,
|
|
7921
|
-
options = this.options;
|
|
8451
|
+
if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
|
|
7922
8452
|
|
|
7923
8453
|
jQuery.each( [ "", "X", "Y" ], function (index, value) {
|
|
7924
8454
|
elem.style[ "overflow" + value ] = options.overflow[index];
|
|
7925
|
-
}
|
|
8455
|
+
});
|
|
7926
8456
|
}
|
|
7927
8457
|
|
|
7928
8458
|
// Hide the element if the "hide" operation was done
|
|
7929
|
-
if (
|
|
7930
|
-
jQuery(
|
|
8459
|
+
if ( options.hide ) {
|
|
8460
|
+
jQuery(elem).hide();
|
|
7931
8461
|
}
|
|
7932
8462
|
|
|
7933
8463
|
// Reset the properties, if the item has been hidden or shown
|
|
7934
|
-
if (
|
|
7935
|
-
for ( var p in
|
|
7936
|
-
jQuery.style(
|
|
8464
|
+
if ( options.hide || options.show ) {
|
|
8465
|
+
for ( var p in options.animatedProperties ) {
|
|
8466
|
+
jQuery.style( elem, p, options.orig[p] );
|
|
7937
8467
|
}
|
|
7938
8468
|
}
|
|
7939
8469
|
|
|
7940
8470
|
// Execute the complete function
|
|
7941
|
-
|
|
8471
|
+
options.complete.call( elem );
|
|
7942
8472
|
}
|
|
7943
8473
|
|
|
7944
8474
|
return false;
|
|
7945
8475
|
|
|
7946
8476
|
} else {
|
|
7947
|
-
|
|
7948
|
-
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
this.pos = jQuery.easing[specialEasing || defaultEasing](this.state, n, 0, 1, this.options.duration);
|
|
7954
|
-
this.now = this.start + ((this.end - this.start) * this.pos);
|
|
8477
|
+
// classical easing cannot be used with an Infinity duration
|
|
8478
|
+
if ( options.duration == Infinity ) {
|
|
8479
|
+
this.now = t;
|
|
8480
|
+
} else {
|
|
8481
|
+
n = t - this.startTime;
|
|
8482
|
+
this.state = n / options.duration;
|
|
7955
8483
|
|
|
8484
|
+
// Perform the easing function, defaults to swing
|
|
8485
|
+
this.pos = jQuery.easing[ options.animatedProperties[ this.prop ] ]( this.state, n, 0, 1, options.duration );
|
|
8486
|
+
this.now = this.start + ((this.end - this.start) * this.pos);
|
|
8487
|
+
}
|
|
7956
8488
|
// Perform the next step of the animation
|
|
7957
8489
|
this.update();
|
|
7958
8490
|
}
|
|
@@ -7963,9 +8495,7 @@ jQuery.fx.prototype = {
|
|
|
7963
8495
|
|
|
7964
8496
|
jQuery.extend( jQuery.fx, {
|
|
7965
8497
|
tick: function() {
|
|
7966
|
-
var timers = jQuery.timers;
|
|
7967
|
-
|
|
7968
|
-
for ( var i = 0; i < timers.length; i++ ) {
|
|
8498
|
+
for ( var timers = jQuery.timers, i = 0 ; i < timers.length ; ++i ) {
|
|
7969
8499
|
if ( !timers[i]() ) {
|
|
7970
8500
|
timers.splice(i--, 1);
|
|
7971
8501
|
}
|
|
@@ -8013,17 +8543,45 @@ if ( jQuery.expr && jQuery.expr.filters ) {
|
|
|
8013
8543
|
};
|
|
8014
8544
|
}
|
|
8015
8545
|
|
|
8546
|
+
// Try to restore the default display value of an element
|
|
8016
8547
|
function defaultDisplay( nodeName ) {
|
|
8548
|
+
|
|
8017
8549
|
if ( !elemdisplay[ nodeName ] ) {
|
|
8018
|
-
|
|
8019
|
-
|
|
8550
|
+
|
|
8551
|
+
var elem = jQuery( "<" + nodeName + ">" ).appendTo( "body" ),
|
|
8552
|
+
display = elem.css( "display" );
|
|
8020
8553
|
|
|
8021
8554
|
elem.remove();
|
|
8022
8555
|
|
|
8556
|
+
// If the simple way fails,
|
|
8557
|
+
// get element's real default display by attaching it to a temp iframe
|
|
8023
8558
|
if ( display === "none" || display === "" ) {
|
|
8024
|
-
|
|
8559
|
+
// No iframe to use yet, so create it
|
|
8560
|
+
if ( !iframe ) {
|
|
8561
|
+
iframe = document.createElement( "iframe" );
|
|
8562
|
+
iframe.frameBorder = iframe.width = iframe.height = 0;
|
|
8563
|
+
}
|
|
8564
|
+
|
|
8565
|
+
document.body.appendChild( iframe );
|
|
8566
|
+
|
|
8567
|
+
// Create a cacheable copy of the iframe document on first call.
|
|
8568
|
+
// IE and Opera will allow us to reuse the iframeDoc without re-writing the fake html
|
|
8569
|
+
// document to it, Webkit & Firefox won't allow reusing the iframe document
|
|
8570
|
+
if ( !iframeDoc || !iframe.createElement ) {
|
|
8571
|
+
iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
|
|
8572
|
+
iframeDoc.write( "<!doctype><html><body></body></html>" );
|
|
8573
|
+
}
|
|
8574
|
+
|
|
8575
|
+
elem = iframeDoc.createElement( nodeName );
|
|
8576
|
+
|
|
8577
|
+
iframeDoc.body.appendChild( elem );
|
|
8578
|
+
|
|
8579
|
+
display = jQuery.css( elem, "display" );
|
|
8580
|
+
|
|
8581
|
+
document.body.removeChild( iframe );
|
|
8025
8582
|
}
|
|
8026
8583
|
|
|
8584
|
+
// Store the correct default display
|
|
8027
8585
|
elemdisplay[ nodeName ] = display;
|
|
8028
8586
|
}
|
|
8029
8587
|
|
|
@@ -8215,17 +8773,19 @@ jQuery.offset = {
|
|
|
8215
8773
|
curOffset = curElem.offset(),
|
|
8216
8774
|
curCSSTop = jQuery.css( elem, "top" ),
|
|
8217
8775
|
curCSSLeft = jQuery.css( elem, "left" ),
|
|
8218
|
-
calculatePosition = (position === "absolute" || position === "fixed") && jQuery.inArray(
|
|
8776
|
+
calculatePosition = (position === "absolute" || position === "fixed") && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
|
|
8219
8777
|
props = {}, curPosition = {}, curTop, curLeft;
|
|
8220
8778
|
|
|
8221
8779
|
// need to be able to calculate position if either top or left is auto and position is either absolute or fixed
|
|
8222
8780
|
if ( calculatePosition ) {
|
|
8223
8781
|
curPosition = curElem.position();
|
|
8782
|
+
curTop = curPosition.top;
|
|
8783
|
+
curLeft = curPosition.left;
|
|
8784
|
+
} else {
|
|
8785
|
+
curTop = parseFloat( curCSSTop ) || 0;
|
|
8786
|
+
curLeft = parseFloat( curCSSLeft ) || 0;
|
|
8224
8787
|
}
|
|
8225
8788
|
|
|
8226
|
-
curTop = calculatePosition ? curPosition.top : parseInt( curCSSTop, 10 ) || 0;
|
|
8227
|
-
curLeft = calculatePosition ? curPosition.left : parseInt( curCSSLeft, 10 ) || 0;
|
|
8228
|
-
|
|
8229
8789
|
if ( jQuery.isFunction( options ) ) {
|
|
8230
8790
|
options = options.call( elem, i, curOffset );
|
|
8231
8791
|
}
|
|
@@ -8294,29 +8854,16 @@ jQuery.fn.extend({
|
|
|
8294
8854
|
jQuery.each( ["Left", "Top"], function( i, name ) {
|
|
8295
8855
|
var method = "scroll" + name;
|
|
8296
8856
|
|
|
8297
|
-
jQuery.fn[ method ] = function(val) {
|
|
8298
|
-
var elem
|
|
8299
|
-
|
|
8300
|
-
if ( !elem ) {
|
|
8301
|
-
return null;
|
|
8302
|
-
}
|
|
8857
|
+
jQuery.fn[ method ] = function( val ) {
|
|
8858
|
+
var elem, win;
|
|
8303
8859
|
|
|
8304
|
-
if ( val
|
|
8305
|
-
|
|
8306
|
-
return this.each(function() {
|
|
8307
|
-
win = getWindow( this );
|
|
8860
|
+
if ( val === undefined ) {
|
|
8861
|
+
elem = this[ 0 ];
|
|
8308
8862
|
|
|
8309
|
-
|
|
8310
|
-
|
|
8311
|
-
|
|
8312
|
-
i ? val : jQuery(win).scrollTop()
|
|
8313
|
-
);
|
|
8863
|
+
if ( !elem ) {
|
|
8864
|
+
return null;
|
|
8865
|
+
}
|
|
8314
8866
|
|
|
8315
|
-
} else {
|
|
8316
|
-
this[ method ] = val;
|
|
8317
|
-
}
|
|
8318
|
-
});
|
|
8319
|
-
} else {
|
|
8320
8867
|
win = getWindow( elem );
|
|
8321
8868
|
|
|
8322
8869
|
// Return the scroll offset
|
|
@@ -8325,6 +8872,21 @@ jQuery.each( ["Left", "Top"], function( i, name ) {
|
|
|
8325
8872
|
win.document.body[ method ] :
|
|
8326
8873
|
elem[ method ];
|
|
8327
8874
|
}
|
|
8875
|
+
|
|
8876
|
+
// Set the scroll offset
|
|
8877
|
+
return this.each(function() {
|
|
8878
|
+
win = getWindow( this );
|
|
8879
|
+
|
|
8880
|
+
if ( win ) {
|
|
8881
|
+
win.scrollTo(
|
|
8882
|
+
!i ? val : jQuery( win ).scrollLeft(),
|
|
8883
|
+
i ? val : jQuery( win ).scrollTop()
|
|
8884
|
+
);
|
|
8885
|
+
|
|
8886
|
+
} else {
|
|
8887
|
+
this[ method ] = val;
|
|
8888
|
+
}
|
|
8889
|
+
});
|
|
8328
8890
|
};
|
|
8329
8891
|
});
|
|
8330
8892
|
|