compass-jquery-plugin 0.3.2.8 → 0.3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -26,12 +26,14 @@ ActionView::Helpers::AssetTagHelper.register_javascript_expansion :contextMenu =
|
|
26
26
|
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :cookie => ['jquery.cookie.min']
|
27
27
|
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :doTimeout => ['jquery.dotimeout.min']
|
28
28
|
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :dst => ['jquery.dst.min']
|
29
|
+
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :easing => ['jquery.easing.min']
|
29
30
|
ActionView::Helpers::AssetTagHelper.register_stylesheet_expansion :farbtastic => ['compiled/jquery/ui/farbtastic.css']
|
30
31
|
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :farbtastic => ['jquery.farbtastic.min']
|
31
32
|
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :form => ['jquery.form.min']
|
32
33
|
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :history => ['history.adapter.jquery.min', 'history.min', 'history.html4.min']
|
33
34
|
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :hotkeys => ['jquery.hotkeys.min']
|
34
35
|
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :layout => ['jquery.layout.min']
|
36
|
+
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :mediahelpers => ['jquery.mediahelpers.min']
|
35
37
|
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :mousewheel => ['jquery.mousewheel.min']
|
36
38
|
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :offline => ['json.min', 'jquery.offline.min']
|
37
39
|
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :pngFix => ['jquery.pngFix.min']
|
@@ -7,46 +7,52 @@
|
|
7
7
|
|
8
8
|
// Closure
|
9
9
|
(function(window, undefined) {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
// Localise Globals
|
11
|
+
var
|
12
|
+
History = window.History = window.History || {},
|
13
|
+
jQuery = window.jQuery;
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
// Add the Adapter
|
21
|
-
History.Adapter = {
|
22
|
-
// History.Adapter.bind(el,event,callback)
|
23
|
-
// @param {Element|Selector} el
|
24
|
-
// @param {String} event - custom and standard events
|
25
|
-
// @param {Function} callback
|
26
|
-
// @return
|
27
|
-
bind: function(el, event, callback) {
|
28
|
-
jQuery(el).bind(event, callback);
|
29
|
-
},
|
15
|
+
// Check Existence
|
16
|
+
if (typeof History.Adapter !== 'undefined') {
|
17
|
+
throw new Error('History.js Adapter has already been loaded...');
|
18
|
+
}
|
30
19
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
20
|
+
// Add the Adapter
|
21
|
+
History.Adapter = {
|
22
|
+
/**
|
23
|
+
* History.Adapter.bind(el,event,callback)
|
24
|
+
* @param {Element|Selector} el
|
25
|
+
* @param {String} event - custom and standard events
|
26
|
+
* @param {Function} callback
|
27
|
+
* @return
|
28
|
+
*/
|
29
|
+
bind: function(el, event, callback) {
|
30
|
+
jQuery(el).bind(event, callback);
|
31
|
+
},
|
38
32
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
33
|
+
/**
|
34
|
+
* History.Adapter.trigger(el,event)
|
35
|
+
* @param {Element|Selector} el
|
36
|
+
* @param {String} event - custom and standard events
|
37
|
+
* @return
|
38
|
+
*/
|
39
|
+
trigger: function(el, event) {
|
40
|
+
jQuery(el).trigger(event);
|
41
|
+
},
|
46
42
|
|
47
|
-
|
48
|
-
|
49
|
-
|
43
|
+
/**
|
44
|
+
* History.Adapter.trigger(el,event,data)
|
45
|
+
* @param {Function} callback
|
46
|
+
* @return
|
47
|
+
*/
|
48
|
+
onDomLoad: function(callback) {
|
49
|
+
jQuery(callback);
|
50
50
|
}
|
51
|
+
};
|
52
|
+
|
53
|
+
// Try and Initialise History
|
54
|
+
if (typeof History.init !== 'undefined') {
|
55
|
+
History.init();
|
56
|
+
}
|
51
57
|
|
52
58
|
})(window);
|
@@ -7,600 +7,600 @@
|
|
7
7
|
*/
|
8
8
|
|
9
9
|
(function(window, undefined) {
|
10
|
-
|
10
|
+
"use strict";
|
11
11
|
|
12
|
-
|
13
|
-
|
12
|
+
// --------------------------------------------------------------------------
|
13
|
+
// Initialise
|
14
|
+
|
15
|
+
// Localise Globals
|
16
|
+
var
|
17
|
+
document = window.document, // Make sure we are using the correct document
|
18
|
+
setTimeout = window.setTimeout || setTimeout,
|
19
|
+
clearTimeout = window.clearTimeout || clearTimeout,
|
20
|
+
setInterval = window.setInterval || setInterval,
|
21
|
+
History = window.History = window.History || {}; // Public History Object
|
22
|
+
|
23
|
+
// Check Existence
|
24
|
+
if (typeof History.initHtml4 !== 'undefined') {
|
25
|
+
throw new Error('History.js HTML4 Support has already been loaded...');
|
26
|
+
}
|
14
27
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
28
|
+
// --------------------------------------------------------------------------
|
29
|
+
// Initialise HTML4 Support
|
30
|
+
|
31
|
+
// Initialise HTML4 Support
|
32
|
+
History.initHtml4 = function() {
|
33
|
+
// Initialise
|
34
|
+
if (typeof History.initHtml4.initialized !== 'undefined') {
|
35
|
+
// Already Loaded
|
36
|
+
return false;
|
37
|
+
}
|
38
|
+
else {
|
39
|
+
History.initHtml4.initialized = true;
|
26
40
|
}
|
27
41
|
|
28
|
-
//
|
29
|
-
//
|
42
|
+
// ----------------------------------------------------------------------
|
43
|
+
// Properties
|
44
|
+
|
45
|
+
/**
|
46
|
+
* History.enabled
|
47
|
+
* Is History enabled?
|
48
|
+
*/
|
49
|
+
History.enabled = true;
|
50
|
+
|
51
|
+
|
52
|
+
// ----------------------------------------------------------------------
|
53
|
+
// Hash Storage
|
54
|
+
|
55
|
+
/**
|
56
|
+
* History.savedHashes
|
57
|
+
* Store the hashes in an array
|
58
|
+
*/
|
59
|
+
History.savedHashes = [];
|
60
|
+
|
61
|
+
/**
|
62
|
+
* History.isLastHash(newHash)
|
63
|
+
* Checks if the hash is the last hash
|
64
|
+
* @param {string} newHash
|
65
|
+
* @return {boolean} true
|
66
|
+
*/
|
67
|
+
History.isLastHash = function(newHash) {
|
68
|
+
// Prepare
|
69
|
+
var oldHash = History.getHashByIndex();
|
70
|
+
|
71
|
+
// Check
|
72
|
+
var isLast = newHash === oldHash;
|
73
|
+
|
74
|
+
// Return isLast
|
75
|
+
return isLast;
|
76
|
+
};
|
77
|
+
|
78
|
+
/**
|
79
|
+
* History.saveHash(newHash)
|
80
|
+
* Push a Hash
|
81
|
+
* @param {string} newHash
|
82
|
+
* @return {boolean} true
|
83
|
+
*/
|
84
|
+
History.saveHash = function(newHash) {
|
85
|
+
// Check Hash
|
86
|
+
if (History.isLastHash(newHash)) {
|
87
|
+
return false;
|
88
|
+
}
|
89
|
+
|
90
|
+
// Push the Hash
|
91
|
+
History.savedHashes.push(newHash);
|
92
|
+
|
93
|
+
// Return true
|
94
|
+
return true;
|
95
|
+
};
|
96
|
+
|
97
|
+
/**
|
98
|
+
* History.getHashByIndex()
|
99
|
+
* Gets a hash by the index
|
100
|
+
* @param {integer} index
|
101
|
+
* @return {string}
|
102
|
+
*/
|
103
|
+
History.getHashByIndex = function(index) {
|
104
|
+
// Prepare
|
105
|
+
var hash = null;
|
106
|
+
|
107
|
+
// Handle
|
108
|
+
if (typeof index === 'undefined') {
|
109
|
+
// Get the last inserted
|
110
|
+
hash = History.savedHashes[History.savedHashes.length - 1];
|
111
|
+
}
|
112
|
+
else if (index < 0) {
|
113
|
+
// Get from the end
|
114
|
+
hash = History.savedHashes[History.savedHashes.length + index];
|
115
|
+
}
|
116
|
+
else {
|
117
|
+
// Get from the beginning
|
118
|
+
hash = History.savedHashes[index];
|
119
|
+
}
|
120
|
+
|
121
|
+
// Return hash
|
122
|
+
return hash;
|
123
|
+
};
|
124
|
+
|
125
|
+
// ----------------------------------------------------------------------
|
126
|
+
// Discarded States
|
127
|
+
|
128
|
+
/**
|
129
|
+
* History.discardedHashes
|
130
|
+
* A hashed array of discarded hashes
|
131
|
+
*/
|
132
|
+
History.discardedHashes = {};
|
133
|
+
|
134
|
+
/**
|
135
|
+
* History.discardedStates
|
136
|
+
* A hashed array of discarded states
|
137
|
+
*/
|
138
|
+
History.discardedStates = {};
|
139
|
+
|
140
|
+
/**
|
141
|
+
* History.discardState(State)
|
142
|
+
* Discards the state by ignoring it through History
|
143
|
+
* @param {object} State
|
144
|
+
* @return {true}
|
145
|
+
*/
|
146
|
+
History.discardState = function(discardedState, forwardState, backState) {
|
147
|
+
//History.debug('History.discardState', arguments);
|
148
|
+
// Prepare
|
149
|
+
var discardedStateHash = History.getHashByState(discardedState);
|
150
|
+
|
151
|
+
// Create Discard Object
|
152
|
+
var discardObject = {
|
153
|
+
'discardedState': discardedState,
|
154
|
+
'backState': backState,
|
155
|
+
'forwardState': forwardState
|
156
|
+
};
|
157
|
+
|
158
|
+
// Add to DiscardedStates
|
159
|
+
History.discardedStates[discardedStateHash] = discardObject;
|
160
|
+
|
161
|
+
// Return true
|
162
|
+
return true;
|
163
|
+
};
|
164
|
+
|
165
|
+
/**
|
166
|
+
* History.discardHash(hash)
|
167
|
+
* Discards the hash by ignoring it through History
|
168
|
+
* @param {string} hash
|
169
|
+
* @return {true}
|
170
|
+
*/
|
171
|
+
History.discardHash = function(discardedHash, forwardState, backState) {
|
172
|
+
//History.debug('History.discardState', arguments);
|
173
|
+
// Create Discard Object
|
174
|
+
var discardObject = {
|
175
|
+
'discardedHash': discardedHash,
|
176
|
+
'backState': backState,
|
177
|
+
'forwardState': forwardState
|
178
|
+
};
|
179
|
+
|
180
|
+
// Add to discardedHash
|
181
|
+
History.discardedHashes[discardedHash] = discardObject;
|
182
|
+
|
183
|
+
// Return true
|
184
|
+
return true;
|
185
|
+
};
|
186
|
+
|
187
|
+
/**
|
188
|
+
* History.discardState(State)
|
189
|
+
* Checks to see if the state is discarded
|
190
|
+
* @param {object} State
|
191
|
+
* @return {bool}
|
192
|
+
*/
|
193
|
+
History.discardedState = function(State) {
|
194
|
+
// Prepare
|
195
|
+
var StateHash = History.getHashByState(State);
|
196
|
+
|
197
|
+
// Check
|
198
|
+
var discarded = History.discardedStates[StateHash] || false;
|
199
|
+
|
200
|
+
// Return true
|
201
|
+
return discarded;
|
202
|
+
};
|
203
|
+
|
204
|
+
/**
|
205
|
+
* History.discardedHash(hash)
|
206
|
+
* Checks to see if the state is discarded
|
207
|
+
* @param {string} State
|
208
|
+
* @return {bool}
|
209
|
+
*/
|
210
|
+
History.discardedHash = function(hash) {
|
211
|
+
// Check
|
212
|
+
var discarded = History.discardedHashes[hash] || false;
|
213
|
+
|
214
|
+
// Return true
|
215
|
+
return discarded;
|
216
|
+
};
|
217
|
+
|
218
|
+
/**
|
219
|
+
* History.recycleState(State)
|
220
|
+
* Allows a discarded state to be used again
|
221
|
+
* @param {object} data
|
222
|
+
* @param {string} title
|
223
|
+
* @param {string} url
|
224
|
+
* @return {true}
|
225
|
+
*/
|
226
|
+
History.recycleState = function(State) {
|
227
|
+
//History.debug('History.recycleState', arguments);
|
228
|
+
// Prepare
|
229
|
+
var StateHash = History.getHashByState(State);
|
230
|
+
|
231
|
+
// Remove from DiscardedStates
|
232
|
+
if (History.discardedState(State)) {
|
233
|
+
delete History.discardedStates[StateHash];
|
234
|
+
}
|
235
|
+
|
236
|
+
// Return true
|
237
|
+
return true;
|
238
|
+
};
|
239
|
+
|
240
|
+
// ----------------------------------------------------------------------
|
241
|
+
// HTML4 HashChange Support
|
242
|
+
|
243
|
+
if (History.emulated.hashChange) {
|
244
|
+
/*
|
245
|
+
* We must emulate the HTML4 HashChange Support by manually checking for hash changes
|
246
|
+
*/
|
247
|
+
|
248
|
+
/**
|
249
|
+
* History.hashChangeInit()
|
250
|
+
* Init the HashChange Emulation
|
251
|
+
*/
|
252
|
+
History.hashChangeInit = function() {
|
253
|
+
// Define our Checker Function
|
254
|
+
History.checkerFunction = null;
|
255
|
+
|
256
|
+
// Define some variables that will help in our checker function
|
257
|
+
var
|
258
|
+
lastDocumentHash = '';
|
259
|
+
|
260
|
+
// Handle depending on the browser
|
261
|
+
if (History.isInternetExplorer()) {
|
262
|
+
// IE6 and IE7
|
263
|
+
// We need to use an iframe to emulate the back and forward buttons
|
264
|
+
|
265
|
+
// Create iFrame
|
266
|
+
var
|
267
|
+
iframeId = 'historyjs-iframe',
|
268
|
+
iframe = document.createElement('iframe');
|
269
|
+
|
270
|
+
// Adjust iFarme
|
271
|
+
iframe.setAttribute('id', iframeId);
|
272
|
+
iframe.style.display = 'none';
|
273
|
+
|
274
|
+
// Append iFrame
|
275
|
+
document.body.appendChild(iframe);
|
276
|
+
|
277
|
+
// Create initial history entry
|
278
|
+
iframe.contentWindow.document.open();
|
279
|
+
iframe.contentWindow.document.close();
|
280
|
+
|
281
|
+
// Define some variables that will help in our checker function
|
282
|
+
var
|
283
|
+
lastIframeHash = '',
|
284
|
+
checkerRunning = false;
|
285
|
+
|
286
|
+
// Define the checker function
|
287
|
+
History.checkerFunction = function() {
|
288
|
+
// Check Running
|
289
|
+
if (checkerRunning) {
|
290
|
+
return false;
|
291
|
+
}
|
30
292
|
|
31
|
-
|
32
|
-
|
33
|
-
// Initialise
|
34
|
-
if (typeof History.initHtml4.initialized !== 'undefined') {
|
35
|
-
// Already Loaded
|
36
|
-
return false;
|
37
|
-
}
|
38
|
-
else {
|
39
|
-
History.initHtml4.initialized = true;
|
40
|
-
}
|
293
|
+
// Update Running
|
294
|
+
checkerRunning = true;
|
41
295
|
|
42
|
-
|
43
|
-
|
296
|
+
// Fetch
|
297
|
+
var
|
298
|
+
documentHash = History.getHash() || '',
|
299
|
+
iframeHash = History.unescapeHash(iframe.contentWindow.document.location.hash) || '';
|
44
300
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
History.enabled = true;
|
301
|
+
// The Document Hash has changed (application caused)
|
302
|
+
if (documentHash !== lastDocumentHash) {
|
303
|
+
// Equalise
|
304
|
+
lastDocumentHash = documentHash;
|
50
305
|
|
306
|
+
// Create a history entry in the iframe
|
307
|
+
if (iframeHash !== documentHash) {
|
308
|
+
//History.debug('hashchange.checker: iframe hash change', 'documentHash (new):', documentHash, 'iframeHash (old):', iframeHash);
|
51
309
|
|
52
|
-
|
53
|
-
|
310
|
+
// Equalise
|
311
|
+
lastIframeHash = iframeHash = documentHash;
|
54
312
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
*/
|
59
|
-
History.savedHashes = [];
|
313
|
+
// Create History Entry
|
314
|
+
iframe.contentWindow.document.open();
|
315
|
+
iframe.contentWindow.document.close();
|
60
316
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
History.isLastHash = function(newHash) {
|
68
|
-
// Prepare
|
69
|
-
var oldHash = History.getHashByIndex();
|
70
|
-
|
71
|
-
// Check
|
72
|
-
var isLast = newHash === oldHash;
|
73
|
-
|
74
|
-
// Return isLast
|
75
|
-
return isLast;
|
76
|
-
};
|
77
|
-
|
78
|
-
/**
|
79
|
-
* History.saveHash(newHash)
|
80
|
-
* Push a Hash
|
81
|
-
* @param {string} newHash
|
82
|
-
* @return {boolean} true
|
83
|
-
*/
|
84
|
-
History.saveHash = function(newHash) {
|
85
|
-
// Check Hash
|
86
|
-
if (History.isLastHash(newHash)) {
|
87
|
-
return false;
|
317
|
+
// Update the iframe's hash
|
318
|
+
iframe.contentWindow.document.location.hash = History.escapeHash(documentHash);
|
319
|
+
}
|
320
|
+
|
321
|
+
// Trigger Hashchange Event
|
322
|
+
History.Adapter.trigger(window, 'hashchange');
|
88
323
|
}
|
89
324
|
|
90
|
-
//
|
91
|
-
|
325
|
+
// The iFrame Hash has changed (back button caused)
|
326
|
+
else if (iframeHash !== lastIframeHash) {
|
327
|
+
//History.debug('hashchange.checker: iframe hash out of sync', 'iframeHash (new):', iframeHash, 'documentHash (old):', documentHash);
|
92
328
|
|
93
|
-
|
94
|
-
|
95
|
-
};
|
96
|
-
|
97
|
-
/**
|
98
|
-
* History.getHashByIndex()
|
99
|
-
* Gets a hash by the index
|
100
|
-
* @param {integer} index
|
101
|
-
* @return {string}
|
102
|
-
*/
|
103
|
-
History.getHashByIndex = function(index) {
|
104
|
-
// Prepare
|
105
|
-
var hash = null;
|
329
|
+
// Equalise
|
330
|
+
lastIframeHash = iframeHash;
|
106
331
|
|
107
|
-
|
108
|
-
|
109
|
-
// Get the last inserted
|
110
|
-
hash = History.savedHashes[History.savedHashes.length - 1];
|
111
|
-
}
|
112
|
-
else if (index < 0) {
|
113
|
-
// Get from the end
|
114
|
-
hash = History.savedHashes[History.savedHashes.length + index];
|
115
|
-
}
|
116
|
-
else {
|
117
|
-
// Get from the beginning
|
118
|
-
hash = History.savedHashes[index];
|
332
|
+
// Update the Hash
|
333
|
+
History.setHash(iframeHash, false);
|
119
334
|
}
|
120
335
|
|
121
|
-
//
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
/**
|
135
|
-
* History.discardedStates
|
136
|
-
* A hashed array of discarded states
|
137
|
-
*/
|
138
|
-
History.discardedStates = {};
|
139
|
-
|
140
|
-
/**
|
141
|
-
* History.discardState(State)
|
142
|
-
* Discards the state by ignoring it through History
|
143
|
-
* @param {object} State
|
144
|
-
* @return {true}
|
145
|
-
*/
|
146
|
-
History.discardState = function(discardedState, forwardState, backState) {
|
147
|
-
//History.debug('History.discardState', arguments);
|
336
|
+
// Reset Running
|
337
|
+
checkerRunning = false;
|
338
|
+
|
339
|
+
// Return true
|
340
|
+
return true;
|
341
|
+
};
|
342
|
+
}
|
343
|
+
else {
|
344
|
+
// We are not IE
|
345
|
+
// Firefox 1 or 2, Opera
|
346
|
+
|
347
|
+
// Define the checker function
|
348
|
+
History.checkerFunction = function() {
|
148
349
|
// Prepare
|
149
|
-
var
|
350
|
+
var documentHash = History.getHash();
|
150
351
|
|
151
|
-
//
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
'forwardState': forwardState
|
156
|
-
};
|
352
|
+
// The Document Hash has changed (application caused)
|
353
|
+
if (documentHash !== lastDocumentHash) {
|
354
|
+
// Equalise
|
355
|
+
lastDocumentHash = documentHash;
|
157
356
|
|
158
|
-
|
159
|
-
|
357
|
+
// Trigger Hashchange Event
|
358
|
+
History.Adapter.trigger(window, 'hashchange');
|
359
|
+
}
|
160
360
|
|
161
361
|
// Return true
|
162
362
|
return true;
|
163
|
-
|
164
|
-
|
165
|
-
/**
|
166
|
-
* History.discardHash(hash)
|
167
|
-
* Discards the hash by ignoring it through History
|
168
|
-
* @param {string} hash
|
169
|
-
* @return {true}
|
170
|
-
*/
|
171
|
-
History.discardHash = function(discardedHash, forwardState, backState) {
|
172
|
-
//History.debug('History.discardState', arguments);
|
173
|
-
// Create Discard Object
|
174
|
-
var discardObject = {
|
175
|
-
'discardedHash': discardedHash,
|
176
|
-
'backState': backState,
|
177
|
-
'forwardState': forwardState
|
178
|
-
};
|
179
|
-
|
180
|
-
// Add to discardedHash
|
181
|
-
History.discardedHashes[discardedHash] = discardObject;
|
363
|
+
};
|
364
|
+
}
|
182
365
|
|
183
|
-
|
184
|
-
|
185
|
-
};
|
186
|
-
|
187
|
-
/**
|
188
|
-
* History.discardState(State)
|
189
|
-
* Checks to see if the state is discarded
|
190
|
-
* @param {object} State
|
191
|
-
* @return {bool}
|
192
|
-
*/
|
193
|
-
History.discardedState = function(State) {
|
194
|
-
// Prepare
|
195
|
-
var StateHash = History.getHashByState(State);
|
366
|
+
// Apply the checker function
|
367
|
+
History.intervalList.push(setInterval(History.checkerFunction, History.options.hashChangeInterval));
|
196
368
|
|
197
|
-
|
198
|
-
|
369
|
+
// Done
|
370
|
+
return true;
|
371
|
+
}; // History.hashChangeInit
|
199
372
|
|
200
|
-
|
201
|
-
|
202
|
-
};
|
203
|
-
|
204
|
-
/**
|
205
|
-
* History.discardedHash(hash)
|
206
|
-
* Checks to see if the state is discarded
|
207
|
-
* @param {string} State
|
208
|
-
* @return {bool}
|
209
|
-
*/
|
210
|
-
History.discardedHash = function(hash) {
|
211
|
-
// Check
|
212
|
-
var discarded = History.discardedHashes[hash] || false;
|
373
|
+
// Bind hashChangeInit
|
374
|
+
History.Adapter.onDomLoad(History.hashChangeInit);
|
213
375
|
|
214
|
-
|
215
|
-
return discarded;
|
216
|
-
};
|
217
|
-
|
218
|
-
/**
|
219
|
-
* History.recycleState(State)
|
220
|
-
* Allows a discarded state to be used again
|
221
|
-
* @param {object} data
|
222
|
-
* @param {string} title
|
223
|
-
* @param {string} url
|
224
|
-
* @return {true}
|
225
|
-
*/
|
226
|
-
History.recycleState = function(State) {
|
227
|
-
//History.debug('History.recycleState', arguments);
|
228
|
-
// Prepare
|
229
|
-
var StateHash = History.getHashByState(State);
|
376
|
+
} // History.emulated.hashChange
|
230
377
|
|
231
|
-
// Remove from DiscardedStates
|
232
|
-
if (History.discardedState(State)) {
|
233
|
-
delete History.discardedStates[StateHash];
|
234
|
-
}
|
235
378
|
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
//
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
// Push the new HTML5 State
|
456
|
-
//History.debug('History.onHashChange: success hashchange');
|
457
|
-
History.pushState(currentState.data, currentState.title, currentState.url, false);
|
458
|
-
|
459
|
-
// End onHashChange closure
|
460
|
-
return true;
|
461
|
-
};
|
462
|
-
History.Adapter.bind(window, 'hashchange', History.onHashChange);
|
463
|
-
|
464
|
-
/**
|
465
|
-
* History.pushState(data,title,url)
|
466
|
-
* Add a new State to the history object, become it, and trigger onpopstate
|
467
|
-
* We have to trigger for HTML4 compatibility
|
468
|
-
* @param {object} data
|
469
|
-
* @param {string} title
|
470
|
-
* @param {string} url
|
471
|
-
* @return {true}
|
472
|
-
*/
|
473
|
-
History.pushState = function(data, title, url, queue) {
|
474
|
-
//History.debug('History.pushState: called', arguments);
|
475
|
-
|
476
|
-
// Check the State
|
477
|
-
if (History.getHashByUrl(url)) {
|
478
|
-
throw new Error('History.js does not support states with fragement-identifiers (hashes/anchors).');
|
479
|
-
}
|
480
|
-
|
481
|
-
// Handle Queueing
|
482
|
-
if (queue !== false && History.busy()) {
|
483
|
-
// Wait + Push to Queue
|
484
|
-
//History.debug('History.pushState: we must wait', arguments);
|
485
|
-
History.pushQueue({
|
486
|
-
scope: History,
|
487
|
-
callback: History.pushState,
|
488
|
-
args: arguments,
|
489
|
-
queue: queue
|
490
|
-
});
|
491
|
-
return false;
|
492
|
-
}
|
493
|
-
|
494
|
-
// Make Busy
|
495
|
-
History.busy(true);
|
496
|
-
|
497
|
-
// Fetch the State Object
|
498
|
-
var
|
499
|
-
newState = History.createStateObject(data, title, url),
|
500
|
-
newStateHash = History.getHashByState(newState),
|
501
|
-
oldState = History.getState(false),
|
502
|
-
oldStateHash = History.getHashByState(oldState),
|
503
|
-
html4Hash = History.getHash();
|
504
|
-
|
505
|
-
// Store the newState
|
506
|
-
History.storeState(newState);
|
507
|
-
History.expectedStateId = newState.id;
|
508
|
-
|
509
|
-
// Recycle the State
|
510
|
-
History.recycleState(newState);
|
511
|
-
|
512
|
-
// Force update of the title
|
513
|
-
History.setTitle(newState);
|
514
|
-
|
515
|
-
// Check if we are the same State
|
516
|
-
if (newStateHash === oldStateHash) {
|
517
|
-
//History.debug('History.pushState: no change', newStateHash);
|
518
|
-
History.busy(false);
|
519
|
-
return false;
|
520
|
-
}
|
521
|
-
|
522
|
-
// Update HTML4 Hash
|
523
|
-
if (newStateHash !== html4Hash && newStateHash !== History.getShortUrl(document.location.href)) {
|
524
|
-
//History.debug('History.pushState: update hash', newStateHash, html4Hash);
|
525
|
-
History.setHash(newStateHash, false);
|
526
|
-
return false;
|
527
|
-
}
|
528
|
-
|
529
|
-
// Update HTML5 State
|
530
|
-
History.saveState(newState);
|
531
|
-
|
532
|
-
// Fire HTML5 Event
|
533
|
-
//History.debug('History.pushState: trigger popstate');
|
534
|
-
History.Adapter.trigger(window, 'statechange');
|
535
|
-
History.busy(false);
|
536
|
-
|
537
|
-
// End pushState closure
|
538
|
-
return true;
|
539
|
-
};
|
540
|
-
|
541
|
-
/**
|
542
|
-
* History.replaceState(data,title,url)
|
543
|
-
* Replace the State and trigger onpopstate
|
544
|
-
* We have to trigger for HTML4 compatibility
|
545
|
-
* @param {object} data
|
546
|
-
* @param {string} title
|
547
|
-
* @param {string} url
|
548
|
-
* @return {true}
|
549
|
-
*/
|
550
|
-
History.replaceState = function(data, title, url, queue) {
|
551
|
-
//History.debug('History.replaceState: called', arguments);
|
552
|
-
|
553
|
-
// Check the State
|
554
|
-
if (History.getHashByUrl(url)) {
|
555
|
-
throw new Error('History.js does not support states with fragement-identifiers (hashes/anchors).');
|
556
|
-
}
|
557
|
-
|
558
|
-
// Handle Queueing
|
559
|
-
if (queue !== false && History.busy()) {
|
560
|
-
// Wait + Push to Queue
|
561
|
-
//History.debug('History.replaceState: we must wait', arguments);
|
562
|
-
History.pushQueue({
|
563
|
-
scope: History,
|
564
|
-
callback: History.replaceState,
|
565
|
-
args: arguments,
|
566
|
-
queue: queue
|
567
|
-
});
|
568
|
-
return false;
|
569
|
-
}
|
570
|
-
|
571
|
-
// Make Busy
|
572
|
-
History.busy(true);
|
573
|
-
|
574
|
-
// Fetch the State Objects
|
575
|
-
var
|
576
|
-
newState = History.createStateObject(data, title, url),
|
577
|
-
oldState = History.getState(false),
|
578
|
-
previousState = History.getStateByIndex(-2);
|
579
|
-
|
580
|
-
// Discard Old State
|
581
|
-
History.discardState(oldState, newState, previousState);
|
582
|
-
|
583
|
-
// Alias to PushState
|
584
|
-
History.pushState(newState.data, newState.title, newState.url, false);
|
585
|
-
|
586
|
-
// End replaceState closure
|
587
|
-
return true;
|
588
|
-
};
|
589
|
-
|
590
|
-
/**
|
591
|
-
* Ensure initial state is handled correctly
|
592
|
-
*/
|
593
|
-
if (History.getHash() && !History.emulated.hashChange) {
|
594
|
-
History.Adapter.onDomLoad(function() {
|
595
|
-
History.Adapter.trigger(window, 'hashchange');
|
596
|
-
});
|
597
|
-
}
|
379
|
+
// ----------------------------------------------------------------------
|
380
|
+
// HTML5 State Support
|
381
|
+
|
382
|
+
if (History.emulated.pushState) {
|
383
|
+
/*
|
384
|
+
* We must emulate the HTML5 State Management by using HTML4 HashChange
|
385
|
+
*/
|
386
|
+
|
387
|
+
/**
|
388
|
+
* History.onHashChange(event)
|
389
|
+
* Trigger HTML5's window.onpopstate via HTML4 HashChange Support
|
390
|
+
*/
|
391
|
+
History.onHashChange = function(event) {
|
392
|
+
//History.debug('History.onHashChange', arguments);
|
393
|
+
|
394
|
+
// Prepare
|
395
|
+
var
|
396
|
+
currentUrl = ((event && event.newURL) || document.location.href),
|
397
|
+
currentHash = History.getHashByUrl(currentUrl),
|
398
|
+
currentState = null,
|
399
|
+
currentStateHash = null,
|
400
|
+
currentStateHashExits = null;
|
401
|
+
|
402
|
+
// Check if we are the same state
|
403
|
+
if (History.isLastHash(currentHash)) {
|
404
|
+
// There has been no change (just the page's hash has finally propagated)
|
405
|
+
//History.debug('History.onHashChange: no change');
|
406
|
+
History.busy(false);
|
407
|
+
return false;
|
408
|
+
}
|
409
|
+
|
410
|
+
// Reset the double check
|
411
|
+
History.doubleCheckComplete();
|
412
|
+
|
413
|
+
// Store our location for use in detecting back/forward direction
|
414
|
+
History.saveHash(currentHash);
|
415
|
+
|
416
|
+
// Expand Hash
|
417
|
+
if (currentHash && History.isTraditionalAnchor(currentHash)) {
|
418
|
+
//History.debug('History.onHashChange: traditional anchor', currentHash);
|
419
|
+
// Traditional Anchor Hash
|
420
|
+
History.Adapter.trigger(window, 'anchorchange');
|
421
|
+
History.busy(false);
|
422
|
+
return false;
|
423
|
+
}
|
424
|
+
|
425
|
+
// Create State
|
426
|
+
currentState = History.extractState(History.getFullUrl(currentHash || document.location.href, false), true);
|
427
|
+
|
428
|
+
// Check if we are the same state
|
429
|
+
if (History.isLastSavedState(currentState)) {
|
430
|
+
//History.debug('History.onHashChange: no change');
|
431
|
+
// There has been no change (just the page's hash has finally propagated)
|
432
|
+
History.busy(false);
|
433
|
+
return false;
|
434
|
+
}
|
435
|
+
|
436
|
+
// Create the state Hash
|
437
|
+
currentStateHash = History.getHashByState(currentState);
|
438
|
+
|
439
|
+
// Check if we are DiscardedState
|
440
|
+
var discardObject = History.discardedState(currentState);
|
441
|
+
if (discardObject) {
|
442
|
+
// Ignore this state as it has been discarded and go back to the state before it
|
443
|
+
if (History.getHashByIndex(-2) === History.getHashByState(discardObject.forwardState)) {
|
444
|
+
// We are going backwards
|
445
|
+
//History.debug('History.onHashChange: go backwards');
|
446
|
+
History.back(false);
|
447
|
+
} else {
|
448
|
+
// We are going forwards
|
449
|
+
//History.debug('History.onHashChange: go forwards');
|
450
|
+
History.forward(false);
|
451
|
+
}
|
452
|
+
return false;
|
453
|
+
}
|
454
|
+
|
455
|
+
// Push the new HTML5 State
|
456
|
+
//History.debug('History.onHashChange: success hashchange');
|
457
|
+
History.pushState(currentState.data, currentState.title, currentState.url, false);
|
458
|
+
|
459
|
+
// End onHashChange closure
|
460
|
+
return true;
|
461
|
+
};
|
462
|
+
History.Adapter.bind(window, 'hashchange', History.onHashChange);
|
463
|
+
|
464
|
+
/**
|
465
|
+
* History.pushState(data,title,url)
|
466
|
+
* Add a new State to the history object, become it, and trigger onpopstate
|
467
|
+
* We have to trigger for HTML4 compatibility
|
468
|
+
* @param {object} data
|
469
|
+
* @param {string} title
|
470
|
+
* @param {string} url
|
471
|
+
* @return {true}
|
472
|
+
*/
|
473
|
+
History.pushState = function(data, title, url, queue) {
|
474
|
+
//History.debug('History.pushState: called', arguments);
|
475
|
+
|
476
|
+
// Check the State
|
477
|
+
if (History.getHashByUrl(url)) {
|
478
|
+
throw new Error('History.js does not support states with fragement-identifiers (hashes/anchors).');
|
479
|
+
}
|
480
|
+
|
481
|
+
// Handle Queueing
|
482
|
+
if (queue !== false && History.busy()) {
|
483
|
+
// Wait + Push to Queue
|
484
|
+
//History.debug('History.pushState: we must wait', arguments);
|
485
|
+
History.pushQueue({
|
486
|
+
scope: History,
|
487
|
+
callback: History.pushState,
|
488
|
+
args: arguments,
|
489
|
+
queue: queue
|
490
|
+
});
|
491
|
+
return false;
|
492
|
+
}
|
493
|
+
|
494
|
+
// Make Busy
|
495
|
+
History.busy(true);
|
496
|
+
|
497
|
+
// Fetch the State Object
|
498
|
+
var
|
499
|
+
newState = History.createStateObject(data, title, url),
|
500
|
+
newStateHash = History.getHashByState(newState),
|
501
|
+
oldState = History.getState(false),
|
502
|
+
oldStateHash = History.getHashByState(oldState),
|
503
|
+
html4Hash = History.getHash();
|
504
|
+
|
505
|
+
// Store the newState
|
506
|
+
History.storeState(newState);
|
507
|
+
History.expectedStateId = newState.id;
|
508
|
+
|
509
|
+
// Recycle the State
|
510
|
+
History.recycleState(newState);
|
511
|
+
|
512
|
+
// Force update of the title
|
513
|
+
History.setTitle(newState);
|
514
|
+
|
515
|
+
// Check if we are the same State
|
516
|
+
if (newStateHash === oldStateHash) {
|
517
|
+
//History.debug('History.pushState: no change', newStateHash);
|
518
|
+
History.busy(false);
|
519
|
+
return false;
|
520
|
+
}
|
521
|
+
|
522
|
+
// Update HTML4 Hash
|
523
|
+
if (newStateHash !== html4Hash && newStateHash !== History.getShortUrl(document.location.href)) {
|
524
|
+
//History.debug('History.pushState: update hash', newStateHash, html4Hash);
|
525
|
+
History.setHash(newStateHash, false);
|
526
|
+
return false;
|
527
|
+
}
|
528
|
+
|
529
|
+
// Update HTML5 State
|
530
|
+
History.saveState(newState);
|
531
|
+
|
532
|
+
// Fire HTML5 Event
|
533
|
+
//History.debug('History.pushState: trigger popstate');
|
534
|
+
History.Adapter.trigger(window, 'statechange');
|
535
|
+
History.busy(false);
|
536
|
+
|
537
|
+
// End pushState closure
|
538
|
+
return true;
|
539
|
+
};
|
540
|
+
|
541
|
+
/**
|
542
|
+
* History.replaceState(data,title,url)
|
543
|
+
* Replace the State and trigger onpopstate
|
544
|
+
* We have to trigger for HTML4 compatibility
|
545
|
+
* @param {object} data
|
546
|
+
* @param {string} title
|
547
|
+
* @param {string} url
|
548
|
+
* @return {true}
|
549
|
+
*/
|
550
|
+
History.replaceState = function(data, title, url, queue) {
|
551
|
+
//History.debug('History.replaceState: called', arguments);
|
552
|
+
|
553
|
+
// Check the State
|
554
|
+
if (History.getHashByUrl(url)) {
|
555
|
+
throw new Error('History.js does not support states with fragement-identifiers (hashes/anchors).');
|
556
|
+
}
|
557
|
+
|
558
|
+
// Handle Queueing
|
559
|
+
if (queue !== false && History.busy()) {
|
560
|
+
// Wait + Push to Queue
|
561
|
+
//History.debug('History.replaceState: we must wait', arguments);
|
562
|
+
History.pushQueue({
|
563
|
+
scope: History,
|
564
|
+
callback: History.replaceState,
|
565
|
+
args: arguments,
|
566
|
+
queue: queue
|
567
|
+
});
|
568
|
+
return false;
|
569
|
+
}
|
570
|
+
|
571
|
+
// Make Busy
|
572
|
+
History.busy(true);
|
573
|
+
|
574
|
+
// Fetch the State Objects
|
575
|
+
var
|
576
|
+
newState = History.createStateObject(data, title, url),
|
577
|
+
oldState = History.getState(false),
|
578
|
+
previousState = History.getStateByIndex(-2);
|
579
|
+
|
580
|
+
// Discard Old State
|
581
|
+
History.discardState(oldState, newState, previousState);
|
582
|
+
|
583
|
+
// Alias to PushState
|
584
|
+
History.pushState(newState.data, newState.title, newState.url, false);
|
585
|
+
|
586
|
+
// End replaceState closure
|
587
|
+
return true;
|
588
|
+
};
|
589
|
+
|
590
|
+
/**
|
591
|
+
* Ensure initial state is handled correctly
|
592
|
+
*/
|
593
|
+
if (History.getHash() && !History.emulated.hashChange) {
|
594
|
+
History.Adapter.onDomLoad(function() {
|
595
|
+
History.Adapter.trigger(window, 'hashchange');
|
596
|
+
});
|
597
|
+
}
|
598
598
|
|
599
|
-
|
599
|
+
} // History.emulated.pushState
|
600
600
|
|
601
|
-
|
601
|
+
}; // History.initHtml4
|
602
602
|
|
603
|
-
|
604
|
-
|
603
|
+
// Try and Initialise History
|
604
|
+
History.init();
|
605
605
|
|
606
606
|
})(window);
|