ext_yarn 0.4.0 → 0.5.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.
- checksums.yaml +4 -4
- data/.gitignore +41 -47
- data/README.md +10 -0
- data/bin/yarn_after +12 -0
- data/lib/ext_yarn/version.rb +1 -1
- data/package.json +14 -13
- data/vendor/.yarn-integrity +35 -39
- data/vendor/bootswatch-sass/package.json +1 -1
- data/vendor/chart.js/dist/Chart.bundle.js +5754 -5711
- data/vendor/chart.js/dist/Chart.js +2118 -2046
- data/vendor/chart.js/package.json +1 -1
- data/vendor/chartkick/LICENSE.txt +1 -1
- data/vendor/chartkick/dist/chartkick.js +2239 -0
- data/vendor/chartkick/package.json +18 -8
- data/vendor/file-saver/dist/FileSaver.js +180 -0
- data/vendor/file-saver/package.json +16 -4
- data/vendor/jquery/dist/jquery.js +453 -342
- data/vendor/jquery/dist/jquery.slim.js +428 -319
- data/vendor/jquery/package.json +32 -21
- data/vendor/{tempusdominus-bootstrap-4 → jquery-touch-events}/LICENSE +21 -21
- data/vendor/jquery-touch-events/package.json +32 -0
- data/vendor/jquery-touch-events/src/jquery.mobile-events.js +920 -0
- data/vendor/jquery-ui-touch-punch-zoom-fork/jquery.ui.touch-punch.js +186 -0
- data/vendor/jquery-ujs/package.json +1 -1
- data/vendor/jquery-ujs/src/rails.js +14 -4
- data/vendor/{bootswatch → jquery.iframe-transport}/LICENSE +2 -2
- data/vendor/jquery.iframe-transport/jquery.iframe-transport.js +247 -0
- data/vendor/jquery.iframe-transport/package.json +28 -0
- data/vendor/jstz/dist/jstz.js +9 -1
- data/vendor/jstz/package.json +6 -4
- data/vendor/lazysizes/LICENSE +22 -0
- data/vendor/lazysizes/lazysizes-umd.js +706 -0
- data/vendor/lazysizes/lazysizes.js +703 -0
- data/vendor/lazysizes/package.json +65 -0
- data/vendor/lazysizes/plugins/artdirect/ls.artdirect.js +160 -0
- data/vendor/lazysizes/plugins/aspectratio/ls.aspectratio.js +209 -0
- data/vendor/lazysizes/plugins/attrchange/ls.attrchange.js +129 -0
- data/vendor/lazysizes/plugins/bgset/ls.bgset.js +198 -0
- data/vendor/lazysizes/plugins/blur-up/ls.blur-up.js +191 -0
- data/vendor/lazysizes/plugins/custommedia/ls.custommedia.js +75 -0
- data/vendor/lazysizes/plugins/fix-ios-sizes/fix-ios-sizes.js +80 -0
- data/vendor/lazysizes/plugins/include/ls.include.js +589 -0
- data/vendor/lazysizes/plugins/noscript/ls.noscript.js +87 -0
- data/vendor/lazysizes/plugins/object-fit/ls.object-fit.js +149 -0
- data/vendor/lazysizes/plugins/optimumx/ls.optimumx.js +273 -0
- data/vendor/lazysizes/plugins/parent-fit/ls.parent-fit.js +157 -0
- data/vendor/lazysizes/plugins/print/ls.print.js +51 -0
- data/vendor/lazysizes/plugins/progressive/ls.progressive.js +49 -0
- data/vendor/lazysizes/plugins/respimg/ls.respimg.js +314 -0
- data/vendor/lazysizes/plugins/rias/ls.rias.js +391 -0
- data/vendor/lazysizes/plugins/static-gecko-picture/ls.static-gecko-picture.js +82 -0
- data/vendor/lazysizes/plugins/twitter/ls.twitter.js +63 -0
- data/vendor/lazysizes/plugins/unload/ls.unload.js +155 -0
- data/vendor/lazysizes/plugins/unveilhooks/ls.unveilhooks.js +145 -0
- data/vendor/lazysizes/plugins/video-embed/ls.video-embed.js +114 -0
- data/vendor/lodash/core.js +75 -57
- data/vendor/lodash/lodash.js +105 -82
- data/vendor/lodash/package.json +2 -2
- data/vendor/moment/locale/af.js +58 -60
- data/vendor/moment/locale/ar-dz.js +45 -47
- data/vendor/moment/locale/ar-kw.js +45 -47
- data/vendor/moment/locale/ar-ly.js +106 -112
- data/vendor/moment/locale/ar-ma.js +45 -48
- data/vendor/moment/locale/ar-sa.js +88 -91
- data/vendor/moment/locale/ar-tn.js +45 -47
- data/vendor/moment/locale/ar.js +119 -128
- data/vendor/moment/locale/az.js +89 -91
- data/vendor/moment/locale/be.js +111 -115
- data/vendor/moment/locale/bg.js +73 -75
- data/vendor/moment/locale/bm.js +44 -47
- data/vendor/moment/locale/bn.js +103 -105
- data/vendor/moment/locale/bo.js +103 -105
- data/vendor/moment/locale/br.js +88 -90
- data/vendor/moment/locale/bs.js +133 -136
- data/vendor/moment/locale/ca.js +68 -70
- data/vendor/moment/locale/cs.js +160 -162
- data/vendor/moment/locale/cv.js +48 -50
- data/vendor/moment/locale/cy.js +64 -67
- data/vendor/moment/locale/da.js +46 -48
- data/vendor/moment/locale/de-at.js +61 -66
- data/vendor/moment/locale/de-ch.js +61 -65
- data/vendor/moment/locale/de.js +61 -65
- data/vendor/moment/locale/dv.js +82 -85
- data/vendor/moment/locale/el.js +82 -84
- data/vendor/moment/locale/en-au.js +53 -55
- data/vendor/moment/locale/en-ca.js +49 -51
- data/vendor/moment/locale/en-gb.js +53 -55
- data/vendor/moment/locale/en-ie.js +53 -55
- data/vendor/moment/locale/en-il.js +61 -0
- data/vendor/moment/locale/en-nz.js +53 -55
- data/vendor/moment/locale/eo.js +56 -60
- data/vendor/moment/locale/es-do.js +72 -73
- data/vendor/moment/locale/es-us.js +64 -66
- data/vendor/moment/locale/es.js +72 -74
- data/vendor/moment/locale/et.js +64 -67
- data/vendor/moment/locale/eu.js +52 -54
- data/vendor/moment/locale/fa.js +90 -93
- data/vendor/moment/locale/fi.js +93 -95
- data/vendor/moment/locale/fo.js +46 -48
- data/vendor/moment/locale/fr-ca.js +58 -60
- data/vendor/moment/locale/fr-ch.js +62 -64
- data/vendor/moment/locale/fr.js +66 -68
- data/vendor/moment/locale/fy.js +59 -61
- data/vendor/moment/locale/gd.js +57 -59
- data/vendor/moment/locale/gl.js +60 -62
- data/vendor/moment/locale/gom-latn.js +107 -109
- data/vendor/moment/locale/gu.js +108 -110
- data/vendor/moment/locale/he.js +77 -81
- data/vendor/moment/locale/hi.js +108 -110
- data/vendor/moment/locale/hr.js +136 -138
- data/vendor/moment/locale/hu.js +92 -94
- data/vendor/moment/locale/hy-am.js +78 -80
- data/vendor/moment/locale/id.js +67 -70
- data/vendor/moment/locale/is.js +110 -112
- data/vendor/moment/locale/it.js +53 -56
- data/vendor/moment/locale/ja.js +77 -67
- data/vendor/moment/locale/jv.js +67 -70
- data/vendor/moment/locale/ka.js +70 -72
- data/vendor/moment/locale/kk.js +72 -74
- data/vendor/moment/locale/km.js +96 -46
- data/vendor/moment/locale/kn.js +110 -112
- data/vendor/moment/locale/ko.js +66 -69
- data/vendor/moment/locale/ky.js +72 -75
- data/vendor/moment/locale/lb.js +113 -116
- data/vendor/moment/locale/lo.js +55 -57
- data/vendor/moment/locale/lt.js +100 -102
- data/vendor/moment/locale/lv.js +81 -84
- data/vendor/moment/locale/me.js +93 -95
- data/vendor/moment/locale/mi.js +50 -52
- data/vendor/moment/locale/mk.js +73 -75
- data/vendor/moment/locale/ml.js +66 -68
- data/vendor/moment/locale/mn.js +103 -0
- data/vendor/moment/locale/mr.js +140 -143
- data/vendor/moment/locale/ms-my.js +67 -70
- data/vendor/moment/locale/ms.js +67 -69
- data/vendor/moment/locale/mt.js +46 -48
- data/vendor/moment/locale/my.js +77 -82
- data/vendor/moment/locale/nb.js +48 -51
- data/vendor/moment/locale/ne.js +107 -109
- data/vendor/moment/locale/nl-be.js +68 -71
- data/vendor/moment/locale/nl.js +68 -71
- data/vendor/moment/locale/nn.js +46 -48
- data/vendor/moment/locale/pa-in.js +108 -110
- data/vendor/moment/locale/pl.js +104 -106
- data/vendor/moment/locale/pt-br.js +46 -48
- data/vendor/moment/locale/pt.js +50 -52
- data/vendor/moment/locale/ro.js +59 -62
- data/vendor/moment/locale/ru.js +153 -157
- data/vendor/moment/locale/sd.js +82 -84
- data/vendor/moment/locale/se.js +46 -49
- data/vendor/moment/locale/si.js +56 -58
- data/vendor/moment/locale/sk.js +138 -141
- data/vendor/moment/locale/sl.js +154 -156
- data/vendor/moment/locale/sq.js +54 -58
- data/vendor/moment/locale/sr-cyrl.js +93 -95
- data/vendor/moment/locale/sr.js +93 -95
- data/vendor/moment/locale/ss.js +72 -75
- data/vendor/moment/locale/sv.js +55 -57
- data/vendor/moment/locale/sw.js +45 -47
- data/vendor/moment/locale/ta.js +113 -116
- data/vendor/moment/locale/te.js +74 -76
- data/vendor/moment/locale/tet.js +53 -56
- data/vendor/moment/locale/tg.js +115 -0
- data/vendor/moment/locale/th.js +52 -54
- data/vendor/moment/locale/tl-ph.js +48 -50
- data/vendor/moment/locale/tlh.js +101 -103
- data/vendor/moment/locale/tr.js +80 -78
- data/vendor/moment/locale/tzl.js +75 -78
- data/vendor/moment/locale/tzm-latn.js +44 -46
- data/vendor/moment/locale/tzm.js +44 -46
- data/vendor/moment/locale/ug-cn.js +118 -0
- data/vendor/moment/locale/uk.js +129 -132
- data/vendor/moment/locale/ur.js +82 -85
- data/vendor/moment/locale/uz-latn.js +44 -46
- data/vendor/moment/locale/uz.js +44 -46
- data/vendor/moment/locale/vi.js +64 -66
- data/vendor/moment/locale/x-pseudo.js +54 -56
- data/vendor/moment/locale/yo.js +46 -48
- data/vendor/moment/locale/zh-cn.js +95 -98
- data/vendor/moment/locale/zh-hk.js +88 -92
- data/vendor/moment/locale/zh-tw.js +88 -91
- data/vendor/moment/min/locales.js +9701 -9581
- data/vendor/moment/min/moment-with-locales.js +13426 -13335
- data/vendor/moment/moment.js +3780 -3809
- data/vendor/moment/package.json +10 -10
- data/vendor/moment-timezone/builds/moment-timezone-with-data-2012-2022.js +43 -35
- data/vendor/moment-timezone/builds/moment-timezone-with-data.js +290 -282
- data/vendor/moment-timezone/moment-timezone-utils.js +12 -10
- data/vendor/moment-timezone/moment-timezone.js +15 -7
- data/vendor/moment-timezone/package.json +5 -3
- data/vendor/{bootstrap → pako}/LICENSE +2 -3
- data/vendor/pako/dist/pako.js +6811 -0
- data/vendor/pako/dist/pako_deflate.js +3995 -0
- data/vendor/pako/dist/pako_inflate.js +3295 -0
- data/vendor/pako/package.json +48 -0
- data/yarn.lock +51 -78
- metadata +45 -155
- data/vendor/bootstrap/dist/js/bootstrap.bundle.js +0 -6461
- data/vendor/bootstrap/dist/js/bootstrap.js +0 -3944
- data/vendor/bootstrap/js/dist/alert.js +0 -204
- data/vendor/bootstrap/js/dist/button.js +0 -192
- data/vendor/bootstrap/js/dist/carousel.js +0 -567
- data/vendor/bootstrap/js/dist/collapse.js +0 -431
- data/vendor/bootstrap/js/dist/dropdown.js +0 -552
- data/vendor/bootstrap/js/dist/index.js +0 -23
- data/vendor/bootstrap/js/dist/modal.js +0 -634
- data/vendor/bootstrap/js/dist/popover.js +0 -266
- data/vendor/bootstrap/js/dist/scrollspy.js +0 -379
- data/vendor/bootstrap/js/dist/tab.js +0 -278
- data/vendor/bootstrap/js/dist/tooltip.js +0 -734
- data/vendor/bootstrap/js/dist/util.js +0 -144
- data/vendor/bootstrap/package.json +0 -217
- data/vendor/bootstrap/scss/_alert.scss +0 -51
- data/vendor/bootstrap/scss/_badge.scss +0 -47
- data/vendor/bootstrap/scss/_breadcrumb.scss +0 -41
- data/vendor/bootstrap/scss/_button-group.scss +0 -172
- data/vendor/bootstrap/scss/_buttons.scss +0 -143
- data/vendor/bootstrap/scss/_card.scss +0 -301
- data/vendor/bootstrap/scss/_carousel.scss +0 -236
- data/vendor/bootstrap/scss/_close.scss +0 -35
- data/vendor/bootstrap/scss/_code.scss +0 -48
- data/vendor/bootstrap/scss/_custom-forms.scss +0 -433
- data/vendor/bootstrap/scss/_dropdown.scss +0 -166
- data/vendor/bootstrap/scss/_forms.scss +0 -333
- data/vendor/bootstrap/scss/_functions.scss +0 -86
- data/vendor/bootstrap/scss/_grid.scss +0 -52
- data/vendor/bootstrap/scss/_images.scss +0 -42
- data/vendor/bootstrap/scss/_input-group.scss +0 -173
- data/vendor/bootstrap/scss/_jumbotron.scss +0 -16
- data/vendor/bootstrap/scss/_list-group.scss +0 -115
- data/vendor/bootstrap/scss/_media.scss +0 -8
- data/vendor/bootstrap/scss/_mixins.scss +0 -41
- data/vendor/bootstrap/scss/_modal.scss +0 -180
- data/vendor/bootstrap/scss/_nav.scss +0 -118
- data/vendor/bootstrap/scss/_navbar.scss +0 -299
- data/vendor/bootstrap/scss/_pagination.scss +0 -78
- data/vendor/bootstrap/scss/_popover.scss +0 -183
- data/vendor/bootstrap/scss/_print.scss +0 -141
- data/vendor/bootstrap/scss/_progress.scss +0 -34
- data/vendor/bootstrap/scss/_reboot.scss +0 -483
- data/vendor/bootstrap/scss/_root.scss +0 -19
- data/vendor/bootstrap/scss/_tables.scss +0 -187
- data/vendor/bootstrap/scss/_tooltip.scss +0 -115
- data/vendor/bootstrap/scss/_transitions.scss +0 -22
- data/vendor/bootstrap/scss/_type.scss +0 -125
- data/vendor/bootstrap/scss/_utilities.scss +0 -15
- data/vendor/bootstrap/scss/_variables.scss +0 -952
- data/vendor/bootstrap/scss/bootstrap-grid.scss +0 -32
- data/vendor/bootstrap/scss/bootstrap-reboot.scss +0 -12
- data/vendor/bootstrap/scss/bootstrap.scss +0 -42
- data/vendor/bootstrap/scss/mixins/_alert.scss +0 -13
- data/vendor/bootstrap/scss/mixins/_background-variant.scss +0 -21
- data/vendor/bootstrap/scss/mixins/_badge.scss +0 -12
- data/vendor/bootstrap/scss/mixins/_border-radius.scss +0 -35
- data/vendor/bootstrap/scss/mixins/_box-shadow.scss +0 -5
- data/vendor/bootstrap/scss/mixins/_breakpoints.scss +0 -123
- data/vendor/bootstrap/scss/mixins/_buttons.scss +0 -109
- data/vendor/bootstrap/scss/mixins/_caret.scss +0 -66
- data/vendor/bootstrap/scss/mixins/_clearfix.scss +0 -7
- data/vendor/bootstrap/scss/mixins/_float.scss +0 -11
- data/vendor/bootstrap/scss/mixins/_forms.scss +0 -147
- data/vendor/bootstrap/scss/mixins/_gradients.scss +0 -45
- data/vendor/bootstrap/scss/mixins/_grid-framework.scss +0 -67
- data/vendor/bootstrap/scss/mixins/_grid.scss +0 -52
- data/vendor/bootstrap/scss/mixins/_hover.scss +0 -37
- data/vendor/bootstrap/scss/mixins/_image.scss +0 -36
- data/vendor/bootstrap/scss/mixins/_list-group.scss +0 -21
- data/vendor/bootstrap/scss/mixins/_lists.scss +0 -7
- data/vendor/bootstrap/scss/mixins/_nav-divider.scss +0 -10
- data/vendor/bootstrap/scss/mixins/_pagination.scss +0 -22
- data/vendor/bootstrap/scss/mixins/_reset-text.scss +0 -17
- data/vendor/bootstrap/scss/mixins/_resize.scss +0 -6
- data/vendor/bootstrap/scss/mixins/_screen-reader.scss +0 -33
- data/vendor/bootstrap/scss/mixins/_size.scss +0 -6
- data/vendor/bootstrap/scss/mixins/_table-row.scss +0 -30
- data/vendor/bootstrap/scss/mixins/_text-emphasis.scss +0 -14
- data/vendor/bootstrap/scss/mixins/_text-hide.scss +0 -13
- data/vendor/bootstrap/scss/mixins/_text-truncate.scss +0 -8
- data/vendor/bootstrap/scss/mixins/_transition.scss +0 -13
- data/vendor/bootstrap/scss/mixins/_visibility.scss +0 -7
- data/vendor/bootstrap/scss/utilities/_align.scss +0 -8
- data/vendor/bootstrap/scss/utilities/_background.scss +0 -19
- data/vendor/bootstrap/scss/utilities/_borders.scss +0 -59
- data/vendor/bootstrap/scss/utilities/_clearfix.scss +0 -3
- data/vendor/bootstrap/scss/utilities/_display.scss +0 -38
- data/vendor/bootstrap/scss/utilities/_embed.scss +0 -52
- data/vendor/bootstrap/scss/utilities/_flex.scss +0 -51
- data/vendor/bootstrap/scss/utilities/_float.scss +0 -9
- data/vendor/bootstrap/scss/utilities/_position.scss +0 -37
- data/vendor/bootstrap/scss/utilities/_screenreaders.scss +0 -11
- data/vendor/bootstrap/scss/utilities/_shadows.scss +0 -6
- data/vendor/bootstrap/scss/utilities/_sizing.scss +0 -12
- data/vendor/bootstrap/scss/utilities/_spacing.scss +0 -51
- data/vendor/bootstrap/scss/utilities/_text.scss +0 -58
- data/vendor/bootstrap/scss/utilities/_visibility.scss +0 -11
- data/vendor/bootswatch/dist/cerulean/_bootswatch.scss +0 -99
- data/vendor/bootswatch/dist/cerulean/_variables.scss +0 -57
- data/vendor/bootswatch/dist/cosmo/_bootswatch.scss +0 -38
- data/vendor/bootswatch/dist/cosmo/_variables.scss +0 -68
- data/vendor/bootswatch/dist/cyborg/_bootswatch.scss +0 -230
- data/vendor/bootswatch/dist/cyborg/_variables.scss +0 -173
- data/vendor/bootswatch/dist/darkly/_bootswatch.scss +0 -186
- data/vendor/bootswatch/dist/darkly/_variables.scss +0 -178
- data/vendor/bootswatch/dist/flatly/_bootswatch.scss +0 -185
- data/vendor/bootswatch/dist/flatly/_variables.scss +0 -113
- data/vendor/bootswatch/dist/journal/_bootswatch.scss +0 -73
- data/vendor/bootswatch/dist/journal/_variables.scss +0 -60
- data/vendor/bootswatch/dist/litera/_bootswatch.scss +0 -212
- data/vendor/bootswatch/dist/litera/_variables.scss +0 -77
- data/vendor/bootswatch/dist/lumen/_bootswatch.scss +0 -429
- data/vendor/bootswatch/dist/lumen/_variables.scss +0 -82
- data/vendor/bootswatch/dist/lux/_bootswatch.scss +0 -157
- data/vendor/bootswatch/dist/lux/_variables.scss +0 -120
- data/vendor/bootswatch/dist/materia/_bootswatch.scss +0 -677
- data/vendor/bootswatch/dist/materia/_variables.scss +0 -131
- data/vendor/bootswatch/dist/minty/_bootswatch.scss +0 -258
- data/vendor/bootswatch/dist/minty/_variables.scss +0 -97
- data/vendor/bootswatch/dist/pulse/_bootswatch.scss +0 -154
- data/vendor/bootswatch/dist/pulse/_variables.scss +0 -100
- data/vendor/bootswatch/dist/sandstone/_bootswatch.scss +0 -235
- data/vendor/bootswatch/dist/sandstone/_variables.scss +0 -143
- data/vendor/bootswatch/dist/simplex/_bootswatch.scss +0 -130
- data/vendor/bootswatch/dist/simplex/_variables.scss +0 -108
- data/vendor/bootswatch/dist/sketchy/_bootswatch.scss +0 -411
- data/vendor/bootswatch/dist/sketchy/_variables.scss +0 -164
- data/vendor/bootswatch/dist/slate/_bootswatch.scss +0 -425
- data/vendor/bootswatch/dist/slate/_variables.scss +0 -160
- data/vendor/bootswatch/dist/solar/_bootswatch.scss +0 -119
- data/vendor/bootswatch/dist/solar/_variables.scss +0 -175
- data/vendor/bootswatch/dist/spacelab/_bootswatch.scss +0 -167
- data/vendor/bootswatch/dist/spacelab/_variables.scss +0 -63
- data/vendor/bootswatch/dist/superhero/_bootswatch.scss +0 -200
- data/vendor/bootswatch/dist/superhero/_variables.scss +0 -148
- data/vendor/bootswatch/dist/united/_bootswatch.scss +0 -26
- data/vendor/bootswatch/dist/united/_variables.scss +0 -53
- data/vendor/bootswatch/dist/yeti/_bootswatch.scss +0 -468
- data/vendor/bootswatch/dist/yeti/_variables.scss +0 -110
- data/vendor/bootswatch/package.json +0 -38
- data/vendor/chartkick/chartkick.js +0 -1872
- data/vendor/file-saver/FileSaver.js +0 -188
- data/vendor/popper.js/dist/umd/popper-utils.js +0 -1133
- data/vendor/popper.js/dist/umd/popper.js +0 -2540
- data/vendor/popper.js/package.json +0 -54
- data/vendor/tempusdominus-bootstrap-4/build/js/tempusdominus-bootstrap-4.js +0 -2779
- data/vendor/tempusdominus-bootstrap-4/package.json +0 -79
- data/vendor/tempusdominus-bootstrap-4/src/sass/_tempusdominus-bootstrap-4.scss +0 -342
- data/vendor/tempusdominus-bootstrap-4/src/sass/tempusdominus-bootstrap-4-build.scss +0 -12
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* jQuery UI Touch Punch 0.2.3.fork
|
|
3
|
+
*
|
|
4
|
+
* This is fork with added support for zoomed-in viewport on mobile.
|
|
5
|
+
* For more info look here:
|
|
6
|
+
* https://github.com/Kocik/jquery-ui-touch-punch-zoom-fork
|
|
7
|
+
*
|
|
8
|
+
* Copyright 2011–2014, Dave Furfero
|
|
9
|
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
|
10
|
+
*
|
|
11
|
+
* Depends:
|
|
12
|
+
* jquery.ui.widget.js
|
|
13
|
+
* jquery.ui.mouse.js
|
|
14
|
+
*/
|
|
15
|
+
(function ($) {
|
|
16
|
+
|
|
17
|
+
// Detect touch support
|
|
18
|
+
$.support.touch = 'ontouchend' in document;
|
|
19
|
+
|
|
20
|
+
// Ignore browsers without touch support
|
|
21
|
+
if (!$.support.touch) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var mouseProto = $.ui.mouse.prototype,
|
|
26
|
+
_mouseInit = mouseProto._mouseInit,
|
|
27
|
+
_mouseDestroy = mouseProto._mouseDestroy,
|
|
28
|
+
touchHandled;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Simulate a mouse event based on a corresponding touch event
|
|
32
|
+
* @param {Object} event A touch event
|
|
33
|
+
* @param {String} simulatedType The corresponding mouse event
|
|
34
|
+
*/
|
|
35
|
+
function simulateMouseEvent (event, simulatedType) {
|
|
36
|
+
|
|
37
|
+
// Ignore multi-touch events
|
|
38
|
+
if (event.originalEvent.touches.length > 1) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
event.preventDefault();
|
|
43
|
+
|
|
44
|
+
var touch = event.originalEvent.changedTouches[0],
|
|
45
|
+
simulatedEvent = document.createEvent('MouseEvents');
|
|
46
|
+
|
|
47
|
+
// Initialize the simulated mouse event using the touch event's coordinates
|
|
48
|
+
simulatedEvent.initMouseEvent(
|
|
49
|
+
simulatedType, // type
|
|
50
|
+
true, // bubbles
|
|
51
|
+
true, // cancelable
|
|
52
|
+
window, // view
|
|
53
|
+
1, // detail
|
|
54
|
+
touch.screenX, // screenX
|
|
55
|
+
touch.screenY, // screenY
|
|
56
|
+
|
|
57
|
+
//FORK: fix offset while zoomed-in on mobile
|
|
58
|
+
touch.clientX + $(window).scrollLeft(), // clientX + scrollLeft
|
|
59
|
+
touch.clientY + $(window).scrollTop(), // clientY + scrollTop
|
|
60
|
+
false, // ctrlKey
|
|
61
|
+
false, // altKey
|
|
62
|
+
false, // shiftKey
|
|
63
|
+
false, // metaKey
|
|
64
|
+
0, // button
|
|
65
|
+
null // relatedTarget
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
// Dispatch the simulated event to the target element
|
|
69
|
+
event.target.dispatchEvent(simulatedEvent);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Handle the jQuery UI widget's touchstart events
|
|
74
|
+
* @param {Object} event The widget element's touchstart event
|
|
75
|
+
*/
|
|
76
|
+
mouseProto._touchStart = function (event) {
|
|
77
|
+
|
|
78
|
+
var self = this;
|
|
79
|
+
|
|
80
|
+
// Ignore the event if another widget is already being handled
|
|
81
|
+
if (touchHandled || !self._mouseCapture(event.originalEvent.changedTouches[0])) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Set the flag to prevent other widgets from inheriting the touch event
|
|
86
|
+
touchHandled = true;
|
|
87
|
+
|
|
88
|
+
// Track movement to determine if interaction was a click
|
|
89
|
+
self._touchMoved = false;
|
|
90
|
+
|
|
91
|
+
// Simulate the mouseover event
|
|
92
|
+
simulateMouseEvent(event, 'mouseover');
|
|
93
|
+
|
|
94
|
+
// Simulate the mousemove event
|
|
95
|
+
simulateMouseEvent(event, 'mousemove');
|
|
96
|
+
|
|
97
|
+
// Simulate the mousedown event
|
|
98
|
+
simulateMouseEvent(event, 'mousedown');
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Handle the jQuery UI widget's touchmove events
|
|
103
|
+
* @param {Object} event The document's touchmove event
|
|
104
|
+
*/
|
|
105
|
+
mouseProto._touchMove = function (event) {
|
|
106
|
+
|
|
107
|
+
// Ignore event if not handled
|
|
108
|
+
if (!touchHandled) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Interaction was not a click
|
|
113
|
+
this._touchMoved = true;
|
|
114
|
+
|
|
115
|
+
// Simulate the mousemove event
|
|
116
|
+
simulateMouseEvent(event, 'mousemove');
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Handle the jQuery UI widget's touchend events
|
|
121
|
+
* @param {Object} event The document's touchend event
|
|
122
|
+
*/
|
|
123
|
+
mouseProto._touchEnd = function (event) {
|
|
124
|
+
|
|
125
|
+
// Ignore event if not handled
|
|
126
|
+
if (!touchHandled) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Simulate the mouseup event
|
|
131
|
+
simulateMouseEvent(event, 'mouseup');
|
|
132
|
+
|
|
133
|
+
// Simulate the mouseout event
|
|
134
|
+
simulateMouseEvent(event, 'mouseout');
|
|
135
|
+
|
|
136
|
+
// If the touch interaction did not move, it should trigger a click
|
|
137
|
+
if (!this._touchMoved) {
|
|
138
|
+
|
|
139
|
+
// Simulate the click event
|
|
140
|
+
simulateMouseEvent(event, 'click');
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Unset the flag to allow other widgets to inherit the touch event
|
|
144
|
+
touchHandled = false;
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* A duck punch of the $.ui.mouse _mouseInit method to support touch events.
|
|
149
|
+
* This method extends the widget with bound touch event handlers that
|
|
150
|
+
* translate touch events to mouse events and pass them to the widget's
|
|
151
|
+
* original mouse event handling methods.
|
|
152
|
+
*/
|
|
153
|
+
mouseProto._mouseInit = function () {
|
|
154
|
+
|
|
155
|
+
var self = this;
|
|
156
|
+
|
|
157
|
+
// Delegate the touch handlers to the widget's element
|
|
158
|
+
self.element.bind({
|
|
159
|
+
touchstart: $.proxy(self, '_touchStart'),
|
|
160
|
+
touchmove: $.proxy(self, '_touchMove'),
|
|
161
|
+
touchend: $.proxy(self, '_touchEnd')
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
// Call the original $.ui.mouse init method
|
|
165
|
+
_mouseInit.call(self);
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Remove the touch event handlers
|
|
170
|
+
*/
|
|
171
|
+
mouseProto._mouseDestroy = function () {
|
|
172
|
+
|
|
173
|
+
var self = this;
|
|
174
|
+
|
|
175
|
+
// Delegate the touch handlers to the widget's element
|
|
176
|
+
self.element.unbind({
|
|
177
|
+
touchstart: $.proxy(self, '_touchStart'),
|
|
178
|
+
touchmove: $.proxy(self, '_touchMove'),
|
|
179
|
+
touchend: $.proxy(self, '_touchEnd')
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
// Call the original $.ui.mouse destroy method
|
|
183
|
+
_mouseDestroy.call(self);
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
})(jQuery);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/* jshint node: true */
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Unobtrusive scripting adapter for jQuery
|
|
@@ -10,10 +10,13 @@
|
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
// by detecting and raising an error when it happens.
|
|
13
|
+
(function() {
|
|
15
14
|
'use strict';
|
|
16
15
|
|
|
16
|
+
var jqueryUjsInit = function($, undefined) {
|
|
17
|
+
|
|
18
|
+
// Cut down on the number of issues from people inadvertently including jquery_ujs twice
|
|
19
|
+
// by detecting and raising an error when it happens.
|
|
17
20
|
if ( $.rails !== undefined ) {
|
|
18
21
|
$.error('jquery-ujs has already been loaded!');
|
|
19
22
|
}
|
|
@@ -552,4 +555,11 @@
|
|
|
552
555
|
});
|
|
553
556
|
}
|
|
554
557
|
|
|
555
|
-
}
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
if (window.jQuery) {
|
|
561
|
+
jqueryUjsInit(jQuery);
|
|
562
|
+
} else if (typeof exports === 'object' && typeof module === 'object') {
|
|
563
|
+
module.exports = jqueryUjsInit;
|
|
564
|
+
}
|
|
565
|
+
})();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
The MIT License
|
|
1
|
+
The MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2014 Christopher Lenz
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
// This [jQuery](https://jquery.com/) plugin implements an `<iframe>`
|
|
2
|
+
// [transport](https://api.jquery.com/jQuery.ajax/#extending-ajax) so that
|
|
3
|
+
// `$.ajax()` calls support the uploading of files using standard HTML file
|
|
4
|
+
// input fields. This is done by switching the exchange from `XMLHttpRequest`
|
|
5
|
+
// to a hidden `iframe` element containing a form that is submitted.
|
|
6
|
+
|
|
7
|
+
// The [source for the plugin](https://github.com/cmlenz/jquery-iframe-transport)
|
|
8
|
+
// is available on [Github](https://github.com/) and licensed under the [MIT
|
|
9
|
+
// license](https://github.com/cmlenz/jquery-iframe-transport/blob/master/LICENSE).
|
|
10
|
+
|
|
11
|
+
// ## Usage
|
|
12
|
+
|
|
13
|
+
// To use this plugin, you simply add an `iframe` option with the value `true`
|
|
14
|
+
// to the Ajax settings an `$.ajax()` call, and specify the file fields to
|
|
15
|
+
// include in the submssion using the `files` option, which can be a selector,
|
|
16
|
+
// jQuery object, or a list of DOM elements containing one or more
|
|
17
|
+
// `<input type="file">` elements:
|
|
18
|
+
|
|
19
|
+
// $("#myform").submit(function() {
|
|
20
|
+
// $.ajax(this.action, {
|
|
21
|
+
// files: $(":file", this),
|
|
22
|
+
// iframe: true
|
|
23
|
+
// }).complete(function(data) {
|
|
24
|
+
// console.log(data);
|
|
25
|
+
// });
|
|
26
|
+
// });
|
|
27
|
+
|
|
28
|
+
// The plugin will construct hidden `<iframe>` and `<form>` elements, add the
|
|
29
|
+
// file field(s) to that form, submit the form, and process the response.
|
|
30
|
+
|
|
31
|
+
// If you want to include other form fields in the form submission, include
|
|
32
|
+
// them in the `data` option, and set the `processData` option to `false`:
|
|
33
|
+
|
|
34
|
+
// $("#myform").submit(function() {
|
|
35
|
+
// $.ajax(this.action, {
|
|
36
|
+
// data: $(":text", this).serializeArray(),
|
|
37
|
+
// files: $(":file", this),
|
|
38
|
+
// iframe: true,
|
|
39
|
+
// processData: false
|
|
40
|
+
// }).complete(function(data) {
|
|
41
|
+
// console.log(data);
|
|
42
|
+
// });
|
|
43
|
+
// });
|
|
44
|
+
|
|
45
|
+
// ### Response Data Types
|
|
46
|
+
|
|
47
|
+
// As the transport does not have access to the HTTP headers of the server
|
|
48
|
+
// response, it is not as simple to make use of the automatic content type
|
|
49
|
+
// detection provided by jQuery as with regular XHR. If you can't set the
|
|
50
|
+
// expected response data type (for example because it may vary depending on
|
|
51
|
+
// the outcome of processing by the server), you will need to employ a
|
|
52
|
+
// workaround on the server side: Send back an HTML document containing just a
|
|
53
|
+
// `<textarea>` element with a `data-type` attribute that specifies the MIME
|
|
54
|
+
// type, and put the actual payload in the textarea:
|
|
55
|
+
|
|
56
|
+
// <textarea data-type="application/json">
|
|
57
|
+
// {"ok": true, "message": "Thanks so much"}
|
|
58
|
+
// </textarea>
|
|
59
|
+
|
|
60
|
+
// The iframe transport plugin will detect this and pass the value of the
|
|
61
|
+
// `data-type` attribute on to jQuery as if it was the "Content-Type" response
|
|
62
|
+
// header, thereby enabling the same kind of conversions that jQuery applies
|
|
63
|
+
// to regular responses. For the example above you should get a Javascript
|
|
64
|
+
// object as the `data` parameter of the `complete` callback, with the
|
|
65
|
+
// properties `ok: true` and `message: "Thanks so much"`.
|
|
66
|
+
|
|
67
|
+
// ### Handling Server Errors
|
|
68
|
+
|
|
69
|
+
// Another problem with using an `iframe` for file uploads is that it is
|
|
70
|
+
// impossible for the javascript code to determine the HTTP status code of the
|
|
71
|
+
// servers response. Effectively, all of the calls you make will look like they
|
|
72
|
+
// are getting successful responses, and thus invoke the `done()` or
|
|
73
|
+
// `complete()` callbacks. You can only communicate problems using the content
|
|
74
|
+
// of the response payload. For example, consider using a JSON response such as
|
|
75
|
+
// the following to indicate a problem with an uploaded file:
|
|
76
|
+
|
|
77
|
+
// <textarea data-type="application/json">
|
|
78
|
+
// {"ok": false, "message": "Please only upload reasonably sized files."}
|
|
79
|
+
// </textarea>
|
|
80
|
+
|
|
81
|
+
// ### Compatibility
|
|
82
|
+
|
|
83
|
+
// This plugin has primarily been tested on Safari 5 (or later), Firefox 4 (or
|
|
84
|
+
// later), and Internet Explorer (all the way back to version 6). While I
|
|
85
|
+
// haven't found any issues with it so far, I'm fairly sure it still doesn't
|
|
86
|
+
// work around all the quirks in all different browsers. But the code is still
|
|
87
|
+
// pretty simple overall, so you should be able to fix it and contribute a
|
|
88
|
+
// patch :)
|
|
89
|
+
|
|
90
|
+
// ## Annotated Source
|
|
91
|
+
|
|
92
|
+
(function($, undefined) {
|
|
93
|
+
"use strict";
|
|
94
|
+
|
|
95
|
+
// Register a prefilter that checks whether the `iframe` option is set, and
|
|
96
|
+
// switches to the "iframe" data type if it is `true`.
|
|
97
|
+
$.ajaxPrefilter(function(options, origOptions, jqXHR) {
|
|
98
|
+
if (options.iframe) {
|
|
99
|
+
options.originalURL = options.url;
|
|
100
|
+
return "iframe";
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
// Register a transport for the "iframe" data type. It will only activate
|
|
105
|
+
// when the "files" option has been set to a non-empty list of enabled file
|
|
106
|
+
// inputs.
|
|
107
|
+
$.ajaxTransport("iframe", function(options, origOptions, jqXHR) {
|
|
108
|
+
var form = null,
|
|
109
|
+
iframe = null,
|
|
110
|
+
name = "iframe-" + $.now(),
|
|
111
|
+
files = $(options.files).filter(":file:enabled"),
|
|
112
|
+
markers = null,
|
|
113
|
+
accepts = null;
|
|
114
|
+
|
|
115
|
+
// This function gets called after a successful submission or an abortion
|
|
116
|
+
// and should revert all changes made to the page to enable the
|
|
117
|
+
// submission via this transport.
|
|
118
|
+
function cleanUp() {
|
|
119
|
+
files.each(function(i, file) {
|
|
120
|
+
var $file = $(file);
|
|
121
|
+
$file.data("clone").replaceWith($file);
|
|
122
|
+
});
|
|
123
|
+
form.remove();
|
|
124
|
+
iframe.one("load", function() { iframe.remove(); });
|
|
125
|
+
iframe.attr("src", "about:blank");
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Remove "iframe" from the data types list so that further processing is
|
|
129
|
+
// based on the content type returned by the server, without attempting an
|
|
130
|
+
// (unsupported) conversion from "iframe" to the actual type.
|
|
131
|
+
options.dataTypes.shift();
|
|
132
|
+
|
|
133
|
+
// Use the data from the original AJAX options, as it doesn't seem to be
|
|
134
|
+
// copied over since jQuery 1.7.
|
|
135
|
+
// See https://github.com/cmlenz/jquery-iframe-transport/issues/6
|
|
136
|
+
options.data = origOptions.data;
|
|
137
|
+
|
|
138
|
+
if (files.length) {
|
|
139
|
+
form = $("<form enctype='multipart/form-data' method='post'></form>").
|
|
140
|
+
hide().attr({action: options.originalURL, target: name});
|
|
141
|
+
|
|
142
|
+
// If there is any additional data specified via the `data` option,
|
|
143
|
+
// we add it as hidden fields to the form. This (currently) requires
|
|
144
|
+
// the `processData` option to be set to false so that the data doesn't
|
|
145
|
+
// get serialized to a string.
|
|
146
|
+
if (typeof(options.data) === "string" && options.data.length > 0) {
|
|
147
|
+
$.error("data must not be serialized");
|
|
148
|
+
}
|
|
149
|
+
$.each(options.data || {}, function(name, value) {
|
|
150
|
+
if ($.isPlainObject(value)) {
|
|
151
|
+
name = value.name;
|
|
152
|
+
value = value.value;
|
|
153
|
+
}
|
|
154
|
+
$("<input type='hidden' />").attr({name: name, value: value}).
|
|
155
|
+
appendTo(form);
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
// Add a hidden `X-Requested-With` field with the value `IFrame` to the
|
|
159
|
+
// field, to help server-side code to determine that the upload happened
|
|
160
|
+
// through this transport.
|
|
161
|
+
$("<input type='hidden' value='IFrame' name='X-Requested-With' />").
|
|
162
|
+
appendTo(form);
|
|
163
|
+
|
|
164
|
+
// Borrowed straight from the JQuery source.
|
|
165
|
+
// Provides a way of specifying the accepted data type similar to the
|
|
166
|
+
// HTTP "Accept" header
|
|
167
|
+
if (options.dataTypes[0] && options.accepts[options.dataTypes[0]]) {
|
|
168
|
+
accepts = options.accepts[options.dataTypes[0]] +
|
|
169
|
+
(options.dataTypes[0] !== "*" ? ", */*; q=0.01" : "");
|
|
170
|
+
} else {
|
|
171
|
+
accepts = options.accepts["*"];
|
|
172
|
+
}
|
|
173
|
+
$("<input type='hidden' name='X-HTTP-Accept'>").
|
|
174
|
+
attr("value", accepts).appendTo(form);
|
|
175
|
+
|
|
176
|
+
// Move the file fields into the hidden form, but first remember their
|
|
177
|
+
// original locations in the document by replacing them with disabled
|
|
178
|
+
// clones. This should also avoid introducing unwanted changes to the
|
|
179
|
+
// page layout during submission.
|
|
180
|
+
markers = files.after(function(idx) {
|
|
181
|
+
var $this = $(this),
|
|
182
|
+
$clone = $this.clone().prop("disabled", true);
|
|
183
|
+
$this.data("clone", $clone);
|
|
184
|
+
return $clone;
|
|
185
|
+
}).next();
|
|
186
|
+
files.appendTo(form);
|
|
187
|
+
|
|
188
|
+
return {
|
|
189
|
+
|
|
190
|
+
// The `send` function is called by jQuery when the request should be
|
|
191
|
+
// sent.
|
|
192
|
+
send: function(headers, completeCallback) {
|
|
193
|
+
iframe = $("<iframe src='about:blank' name='" + name +
|
|
194
|
+
"' id='" + name + "' style='display:none'></iframe>");
|
|
195
|
+
|
|
196
|
+
// The first load event gets fired after the iframe has been injected
|
|
197
|
+
// into the DOM, and is used to prepare the actual submission.
|
|
198
|
+
iframe.one("load", function() {
|
|
199
|
+
|
|
200
|
+
// The second load event gets fired when the response to the form
|
|
201
|
+
// submission is received. The implementation detects whether the
|
|
202
|
+
// actual payload is embedded in a `<textarea>` element, and
|
|
203
|
+
// prepares the required conversions to be made in that case.
|
|
204
|
+
iframe.one("load", function() {
|
|
205
|
+
var doc = this.contentWindow ? this.contentWindow.document :
|
|
206
|
+
(this.contentDocument ? this.contentDocument : this.document),
|
|
207
|
+
root = doc.documentElement ? doc.documentElement : doc.body,
|
|
208
|
+
textarea = root.getElementsByTagName("textarea")[0],
|
|
209
|
+
type = textarea && textarea.getAttribute("data-type") || null,
|
|
210
|
+
status = textarea && textarea.getAttribute("data-status") || 200,
|
|
211
|
+
statusText = textarea && textarea.getAttribute("data-statusText") || "OK",
|
|
212
|
+
content = {
|
|
213
|
+
html: root.innerHTML,
|
|
214
|
+
text: type ?
|
|
215
|
+
textarea.value :
|
|
216
|
+
root ? (root.textContent || root.innerText) : null
|
|
217
|
+
};
|
|
218
|
+
cleanUp();
|
|
219
|
+
completeCallback(status, statusText, content, type ?
|
|
220
|
+
("Content-Type: " + type) :
|
|
221
|
+
null);
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
// Now that the load handler has been set up, submit the form.
|
|
225
|
+
form[0].submit();
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
// After everything has been set up correctly, the form and iframe
|
|
229
|
+
// get injected into the DOM so that the submission can be
|
|
230
|
+
// initiated.
|
|
231
|
+
$("body").append(form, iframe);
|
|
232
|
+
},
|
|
233
|
+
|
|
234
|
+
// The `abort` function is called by jQuery when the request should be
|
|
235
|
+
// aborted.
|
|
236
|
+
abort: function() {
|
|
237
|
+
if (iframe !== null) {
|
|
238
|
+
iframe.unbind("load").attr("src", "about:blank");
|
|
239
|
+
cleanUp();
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
})(jQuery);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "jquery.iframe-transport",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "jQuery plugin that implements an iframe transport so that ajax calls support the uploading of files using standard HTML file input fields",
|
|
5
|
+
"main": "jquery.iframe-transport.js",
|
|
6
|
+
"directories": {
|
|
7
|
+
"demo": "demo"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "http://github.com/cmlenz/jquery-iframe-transport"
|
|
12
|
+
},
|
|
13
|
+
"author": "Christopher Lenz",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"readmeFilename": "README.md",
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"grunt": "~0.4.1",
|
|
18
|
+
"grunt-contrib-clean": "~0.5.0",
|
|
19
|
+
"grunt-contrib-connect": "~0.7.1",
|
|
20
|
+
"grunt-contrib-copy": "~0.5.0",
|
|
21
|
+
"grunt-contrib-jshint": "~0.9.2",
|
|
22
|
+
"grunt-contrib-uglify": "~0.4.0",
|
|
23
|
+
"grunt-docco": "~0.3.3",
|
|
24
|
+
"grunt-gh-pages": "~0.9.1",
|
|
25
|
+
"grunt-shell": "~0.6.4",
|
|
26
|
+
"multiparty": "~3.2.4"
|
|
27
|
+
}
|
|
28
|
+
}
|
data/vendor/jstz/dist/jstz.js
CHANGED
|
@@ -109,7 +109,7 @@ var jstz = (function () {
|
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
111
|
timezone = format.resolvedOptions().timeZone;
|
|
112
|
-
if (timezone && (timezone.indexOf("/") > -1 || timezone === 'UTC')) {
|
|
112
|
+
if (timezone && (timezone.indexOf("/") > -1 || timezone === 'UTC') && timezone.indexOf("Etc") != 0) {
|
|
113
113
|
return timezone;
|
|
114
114
|
}
|
|
115
115
|
},
|
|
@@ -394,6 +394,14 @@ var jstz = (function () {
|
|
|
394
394
|
return {
|
|
395
395
|
name: function () {
|
|
396
396
|
return preliminary_tz;
|
|
397
|
+
},
|
|
398
|
+
stdTimezoneOffset : function () {
|
|
399
|
+
// negative to match what (new Date).getTimezoneOffset() will return
|
|
400
|
+
return -lookup_key().split(',')[0];
|
|
401
|
+
},
|
|
402
|
+
timezoneOffset : function () {
|
|
403
|
+
// negative to match what (new Date).getTimezoneOffset() will return
|
|
404
|
+
return -get_date_offset(new Date())
|
|
397
405
|
}
|
|
398
406
|
};
|
|
399
407
|
};
|
data/vendor/jstz/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jstz",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "Timezone detection for JavaScript",
|
|
6
6
|
"scripts": {
|
|
7
|
+
"build": "gulp build",
|
|
8
|
+
"pretest": "npm run build",
|
|
7
9
|
"test": "./node_modules/.bin/mocha",
|
|
8
|
-
"bump:patch": "npm version patch -m \"v%s\"",
|
|
9
|
-
"bump:minor": "npm version minor -m \"v%s\"",
|
|
10
|
-
"bump:major": "npm version major -m \"v%s\"",
|
|
10
|
+
"bump:patch": "npm run build && npm version patch -m \"v%s\"",
|
|
11
|
+
"bump:minor": "npm run build && npm version minor -m \"v%s\"",
|
|
12
|
+
"bump:major": "npm run build && npm version major -m \"v%s\"",
|
|
11
13
|
"bump": "npm run bump:patch"
|
|
12
14
|
},
|
|
13
15
|
"author": {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015 Alexander Farkas
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|