roda-component 0.0.10 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gems +3 -0
- data/.gitignore +2 -1
- data/.ruby-version +1 -1
- data/Gemfile +13 -0
- data/Makefile +18 -23
- data/Rakefile +0 -1
- data/lib/roda/component.rb +98 -44
- data/lib/roda/component/dom.rb +27 -17
- data/lib/roda/component/events.rb +58 -19
- data/lib/roda/component/faye.rb +131 -34
- data/lib/roda/component/form.rb +64 -0
- data/lib/roda/component/form/validations.rb +204 -0
- data/lib/roda/component/version.rb +1 -1
- data/lib/roda/plugins/component.rb +54 -24
- data/roda-component.gemspec +17 -7
- data/test/component_test.rb +20 -5
- data/test/dummy/.bowerrc +3 -0
- data/test/dummy/.sass-cache/00f9c07200bf85fc7effbdcbe3ee44551cdb2ce5/login.scssc +0 -0
- data/test/dummy/app.rb +99 -9
- data/test/dummy/bower.json +21 -0
- data/test/dummy/components/chat.rb +50 -0
- data/test/dummy/components/forms/login.rb +20 -0
- data/test/dummy/components/layout.rb +22 -2
- data/test/dummy/components/login.rb +123 -0
- data/test/dummy/components/theme.rb +89 -0
- data/test/dummy/config.ru +18 -0
- data/test/dummy/constants.rb +3 -0
- data/test/dummy/dummy.db +0 -0
- data/test/dummy/models/user.rb +20 -0
- data/test/dummy/public/AdminLTE-master/.gitignore +2 -0
- data/test/dummy/public/AdminLTE-master/LICENSE +20 -0
- data/test/dummy/public/AdminLTE-master/README.md +104 -0
- data/test/dummy/public/AdminLTE-master/ajax/dashboard-boxrefresh-demo.php +64 -0
- data/test/dummy/public/AdminLTE-master/composer.json +24 -0
- data/test/dummy/public/AdminLTE-master/css/AdminLTE.css +3539 -0
- data/test/dummy/public/AdminLTE-master/css/bootstrap-slider/slider.css +169 -0
- data/test/dummy/public/AdminLTE-master/css/bootstrap-wysihtml5/bootstrap3-wysihtml5.css +102 -0
- data/test/dummy/public/AdminLTE-master/css/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css +3 -0
- data/test/dummy/public/AdminLTE-master/css/colorpicker/bootstrap-colorpicker.css +214 -0
- data/test/dummy/public/AdminLTE-master/css/colorpicker/bootstrap-colorpicker.min.css +9 -0
- data/test/dummy/public/AdminLTE-master/css/datatables/dataTables.bootstrap.css +223 -0
- data/test/dummy/public/AdminLTE-master/css/datatables/images/sort_asc.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/datatables/images/sort_asc_disabled.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/datatables/images/sort_both.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/datatables/images/sort_desc.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/datatables/images/sort_desc_disabled.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/datepicker/datepicker3.css +790 -0
- data/test/dummy/public/AdminLTE-master/css/daterangepicker/daterangepicker-bs3.css +245 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/all.css +61 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/_all.css +560 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/aero.css +56 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/aero.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/aero@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/blue.css +56 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/blue.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/blue@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/flat.css +56 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/flat.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/flat@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/green.css +56 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/green.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/green@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/grey.css +56 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/grey.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/grey@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/orange.css +56 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/orange.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/orange@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/pink.css +56 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/pink.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/pink@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/purple.css +56 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/purple.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/purple@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/red.css +56 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/red.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/red@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/yellow.css +56 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/yellow.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/flat/yellow@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/futurico/futurico.css +56 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/futurico/futurico.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/futurico/futurico@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/line/_all.css +740 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/line/aero.css +74 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/line/blue.css +74 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/line/green.css +74 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/line/grey.css +74 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/line/line.css +74 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/line/line.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/line/line@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/line/orange.css +74 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/line/pink.css +74 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/line/purple.css +74 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/line/red.css +74 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/line/yellow.css +74 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/_all.css +557 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/aero.css +62 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/aero.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/aero@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/blue.css +62 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/blue.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/blue@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/green.css +62 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/green.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/green@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/grey.css +62 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/grey.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/grey@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/minimal.css +62 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/minimal.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/minimal@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/orange.css +62 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/orange.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/orange@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/pink.css +62 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/pink.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/pink@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/purple.css +62 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/purple.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/purple@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/red.css +62 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/red.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/red@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/yellow.css +62 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/yellow.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/minimal/yellow@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/polaris/polaris.css +62 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/polaris/polaris.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/polaris/polaris@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/_all.css +620 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/aero.css +62 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/aero.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/aero@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/blue.css +62 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/blue.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/blue@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/green.css +62 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/green.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/green@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/grey.css +62 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/grey.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/grey@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/orange.css +62 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/orange.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/orange@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/pink.css +62 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/pink.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/pink@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/purple.css +62 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/purple.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/purple@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/red.css +62 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/red.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/red@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/square.css +62 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/square.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/square@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/yellow.css +62 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/yellow.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/iCheck/square/yellow@2x.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/images/animated-overlay.gif +0 -0
- data/test/dummy/public/AdminLTE-master/css/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/images/ui-icons_217bc0_256x240.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/images/ui-icons_2e83ff_256x240.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/images/ui-icons_469bdd_256x240.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/images/ui-icons_6da8d5_256x240.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/images/ui-icons_d8e7f3_256x240.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/images/ui-icons_f9bd01_256x240.png +0 -0
- data/test/dummy/public/AdminLTE-master/css/ionslider/ion.rangeSlider.css +126 -0
- data/test/dummy/public/AdminLTE-master/css/ionslider/ion.rangeSlider.skinFlat.css +89 -0
- data/test/dummy/public/AdminLTE-master/css/ionslider/ion.rangeSlider.skinNice.css +85 -0
- data/test/dummy/public/AdminLTE-master/css/jvectormap/jquery-jvectormap-1.2.2.css +36 -0
- data/test/dummy/public/AdminLTE-master/css/morris/morris.css +2 -0
- data/test/dummy/public/AdminLTE-master/css/timepicker/bootstrap-timepicker.css +121 -0
- data/test/dummy/public/AdminLTE-master/css/timepicker/bootstrap-timepicker.min.css +10 -0
- data/test/dummy/public/AdminLTE-master/empty.html +417 -0
- data/test/dummy/public/AdminLTE-master/fonts/glyphicons-halflings-regular.eot +0 -0
- data/test/dummy/public/AdminLTE-master/fonts/glyphicons-halflings-regular.svg +229 -0
- data/test/dummy/public/AdminLTE-master/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/test/dummy/public/AdminLTE-master/fonts/glyphicons-halflings-regular.woff +0 -0
- data/test/dummy/public/AdminLTE-master/img/ajax-loader.gif +0 -0
- data/test/dummy/public/AdminLTE-master/img/ajax-loader1.gif +0 -0
- data/test/dummy/public/AdminLTE-master/img/avatar.png +0 -0
- data/test/dummy/public/AdminLTE-master/img/avatar04.png +0 -0
- data/test/dummy/public/AdminLTE-master/img/avatar2.png +0 -0
- data/test/dummy/public/AdminLTE-master/img/avatar3.png +0 -0
- data/test/dummy/public/AdminLTE-master/img/avatar5.png +0 -0
- data/test/dummy/public/AdminLTE-master/img/blur-background04.jpg +0 -0
- data/test/dummy/public/AdminLTE-master/img/blur-background08.jpg +0 -0
- data/test/dummy/public/AdminLTE-master/img/blur-background09.jpg +0 -0
- data/test/dummy/public/AdminLTE-master/img/bootstrap-colorpicker/alpha-horizontal.png +0 -0
- data/test/dummy/public/AdminLTE-master/img/bootstrap-colorpicker/alpha.png +0 -0
- data/test/dummy/public/AdminLTE-master/img/bootstrap-colorpicker/hue-horizontal.png +0 -0
- data/test/dummy/public/AdminLTE-master/img/bootstrap-colorpicker/hue.png +0 -0
- data/test/dummy/public/AdminLTE-master/img/bootstrap-colorpicker/saturation.png +0 -0
- data/test/dummy/public/AdminLTE-master/img/credit/american-express.png +0 -0
- data/test/dummy/public/AdminLTE-master/img/credit/cirrus.png +0 -0
- data/test/dummy/public/AdminLTE-master/img/credit/mastercard.png +0 -0
- data/test/dummy/public/AdminLTE-master/img/credit/mestro.png +0 -0
- data/test/dummy/public/AdminLTE-master/img/credit/paypal.png +0 -0
- data/test/dummy/public/AdminLTE-master/img/credit/paypal2.png +0 -0
- data/test/dummy/public/AdminLTE-master/img/credit/visa.png +0 -0
- data/test/dummy/public/AdminLTE-master/img/icons.png +0 -0
- data/test/dummy/public/AdminLTE-master/img/sprite-skin-flat.png +0 -0
- data/test/dummy/public/AdminLTE-master/img/sprite-skin-nice.png +0 -0
- data/test/dummy/public/AdminLTE-master/img/user-bg.png +0 -0
- data/test/dummy/public/AdminLTE-master/img/user.jpg +0 -0
- data/test/dummy/public/AdminLTE-master/img/user2.jpg +0 -0
- data/test/dummy/public/AdminLTE-master/index.html +900 -0
- data/test/dummy/public/AdminLTE-master/js/AdminLTE/app.js +1054 -0
- data/test/dummy/public/AdminLTE-master/js/AdminLTE/dashboard.js +252 -0
- data/test/dummy/public/AdminLTE-master/js/AdminLTE/demo.js +81 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/bootstrap-slider/bootstrap-slider.js +1167 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js +6 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.js +350 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/colorpicker/bootstrap-colorpicker.js +949 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/colorpicker/bootstrap-colorpicker.min.js +1 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datatables/dataTables.bootstrap.js +250 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datatables/jquery.dataTables.js +12099 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/bootstrap-datepicker.js +1671 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.ar.js +15 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.az.js +12 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.bg.js +14 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.ca.js +14 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.cs.js +15 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.cy.js +14 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.da.js +15 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.de.js +17 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.el.js +13 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.es.js +14 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.et.js +18 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.fa.js +17 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.fi.js +16 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.fr.js +17 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.gl.js +11 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.he.js +15 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.hr.js +13 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.hu.js +16 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.id.js +15 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.is.js +14 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.it.js +17 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.ja.js +15 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.ka.js +17 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.kk.js +15 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.kr.js +13 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.lt.js +16 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.lv.js +16 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.mk.js +15 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.ms.js +14 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.nb.js +14 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.nl-BE.js +17 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.nl.js +14 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.no.js +16 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.pl.js +15 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.pt-BR.js +15 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.pt.js +16 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.ro.js +16 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.rs-latin.js +14 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.rs.js +14 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.ru.js +15 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.sk.js +15 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.sl.js +14 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.sq.js +15 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.sv.js +16 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.sw.js +15 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.th.js +14 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.tr.js +16 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.ua.js +15 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.vi.js +16 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js +16 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/datepicker/locales/bootstrap-datepicker.zh-TW.js +17 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/daterangepicker/daterangepicker.js +883 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/excanvas.js +1428 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/excanvas.min.js +1 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.colorhelpers.js +180 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.colorhelpers.min.js +1 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.canvas.js +345 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.canvas.min.js +1 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.categories.js +190 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.categories.min.js +1 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.crosshair.js +176 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.crosshair.min.js +1 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.errorbars.js +353 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.errorbars.min.js +1 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.fillbetween.js +226 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.fillbetween.min.js +1 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.image.js +241 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.image.min.js +1 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.js +3137 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.min.js +2 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.navigate.js +346 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.navigate.min.js +1 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.pie.js +817 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.pie.min.js +1 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.resize.js +60 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.resize.min.js +1 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.selection.js +360 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.selection.min.js +1 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.stack.js +188 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.stack.min.js +1 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.symbol.js +71 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.symbol.min.js +1 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.threshold.js +142 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.threshold.min.js +1 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.time.js +431 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/flot/jquery.flot.time.min.js +1 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/iCheck/icheck.js +506 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/iCheck/icheck.min.js +10 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/input-mask/jquery.inputmask.date.extensions.js +488 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/input-mask/jquery.inputmask.extensions.js +122 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/input-mask/jquery.inputmask.js +1632 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/input-mask/jquery.inputmask.numeric.extensions.js +177 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/input-mask/jquery.inputmask.phone.extensions.js +50 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/input-mask/jquery.inputmask.regex.extensions.js +170 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/input-mask/phone-codes/phone-be.json +45 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/input-mask/phone-codes/phone-codes.json +294 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/input-mask/phone-codes/readme.txt +1 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/ionslider/ion.rangeSlider.min.js +22 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/jqueryKnob/jquery.knob.js +764 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js +8 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/jvectormap/jquery-jvectormap-world-mill-en.js +1 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/misc/html5shiv.js +8 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/misc/jquery.ba-resize.min.js +9 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/misc/jquery.placeholder.js +187 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/misc/modernizr.min.js +4 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/misc/respond.min.js +1 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/morris/morris.js +1888 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/morris/morris.min.js +2 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/slimScroll/jquery.slimscroll.js +464 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/slimScroll/jquery.slimscroll.min.js +16 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/slimScroll/slimScroll.jquery.json +30 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/sparkline/jquery.sparkline.js +3054 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/sparkline/jquery.sparkline.min.js +5 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/timepicker/bootstrap-timepicker.js +903 -0
- data/test/dummy/public/AdminLTE-master/js/plugins/timepicker/bootstrap-timepicker.min.js +5 -0
- data/test/dummy/public/AdminLTE-master/less/404_500_errors.less +38 -0
- data/test/dummy/public/AdminLTE-master/less/AdminLTE.less +49 -0
- data/test/dummy/public/AdminLTE-master/less/alerts.less +25 -0
- data/test/dummy/public/AdminLTE-master/less/bootstrap-social.less +167 -0
- data/test/dummy/public/AdminLTE-master/less/boxes.less +396 -0
- data/test/dummy/public/AdminLTE-master/less/buttons.less +179 -0
- data/test/dummy/public/AdminLTE-master/less/callout.less +49 -0
- data/test/dummy/public/AdminLTE-master/less/core.less +422 -0
- data/test/dummy/public/AdminLTE-master/less/dropdown.less +392 -0
- data/test/dummy/public/AdminLTE-master/less/forms.less +73 -0
- data/test/dummy/public/AdminLTE-master/less/header.less +191 -0
- data/test/dummy/public/AdminLTE-master/less/iCheck.less +70 -0
- data/test/dummy/public/AdminLTE-master/less/invoice.less +38 -0
- data/test/dummy/public/AdminLTE-master/less/lockscreen.less +86 -0
- data/test/dummy/public/AdminLTE-master/less/login_and_register.less +42 -0
- data/test/dummy/public/AdminLTE-master/less/mailbox.less +64 -0
- data/test/dummy/public/AdminLTE-master/less/mixins.less +166 -0
- data/test/dummy/public/AdminLTE-master/less/navs.less +161 -0
- data/test/dummy/public/AdminLTE-master/less/pace.less +17 -0
- data/test/dummy/public/AdminLTE-master/less/progress-bars.less +62 -0
- data/test/dummy/public/AdminLTE-master/less/sidebar.less +135 -0
- data/test/dummy/public/AdminLTE-master/less/skins.less +232 -0
- data/test/dummy/public/AdminLTE-master/less/small-box.less +122 -0
- data/test/dummy/public/AdminLTE-master/less/timeline.less +101 -0
- data/test/dummy/public/AdminLTE-master/less/vars.less +64 -0
- data/test/dummy/public/AdminLTE-master/pages/UI/buttons.html +1270 -0
- data/test/dummy/public/AdminLTE-master/pages/UI/empty.html +415 -0
- data/test/dummy/public/AdminLTE-master/pages/UI/general.html +985 -0
- data/test/dummy/public/AdminLTE-master/pages/UI/icons.html +2176 -0
- data/test/dummy/public/AdminLTE-master/pages/UI/jquery-ui.html +539 -0
- data/test/dummy/public/AdminLTE-master/pages/UI/sliders.html +562 -0
- data/test/dummy/public/AdminLTE-master/pages/UI/timeline.html +564 -0
- data/test/dummy/public/AdminLTE-master/pages/calendar.html +643 -0
- data/test/dummy/public/AdminLTE-master/pages/charts/empty.html +415 -0
- data/test/dummy/public/AdminLTE-master/pages/charts/flot.html +763 -0
- data/test/dummy/public/AdminLTE-master/pages/charts/inline.html +888 -0
- data/test/dummy/public/AdminLTE-master/pages/charts/morris.html +554 -0
- data/test/dummy/public/AdminLTE-master/pages/empty.html +445 -0
- data/test/dummy/public/AdminLTE-master/pages/examples/404.html +433 -0
- data/test/dummy/public/AdminLTE-master/pages/examples/500.html +433 -0
- data/test/dummy/public/AdminLTE-master/pages/examples/blank.html +416 -0
- data/test/dummy/public/AdminLTE-master/pages/examples/invoice.html +553 -0
- data/test/dummy/public/AdminLTE-master/pages/examples/lockscreen.html +114 -0
- data/test/dummy/public/AdminLTE-master/pages/examples/login.html +58 -0
- data/test/dummy/public/AdminLTE-master/pages/examples/register.html +60 -0
- data/test/dummy/public/AdminLTE-master/pages/forms/advanced.html +742 -0
- data/test/dummy/public/AdminLTE-master/pages/forms/editors.html +472 -0
- data/test/dummy/public/AdminLTE-master/pages/forms/empty.html +415 -0
- data/test/dummy/public/AdminLTE-master/pages/forms/general.html +714 -0
- data/test/dummy/public/AdminLTE-master/pages/mailbox.html +671 -0
- data/test/dummy/public/AdminLTE-master/pages/tables/data.html +1304 -0
- data/test/dummy/public/AdminLTE-master/pages/tables/empty.html +414 -0
- data/test/dummy/public/AdminLTE-master/pages/tables/simple.html +716 -0
- data/test/dummy/public/AdminLTE-master/pages/widgets.html +1028 -0
- data/test/dummy/public/chat/bower/font-awesome/.bower.json +37 -0
- data/test/dummy/public/chat/bower/font-awesome/.gitignore +32 -0
- data/test/dummy/public/chat/bower/font-awesome/.npmignore +42 -0
- data/test/dummy/public/chat/bower/font-awesome/bower.json +23 -0
- data/test/dummy/public/chat/bower/font-awesome/css/font-awesome.css +1672 -0
- data/test/dummy/public/chat/bower/font-awesome/css/font-awesome.min.css +4 -0
- data/test/dummy/public/chat/bower/font-awesome/fonts/FontAwesome.otf +0 -0
- data/test/dummy/public/chat/bower/font-awesome/fonts/fontawesome-webfont.eot +0 -0
- data/test/dummy/public/chat/bower/font-awesome/fonts/fontawesome-webfont.svg +520 -0
- data/test/dummy/public/chat/bower/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
- data/test/dummy/public/chat/bower/font-awesome/fonts/fontawesome-webfont.woff +0 -0
- data/test/dummy/public/chat/bower/font-awesome/less/bordered-pulled.less +16 -0
- data/test/dummy/public/chat/bower/font-awesome/less/core.less +11 -0
- data/test/dummy/public/chat/bower/font-awesome/less/extras.less +2 -0
- data/test/dummy/public/chat/bower/font-awesome/less/fixed-width.less +6 -0
- data/test/dummy/public/chat/bower/font-awesome/less/font-awesome.less +17 -0
- data/test/dummy/public/chat/bower/font-awesome/less/icons.less +552 -0
- data/test/dummy/public/chat/bower/font-awesome/less/larger.less +13 -0
- data/test/dummy/public/chat/bower/font-awesome/less/list.less +19 -0
- data/test/dummy/public/chat/bower/font-awesome/less/mixins.less +25 -0
- data/test/dummy/public/chat/bower/font-awesome/less/path.less +14 -0
- data/test/dummy/public/chat/bower/font-awesome/less/rotated-flipped.less +20 -0
- data/test/dummy/public/chat/bower/font-awesome/less/spinning.less +29 -0
- data/test/dummy/public/chat/bower/font-awesome/less/stacked.less +20 -0
- data/test/dummy/public/chat/bower/font-awesome/less/variables.less +561 -0
- data/test/dummy/public/chat/bower/font-awesome/scss/_bordered-pulled.scss +16 -0
- data/test/dummy/public/chat/bower/font-awesome/scss/_core.scss +11 -0
- data/test/dummy/public/chat/bower/font-awesome/scss/_extras.scss +44 -0
- data/test/dummy/public/chat/bower/font-awesome/scss/_fixed-width.scss +6 -0
- data/test/dummy/public/chat/bower/font-awesome/scss/_icons.scss +552 -0
- data/test/dummy/public/chat/bower/font-awesome/scss/_larger.scss +13 -0
- data/test/dummy/public/chat/bower/font-awesome/scss/_list.scss +19 -0
- data/test/dummy/public/chat/bower/font-awesome/scss/_mixins.scss +25 -0
- data/test/dummy/public/chat/bower/font-awesome/scss/_path.scss +14 -0
- data/test/dummy/public/chat/bower/font-awesome/scss/_rotated-flipped.scss +20 -0
- data/test/dummy/public/chat/bower/font-awesome/scss/_spinning.scss +29 -0
- data/test/dummy/public/chat/bower/font-awesome/scss/_stacked.scss +20 -0
- data/test/dummy/public/chat/bower/font-awesome/scss/_variables.scss +561 -0
- data/test/dummy/public/chat/bower/font-awesome/scss/font-awesome.scss +17 -0
- data/test/dummy/public/chat/bower/jScrollPane/.bower.json +33 -0
- data/test/dummy/public/chat/bower/jScrollPane/.gitignore +2 -0
- data/test/dummy/public/chat/bower/jScrollPane/.gitmodules +3 -0
- data/test/dummy/public/chat/bower/jScrollPane/GPL-LICENSE.txt +278 -0
- data/test/dummy/public/chat/bower/jScrollPane/MIT-LICENSE.txt +19 -0
- data/test/dummy/public/chat/bower/jScrollPane/README.md +23 -0
- data/test/dummy/public/chat/bower/jScrollPane/ajax.html +151 -0
- data/test/dummy/public/chat/bower/jScrollPane/ajax_content.html +73 -0
- data/test/dummy/public/chat/bower/jScrollPane/anchors.html +140 -0
- data/test/dummy/public/chat/bower/jScrollPane/api.html +190 -0
- data/test/dummy/public/chat/bower/jScrollPane/arrow_hover.html +208 -0
- data/test/dummy/public/chat/bower/jScrollPane/arrow_positions.html +634 -0
- data/test/dummy/public/chat/bower/jScrollPane/arrows.html +203 -0
- data/test/dummy/public/chat/bower/jScrollPane/auto_reinitialise.html +98 -0
- data/test/dummy/public/chat/bower/jScrollPane/basic.html +204 -0
- data/test/dummy/public/chat/bower/jScrollPane/bower.json +22 -0
- data/test/dummy/public/chat/bower/jScrollPane/build/.gitignore +1 -0
- data/test/dummy/public/chat/bower/jScrollPane/build/Gruntfile.js +49 -0
- data/test/dummy/public/chat/bower/jScrollPane/build/package.json +30 -0
- data/test/dummy/public/chat/bower/jScrollPane/caps.html +236 -0
- data/test/dummy/public/chat/bower/jScrollPane/changelog.html +66 -0
- data/test/dummy/public/chat/bower/jScrollPane/destroy.html +237 -0
- data/test/dummy/public/chat/bower/jScrollPane/drag_size.html +206 -0
- data/test/dummy/public/chat/bower/jScrollPane/dynamic_content.html +95 -0
- data/test/dummy/public/chat/bower/jScrollPane/dynamic_height.html +207 -0
- data/test/dummy/public/chat/bower/jScrollPane/dynamic_width.html +368 -0
- data/test/dummy/public/chat/bower/jScrollPane/events.html +264 -0
- data/test/dummy/public/chat/bower/jScrollPane/faqs.html +52 -0
- data/test/dummy/public/chat/bower/jScrollPane/fixed_width.html +230 -0
- data/test/dummy/public/chat/bower/jScrollPane/focus.html +207 -0
- data/test/dummy/public/chat/bower/jScrollPane/fullpage_scroll.html +259 -0
- data/test/dummy/public/chat/bower/jScrollPane/iframe.html +79 -0
- data/test/dummy/public/chat/bower/jScrollPane/iframe2.html +121 -0
- data/test/dummy/public/chat/bower/jScrollPane/iframe_content1.html +143 -0
- data/test/dummy/public/chat/bower/jScrollPane/iframe_content2.html +143 -0
- data/test/dummy/public/chat/bower/jScrollPane/iframe_content3.html +76 -0
- data/test/dummy/public/chat/bower/jScrollPane/iframe_content4.html +76 -0
- data/test/dummy/public/chat/bower/jScrollPane/image.html +96 -0
- data/test/dummy/public/chat/bower/jScrollPane/image/logo.png +0 -0
- data/test/dummy/public/chat/bower/jScrollPane/image2.html +98 -0
- data/test/dummy/public/chat/bower/jScrollPane/index.html +319 -0
- data/test/dummy/public/chat/bower/jScrollPane/invisibles.html +523 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/11/after.html +45 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/11/before.html +45 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/11/brs_main.css +301 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/11/index.html +53 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/11/jquery.mousewheel.js +79 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/11/jscrollpane-2b3.css +143 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/11/jscrollpane-2b3.js +1063 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/11/native.html +42 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/12/after.html +80 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/12/after_reinit.html +73 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/12/before.html +72 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/12/before_reinit.html +73 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/12/brs_main.css +301 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/12/index.html +53 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/12/jquery.mousewheel.js +79 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/12/jscrollpane-2b3.css +143 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/12/jscrollpane-2b3.js +1063 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/12/native.html +69 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/12/wrapped.html +87 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/7/after.html +190 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/7/before.html +190 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/7/index.html +53 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/7/jscrollpane-2b1.css +120 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/7/jscrollpane-2b2.js +947 -0
- data/test/dummy/public/chat/bower/jScrollPane/issues/7/native.html +171 -0
- data/test/dummy/public/chat/bower/jScrollPane/known_issues.html +62 -0
- data/test/dummy/public/chat/bower/jScrollPane/less_basic.html +164 -0
- data/test/dummy/public/chat/bower/jScrollPane/mwheel_intent.html +209 -0
- data/test/dummy/public/chat/bower/jScrollPane/override_animate.html +215 -0
- data/test/dummy/public/chat/bower/jScrollPane/runeimp.html +314 -0
- data/test/dummy/public/chat/bower/jScrollPane/runeimp2.html +320 -0
- data/test/dummy/public/chat/bower/jScrollPane/script/demo.js +49 -0
- data/test/dummy/public/chat/bower/jScrollPane/script/jquery.jscrollpane.js +1467 -0
- data/test/dummy/public/chat/bower/jScrollPane/script/jquery.jscrollpane.min.js +11 -0
- data/test/dummy/public/chat/bower/jScrollPane/script/jquery.mousewheel.js +202 -0
- data/test/dummy/public/chat/bower/jScrollPane/script/mwheelIntent.js +76 -0
- data/test/dummy/public/chat/bower/jScrollPane/scroll_on_left.html +132 -0
- data/test/dummy/public/chat/bower/jScrollPane/scroll_to.html +188 -0
- data/test/dummy/public/chat/bower/jScrollPane/scroll_to_animate.html +197 -0
- data/test/dummy/public/chat/bower/jScrollPane/settings.html +202 -0
- data/test/dummy/public/chat/bower/jScrollPane/short.html +82 -0
- data/test/dummy/public/chat/bower/jScrollPane/style/demo.css +227 -0
- data/test/dummy/public/chat/bower/jScrollPane/style/jquery.jscrollpane.css +115 -0
- data/test/dummy/public/chat/bower/jScrollPane/themes/lozenge/image/ui-icons_222222_256x240.png +0 -0
- data/test/dummy/public/chat/bower/jScrollPane/themes/lozenge/image/ui-icons_888888_256x240.png +0 -0
- data/test/dummy/public/chat/bower/jScrollPane/themes/lozenge/image/ui-icons_cd0a0a_256x240.png +0 -0
- data/test/dummy/public/chat/bower/jScrollPane/themes/lozenge/index.html +337 -0
- data/test/dummy/public/chat/bower/jScrollPane/themes/lozenge/style/jquery.jscrollpane.lozenge.css +78 -0
- data/test/dummy/public/chat/bower/jScrollPane/v1.html +49 -0
- data/test/dummy/public/chat/bower/jquery/.bower.json +37 -0
- data/test/dummy/public/chat/bower/jquery/MIT-LICENSE.txt +21 -0
- data/test/dummy/public/chat/bower/jquery/bower.json +27 -0
- data/test/dummy/public/chat/bower/jquery/dist/jquery.js +9205 -0
- data/test/dummy/public/chat/bower/jquery/dist/jquery.min.js +5 -0
- data/test/dummy/public/chat/bower/jquery/dist/jquery.min.map +1 -0
- data/test/dummy/public/chat/bower/jquery/src/ajax.js +786 -0
- data/test/dummy/public/chat/bower/jquery/src/ajax/jsonp.js +89 -0
- data/test/dummy/public/chat/bower/jquery/src/ajax/load.js +75 -0
- data/test/dummy/public/chat/bower/jquery/src/ajax/parseJSON.js +13 -0
- data/test/dummy/public/chat/bower/jquery/src/ajax/parseXML.js +28 -0
- data/test/dummy/public/chat/bower/jquery/src/ajax/script.js +64 -0
- data/test/dummy/public/chat/bower/jquery/src/ajax/var/nonce.js +5 -0
- data/test/dummy/public/chat/bower/jquery/src/ajax/var/rquery.js +3 -0
- data/test/dummy/public/chat/bower/jquery/src/ajax/xhr.js +136 -0
- data/test/dummy/public/chat/bower/jquery/src/attributes.js +11 -0
- data/test/dummy/public/chat/bower/jquery/src/attributes/attr.js +141 -0
- data/test/dummy/public/chat/bower/jquery/src/attributes/classes.js +158 -0
- data/test/dummy/public/chat/bower/jquery/src/attributes/prop.js +94 -0
- data/test/dummy/public/chat/bower/jquery/src/attributes/support.js +35 -0
- data/test/dummy/public/chat/bower/jquery/src/attributes/val.js +161 -0
- data/test/dummy/public/chat/bower/jquery/src/callbacks.js +205 -0
- data/test/dummy/public/chat/bower/jquery/src/core.js +497 -0
- data/test/dummy/public/chat/bower/jquery/src/core/access.js +60 -0
- data/test/dummy/public/chat/bower/jquery/src/core/init.js +123 -0
- data/test/dummy/public/chat/bower/jquery/src/core/parseHTML.js +39 -0
- data/test/dummy/public/chat/bower/jquery/src/core/ready.js +97 -0
- data/test/dummy/public/chat/bower/jquery/src/core/var/rsingleTag.js +4 -0
- data/test/dummy/public/chat/bower/jquery/src/css.js +450 -0
- data/test/dummy/public/chat/bower/jquery/src/css/addGetHookIf.js +22 -0
- data/test/dummy/public/chat/bower/jquery/src/css/curCSS.js +57 -0
- data/test/dummy/public/chat/bower/jquery/src/css/defaultDisplay.js +70 -0
- data/test/dummy/public/chat/bower/jquery/src/css/hiddenVisibleSelectors.js +15 -0
- data/test/dummy/public/chat/bower/jquery/src/css/support.js +96 -0
- data/test/dummy/public/chat/bower/jquery/src/css/swap.js +28 -0
- data/test/dummy/public/chat/bower/jquery/src/css/var/cssExpand.js +3 -0
- data/test/dummy/public/chat/bower/jquery/src/css/var/getStyles.js +12 -0
- data/test/dummy/public/chat/bower/jquery/src/css/var/isHidden.js +13 -0
- data/test/dummy/public/chat/bower/jquery/src/css/var/rmargin.js +3 -0
- data/test/dummy/public/chat/bower/jquery/src/css/var/rnumnonpx.js +5 -0
- data/test/dummy/public/chat/bower/jquery/src/data.js +178 -0
- data/test/dummy/public/chat/bower/jquery/src/data/Data.js +181 -0
- data/test/dummy/public/chat/bower/jquery/src/data/accepts.js +20 -0
- data/test/dummy/public/chat/bower/jquery/src/data/var/data_priv.js +5 -0
- data/test/dummy/public/chat/bower/jquery/src/data/var/data_user.js +5 -0
- data/test/dummy/public/chat/bower/jquery/src/deferred.js +149 -0
- data/test/dummy/public/chat/bower/jquery/src/deprecated.js +13 -0
- data/test/dummy/public/chat/bower/jquery/src/dimensions.js +50 -0
- data/test/dummy/public/chat/bower/jquery/src/effects.js +648 -0
- data/test/dummy/public/chat/bower/jquery/src/effects/Tween.js +114 -0
- data/test/dummy/public/chat/bower/jquery/src/effects/animatedSelector.js +13 -0
- data/test/dummy/public/chat/bower/jquery/src/event.js +868 -0
- data/test/dummy/public/chat/bower/jquery/src/event/ajax.js +13 -0
- data/test/dummy/public/chat/bower/jquery/src/event/alias.js +39 -0
- data/test/dummy/public/chat/bower/jquery/src/event/support.js +9 -0
- data/test/dummy/public/chat/bower/jquery/src/exports/amd.js +24 -0
- data/test/dummy/public/chat/bower/jquery/src/exports/global.js +32 -0
- data/test/dummy/public/chat/bower/jquery/src/intro.js +44 -0
- data/test/dummy/public/chat/bower/jquery/src/jquery.js +37 -0
- data/test/dummy/public/chat/bower/jquery/src/manipulation.js +580 -0
- data/test/dummy/public/chat/bower/jquery/src/manipulation/_evalUrl.js +18 -0
- data/test/dummy/public/chat/bower/jquery/src/manipulation/support.js +32 -0
- data/test/dummy/public/chat/bower/jquery/src/manipulation/var/rcheckableType.js +3 -0
- data/test/dummy/public/chat/bower/jquery/src/offset.js +207 -0
- data/test/dummy/public/chat/bower/jquery/src/outro.js +1 -0
- data/test/dummy/public/chat/bower/jquery/src/queue.js +142 -0
- data/test/dummy/public/chat/bower/jquery/src/queue/delay.js +22 -0
- data/test/dummy/public/chat/bower/jquery/src/selector-native.js +172 -0
- data/test/dummy/public/chat/bower/jquery/src/selector-sizzle.js +14 -0
- data/test/dummy/public/chat/bower/jquery/src/selector.js +1 -0
- data/test/dummy/public/chat/bower/jquery/src/serialize.js +111 -0
- data/test/dummy/public/chat/bower/jquery/src/sizzle/dist/sizzle.js +2067 -0
- data/test/dummy/public/chat/bower/jquery/src/sizzle/dist/sizzle.min.js +3 -0
- data/test/dummy/public/chat/bower/jquery/src/sizzle/dist/sizzle.min.map +1 -0
- data/test/dummy/public/chat/bower/jquery/src/traversing.js +199 -0
- data/test/dummy/public/chat/bower/jquery/src/traversing/findFilter.js +100 -0
- data/test/dummy/public/chat/bower/jquery/src/traversing/var/rneedsContext.js +6 -0
- data/test/dummy/public/chat/bower/jquery/src/var/arr.js +3 -0
- data/test/dummy/public/chat/bower/jquery/src/var/class2type.js +4 -0
- data/test/dummy/public/chat/bower/jquery/src/var/concat.js +5 -0
- data/test/dummy/public/chat/bower/jquery/src/var/hasOwn.js +5 -0
- data/test/dummy/public/chat/bower/jquery/src/var/indexOf.js +5 -0
- data/test/dummy/public/chat/bower/jquery/src/var/pnum.js +3 -0
- data/test/dummy/public/chat/bower/jquery/src/var/push.js +5 -0
- data/test/dummy/public/chat/bower/jquery/src/var/rnotwhite.js +3 -0
- data/test/dummy/public/chat/bower/jquery/src/var/slice.js +5 -0
- data/test/dummy/public/chat/bower/jquery/src/var/strundefined.js +3 -0
- data/test/dummy/public/chat/bower/jquery/src/var/support.js +4 -0
- data/test/dummy/public/chat/bower/jquery/src/var/toString.js +5 -0
- data/test/dummy/public/chat/bower/jquery/src/wrap.js +79 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/.bower.json +32 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/README.md +17 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/bower.json +22 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/Bold/OpenSans-Bold.eot +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/Bold/OpenSans-Bold.svg +958 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/Bold/OpenSans-Bold.ttf +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/Bold/OpenSans-Bold.woff +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/BoldItalic/OpenSans-BoldItalic.eot +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/BoldItalic/OpenSans-BoldItalic.svg +958 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/BoldItalic/OpenSans-BoldItalic.ttf +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/BoldItalic/OpenSans-BoldItalic.woff +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/ExtraBold/OpenSans-ExtraBold.eot +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/ExtraBold/OpenSans-ExtraBold.svg +958 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/ExtraBold/OpenSans-ExtraBold.ttf +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/ExtraBold/OpenSans-ExtraBold.woff +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.eot +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.svg +958 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.ttf +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.woff +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/Italic/OpenSans-Italic.eot +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/Italic/OpenSans-Italic.svg +958 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/Italic/OpenSans-Italic.ttf +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/Italic/OpenSans-Italic.woff +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/Light/OpenSans-Light.eot +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/Light/OpenSans-Light.svg +958 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/Light/OpenSans-Light.ttf +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/Light/OpenSans-Light.woff +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/LightItalic/OpenSans-LightItalic.eot +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/LightItalic/OpenSans-LightItalic.svg +958 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/LightItalic/OpenSans-LightItalic.ttf +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/LightItalic/OpenSans-LightItalic.woff +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/Regular/OpenSans-Regular.eot +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/Regular/OpenSans-Regular.svg +958 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/Regular/OpenSans-Regular.ttf +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/Regular/OpenSans-Regular.woff +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/Semibold/OpenSans-Semibold.eot +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/Semibold/OpenSans-Semibold.svg +958 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/Semibold/OpenSans-Semibold.ttf +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/Semibold/OpenSans-Semibold.woff +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/SemiboldItalic/OpenSans-SemiboldItalic.eot +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/SemiboldItalic/OpenSans-SemiboldItalic.svg +958 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/SemiboldItalic/OpenSans-SemiboldItalic.ttf +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/fonts/SemiboldItalic/OpenSans-SemiboldItalic.woff +0 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/index.html +85 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/open-sans.css +90 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/open-sans.less +133 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/open-sans.scss +12 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/package.json +22 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/sass/_Bold.scss +8 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/sass/_BoldItalic.scss +8 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/sass/_ExtraBold.scss +8 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/sass/_ExtraBoldItalic.scss +8 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/sass/_Italic.scss +8 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/sass/_Light.scss +8 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/sass/_LightItalic.scss +8 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/sass/_Regular.scss +8 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/sass/_Semibold.scss +8 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/sass/_SemiboldItalic.scss +8 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/sass/_mixins.scss +7 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/sass/_variables.scss +2 -0
- data/test/dummy/public/chat/bower/open-sans-fontface/sass/open-sans.scss +12 -0
- data/test/dummy/public/chat/css/login.css +140 -0
- data/test/dummy/public/chat/css/login.scss +147 -0
- data/test/dummy/public/chat/css/style.css +397 -0
- data/test/dummy/public/chat/index.html +211 -0
- data/test/dummy/public/chat/js/index.js +6 -0
- data/test/dummy/public/chat/login.html +36 -0
- data/test/helper.rb +11 -53
- metadata +1501 -31
- data/lib/roda/component/models/channel.rb +0 -11
- data/lib/roda/component/models/user.rb +0 -12
- data/lib/roda/component/ohm.rb +0 -8
- data/test/dummy/public/index.html +0 -8
@@ -0,0 +1,252 @@
|
|
1
|
+
/*
|
2
|
+
* Author: Abdullah A Almsaeed
|
3
|
+
* Date: 4 Jan 2014
|
4
|
+
* Description:
|
5
|
+
* This is a demo file used only for the main dashboard (index.html)
|
6
|
+
**/
|
7
|
+
|
8
|
+
$(function() {
|
9
|
+
"use strict";
|
10
|
+
|
11
|
+
//Make the dashboard widgets sortable Using jquery UI
|
12
|
+
$(".connectedSortable").sortable({
|
13
|
+
placeholder: "sort-highlight",
|
14
|
+
connectWith: ".connectedSortable",
|
15
|
+
handle: ".box-header, .nav-tabs",
|
16
|
+
forcePlaceholderSize: true,
|
17
|
+
zIndex: 999999
|
18
|
+
}).disableSelection();
|
19
|
+
$(".connectedSortable .box-header, .connectedSortable .nav-tabs-custom").css("cursor", "move");
|
20
|
+
//jQuery UI sortable for the todo list
|
21
|
+
$(".todo-list").sortable({
|
22
|
+
placeholder: "sort-highlight",
|
23
|
+
handle: ".handle",
|
24
|
+
forcePlaceholderSize: true,
|
25
|
+
zIndex: 999999
|
26
|
+
}).disableSelection();
|
27
|
+
;
|
28
|
+
|
29
|
+
//bootstrap WYSIHTML5 - text editor
|
30
|
+
$(".textarea").wysihtml5();
|
31
|
+
|
32
|
+
$('.daterange').daterangepicker(
|
33
|
+
{
|
34
|
+
ranges: {
|
35
|
+
'Today': [moment(), moment()],
|
36
|
+
'Yesterday': [moment().subtract('days', 1), moment().subtract('days', 1)],
|
37
|
+
'Last 7 Days': [moment().subtract('days', 6), moment()],
|
38
|
+
'Last 30 Days': [moment().subtract('days', 29), moment()],
|
39
|
+
'This Month': [moment().startOf('month'), moment().endOf('month')],
|
40
|
+
'Last Month': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]
|
41
|
+
},
|
42
|
+
startDate: moment().subtract('days', 29),
|
43
|
+
endDate: moment()
|
44
|
+
},
|
45
|
+
function(start, end) {
|
46
|
+
alert("You chose: " + start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
|
47
|
+
});
|
48
|
+
|
49
|
+
/* jQueryKnob */
|
50
|
+
$(".knob").knob();
|
51
|
+
|
52
|
+
//jvectormap data
|
53
|
+
var visitorsData = {
|
54
|
+
"US": 398, //USA
|
55
|
+
"SA": 400, //Saudi Arabia
|
56
|
+
"CA": 1000, //Canada
|
57
|
+
"DE": 500, //Germany
|
58
|
+
"FR": 760, //France
|
59
|
+
"CN": 300, //China
|
60
|
+
"AU": 700, //Australia
|
61
|
+
"BR": 600, //Brazil
|
62
|
+
"IN": 800, //India
|
63
|
+
"GB": 320, //Great Britain
|
64
|
+
"RU": 3000 //Russia
|
65
|
+
};
|
66
|
+
//World map by jvectormap
|
67
|
+
$('#world-map').vectorMap({
|
68
|
+
map: 'world_mill_en',
|
69
|
+
backgroundColor: "transparent",
|
70
|
+
regionStyle: {
|
71
|
+
initial: {
|
72
|
+
fill: '#e4e4e4',
|
73
|
+
"fill-opacity": 1,
|
74
|
+
stroke: 'none',
|
75
|
+
"stroke-width": 0,
|
76
|
+
"stroke-opacity": 1
|
77
|
+
}
|
78
|
+
},
|
79
|
+
series: {
|
80
|
+
regions: [{
|
81
|
+
values: visitorsData,
|
82
|
+
scale: ["#92c1dc", "#ebf4f9"],
|
83
|
+
normalizeFunction: 'polynomial'
|
84
|
+
}]
|
85
|
+
},
|
86
|
+
onRegionLabelShow: function(e, el, code) {
|
87
|
+
if (typeof visitorsData[code] != "undefined")
|
88
|
+
el.html(el.html() + ': ' + visitorsData[code] + ' new visitors');
|
89
|
+
}
|
90
|
+
});
|
91
|
+
|
92
|
+
//Sparkline charts
|
93
|
+
var myvalues = [1000, 1200, 920, 927, 931, 1027, 819, 930, 1021];
|
94
|
+
$('#sparkline-1').sparkline(myvalues, {
|
95
|
+
type: 'line',
|
96
|
+
lineColor: '#92c1dc',
|
97
|
+
fillColor: "#ebf4f9",
|
98
|
+
height: '50',
|
99
|
+
width: '80'
|
100
|
+
});
|
101
|
+
myvalues = [515, 519, 520, 522, 652, 810, 370, 627, 319, 630, 921];
|
102
|
+
$('#sparkline-2').sparkline(myvalues, {
|
103
|
+
type: 'line',
|
104
|
+
lineColor: '#92c1dc',
|
105
|
+
fillColor: "#ebf4f9",
|
106
|
+
height: '50',
|
107
|
+
width: '80'
|
108
|
+
});
|
109
|
+
myvalues = [15, 19, 20, 22, 33, 27, 31, 27, 19, 30, 21];
|
110
|
+
$('#sparkline-3').sparkline(myvalues, {
|
111
|
+
type: 'line',
|
112
|
+
lineColor: '#92c1dc',
|
113
|
+
fillColor: "#ebf4f9",
|
114
|
+
height: '50',
|
115
|
+
width: '80'
|
116
|
+
});
|
117
|
+
|
118
|
+
//The Calender
|
119
|
+
$("#calendar").datepicker();
|
120
|
+
|
121
|
+
//SLIMSCROLL FOR CHAT WIDGET
|
122
|
+
$('#chat-box').slimScroll({
|
123
|
+
height: '250px'
|
124
|
+
});
|
125
|
+
|
126
|
+
/* Morris.js Charts */
|
127
|
+
// Sales chart
|
128
|
+
var area = new Morris.Area({
|
129
|
+
element: 'revenue-chart',
|
130
|
+
resize: true,
|
131
|
+
data: [
|
132
|
+
{y: '2011 Q1', item1: 2666, item2: 2666},
|
133
|
+
{y: '2011 Q2', item1: 2778, item2: 2294},
|
134
|
+
{y: '2011 Q3', item1: 4912, item2: 1969},
|
135
|
+
{y: '2011 Q4', item1: 3767, item2: 3597},
|
136
|
+
{y: '2012 Q1', item1: 6810, item2: 1914},
|
137
|
+
{y: '2012 Q2', item1: 5670, item2: 4293},
|
138
|
+
{y: '2012 Q3', item1: 4820, item2: 3795},
|
139
|
+
{y: '2012 Q4', item1: 15073, item2: 5967},
|
140
|
+
{y: '2013 Q1', item1: 10687, item2: 4460},
|
141
|
+
{y: '2013 Q2', item1: 8432, item2: 5713}
|
142
|
+
],
|
143
|
+
xkey: 'y',
|
144
|
+
ykeys: ['item1', 'item2'],
|
145
|
+
labels: ['Item 1', 'Item 2'],
|
146
|
+
lineColors: ['#a0d0e0', '#3c8dbc'],
|
147
|
+
hideHover: 'auto'
|
148
|
+
});
|
149
|
+
var line = new Morris.Line({
|
150
|
+
element: 'line-chart',
|
151
|
+
resize: true,
|
152
|
+
data: [
|
153
|
+
{y: '2011 Q1', item1: 2666},
|
154
|
+
{y: '2011 Q2', item1: 2778},
|
155
|
+
{y: '2011 Q3', item1: 4912},
|
156
|
+
{y: '2011 Q4', item1: 3767},
|
157
|
+
{y: '2012 Q1', item1: 6810},
|
158
|
+
{y: '2012 Q2', item1: 5670},
|
159
|
+
{y: '2012 Q3', item1: 4820},
|
160
|
+
{y: '2012 Q4', item1: 15073},
|
161
|
+
{y: '2013 Q1', item1: 10687},
|
162
|
+
{y: '2013 Q2', item1: 8432}
|
163
|
+
],
|
164
|
+
xkey: 'y',
|
165
|
+
ykeys: ['item1'],
|
166
|
+
labels: ['Item 1'],
|
167
|
+
lineColors: ['#efefef'],
|
168
|
+
lineWidth: 2,
|
169
|
+
hideHover: 'auto',
|
170
|
+
gridTextColor: "#fff",
|
171
|
+
gridStrokeWidth: 0.4,
|
172
|
+
pointSize: 4,
|
173
|
+
pointStrokeColors: ["#efefef"],
|
174
|
+
gridLineColor: "#efefef",
|
175
|
+
gridTextFamily: "Open Sans",
|
176
|
+
gridTextSize: 10
|
177
|
+
});
|
178
|
+
|
179
|
+
//Donut Chart
|
180
|
+
var donut = new Morris.Donut({
|
181
|
+
element: 'sales-chart',
|
182
|
+
resize: true,
|
183
|
+
colors: ["#3c8dbc", "#f56954", "#00a65a"],
|
184
|
+
data: [
|
185
|
+
{label: "Download Sales", value: 12},
|
186
|
+
{label: "In-Store Sales", value: 30},
|
187
|
+
{label: "Mail-Order Sales", value: 20}
|
188
|
+
],
|
189
|
+
hideHover: 'auto'
|
190
|
+
});
|
191
|
+
/*Bar chart
|
192
|
+
var bar = new Morris.Bar({
|
193
|
+
element: 'bar-chart',
|
194
|
+
resize: true,
|
195
|
+
data: [
|
196
|
+
{y: '2006', a: 100, b: 90},
|
197
|
+
{y: '2007', a: 75, b: 65},
|
198
|
+
{y: '2008', a: 50, b: 40},
|
199
|
+
{y: '2009', a: 75, b: 65},
|
200
|
+
{y: '2010', a: 50, b: 40},
|
201
|
+
{y: '2011', a: 75, b: 65},
|
202
|
+
{y: '2012', a: 100, b: 90}
|
203
|
+
],
|
204
|
+
barColors: ['#00a65a', '#f56954'],
|
205
|
+
xkey: 'y',
|
206
|
+
ykeys: ['a', 'b'],
|
207
|
+
labels: ['CPU', 'DISK'],
|
208
|
+
hideHover: 'auto'
|
209
|
+
});*/
|
210
|
+
//Fix for charts under tabs
|
211
|
+
$('.box ul.nav a').on('shown.bs.tab', function(e) {
|
212
|
+
area.redraw();
|
213
|
+
donut.redraw();
|
214
|
+
});
|
215
|
+
|
216
|
+
|
217
|
+
/* BOX REFRESH PLUGIN EXAMPLE (usage with morris charts) */
|
218
|
+
$("#loading-example").boxRefresh({
|
219
|
+
source: "ajax/dashboard-boxrefresh-demo.php",
|
220
|
+
onLoadDone: function(box) {
|
221
|
+
bar = new Morris.Bar({
|
222
|
+
element: 'bar-chart',
|
223
|
+
resize: true,
|
224
|
+
data: [
|
225
|
+
{y: '2006', a: 100, b: 90},
|
226
|
+
{y: '2007', a: 75, b: 65},
|
227
|
+
{y: '2008', a: 50, b: 40},
|
228
|
+
{y: '2009', a: 75, b: 65},
|
229
|
+
{y: '2010', a: 50, b: 40},
|
230
|
+
{y: '2011', a: 75, b: 65},
|
231
|
+
{y: '2012', a: 100, b: 90}
|
232
|
+
],
|
233
|
+
barColors: ['#00a65a', '#f56954'],
|
234
|
+
xkey: 'y',
|
235
|
+
ykeys: ['a', 'b'],
|
236
|
+
labels: ['CPU', 'DISK'],
|
237
|
+
hideHover: 'auto'
|
238
|
+
});
|
239
|
+
}
|
240
|
+
});
|
241
|
+
|
242
|
+
/* The todo list plugin */
|
243
|
+
$(".todo-list").todolist({
|
244
|
+
onCheck: function(ele) {
|
245
|
+
//console.log("The element has been checked")
|
246
|
+
},
|
247
|
+
onUncheck: function(ele) {
|
248
|
+
//console.log("The element has been unchecked")
|
249
|
+
}
|
250
|
+
});
|
251
|
+
|
252
|
+
});
|
@@ -0,0 +1,81 @@
|
|
1
|
+
$(function() {
|
2
|
+
/* For demo purposes */
|
3
|
+
var demo = $("<div />").css({
|
4
|
+
position: "fixed",
|
5
|
+
top: "150px",
|
6
|
+
right: "0",
|
7
|
+
background: "rgba(0, 0, 0, 0.7)",
|
8
|
+
"border-radius": "5px 0px 0px 5px",
|
9
|
+
padding: "10px 15px",
|
10
|
+
"font-size": "16px",
|
11
|
+
"z-index": "999999",
|
12
|
+
cursor: "pointer",
|
13
|
+
color: "#ddd"
|
14
|
+
}).html("<i class='fa fa-gear'></i>").addClass("no-print");
|
15
|
+
|
16
|
+
var demo_settings = $("<div />").css({
|
17
|
+
"padding": "10px",
|
18
|
+
position: "fixed",
|
19
|
+
top: "130px",
|
20
|
+
right: "-200px",
|
21
|
+
background: "#fff",
|
22
|
+
border: "3px solid rgba(0, 0, 0, 0.7)",
|
23
|
+
"width": "200px",
|
24
|
+
"z-index": "999999"
|
25
|
+
}).addClass("no-print");
|
26
|
+
demo_settings.append(
|
27
|
+
"<h4 style='margin: 0 0 5px 0; border-bottom: 1px dashed #ddd; padding-bottom: 3px;'>Layout Options</h4>"
|
28
|
+
+ "<div class='form-group no-margin'>"
|
29
|
+
+ "<div class='.checkbox'>"
|
30
|
+
+ "<label>"
|
31
|
+
+ "<input type='checkbox' onchange='change_layout();'/> "
|
32
|
+
+ "Fixed layout"
|
33
|
+
+ "</label>"
|
34
|
+
+ "</div>"
|
35
|
+
+ "</div>"
|
36
|
+
);
|
37
|
+
demo_settings.append(
|
38
|
+
"<h4 style='margin: 0 0 5px 0; border-bottom: 1px dashed #ddd; padding-bottom: 3px;'>Skins</h4>"
|
39
|
+
+ "<div class='form-group no-margin'>"
|
40
|
+
+ "<div class='.radio'>"
|
41
|
+
+ "<label>"
|
42
|
+
+ "<input name='skins' type='radio' onchange='change_skin(\"skin-black\");' /> "
|
43
|
+
+ "Black"
|
44
|
+
+ "</label>"
|
45
|
+
+ "</div>"
|
46
|
+
+ "</div>"
|
47
|
+
|
48
|
+
+ "<div class='form-group no-margin'>"
|
49
|
+
+ "<div class='.radio'>"
|
50
|
+
+ "<label>"
|
51
|
+
+ "<input name='skins' type='radio' onchange='change_skin(\"skin-blue\");' checked='checked'/> "
|
52
|
+
+ "Blue"
|
53
|
+
+ "</label>"
|
54
|
+
+ "</div>"
|
55
|
+
+ "</div>"
|
56
|
+
);
|
57
|
+
|
58
|
+
demo.click(function() {
|
59
|
+
if (!$(this).hasClass("open")) {
|
60
|
+
$(this).css("right", "200px");
|
61
|
+
demo_settings.css("right", "0");
|
62
|
+
$(this).addClass("open");
|
63
|
+
} else {
|
64
|
+
$(this).css("right", "0");
|
65
|
+
demo_settings.css("right", "-200px");
|
66
|
+
$(this).removeClass("open")
|
67
|
+
}
|
68
|
+
});
|
69
|
+
|
70
|
+
$("body").append(demo);
|
71
|
+
$("body").append(demo_settings);
|
72
|
+
});
|
73
|
+
|
74
|
+
function change_layout() {
|
75
|
+
$("body").toggleClass("fixed");
|
76
|
+
fix_sidebar();
|
77
|
+
}
|
78
|
+
function change_skin(cls) {
|
79
|
+
$("body").removeClass("skin-blue skin-black");
|
80
|
+
$("body").addClass(cls);
|
81
|
+
}
|
@@ -0,0 +1,1167 @@
|
|
1
|
+
/*! =========================================================
|
2
|
+
* bootstrap-slider.js
|
3
|
+
*
|
4
|
+
* Maintainers:
|
5
|
+
* Kyle Kemp
|
6
|
+
* - Twitter: @seiyria
|
7
|
+
* - Github: seiyria
|
8
|
+
* Rohit Kalkur
|
9
|
+
* - Twitter: @Rovolutionary
|
10
|
+
* - Github: rovolution
|
11
|
+
*
|
12
|
+
* =========================================================
|
13
|
+
*
|
14
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
15
|
+
* you may not use this file except in compliance with the License.
|
16
|
+
* You may obtain a copy of the License at
|
17
|
+
*
|
18
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
19
|
+
*
|
20
|
+
* Unless required by applicable law or agreed to in writing, software
|
21
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
22
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
23
|
+
* See the License for the specific language governing permissions and
|
24
|
+
* limitations under the License.
|
25
|
+
* ========================================================= */
|
26
|
+
|
27
|
+
|
28
|
+
/**
|
29
|
+
* Bridget makes jQuery widgets
|
30
|
+
* v1.0.1
|
31
|
+
* MIT license
|
32
|
+
*/
|
33
|
+
( function( $ ) {
|
34
|
+
|
35
|
+
( function( $ ) {
|
36
|
+
|
37
|
+
'use strict';
|
38
|
+
|
39
|
+
// -------------------------- utils -------------------------- //
|
40
|
+
|
41
|
+
var slice = Array.prototype.slice;
|
42
|
+
|
43
|
+
function noop() {}
|
44
|
+
|
45
|
+
// -------------------------- definition -------------------------- //
|
46
|
+
|
47
|
+
function defineBridget( $ ) {
|
48
|
+
|
49
|
+
// bail if no jQuery
|
50
|
+
if ( !$ ) {
|
51
|
+
return;
|
52
|
+
}
|
53
|
+
|
54
|
+
// -------------------------- addOptionMethod -------------------------- //
|
55
|
+
|
56
|
+
/**
|
57
|
+
* adds option method -> $().plugin('option', {...})
|
58
|
+
* @param {Function} PluginClass - constructor class
|
59
|
+
*/
|
60
|
+
function addOptionMethod( PluginClass ) {
|
61
|
+
// don't overwrite original option method
|
62
|
+
if ( PluginClass.prototype.option ) {
|
63
|
+
return;
|
64
|
+
}
|
65
|
+
|
66
|
+
// option setter
|
67
|
+
PluginClass.prototype.option = function( opts ) {
|
68
|
+
// bail out if not an object
|
69
|
+
if ( !$.isPlainObject( opts ) ){
|
70
|
+
return;
|
71
|
+
}
|
72
|
+
this.options = $.extend( true, this.options, opts );
|
73
|
+
};
|
74
|
+
}
|
75
|
+
|
76
|
+
|
77
|
+
// -------------------------- plugin bridge -------------------------- //
|
78
|
+
|
79
|
+
// helper function for logging errors
|
80
|
+
// $.error breaks jQuery chaining
|
81
|
+
var logError = typeof console === 'undefined' ? noop :
|
82
|
+
function( message ) {
|
83
|
+
console.error( message );
|
84
|
+
};
|
85
|
+
|
86
|
+
/**
|
87
|
+
* jQuery plugin bridge, access methods like $elem.plugin('method')
|
88
|
+
* @param {String} namespace - plugin name
|
89
|
+
* @param {Function} PluginClass - constructor class
|
90
|
+
*/
|
91
|
+
function bridge( namespace, PluginClass ) {
|
92
|
+
// add to jQuery fn namespace
|
93
|
+
$.fn[ namespace ] = function( options ) {
|
94
|
+
if ( typeof options === 'string' ) {
|
95
|
+
// call plugin method when first argument is a string
|
96
|
+
// get arguments for method
|
97
|
+
var args = slice.call( arguments, 1 );
|
98
|
+
|
99
|
+
for ( var i=0, len = this.length; i < len; i++ ) {
|
100
|
+
var elem = this[i];
|
101
|
+
var instance = $.data( elem, namespace );
|
102
|
+
if ( !instance ) {
|
103
|
+
logError( "cannot call methods on " + namespace + " prior to initialization; " +
|
104
|
+
"attempted to call '" + options + "'" );
|
105
|
+
continue;
|
106
|
+
}
|
107
|
+
if ( !$.isFunction( instance[options] ) || options.charAt(0) === '_' ) {
|
108
|
+
logError( "no such method '" + options + "' for " + namespace + " instance" );
|
109
|
+
continue;
|
110
|
+
}
|
111
|
+
|
112
|
+
// trigger method with arguments
|
113
|
+
var returnValue = instance[ options ].apply( instance, args);
|
114
|
+
|
115
|
+
// break look and return first value if provided
|
116
|
+
if ( returnValue !== undefined && returnValue !== instance) {
|
117
|
+
return returnValue;
|
118
|
+
}
|
119
|
+
}
|
120
|
+
// return this if no return value
|
121
|
+
return this;
|
122
|
+
} else {
|
123
|
+
var objects = this.map( function() {
|
124
|
+
var instance = $.data( this, namespace );
|
125
|
+
if ( instance ) {
|
126
|
+
// apply options & init
|
127
|
+
instance.option( options );
|
128
|
+
instance._init();
|
129
|
+
} else {
|
130
|
+
// initialize new instance
|
131
|
+
instance = new PluginClass( this, options );
|
132
|
+
$.data( this, namespace, instance );
|
133
|
+
}
|
134
|
+
return $(this);
|
135
|
+
});
|
136
|
+
|
137
|
+
if(!objects || objects.length > 1) {
|
138
|
+
return objects;
|
139
|
+
} else {
|
140
|
+
return objects[0];
|
141
|
+
}
|
142
|
+
}
|
143
|
+
};
|
144
|
+
|
145
|
+
}
|
146
|
+
|
147
|
+
// -------------------------- bridget -------------------------- //
|
148
|
+
|
149
|
+
/**
|
150
|
+
* converts a Prototypical class into a proper jQuery plugin
|
151
|
+
* the class must have a ._init method
|
152
|
+
* @param {String} namespace - plugin name, used in $().pluginName
|
153
|
+
* @param {Function} PluginClass - constructor class
|
154
|
+
*/
|
155
|
+
$.bridget = function( namespace, PluginClass ) {
|
156
|
+
addOptionMethod( PluginClass );
|
157
|
+
bridge( namespace, PluginClass );
|
158
|
+
};
|
159
|
+
|
160
|
+
return $.bridget;
|
161
|
+
|
162
|
+
}
|
163
|
+
|
164
|
+
// get jquery from browser global
|
165
|
+
defineBridget( $ );
|
166
|
+
|
167
|
+
})( $ );
|
168
|
+
|
169
|
+
|
170
|
+
/*************************************************
|
171
|
+
|
172
|
+
BOOTSTRAP-SLIDER SOURCE CODE
|
173
|
+
|
174
|
+
**************************************************/
|
175
|
+
|
176
|
+
(function( $ ) {
|
177
|
+
|
178
|
+
var ErrorMsgs = {
|
179
|
+
formatInvalidInputErrorMsg : function(input) {
|
180
|
+
return "Invalid input value '" + input + "' passed in";
|
181
|
+
},
|
182
|
+
callingContextNotSliderInstance : "Calling context element does not have instance of Slider bound to it. Check your code to make sure the JQuery object returned from the call to the slider() initializer is calling the method"
|
183
|
+
};
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
/*************************************************
|
188
|
+
|
189
|
+
CONSTRUCTOR
|
190
|
+
|
191
|
+
**************************************************/
|
192
|
+
var Slider = function(element, options) {
|
193
|
+
createNewSlider.call(this, element, options);
|
194
|
+
return this;
|
195
|
+
};
|
196
|
+
|
197
|
+
function createNewSlider(element, options) {
|
198
|
+
/*************************************************
|
199
|
+
|
200
|
+
Create Markup
|
201
|
+
|
202
|
+
**************************************************/
|
203
|
+
if(typeof element === "string") {
|
204
|
+
this.element = document.querySelector(element);
|
205
|
+
} else if(element instanceof HTMLElement) {
|
206
|
+
this.element = element;
|
207
|
+
}
|
208
|
+
|
209
|
+
var origWidth = this.element.style.width;
|
210
|
+
var updateSlider = false;
|
211
|
+
var parent = this.element.parentNode;
|
212
|
+
var sliderTrackSelection;
|
213
|
+
var sliderMinHandle;
|
214
|
+
var sliderMaxHandle;
|
215
|
+
|
216
|
+
if (this.sliderElem) {
|
217
|
+
updateSlider = true;
|
218
|
+
} else {
|
219
|
+
/* Create elements needed for slider */
|
220
|
+
this.sliderElem = document.createElement("div");
|
221
|
+
this.sliderElem.className = "slider";
|
222
|
+
|
223
|
+
/* Create slider track elements */
|
224
|
+
var sliderTrack = document.createElement("div");
|
225
|
+
sliderTrack.className = "slider-track";
|
226
|
+
|
227
|
+
sliderTrackSelection = document.createElement("div");
|
228
|
+
sliderTrackSelection.className = "slider-selection";
|
229
|
+
|
230
|
+
sliderMinHandle = document.createElement("div");
|
231
|
+
sliderMinHandle.className = "slider-handle min-slider-handle";
|
232
|
+
|
233
|
+
sliderMaxHandle = document.createElement("div");
|
234
|
+
sliderMaxHandle.className = "slider-handle max-slider-handle";
|
235
|
+
|
236
|
+
sliderTrack.appendChild(sliderTrackSelection);
|
237
|
+
sliderTrack.appendChild(sliderMinHandle);
|
238
|
+
sliderTrack.appendChild(sliderMaxHandle);
|
239
|
+
|
240
|
+
var createAndAppendTooltipSubElements = function(tooltipElem) {
|
241
|
+
var arrow = document.createElement("div");
|
242
|
+
arrow.className = "tooltip-arrow";
|
243
|
+
|
244
|
+
var inner = document.createElement("div");
|
245
|
+
inner.className = "tooltip-inner";
|
246
|
+
|
247
|
+
tooltipElem.appendChild(arrow);
|
248
|
+
tooltipElem.appendChild(inner);
|
249
|
+
};
|
250
|
+
|
251
|
+
/* Create tooltip elements */
|
252
|
+
var sliderTooltip = document.createElement("div");
|
253
|
+
sliderTooltip.className = "tooltip tooltip-main";
|
254
|
+
createAndAppendTooltipSubElements(sliderTooltip);
|
255
|
+
|
256
|
+
var sliderTooltipMin = document.createElement("div");
|
257
|
+
sliderTooltipMin.className = "tooltip tooltip-min";
|
258
|
+
createAndAppendTooltipSubElements(sliderTooltipMin);
|
259
|
+
|
260
|
+
var sliderTooltipMax = document.createElement("div");
|
261
|
+
sliderTooltipMax.className = "tooltip tooltip-max";
|
262
|
+
createAndAppendTooltipSubElements(sliderTooltipMax);
|
263
|
+
|
264
|
+
|
265
|
+
/* Append components to sliderElem */
|
266
|
+
this.sliderElem.appendChild(sliderTrack);
|
267
|
+
this.sliderElem.appendChild(sliderTooltip);
|
268
|
+
this.sliderElem.appendChild(sliderTooltipMin);
|
269
|
+
this.sliderElem.appendChild(sliderTooltipMax);
|
270
|
+
|
271
|
+
/* Append slider element to parent container, right before the original <input> element */
|
272
|
+
parent.insertBefore(this.sliderElem, this.element);
|
273
|
+
|
274
|
+
/* Hide original <input> element */
|
275
|
+
this.element.style.display = "none";
|
276
|
+
}
|
277
|
+
/* If JQuery exists, cache JQ references */
|
278
|
+
if($) {
|
279
|
+
this.$element = $(this.element);
|
280
|
+
this.$sliderElem = $(this.sliderElem);
|
281
|
+
}
|
282
|
+
|
283
|
+
/*************************************************
|
284
|
+
|
285
|
+
Process Options
|
286
|
+
|
287
|
+
**************************************************/
|
288
|
+
options = options ? options : {};
|
289
|
+
var optionTypes = Object.keys(this.defaultOptions);
|
290
|
+
|
291
|
+
for(var i = 0; i < optionTypes.length; i++) {
|
292
|
+
var optName = optionTypes[i];
|
293
|
+
|
294
|
+
// First check if an option was passed in via the constructor
|
295
|
+
var val = options[optName];
|
296
|
+
// If no data attrib, then check data atrributes
|
297
|
+
val = (typeof val !== 'undefined') ? val : getDataAttrib(this.element, optName);
|
298
|
+
// Finally, if nothing was specified, use the defaults
|
299
|
+
val = (val !== null) ? val : this.defaultOptions[optName];
|
300
|
+
|
301
|
+
// Set all options on the instance of the Slider
|
302
|
+
if(!this.options) {
|
303
|
+
this.options = {};
|
304
|
+
}
|
305
|
+
this.options[optName] = val;
|
306
|
+
}
|
307
|
+
|
308
|
+
function getDataAttrib(element, optName) {
|
309
|
+
var dataName = "data-slider-" + optName;
|
310
|
+
var dataValString = element.getAttribute(dataName);
|
311
|
+
|
312
|
+
try {
|
313
|
+
return JSON.parse(dataValString);
|
314
|
+
}
|
315
|
+
catch(err) {
|
316
|
+
return dataValString;
|
317
|
+
}
|
318
|
+
}
|
319
|
+
|
320
|
+
/*************************************************
|
321
|
+
|
322
|
+
Setup
|
323
|
+
|
324
|
+
**************************************************/
|
325
|
+
this.eventToCallbackMap = {};
|
326
|
+
this.sliderElem.id = this.options.id;
|
327
|
+
|
328
|
+
this.touchCapable = 'ontouchstart' in window || (window.DocumentTouch && document instanceof window.DocumentTouch);
|
329
|
+
|
330
|
+
this.tooltip = this.sliderElem.querySelector('.tooltip-main');
|
331
|
+
this.tooltipInner = this.tooltip.querySelector('.tooltip-inner');
|
332
|
+
|
333
|
+
this.tooltip_min = this.sliderElem.querySelector('.tooltip-min');
|
334
|
+
this.tooltipInner_min = this.tooltip_min.querySelector('.tooltip-inner');
|
335
|
+
|
336
|
+
this.tooltip_max = this.sliderElem.querySelector('.tooltip-max');
|
337
|
+
this.tooltipInner_max= this.tooltip_max.querySelector('.tooltip-inner');
|
338
|
+
|
339
|
+
if (updateSlider === true) {
|
340
|
+
// Reset classes
|
341
|
+
this._removeClass(this.sliderElem, 'slider-horizontal');
|
342
|
+
this._removeClass(this.sliderElem, 'slider-vertical');
|
343
|
+
this._removeClass(this.tooltip, 'hide');
|
344
|
+
this._removeClass(this.tooltip_min, 'hide');
|
345
|
+
this._removeClass(this.tooltip_max, 'hide');
|
346
|
+
|
347
|
+
// Undo existing inline styles for track
|
348
|
+
["left", "top", "width", "height"].forEach(function(prop) {
|
349
|
+
this._removeProperty(this.trackSelection, prop);
|
350
|
+
}, this);
|
351
|
+
|
352
|
+
// Undo inline styles on handles
|
353
|
+
[this.handle1, this.handle2].forEach(function(handle) {
|
354
|
+
this._removeProperty(handle, 'left');
|
355
|
+
this._removeProperty(handle, 'top');
|
356
|
+
}, this);
|
357
|
+
|
358
|
+
// Undo inline styles and classes on tooltips
|
359
|
+
[this.tooltip, this.tooltip_min, this.tooltip_max].forEach(function(tooltip) {
|
360
|
+
this._removeProperty(tooltip, 'left');
|
361
|
+
this._removeProperty(tooltip, 'top');
|
362
|
+
this._removeProperty(tooltip, 'margin-left');
|
363
|
+
this._removeProperty(tooltip, 'margin-top');
|
364
|
+
|
365
|
+
this._removeClass(tooltip, 'right');
|
366
|
+
this._removeClass(tooltip, 'top');
|
367
|
+
}, this);
|
368
|
+
}
|
369
|
+
|
370
|
+
if(this.options.orientation === 'vertical') {
|
371
|
+
this._addClass(this.sliderElem,'slider-vertical');
|
372
|
+
|
373
|
+
this.stylePos = 'top';
|
374
|
+
this.mousePos = 'pageY';
|
375
|
+
this.sizePos = 'offsetHeight';
|
376
|
+
|
377
|
+
this._addClass(this.tooltip, 'right');
|
378
|
+
this.tooltip.style.left = '100%';
|
379
|
+
|
380
|
+
this._addClass(this.tooltip_min, 'right');
|
381
|
+
this.tooltip_min.style.left = '100%';
|
382
|
+
|
383
|
+
this._addClass(this.tooltip_max, 'right');
|
384
|
+
this.tooltip_max.style.left = '100%';
|
385
|
+
} else {
|
386
|
+
this._addClass(this.sliderElem, 'slider-horizontal');
|
387
|
+
this.sliderElem.style.width = origWidth;
|
388
|
+
|
389
|
+
this.options.orientation = 'horizontal';
|
390
|
+
this.stylePos = 'left';
|
391
|
+
this.mousePos = 'pageX';
|
392
|
+
this.sizePos = 'offsetWidth';
|
393
|
+
|
394
|
+
this._addClass(this.tooltip, 'top');
|
395
|
+
this.tooltip.style.top = -this.tooltip.outerHeight - 14 + 'px';
|
396
|
+
|
397
|
+
this._addClass(this.tooltip_min, 'top');
|
398
|
+
this.tooltip_min.style.top = -this.tooltip_min.outerHeight - 14 + 'px';
|
399
|
+
|
400
|
+
this._addClass(this.tooltip_max, 'top');
|
401
|
+
this.tooltip_max.style.top = -this.tooltip_max.outerHeight - 14 + 'px';
|
402
|
+
}
|
403
|
+
|
404
|
+
if (this.options.value instanceof Array) {
|
405
|
+
this.options.range = true;
|
406
|
+
} else if (this.options.range) {
|
407
|
+
// User wants a range, but value is not an array
|
408
|
+
this.options.value = [this.options.value, this.options.max];
|
409
|
+
}
|
410
|
+
|
411
|
+
this.trackSelection = sliderTrackSelection || this.trackSelection;
|
412
|
+
if (this.options.selection === 'none') {
|
413
|
+
this._addClass(this.trackSelection, 'hide');
|
414
|
+
}
|
415
|
+
|
416
|
+
this.handle1 = sliderMinHandle || this.handle1;
|
417
|
+
this.handle2 = sliderMaxHandle || this.handle2;
|
418
|
+
|
419
|
+
if (updateSlider === true) {
|
420
|
+
// Reset classes
|
421
|
+
this._removeClass(this.handle1, 'round triangle');
|
422
|
+
this._removeClass(this.handle2, 'round triangle hide');
|
423
|
+
}
|
424
|
+
|
425
|
+
var availableHandleModifiers = ['round', 'triangle', 'custom'];
|
426
|
+
var isValidHandleType = availableHandleModifiers.indexOf(this.options.handle) !== -1;
|
427
|
+
if (isValidHandleType) {
|
428
|
+
this._addClass(this.handle1, this.options.handle);
|
429
|
+
this._addClass(this.handle2, this.options.handle);
|
430
|
+
}
|
431
|
+
|
432
|
+
this.offset = this._offset(this.sliderElem);
|
433
|
+
this.size = this.sliderElem[this.sizePos];
|
434
|
+
this.setValue(this.options.value);
|
435
|
+
|
436
|
+
/******************************************
|
437
|
+
|
438
|
+
Bind Event Listeners
|
439
|
+
|
440
|
+
******************************************/
|
441
|
+
|
442
|
+
// Bind keyboard handlers
|
443
|
+
this.handle1Keydown = this._keydown.bind(this, 0);
|
444
|
+
this.handle1.addEventListener("keydown", this.handle1Keydown, false);
|
445
|
+
|
446
|
+
this.handle2Keydown = this._keydown.bind(this, 0);
|
447
|
+
this.handle2.addEventListener("keydown", this.handle2Keydown, false);
|
448
|
+
|
449
|
+
if (this.touchCapable) {
|
450
|
+
// Bind touch handlers
|
451
|
+
this.mousedown = this._mousedown.bind(this);
|
452
|
+
this.sliderElem.addEventListener("touchstart", this.mousedown, false);
|
453
|
+
} else {
|
454
|
+
// Bind mouse handlers
|
455
|
+
this.mousedown = this._mousedown.bind(this);
|
456
|
+
this.sliderElem.addEventListener("mousedown", this.mousedown, false);
|
457
|
+
}
|
458
|
+
|
459
|
+
// Bind tooltip-related handlers
|
460
|
+
if(this.options.tooltip === 'hide') {
|
461
|
+
this._addClass(this.tooltip, 'hide');
|
462
|
+
this._addClass(this.tooltip_min, 'hide');
|
463
|
+
this._addClass(this.tooltip_max, 'hide');
|
464
|
+
} else if(this.options.tooltip === 'always') {
|
465
|
+
this._showTooltip();
|
466
|
+
this._alwaysShowTooltip = true;
|
467
|
+
} else {
|
468
|
+
this.showTooltip = this._showTooltip.bind(this);
|
469
|
+
this.hideTooltip = this._hideTooltip.bind(this);
|
470
|
+
|
471
|
+
this.sliderElem.addEventListener("mouseenter", this.showTooltip, false);
|
472
|
+
this.sliderElem.addEventListener("mouseleave", this.hideTooltip, false);
|
473
|
+
|
474
|
+
this.handle1.addEventListener("focus", this.showTooltip, false);
|
475
|
+
this.handle1.addEventListener("blur", this.hideTooltip, false);
|
476
|
+
|
477
|
+
this.handle2.addEventListener("focus", this.showTooltip, false);
|
478
|
+
this.handle2.addEventListener("blur", this.hideTooltip, false);
|
479
|
+
}
|
480
|
+
|
481
|
+
if(this.options.enabled) {
|
482
|
+
this.enable();
|
483
|
+
} else {
|
484
|
+
this.disable();
|
485
|
+
}
|
486
|
+
}
|
487
|
+
|
488
|
+
/*************************************************
|
489
|
+
|
490
|
+
INSTANCE PROPERTIES/METHODS
|
491
|
+
|
492
|
+
- Any methods bound to the prototype are considered
|
493
|
+
part of the plugin's `public` interface
|
494
|
+
|
495
|
+
**************************************************/
|
496
|
+
Slider.prototype = {
|
497
|
+
_init: function() {}, // NOTE: Must exist to support bridget
|
498
|
+
|
499
|
+
constructor: Slider,
|
500
|
+
|
501
|
+
defaultOptions: {
|
502
|
+
id: "",
|
503
|
+
min: 0,
|
504
|
+
max: 10,
|
505
|
+
step: 1,
|
506
|
+
precision: 0,
|
507
|
+
orientation: 'horizontal',
|
508
|
+
value: 5,
|
509
|
+
range: false,
|
510
|
+
selection: 'before',
|
511
|
+
tooltip: 'show',
|
512
|
+
tooltip_split: false,
|
513
|
+
handle: 'round',
|
514
|
+
reversed: false,
|
515
|
+
enabled: true,
|
516
|
+
formatter: function(val) {
|
517
|
+
if(val instanceof Array) {
|
518
|
+
return val[0] + " : " + val[1];
|
519
|
+
} else {
|
520
|
+
return val;
|
521
|
+
}
|
522
|
+
},
|
523
|
+
natural_arrow_keys: false
|
524
|
+
},
|
525
|
+
|
526
|
+
over: false,
|
527
|
+
|
528
|
+
inDrag: false,
|
529
|
+
|
530
|
+
getValue: function() {
|
531
|
+
if (this.options.range) {
|
532
|
+
return this.options.value;
|
533
|
+
}
|
534
|
+
return this.options.value[0];
|
535
|
+
},
|
536
|
+
|
537
|
+
setValue: function(val, triggerSlideEvent) {
|
538
|
+
if (!val) {
|
539
|
+
val = 0;
|
540
|
+
}
|
541
|
+
this.options.value = this._validateInputValue(val);
|
542
|
+
var applyPrecision = this._applyPrecision.bind(this);
|
543
|
+
|
544
|
+
if (this.options.range) {
|
545
|
+
this.options.value[0] = applyPrecision(this.options.value[0]);
|
546
|
+
this.options.value[1] = applyPrecision(this.options.value[1]);
|
547
|
+
|
548
|
+
this.options.value[0] = Math.max(this.options.min, Math.min(this.options.max, this.options.value[0]));
|
549
|
+
this.options.value[1] = Math.max(this.options.min, Math.min(this.options.max, this.options.value[1]));
|
550
|
+
} else {
|
551
|
+
this.options.value = applyPrecision(this.options.value);
|
552
|
+
this.options.value = [ Math.max(this.options.min, Math.min(this.options.max, this.options.value))];
|
553
|
+
this._addClass(this.handle2, 'hide');
|
554
|
+
if (this.options.selection === 'after') {
|
555
|
+
this.options.value[1] = this.options.max;
|
556
|
+
} else {
|
557
|
+
this.options.value[1] = this.options.min;
|
558
|
+
}
|
559
|
+
}
|
560
|
+
|
561
|
+
this.diff = this.options.max - this.options.min;
|
562
|
+
if (this.diff > 0) {
|
563
|
+
this.percentage = [
|
564
|
+
(this.options.value[0] - this.options.min) * 100 / this.diff,
|
565
|
+
(this.options.value[1] - this.options.min) * 100 / this.diff,
|
566
|
+
this.options.step * 100 / this.diff
|
567
|
+
];
|
568
|
+
} else {
|
569
|
+
this.percentage = [0, 0, 100];
|
570
|
+
}
|
571
|
+
|
572
|
+
this._layout();
|
573
|
+
|
574
|
+
var sliderValue = this.options.range ? this.options.value : this.options.value[0];
|
575
|
+
this._setDataVal(sliderValue);
|
576
|
+
|
577
|
+
if(triggerSlideEvent === true) {
|
578
|
+
this._trigger('slide', sliderValue);
|
579
|
+
}
|
580
|
+
|
581
|
+
return this;
|
582
|
+
},
|
583
|
+
|
584
|
+
destroy: function(){
|
585
|
+
// Remove event handlers on slider elements
|
586
|
+
this._removeSliderEventHandlers();
|
587
|
+
|
588
|
+
// Remove the slider from the DOM
|
589
|
+
this.sliderElem.parentNode.removeChild(this.sliderElem);
|
590
|
+
/* Show original <input> element */
|
591
|
+
this.element.style.display = "";
|
592
|
+
|
593
|
+
// Clear out custom event bindings
|
594
|
+
this._cleanUpEventCallbacksMap();
|
595
|
+
|
596
|
+
// Remove data values
|
597
|
+
this.element.removeAttribute("data");
|
598
|
+
|
599
|
+
// Remove JQuery handlers/data
|
600
|
+
if($) {
|
601
|
+
this._unbindJQueryEventHandlers();
|
602
|
+
this.$element.removeData('slider');
|
603
|
+
}
|
604
|
+
},
|
605
|
+
|
606
|
+
disable: function() {
|
607
|
+
this.options.enabled = false;
|
608
|
+
this.handle1.removeAttribute("tabindex");
|
609
|
+
this.handle2.removeAttribute("tabindex");
|
610
|
+
this._addClass(this.sliderElem, 'slider-disabled');
|
611
|
+
this._trigger('slideDisabled');
|
612
|
+
|
613
|
+
return this;
|
614
|
+
},
|
615
|
+
|
616
|
+
enable: function() {
|
617
|
+
this.options.enabled = true;
|
618
|
+
this.handle1.setAttribute("tabindex", 0);
|
619
|
+
this.handle2.setAttribute("tabindex", 0);
|
620
|
+
this._removeClass(this.sliderElem, 'slider-disabled');
|
621
|
+
this._trigger('slideEnabled');
|
622
|
+
|
623
|
+
return this;
|
624
|
+
},
|
625
|
+
|
626
|
+
toggle: function() {
|
627
|
+
if(this.options.enabled) {
|
628
|
+
this.disable();
|
629
|
+
} else {
|
630
|
+
this.enable();
|
631
|
+
}
|
632
|
+
|
633
|
+
return this;
|
634
|
+
},
|
635
|
+
|
636
|
+
isEnabled: function() {
|
637
|
+
return this.options.enabled;
|
638
|
+
},
|
639
|
+
|
640
|
+
on: function(evt, callback) {
|
641
|
+
if($) {
|
642
|
+
this.$element.on(evt, callback);
|
643
|
+
this.$sliderElem.on(evt, callback);
|
644
|
+
} else {
|
645
|
+
this._bindNonQueryEventHandler(evt, callback);
|
646
|
+
}
|
647
|
+
return this;
|
648
|
+
},
|
649
|
+
|
650
|
+
getAttribute: function(attribute) {
|
651
|
+
if(attribute) {
|
652
|
+
return this.options[attribute];
|
653
|
+
} else {
|
654
|
+
return this.options;
|
655
|
+
}
|
656
|
+
},
|
657
|
+
|
658
|
+
setAttribute: function(attribute, value) {
|
659
|
+
this.options[attribute] = value;
|
660
|
+
return this;
|
661
|
+
},
|
662
|
+
|
663
|
+
refresh: function() {
|
664
|
+
this._removeSliderEventHandlers();
|
665
|
+
createNewSlider.call(this, this.element, this.options);
|
666
|
+
if($) {
|
667
|
+
// Bind new instance of slider to the element
|
668
|
+
$.data(this.element, 'slider', this);
|
669
|
+
}
|
670
|
+
return this;
|
671
|
+
},
|
672
|
+
|
673
|
+
/******************************+
|
674
|
+
|
675
|
+
HELPERS
|
676
|
+
|
677
|
+
- Any method that is not part of the public interface.
|
678
|
+
- Place it underneath this comment block and write its signature like so:
|
679
|
+
|
680
|
+
_fnName : function() {...}
|
681
|
+
|
682
|
+
********************************/
|
683
|
+
_removeSliderEventHandlers: function() {
|
684
|
+
// Remove event listeners from handle1
|
685
|
+
this.handle1.removeEventListener("keydown", this.handle1Keydown, false);
|
686
|
+
this.handle1.removeEventListener("focus", this.showTooltip, false);
|
687
|
+
this.handle1.removeEventListener("blur", this.hideTooltip, false);
|
688
|
+
|
689
|
+
// Remove event listeners from handle2
|
690
|
+
this.handle2.removeEventListener("keydown", this.handle2Keydown, false);
|
691
|
+
this.handle2.removeEventListener("focus", this.handle2Keydown, false);
|
692
|
+
this.handle2.removeEventListener("blur", this.handle2Keydown, false);
|
693
|
+
|
694
|
+
// Remove event listeners from sliderElem
|
695
|
+
this.sliderElem.removeEventListener("mouseenter", this.showTooltip, false);
|
696
|
+
this.sliderElem.removeEventListener("mouseleave", this.hideTooltip, false);
|
697
|
+
this.sliderElem.removeEventListener("touchstart", this.mousedown, false);
|
698
|
+
this.sliderElem.removeEventListener("mousedown", this.mousedown, false);
|
699
|
+
},
|
700
|
+
_bindNonQueryEventHandler: function(evt, callback) {
|
701
|
+
if(this.eventToCallbackMap[evt]===undefined) {
|
702
|
+
this.eventToCallbackMap[evt] = [];
|
703
|
+
}
|
704
|
+
this.eventToCallbackMap[evt].push(callback);
|
705
|
+
},
|
706
|
+
_cleanUpEventCallbacksMap: function() {
|
707
|
+
var eventNames = Object.keys(this.eventToCallbackMap);
|
708
|
+
for(var i = 0; i < eventNames.length; i++) {
|
709
|
+
var eventName = eventNames[i];
|
710
|
+
this.eventToCallbackMap[eventName] = null;
|
711
|
+
}
|
712
|
+
},
|
713
|
+
_showTooltip: function() {
|
714
|
+
if (this.options.tooltip_split === false ){
|
715
|
+
this._addClass(this.tooltip, 'in');
|
716
|
+
} else {
|
717
|
+
this._addClass(this.tooltip_min, 'in');
|
718
|
+
this._addClass(this.tooltip_max, 'in');
|
719
|
+
}
|
720
|
+
this.over = true;
|
721
|
+
},
|
722
|
+
_hideTooltip: function() {
|
723
|
+
if (this.inDrag === false && this.alwaysShowTooltip !== true) {
|
724
|
+
this._removeClass(this.tooltip, 'in');
|
725
|
+
this._removeClass(this.tooltip_min, 'in');
|
726
|
+
this._removeClass(this.tooltip_max, 'in');
|
727
|
+
}
|
728
|
+
this.over = false;
|
729
|
+
},
|
730
|
+
_layout: function() {
|
731
|
+
var positionPercentages;
|
732
|
+
|
733
|
+
if(this.options.reversed) {
|
734
|
+
positionPercentages = [ 100 - this.percentage[0], this.percentage[1] ];
|
735
|
+
} else {
|
736
|
+
positionPercentages = [ this.percentage[0], this.percentage[1] ];
|
737
|
+
}
|
738
|
+
|
739
|
+
this.handle1.style[this.stylePos] = positionPercentages[0]+'%';
|
740
|
+
this.handle2.style[this.stylePos] = positionPercentages[1]+'%';
|
741
|
+
|
742
|
+
if (this.options.orientation === 'vertical') {
|
743
|
+
this.trackSelection.style.top = Math.min(positionPercentages[0], positionPercentages[1]) +'%';
|
744
|
+
this.trackSelection.style.height = Math.abs(positionPercentages[0] - positionPercentages[1]) +'%';
|
745
|
+
} else {
|
746
|
+
this.trackSelection.style.left = Math.min(positionPercentages[0], positionPercentages[1]) +'%';
|
747
|
+
this.trackSelection.style.width = Math.abs(positionPercentages[0] - positionPercentages[1]) +'%';
|
748
|
+
|
749
|
+
var offset_min = this.tooltip_min.getBoundingClientRect();
|
750
|
+
var offset_max = this.tooltip_max.getBoundingClientRect();
|
751
|
+
|
752
|
+
if (offset_min.right > offset_max.left) {
|
753
|
+
this._removeClass(this.tooltip_max, 'top');
|
754
|
+
this._addClass(this.tooltip_max, 'bottom');
|
755
|
+
this.tooltip_max.style.top = 18 + 'px';
|
756
|
+
} else {
|
757
|
+
this._removeClass(this.tooltip_max, 'bottom');
|
758
|
+
this._addClass(this.tooltip_max, 'top');
|
759
|
+
this.tooltip_max.style.top = -30 + 'px';
|
760
|
+
}
|
761
|
+
}
|
762
|
+
|
763
|
+
|
764
|
+
var formattedTooltipVal;
|
765
|
+
|
766
|
+
if (this.options.range) {
|
767
|
+
formattedTooltipVal = this.options.formatter(this.options.value);
|
768
|
+
this._setText(this.tooltipInner, formattedTooltipVal);
|
769
|
+
this.tooltip.style[this.stylePos] = (positionPercentages[1] + positionPercentages[0])/2 + '%';
|
770
|
+
|
771
|
+
if (this.options.orientation === 'vertical') {
|
772
|
+
this._css(this.tooltip, 'margin-top', -this.tooltip.offsetHeight / 2 + 'px');
|
773
|
+
} else {
|
774
|
+
this._css(this.tooltip, 'margin-left', -this.tooltip.offsetWidth / 2 + 'px');
|
775
|
+
}
|
776
|
+
|
777
|
+
if (this.options.orientation === 'vertical') {
|
778
|
+
this._css(this.tooltip, 'margin-top', -this.tooltip.offsetHeight / 2 + 'px');
|
779
|
+
} else {
|
780
|
+
this._css(this.tooltip, 'margin-left', -this.tooltip.offsetWidth / 2 + 'px');
|
781
|
+
}
|
782
|
+
|
783
|
+
var innerTooltipMinText = this.options.formatter(this.options.value[0]);
|
784
|
+
this._setText(this.tooltipInner_min, innerTooltipMinText);
|
785
|
+
|
786
|
+
var innerTooltipMaxText = this.options.formatter(this.options.value[1]);
|
787
|
+
this._setText(this.tooltipInner_max, innerTooltipMaxText);
|
788
|
+
|
789
|
+
this.tooltip_min.style[this.stylePos] = positionPercentages[0] + '%';
|
790
|
+
|
791
|
+
if (this.options.orientation === 'vertical') {
|
792
|
+
this._css(this.tooltip_min, 'margin-top', -this.tooltip_min.offsetHeight / 2 + 'px');
|
793
|
+
} else {
|
794
|
+
this._css(this.tooltip_min, 'margin-left', -this.tooltip_min.offsetWidth / 2 + 'px');
|
795
|
+
}
|
796
|
+
|
797
|
+
this.tooltip_max.style[this.stylePos] = positionPercentages[1] + '%';
|
798
|
+
|
799
|
+
if (this.options.orientation === 'vertical') {
|
800
|
+
this._css(this.tooltip_max, 'margin-top', -this.tooltip_max.offsetHeight / 2 + 'px');
|
801
|
+
} else {
|
802
|
+
this._css(this.tooltip_max, 'margin-left', -this.tooltip_max.offsetWidth / 2 + 'px');
|
803
|
+
}
|
804
|
+
} else {
|
805
|
+
formattedTooltipVal = this.options.formatter(this.options.value[0]);
|
806
|
+
this._setText(this.tooltipInner, formattedTooltipVal);
|
807
|
+
|
808
|
+
this.tooltip.style[this.stylePos] = positionPercentages[0] + '%';
|
809
|
+
if (this.options.orientation === 'vertical') {
|
810
|
+
this._css(this.tooltip, 'margin-top', -this.tooltip.offsetHeight / 2 + 'px');
|
811
|
+
} else {
|
812
|
+
this._css(this.tooltip, 'margin-left', -this.tooltip.offsetWidth / 2 + 'px');
|
813
|
+
}
|
814
|
+
}
|
815
|
+
},
|
816
|
+
_removeProperty: function(element, prop) {
|
817
|
+
if (element.style.removeProperty) {
|
818
|
+
element.style.removeProperty(prop);
|
819
|
+
} else {
|
820
|
+
element.style.removeAttribute(prop);
|
821
|
+
}
|
822
|
+
},
|
823
|
+
_mousedown: function(ev) {
|
824
|
+
if(!this.options.enabled) {
|
825
|
+
return false;
|
826
|
+
}
|
827
|
+
|
828
|
+
this._triggerFocusOnHandle();
|
829
|
+
|
830
|
+
this.offset = this._offset(this.sliderElem);
|
831
|
+
this.size = this.sliderElem[this.sizePos];
|
832
|
+
|
833
|
+
var percentage = this._getPercentage(ev);
|
834
|
+
|
835
|
+
if (this.options.range) {
|
836
|
+
var diff1 = Math.abs(this.percentage[0] - percentage);
|
837
|
+
var diff2 = Math.abs(this.percentage[1] - percentage);
|
838
|
+
this.dragged = (diff1 < diff2) ? 0 : 1;
|
839
|
+
} else {
|
840
|
+
this.dragged = 0;
|
841
|
+
}
|
842
|
+
|
843
|
+
this.percentage[this.dragged] = this.options.reversed ? 100 - percentage : percentage;
|
844
|
+
this._layout();
|
845
|
+
|
846
|
+
this.mousemove = this._mousemove.bind(this);
|
847
|
+
this.mouseup = this._mouseup.bind(this);
|
848
|
+
|
849
|
+
if (this.touchCapable) {
|
850
|
+
// Touch: Bind touch events:
|
851
|
+
document.addEventListener("touchmove", this.mousemove, false);
|
852
|
+
document.addEventListener("touchend", this.mouseup, false);
|
853
|
+
} else {
|
854
|
+
// Bind mouse events:
|
855
|
+
document.addEventListener("mousemove", this.mousemove, false);
|
856
|
+
document.addEventListener("mouseup", this.mouseup, false);
|
857
|
+
}
|
858
|
+
|
859
|
+
this.inDrag = true;
|
860
|
+
|
861
|
+
var val = this._calculateValue();
|
862
|
+
this._trigger('slideStart', val);
|
863
|
+
this._setDataVal(val);
|
864
|
+
this.setValue(val);
|
865
|
+
|
866
|
+
this._pauseEvent(ev);
|
867
|
+
|
868
|
+
return true;
|
869
|
+
},
|
870
|
+
_triggerFocusOnHandle: function(handleIdx) {
|
871
|
+
if(handleIdx === 0) {
|
872
|
+
this.handle1.focus();
|
873
|
+
}
|
874
|
+
if(handleIdx === 1) {
|
875
|
+
this.handle2.focus();
|
876
|
+
}
|
877
|
+
},
|
878
|
+
_keydown: function(handleIdx, ev) {
|
879
|
+
if(!this.options.enabled) {
|
880
|
+
return false;
|
881
|
+
}
|
882
|
+
|
883
|
+
var dir;
|
884
|
+
switch (ev.keyCode) {
|
885
|
+
case 37: // left
|
886
|
+
case 40: // down
|
887
|
+
dir = -1;
|
888
|
+
break;
|
889
|
+
case 39: // right
|
890
|
+
case 38: // up
|
891
|
+
dir = 1;
|
892
|
+
break;
|
893
|
+
}
|
894
|
+
if (!dir) {
|
895
|
+
return;
|
896
|
+
}
|
897
|
+
|
898
|
+
// use natural arrow keys instead of from min to max
|
899
|
+
if (this.options.natural_arrow_keys) {
|
900
|
+
var ifVerticalAndNotReversed = (this.options.orientation === 'vertical' && !this.options.reversed);
|
901
|
+
var ifHorizontalAndReversed = (this.options.orientation === 'horizontal' && this.options.reversed);
|
902
|
+
|
903
|
+
if (ifVerticalAndNotReversed || ifHorizontalAndReversed) {
|
904
|
+
dir = dir * -1;
|
905
|
+
}
|
906
|
+
}
|
907
|
+
|
908
|
+
var oneStepValuePercentageChange = dir * this.percentage[2];
|
909
|
+
var percentage = this.percentage[handleIdx] + oneStepValuePercentageChange;
|
910
|
+
|
911
|
+
if (percentage > 100) {
|
912
|
+
percentage = 100;
|
913
|
+
} else if (percentage < 0) {
|
914
|
+
percentage = 0;
|
915
|
+
}
|
916
|
+
|
917
|
+
this.dragged = handleIdx;
|
918
|
+
this._adjustPercentageForRangeSliders(percentage);
|
919
|
+
this.percentage[this.dragged] = percentage;
|
920
|
+
this._layout();
|
921
|
+
|
922
|
+
var val = this._calculateValue();
|
923
|
+
|
924
|
+
this._trigger('slideStart', val);
|
925
|
+
this._setDataVal(val);
|
926
|
+
this.setValue(val, true);
|
927
|
+
|
928
|
+
this._trigger('slideStop', val);
|
929
|
+
this._setDataVal(val);
|
930
|
+
|
931
|
+
this._pauseEvent(ev);
|
932
|
+
|
933
|
+
return false;
|
934
|
+
},
|
935
|
+
_pauseEvent: function(ev) {
|
936
|
+
if(ev.stopPropagation) {
|
937
|
+
ev.stopPropagation();
|
938
|
+
}
|
939
|
+
if(ev.preventDefault) {
|
940
|
+
ev.preventDefault();
|
941
|
+
}
|
942
|
+
ev.cancelBubble=true;
|
943
|
+
ev.returnValue=false;
|
944
|
+
},
|
945
|
+
_mousemove: function(ev) {
|
946
|
+
if(!this.options.enabled) {
|
947
|
+
return false;
|
948
|
+
}
|
949
|
+
|
950
|
+
var percentage = this._getPercentage(ev);
|
951
|
+
this._adjustPercentageForRangeSliders(percentage);
|
952
|
+
this.percentage[this.dragged] = this.options.reversed ? 100 - percentage : percentage;
|
953
|
+
this._layout();
|
954
|
+
|
955
|
+
var val = this._calculateValue();
|
956
|
+
this.setValue(val, true);
|
957
|
+
|
958
|
+
return false;
|
959
|
+
},
|
960
|
+
_adjustPercentageForRangeSliders: function(percentage) {
|
961
|
+
if (this.options.range) {
|
962
|
+
if (this.dragged === 0 && this.percentage[1] < percentage) {
|
963
|
+
this.percentage[0] = this.percentage[1];
|
964
|
+
this.dragged = 1;
|
965
|
+
} else if (this.dragged === 1 && this.percentage[0] > percentage) {
|
966
|
+
this.percentage[1] = this.percentage[0];
|
967
|
+
this.dragged = 0;
|
968
|
+
}
|
969
|
+
}
|
970
|
+
},
|
971
|
+
_mouseup: function() {
|
972
|
+
if(!this.options.enabled) {
|
973
|
+
return false;
|
974
|
+
}
|
975
|
+
if (this.touchCapable) {
|
976
|
+
// Touch: Unbind touch event handlers:
|
977
|
+
document.removeEventListener("touchmove", this.mousemove, false);
|
978
|
+
document.removeEventListener("touchend", this.mouseup, false);
|
979
|
+
} else {
|
980
|
+
// Unbind mouse event handlers:
|
981
|
+
document.removeEventListener("mousemove", this.mousemove, false);
|
982
|
+
document.removeEventListener("mouseup", this.mouseup, false);
|
983
|
+
}
|
984
|
+
|
985
|
+
this.inDrag = false;
|
986
|
+
if (this.over === false) {
|
987
|
+
this._hideTooltip();
|
988
|
+
}
|
989
|
+
var val = this._calculateValue();
|
990
|
+
|
991
|
+
this._layout();
|
992
|
+
this._setDataVal(val);
|
993
|
+
this._trigger('slideStop', val);
|
994
|
+
|
995
|
+
return false;
|
996
|
+
},
|
997
|
+
_calculateValue: function() {
|
998
|
+
var val;
|
999
|
+
if (this.options.range) {
|
1000
|
+
val = [this.options.min,this.options.max];
|
1001
|
+
if (this.percentage[0] !== 0){
|
1002
|
+
val[0] = (Math.max(this.options.min, this.options.min + Math.round((this.diff * this.percentage[0]/100)/this.options.step)*this.options.step));
|
1003
|
+
val[0] = this._applyPrecision(val[0]);
|
1004
|
+
}
|
1005
|
+
if (this.percentage[1] !== 100){
|
1006
|
+
val[1] = (Math.min(this.options.max, this.options.min + Math.round((this.diff * this.percentage[1]/100)/this.options.step)*this.options.step));
|
1007
|
+
val[1] = this._applyPrecision(val[1]);
|
1008
|
+
}
|
1009
|
+
this.options.value = val;
|
1010
|
+
} else {
|
1011
|
+
val = (this.options.min + Math.round((this.diff * this.percentage[0]/100)/this.options.step)*this.options.step);
|
1012
|
+
if (val < this.options.min) {
|
1013
|
+
val = this.options.min;
|
1014
|
+
}
|
1015
|
+
else if (val > this.options.max) {
|
1016
|
+
val = this.options.max;
|
1017
|
+
}
|
1018
|
+
val = parseFloat(val);
|
1019
|
+
val = this._applyPrecision(val);
|
1020
|
+
this.options.value = [val, this.options.value[1]];
|
1021
|
+
}
|
1022
|
+
return val;
|
1023
|
+
},
|
1024
|
+
_applyPrecision: function(val) {
|
1025
|
+
var precision = this.options.precision || this._getNumDigitsAfterDecimalPlace(this.step);
|
1026
|
+
return this._applyToFixedAndParseFloat(val, precision);
|
1027
|
+
},
|
1028
|
+
_getNumDigitsAfterDecimalPlace: function(num) {
|
1029
|
+
var match = (''+num).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);
|
1030
|
+
if (!match) { return 0; }
|
1031
|
+
return Math.max(0, (match[1] ? match[1].length : 0) - (match[2] ? +match[2] : 0));
|
1032
|
+
},
|
1033
|
+
_applyToFixedAndParseFloat: function(num, toFixedInput) {
|
1034
|
+
var truncatedNum = num.toFixed(toFixedInput);
|
1035
|
+
return parseFloat(truncatedNum);
|
1036
|
+
},
|
1037
|
+
/*
|
1038
|
+
Credits to Mike Samuel for the following method!
|
1039
|
+
Source: http://stackoverflow.com/questions/10454518/javascript-how-to-retrieve-the-number-of-decimals-of-a-string-number
|
1040
|
+
*/
|
1041
|
+
_getPercentage: function(ev) {
|
1042
|
+
if (this.touchCapable && (ev.type === 'touchstart' || ev.type === 'touchmove')) {
|
1043
|
+
ev = ev.touches[0];
|
1044
|
+
}
|
1045
|
+
var percentage = (ev[this.mousePos] - this.offset[this.stylePos])*100/this.size;
|
1046
|
+
percentage = Math.round(percentage/this.percentage[2])*this.percentage[2];
|
1047
|
+
return Math.max(0, Math.min(100, percentage));
|
1048
|
+
},
|
1049
|
+
_validateInputValue: function(val) {
|
1050
|
+
if(typeof val === 'number') {
|
1051
|
+
return val;
|
1052
|
+
} else if(val instanceof Array) {
|
1053
|
+
this._validateArray(val);
|
1054
|
+
return val;
|
1055
|
+
} else {
|
1056
|
+
throw new Error( ErrorMsgs.formatInvalidInputErrorMsg(val) );
|
1057
|
+
}
|
1058
|
+
},
|
1059
|
+
_validateArray: function(val) {
|
1060
|
+
for(var i = 0; i < val.length; i++) {
|
1061
|
+
var input = val[i];
|
1062
|
+
if (typeof input !== 'number') { throw new Error( ErrorMsgs.formatInvalidInputErrorMsg(input) ); }
|
1063
|
+
}
|
1064
|
+
},
|
1065
|
+
_setDataVal: function(val) {
|
1066
|
+
var value = "value: '" + val + "'";
|
1067
|
+
this.element.setAttribute('data', value);
|
1068
|
+
this.element.setAttribute('value', val);
|
1069
|
+
},
|
1070
|
+
_trigger: function(evt, val) {
|
1071
|
+
val = val || undefined;
|
1072
|
+
|
1073
|
+
var callbackFnArray = this.eventToCallbackMap[evt];
|
1074
|
+
if(callbackFnArray && callbackFnArray.length) {
|
1075
|
+
for(var i = 0; i < callbackFnArray.length; i++) {
|
1076
|
+
var callbackFn = callbackFnArray[i];
|
1077
|
+
callbackFn(val);
|
1078
|
+
}
|
1079
|
+
}
|
1080
|
+
|
1081
|
+
/* If JQuery exists, trigger JQuery events */
|
1082
|
+
if($) {
|
1083
|
+
this._triggerJQueryEvent(evt, val);
|
1084
|
+
}
|
1085
|
+
},
|
1086
|
+
_triggerJQueryEvent: function(evt, val) {
|
1087
|
+
var eventData = {
|
1088
|
+
type: evt,
|
1089
|
+
value: val
|
1090
|
+
};
|
1091
|
+
this.$element.trigger(eventData);
|
1092
|
+
this.$sliderElem.trigger(eventData);
|
1093
|
+
},
|
1094
|
+
_unbindJQueryEventHandlers: function() {
|
1095
|
+
this.$element.off();
|
1096
|
+
this.$sliderElem.off();
|
1097
|
+
},
|
1098
|
+
_setText: function(element, text) {
|
1099
|
+
if(typeof element.innerText !== "undefined") {
|
1100
|
+
element.innerText = text;
|
1101
|
+
} else if(typeof element.textContent !== "undefined") {
|
1102
|
+
element.textContent = text;
|
1103
|
+
}
|
1104
|
+
},
|
1105
|
+
_removeClass: function(element, classString) {
|
1106
|
+
var classes = classString.split(" ");
|
1107
|
+
var newClasses = element.className;
|
1108
|
+
|
1109
|
+
for(var i = 0; i < classes.length; i++) {
|
1110
|
+
var classTag = classes[i];
|
1111
|
+
var regex = new RegExp("(?:\\s|^)" + classTag + "(?:\\s|$)");
|
1112
|
+
newClasses = newClasses.replace(regex, " ");
|
1113
|
+
}
|
1114
|
+
|
1115
|
+
element.className = newClasses.trim();
|
1116
|
+
},
|
1117
|
+
_addClass: function(element, classString) {
|
1118
|
+
var classes = classString.split(" ");
|
1119
|
+
var newClasses = element.className;
|
1120
|
+
|
1121
|
+
for(var i = 0; i < classes.length; i++) {
|
1122
|
+
var classTag = classes[i];
|
1123
|
+
var regex = new RegExp("(?:\\s|^)" + classTag + "(?:\\s|$)");
|
1124
|
+
var ifClassExists = regex.test(newClasses);
|
1125
|
+
|
1126
|
+
if(!ifClassExists) {
|
1127
|
+
newClasses += " " + classTag;
|
1128
|
+
}
|
1129
|
+
}
|
1130
|
+
|
1131
|
+
element.className = newClasses.trim();
|
1132
|
+
},
|
1133
|
+
_offset: function (obj) {
|
1134
|
+
var ol = 0;
|
1135
|
+
var ot = 0;
|
1136
|
+
if (obj.offsetParent) {
|
1137
|
+
do {
|
1138
|
+
ol += obj.offsetLeft;
|
1139
|
+
ot += obj.offsetTop;
|
1140
|
+
} while (obj = obj.offsetParent);
|
1141
|
+
}
|
1142
|
+
return {
|
1143
|
+
left: ol,
|
1144
|
+
top: ot
|
1145
|
+
};
|
1146
|
+
},
|
1147
|
+
_css: function(elementRef, styleName, value) {
|
1148
|
+
elementRef.style[styleName] = value;
|
1149
|
+
}
|
1150
|
+
};
|
1151
|
+
|
1152
|
+
/*********************************
|
1153
|
+
|
1154
|
+
Attach to global namespace
|
1155
|
+
|
1156
|
+
*********************************/
|
1157
|
+
if($) {
|
1158
|
+
var namespace = $.fn.slider ? 'bootstrapSlider' : 'slider';
|
1159
|
+
$.bridget(namespace, Slider);
|
1160
|
+
} else {
|
1161
|
+
window.Slider = Slider;
|
1162
|
+
}
|
1163
|
+
|
1164
|
+
|
1165
|
+
})( $ );
|
1166
|
+
|
1167
|
+
})( window.jQuery );
|