ustyle 1.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +23 -0
- data/.rbenv-gemsets +1 -0
- data/.ruby-version +1 -0
- data/CONTRIBUTING.md +68 -0
- data/Gemfile +4 -0
- data/Gruntfile.js +189 -0
- data/JAVASCRIPT_STANDARDS.md +88 -0
- data/LICENSE.txt +13 -0
- data/README.md +93 -0
- data/Rakefile +6 -0
- data/bower.json +54 -0
- data/config/.jscsrc +76 -0
- data/config/autoprefixer.yml +6 -0
- data/config/scss-lint.yml +54 -0
- data/dist/ustyle-content.css +1 -0
- data/dist/ustyle-icons.css +1 -0
- data/dist/ustyle-latest.css +1 -0
- data/dist/ustyle.js +799 -0
- data/dist/ustyle.json +1 -0
- data/grunt/modules/dss-helper.js +117 -0
- data/grunt/modules/file.js +26 -0
- data/grunt/modules/templates.js +59 -0
- data/grunt/tasks/browser-sync.js +19 -0
- data/grunt/tasks/builder.js +72 -0
- data/grunt/tasks/styleguide.js +290 -0
- data/grunt/tasks/svg2png.js +57 -0
- data/lib/ustyle/deploy.rb +31 -0
- data/lib/ustyle/engine.rb +24 -0
- data/lib/ustyle/hash.rb +44 -0
- data/lib/ustyle/icons.rb +13 -0
- data/lib/ustyle/sass_functions.rb +104 -0
- data/lib/ustyle/sinatra.rb +34 -0
- data/lib/ustyle/sprockets.rb +6 -0
- data/lib/ustyle/utils.rb +40 -0
- data/lib/ustyle/version.rb +4 -0
- data/lib/ustyle.rb +54 -0
- data/package.json +74 -0
- data/styleguide/CNAME +1 -0
- data/styleguide/assets/images/bower-logo.png +0 -0
- data/styleguide/assets/images/cloudfront-logo.png +0 -0
- data/styleguide/assets/images/illustration-01.png +0 -0
- data/styleguide/assets/images/illustration-02.png +0 -0
- data/styleguide/assets/images/illustration-03.png +0 -0
- data/styleguide/assets/images/illustration-04.png +0 -0
- data/styleguide/assets/images/illustration-05.png +0 -0
- data/styleguide/assets/images/illustration-06.png +0 -0
- data/styleguide/assets/images/illustration-07.png +0 -0
- data/styleguide/assets/images/illustration-08.png +0 -0
- data/styleguide/assets/images/infographic-01.png +0 -0
- data/styleguide/assets/images/infographic-02.png +0 -0
- data/styleguide/assets/images/lifestyle-photography-01.png +0 -0
- data/styleguide/assets/images/lifestyle-photography-02.png +0 -0
- data/styleguide/assets/images/lifestyle-photography-03.png +0 -0
- data/styleguide/assets/images/lifestyle-photography-04.png +0 -0
- data/styleguide/assets/images/lifestyle-photography-05.png +0 -0
- data/styleguide/assets/images/lifestyle-photography-06.png +0 -0
- data/styleguide/assets/images/lifestyle-photography-07.png +0 -0
- data/styleguide/assets/images/lifestyle-photography-08.png +0 -0
- data/styleguide/assets/images/npm-logo.png +0 -0
- data/styleguide/assets/images/object-photography-01.png +0 -0
- data/styleguide/assets/images/object-photography-02.png +0 -0
- data/styleguide/assets/images/object-photography-03.png +0 -0
- data/styleguide/assets/images/object-photography-04.png +0 -0
- data/styleguide/assets/images/object-photography-05.png +0 -0
- data/styleguide/assets/images/object-photography-06.png +0 -0
- data/styleguide/assets/images/object-photography-07.png +0 -0
- data/styleguide/assets/images/object-photography-08.png +0 -0
- data/styleguide/assets/images/ruby-logo.png +0 -0
- data/styleguide/assets/images/ustyle.svg +73 -0
- data/styleguide/assets/javascripts/app.js +91 -0
- data/styleguide/assets/javascripts/modules/cleanWhiteSpace.js +34 -0
- data/styleguide/assets/javascripts/modules/stats.js +51 -0
- data/styleguide/assets/javascripts/vendor/highlight.js +1 -0
- data/styleguide/assets/sass/main.scss +152 -0
- data/styleguide/assets/sass/modules/_code.scss +8 -0
- data/styleguide/assets/sass/modules/_colours.scss +25 -0
- data/styleguide/assets/sass/modules/_copyright.scss +4 -0
- data/styleguide/assets/sass/modules/_grid.scss +12 -0
- data/styleguide/assets/sass/modules/_home.scss +5 -0
- data/styleguide/assets/sass/modules/_links.scss +3 -0
- data/styleguide/assets/sass/modules/_logo.scss +56 -0
- data/styleguide/assets/sass/modules/_made-at.scss +6 -0
- data/styleguide/assets/sass/modules/_markdown.scss +7 -0
- data/styleguide/assets/sass/modules/_nav-mobile.scss +72 -0
- data/styleguide/assets/sass/modules/_nav.scss +32 -0
- data/styleguide/assets/sass/modules/_sidebar.scss +94 -0
- data/styleguide/assets/sass/modules/_states.scss +4 -0
- data/styleguide/assets/sass/modules/_styleguide.scss +134 -0
- data/styleguide/assets/sass/modules/_table.scss +3 -0
- data/styleguide/assets/sass/modules/_tooltip.scss +9 -0
- data/styleguide/assets/sass/modules/_typography.scss +14 -0
- data/styleguide/assets/sass/modules/_version.scss +11 -0
- data/styleguide/assets/sass/structure/_base.scss +18 -0
- data/styleguide/assets/sass/structure/_header.scss +12 -0
- data/styleguide/assets/sass/vendor/_highlight.scss +139 -0
- data/styleguide/assets/sass/vendor/_pure-table.scss +75 -0
- data/styleguide/content/brand/index.md +47 -0
- data/styleguide/content/brand/language.md +102 -0
- data/styleguide/content/brand/logo.tpl +102 -0
- data/styleguide/content/design/index.tpl +79 -0
- data/styleguide/content/design/typography.md +30 -0
- data/styleguide/content/index.tpl +44 -0
- data/styleguide/content/pattern-library/grid.tpl +64 -0
- data/styleguide/content/pattern-library/index.tpl +92 -0
- data/styleguide/partials/_footer.tpl +8 -0
- data/styleguide/partials/_head.tpl +20 -0
- data/styleguide/partials/_header.tpl +7 -0
- data/styleguide/partials/_sidebar.tpl +22 -0
- data/styleguide/partials/colour.tpl +24 -0
- data/styleguide/partials/icons.tpl +28 -0
- data/styleguide/partials/style_block.tpl +44 -0
- data/styleguide/templates/simple.tpl +15 -0
- data/styleguide/templates/stats.tpl +50 -0
- data/styleguide/templates/styleguide.tpl +33 -0
- data/tasks/publish.rake +65 -0
- data/ustyle.gemspec +34 -0
- data/vendor/assets/images/icons/16px/alarm.png +0 -0
- data/vendor/assets/images/icons/16px/android.png +0 -0
- data/vendor/assets/images/icons/16px/angry.png +0 -0
- data/vendor/assets/images/icons/16px/apple.png +0 -0
- data/vendor/assets/images/icons/16px/arrow-circle.png +0 -0
- data/vendor/assets/images/icons/16px/arrow-up-left.png +0 -0
- data/vendor/assets/images/icons/16px/arrow-up.png +0 -0
- data/vendor/assets/images/icons/16px/barchart.png +0 -0
- data/vendor/assets/images/icons/16px/blackberry.png +0 -0
- data/vendor/assets/images/icons/16px/book.png +0 -0
- data/vendor/assets/images/icons/16px/bookmark.png +0 -0
- data/vendor/assets/images/icons/16px/breadcrumb.png +0 -0
- data/vendor/assets/images/icons/16px/calculator.png +0 -0
- data/vendor/assets/images/icons/16px/calendar.png +0 -0
- data/vendor/assets/images/icons/16px/car.png +0 -0
- data/vendor/assets/images/icons/16px/checkbox-tick.png +0 -0
- data/vendor/assets/images/icons/16px/clock.png +0 -0
- data/vendor/assets/images/icons/16px/close.png +0 -0
- data/vendor/assets/images/icons/16px/cog.png +0 -0
- data/vendor/assets/images/icons/16px/controller.png +0 -0
- data/vendor/assets/images/icons/16px/credit-card.png +0 -0
- data/vendor/assets/images/icons/16px/cross.png +0 -0
- data/vendor/assets/images/icons/16px/desktop.png +0 -0
- data/vendor/assets/images/icons/16px/doc.png +0 -0
- data/vendor/assets/images/icons/16px/down-arrow.png +0 -0
- data/vendor/assets/images/icons/16px/dual-fuel.png +0 -0
- data/vendor/assets/images/icons/16px/electric-light.png +0 -0
- data/vendor/assets/images/icons/16px/envelope.png +0 -0
- data/vendor/assets/images/icons/16px/exit-noexit.png +0 -0
- data/vendor/assets/images/icons/16px/facebook.png +0 -0
- data/vendor/assets/images/icons/16px/filter.png +0 -0
- data/vendor/assets/images/icons/16px/fixed-variable.png +0 -0
- data/vendor/assets/images/icons/16px/gas.png +0 -0
- data/vendor/assets/images/icons/16px/gauge.png +0 -0
- data/vendor/assets/images/icons/16px/github.png +0 -0
- data/vendor/assets/images/icons/16px/google.png +0 -0
- data/vendor/assets/images/icons/16px/graph-up.png +0 -0
- data/vendor/assets/images/icons/16px/happy.png +0 -0
- data/vendor/assets/images/icons/16px/home.png +0 -0
- data/vendor/assets/images/icons/16px/hot.png +0 -0
- data/vendor/assets/images/icons/16px/info.png +0 -0
- data/vendor/assets/images/icons/16px/kettle.png +0 -0
- data/vendor/assets/images/icons/16px/key.png +0 -0
- data/vendor/assets/images/icons/16px/laptop.png +0 -0
- data/vendor/assets/images/icons/16px/lock.png +0 -0
- data/vendor/assets/images/icons/16px/magnify-in.png +0 -0
- data/vendor/assets/images/icons/16px/magnify-out.png +0 -0
- data/vendor/assets/images/icons/16px/magnify.png +0 -0
- data/vendor/assets/images/icons/16px/menu.png +0 -0
- data/vendor/assets/images/icons/16px/message.png +0 -0
- data/vendor/assets/images/icons/16px/mobile.png +0 -0
- data/vendor/assets/images/icons/16px/monthly-dd.png +0 -0
- data/vendor/assets/images/icons/16px/neutral.png +0 -0
- data/vendor/assets/images/icons/16px/no-exit.png +0 -0
- data/vendor/assets/images/icons/16px/pdf.png +0 -0
- data/vendor/assets/images/icons/16px/pencil.png +0 -0
- data/vendor/assets/images/icons/16px/person-add.png +0 -0
- data/vendor/assets/images/icons/16px/person.png +0 -0
- data/vendor/assets/images/icons/16px/phone.png +0 -0
- data/vendor/assets/images/icons/16px/piggy-bank.png +0 -0
- data/vendor/assets/images/icons/16px/pin.png +0 -0
- data/vendor/assets/images/icons/16px/play.png +0 -0
- data/vendor/assets/images/icons/16px/pound-circle.png +0 -0
- data/vendor/assets/images/icons/16px/pound-note.png +0 -0
- data/vendor/assets/images/icons/16px/power.png +0 -0
- data/vendor/assets/images/icons/16px/present.png +0 -0
- data/vendor/assets/images/icons/16px/print.png +0 -0
- data/vendor/assets/images/icons/16px/quarterly-dd.png +0 -0
- data/vendor/assets/images/icons/16px/question-circle.png +0 -0
- data/vendor/assets/images/icons/16px/question.png +0 -0
- data/vendor/assets/images/icons/16px/quote.png +0 -0
- data/vendor/assets/images/icons/16px/recycle.png +0 -0
- data/vendor/assets/images/icons/16px/remove.png +0 -0
- data/vendor/assets/images/icons/16px/renewable.png +0 -0
- data/vendor/assets/images/icons/16px/results.png +0 -0
- data/vendor/assets/images/icons/16px/sad.png +0 -0
- data/vendor/assets/images/icons/16px/save.png +0 -0
- data/vendor/assets/images/icons/16px/share.png +0 -0
- data/vendor/assets/images/icons/16px/sim.png +0 -0
- data/vendor/assets/images/icons/16px/smiley.png +0 -0
- data/vendor/assets/images/icons/16px/sort.png +0 -0
- data/vendor/assets/images/icons/16px/speech-circle.png +0 -0
- data/vendor/assets/images/icons/16px/speech.png +0 -0
- data/vendor/assets/images/icons/16px/spinner 2.png +0 -0
- data/vendor/assets/images/icons/16px/spinner.png +0 -0
- data/vendor/assets/images/icons/16px/star-half.png +0 -0
- data/vendor/assets/images/icons/16px/star.png +0 -0
- data/vendor/assets/images/icons/16px/starline-half.png +0 -0
- data/vendor/assets/images/icons/16px/starline.png +0 -0
- data/vendor/assets/images/icons/16px/tablet.png +0 -0
- data/vendor/assets/images/icons/16px/talk.png +0 -0
- data/vendor/assets/images/icons/16px/tick-circle.png +0 -0
- data/vendor/assets/images/icons/16px/tick.png +0 -0
- data/vendor/assets/images/icons/16px/tv.png +0 -0
- data/vendor/assets/images/icons/16px/twitter.png +0 -0
- data/vendor/assets/images/icons/16px/ustyle.png +0 -0
- data/vendor/assets/images/icons/16px/uswitch.png +0 -0
- data/vendor/assets/images/icons/16px/variable.png +0 -0
- data/vendor/assets/images/icons/16px/warning-circle.png +0 -0
- data/vendor/assets/images/icons/16px/warning.png +0 -0
- data/vendor/assets/images/icons/16px/wifi.png +0 -0
- data/vendor/assets/images/icons/16px/wiki.png +0 -0
- data/vendor/assets/images/icons/16px/windows.png +0 -0
- data/vendor/assets/images/icons/16px/wondering.png +0 -0
- data/vendor/assets/images/icons/16px/world.png +0 -0
- data/vendor/assets/images/icons/16px/xml.png +0 -0
- data/vendor/assets/images/icons/32px/alarm.png +0 -0
- data/vendor/assets/images/icons/32px/android.png +0 -0
- data/vendor/assets/images/icons/32px/angry.png +0 -0
- data/vendor/assets/images/icons/32px/apple.png +0 -0
- data/vendor/assets/images/icons/32px/arrow-circle.png +0 -0
- data/vendor/assets/images/icons/32px/arrow-up-left.png +0 -0
- data/vendor/assets/images/icons/32px/arrow-up.png +0 -0
- data/vendor/assets/images/icons/32px/barchart.png +0 -0
- data/vendor/assets/images/icons/32px/blackberry.png +0 -0
- data/vendor/assets/images/icons/32px/book.png +0 -0
- data/vendor/assets/images/icons/32px/bookmark.png +0 -0
- data/vendor/assets/images/icons/32px/breadcrumb.png +0 -0
- data/vendor/assets/images/icons/32px/calculator.png +0 -0
- data/vendor/assets/images/icons/32px/calendar.png +0 -0
- data/vendor/assets/images/icons/32px/car.png +0 -0
- data/vendor/assets/images/icons/32px/checkbox-tick.png +0 -0
- data/vendor/assets/images/icons/32px/clock.png +0 -0
- data/vendor/assets/images/icons/32px/close.png +0 -0
- data/vendor/assets/images/icons/32px/cog.png +0 -0
- data/vendor/assets/images/icons/32px/controller.png +0 -0
- data/vendor/assets/images/icons/32px/credit-card.png +0 -0
- data/vendor/assets/images/icons/32px/cross.png +0 -0
- data/vendor/assets/images/icons/32px/desktop.png +0 -0
- data/vendor/assets/images/icons/32px/doc.png +0 -0
- data/vendor/assets/images/icons/32px/down-arrow.png +0 -0
- data/vendor/assets/images/icons/32px/dual-fuel.png +0 -0
- data/vendor/assets/images/icons/32px/electric-light.png +0 -0
- data/vendor/assets/images/icons/32px/envelope.png +0 -0
- data/vendor/assets/images/icons/32px/exit-noexit.png +0 -0
- data/vendor/assets/images/icons/32px/facebook.png +0 -0
- data/vendor/assets/images/icons/32px/filter.png +0 -0
- data/vendor/assets/images/icons/32px/fixed-variable.png +0 -0
- data/vendor/assets/images/icons/32px/gas.png +0 -0
- data/vendor/assets/images/icons/32px/gauge.png +0 -0
- data/vendor/assets/images/icons/32px/github.png +0 -0
- data/vendor/assets/images/icons/32px/google.png +0 -0
- data/vendor/assets/images/icons/32px/graph-up.png +0 -0
- data/vendor/assets/images/icons/32px/happy.png +0 -0
- data/vendor/assets/images/icons/32px/home.png +0 -0
- data/vendor/assets/images/icons/32px/hot.png +0 -0
- data/vendor/assets/images/icons/32px/info.png +0 -0
- data/vendor/assets/images/icons/32px/kettle.png +0 -0
- data/vendor/assets/images/icons/32px/key.png +0 -0
- data/vendor/assets/images/icons/32px/laptop.png +0 -0
- data/vendor/assets/images/icons/32px/lock.png +0 -0
- data/vendor/assets/images/icons/32px/magnify-in.png +0 -0
- data/vendor/assets/images/icons/32px/magnify-out.png +0 -0
- data/vendor/assets/images/icons/32px/magnify.png +0 -0
- data/vendor/assets/images/icons/32px/menu.png +0 -0
- data/vendor/assets/images/icons/32px/message.png +0 -0
- data/vendor/assets/images/icons/32px/mobile.png +0 -0
- data/vendor/assets/images/icons/32px/monthly-dd.png +0 -0
- data/vendor/assets/images/icons/32px/neutral.png +0 -0
- data/vendor/assets/images/icons/32px/no-exit.png +0 -0
- data/vendor/assets/images/icons/32px/pdf.png +0 -0
- data/vendor/assets/images/icons/32px/pencil.png +0 -0
- data/vendor/assets/images/icons/32px/person-add.png +0 -0
- data/vendor/assets/images/icons/32px/person.png +0 -0
- data/vendor/assets/images/icons/32px/phone.png +0 -0
- data/vendor/assets/images/icons/32px/piggy-bank.png +0 -0
- data/vendor/assets/images/icons/32px/pin.png +0 -0
- data/vendor/assets/images/icons/32px/play.png +0 -0
- data/vendor/assets/images/icons/32px/pound-circle.png +0 -0
- data/vendor/assets/images/icons/32px/pound-note.png +0 -0
- data/vendor/assets/images/icons/32px/power.png +0 -0
- data/vendor/assets/images/icons/32px/present.png +0 -0
- data/vendor/assets/images/icons/32px/print.png +0 -0
- data/vendor/assets/images/icons/32px/quarterly-dd.png +0 -0
- data/vendor/assets/images/icons/32px/question-circle.png +0 -0
- data/vendor/assets/images/icons/32px/question.png +0 -0
- data/vendor/assets/images/icons/32px/quote.png +0 -0
- data/vendor/assets/images/icons/32px/recycle.png +0 -0
- data/vendor/assets/images/icons/32px/remove.png +0 -0
- data/vendor/assets/images/icons/32px/renewable.png +0 -0
- data/vendor/assets/images/icons/32px/results.png +0 -0
- data/vendor/assets/images/icons/32px/sad.png +0 -0
- data/vendor/assets/images/icons/32px/save.png +0 -0
- data/vendor/assets/images/icons/32px/share.png +0 -0
- data/vendor/assets/images/icons/32px/sim.png +0 -0
- data/vendor/assets/images/icons/32px/smiley.png +0 -0
- data/vendor/assets/images/icons/32px/sort.png +0 -0
- data/vendor/assets/images/icons/32px/speech-circle.png +0 -0
- data/vendor/assets/images/icons/32px/speech.png +0 -0
- data/vendor/assets/images/icons/32px/spinner 2.png +0 -0
- data/vendor/assets/images/icons/32px/spinner.png +0 -0
- data/vendor/assets/images/icons/32px/star-half.png +0 -0
- data/vendor/assets/images/icons/32px/star.png +0 -0
- data/vendor/assets/images/icons/32px/starline-half.png +0 -0
- data/vendor/assets/images/icons/32px/starline.png +0 -0
- data/vendor/assets/images/icons/32px/tablet.png +0 -0
- data/vendor/assets/images/icons/32px/talk.png +0 -0
- data/vendor/assets/images/icons/32px/tick-circle.png +0 -0
- data/vendor/assets/images/icons/32px/tick.png +0 -0
- data/vendor/assets/images/icons/32px/tv.png +0 -0
- data/vendor/assets/images/icons/32px/twitter.png +0 -0
- data/vendor/assets/images/icons/32px/ustyle.png +0 -0
- data/vendor/assets/images/icons/32px/uswitch.png +0 -0
- data/vendor/assets/images/icons/32px/variable.png +0 -0
- data/vendor/assets/images/icons/32px/warning-circle.png +0 -0
- data/vendor/assets/images/icons/32px/warning.png +0 -0
- data/vendor/assets/images/icons/32px/wifi.png +0 -0
- data/vendor/assets/images/icons/32px/wiki.png +0 -0
- data/vendor/assets/images/icons/32px/windows.png +0 -0
- data/vendor/assets/images/icons/32px/wondering.png +0 -0
- data/vendor/assets/images/icons/32px/world.png +0 -0
- data/vendor/assets/images/icons/32px/xml.png +0 -0
- data/vendor/assets/images/icons/64px/alarm.png +0 -0
- data/vendor/assets/images/icons/64px/android.png +0 -0
- data/vendor/assets/images/icons/64px/angry.png +0 -0
- data/vendor/assets/images/icons/64px/apple.png +0 -0
- data/vendor/assets/images/icons/64px/arrow-circle.png +0 -0
- data/vendor/assets/images/icons/64px/arrow-up-left.png +0 -0
- data/vendor/assets/images/icons/64px/arrow-up.png +0 -0
- data/vendor/assets/images/icons/64px/barchart.png +0 -0
- data/vendor/assets/images/icons/64px/blackberry.png +0 -0
- data/vendor/assets/images/icons/64px/book.png +0 -0
- data/vendor/assets/images/icons/64px/bookmark.png +0 -0
- data/vendor/assets/images/icons/64px/breadcrumb.png +0 -0
- data/vendor/assets/images/icons/64px/calculator.png +0 -0
- data/vendor/assets/images/icons/64px/calendar.png +0 -0
- data/vendor/assets/images/icons/64px/car.png +0 -0
- data/vendor/assets/images/icons/64px/checkbox-tick.png +0 -0
- data/vendor/assets/images/icons/64px/clock.png +0 -0
- data/vendor/assets/images/icons/64px/close.png +0 -0
- data/vendor/assets/images/icons/64px/cog.png +0 -0
- data/vendor/assets/images/icons/64px/controller.png +0 -0
- data/vendor/assets/images/icons/64px/credit-card.png +0 -0
- data/vendor/assets/images/icons/64px/cross.png +0 -0
- data/vendor/assets/images/icons/64px/desktop.png +0 -0
- data/vendor/assets/images/icons/64px/doc.png +0 -0
- data/vendor/assets/images/icons/64px/down-arrow.png +0 -0
- data/vendor/assets/images/icons/64px/dual-fuel.png +0 -0
- data/vendor/assets/images/icons/64px/electric-light.png +0 -0
- data/vendor/assets/images/icons/64px/envelope.png +0 -0
- data/vendor/assets/images/icons/64px/exit-noexit.png +0 -0
- data/vendor/assets/images/icons/64px/facebook.png +0 -0
- data/vendor/assets/images/icons/64px/filter.png +0 -0
- data/vendor/assets/images/icons/64px/fixed-variable.png +0 -0
- data/vendor/assets/images/icons/64px/gas.png +0 -0
- data/vendor/assets/images/icons/64px/gauge.png +0 -0
- data/vendor/assets/images/icons/64px/github.png +0 -0
- data/vendor/assets/images/icons/64px/google.png +0 -0
- data/vendor/assets/images/icons/64px/graph-up.png +0 -0
- data/vendor/assets/images/icons/64px/happy.png +0 -0
- data/vendor/assets/images/icons/64px/home.png +0 -0
- data/vendor/assets/images/icons/64px/hot.png +0 -0
- data/vendor/assets/images/icons/64px/info.png +0 -0
- data/vendor/assets/images/icons/64px/kettle.png +0 -0
- data/vendor/assets/images/icons/64px/key.png +0 -0
- data/vendor/assets/images/icons/64px/laptop.png +0 -0
- data/vendor/assets/images/icons/64px/lock.png +0 -0
- data/vendor/assets/images/icons/64px/magnify-in.png +0 -0
- data/vendor/assets/images/icons/64px/magnify-out.png +0 -0
- data/vendor/assets/images/icons/64px/magnify.png +0 -0
- data/vendor/assets/images/icons/64px/menu.png +0 -0
- data/vendor/assets/images/icons/64px/message.png +0 -0
- data/vendor/assets/images/icons/64px/mobile.png +0 -0
- data/vendor/assets/images/icons/64px/monthly-dd.png +0 -0
- data/vendor/assets/images/icons/64px/neutral.png +0 -0
- data/vendor/assets/images/icons/64px/no-exit.png +0 -0
- data/vendor/assets/images/icons/64px/pdf.png +0 -0
- data/vendor/assets/images/icons/64px/pencil.png +0 -0
- data/vendor/assets/images/icons/64px/person-add.png +0 -0
- data/vendor/assets/images/icons/64px/person.png +0 -0
- data/vendor/assets/images/icons/64px/phone.png +0 -0
- data/vendor/assets/images/icons/64px/piggy-bank.png +0 -0
- data/vendor/assets/images/icons/64px/pin.png +0 -0
- data/vendor/assets/images/icons/64px/play.png +0 -0
- data/vendor/assets/images/icons/64px/pound-circle.png +0 -0
- data/vendor/assets/images/icons/64px/pound-note.png +0 -0
- data/vendor/assets/images/icons/64px/power.png +0 -0
- data/vendor/assets/images/icons/64px/present.png +0 -0
- data/vendor/assets/images/icons/64px/print.png +0 -0
- data/vendor/assets/images/icons/64px/quarterly-dd.png +0 -0
- data/vendor/assets/images/icons/64px/question-circle.png +0 -0
- data/vendor/assets/images/icons/64px/question.png +0 -0
- data/vendor/assets/images/icons/64px/quote.png +0 -0
- data/vendor/assets/images/icons/64px/recycle.png +0 -0
- data/vendor/assets/images/icons/64px/remove.png +0 -0
- data/vendor/assets/images/icons/64px/renewable.png +0 -0
- data/vendor/assets/images/icons/64px/results.png +0 -0
- data/vendor/assets/images/icons/64px/sad.png +0 -0
- data/vendor/assets/images/icons/64px/save.png +0 -0
- data/vendor/assets/images/icons/64px/share.png +0 -0
- data/vendor/assets/images/icons/64px/sim.png +0 -0
- data/vendor/assets/images/icons/64px/smiley.png +0 -0
- data/vendor/assets/images/icons/64px/sort.png +0 -0
- data/vendor/assets/images/icons/64px/speech-circle.png +0 -0
- data/vendor/assets/images/icons/64px/speech.png +0 -0
- data/vendor/assets/images/icons/64px/spinner 2.png +0 -0
- data/vendor/assets/images/icons/64px/spinner.png +0 -0
- data/vendor/assets/images/icons/64px/star-half.png +0 -0
- data/vendor/assets/images/icons/64px/star.png +0 -0
- data/vendor/assets/images/icons/64px/starline-half.png +0 -0
- data/vendor/assets/images/icons/64px/starline.png +0 -0
- data/vendor/assets/images/icons/64px/tablet.png +0 -0
- data/vendor/assets/images/icons/64px/talk.png +0 -0
- data/vendor/assets/images/icons/64px/tick-circle.png +0 -0
- data/vendor/assets/images/icons/64px/tick.png +0 -0
- data/vendor/assets/images/icons/64px/tv.png +0 -0
- data/vendor/assets/images/icons/64px/twitter.png +0 -0
- data/vendor/assets/images/icons/64px/ustyle.png +0 -0
- data/vendor/assets/images/icons/64px/uswitch.png +0 -0
- data/vendor/assets/images/icons/64px/variable.png +0 -0
- data/vendor/assets/images/icons/64px/warning-circle.png +0 -0
- data/vendor/assets/images/icons/64px/warning.png +0 -0
- data/vendor/assets/images/icons/64px/wifi.png +0 -0
- data/vendor/assets/images/icons/64px/wiki.png +0 -0
- data/vendor/assets/images/icons/64px/windows.png +0 -0
- data/vendor/assets/images/icons/64px/wondering.png +0 -0
- data/vendor/assets/images/icons/64px/world.png +0 -0
- data/vendor/assets/images/icons/64px/xml.png +0 -0
- data/vendor/assets/images/icons/alarm.svg +1 -0
- data/vendor/assets/images/icons/android.svg +1 -0
- data/vendor/assets/images/icons/angry.svg +1 -0
- data/vendor/assets/images/icons/apple.svg +1 -0
- data/vendor/assets/images/icons/arrow-circle.svg +1 -0
- data/vendor/assets/images/icons/arrow-up-left.svg +1 -0
- data/vendor/assets/images/icons/arrow-up.svg +1 -0
- data/vendor/assets/images/icons/barchart.svg +1 -0
- data/vendor/assets/images/icons/blackberry.svg +1 -0
- data/vendor/assets/images/icons/book.svg +1 -0
- data/vendor/assets/images/icons/bookmark.svg +1 -0
- data/vendor/assets/images/icons/breadcrumb.svg +1 -0
- data/vendor/assets/images/icons/calculator.svg +1 -0
- data/vendor/assets/images/icons/calendar.svg +1 -0
- data/vendor/assets/images/icons/car.svg +1 -0
- data/vendor/assets/images/icons/checkbox-tick.svg +1 -0
- data/vendor/assets/images/icons/clock.svg +1 -0
- data/vendor/assets/images/icons/close.svg +1 -0
- data/vendor/assets/images/icons/cog.svg +1 -0
- data/vendor/assets/images/icons/controller.svg +1 -0
- data/vendor/assets/images/icons/credit-card.svg +1 -0
- data/vendor/assets/images/icons/cross.svg +1 -0
- data/vendor/assets/images/icons/desktop.svg +1 -0
- data/vendor/assets/images/icons/doc.svg +1 -0
- data/vendor/assets/images/icons/down-arrow.svg +1 -0
- data/vendor/assets/images/icons/dual-fuel.svg +1 -0
- data/vendor/assets/images/icons/electric-light.svg +1 -0
- data/vendor/assets/images/icons/envelope.svg +1 -0
- data/vendor/assets/images/icons/exit-noexit.svg +1 -0
- data/vendor/assets/images/icons/facebook.svg +1 -0
- data/vendor/assets/images/icons/filter.svg +1 -0
- data/vendor/assets/images/icons/fixed-variable.svg +1 -0
- data/vendor/assets/images/icons/gas.svg +1 -0
- data/vendor/assets/images/icons/gauge.svg +1 -0
- data/vendor/assets/images/icons/github.svg +1 -0
- data/vendor/assets/images/icons/google.svg +1 -0
- data/vendor/assets/images/icons/graph-up.svg +1 -0
- data/vendor/assets/images/icons/happy.svg +1 -0
- data/vendor/assets/images/icons/home.svg +1 -0
- data/vendor/assets/images/icons/hot.svg +1 -0
- data/vendor/assets/images/icons/info.svg +1 -0
- data/vendor/assets/images/icons/kettle.svg +1 -0
- data/vendor/assets/images/icons/key.svg +1 -0
- data/vendor/assets/images/icons/laptop.svg +1 -0
- data/vendor/assets/images/icons/lock.svg +1 -0
- data/vendor/assets/images/icons/magnify-in.svg +1 -0
- data/vendor/assets/images/icons/magnify-out.svg +1 -0
- data/vendor/assets/images/icons/magnify.svg +1 -0
- data/vendor/assets/images/icons/menu.svg +1 -0
- data/vendor/assets/images/icons/message.svg +1 -0
- data/vendor/assets/images/icons/mobile.svg +1 -0
- data/vendor/assets/images/icons/monthly-dd.svg +1 -0
- data/vendor/assets/images/icons/neutral.svg +1 -0
- data/vendor/assets/images/icons/no-exit.svg +1 -0
- data/vendor/assets/images/icons/pdf.svg +1 -0
- data/vendor/assets/images/icons/pencil.svg +1 -0
- data/vendor/assets/images/icons/person-add.svg +1 -0
- data/vendor/assets/images/icons/person.svg +1 -0
- data/vendor/assets/images/icons/phone.svg +1 -0
- data/vendor/assets/images/icons/piggy-bank.svg +1 -0
- data/vendor/assets/images/icons/pin.svg +1 -0
- data/vendor/assets/images/icons/play.svg +1 -0
- data/vendor/assets/images/icons/pound-circle.svg +1 -0
- data/vendor/assets/images/icons/pound-note.svg +1 -0
- data/vendor/assets/images/icons/power.svg +1 -0
- data/vendor/assets/images/icons/present.svg +1 -0
- data/vendor/assets/images/icons/print.svg +1 -0
- data/vendor/assets/images/icons/quarterly-dd.svg +1 -0
- data/vendor/assets/images/icons/question-circle.svg +1 -0
- data/vendor/assets/images/icons/question.svg +1 -0
- data/vendor/assets/images/icons/quote.svg +1 -0
- data/vendor/assets/images/icons/recycle.svg +1 -0
- data/vendor/assets/images/icons/remove.svg +1 -0
- data/vendor/assets/images/icons/renewable.svg +1 -0
- data/vendor/assets/images/icons/results.svg +1 -0
- data/vendor/assets/images/icons/sad.svg +1 -0
- data/vendor/assets/images/icons/save.svg +1 -0
- data/vendor/assets/images/icons/share.svg +1 -0
- data/vendor/assets/images/icons/sim.svg +1 -0
- data/vendor/assets/images/icons/smiley.svg +1 -0
- data/vendor/assets/images/icons/sort.svg +1 -0
- data/vendor/assets/images/icons/speech-circle.svg +1 -0
- data/vendor/assets/images/icons/speech.svg +1 -0
- data/vendor/assets/images/icons/spinner 2.svg +1 -0
- data/vendor/assets/images/icons/spinner.svg +1 -0
- data/vendor/assets/images/icons/spinner_fallback.gif +0 -0
- data/vendor/assets/images/icons/star-half.svg +1 -0
- data/vendor/assets/images/icons/star.svg +1 -0
- data/vendor/assets/images/icons/starline-half.svg +1 -0
- data/vendor/assets/images/icons/starline.svg +1 -0
- data/vendor/assets/images/icons/tablet.svg +1 -0
- data/vendor/assets/images/icons/talk.svg +1 -0
- data/vendor/assets/images/icons/tick-circle.svg +1 -0
- data/vendor/assets/images/icons/tick.svg +1 -0
- data/vendor/assets/images/icons/tv.svg +1 -0
- data/vendor/assets/images/icons/twitter.svg +1 -0
- data/vendor/assets/images/icons/ustyle.svg +1 -0
- data/vendor/assets/images/icons/uswitch.svg +1 -0
- data/vendor/assets/images/icons/variable.svg +1 -0
- data/vendor/assets/images/icons/warning-circle.svg +1 -0
- data/vendor/assets/images/icons/warning.svg +1 -0
- data/vendor/assets/images/icons/wifi.svg +1 -0
- data/vendor/assets/images/icons/wiki.svg +1 -0
- data/vendor/assets/images/icons/windows.svg +1 -0
- data/vendor/assets/images/icons/wondering.svg +1 -0
- data/vendor/assets/images/icons/world.svg +1 -0
- data/vendor/assets/images/icons/xml.svg +1 -0
- data/vendor/assets/javascripts/ustyle/anchor.js +300 -0
- data/vendor/assets/javascripts/ustyle/backdrop.js +56 -0
- data/vendor/assets/javascripts/ustyle/classtoggler.js +58 -0
- data/vendor/assets/javascripts/ustyle/login/login.js +165 -0
- data/vendor/assets/javascripts/ustyle/login/password-helper.js +151 -0
- data/vendor/assets/javascripts/ustyle/overlay.js +125 -0
- data/vendor/assets/javascripts/ustyle/radioToggle.js +28 -0
- data/vendor/assets/javascripts/ustyle/tabs.js +120 -0
- data/vendor/assets/javascripts/ustyle/utils.js +106 -0
- data/vendor/assets/javascripts/ustyle.js +7 -0
- data/vendor/assets/stylesheets/ustyle/_all.scss +50 -0
- data/vendor/assets/stylesheets/ustyle/_content.scss +5 -0
- data/vendor/assets/stylesheets/ustyle/_global.scss +24 -0
- data/vendor/assets/stylesheets/ustyle/_icons.scss +20 -0
- data/vendor/assets/stylesheets/ustyle/articles/_base.scss +88 -0
- data/vendor/assets/stylesheets/ustyle/articles/_guide.scss +57 -0
- data/vendor/assets/stylesheets/ustyle/articles/_more.scss +31 -0
- data/vendor/assets/stylesheets/ustyle/articles/_news.scss +214 -0
- data/vendor/assets/stylesheets/ustyle/articles/_related.scss +74 -0
- data/vendor/assets/stylesheets/ustyle/basics/_extends.scss +69 -0
- data/vendor/assets/stylesheets/ustyle/basics/_font-face-ie.scss +31 -0
- data/vendor/assets/stylesheets/ustyle/basics/_font-face.scss +31 -0
- data/vendor/assets/stylesheets/ustyle/basics/_fonts.scss +27 -0
- data/vendor/assets/stylesheets/ustyle/basics/_functions.scss +78 -0
- data/vendor/assets/stylesheets/ustyle/basics/_grid.scss +86 -0
- data/vendor/assets/stylesheets/ustyle/basics/_typography.scss +123 -0
- data/vendor/assets/stylesheets/ustyle/basics/_variables.scss +188 -0
- data/vendor/assets/stylesheets/ustyle/basics/variables/_colors.scss +95 -0
- data/vendor/assets/stylesheets/ustyle/basics/variables/_forms.scss +65 -0
- data/vendor/assets/stylesheets/ustyle/basics/variables/_icons.scss +166 -0
- data/vendor/assets/stylesheets/ustyle/components/_anchor.scss +134 -0
- data/vendor/assets/stylesheets/ustyle/components/_backdrop.scss +19 -0
- data/vendor/assets/stylesheets/ustyle/components/_breadcrumbs.scss +59 -0
- data/vendor/assets/stylesheets/ustyle/components/_button.scss +184 -0
- data/vendor/assets/stylesheets/ustyle/components/_content-group.scss +33 -0
- data/vendor/assets/stylesheets/ustyle/components/_cta.scss +64 -0
- data/vendor/assets/stylesheets/ustyle/components/_featured.scss +112 -0
- data/vendor/assets/stylesheets/ustyle/components/_grid-classes.scss +52 -0
- data/vendor/assets/stylesheets/ustyle/components/_hero.scss +42 -0
- data/vendor/assets/stylesheets/ustyle/components/_links.scss +30 -0
- data/vendor/assets/stylesheets/ustyle/components/_lists-li.scss +89 -0
- data/vendor/assets/stylesheets/ustyle/components/_lists.scss +46 -0
- data/vendor/assets/stylesheets/ustyle/components/_loader.scss +142 -0
- data/vendor/assets/stylesheets/ustyle/components/_overlay.scss +183 -0
- data/vendor/assets/stylesheets/ustyle/components/_progress.scss +126 -0
- data/vendor/assets/stylesheets/ustyle/components/_tabs.scss +239 -0
- data/vendor/assets/stylesheets/ustyle/components/_tooltip.scss +244 -0
- data/vendor/assets/stylesheets/ustyle/components/_usp.scss +69 -0
- data/vendor/assets/stylesheets/ustyle/content/_base.scss +195 -0
- data/vendor/assets/stylesheets/ustyle/content/_c-header.scss +30 -0
- data/vendor/assets/stylesheets/ustyle/content/_c-social.scss +10 -0
- data/vendor/assets/stylesheets/ustyle/content/_c-tabs.scss +30 -0
- data/vendor/assets/stylesheets/ustyle/forms/_base.scss +9 -0
- data/vendor/assets/stylesheets/ustyle/forms/_fields.scss +75 -0
- data/vendor/assets/stylesheets/ustyle/forms/_input-group.scss +101 -0
- data/vendor/assets/stylesheets/ustyle/forms/_input.scss +63 -0
- data/vendor/assets/stylesheets/ustyle/forms/_radio-checkbox.scss +133 -0
- data/vendor/assets/stylesheets/ustyle/forms/_reset.scss +23 -0
- data/vendor/assets/stylesheets/ustyle/forms/_select.scss +125 -0
- data/vendor/assets/stylesheets/ustyle/forms/_textarea.scss +33 -0
- data/vendor/assets/stylesheets/ustyle/forms/_toggle.scss +125 -0
- data/vendor/assets/stylesheets/ustyle/forms/_validation.scss +104 -0
- data/vendor/assets/stylesheets/ustyle/icons/_base.scss +239 -0
- data/vendor/assets/stylesheets/ustyle/icons/_png.scss +37 -0
- data/vendor/assets/stylesheets/ustyle/icons/_svg.scss +29 -0
- data/vendor/assets/stylesheets/ustyle/login/_base.scss +81 -0
- data/vendor/assets/stylesheets/ustyle/login/_password-help.scss +61 -0
- data/vendor/assets/stylesheets/ustyle/login/_social.scss +63 -0
- data/vendor/assets/stylesheets/ustyle/mixins/_arrow.scss +51 -0
- data/vendor/assets/stylesheets/ustyle/mixins/_base.scss +8 -0
- data/vendor/assets/stylesheets/ustyle/mixins/_baseline.scss +41 -0
- data/vendor/assets/stylesheets/ustyle/mixins/_forms.scss +62 -0
- data/vendor/assets/stylesheets/ustyle/mixins/_general.scss +24 -0
- data/vendor/assets/stylesheets/ustyle/mixins/_link-colors.scss +44 -0
- data/vendor/assets/stylesheets/ustyle/mixins/_media-query.scss +116 -0
- data/vendor/assets/stylesheets/ustyle/mixins/_rgba-inline.scss +18 -0
- data/vendor/assets/stylesheets/ustyle/mixins/_typography.scss +98 -0
- data/vendor/assets/stylesheets/ustyle/tables/_base.scss +4 -0
- data/vendor/assets/stylesheets/ustyle/tables/_tables-basic.scss +72 -0
- data/vendor/assets/stylesheets/ustyle/tables/_tables-sortable.scss +72 -0
- data/vendor/assets/stylesheets/ustyle/tables/_tables-with-key-cells.scss +18 -0
- data/vendor/assets/stylesheets/ustyle/tables/_variables.scss +15 -0
- data/vendor/assets/stylesheets/ustyle/utilities/_general.scss +106 -0
- data/vendor/assets/stylesheets/ustyle/utilities/_grid.scss +13 -0
- data/vendor/assets/stylesheets/ustyle/utilities/_images.scss +34 -0
- data/vendor/assets/stylesheets/ustyle/utilities/_responsive.scss +101 -0
- data/vendor/assets/stylesheets/ustyle/utilities/_spacing.scss +74 -0
- data/vendor/assets/stylesheets/ustyle/vendor/normalize.scss +427 -0
- data/vendor/assets/stylesheets/ustyle-content.scss +2 -0
- data/vendor/assets/stylesheets/ustyle-icons.scss +1 -0
- data/vendor/assets/stylesheets/ustyle.scss +1 -0
- metadata +822 -0
@@ -0,0 +1,165 @@
|
|
1
|
+
var ref = this.Utils;
|
2
|
+
var addClass = ref.addClass;
|
3
|
+
var merge = ref.merge;
|
4
|
+
var setOptions = ref.setOptions;
|
5
|
+
var deleteUndefined = ref.deleteUndefined;
|
6
|
+
|
7
|
+
window.Login = (function(options) {
|
8
|
+
var Login;
|
9
|
+
return Login = (function() {
|
10
|
+
var passwordHelp;
|
11
|
+
|
12
|
+
Login.prototype.defaults = {
|
13
|
+
origin: window.location.href,
|
14
|
+
removeableClass: "us-login--removeable",
|
15
|
+
state: "signin"
|
16
|
+
};
|
17
|
+
|
18
|
+
function Login(options) {
|
19
|
+
var container;
|
20
|
+
this.options = setOptions(options, this.defaults);
|
21
|
+
if (this.options.target === null) {
|
22
|
+
return;
|
23
|
+
}
|
24
|
+
|
25
|
+
if (!(this.options.target.length === void 0 || this.options.target.length)) {
|
26
|
+
return;
|
27
|
+
}
|
28
|
+
|
29
|
+
this.target = $(this.options.target);
|
30
|
+
this.formData = {
|
31
|
+
source: this.target.data("source"),
|
32
|
+
origin: this.target.data("origin") || this.options.origin,
|
33
|
+
email: this.target.data("email"),
|
34
|
+
"opt_in": this.target.data("opt-in")
|
35
|
+
};
|
36
|
+
|
37
|
+
deleteUndefined(this.formData);
|
38
|
+
this.title = this.target.data("title") || this.options.title;
|
39
|
+
this.description = this.target.data("description");
|
40
|
+
container = document.createElement("div");
|
41
|
+
addClass(container, "us-anchor__target");
|
42
|
+
addClass(container, "us-login__target");
|
43
|
+
this.setupAnchors(container);
|
44
|
+
}
|
45
|
+
|
46
|
+
Login.prototype.setupAnchors = function(container) {
|
47
|
+
var i;
|
48
|
+
var len;
|
49
|
+
var ref1;
|
50
|
+
var results;
|
51
|
+
var target;
|
52
|
+
if (this.options.target.length >= 1) {
|
53
|
+
ref1 = this.options.target;
|
54
|
+
results = [];
|
55
|
+
|
56
|
+
for (i = 0, len = ref1.length; i < len; i++) {
|
57
|
+
target = ref1[i];
|
58
|
+
results.push(this.anchorInstance(target, container));
|
59
|
+
}
|
60
|
+
|
61
|
+
return results;
|
62
|
+
} else {
|
63
|
+
return this.anchorInstance(this.options.target, container);
|
64
|
+
}
|
65
|
+
};
|
66
|
+
|
67
|
+
Login.prototype.anchorInstance = function(target, container) {
|
68
|
+
return this.anchor = new Anchor({
|
69
|
+
target: target,
|
70
|
+
content: container,
|
71
|
+
isAjax: true,
|
72
|
+
onOpen: (function(_this) {
|
73
|
+
return function() {
|
74
|
+
return _this.fetch().done(function(html) {
|
75
|
+
var ref1;
|
76
|
+
|
77
|
+
if (!$(container).find(".us-login__form").length) {
|
78
|
+
$(container).append(html);
|
79
|
+
}
|
80
|
+
|
81
|
+
_this.loginForm = $(container).find(".us-login__form");
|
82
|
+
_this.loginContainer = $(container).find(".us-login");
|
83
|
+
_this.setState();
|
84
|
+
_this.setContent();
|
85
|
+
passwordHelp(_this.loginForm);
|
86
|
+
return (ref1 = _this.options.onOpen) != null ? ref1.call(target) : void 0;
|
87
|
+
});
|
88
|
+
};
|
89
|
+
})(this),
|
90
|
+
|
91
|
+
onClose: (function(_this) {
|
92
|
+
return function() {
|
93
|
+
var ref1;
|
94
|
+
if ((ref1 = _this.options.onClose) != null) {
|
95
|
+
ref1.call(target);
|
96
|
+
}
|
97
|
+
|
98
|
+
return _this.resetForm();
|
99
|
+
};
|
100
|
+
})(this)
|
101
|
+
});
|
102
|
+
};
|
103
|
+
|
104
|
+
Login.prototype.fetch = function() {
|
105
|
+
var jqxhr;
|
106
|
+
return jqxhr = $.ajax({
|
107
|
+
url: (window.uSwitch.Accounts.popupUrl()) + "?" + ($.param(this.formData)),
|
108
|
+
dataType: "jsonp"
|
109
|
+
});
|
110
|
+
};
|
111
|
+
|
112
|
+
Login.prototype.setState = function() {
|
113
|
+
var activeState = this.loginForm.filter(".us-login__form--" + this.options.state);
|
114
|
+
this.loginForm.removeClass("login-state--active");
|
115
|
+
activeState.addClass("login-state--active");
|
116
|
+
return this.toggle();
|
117
|
+
};
|
118
|
+
|
119
|
+
Login.prototype.toggle = function() {
|
120
|
+
return $(document).on("click", ".login-state__toggle", function(e) {
|
121
|
+
var $currentState = $(this).parents(".us-login__form");
|
122
|
+
var $nextState = $currentState.next().length ? $currentState.next() : $currentState.prev();
|
123
|
+
$nextState.addClass("login-state--active");
|
124
|
+
$currentState.removeClass("login-state--active");
|
125
|
+
return e.preventDefault();
|
126
|
+
});
|
127
|
+
};
|
128
|
+
|
129
|
+
Login.prototype.setContent = function() {
|
130
|
+
var descriptionElm;
|
131
|
+
var loginTitle;
|
132
|
+
var selector;
|
133
|
+
|
134
|
+
if (!this.title) {
|
135
|
+
return;
|
136
|
+
}
|
137
|
+
|
138
|
+
selector = "<h2 class='us-login__title ";
|
139
|
+
selector += this.options.removeableClass + "'>" + this.title + "</h2>";
|
140
|
+
loginTitle = $(selector);
|
141
|
+
this.loginContainer.prepend(loginTitle);
|
142
|
+
|
143
|
+
if (!this.description) {
|
144
|
+
return;
|
145
|
+
}
|
146
|
+
|
147
|
+
descriptionElm = "<p class='us-login__description ";
|
148
|
+
descriptionElm += this.options.removeableClass + "'>" + this.description + "</p>";
|
149
|
+
return loginTitle.after(descriptionElm);
|
150
|
+
};
|
151
|
+
|
152
|
+
Login.prototype.resetForm = function() {
|
153
|
+
return $("." + this.options.removeableClass).remove();
|
154
|
+
};
|
155
|
+
|
156
|
+
passwordHelp = function(form) {
|
157
|
+
return window.setTimeout(function() {
|
158
|
+
return form.find(".password-strength").passwordHelper();
|
159
|
+
}, 1);
|
160
|
+
};
|
161
|
+
|
162
|
+
return Login;
|
163
|
+
|
164
|
+
})();
|
165
|
+
})();
|
@@ -0,0 +1,151 @@
|
|
1
|
+
var slice = [].slice;
|
2
|
+
|
3
|
+
(function($, window, document) {
|
4
|
+
var PasswordHelper;
|
5
|
+
return PasswordHelper = (function() {
|
6
|
+
var createHiddenPassword;
|
7
|
+
var createWrapper;
|
8
|
+
var regMediumExp = "^(?=.*\\d)(?=.*[a-z])(?!.*\\s).{8,}$|" + "^(?=.*[a-z])(?=.*[A-Z])(?!.*\\s).{8,}$";
|
9
|
+
|
10
|
+
PasswordHelper.prototype.defaults = {
|
11
|
+
classPrefix: "pass-helper",
|
12
|
+
veryWeakText: "very weak",
|
13
|
+
minLength: 6,
|
14
|
+
tests: {
|
15
|
+
weak: new RegExp("^[a-zA-Z0-9]{6,}$"),
|
16
|
+
medium: new RegExp(regMediumExp),
|
17
|
+
strong: new RegExp("^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\\s).{8,}$")
|
18
|
+
},
|
19
|
+
showHide: true,
|
20
|
+
showText: "Show",
|
21
|
+
hideText: "Hide"
|
22
|
+
};
|
23
|
+
|
24
|
+
function PasswordHelper(el, options) {
|
25
|
+
this.tests = (this.options = $.extend({}, this.defaults, options)).tests;
|
26
|
+
this.$el = $(el);
|
27
|
+
|
28
|
+
if (this.$el.hasClass(this.options.classPrefix + "__input")) {
|
29
|
+
return;
|
30
|
+
}
|
31
|
+
|
32
|
+
this.$el.addClass(this.options.classPrefix + "__input");
|
33
|
+
this.wrapper = createWrapper(this.$el, this.options.classPrefix);
|
34
|
+
this.hiddenPassword = createHiddenPassword(this.$el, this.options.classPrefix);
|
35
|
+
this.strengthChecker();
|
36
|
+
|
37
|
+
if (this.options.showHide) {
|
38
|
+
this.showHide();
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
PasswordHelper.prototype.strengthChecker = function() {
|
43
|
+
var html = "<div class='" + this.options.classPrefix + "__meter'>";
|
44
|
+
html += "<div class='" + this.options.classPrefix + "__meter-bar' /></div>";
|
45
|
+
this.$el.after($(html));
|
46
|
+
var strengthMeter = $("." + this.options.classPrefix + "__meter-bar");
|
47
|
+
|
48
|
+
var strengthTest = (function(_this) {
|
49
|
+
return function(value) {
|
50
|
+
var condition;
|
51
|
+
if (!value.length) {
|
52
|
+
return strengthMeter.removeClass();
|
53
|
+
}
|
54
|
+
|
55
|
+
condition = value.length < _this.options.minLength;
|
56
|
+
|
57
|
+
if (condition) {
|
58
|
+
return strengthMeter.removeClass().addClass("very-weak");
|
59
|
+
}
|
60
|
+
|
61
|
+
return $.each(_this.tests, function(name, test) {
|
62
|
+
if (value.match(test)) {
|
63
|
+
return strengthMeter.removeClass().addClass(name);
|
64
|
+
}
|
65
|
+
});
|
66
|
+
};
|
67
|
+
})(this);
|
68
|
+
|
69
|
+
return $(document).on("keyup", "." + this.options.classPrefix + "__input", (function(_this) {
|
70
|
+
return function(e) {
|
71
|
+
var passwordValue;
|
72
|
+
passwordValue = $(e.target).val();
|
73
|
+
$("." + _this.options.classPrefix + "__input").addClass("strength--started");
|
74
|
+
|
75
|
+
if (!passwordValue.length) {
|
76
|
+
$("." + _this.options.classPrefix + "__input").removeClass("strength--started");
|
77
|
+
}
|
78
|
+
|
79
|
+
return strengthTest(passwordValue);
|
80
|
+
};
|
81
|
+
})(this));
|
82
|
+
};
|
83
|
+
|
84
|
+
PasswordHelper.prototype.showHide = function() {
|
85
|
+
var exp = "<a class='" + this.options.classPrefix + "__show-hide' />";
|
86
|
+
this.$el.after($(exp).text(this.options.showText));
|
87
|
+
var showClass = this.options.classPrefix + "__input--pass-shown";
|
88
|
+
return $("." + this.options.classPrefix + "__show-hide").on("click", (function(_this) {
|
89
|
+
return function(e) {
|
90
|
+
e.preventDefault();
|
91
|
+
|
92
|
+
if (!_this.$el.hasClass(showClass)) {
|
93
|
+
_this.$el.addClass(showClass);
|
94
|
+
_this.$el.prop("disabled", true).hide();
|
95
|
+
_this.hiddenPassword.prop("disabled", false).val(_this.$el.val()).show().focus();
|
96
|
+
return $(e.target).text(_this.options.hideText);
|
97
|
+
} else {
|
98
|
+
_this.$el.removeClass(showClass);
|
99
|
+
_this.$el.prop("disabled", false).val(_this.hiddenPassword.val()).show().focus();
|
100
|
+
_this.hiddenPassword.prop("disabled", true).hide();
|
101
|
+
return $(e.target).text(_this.options.showText);
|
102
|
+
}
|
103
|
+
};
|
104
|
+
})(this));
|
105
|
+
};
|
106
|
+
|
107
|
+
createHiddenPassword = function(el, classPrefix) {
|
108
|
+
var expression = "<input style='display: none' class='" + (el.attr("class")) + " ";
|
109
|
+
expression += classPrefix + "__input-hidden' type='text' ";
|
110
|
+
expression += "name='" + (el.attr("name")) + "' ";
|
111
|
+
expression += "placeholder='" + (el.attr("placeholder") || "") + "' ";
|
112
|
+
expression += "size='" + (el.attr("size")) + "' value='' disabled='disabled' />";
|
113
|
+
var input = $(expression);
|
114
|
+
el.after(input);
|
115
|
+
return input;
|
116
|
+
};
|
117
|
+
|
118
|
+
createWrapper = function(el, classPrefix) {
|
119
|
+
var wrapperCss = {
|
120
|
+
position: "relative",
|
121
|
+
height: el.css("height"),
|
122
|
+
display: el.css("display")
|
123
|
+
};
|
124
|
+
|
125
|
+
return el.wrap($("<div />").addClass(classPrefix + "__wrapper").css(wrapperCss));
|
126
|
+
};
|
127
|
+
|
128
|
+
$.fn.extend({
|
129
|
+
passwordHelper: function() {
|
130
|
+
var options = arguments[0];
|
131
|
+
var args = 2 <= arguments.length ? slice.call(arguments, 1) : [];
|
132
|
+
return this.each(function() {
|
133
|
+
var helper;
|
134
|
+
var $this = $(this);
|
135
|
+
var data = $(this).data("passwordHelper");
|
136
|
+
|
137
|
+
if (!data) {
|
138
|
+
helper = (data = new PasswordHelper(this, options));
|
139
|
+
$this.data("passwordHelper", helper);
|
140
|
+
}
|
141
|
+
|
142
|
+
if (typeof options === "string") {
|
143
|
+
return data[options].apply(data, args);
|
144
|
+
}
|
145
|
+
});
|
146
|
+
}
|
147
|
+
});
|
148
|
+
|
149
|
+
return PasswordHelper;
|
150
|
+
})();
|
151
|
+
})(window.jQuery, window, document);
|
@@ -0,0 +1,125 @@
|
|
1
|
+
window.Overlay = (function(Utils) {
|
2
|
+
var addClass = Utils.addClass;
|
3
|
+
var hasClass = Utils.hasClass;
|
4
|
+
var removeClass = Utils.removeClass;
|
5
|
+
var setOptions = Utils.setOptions;
|
6
|
+
var requestAnimationFrame = Utils.requestAnimationFrame;
|
7
|
+
|
8
|
+
var defaults = {
|
9
|
+
bodyActiveClass: "us-overlay--open",
|
10
|
+
activeClass: "us-overlay-parent--active",
|
11
|
+
visibleClass: "us-overlay-parent--visible",
|
12
|
+
overlay: $(".us-overlay-parent"),
|
13
|
+
openButton: ".js-open-overlay",
|
14
|
+
closeButton: ".js-close-overlay",
|
15
|
+
historyStatus: "#seedeal",
|
16
|
+
history: false,
|
17
|
+
preventDefault: true,
|
18
|
+
animationSpeed: 300
|
19
|
+
};
|
20
|
+
|
21
|
+
function Overlay(options) {
|
22
|
+
this.overlay = (this.options = setOptions(options, defaults)).overlay;
|
23
|
+
if ((this.overlay != null) && (typeof Backdrop !== "undefined" && Backdrop !== null)) {
|
24
|
+
this.backdrop = new Backdrop();
|
25
|
+
this.addEventListeners();
|
26
|
+
} else {
|
27
|
+
throw new Error("There's no overlay or you haven't included Backdrop");
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
Overlay.prototype.addEventListeners = function() {
|
32
|
+
$(this.options.openButton).on("click.open-overlay", (function(_this) {
|
33
|
+
return function(e) {
|
34
|
+
if (_this.options.preventDefault) {
|
35
|
+
e.preventDefault();
|
36
|
+
}
|
37
|
+
|
38
|
+
return _this.show(e);
|
39
|
+
};
|
40
|
+
})(this));
|
41
|
+
|
42
|
+
this.overlay.on("click.close-overlay", (function(_this) {
|
43
|
+
return function(e) {
|
44
|
+
var results = [];
|
45
|
+
var closeTargets = _this.overlay.find(_this.options.closeButton).toArray();
|
46
|
+
var targets = [_this.overlay[0]].concat(closeTargets);
|
47
|
+
|
48
|
+
for (var i = targets.length - 1; i >= 0; i--) {
|
49
|
+
var target = targets[i];
|
50
|
+
if (e.target === target) {
|
51
|
+
if (_this.options.preventDefault) {
|
52
|
+
e.preventDefault();
|
53
|
+
}
|
54
|
+
|
55
|
+
_this.hide(e);
|
56
|
+
break;
|
57
|
+
} else {
|
58
|
+
results.push(void 0);
|
59
|
+
}
|
60
|
+
};
|
61
|
+
|
62
|
+
return results;
|
63
|
+
};
|
64
|
+
})(this));
|
65
|
+
|
66
|
+
if (this.hasHistory()) {
|
67
|
+
return window.onpopstate = (function(_this) {
|
68
|
+
return function(e) {
|
69
|
+
if (_this.isOpen()) {
|
70
|
+
return _this.hide(e);
|
71
|
+
}
|
72
|
+
};
|
73
|
+
})(this);
|
74
|
+
}
|
75
|
+
};
|
76
|
+
|
77
|
+
Overlay.prototype.show = function(e) {
|
78
|
+
var onFrame;
|
79
|
+
var _this = this;
|
80
|
+
$(document.body).addClass(this.options.bodyActiveClass);
|
81
|
+
this.backdrop.retain();
|
82
|
+
addClass(this.overlay[0], this.options.visibleClass);
|
83
|
+
onFrame = function() {
|
84
|
+
addClass(_this.overlay[0], _this.options.activeClass);
|
85
|
+
return setTimeout(function() {
|
86
|
+
var base;
|
87
|
+
return typeof (base = _this.options).onOpen === "function" ? base.onOpen(e) : void 0;
|
88
|
+
}, _this.options.animationSpeed);
|
89
|
+
};
|
90
|
+
|
91
|
+
requestAnimationFrame.call(window, onFrame);
|
92
|
+
if (this.hasHistory()) {
|
93
|
+
return history.pushState("open", window.document.title, this.options.historyStatus);
|
94
|
+
}
|
95
|
+
};
|
96
|
+
|
97
|
+
Overlay.prototype.hide = function(e) {
|
98
|
+
var onFrame;
|
99
|
+
var _this = this;
|
100
|
+
$(document.body).removeClass(this.options.bodyActiveClass);
|
101
|
+
this.backdrop.release();
|
102
|
+
onFrame = function() {
|
103
|
+
removeClass(_this.overlay[0], _this.options.activeClass);
|
104
|
+
return setTimeout(function() {
|
105
|
+
var base;
|
106
|
+
removeClass(_this.overlay[0], _this.options.visibleClass);
|
107
|
+
return typeof (base = _this.options).onClose === "function" ? base.onClose(e) : void 0;
|
108
|
+
}, _this.options.animationSpeed);
|
109
|
+
};
|
110
|
+
|
111
|
+
requestAnimationFrame.call(window, onFrame);
|
112
|
+
if (this.hasHistory() && history.state === "open") return history.back();
|
113
|
+
};
|
114
|
+
|
115
|
+
Overlay.prototype.isOpen = function() {
|
116
|
+
return hasClass(this.overlay[0], this.options.activeClass);
|
117
|
+
};
|
118
|
+
|
119
|
+
Overlay.prototype.hasHistory = function() {
|
120
|
+
return this.options.history && window.history && window.history.pushState;
|
121
|
+
};
|
122
|
+
|
123
|
+
return Overlay;
|
124
|
+
|
125
|
+
})(this.Utils);
|
@@ -0,0 +1,28 @@
|
|
1
|
+
window.RadioToggle = (function() {
|
2
|
+
var defaults = {
|
3
|
+
$target: $(".us-toggle")
|
4
|
+
};
|
5
|
+
|
6
|
+
function RadioToggle(options) {
|
7
|
+
this.options = Utils.setOptions(options, defaults);
|
8
|
+
if (this.options.$target) {
|
9
|
+
this.addEventListeners();
|
10
|
+
} else {
|
11
|
+
throw new Error("No target defined");
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
RadioToggle.prototype.addEventListeners = function() {
|
16
|
+
return this.options.$target.on("change", "input:radio", function(e) {
|
17
|
+
$("input[name='" + this.name + "']").removeClass("checked");
|
18
|
+
if (this.checked) {
|
19
|
+
$(this).addClass("checked");
|
20
|
+
}
|
21
|
+
|
22
|
+
return e.stopPropagation();
|
23
|
+
});
|
24
|
+
};
|
25
|
+
|
26
|
+
return RadioToggle;
|
27
|
+
|
28
|
+
})();
|
@@ -0,0 +1,120 @@
|
|
1
|
+
var setOptions = this.Utils.setOptions;
|
2
|
+
|
3
|
+
window.Tabs = (function(options) {
|
4
|
+
var Tabs;
|
5
|
+
return Tabs = (function() {
|
6
|
+
var getSelector;
|
7
|
+
|
8
|
+
Tabs.prototype.defaults = {
|
9
|
+
tabContainer: ".us-tabs",
|
10
|
+
tabLinks: ".us-tabs-nav-mainlink",
|
11
|
+
tabNav: ".us-tabs-nav",
|
12
|
+
changeUrls: true,
|
13
|
+
activeClass: "active",
|
14
|
+
collapsible: false,
|
15
|
+
autoScroll: true
|
16
|
+
};
|
17
|
+
|
18
|
+
function Tabs(options) {
|
19
|
+
var ref = this.options = setOptions(options, this.defaults);
|
20
|
+
var tabContainer = ref.tabContainer;
|
21
|
+
var tabLinks = ref.tabLinks;
|
22
|
+
|
23
|
+
this.tabs = $(tabContainer).find(tabLinks);
|
24
|
+
this.filter = this.tabs.data("target") ? "data-target" : "href";
|
25
|
+
this.init();
|
26
|
+
this.tabs.on("click.ustyle.tab", (function(_this) {
|
27
|
+
return function(e) {
|
28
|
+
var $target = $(e.currentTarget);
|
29
|
+
if (_this.isAccordion() && _this.options.collapsible && _this.isActive($target)) {
|
30
|
+
_this.collapse($target);
|
31
|
+
_this.hashClear();
|
32
|
+
} else {
|
33
|
+
_this.navigateTo($target);
|
34
|
+
_this.scrollToTab($target);
|
35
|
+
_this.hashChange($target);
|
36
|
+
}
|
37
|
+
|
38
|
+
return e.preventDefault();
|
39
|
+
};
|
40
|
+
})(this));
|
41
|
+
}
|
42
|
+
|
43
|
+
Tabs.prototype.init = function() {
|
44
|
+
var $activeTab = this.activeTab();
|
45
|
+
var $initialHash = this.tabFromHash();
|
46
|
+
|
47
|
+
if ($initialHash.length) {
|
48
|
+
return this.navigateTo($initialHash);
|
49
|
+
} else if ($activeTab.length) {
|
50
|
+
return this.navigateTo($activeTab);
|
51
|
+
} else if (!this.options.collapsible || !this.isAccordion()) {
|
52
|
+
return this.navigateTo(this.tabs.first());
|
53
|
+
}
|
54
|
+
};
|
55
|
+
|
56
|
+
Tabs.prototype.hashChange = function(target) {
|
57
|
+
if (!this.options.changeUrls) {
|
58
|
+
return;
|
59
|
+
}
|
60
|
+
|
61
|
+
return location.replace("#!" + (getSelector(target).replace(/#/, "")));
|
62
|
+
};
|
63
|
+
|
64
|
+
Tabs.prototype.hashClear = function() {
|
65
|
+
if (!this.options.changeUrls) {
|
66
|
+
return;
|
67
|
+
}
|
68
|
+
|
69
|
+
var url = window.location.pathname + window.location.search;
|
70
|
+
return typeof history.replaceState === "function" ? history.replaceState("", document.title, url) : void 0;
|
71
|
+
};
|
72
|
+
|
73
|
+
Tabs.prototype.navigateTo = function(target) {
|
74
|
+
var selector = getSelector(target);
|
75
|
+
var $selected = $(selector);
|
76
|
+
this.tabs.removeClass(this.options.activeClass).end();
|
77
|
+
this.tabs.filter("[" + this.filter + "='" + selector + "']").addClass(this.options.activeClass);
|
78
|
+
$selected.siblings("." + this.options.activeClass).removeClass(this.options.activeClass).end().addClass(this.options.activeClass);
|
79
|
+
return $selected.trigger("ustyle.tab.active");
|
80
|
+
};
|
81
|
+
|
82
|
+
Tabs.prototype.collapse = function(target) {
|
83
|
+
var $selected = $(getSelector(target));
|
84
|
+
this.tabs.removeClass(this.options.activeClass).end();
|
85
|
+
return $selected.removeClass(this.options.activeClass);
|
86
|
+
};
|
87
|
+
|
88
|
+
Tabs.prototype.scrollToTab = function(target) {
|
89
|
+
if (!(this.isAccordion() && this.options.autoScroll)) {
|
90
|
+
return;
|
91
|
+
}
|
92
|
+
|
93
|
+
var $selected = $(getSelector(target));
|
94
|
+
return $("html,body").scrollTop($selected.offset().top);
|
95
|
+
};
|
96
|
+
|
97
|
+
Tabs.prototype.activeTab = function() {
|
98
|
+
return this.tabs.filter("." + this.options.activeClass);
|
99
|
+
};
|
100
|
+
|
101
|
+
Tabs.prototype.tabFromHash = function() {
|
102
|
+
var tabId = location.hash.replace("!", "");
|
103
|
+
return this.tabs.filter("[" + this.filter + "='" + tabId + "']");
|
104
|
+
};
|
105
|
+
|
106
|
+
Tabs.prototype.isActive = function(target) {
|
107
|
+
return getSelector(target) === getSelector(this.activeTab());
|
108
|
+
};
|
109
|
+
|
110
|
+
Tabs.prototype.isAccordion = function() {
|
111
|
+
return !$(this.options.tabNav).is(":visible");
|
112
|
+
};
|
113
|
+
|
114
|
+
getSelector = function(clicked) {
|
115
|
+
return clicked.data("target") || clicked.attr("href");
|
116
|
+
};
|
117
|
+
|
118
|
+
return Tabs;
|
119
|
+
})();
|
120
|
+
})();
|
@@ -0,0 +1,106 @@
|
|
1
|
+
var slice = [].slice;
|
2
|
+
var hasProp = {}.hasOwnProperty;
|
3
|
+
|
4
|
+
if (this.Utils == null) {
|
5
|
+
this.Utils = {
|
6
|
+
modules: []
|
7
|
+
};
|
8
|
+
}
|
9
|
+
|
10
|
+
var addClass = function(element, name) {
|
11
|
+
removeClass(element, name);
|
12
|
+
return element.className += " " + name + " ";
|
13
|
+
};
|
14
|
+
|
15
|
+
var removeClass = function(element, name) {
|
16
|
+
var regExp = new RegExp("(\\s|^)" + name + "(\\s|$)", "gi");
|
17
|
+
return element.className = element.className.replace(regExp, "");
|
18
|
+
};
|
19
|
+
|
20
|
+
var hasClass = function(element, name) {
|
21
|
+
return new RegExp("(^| )" + name + "( |$)", "gi").test(element.className);
|
22
|
+
};
|
23
|
+
|
24
|
+
var merge = function() {
|
25
|
+
var extension;
|
26
|
+
var i;
|
27
|
+
var len;
|
28
|
+
var property;
|
29
|
+
var target = arguments[0];
|
30
|
+
var extensions = 2 <= arguments.length ? slice.call(arguments, 1) : [];
|
31
|
+
|
32
|
+
for (i = 0, len = extensions.length; i < len; i++) {
|
33
|
+
extension = extensions[i];
|
34
|
+
for (property in extension) {
|
35
|
+
if (!hasProp.call(extension, property)) continue;
|
36
|
+
target[property] = extension[property];
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
return target;
|
41
|
+
};
|
42
|
+
|
43
|
+
var setOptions = function(options, defaults) {
|
44
|
+
return merge({}, defaults, options);
|
45
|
+
};
|
46
|
+
|
47
|
+
var deleteUndefined = function(obj) {
|
48
|
+
var key;
|
49
|
+
var value;
|
50
|
+
var results = [];
|
51
|
+
for (key in obj) {
|
52
|
+
value = obj[key];
|
53
|
+
if (value === null || value === void 0) {
|
54
|
+
results.push(delete obj[key]);
|
55
|
+
} else {
|
56
|
+
results.push(void 0);
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
return results;
|
61
|
+
};
|
62
|
+
|
63
|
+
var transformKey = (function() {
|
64
|
+
var i;
|
65
|
+
var key;
|
66
|
+
var len;
|
67
|
+
var el = document.createElement("div");
|
68
|
+
var transforms = ["transform", "webkitTransform", "OTransform", "MozTransform", "msTransform"];
|
69
|
+
for (i = 0, len = transforms.length; i < len; i++) {
|
70
|
+
key = transforms[i];
|
71
|
+
if (el.style[key] !== void 0) {
|
72
|
+
return key;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
})();
|
76
|
+
|
77
|
+
var requestAnimationFrame = (function(window) {
|
78
|
+
var i;
|
79
|
+
var len;
|
80
|
+
var vendor;
|
81
|
+
var ref = ["ms", "moz", "webkit", "o"];
|
82
|
+
|
83
|
+
for (i = 0, len = ref.length; i < len; i++) {
|
84
|
+
vendor = ref[i];
|
85
|
+
if (window.requestAnimationFrame) {
|
86
|
+
break;
|
87
|
+
}
|
88
|
+
|
89
|
+
window.requestAnimationFrame = window[vendor + "RequestAnimationFrame"];
|
90
|
+
}
|
91
|
+
|
92
|
+
return window.requestAnimationFrame || (window.requestAnimationFrame = function(callback) {
|
93
|
+
return setTimeout(callback, 1000 / 60);
|
94
|
+
});
|
95
|
+
})(window);
|
96
|
+
|
97
|
+
this.Utils = {
|
98
|
+
addClass: addClass,
|
99
|
+
removeClass: removeClass,
|
100
|
+
hasClass: hasClass,
|
101
|
+
merge: merge,
|
102
|
+
setOptions: setOptions,
|
103
|
+
deleteUndefined: deleteUndefined,
|
104
|
+
transformKey: transformKey,
|
105
|
+
requestAnimationFrame: requestAnimationFrame
|
106
|
+
};
|