TokiCLI 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/CHANGELOG.md +7 -0
- data/README.md +56 -10
- data/TokiCLI.gemspec +5 -2
- data/lib/API/dbapi.rb +104 -67
- data/lib/API/helpers.rb +47 -3
- data/lib/TokiCLI/app.rb +88 -12
- data/lib/TokiCLI/version.rb +1 -1
- data/lib/TokiCLI/view.rb +5 -1
- data/lib/TokiServer/Gemfile +6 -0
- data/lib/TokiServer/README.md +37 -0
- data/lib/TokiServer/bower.json +8 -0
- data/lib/TokiServer/bower_components/fastclick/.bower.json +23 -0
- data/lib/TokiServer/bower_components/fastclick/LICENSE +22 -0
- data/lib/TokiServer/bower_components/fastclick/README.md +133 -0
- data/lib/TokiServer/bower_components/fastclick/bower.json +13 -0
- data/lib/TokiServer/bower_components/fastclick/lib/fastclick.js +790 -0
- data/lib/TokiServer/bower_components/foundation/.bower.json +30 -0
- data/lib/TokiServer/bower_components/foundation/bower.json +20 -0
- data/lib/TokiServer/bower_components/foundation/css/foundation.css +4860 -0
- data/lib/TokiServer/bower_components/foundation/css/normalize.css +320 -0
- data/lib/TokiServer/bower_components/foundation/js/foundation.js +5543 -0
- data/lib/TokiServer/bower_components/foundation/js/foundation.min.js +3 -0
- data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.abide.js +299 -0
- data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.accordion.js +59 -0
- data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.alert.js +43 -0
- data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.clearing.js +534 -0
- data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.dropdown.js +311 -0
- data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.equalizer.js +74 -0
- data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.interchange.js +331 -0
- data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.joyride.js +843 -0
- data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.js +611 -0
- data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.magellan.js +178 -0
- data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.offcanvas.js +108 -0
- data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.orbit.js +610 -0
- data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.reveal.js +437 -0
- data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.slider.js +199 -0
- data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.tab.js +167 -0
- data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.tooltip.js +298 -0
- data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.topbar.js +425 -0
- data/lib/TokiServer/bower_components/foundation/js/vendor/fastclick.js +9 -0
- data/lib/TokiServer/bower_components/foundation/js/vendor/jquery.cookie.js +8 -0
- data/lib/TokiServer/bower_components/foundation/js/vendor/jquery.js +26 -0
- data/lib/TokiServer/bower_components/foundation/js/vendor/modernizr.js +8 -0
- data/lib/TokiServer/bower_components/foundation/js/vendor/placeholder.js +2 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation.scss +45 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/_functions.scss +101 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/_settings.scss +1289 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_accordion.scss +53 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_alert-boxes.scss +126 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_block-grid.scss +132 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_breadcrumbs.scss +127 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_button-groups.scss +108 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_buttons.scss +222 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_clearing.scss +247 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_dropdown-buttons.scss +129 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_dropdown.scss +248 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_flex-video.scss +51 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_forms.scss +498 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_global.scss +429 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_grid.scss +260 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_inline-lists.scss +57 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_joyride.scss +220 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_keystrokes.scss +61 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_labels.scss +104 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_magellan.scss +34 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_offcanvas.scss +355 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_orbit.scss +423 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_pagination.scss +150 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_panels.scss +90 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_pricing-tables.scss +150 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_progress-bars.scss +79 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_range-slider.scss +148 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_reveal-new.scss +0 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_reveal.scss +216 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_side-nav.scss +115 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_split-buttons.scss +191 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_sub-nav.scss +125 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_switch.scss +294 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_tables.scss +129 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_tabs.scss +109 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_thumbs.scss +68 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_tooltips.scss +140 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_top-bar.scss +644 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_type.scss +511 -0
- data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_visibility.scss +408 -0
- data/lib/TokiServer/bower_components/foundation/scss/normalize.scss +425 -0
- data/lib/TokiServer/bower_components/jquery-placeholder/.bower.json +17 -0
- data/lib/TokiServer/bower_components/jquery-placeholder/.gitattributes +1 -0
- data/lib/TokiServer/bower_components/jquery-placeholder/.gitignore +1 -0
- data/lib/TokiServer/bower_components/jquery-placeholder/LICENSE-MIT.txt +20 -0
- data/lib/TokiServer/bower_components/jquery-placeholder/README.md +76 -0
- data/lib/TokiServer/bower_components/jquery-placeholder/bower.json +5 -0
- data/lib/TokiServer/bower_components/jquery-placeholder/demo.html +55 -0
- data/lib/TokiServer/bower_components/jquery-placeholder/jquery.placeholder.js +185 -0
- data/lib/TokiServer/bower_components/jquery-placeholder/tests/index.html +32 -0
- data/lib/TokiServer/bower_components/jquery-placeholder/tests/tests.js +134 -0
- data/lib/TokiServer/bower_components/jquery.cookie/.bower.json +28 -0
- data/lib/TokiServer/bower_components/jquery.cookie/jquery.cookie.js +117 -0
- data/lib/TokiServer/bower_components/jquery/.bower.json +37 -0
- data/lib/TokiServer/bower_components/jquery/MIT-LICENSE.txt +21 -0
- data/lib/TokiServer/bower_components/jquery/bower.json +27 -0
- data/lib/TokiServer/bower_components/jquery/dist/jquery.js +9190 -0
- data/lib/TokiServer/bower_components/jquery/dist/jquery.min.js +5 -0
- data/lib/TokiServer/bower_components/jquery/dist/jquery.min.map +1 -0
- data/lib/TokiServer/bower_components/jquery/src/ajax.js +806 -0
- data/lib/TokiServer/bower_components/jquery/src/ajax/jsonp.js +89 -0
- data/lib/TokiServer/bower_components/jquery/src/ajax/load.js +75 -0
- data/lib/TokiServer/bower_components/jquery/src/ajax/parseJSON.js +13 -0
- data/lib/TokiServer/bower_components/jquery/src/ajax/parseXML.js +28 -0
- data/lib/TokiServer/bower_components/jquery/src/ajax/script.js +64 -0
- data/lib/TokiServer/bower_components/jquery/src/ajax/var/nonce.js +5 -0
- data/lib/TokiServer/bower_components/jquery/src/ajax/var/rquery.js +3 -0
- data/lib/TokiServer/bower_components/jquery/src/ajax/xhr.js +135 -0
- data/lib/TokiServer/bower_components/jquery/src/attributes.js +11 -0
- data/lib/TokiServer/bower_components/jquery/src/attributes/attr.js +143 -0
- data/lib/TokiServer/bower_components/jquery/src/attributes/classes.js +158 -0
- data/lib/TokiServer/bower_components/jquery/src/attributes/prop.js +96 -0
- data/lib/TokiServer/bower_components/jquery/src/attributes/support.js +35 -0
- data/lib/TokiServer/bower_components/jquery/src/attributes/val.js +163 -0
- data/lib/TokiServer/bower_components/jquery/src/callbacks.js +205 -0
- data/lib/TokiServer/bower_components/jquery/src/core.js +498 -0
- data/lib/TokiServer/bower_components/jquery/src/core/access.js +60 -0
- data/lib/TokiServer/bower_components/jquery/src/core/init.js +123 -0
- data/lib/TokiServer/bower_components/jquery/src/core/parseHTML.js +39 -0
- data/lib/TokiServer/bower_components/jquery/src/core/ready.js +97 -0
- data/lib/TokiServer/bower_components/jquery/src/core/var/rsingleTag.js +4 -0
- data/lib/TokiServer/bower_components/jquery/src/css.js +451 -0
- data/lib/TokiServer/bower_components/jquery/src/css/addGetHookIf.js +24 -0
- data/lib/TokiServer/bower_components/jquery/src/css/curCSS.js +57 -0
- data/lib/TokiServer/bower_components/jquery/src/css/defaultDisplay.js +70 -0
- data/lib/TokiServer/bower_components/jquery/src/css/hiddenVisibleSelectors.js +15 -0
- data/lib/TokiServer/bower_components/jquery/src/css/support.js +91 -0
- data/lib/TokiServer/bower_components/jquery/src/css/swap.js +28 -0
- data/lib/TokiServer/bower_components/jquery/src/css/var/cssExpand.js +3 -0
- data/lib/TokiServer/bower_components/jquery/src/css/var/getStyles.js +5 -0
- data/lib/TokiServer/bower_components/jquery/src/css/var/isHidden.js +13 -0
- data/lib/TokiServer/bower_components/jquery/src/css/var/rmargin.js +3 -0
- data/lib/TokiServer/bower_components/jquery/src/css/var/rnumnonpx.js +5 -0
- data/lib/TokiServer/bower_components/jquery/src/data.js +179 -0
- data/lib/TokiServer/bower_components/jquery/src/data/Data.js +181 -0
- data/lib/TokiServer/bower_components/jquery/src/data/accepts.js +20 -0
- data/lib/TokiServer/bower_components/jquery/src/data/var/data_priv.js +5 -0
- data/lib/TokiServer/bower_components/jquery/src/data/var/data_user.js +5 -0
- data/lib/TokiServer/bower_components/jquery/src/deferred.js +149 -0
- data/lib/TokiServer/bower_components/jquery/src/deprecated.js +13 -0
- data/lib/TokiServer/bower_components/jquery/src/dimensions.js +50 -0
- data/lib/TokiServer/bower_components/jquery/src/effects.js +649 -0
- data/lib/TokiServer/bower_components/jquery/src/effects/Tween.js +114 -0
- data/lib/TokiServer/bower_components/jquery/src/effects/animatedSelector.js +13 -0
- data/lib/TokiServer/bower_components/jquery/src/event.js +868 -0
- data/lib/TokiServer/bower_components/jquery/src/event/alias.js +39 -0
- data/lib/TokiServer/bower_components/jquery/src/event/support.js +9 -0
- data/lib/TokiServer/bower_components/jquery/src/exports/amd.js +24 -0
- data/lib/TokiServer/bower_components/jquery/src/exports/global.js +32 -0
- data/lib/TokiServer/bower_components/jquery/src/intro.js +44 -0
- data/lib/TokiServer/bower_components/jquery/src/jquery.js +36 -0
- data/lib/TokiServer/bower_components/jquery/src/manipulation.js +582 -0
- data/lib/TokiServer/bower_components/jquery/src/manipulation/_evalUrl.js +18 -0
- data/lib/TokiServer/bower_components/jquery/src/manipulation/support.js +31 -0
- data/lib/TokiServer/bower_components/jquery/src/manipulation/var/rcheckableType.js +3 -0
- data/lib/TokiServer/bower_components/jquery/src/offset.js +204 -0
- data/lib/TokiServer/bower_components/jquery/src/outro.js +1 -0
- data/lib/TokiServer/bower_components/jquery/src/queue.js +142 -0
- data/lib/TokiServer/bower_components/jquery/src/queue/delay.js +22 -0
- data/lib/TokiServer/bower_components/jquery/src/selector-native.js +172 -0
- data/lib/TokiServer/bower_components/jquery/src/selector-sizzle.js +14 -0
- data/lib/TokiServer/bower_components/jquery/src/selector.js +1 -0
- data/lib/TokiServer/bower_components/jquery/src/serialize.js +111 -0
- data/lib/TokiServer/bower_components/jquery/src/sizzle/dist/sizzle.js +2044 -0
- data/lib/TokiServer/bower_components/jquery/src/sizzle/dist/sizzle.min.js +3 -0
- data/lib/TokiServer/bower_components/jquery/src/sizzle/dist/sizzle.min.map +1 -0
- data/lib/TokiServer/bower_components/jquery/src/traversing.js +200 -0
- data/lib/TokiServer/bower_components/jquery/src/traversing/findFilter.js +100 -0
- data/lib/TokiServer/bower_components/jquery/src/traversing/var/rneedsContext.js +6 -0
- data/lib/TokiServer/bower_components/jquery/src/var/arr.js +3 -0
- data/lib/TokiServer/bower_components/jquery/src/var/class2type.js +4 -0
- data/lib/TokiServer/bower_components/jquery/src/var/concat.js +5 -0
- data/lib/TokiServer/bower_components/jquery/src/var/hasOwn.js +5 -0
- data/lib/TokiServer/bower_components/jquery/src/var/indexOf.js +5 -0
- data/lib/TokiServer/bower_components/jquery/src/var/pnum.js +3 -0
- data/lib/TokiServer/bower_components/jquery/src/var/push.js +5 -0
- data/lib/TokiServer/bower_components/jquery/src/var/rnotwhite.js +3 -0
- data/lib/TokiServer/bower_components/jquery/src/var/slice.js +5 -0
- data/lib/TokiServer/bower_components/jquery/src/var/strundefined.js +3 -0
- data/lib/TokiServer/bower_components/jquery/src/var/support.js +4 -0
- data/lib/TokiServer/bower_components/jquery/src/var/toString.js +5 -0
- data/lib/TokiServer/bower_components/jquery/src/wrap.js +78 -0
- data/lib/TokiServer/bower_components/modernizr/.bower.json +14 -0
- data/lib/TokiServer/bower_components/modernizr/.editorconfig +10 -0
- data/lib/TokiServer/bower_components/modernizr/.gitignore +2 -0
- data/lib/TokiServer/bower_components/modernizr/.travis.yml +6 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/a-download.js +8 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/audio-audiodata-api.js +4 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/audio-webaudio-api.js +4 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/battery-api.js +8 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/battery-level.js +11 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/blob-constructor.js +10 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/canvas-todataurl-type.js +28 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/contenteditable.js +9 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/contentsecuritypolicy.js +10 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/contextmenu.js +11 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/cookies.js +15 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/cors.js +3 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-backgroundposition-shorthand.js +19 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-backgroundposition-xy.js +15 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-backgroundrepeat.js +31 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-backgroundsizecover.js +10 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-boxsizing.js +9 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-calc.js +12 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-cubicbezierrange.js +8 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-displayrunin.js +18 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-displaytable.js +27 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-filters.js +7 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-hyphens.js +205 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-lastchild.js +11 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-mask.js +12 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-mediaqueries.js +3 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-objectfit.js +6 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-overflow-scrolling.js +9 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-pointerevents.js +25 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-positionsticky.js +13 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-regions.js +55 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-remunit.js +19 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-resize.js +8 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-scrollbars.js +19 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-shapes.js +4 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-subpixelfont.js +23 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-supports.js +6 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-userselect.js +10 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-vhunit.js +14 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-vmaxunit.js +14 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-vminunit.js +14 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/css-vwunit.js +14 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/custom-protocol-handler.js +10 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/dart.js +6 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/dataview-api.js +4 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/dom-classlist.js +4 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/dom-createElement-attrs.js +11 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/dom-dataset.js +9 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/dom-microdata.js +4 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/elem-datalist.js +12 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/elem-details.js +25 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/elem-output.js +4 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/elem-progress-meter.js +11 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/elem-ruby.js +53 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/elem-time.js +4 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/elem-track.js +11 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/emoji.js +11 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/es5-strictmode.js +7 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/event-deviceorientation-motion.js +11 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/exif-orientation.js +32 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/file-api.js +12 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/file-filesystem.js +9 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/forms-fileinput.js +13 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/forms-formattribute.js +29 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/forms-inputnumber-l10n.js +32 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/forms-placeholder.js +10 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/forms-speechinput.js +19 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/forms-validation.js +62 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/fullscreen-api.js +10 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/gamepad.js +12 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/getusermedia.js +5 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/ie8compat.js +12 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/iframe-sandbox.js +5 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/iframe-seamless.js +5 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/iframe-srcdoc.js +5 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/img-apng.js +26 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/img-webp.js +20 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/json.js +7 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/lists-reversed.js +6 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/mathml.js +23 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/network-connection.js +22 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/network-eventsource.js +5 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/network-xhr2.js +13 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/notification.js +10 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/performance.js +5 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/pointerlock-api.js +4 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/quota-management-api.js +11 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/requestanimationframe.js +7 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/script-async.js +3 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/script-defer.js +3 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/style-scoped.js +6 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/svg-filters.js +13 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/unicode.js +32 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/url-data-uri.js +26 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/userdata.js +7 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/vibration.js +4 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/web-intents.js +6 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/webgl-extensions.js +42 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/websockets-binary.js +20 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/window-framed.js +8 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/workers-blobworkers.js +66 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/workers-dataworkers.js +34 -0
- data/lib/TokiServer/bower_components/modernizr/feature-detects/workers-sharedworkers.js +3 -0
- data/lib/TokiServer/bower_components/modernizr/grunt.js +69 -0
- data/lib/TokiServer/bower_components/modernizr/media/Modernizr 2 Logo.ai +292 -1
- data/lib/TokiServer/bower_components/modernizr/media/Modernizr 2 Logo.eps +0 -0
- data/lib/TokiServer/bower_components/modernizr/media/Modernizr 2 Logo.pdf +292 -1
- data/lib/TokiServer/bower_components/modernizr/media/Modernizr 2 Logo.png +0 -0
- data/lib/TokiServer/bower_components/modernizr/media/Modernizr 2 Logo.svg +35 -0
- data/lib/TokiServer/bower_components/modernizr/modernizr.js +1406 -0
- data/lib/TokiServer/bower_components/modernizr/readme.md +28 -0
- data/lib/TokiServer/bower_components/modernizr/test/basic.html +65 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse.html +1451 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/Windsong-webfont.eot +0 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/Windsong-webfont.otf +0 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/Windsong-webfont.svg +147 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/Windsong-webfont.ttf +0 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/Windsong-webfont.woff +0 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/alpha.png +0 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/apng_test.png +0 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/before-after.png +0 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/form_validation.html +15 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/ga.js +43 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/green5x5.png +0 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/hashchange.html +16 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/jquery.min.js +18 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/mathml.html +120 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/mathml_ref.png +0 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/modernizr-1.7.min.js +2 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/png_alpha_result.png +0 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/pushstate.html +40 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/red30x30.png +0 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/ruby.png +0 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/stroked-text.png +0 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/style.css +168 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/svg-html-blur.png +0 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/svg-img.svg +5 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/svg-img.svg.1 +5 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/svg_blur.png +0 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/table.png +0 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/text-shadow1.png +0 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/text-shadow2.png +0 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/windsong_font.png +0 -0
- data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/xhtml.html +14 -0
- data/lib/TokiServer/bower_components/modernizr/test/index.html +104 -0
- data/lib/TokiServer/bower_components/modernizr/test/js/basic.html +65 -0
- data/lib/TokiServer/bower_components/modernizr/test/js/dumpdata.js +75 -0
- data/lib/TokiServer/bower_components/modernizr/test/js/lib/detect-global.js +153 -0
- data/lib/TokiServer/bower_components/modernizr/test/js/lib/jquery-1.7b2.js +9279 -0
- data/lib/TokiServer/bower_components/modernizr/test/js/lib/jsonselect.js +279 -0
- data/lib/TokiServer/bower_components/modernizr/test/js/lib/polyfills.js +96 -0
- data/lib/TokiServer/bower_components/modernizr/test/js/lib/uaparser.js +215 -0
- data/lib/TokiServer/bower_components/modernizr/test/js/setup.js +44 -0
- data/lib/TokiServer/bower_components/modernizr/test/js/unit-caniuse.js +191 -0
- data/lib/TokiServer/bower_components/modernizr/test/js/unit.js +669 -0
- data/lib/TokiServer/bower_components/modernizr/test/qunit/qunit.css +231 -0
- data/lib/TokiServer/bower_components/modernizr/test/qunit/qunit.js +1932 -0
- data/lib/TokiServer/bower_components/modernizr/test/qunit/run-qunit.js +72 -0
- data/lib/TokiServer/config.rb +25 -0
- data/lib/TokiServer/humans.txt +8 -0
- data/lib/TokiServer/itunesicon.rb +60 -0
- data/lib/TokiServer/js/app.js +3 -0
- data/lib/TokiServer/public/stylesheets/app.css +8094 -0
- data/lib/TokiServer/robots.txt +4 -0
- data/lib/TokiServer/scss/_settings.scss +1240 -0
- data/lib/TokiServer/scss/app.scss +102 -0
- data/lib/TokiServer/tokiserver.rb +377 -0
- data/lib/TokiServer/views/apps_total.erb +28 -0
- data/lib/TokiServer/views/error.erb +25 -0
- data/lib/TokiServer/views/index.erb +191 -0
- data/lib/TokiServer/views/layout.erb +20 -0
- data/lib/TokiServer/views/name_log.erb +50 -0
- data/lib/TokiServer/views/name_split.erb +37 -0
- data/lib/TokiServer/views/name_total.erb +34 -0
- metadata +416 -4
@@ -0,0 +1,24 @@
|
|
1
|
+
define(function() {
|
2
|
+
|
3
|
+
function addGetHookIf( conditionFn, hookFn ) {
|
4
|
+
// Define the hook, we'll check on the first run if it's really needed.
|
5
|
+
return {
|
6
|
+
get: function() {
|
7
|
+
if ( conditionFn() ) {
|
8
|
+
// Hook not needed (or it's not possible to use it due to missing dependency),
|
9
|
+
// remove it.
|
10
|
+
// Since there are no other hooks for marginRight, remove the whole object.
|
11
|
+
delete this.get;
|
12
|
+
return;
|
13
|
+
}
|
14
|
+
|
15
|
+
// Hook needed; redefine it so that the support test is not executed again.
|
16
|
+
|
17
|
+
return (this.get = hookFn).apply( this, arguments );
|
18
|
+
}
|
19
|
+
};
|
20
|
+
}
|
21
|
+
|
22
|
+
return addGetHookIf;
|
23
|
+
|
24
|
+
});
|
@@ -0,0 +1,57 @@
|
|
1
|
+
define([
|
2
|
+
"../core",
|
3
|
+
"./var/rnumnonpx",
|
4
|
+
"./var/rmargin",
|
5
|
+
"./var/getStyles",
|
6
|
+
"../selector" // contains
|
7
|
+
], function( jQuery, rnumnonpx, rmargin, getStyles ) {
|
8
|
+
|
9
|
+
function curCSS( elem, name, computed ) {
|
10
|
+
var width, minWidth, maxWidth, ret,
|
11
|
+
style = elem.style;
|
12
|
+
|
13
|
+
computed = computed || getStyles( elem );
|
14
|
+
|
15
|
+
// Support: IE9
|
16
|
+
// getPropertyValue is only needed for .css('filter') in IE9, see #12537
|
17
|
+
if ( computed ) {
|
18
|
+
ret = computed.getPropertyValue( name ) || computed[ name ];
|
19
|
+
}
|
20
|
+
|
21
|
+
if ( computed ) {
|
22
|
+
|
23
|
+
if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
|
24
|
+
ret = jQuery.style( elem, name );
|
25
|
+
}
|
26
|
+
|
27
|
+
// Support: iOS < 6
|
28
|
+
// A tribute to the "awesome hack by Dean Edwards"
|
29
|
+
// iOS < 6 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
|
30
|
+
// this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
|
31
|
+
if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
|
32
|
+
|
33
|
+
// Remember the original values
|
34
|
+
width = style.width;
|
35
|
+
minWidth = style.minWidth;
|
36
|
+
maxWidth = style.maxWidth;
|
37
|
+
|
38
|
+
// Put in the new values to get a computed value out
|
39
|
+
style.minWidth = style.maxWidth = style.width = ret;
|
40
|
+
ret = computed.width;
|
41
|
+
|
42
|
+
// Revert the changed values
|
43
|
+
style.width = width;
|
44
|
+
style.minWidth = minWidth;
|
45
|
+
style.maxWidth = maxWidth;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
return ret !== undefined ?
|
50
|
+
// Support: IE
|
51
|
+
// IE returns zIndex value as an integer.
|
52
|
+
ret + "" :
|
53
|
+
ret;
|
54
|
+
}
|
55
|
+
|
56
|
+
return curCSS;
|
57
|
+
});
|
@@ -0,0 +1,70 @@
|
|
1
|
+
define([
|
2
|
+
"../core",
|
3
|
+
"../manipulation" // appendTo
|
4
|
+
], function( jQuery ) {
|
5
|
+
|
6
|
+
var iframe,
|
7
|
+
elemdisplay = {};
|
8
|
+
|
9
|
+
/**
|
10
|
+
* Retrieve the actual display of a element
|
11
|
+
* @param {String} name nodeName of the element
|
12
|
+
* @param {Object} doc Document object
|
13
|
+
*/
|
14
|
+
// Called only from within defaultDisplay
|
15
|
+
function actualDisplay( name, doc ) {
|
16
|
+
var style,
|
17
|
+
elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
|
18
|
+
|
19
|
+
// getDefaultComputedStyle might be reliably used only on attached element
|
20
|
+
display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
|
21
|
+
|
22
|
+
// Use of this method is a temporary fix (more like optmization) until something better comes along,
|
23
|
+
// since it was removed from specification and supported only in FF
|
24
|
+
style.display : jQuery.css( elem[ 0 ], "display" );
|
25
|
+
|
26
|
+
// We don't have any data stored on the element,
|
27
|
+
// so use "detach" method as fast way to get rid of the element
|
28
|
+
elem.detach();
|
29
|
+
|
30
|
+
return display;
|
31
|
+
}
|
32
|
+
|
33
|
+
/**
|
34
|
+
* Try to determine the default display value of an element
|
35
|
+
* @param {String} nodeName
|
36
|
+
*/
|
37
|
+
function defaultDisplay( nodeName ) {
|
38
|
+
var doc = document,
|
39
|
+
display = elemdisplay[ nodeName ];
|
40
|
+
|
41
|
+
if ( !display ) {
|
42
|
+
display = actualDisplay( nodeName, doc );
|
43
|
+
|
44
|
+
// If the simple way fails, read from inside an iframe
|
45
|
+
if ( display === "none" || !display ) {
|
46
|
+
|
47
|
+
// Use the already-created iframe if possible
|
48
|
+
iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement );
|
49
|
+
|
50
|
+
// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
|
51
|
+
doc = iframe[ 0 ].contentDocument;
|
52
|
+
|
53
|
+
// Support: IE
|
54
|
+
doc.write();
|
55
|
+
doc.close();
|
56
|
+
|
57
|
+
display = actualDisplay( nodeName, doc );
|
58
|
+
iframe.detach();
|
59
|
+
}
|
60
|
+
|
61
|
+
// Store the correct default display
|
62
|
+
elemdisplay[ nodeName ] = display;
|
63
|
+
}
|
64
|
+
|
65
|
+
return display;
|
66
|
+
}
|
67
|
+
|
68
|
+
return defaultDisplay;
|
69
|
+
|
70
|
+
});
|
@@ -0,0 +1,15 @@
|
|
1
|
+
define([
|
2
|
+
"../core",
|
3
|
+
"../selector"
|
4
|
+
], function( jQuery ) {
|
5
|
+
|
6
|
+
jQuery.expr.filters.hidden = function( elem ) {
|
7
|
+
// Support: Opera <= 12.12
|
8
|
+
// Opera reports offsetWidths and offsetHeights less than zero on some elements
|
9
|
+
return elem.offsetWidth <= 0 && elem.offsetHeight <= 0;
|
10
|
+
};
|
11
|
+
jQuery.expr.filters.visible = function( elem ) {
|
12
|
+
return !jQuery.expr.filters.hidden( elem );
|
13
|
+
};
|
14
|
+
|
15
|
+
});
|
@@ -0,0 +1,91 @@
|
|
1
|
+
define([
|
2
|
+
"../core",
|
3
|
+
"../var/support"
|
4
|
+
], function( jQuery, support ) {
|
5
|
+
|
6
|
+
(function() {
|
7
|
+
var pixelPositionVal, boxSizingReliableVal,
|
8
|
+
docElem = document.documentElement,
|
9
|
+
container = document.createElement( "div" ),
|
10
|
+
div = document.createElement( "div" );
|
11
|
+
|
12
|
+
if ( !div.style ) {
|
13
|
+
return;
|
14
|
+
}
|
15
|
+
|
16
|
+
div.style.backgroundClip = "content-box";
|
17
|
+
div.cloneNode( true ).style.backgroundClip = "";
|
18
|
+
support.clearCloneStyle = div.style.backgroundClip === "content-box";
|
19
|
+
|
20
|
+
container.style.cssText = "border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;" +
|
21
|
+
"position:absolute";
|
22
|
+
container.appendChild( div );
|
23
|
+
|
24
|
+
// Executing both pixelPosition & boxSizingReliable tests require only one layout
|
25
|
+
// so they're executed at the same time to save the second computation.
|
26
|
+
function computePixelPositionAndBoxSizingReliable() {
|
27
|
+
div.style.cssText =
|
28
|
+
// Support: Firefox<29, Android 2.3
|
29
|
+
// Vendor-prefix box-sizing
|
30
|
+
"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" +
|
31
|
+
"box-sizing:border-box;display:block;margin-top:1%;top:1%;" +
|
32
|
+
"border:1px;padding:1px;width:4px;position:absolute";
|
33
|
+
div.innerHTML = "";
|
34
|
+
docElem.appendChild( container );
|
35
|
+
|
36
|
+
var divStyle = window.getComputedStyle( div, null );
|
37
|
+
pixelPositionVal = divStyle.top !== "1%";
|
38
|
+
boxSizingReliableVal = divStyle.width === "4px";
|
39
|
+
|
40
|
+
docElem.removeChild( container );
|
41
|
+
}
|
42
|
+
|
43
|
+
// Support: node.js jsdom
|
44
|
+
// Don't assume that getComputedStyle is a property of the global object
|
45
|
+
if ( window.getComputedStyle ) {
|
46
|
+
jQuery.extend( support, {
|
47
|
+
pixelPosition: function() {
|
48
|
+
// This test is executed only once but we still do memoizing
|
49
|
+
// since we can use the boxSizingReliable pre-computing.
|
50
|
+
// No need to check if the test was already performed, though.
|
51
|
+
computePixelPositionAndBoxSizingReliable();
|
52
|
+
return pixelPositionVal;
|
53
|
+
},
|
54
|
+
boxSizingReliable: function() {
|
55
|
+
if ( boxSizingReliableVal == null ) {
|
56
|
+
computePixelPositionAndBoxSizingReliable();
|
57
|
+
}
|
58
|
+
return boxSizingReliableVal;
|
59
|
+
},
|
60
|
+
reliableMarginRight: function() {
|
61
|
+
// Support: Android 2.3
|
62
|
+
// Check if div with explicit width and no margin-right incorrectly
|
63
|
+
// gets computed margin-right based on width of container. (#3333)
|
64
|
+
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
|
65
|
+
// This support function is only executed once so no memoizing is needed.
|
66
|
+
var ret,
|
67
|
+
marginDiv = div.appendChild( document.createElement( "div" ) );
|
68
|
+
|
69
|
+
// Reset CSS: box-sizing; display; margin; border; padding
|
70
|
+
marginDiv.style.cssText = div.style.cssText =
|
71
|
+
// Support: Firefox<29, Android 2.3
|
72
|
+
// Vendor-prefix box-sizing
|
73
|
+
"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
|
74
|
+
"box-sizing:content-box;display:block;margin:0;border:0;padding:0";
|
75
|
+
marginDiv.style.marginRight = marginDiv.style.width = "0";
|
76
|
+
div.style.width = "1px";
|
77
|
+
docElem.appendChild( container );
|
78
|
+
|
79
|
+
ret = !parseFloat( window.getComputedStyle( marginDiv, null ).marginRight );
|
80
|
+
|
81
|
+
docElem.removeChild( container );
|
82
|
+
|
83
|
+
return ret;
|
84
|
+
}
|
85
|
+
});
|
86
|
+
}
|
87
|
+
})();
|
88
|
+
|
89
|
+
return support;
|
90
|
+
|
91
|
+
});
|
@@ -0,0 +1,28 @@
|
|
1
|
+
define([
|
2
|
+
"../core"
|
3
|
+
], function( jQuery ) {
|
4
|
+
|
5
|
+
// A method for quickly swapping in/out CSS properties to get correct calculations.
|
6
|
+
jQuery.swap = function( elem, options, callback, args ) {
|
7
|
+
var ret, name,
|
8
|
+
old = {};
|
9
|
+
|
10
|
+
// Remember the old values, and insert the new ones
|
11
|
+
for ( name in options ) {
|
12
|
+
old[ name ] = elem.style[ name ];
|
13
|
+
elem.style[ name ] = options[ name ];
|
14
|
+
}
|
15
|
+
|
16
|
+
ret = callback.apply( elem, args || [] );
|
17
|
+
|
18
|
+
// Revert the old values
|
19
|
+
for ( name in options ) {
|
20
|
+
elem.style[ name ] = old[ name ];
|
21
|
+
}
|
22
|
+
|
23
|
+
return ret;
|
24
|
+
};
|
25
|
+
|
26
|
+
return jQuery.swap;
|
27
|
+
|
28
|
+
});
|
@@ -0,0 +1,13 @@
|
|
1
|
+
define([
|
2
|
+
"../../core",
|
3
|
+
"../../selector"
|
4
|
+
// css is assumed
|
5
|
+
], function( jQuery ) {
|
6
|
+
|
7
|
+
return function( elem, el ) {
|
8
|
+
// isHidden might be called from jQuery#filter function;
|
9
|
+
// in that case, element will be second argument
|
10
|
+
elem = el || elem;
|
11
|
+
return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
|
12
|
+
};
|
13
|
+
});
|
@@ -0,0 +1,179 @@
|
|
1
|
+
define([
|
2
|
+
"./core",
|
3
|
+
"./var/rnotwhite",
|
4
|
+
"./core/access",
|
5
|
+
"./data/var/data_priv",
|
6
|
+
"./data/var/data_user"
|
7
|
+
], function( jQuery, rnotwhite, access, data_priv, data_user ) {
|
8
|
+
|
9
|
+
/*
|
10
|
+
Implementation Summary
|
11
|
+
|
12
|
+
1. Enforce API surface and semantic compatibility with 1.9.x branch
|
13
|
+
2. Improve the module's maintainability by reducing the storage
|
14
|
+
paths to a single mechanism.
|
15
|
+
3. Use the same single mechanism to support "private" and "user" data.
|
16
|
+
4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
|
17
|
+
5. Avoid exposing implementation details on user objects (eg. expando properties)
|
18
|
+
6. Provide a clear path for implementation upgrade to WeakMap in 2014
|
19
|
+
*/
|
20
|
+
var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
|
21
|
+
rmultiDash = /([A-Z])/g;
|
22
|
+
|
23
|
+
function dataAttr( elem, key, data ) {
|
24
|
+
var name;
|
25
|
+
|
26
|
+
// If nothing was found internally, try to fetch any
|
27
|
+
// data from the HTML5 data-* attribute
|
28
|
+
if ( data === undefined && elem.nodeType === 1 ) {
|
29
|
+
name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
|
30
|
+
data = elem.getAttribute( name );
|
31
|
+
|
32
|
+
if ( typeof data === "string" ) {
|
33
|
+
try {
|
34
|
+
data = data === "true" ? true :
|
35
|
+
data === "false" ? false :
|
36
|
+
data === "null" ? null :
|
37
|
+
// Only convert to a number if it doesn't change the string
|
38
|
+
+data + "" === data ? +data :
|
39
|
+
rbrace.test( data ) ? jQuery.parseJSON( data ) :
|
40
|
+
data;
|
41
|
+
} catch( e ) {}
|
42
|
+
|
43
|
+
// Make sure we set the data so it isn't changed later
|
44
|
+
data_user.set( elem, key, data );
|
45
|
+
} else {
|
46
|
+
data = undefined;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
return data;
|
50
|
+
}
|
51
|
+
|
52
|
+
jQuery.extend({
|
53
|
+
hasData: function( elem ) {
|
54
|
+
return data_user.hasData( elem ) || data_priv.hasData( elem );
|
55
|
+
},
|
56
|
+
|
57
|
+
data: function( elem, name, data ) {
|
58
|
+
return data_user.access( elem, name, data );
|
59
|
+
},
|
60
|
+
|
61
|
+
removeData: function( elem, name ) {
|
62
|
+
data_user.remove( elem, name );
|
63
|
+
},
|
64
|
+
|
65
|
+
// TODO: Now that all calls to _data and _removeData have been replaced
|
66
|
+
// with direct calls to data_priv methods, these can be deprecated.
|
67
|
+
_data: function( elem, name, data ) {
|
68
|
+
return data_priv.access( elem, name, data );
|
69
|
+
},
|
70
|
+
|
71
|
+
_removeData: function( elem, name ) {
|
72
|
+
data_priv.remove( elem, name );
|
73
|
+
}
|
74
|
+
});
|
75
|
+
|
76
|
+
jQuery.fn.extend({
|
77
|
+
data: function( key, value ) {
|
78
|
+
var i, name, data,
|
79
|
+
elem = this[ 0 ],
|
80
|
+
attrs = elem && elem.attributes;
|
81
|
+
|
82
|
+
// Gets all values
|
83
|
+
if ( key === undefined ) {
|
84
|
+
if ( this.length ) {
|
85
|
+
data = data_user.get( elem );
|
86
|
+
|
87
|
+
if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) {
|
88
|
+
i = attrs.length;
|
89
|
+
while ( i-- ) {
|
90
|
+
|
91
|
+
// Support: IE11+
|
92
|
+
// The attrs elements can be null (#14894)
|
93
|
+
if ( attrs[ i ] ) {
|
94
|
+
name = attrs[ i ].name;
|
95
|
+
if ( name.indexOf( "data-" ) === 0 ) {
|
96
|
+
name = jQuery.camelCase( name.slice(5) );
|
97
|
+
dataAttr( elem, name, data[ name ] );
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
101
|
+
data_priv.set( elem, "hasDataAttrs", true );
|
102
|
+
}
|
103
|
+
}
|
104
|
+
|
105
|
+
return data;
|
106
|
+
}
|
107
|
+
|
108
|
+
// Sets multiple values
|
109
|
+
if ( typeof key === "object" ) {
|
110
|
+
return this.each(function() {
|
111
|
+
data_user.set( this, key );
|
112
|
+
});
|
113
|
+
}
|
114
|
+
|
115
|
+
return access( this, function( value ) {
|
116
|
+
var data,
|
117
|
+
camelKey = jQuery.camelCase( key );
|
118
|
+
|
119
|
+
// The calling jQuery object (element matches) is not empty
|
120
|
+
// (and therefore has an element appears at this[ 0 ]) and the
|
121
|
+
// `value` parameter was not undefined. An empty jQuery object
|
122
|
+
// will result in `undefined` for elem = this[ 0 ] which will
|
123
|
+
// throw an exception if an attempt to read a data cache is made.
|
124
|
+
if ( elem && value === undefined ) {
|
125
|
+
// Attempt to get data from the cache
|
126
|
+
// with the key as-is
|
127
|
+
data = data_user.get( elem, key );
|
128
|
+
if ( data !== undefined ) {
|
129
|
+
return data;
|
130
|
+
}
|
131
|
+
|
132
|
+
// Attempt to get data from the cache
|
133
|
+
// with the key camelized
|
134
|
+
data = data_user.get( elem, camelKey );
|
135
|
+
if ( data !== undefined ) {
|
136
|
+
return data;
|
137
|
+
}
|
138
|
+
|
139
|
+
// Attempt to "discover" the data in
|
140
|
+
// HTML5 custom data-* attrs
|
141
|
+
data = dataAttr( elem, camelKey, undefined );
|
142
|
+
if ( data !== undefined ) {
|
143
|
+
return data;
|
144
|
+
}
|
145
|
+
|
146
|
+
// We tried really hard, but the data doesn't exist.
|
147
|
+
return;
|
148
|
+
}
|
149
|
+
|
150
|
+
// Set the data...
|
151
|
+
this.each(function() {
|
152
|
+
// First, attempt to store a copy or reference of any
|
153
|
+
// data that might've been store with a camelCased key.
|
154
|
+
var data = data_user.get( this, camelKey );
|
155
|
+
|
156
|
+
// For HTML5 data-* attribute interop, we have to
|
157
|
+
// store property names with dashes in a camelCase form.
|
158
|
+
// This might not apply to all properties...*
|
159
|
+
data_user.set( this, camelKey, value );
|
160
|
+
|
161
|
+
// *... In the case of properties that might _actually_
|
162
|
+
// have dashes, we need to also store a copy of that
|
163
|
+
// unchanged property.
|
164
|
+
if ( key.indexOf("-") !== -1 && data !== undefined ) {
|
165
|
+
data_user.set( this, key, value );
|
166
|
+
}
|
167
|
+
});
|
168
|
+
}, null, value, arguments.length > 1, null, true );
|
169
|
+
},
|
170
|
+
|
171
|
+
removeData: function( key ) {
|
172
|
+
return this.each(function() {
|
173
|
+
data_user.remove( this, key );
|
174
|
+
});
|
175
|
+
}
|
176
|
+
});
|
177
|
+
|
178
|
+
return jQuery;
|
179
|
+
});
|