ext_sprockets 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +114 -0
- data/.ruby-version +1 -0
- data/Gemfile +21 -0
- data/Gemfile.lock +77 -0
- data/MIT-LICENSE +20 -0
- data/README.md +3 -0
- data/bin/yarn +12 -0
- data/ext_sprockets.gemspec +22 -0
- data/lib/ext_sprockets.rb +5 -0
- data/lib/ext_sprockets/engine.rb +11 -0
- data/lib/ext_sprockets/version.rb +3 -0
- data/node_modules/.yarn-integrity +60 -0
- data/node_modules/bootswatch/cerulean/_bootswatch.scss +131 -0
- data/node_modules/bootswatch/cerulean/_variables.scss +870 -0
- data/node_modules/bootswatch/cosmo/_bootswatch.scss +262 -0
- data/node_modules/bootswatch/cosmo/_variables.scss +870 -0
- data/node_modules/bootswatch/cyborg/_bootswatch.scss +243 -0
- data/node_modules/bootswatch/cyborg/_variables.scss +870 -0
- data/node_modules/bootswatch/darkly/_bootswatch.scss +351 -0
- data/node_modules/bootswatch/darkly/_variables.scss +870 -0
- data/node_modules/bootswatch/flatly/_bootswatch.scss +330 -0
- data/node_modules/bootswatch/flatly/_variables.scss +870 -0
- data/node_modules/bootswatch/journal/_bootswatch.scss +145 -0
- data/node_modules/bootswatch/journal/_variables.scss +870 -0
- data/node_modules/bootswatch/lumen/_bootswatch.scss +523 -0
- data/node_modules/bootswatch/lumen/_variables.scss +870 -0
- data/node_modules/bootswatch/package.json +26 -0
- data/node_modules/bootswatch/paper/_bootswatch.scss +620 -0
- data/node_modules/bootswatch/paper/_variables.scss +870 -0
- data/node_modules/bootswatch/readable/_bootswatch.scss +183 -0
- data/node_modules/bootswatch/readable/_variables.scss +870 -0
- data/node_modules/bootswatch/sandstone/_bootswatch.scss +196 -0
- data/node_modules/bootswatch/sandstone/_variables.scss +870 -0
- data/node_modules/bootswatch/simplex/_bootswatch.scss +170 -0
- data/node_modules/bootswatch/simplex/_variables.scss +870 -0
- data/node_modules/bootswatch/slate/_bootswatch.scss +448 -0
- data/node_modules/bootswatch/slate/_variables.scss +870 -0
- data/node_modules/bootswatch/spacelab/_bootswatch.scss +142 -0
- data/node_modules/bootswatch/spacelab/_variables.scss +870 -0
- data/node_modules/bootswatch/superhero/_bootswatch.scss +360 -0
- data/node_modules/bootswatch/superhero/_variables.scss +870 -0
- data/node_modules/bootswatch/united/_bootswatch.scss +56 -0
- data/node_modules/bootswatch/united/_variables.scss +870 -0
- data/node_modules/bootswatch/yeti/_bootswatch.scss +445 -0
- data/node_modules/bootswatch/yeti/_variables.scss +870 -0
- data/node_modules/chart.js/dist/Chart.bundle.js +18608 -0
- data/node_modules/chart.js/dist/Chart.js +14145 -0
- data/node_modules/chart.js/package.json +54 -0
- data/node_modules/chartkick/chartkick.js +1866 -0
- data/node_modules/chartkick/package.json +25 -0
- data/node_modules/eonasdan-bootstrap-datetimepicker/package.json +51 -0
- data/node_modules/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js +2636 -0
- data/node_modules/eonasdan-bootstrap-datetimepicker/src/sass/_bootstrap-datetimepicker.scss +344 -0
- data/node_modules/eonasdan-bootstrap-datetimepicker/src/sass/bootstrap-datetimepicker-build.scss +16 -0
- data/node_modules/file-saver/FileSaver.js +188 -0
- data/node_modules/file-saver/package.json +28 -0
- data/node_modules/jquery-pjax/jquery.pjax.js +903 -0
- data/node_modules/jquery-pjax/package.json +18 -0
- data/node_modules/jquery-ui/package.json +74 -0
- data/node_modules/jquery-ui/themes/base/accordion.css +23 -0
- data/node_modules/jquery-ui/themes/base/all.css +12 -0
- data/node_modules/jquery-ui/themes/base/autocomplete.css +16 -0
- data/node_modules/jquery-ui/themes/base/base.css +30 -0
- data/node_modules/jquery-ui/themes/base/button.css +82 -0
- data/node_modules/jquery-ui/themes/base/checkboxradio.css +34 -0
- data/node_modules/jquery-ui/themes/base/controlgroup.css +65 -0
- data/node_modules/jquery-ui/themes/base/core.css +97 -0
- data/node_modules/jquery-ui/themes/base/datepicker.css +185 -0
- data/node_modules/jquery-ui/themes/base/dialog.css +101 -0
- data/node_modules/jquery-ui/themes/base/draggable.css +12 -0
- data/node_modules/jquery-ui/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/node_modules/jquery-ui/themes/base/images/ui-icons_444444_256x240.png +0 -0
- data/node_modules/jquery-ui/themes/base/images/ui-icons_555555_256x240.png +0 -0
- data/node_modules/jquery-ui/themes/base/images/ui-icons_777620_256x240.png +0 -0
- data/node_modules/jquery-ui/themes/base/images/ui-icons_777777_256x240.png +0 -0
- data/node_modules/jquery-ui/themes/base/images/ui-icons_cc0000_256x240.png +0 -0
- data/node_modules/jquery-ui/themes/base/images/ui-icons_ffffff_256x240.png +0 -0
- data/node_modules/jquery-ui/themes/base/menu.css +64 -0
- data/node_modules/jquery-ui/themes/base/progressbar.css +28 -0
- data/node_modules/jquery-ui/themes/base/resizable.css +78 -0
- data/node_modules/jquery-ui/themes/base/selectable.css +17 -0
- data/node_modules/jquery-ui/themes/base/selectmenu.css +50 -0
- data/node_modules/jquery-ui/themes/base/slider.css +75 -0
- data/node_modules/jquery-ui/themes/base/sortable.css +12 -0
- data/node_modules/jquery-ui/themes/base/spinner.css +52 -0
- data/node_modules/jquery-ui/themes/base/tabs.css +51 -0
- data/node_modules/jquery-ui/themes/base/theme.css +443 -0
- data/node_modules/jquery-ui/themes/base/tooltip.css +19 -0
- data/node_modules/jquery-ui/ui/core.js +21 -0
- data/node_modules/jquery-ui/ui/data.js +39 -0
- data/node_modules/jquery-ui/ui/disable-selection.js +46 -0
- data/node_modules/jquery-ui/ui/effect.js +1635 -0
- data/node_modules/jquery-ui/ui/effects/effect-blind.js +70 -0
- data/node_modules/jquery-ui/ui/effects/effect-bounce.js +110 -0
- data/node_modules/jquery-ui/ui/effects/effect-clip.js +65 -0
- data/node_modules/jquery-ui/ui/effects/effect-drop.js +69 -0
- data/node_modules/jquery-ui/ui/effects/effect-explode.js +111 -0
- data/node_modules/jquery-ui/ui/effects/effect-fade.js +47 -0
- data/node_modules/jquery-ui/ui/effects/effect-fold.js +89 -0
- data/node_modules/jquery-ui/ui/effects/effect-highlight.js +57 -0
- data/node_modules/jquery-ui/ui/effects/effect-puff.js +42 -0
- data/node_modules/jquery-ui/ui/effects/effect-pulsate.js +64 -0
- data/node_modules/jquery-ui/ui/effects/effect-scale.js +56 -0
- data/node_modules/jquery-ui/ui/effects/effect-shake.js +74 -0
- data/node_modules/jquery-ui/ui/effects/effect-size.js +191 -0
- data/node_modules/jquery-ui/ui/effects/effect-slide.js +76 -0
- data/node_modules/jquery-ui/ui/effects/effect-transfer.js +40 -0
- data/node_modules/jquery-ui/ui/escape-selector.js +21 -0
- data/node_modules/jquery-ui/ui/focusable.js +84 -0
- data/node_modules/jquery-ui/ui/form-reset-mixin.js +77 -0
- data/node_modules/jquery-ui/ui/form.js +20 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-af.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ar-DZ.js +39 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ar.js +39 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-az.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-be.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-bg.js +38 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-bs.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ca.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-cs.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-cy-GB.js +45 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-da.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-de.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-el.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-en-AU.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-en-GB.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-en-NZ.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-eo.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-es.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-et.js +45 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-eu.js +36 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-fa.js +73 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-fi.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-fo.js +45 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-fr-CA.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-fr-CH.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-fr.js +39 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-gl.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-he.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-hi.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-hr.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-hu.js +36 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-hy.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-id.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-is.js +45 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-it-CH.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-it.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ja.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ka.js +48 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-kk.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-km.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ko.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ky.js +38 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-lb.js +45 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-lt.js +45 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-lv.js +45 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-mk.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ml.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ms.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-nb.js +49 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-nl-BE.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-nl.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-nn.js +49 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-no.js +50 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-pl.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-pt-BR.js +45 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-pt.js +44 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-rm.js +61 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ro.js +40 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ru.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-sk.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-sl.js +38 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-sq.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-sr-SR.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-sr.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-sv.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ta.js +53 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-th.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-tj.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-tr.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-uk.js +38 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-vi.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-zh-CN.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-zh-HK.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-zh-TW.js +37 -0
- data/node_modules/jquery-ui/ui/ie.js +15 -0
- data/node_modules/jquery-ui/ui/jquery-1-7.js +89 -0
- data/node_modules/jquery-ui/ui/keycode.js +45 -0
- data/node_modules/jquery-ui/ui/labels.js +62 -0
- data/node_modules/jquery-ui/ui/plugin.js +44 -0
- data/node_modules/jquery-ui/ui/position.js +498 -0
- data/node_modules/jquery-ui/ui/safe-active-element.js +40 -0
- data/node_modules/jquery-ui/ui/safe-blur.js +21 -0
- data/node_modules/jquery-ui/ui/scroll-parent.js +45 -0
- data/node_modules/jquery-ui/ui/tabbable.js +35 -0
- data/node_modules/jquery-ui/ui/unique-id.js +49 -0
- data/node_modules/jquery-ui/ui/version.js +17 -0
- data/node_modules/jquery-ui/ui/widget.js +733 -0
- data/node_modules/jquery-ui/ui/widgets/accordion.js +613 -0
- data/node_modules/jquery-ui/ui/widgets/autocomplete.js +682 -0
- data/node_modules/jquery-ui/ui/widgets/button.js +386 -0
- data/node_modules/jquery-ui/ui/widgets/checkboxradio.js +286 -0
- data/node_modules/jquery-ui/ui/widgets/controlgroup.js +298 -0
- data/node_modules/jquery-ui/ui/widgets/datepicker.js +2120 -0
- data/node_modules/jquery-ui/ui/widgets/dialog.js +940 -0
- data/node_modules/jquery-ui/ui/widgets/draggable.js +1250 -0
- data/node_modules/jquery-ui/ui/widgets/droppable.js +497 -0
- data/node_modules/jquery-ui/ui/widgets/menu.js +673 -0
- data/node_modules/jquery-ui/ui/widgets/mouse.js +226 -0
- data/node_modules/jquery-ui/ui/widgets/progressbar.js +178 -0
- data/node_modules/jquery-ui/ui/widgets/resizable.js +1201 -0
- data/node_modules/jquery-ui/ui/widgets/selectable.js +310 -0
- data/node_modules/jquery-ui/ui/widgets/selectmenu.js +687 -0
- data/node_modules/jquery-ui/ui/widgets/slider.js +752 -0
- data/node_modules/jquery-ui/ui/widgets/sortable.js +1554 -0
- data/node_modules/jquery-ui/ui/widgets/spinner.js +575 -0
- data/node_modules/jquery-ui/ui/widgets/tabs.js +924 -0
- data/node_modules/jquery-ui/ui/widgets/tooltip.js +520 -0
- data/node_modules/jquery-ujs/package.json +26 -0
- data/node_modules/jquery-ujs/src/rails.js +555 -0
- data/node_modules/jquery/dist/jquery.js +10253 -0
- data/node_modules/jquery/dist/jquery.slim.js +8160 -0
- data/node_modules/jquery/package.json +97 -0
- data/node_modules/js-cookie/package.json +49 -0
- data/node_modules/js-cookie/src/js.cookie.js +165 -0
- data/node_modules/jstz/dist/jstz.js +1428 -0
- data/node_modules/jstz/package.json +57 -0
- data/node_modules/lodash/core.js +3836 -0
- data/node_modules/lodash/lodash.js +17084 -0
- data/node_modules/lodash/package.json +17 -0
- data/node_modules/moment-timezone/builds/moment-timezone-with-data-2012-2022.js +1204 -0
- data/node_modules/moment-timezone/builds/moment-timezone-with-data.js +1204 -0
- data/node_modules/moment-timezone/moment-timezone-utils.js +316 -0
- data/node_modules/moment-timezone/moment-timezone.js +605 -0
- data/node_modules/moment-timezone/package.json +50 -0
- data/node_modules/moment/locale/af.js +74 -0
- data/node_modules/moment/locale/ar-dz.js +60 -0
- data/node_modules/moment/locale/ar-kw.js +60 -0
- data/node_modules/moment/locale/ar-ly.js +127 -0
- data/node_modules/moment/locale/ar-ma.js +61 -0
- data/node_modules/moment/locale/ar-sa.js +106 -0
- data/node_modules/moment/locale/ar-tn.js +60 -0
- data/node_modules/moment/locale/ar.js +143 -0
- data/node_modules/moment/locale/az.js +106 -0
- data/node_modules/moment/locale/be.js +135 -0
- data/node_modules/moment/locale/bg.js +91 -0
- data/node_modules/moment/locale/bm.js +60 -0
- data/node_modules/moment/locale/bn.js +120 -0
- data/node_modules/moment/locale/bo.js +120 -0
- data/node_modules/moment/locale/br.js +109 -0
- data/node_modules/moment/locale/bs.js +153 -0
- data/node_modules/moment/locale/ca.js +89 -0
- data/node_modules/moment/locale/cs.js +180 -0
- data/node_modules/moment/locale/cv.js +64 -0
- data/node_modules/moment/locale/cy.js +82 -0
- data/node_modules/moment/locale/da.js +61 -0
- data/node_modules/moment/locale/de-at.js +80 -0
- data/node_modules/moment/locale/de-ch.js +79 -0
- data/node_modules/moment/locale/de.js +79 -0
- data/node_modules/moment/locale/dv.js +101 -0
- data/node_modules/moment/locale/el.js +101 -0
- data/node_modules/moment/locale/en-au.js +68 -0
- data/node_modules/moment/locale/en-ca.js +64 -0
- data/node_modules/moment/locale/en-gb.js +68 -0
- data/node_modules/moment/locale/en-ie.js +68 -0
- data/node_modules/moment/locale/en-nz.js +68 -0
- data/node_modules/moment/locale/eo.js +74 -0
- data/node_modules/moment/locale/es-do.js +92 -0
- data/node_modules/moment/locale/es-us.js +84 -0
- data/node_modules/moment/locale/es.js +93 -0
- data/node_modules/moment/locale/et.js +82 -0
- data/node_modules/moment/locale/eu.js +67 -0
- data/node_modules/moment/locale/fa.js +108 -0
- data/node_modules/moment/locale/fi.js +110 -0
- data/node_modules/moment/locale/fo.js +61 -0
- data/node_modules/moment/locale/fr-ca.js +75 -0
- data/node_modules/moment/locale/fr-ch.js +79 -0
- data/node_modules/moment/locale/fr.js +84 -0
- data/node_modules/moment/locale/fy.js +76 -0
- data/node_modules/moment/locale/gd.js +77 -0
- data/node_modules/moment/locale/gl.js +78 -0
- data/node_modules/moment/locale/gom-latn.js +124 -0
- data/node_modules/moment/locale/gu.js +125 -0
- data/node_modules/moment/locale/he.js +100 -0
- data/node_modules/moment/locale/hi.js +125 -0
- data/node_modules/moment/locale/hr.js +155 -0
- data/node_modules/moment/locale/hu.js +111 -0
- data/node_modules/moment/locale/hy-am.js +96 -0
- data/node_modules/moment/locale/id.js +84 -0
- data/node_modules/moment/locale/is.js +133 -0
- data/node_modules/moment/locale/it.js +71 -0
- data/node_modules/moment/locale/ja.js +81 -0
- data/node_modules/moment/locale/jv.js +84 -0
- data/node_modules/moment/locale/ka.js +90 -0
- data/node_modules/moment/locale/kk.js +88 -0
- data/node_modules/moment/locale/km.js +59 -0
- data/node_modules/moment/locale/kn.js +127 -0
- data/node_modules/moment/locale/ko.js +83 -0
- data/node_modules/moment/locale/ky.js +89 -0
- data/node_modules/moment/locale/lb.js +138 -0
- data/node_modules/moment/locale/lo.js +71 -0
- data/node_modules/moment/locale/lt.js +119 -0
- data/node_modules/moment/locale/lv.js +99 -0
- data/node_modules/moment/locale/me.js +113 -0
- data/node_modules/moment/locale/mi.js +65 -0
- data/node_modules/moment/locale/mk.js +91 -0
- data/node_modules/moment/locale/ml.js +82 -0
- data/node_modules/moment/locale/mr.js +162 -0
- data/node_modules/moment/locale/ms-my.js +84 -0
- data/node_modules/moment/locale/ms.js +83 -0
- data/node_modules/moment/locale/mt.js +61 -0
- data/node_modules/moment/locale/my.js +97 -0
- data/node_modules/moment/locale/nb.js +64 -0
- data/node_modules/moment/locale/ne.js +124 -0
- data/node_modules/moment/locale/nl-be.js +89 -0
- data/node_modules/moment/locale/nl.js +89 -0
- data/node_modules/moment/locale/nn.js +61 -0
- data/node_modules/moment/locale/pa-in.js +125 -0
- data/node_modules/moment/locale/pl.js +127 -0
- data/node_modules/moment/locale/pt-br.js +62 -0
- data/node_modules/moment/locale/pt.js +66 -0
- data/node_modules/moment/locale/ro.js +77 -0
- data/node_modules/moment/locale/ru.js +185 -0
- data/node_modules/moment/locale/sd.js +99 -0
- data/node_modules/moment/locale/se.js +62 -0
- data/node_modules/moment/locale/si.js +72 -0
- data/node_modules/moment/locale/sk.js +158 -0
- data/node_modules/moment/locale/sl.js +174 -0
- data/node_modules/moment/locale/sq.js +71 -0
- data/node_modules/moment/locale/sr-cyrl.js +112 -0
- data/node_modules/moment/locale/sr.js +112 -0
- data/node_modules/moment/locale/ss.js +90 -0
- data/node_modules/moment/locale/sv.js +70 -0
- data/node_modules/moment/locale/sw.js +60 -0
- data/node_modules/moment/locale/ta.js +131 -0
- data/node_modules/moment/locale/te.js +90 -0
- data/node_modules/moment/locale/tet.js +69 -0
- data/node_modules/moment/locale/th.js +68 -0
- data/node_modules/moment/locale/tl-ph.js +63 -0
- data/node_modules/moment/locale/tlh.js +123 -0
- data/node_modules/moment/locale/tr.js +91 -0
- data/node_modules/moment/locale/tzl.js +93 -0
- data/node_modules/moment/locale/tzm-latn.js +59 -0
- data/node_modules/moment/locale/tzm.js +59 -0
- data/node_modules/moment/locale/uk.js +153 -0
- data/node_modules/moment/locale/ur.js +100 -0
- data/node_modules/moment/locale/uz-latn.js +59 -0
- data/node_modules/moment/locale/uz.js +59 -0
- data/node_modules/moment/locale/vi.js +80 -0
- data/node_modules/moment/locale/x-pseudo.js +69 -0
- data/node_modules/moment/locale/yo.js +61 -0
- data/node_modules/moment/locale/zh-cn.js +112 -0
- data/node_modules/moment/locale/zh-hk.js +106 -0
- data/node_modules/moment/locale/zh-tw.js +105 -0
- data/node_modules/moment/min/locales.js +9769 -0
- data/node_modules/moment/min/moment-with-locales.js +14289 -0
- data/node_modules/moment/moment.js +4535 -0
- data/node_modules/moment/package.json +99 -0
- data/node_modules/nprogress/nprogress.css +74 -0
- data/node_modules/nprogress/nprogress.js +480 -0
- data/node_modules/nprogress/package.json +47 -0
- data/node_modules/nprogress/support/extras.css +4 -0
- data/node_modules/roboto-fontface/css/mixins.scss +36 -0
- data/node_modules/roboto-fontface/css/roboto-condensed/sass/roboto-condensed-fontface-bold-italic.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto-condensed/sass/roboto-condensed-fontface-bold.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto-condensed/sass/roboto-condensed-fontface-light-italic.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto-condensed/sass/roboto-condensed-fontface-light.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto-condensed/sass/roboto-condensed-fontface-regular-italic.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto-condensed/sass/roboto-condensed-fontface-regular.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto-condensed/sass/roboto-condensed-fontface.scss +6 -0
- data/node_modules/roboto-fontface/css/roboto-slab/sass/roboto-slab-fontface-bold.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto-slab/sass/roboto-slab-fontface-light.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto-slab/sass/roboto-slab-fontface-regular.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto-slab/sass/roboto-slab-fontface-thin.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto-slab/sass/roboto-slab-fontface.scss +4 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-black-italic.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-black.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-bold-italic.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-bold.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-light-italic.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-light.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-medium-italic.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-medium.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-regular-italic.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-regular.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-thin-italic.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-thin.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface.scss +12 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Bold.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Bold.svg +643 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Bold.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Bold.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Bold.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-BoldItalic.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-BoldItalic.svg +643 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-BoldItalic.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-BoldItalic.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-BoldItalic.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Light.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Light.svg +643 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Light.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Light.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Light.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-LightItalic.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-LightItalic.svg +643 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-LightItalic.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-LightItalic.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-LightItalic.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Regular.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Regular.svg +644 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Regular.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Regular.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Regular.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-RegularItalic.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-RegularItalic.svg +644 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-RegularItalic.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-RegularItalic.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-RegularItalic.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Bold.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Bold.svg +679 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Bold.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Bold.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Bold.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Light.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Light.svg +678 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Light.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Light.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Light.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Regular.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Regular.svg +678 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Regular.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Regular.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Regular.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Thin.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Thin.svg +678 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Thin.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Thin.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Thin.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Black.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Black.svg +10968 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Black.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Black.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Black.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-BlackItalic.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-BlackItalic.svg +11086 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-BlackItalic.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-BlackItalic.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-BlackItalic.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Bold.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Bold.svg +11010 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Bold.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Bold.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Bold.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-BoldItalic.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-BoldItalic.svg +11096 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-BoldItalic.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-BoldItalic.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-BoldItalic.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Light.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Light.svg +10564 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Light.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Light.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Light.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-LightItalic.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-LightItalic.svg +10646 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-LightItalic.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-LightItalic.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-LightItalic.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Medium.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Medium.svg +10999 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Medium.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Medium.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Medium.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-MediumItalic.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-MediumItalic.svg +11100 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-MediumItalic.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-MediumItalic.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-MediumItalic.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Regular.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Regular.svg +10520 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Regular.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Regular.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Regular.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-RegularItalic.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-RegularItalic.svg +10629 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-RegularItalic.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-RegularItalic.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-RegularItalic.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Thin.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Thin.svg +10617 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Thin.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Thin.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Thin.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-ThinItalic.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-ThinItalic.svg +10726 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-ThinItalic.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-ThinItalic.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-ThinItalic.woff2 +0 -0
- data/node_modules/roboto-fontface/package.json +28 -0
- data/node_modules/signature_pad/dist/signature_pad.js +610 -0
- data/node_modules/signature_pad/package.json +41 -0
- data/package.json +23 -0
- data/yarn.lock +118 -0
- metadata +575 -0
@@ -0,0 +1,310 @@
|
|
1
|
+
/*!
|
2
|
+
* jQuery UI Selectable 1.12.1
|
3
|
+
* http://jqueryui.com
|
4
|
+
*
|
5
|
+
* Copyright jQuery Foundation and other contributors
|
6
|
+
* Released under the MIT license.
|
7
|
+
* http://jquery.org/license
|
8
|
+
*/
|
9
|
+
|
10
|
+
//>>label: Selectable
|
11
|
+
//>>group: Interactions
|
12
|
+
//>>description: Allows groups of elements to be selected with the mouse.
|
13
|
+
//>>docs: http://api.jqueryui.com/selectable/
|
14
|
+
//>>demos: http://jqueryui.com/selectable/
|
15
|
+
//>>css.structure: ../../themes/base/selectable.css
|
16
|
+
|
17
|
+
( function( factory ) {
|
18
|
+
if ( typeof define === "function" && define.amd ) {
|
19
|
+
|
20
|
+
// AMD. Register as an anonymous module.
|
21
|
+
define( [
|
22
|
+
"jquery",
|
23
|
+
"./mouse",
|
24
|
+
"../version",
|
25
|
+
"../widget"
|
26
|
+
], factory );
|
27
|
+
} else {
|
28
|
+
|
29
|
+
// Browser globals
|
30
|
+
factory( jQuery );
|
31
|
+
}
|
32
|
+
}( function( $ ) {
|
33
|
+
|
34
|
+
return $.widget( "ui.selectable", $.ui.mouse, {
|
35
|
+
version: "1.12.1",
|
36
|
+
options: {
|
37
|
+
appendTo: "body",
|
38
|
+
autoRefresh: true,
|
39
|
+
distance: 0,
|
40
|
+
filter: "*",
|
41
|
+
tolerance: "touch",
|
42
|
+
|
43
|
+
// Callbacks
|
44
|
+
selected: null,
|
45
|
+
selecting: null,
|
46
|
+
start: null,
|
47
|
+
stop: null,
|
48
|
+
unselected: null,
|
49
|
+
unselecting: null
|
50
|
+
},
|
51
|
+
_create: function() {
|
52
|
+
var that = this;
|
53
|
+
|
54
|
+
this._addClass( "ui-selectable" );
|
55
|
+
|
56
|
+
this.dragged = false;
|
57
|
+
|
58
|
+
// Cache selectee children based on filter
|
59
|
+
this.refresh = function() {
|
60
|
+
that.elementPos = $( that.element[ 0 ] ).offset();
|
61
|
+
that.selectees = $( that.options.filter, that.element[ 0 ] );
|
62
|
+
that._addClass( that.selectees, "ui-selectee" );
|
63
|
+
that.selectees.each( function() {
|
64
|
+
var $this = $( this ),
|
65
|
+
selecteeOffset = $this.offset(),
|
66
|
+
pos = {
|
67
|
+
left: selecteeOffset.left - that.elementPos.left,
|
68
|
+
top: selecteeOffset.top - that.elementPos.top
|
69
|
+
};
|
70
|
+
$.data( this, "selectable-item", {
|
71
|
+
element: this,
|
72
|
+
$element: $this,
|
73
|
+
left: pos.left,
|
74
|
+
top: pos.top,
|
75
|
+
right: pos.left + $this.outerWidth(),
|
76
|
+
bottom: pos.top + $this.outerHeight(),
|
77
|
+
startselected: false,
|
78
|
+
selected: $this.hasClass( "ui-selected" ),
|
79
|
+
selecting: $this.hasClass( "ui-selecting" ),
|
80
|
+
unselecting: $this.hasClass( "ui-unselecting" )
|
81
|
+
} );
|
82
|
+
} );
|
83
|
+
};
|
84
|
+
this.refresh();
|
85
|
+
|
86
|
+
this._mouseInit();
|
87
|
+
|
88
|
+
this.helper = $( "<div>" );
|
89
|
+
this._addClass( this.helper, "ui-selectable-helper" );
|
90
|
+
},
|
91
|
+
|
92
|
+
_destroy: function() {
|
93
|
+
this.selectees.removeData( "selectable-item" );
|
94
|
+
this._mouseDestroy();
|
95
|
+
},
|
96
|
+
|
97
|
+
_mouseStart: function( event ) {
|
98
|
+
var that = this,
|
99
|
+
options = this.options;
|
100
|
+
|
101
|
+
this.opos = [ event.pageX, event.pageY ];
|
102
|
+
this.elementPos = $( this.element[ 0 ] ).offset();
|
103
|
+
|
104
|
+
if ( this.options.disabled ) {
|
105
|
+
return;
|
106
|
+
}
|
107
|
+
|
108
|
+
this.selectees = $( options.filter, this.element[ 0 ] );
|
109
|
+
|
110
|
+
this._trigger( "start", event );
|
111
|
+
|
112
|
+
$( options.appendTo ).append( this.helper );
|
113
|
+
|
114
|
+
// position helper (lasso)
|
115
|
+
this.helper.css( {
|
116
|
+
"left": event.pageX,
|
117
|
+
"top": event.pageY,
|
118
|
+
"width": 0,
|
119
|
+
"height": 0
|
120
|
+
} );
|
121
|
+
|
122
|
+
if ( options.autoRefresh ) {
|
123
|
+
this.refresh();
|
124
|
+
}
|
125
|
+
|
126
|
+
this.selectees.filter( ".ui-selected" ).each( function() {
|
127
|
+
var selectee = $.data( this, "selectable-item" );
|
128
|
+
selectee.startselected = true;
|
129
|
+
if ( !event.metaKey && !event.ctrlKey ) {
|
130
|
+
that._removeClass( selectee.$element, "ui-selected" );
|
131
|
+
selectee.selected = false;
|
132
|
+
that._addClass( selectee.$element, "ui-unselecting" );
|
133
|
+
selectee.unselecting = true;
|
134
|
+
|
135
|
+
// selectable UNSELECTING callback
|
136
|
+
that._trigger( "unselecting", event, {
|
137
|
+
unselecting: selectee.element
|
138
|
+
} );
|
139
|
+
}
|
140
|
+
} );
|
141
|
+
|
142
|
+
$( event.target ).parents().addBack().each( function() {
|
143
|
+
var doSelect,
|
144
|
+
selectee = $.data( this, "selectable-item" );
|
145
|
+
if ( selectee ) {
|
146
|
+
doSelect = ( !event.metaKey && !event.ctrlKey ) ||
|
147
|
+
!selectee.$element.hasClass( "ui-selected" );
|
148
|
+
that._removeClass( selectee.$element, doSelect ? "ui-unselecting" : "ui-selected" )
|
149
|
+
._addClass( selectee.$element, doSelect ? "ui-selecting" : "ui-unselecting" );
|
150
|
+
selectee.unselecting = !doSelect;
|
151
|
+
selectee.selecting = doSelect;
|
152
|
+
selectee.selected = doSelect;
|
153
|
+
|
154
|
+
// selectable (UN)SELECTING callback
|
155
|
+
if ( doSelect ) {
|
156
|
+
that._trigger( "selecting", event, {
|
157
|
+
selecting: selectee.element
|
158
|
+
} );
|
159
|
+
} else {
|
160
|
+
that._trigger( "unselecting", event, {
|
161
|
+
unselecting: selectee.element
|
162
|
+
} );
|
163
|
+
}
|
164
|
+
return false;
|
165
|
+
}
|
166
|
+
} );
|
167
|
+
|
168
|
+
},
|
169
|
+
|
170
|
+
_mouseDrag: function( event ) {
|
171
|
+
|
172
|
+
this.dragged = true;
|
173
|
+
|
174
|
+
if ( this.options.disabled ) {
|
175
|
+
return;
|
176
|
+
}
|
177
|
+
|
178
|
+
var tmp,
|
179
|
+
that = this,
|
180
|
+
options = this.options,
|
181
|
+
x1 = this.opos[ 0 ],
|
182
|
+
y1 = this.opos[ 1 ],
|
183
|
+
x2 = event.pageX,
|
184
|
+
y2 = event.pageY;
|
185
|
+
|
186
|
+
if ( x1 > x2 ) { tmp = x2; x2 = x1; x1 = tmp; }
|
187
|
+
if ( y1 > y2 ) { tmp = y2; y2 = y1; y1 = tmp; }
|
188
|
+
this.helper.css( { left: x1, top: y1, width: x2 - x1, height: y2 - y1 } );
|
189
|
+
|
190
|
+
this.selectees.each( function() {
|
191
|
+
var selectee = $.data( this, "selectable-item" ),
|
192
|
+
hit = false,
|
193
|
+
offset = {};
|
194
|
+
|
195
|
+
//prevent helper from being selected if appendTo: selectable
|
196
|
+
if ( !selectee || selectee.element === that.element[ 0 ] ) {
|
197
|
+
return;
|
198
|
+
}
|
199
|
+
|
200
|
+
offset.left = selectee.left + that.elementPos.left;
|
201
|
+
offset.right = selectee.right + that.elementPos.left;
|
202
|
+
offset.top = selectee.top + that.elementPos.top;
|
203
|
+
offset.bottom = selectee.bottom + that.elementPos.top;
|
204
|
+
|
205
|
+
if ( options.tolerance === "touch" ) {
|
206
|
+
hit = ( !( offset.left > x2 || offset.right < x1 || offset.top > y2 ||
|
207
|
+
offset.bottom < y1 ) );
|
208
|
+
} else if ( options.tolerance === "fit" ) {
|
209
|
+
hit = ( offset.left > x1 && offset.right < x2 && offset.top > y1 &&
|
210
|
+
offset.bottom < y2 );
|
211
|
+
}
|
212
|
+
|
213
|
+
if ( hit ) {
|
214
|
+
|
215
|
+
// SELECT
|
216
|
+
if ( selectee.selected ) {
|
217
|
+
that._removeClass( selectee.$element, "ui-selected" );
|
218
|
+
selectee.selected = false;
|
219
|
+
}
|
220
|
+
if ( selectee.unselecting ) {
|
221
|
+
that._removeClass( selectee.$element, "ui-unselecting" );
|
222
|
+
selectee.unselecting = false;
|
223
|
+
}
|
224
|
+
if ( !selectee.selecting ) {
|
225
|
+
that._addClass( selectee.$element, "ui-selecting" );
|
226
|
+
selectee.selecting = true;
|
227
|
+
|
228
|
+
// selectable SELECTING callback
|
229
|
+
that._trigger( "selecting", event, {
|
230
|
+
selecting: selectee.element
|
231
|
+
} );
|
232
|
+
}
|
233
|
+
} else {
|
234
|
+
|
235
|
+
// UNSELECT
|
236
|
+
if ( selectee.selecting ) {
|
237
|
+
if ( ( event.metaKey || event.ctrlKey ) && selectee.startselected ) {
|
238
|
+
that._removeClass( selectee.$element, "ui-selecting" );
|
239
|
+
selectee.selecting = false;
|
240
|
+
that._addClass( selectee.$element, "ui-selected" );
|
241
|
+
selectee.selected = true;
|
242
|
+
} else {
|
243
|
+
that._removeClass( selectee.$element, "ui-selecting" );
|
244
|
+
selectee.selecting = false;
|
245
|
+
if ( selectee.startselected ) {
|
246
|
+
that._addClass( selectee.$element, "ui-unselecting" );
|
247
|
+
selectee.unselecting = true;
|
248
|
+
}
|
249
|
+
|
250
|
+
// selectable UNSELECTING callback
|
251
|
+
that._trigger( "unselecting", event, {
|
252
|
+
unselecting: selectee.element
|
253
|
+
} );
|
254
|
+
}
|
255
|
+
}
|
256
|
+
if ( selectee.selected ) {
|
257
|
+
if ( !event.metaKey && !event.ctrlKey && !selectee.startselected ) {
|
258
|
+
that._removeClass( selectee.$element, "ui-selected" );
|
259
|
+
selectee.selected = false;
|
260
|
+
|
261
|
+
that._addClass( selectee.$element, "ui-unselecting" );
|
262
|
+
selectee.unselecting = true;
|
263
|
+
|
264
|
+
// selectable UNSELECTING callback
|
265
|
+
that._trigger( "unselecting", event, {
|
266
|
+
unselecting: selectee.element
|
267
|
+
} );
|
268
|
+
}
|
269
|
+
}
|
270
|
+
}
|
271
|
+
} );
|
272
|
+
|
273
|
+
return false;
|
274
|
+
},
|
275
|
+
|
276
|
+
_mouseStop: function( event ) {
|
277
|
+
var that = this;
|
278
|
+
|
279
|
+
this.dragged = false;
|
280
|
+
|
281
|
+
$( ".ui-unselecting", this.element[ 0 ] ).each( function() {
|
282
|
+
var selectee = $.data( this, "selectable-item" );
|
283
|
+
that._removeClass( selectee.$element, "ui-unselecting" );
|
284
|
+
selectee.unselecting = false;
|
285
|
+
selectee.startselected = false;
|
286
|
+
that._trigger( "unselected", event, {
|
287
|
+
unselected: selectee.element
|
288
|
+
} );
|
289
|
+
} );
|
290
|
+
$( ".ui-selecting", this.element[ 0 ] ).each( function() {
|
291
|
+
var selectee = $.data( this, "selectable-item" );
|
292
|
+
that._removeClass( selectee.$element, "ui-selecting" )
|
293
|
+
._addClass( selectee.$element, "ui-selected" );
|
294
|
+
selectee.selecting = false;
|
295
|
+
selectee.selected = true;
|
296
|
+
selectee.startselected = true;
|
297
|
+
that._trigger( "selected", event, {
|
298
|
+
selected: selectee.element
|
299
|
+
} );
|
300
|
+
} );
|
301
|
+
this._trigger( "stop", event );
|
302
|
+
|
303
|
+
this.helper.remove();
|
304
|
+
|
305
|
+
return false;
|
306
|
+
}
|
307
|
+
|
308
|
+
} );
|
309
|
+
|
310
|
+
} ) );
|
@@ -0,0 +1,687 @@
|
|
1
|
+
/*!
|
2
|
+
* jQuery UI Selectmenu 1.12.1
|
3
|
+
* http://jqueryui.com
|
4
|
+
*
|
5
|
+
* Copyright jQuery Foundation and other contributors
|
6
|
+
* Released under the MIT license.
|
7
|
+
* http://jquery.org/license
|
8
|
+
*/
|
9
|
+
|
10
|
+
//>>label: Selectmenu
|
11
|
+
//>>group: Widgets
|
12
|
+
// jscs:disable maximumLineLength
|
13
|
+
//>>description: Duplicates and extends the functionality of a native HTML select element, allowing it to be customizable in behavior and appearance far beyond the limitations of a native select.
|
14
|
+
// jscs:enable maximumLineLength
|
15
|
+
//>>docs: http://api.jqueryui.com/selectmenu/
|
16
|
+
//>>demos: http://jqueryui.com/selectmenu/
|
17
|
+
//>>css.structure: ../../themes/base/core.css
|
18
|
+
//>>css.structure: ../../themes/base/selectmenu.css, ../../themes/base/button.css
|
19
|
+
//>>css.theme: ../../themes/base/theme.css
|
20
|
+
|
21
|
+
( function( factory ) {
|
22
|
+
if ( typeof define === "function" && define.amd ) {
|
23
|
+
|
24
|
+
// AMD. Register as an anonymous module.
|
25
|
+
define( [
|
26
|
+
"jquery",
|
27
|
+
"./menu",
|
28
|
+
"../escape-selector",
|
29
|
+
"../form-reset-mixin",
|
30
|
+
"../keycode",
|
31
|
+
"../labels",
|
32
|
+
"../position",
|
33
|
+
"../unique-id",
|
34
|
+
"../version",
|
35
|
+
"../widget"
|
36
|
+
], factory );
|
37
|
+
} else {
|
38
|
+
|
39
|
+
// Browser globals
|
40
|
+
factory( jQuery );
|
41
|
+
}
|
42
|
+
}( function( $ ) {
|
43
|
+
|
44
|
+
return $.widget( "ui.selectmenu", [ $.ui.formResetMixin, {
|
45
|
+
version: "1.12.1",
|
46
|
+
defaultElement: "<select>",
|
47
|
+
options: {
|
48
|
+
appendTo: null,
|
49
|
+
classes: {
|
50
|
+
"ui-selectmenu-button-open": "ui-corner-top",
|
51
|
+
"ui-selectmenu-button-closed": "ui-corner-all"
|
52
|
+
},
|
53
|
+
disabled: null,
|
54
|
+
icons: {
|
55
|
+
button: "ui-icon-triangle-1-s"
|
56
|
+
},
|
57
|
+
position: {
|
58
|
+
my: "left top",
|
59
|
+
at: "left bottom",
|
60
|
+
collision: "none"
|
61
|
+
},
|
62
|
+
width: false,
|
63
|
+
|
64
|
+
// Callbacks
|
65
|
+
change: null,
|
66
|
+
close: null,
|
67
|
+
focus: null,
|
68
|
+
open: null,
|
69
|
+
select: null
|
70
|
+
},
|
71
|
+
|
72
|
+
_create: function() {
|
73
|
+
var selectmenuId = this.element.uniqueId().attr( "id" );
|
74
|
+
this.ids = {
|
75
|
+
element: selectmenuId,
|
76
|
+
button: selectmenuId + "-button",
|
77
|
+
menu: selectmenuId + "-menu"
|
78
|
+
};
|
79
|
+
|
80
|
+
this._drawButton();
|
81
|
+
this._drawMenu();
|
82
|
+
this._bindFormResetHandler();
|
83
|
+
|
84
|
+
this._rendered = false;
|
85
|
+
this.menuItems = $();
|
86
|
+
},
|
87
|
+
|
88
|
+
_drawButton: function() {
|
89
|
+
var icon,
|
90
|
+
that = this,
|
91
|
+
item = this._parseOption(
|
92
|
+
this.element.find( "option:selected" ),
|
93
|
+
this.element[ 0 ].selectedIndex
|
94
|
+
);
|
95
|
+
|
96
|
+
// Associate existing label with the new button
|
97
|
+
this.labels = this.element.labels().attr( "for", this.ids.button );
|
98
|
+
this._on( this.labels, {
|
99
|
+
click: function( event ) {
|
100
|
+
this.button.focus();
|
101
|
+
event.preventDefault();
|
102
|
+
}
|
103
|
+
} );
|
104
|
+
|
105
|
+
// Hide original select element
|
106
|
+
this.element.hide();
|
107
|
+
|
108
|
+
// Create button
|
109
|
+
this.button = $( "<span>", {
|
110
|
+
tabindex: this.options.disabled ? -1 : 0,
|
111
|
+
id: this.ids.button,
|
112
|
+
role: "combobox",
|
113
|
+
"aria-expanded": "false",
|
114
|
+
"aria-autocomplete": "list",
|
115
|
+
"aria-owns": this.ids.menu,
|
116
|
+
"aria-haspopup": "true",
|
117
|
+
title: this.element.attr( "title" )
|
118
|
+
} )
|
119
|
+
.insertAfter( this.element );
|
120
|
+
|
121
|
+
this._addClass( this.button, "ui-selectmenu-button ui-selectmenu-button-closed",
|
122
|
+
"ui-button ui-widget" );
|
123
|
+
|
124
|
+
icon = $( "<span>" ).appendTo( this.button );
|
125
|
+
this._addClass( icon, "ui-selectmenu-icon", "ui-icon " + this.options.icons.button );
|
126
|
+
this.buttonItem = this._renderButtonItem( item )
|
127
|
+
.appendTo( this.button );
|
128
|
+
|
129
|
+
if ( this.options.width !== false ) {
|
130
|
+
this._resizeButton();
|
131
|
+
}
|
132
|
+
|
133
|
+
this._on( this.button, this._buttonEvents );
|
134
|
+
this.button.one( "focusin", function() {
|
135
|
+
|
136
|
+
// Delay rendering the menu items until the button receives focus.
|
137
|
+
// The menu may have already been rendered via a programmatic open.
|
138
|
+
if ( !that._rendered ) {
|
139
|
+
that._refreshMenu();
|
140
|
+
}
|
141
|
+
} );
|
142
|
+
},
|
143
|
+
|
144
|
+
_drawMenu: function() {
|
145
|
+
var that = this;
|
146
|
+
|
147
|
+
// Create menu
|
148
|
+
this.menu = $( "<ul>", {
|
149
|
+
"aria-hidden": "true",
|
150
|
+
"aria-labelledby": this.ids.button,
|
151
|
+
id: this.ids.menu
|
152
|
+
} );
|
153
|
+
|
154
|
+
// Wrap menu
|
155
|
+
this.menuWrap = $( "<div>" ).append( this.menu );
|
156
|
+
this._addClass( this.menuWrap, "ui-selectmenu-menu", "ui-front" );
|
157
|
+
this.menuWrap.appendTo( this._appendTo() );
|
158
|
+
|
159
|
+
// Initialize menu widget
|
160
|
+
this.menuInstance = this.menu
|
161
|
+
.menu( {
|
162
|
+
classes: {
|
163
|
+
"ui-menu": "ui-corner-bottom"
|
164
|
+
},
|
165
|
+
role: "listbox",
|
166
|
+
select: function( event, ui ) {
|
167
|
+
event.preventDefault();
|
168
|
+
|
169
|
+
// Support: IE8
|
170
|
+
// If the item was selected via a click, the text selection
|
171
|
+
// will be destroyed in IE
|
172
|
+
that._setSelection();
|
173
|
+
|
174
|
+
that._select( ui.item.data( "ui-selectmenu-item" ), event );
|
175
|
+
},
|
176
|
+
focus: function( event, ui ) {
|
177
|
+
var item = ui.item.data( "ui-selectmenu-item" );
|
178
|
+
|
179
|
+
// Prevent inital focus from firing and check if its a newly focused item
|
180
|
+
if ( that.focusIndex != null && item.index !== that.focusIndex ) {
|
181
|
+
that._trigger( "focus", event, { item: item } );
|
182
|
+
if ( !that.isOpen ) {
|
183
|
+
that._select( item, event );
|
184
|
+
}
|
185
|
+
}
|
186
|
+
that.focusIndex = item.index;
|
187
|
+
|
188
|
+
that.button.attr( "aria-activedescendant",
|
189
|
+
that.menuItems.eq( item.index ).attr( "id" ) );
|
190
|
+
}
|
191
|
+
} )
|
192
|
+
.menu( "instance" );
|
193
|
+
|
194
|
+
// Don't close the menu on mouseleave
|
195
|
+
this.menuInstance._off( this.menu, "mouseleave" );
|
196
|
+
|
197
|
+
// Cancel the menu's collapseAll on document click
|
198
|
+
this.menuInstance._closeOnDocumentClick = function() {
|
199
|
+
return false;
|
200
|
+
};
|
201
|
+
|
202
|
+
// Selects often contain empty items, but never contain dividers
|
203
|
+
this.menuInstance._isDivider = function() {
|
204
|
+
return false;
|
205
|
+
};
|
206
|
+
},
|
207
|
+
|
208
|
+
refresh: function() {
|
209
|
+
this._refreshMenu();
|
210
|
+
this.buttonItem.replaceWith(
|
211
|
+
this.buttonItem = this._renderButtonItem(
|
212
|
+
|
213
|
+
// Fall back to an empty object in case there are no options
|
214
|
+
this._getSelectedItem().data( "ui-selectmenu-item" ) || {}
|
215
|
+
)
|
216
|
+
);
|
217
|
+
if ( this.options.width === null ) {
|
218
|
+
this._resizeButton();
|
219
|
+
}
|
220
|
+
},
|
221
|
+
|
222
|
+
_refreshMenu: function() {
|
223
|
+
var item,
|
224
|
+
options = this.element.find( "option" );
|
225
|
+
|
226
|
+
this.menu.empty();
|
227
|
+
|
228
|
+
this._parseOptions( options );
|
229
|
+
this._renderMenu( this.menu, this.items );
|
230
|
+
|
231
|
+
this.menuInstance.refresh();
|
232
|
+
this.menuItems = this.menu.find( "li" )
|
233
|
+
.not( ".ui-selectmenu-optgroup" )
|
234
|
+
.find( ".ui-menu-item-wrapper" );
|
235
|
+
|
236
|
+
this._rendered = true;
|
237
|
+
|
238
|
+
if ( !options.length ) {
|
239
|
+
return;
|
240
|
+
}
|
241
|
+
|
242
|
+
item = this._getSelectedItem();
|
243
|
+
|
244
|
+
// Update the menu to have the correct item focused
|
245
|
+
this.menuInstance.focus( null, item );
|
246
|
+
this._setAria( item.data( "ui-selectmenu-item" ) );
|
247
|
+
|
248
|
+
// Set disabled state
|
249
|
+
this._setOption( "disabled", this.element.prop( "disabled" ) );
|
250
|
+
},
|
251
|
+
|
252
|
+
open: function( event ) {
|
253
|
+
if ( this.options.disabled ) {
|
254
|
+
return;
|
255
|
+
}
|
256
|
+
|
257
|
+
// If this is the first time the menu is being opened, render the items
|
258
|
+
if ( !this._rendered ) {
|
259
|
+
this._refreshMenu();
|
260
|
+
} else {
|
261
|
+
|
262
|
+
// Menu clears focus on close, reset focus to selected item
|
263
|
+
this._removeClass( this.menu.find( ".ui-state-active" ), null, "ui-state-active" );
|
264
|
+
this.menuInstance.focus( null, this._getSelectedItem() );
|
265
|
+
}
|
266
|
+
|
267
|
+
// If there are no options, don't open the menu
|
268
|
+
if ( !this.menuItems.length ) {
|
269
|
+
return;
|
270
|
+
}
|
271
|
+
|
272
|
+
this.isOpen = true;
|
273
|
+
this._toggleAttr();
|
274
|
+
this._resizeMenu();
|
275
|
+
this._position();
|
276
|
+
|
277
|
+
this._on( this.document, this._documentClick );
|
278
|
+
|
279
|
+
this._trigger( "open", event );
|
280
|
+
},
|
281
|
+
|
282
|
+
_position: function() {
|
283
|
+
this.menuWrap.position( $.extend( { of: this.button }, this.options.position ) );
|
284
|
+
},
|
285
|
+
|
286
|
+
close: function( event ) {
|
287
|
+
if ( !this.isOpen ) {
|
288
|
+
return;
|
289
|
+
}
|
290
|
+
|
291
|
+
this.isOpen = false;
|
292
|
+
this._toggleAttr();
|
293
|
+
|
294
|
+
this.range = null;
|
295
|
+
this._off( this.document );
|
296
|
+
|
297
|
+
this._trigger( "close", event );
|
298
|
+
},
|
299
|
+
|
300
|
+
widget: function() {
|
301
|
+
return this.button;
|
302
|
+
},
|
303
|
+
|
304
|
+
menuWidget: function() {
|
305
|
+
return this.menu;
|
306
|
+
},
|
307
|
+
|
308
|
+
_renderButtonItem: function( item ) {
|
309
|
+
var buttonItem = $( "<span>" );
|
310
|
+
|
311
|
+
this._setText( buttonItem, item.label );
|
312
|
+
this._addClass( buttonItem, "ui-selectmenu-text" );
|
313
|
+
|
314
|
+
return buttonItem;
|
315
|
+
},
|
316
|
+
|
317
|
+
_renderMenu: function( ul, items ) {
|
318
|
+
var that = this,
|
319
|
+
currentOptgroup = "";
|
320
|
+
|
321
|
+
$.each( items, function( index, item ) {
|
322
|
+
var li;
|
323
|
+
|
324
|
+
if ( item.optgroup !== currentOptgroup ) {
|
325
|
+
li = $( "<li>", {
|
326
|
+
text: item.optgroup
|
327
|
+
} );
|
328
|
+
that._addClass( li, "ui-selectmenu-optgroup", "ui-menu-divider" +
|
329
|
+
( item.element.parent( "optgroup" ).prop( "disabled" ) ?
|
330
|
+
" ui-state-disabled" :
|
331
|
+
"" ) );
|
332
|
+
|
333
|
+
li.appendTo( ul );
|
334
|
+
|
335
|
+
currentOptgroup = item.optgroup;
|
336
|
+
}
|
337
|
+
|
338
|
+
that._renderItemData( ul, item );
|
339
|
+
} );
|
340
|
+
},
|
341
|
+
|
342
|
+
_renderItemData: function( ul, item ) {
|
343
|
+
return this._renderItem( ul, item ).data( "ui-selectmenu-item", item );
|
344
|
+
},
|
345
|
+
|
346
|
+
_renderItem: function( ul, item ) {
|
347
|
+
var li = $( "<li>" ),
|
348
|
+
wrapper = $( "<div>", {
|
349
|
+
title: item.element.attr( "title" )
|
350
|
+
} );
|
351
|
+
|
352
|
+
if ( item.disabled ) {
|
353
|
+
this._addClass( li, null, "ui-state-disabled" );
|
354
|
+
}
|
355
|
+
this._setText( wrapper, item.label );
|
356
|
+
|
357
|
+
return li.append( wrapper ).appendTo( ul );
|
358
|
+
},
|
359
|
+
|
360
|
+
_setText: function( element, value ) {
|
361
|
+
if ( value ) {
|
362
|
+
element.text( value );
|
363
|
+
} else {
|
364
|
+
element.html( " " );
|
365
|
+
}
|
366
|
+
},
|
367
|
+
|
368
|
+
_move: function( direction, event ) {
|
369
|
+
var item, next,
|
370
|
+
filter = ".ui-menu-item";
|
371
|
+
|
372
|
+
if ( this.isOpen ) {
|
373
|
+
item = this.menuItems.eq( this.focusIndex ).parent( "li" );
|
374
|
+
} else {
|
375
|
+
item = this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" );
|
376
|
+
filter += ":not(.ui-state-disabled)";
|
377
|
+
}
|
378
|
+
|
379
|
+
if ( direction === "first" || direction === "last" ) {
|
380
|
+
next = item[ direction === "first" ? "prevAll" : "nextAll" ]( filter ).eq( -1 );
|
381
|
+
} else {
|
382
|
+
next = item[ direction + "All" ]( filter ).eq( 0 );
|
383
|
+
}
|
384
|
+
|
385
|
+
if ( next.length ) {
|
386
|
+
this.menuInstance.focus( event, next );
|
387
|
+
}
|
388
|
+
},
|
389
|
+
|
390
|
+
_getSelectedItem: function() {
|
391
|
+
return this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" );
|
392
|
+
},
|
393
|
+
|
394
|
+
_toggle: function( event ) {
|
395
|
+
this[ this.isOpen ? "close" : "open" ]( event );
|
396
|
+
},
|
397
|
+
|
398
|
+
_setSelection: function() {
|
399
|
+
var selection;
|
400
|
+
|
401
|
+
if ( !this.range ) {
|
402
|
+
return;
|
403
|
+
}
|
404
|
+
|
405
|
+
if ( window.getSelection ) {
|
406
|
+
selection = window.getSelection();
|
407
|
+
selection.removeAllRanges();
|
408
|
+
selection.addRange( this.range );
|
409
|
+
|
410
|
+
// Support: IE8
|
411
|
+
} else {
|
412
|
+
this.range.select();
|
413
|
+
}
|
414
|
+
|
415
|
+
// Support: IE
|
416
|
+
// Setting the text selection kills the button focus in IE, but
|
417
|
+
// restoring the focus doesn't kill the selection.
|
418
|
+
this.button.focus();
|
419
|
+
},
|
420
|
+
|
421
|
+
_documentClick: {
|
422
|
+
mousedown: function( event ) {
|
423
|
+
if ( !this.isOpen ) {
|
424
|
+
return;
|
425
|
+
}
|
426
|
+
|
427
|
+
if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" +
|
428
|
+
$.ui.escapeSelector( this.ids.button ) ).length ) {
|
429
|
+
this.close( event );
|
430
|
+
}
|
431
|
+
}
|
432
|
+
},
|
433
|
+
|
434
|
+
_buttonEvents: {
|
435
|
+
|
436
|
+
// Prevent text selection from being reset when interacting with the selectmenu (#10144)
|
437
|
+
mousedown: function() {
|
438
|
+
var selection;
|
439
|
+
|
440
|
+
if ( window.getSelection ) {
|
441
|
+
selection = window.getSelection();
|
442
|
+
if ( selection.rangeCount ) {
|
443
|
+
this.range = selection.getRangeAt( 0 );
|
444
|
+
}
|
445
|
+
|
446
|
+
// Support: IE8
|
447
|
+
} else {
|
448
|
+
this.range = document.selection.createRange();
|
449
|
+
}
|
450
|
+
},
|
451
|
+
|
452
|
+
click: function( event ) {
|
453
|
+
this._setSelection();
|
454
|
+
this._toggle( event );
|
455
|
+
},
|
456
|
+
|
457
|
+
keydown: function( event ) {
|
458
|
+
var preventDefault = true;
|
459
|
+
switch ( event.keyCode ) {
|
460
|
+
case $.ui.keyCode.TAB:
|
461
|
+
case $.ui.keyCode.ESCAPE:
|
462
|
+
this.close( event );
|
463
|
+
preventDefault = false;
|
464
|
+
break;
|
465
|
+
case $.ui.keyCode.ENTER:
|
466
|
+
if ( this.isOpen ) {
|
467
|
+
this._selectFocusedItem( event );
|
468
|
+
}
|
469
|
+
break;
|
470
|
+
case $.ui.keyCode.UP:
|
471
|
+
if ( event.altKey ) {
|
472
|
+
this._toggle( event );
|
473
|
+
} else {
|
474
|
+
this._move( "prev", event );
|
475
|
+
}
|
476
|
+
break;
|
477
|
+
case $.ui.keyCode.DOWN:
|
478
|
+
if ( event.altKey ) {
|
479
|
+
this._toggle( event );
|
480
|
+
} else {
|
481
|
+
this._move( "next", event );
|
482
|
+
}
|
483
|
+
break;
|
484
|
+
case $.ui.keyCode.SPACE:
|
485
|
+
if ( this.isOpen ) {
|
486
|
+
this._selectFocusedItem( event );
|
487
|
+
} else {
|
488
|
+
this._toggle( event );
|
489
|
+
}
|
490
|
+
break;
|
491
|
+
case $.ui.keyCode.LEFT:
|
492
|
+
this._move( "prev", event );
|
493
|
+
break;
|
494
|
+
case $.ui.keyCode.RIGHT:
|
495
|
+
this._move( "next", event );
|
496
|
+
break;
|
497
|
+
case $.ui.keyCode.HOME:
|
498
|
+
case $.ui.keyCode.PAGE_UP:
|
499
|
+
this._move( "first", event );
|
500
|
+
break;
|
501
|
+
case $.ui.keyCode.END:
|
502
|
+
case $.ui.keyCode.PAGE_DOWN:
|
503
|
+
this._move( "last", event );
|
504
|
+
break;
|
505
|
+
default:
|
506
|
+
this.menu.trigger( event );
|
507
|
+
preventDefault = false;
|
508
|
+
}
|
509
|
+
|
510
|
+
if ( preventDefault ) {
|
511
|
+
event.preventDefault();
|
512
|
+
}
|
513
|
+
}
|
514
|
+
},
|
515
|
+
|
516
|
+
_selectFocusedItem: function( event ) {
|
517
|
+
var item = this.menuItems.eq( this.focusIndex ).parent( "li" );
|
518
|
+
if ( !item.hasClass( "ui-state-disabled" ) ) {
|
519
|
+
this._select( item.data( "ui-selectmenu-item" ), event );
|
520
|
+
}
|
521
|
+
},
|
522
|
+
|
523
|
+
_select: function( item, event ) {
|
524
|
+
var oldIndex = this.element[ 0 ].selectedIndex;
|
525
|
+
|
526
|
+
// Change native select element
|
527
|
+
this.element[ 0 ].selectedIndex = item.index;
|
528
|
+
this.buttonItem.replaceWith( this.buttonItem = this._renderButtonItem( item ) );
|
529
|
+
this._setAria( item );
|
530
|
+
this._trigger( "select", event, { item: item } );
|
531
|
+
|
532
|
+
if ( item.index !== oldIndex ) {
|
533
|
+
this._trigger( "change", event, { item: item } );
|
534
|
+
}
|
535
|
+
|
536
|
+
this.close( event );
|
537
|
+
},
|
538
|
+
|
539
|
+
_setAria: function( item ) {
|
540
|
+
var id = this.menuItems.eq( item.index ).attr( "id" );
|
541
|
+
|
542
|
+
this.button.attr( {
|
543
|
+
"aria-labelledby": id,
|
544
|
+
"aria-activedescendant": id
|
545
|
+
} );
|
546
|
+
this.menu.attr( "aria-activedescendant", id );
|
547
|
+
},
|
548
|
+
|
549
|
+
_setOption: function( key, value ) {
|
550
|
+
if ( key === "icons" ) {
|
551
|
+
var icon = this.button.find( "span.ui-icon" );
|
552
|
+
this._removeClass( icon, null, this.options.icons.button )
|
553
|
+
._addClass( icon, null, value.button );
|
554
|
+
}
|
555
|
+
|
556
|
+
this._super( key, value );
|
557
|
+
|
558
|
+
if ( key === "appendTo" ) {
|
559
|
+
this.menuWrap.appendTo( this._appendTo() );
|
560
|
+
}
|
561
|
+
|
562
|
+
if ( key === "width" ) {
|
563
|
+
this._resizeButton();
|
564
|
+
}
|
565
|
+
},
|
566
|
+
|
567
|
+
_setOptionDisabled: function( value ) {
|
568
|
+
this._super( value );
|
569
|
+
|
570
|
+
this.menuInstance.option( "disabled", value );
|
571
|
+
this.button.attr( "aria-disabled", value );
|
572
|
+
this._toggleClass( this.button, null, "ui-state-disabled", value );
|
573
|
+
|
574
|
+
this.element.prop( "disabled", value );
|
575
|
+
if ( value ) {
|
576
|
+
this.button.attr( "tabindex", -1 );
|
577
|
+
this.close();
|
578
|
+
} else {
|
579
|
+
this.button.attr( "tabindex", 0 );
|
580
|
+
}
|
581
|
+
},
|
582
|
+
|
583
|
+
_appendTo: function() {
|
584
|
+
var element = this.options.appendTo;
|
585
|
+
|
586
|
+
if ( element ) {
|
587
|
+
element = element.jquery || element.nodeType ?
|
588
|
+
$( element ) :
|
589
|
+
this.document.find( element ).eq( 0 );
|
590
|
+
}
|
591
|
+
|
592
|
+
if ( !element || !element[ 0 ] ) {
|
593
|
+
element = this.element.closest( ".ui-front, dialog" );
|
594
|
+
}
|
595
|
+
|
596
|
+
if ( !element.length ) {
|
597
|
+
element = this.document[ 0 ].body;
|
598
|
+
}
|
599
|
+
|
600
|
+
return element;
|
601
|
+
},
|
602
|
+
|
603
|
+
_toggleAttr: function() {
|
604
|
+
this.button.attr( "aria-expanded", this.isOpen );
|
605
|
+
|
606
|
+
// We can't use two _toggleClass() calls here, because we need to make sure
|
607
|
+
// we always remove classes first and add them second, otherwise if both classes have the
|
608
|
+
// same theme class, it will be removed after we add it.
|
609
|
+
this._removeClass( this.button, "ui-selectmenu-button-" +
|
610
|
+
( this.isOpen ? "closed" : "open" ) )
|
611
|
+
._addClass( this.button, "ui-selectmenu-button-" +
|
612
|
+
( this.isOpen ? "open" : "closed" ) )
|
613
|
+
._toggleClass( this.menuWrap, "ui-selectmenu-open", null, this.isOpen );
|
614
|
+
|
615
|
+
this.menu.attr( "aria-hidden", !this.isOpen );
|
616
|
+
},
|
617
|
+
|
618
|
+
_resizeButton: function() {
|
619
|
+
var width = this.options.width;
|
620
|
+
|
621
|
+
// For `width: false`, just remove inline style and stop
|
622
|
+
if ( width === false ) {
|
623
|
+
this.button.css( "width", "" );
|
624
|
+
return;
|
625
|
+
}
|
626
|
+
|
627
|
+
// For `width: null`, match the width of the original element
|
628
|
+
if ( width === null ) {
|
629
|
+
width = this.element.show().outerWidth();
|
630
|
+
this.element.hide();
|
631
|
+
}
|
632
|
+
|
633
|
+
this.button.outerWidth( width );
|
634
|
+
},
|
635
|
+
|
636
|
+
_resizeMenu: function() {
|
637
|
+
this.menu.outerWidth( Math.max(
|
638
|
+
this.button.outerWidth(),
|
639
|
+
|
640
|
+
// Support: IE10
|
641
|
+
// IE10 wraps long text (possibly a rounding bug)
|
642
|
+
// so we add 1px to avoid the wrapping
|
643
|
+
this.menu.width( "" ).outerWidth() + 1
|
644
|
+
) );
|
645
|
+
},
|
646
|
+
|
647
|
+
_getCreateOptions: function() {
|
648
|
+
var options = this._super();
|
649
|
+
|
650
|
+
options.disabled = this.element.prop( "disabled" );
|
651
|
+
|
652
|
+
return options;
|
653
|
+
},
|
654
|
+
|
655
|
+
_parseOptions: function( options ) {
|
656
|
+
var that = this,
|
657
|
+
data = [];
|
658
|
+
options.each( function( index, item ) {
|
659
|
+
data.push( that._parseOption( $( item ), index ) );
|
660
|
+
} );
|
661
|
+
this.items = data;
|
662
|
+
},
|
663
|
+
|
664
|
+
_parseOption: function( option, index ) {
|
665
|
+
var optgroup = option.parent( "optgroup" );
|
666
|
+
|
667
|
+
return {
|
668
|
+
element: option,
|
669
|
+
index: index,
|
670
|
+
value: option.val(),
|
671
|
+
label: option.text(),
|
672
|
+
optgroup: optgroup.attr( "label" ) || "",
|
673
|
+
disabled: optgroup.prop( "disabled" ) || option.prop( "disabled" )
|
674
|
+
};
|
675
|
+
},
|
676
|
+
|
677
|
+
_destroy: function() {
|
678
|
+
this._unbindFormResetHandler();
|
679
|
+
this.menuWrap.remove();
|
680
|
+
this.button.remove();
|
681
|
+
this.element.show();
|
682
|
+
this.element.removeUniqueId();
|
683
|
+
this.labels.attr( "for", this.ids.element );
|
684
|
+
}
|
685
|
+
} ] );
|
686
|
+
|
687
|
+
} ) );
|