rails_marketplace 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +37 -0
- data/app/assets/javascripts/rails_marketplace/application.js +46 -0
- data/app/assets/javascripts/rails_marketplace/catalog.coffee +3 -0
- data/app/assets/javascripts/rails_marketplace/flash.js +6 -0
- data/app/assets/javascripts/rails_marketplace/footermanifest.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/autocomplete/countries.js +267 -0
- data/app/assets/javascripts/rails_marketplace/js/autocomplete/jquery.autocomplete.js +986 -0
- data/app/assets/javascripts/rails_marketplace/js/bootstrap.min.js +7 -0
- data/app/assets/javascripts/rails_marketplace/js/calendar/fullcalendar.min.js +9 -0
- data/app/assets/javascripts/rails_marketplace/js/chartjs/chart.min.js +14 -0
- data/app/assets/javascripts/rails_marketplace/js/colorpicker/bootstrap-colorpicker.min.js +1087 -0
- data/app/assets/javascripts/rails_marketplace/js/colorpicker/docs.js +17 -0
- data/app/assets/javascripts/rails_marketplace/js/cropping/cropper.min.js +10 -0
- data/app/assets/javascripts/rails_marketplace/js/cropping/main.js +321 -0
- data/app/assets/javascripts/rails_marketplace/js/cropping/main2.js +160 -0
- data/app/assets/javascripts/rails_marketplace/js/custom.js +380 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/buttons.bootstrap.min.css +1 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/buttons.bootstrap.min.js +6 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/buttons.html5.min.js +22 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/buttons.print.min.js +4 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/dataTables.bootstrap.js +8 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/dataTables.buttons.min.js +36 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/dataTables.fixedHeader.min.js +17 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/dataTables.keyTable.min.js +18 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/dataTables.responsive.min.js +25 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/dataTables.scroller.min.js +26 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/fixedHeader.bootstrap.min.css +1 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/jquery.dataTables.min.css +333 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/jquery.dataTables.min.js +166 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/json/scroller-demo.json +2502 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/jszip.min.js +14 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/pdfmake.min.js +22 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/responsive.bootstrap.min.css +1 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/responsive.bootstrap.min.js +7 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/scroller.bootstrap.min.css +1 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/vfs_fonts.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/datepicker/daterangepicker.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/dropzone/dropzone.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/easypie/jquery.easypiechart.min.js +9 -0
- data/app/assets/javascripts/rails_marketplace/js/echart/echarts-all.js +35 -0
- data/app/assets/javascripts/rails_marketplace/js/echart/green.js +212 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/bootstrap-wysiwyg.js +200 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-apollo.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-basic.js +3 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-clj.js +18 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-css.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-dart.js +3 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-erlang.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-go.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-hs.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-lisp.js +3 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-llvm.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-lua.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-matlab.js +6 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-ml.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-mumps.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-n.js +4 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-pascal.js +3 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-proto.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-r.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-rd.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-scala.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-sql.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-tcl.js +3 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-tex.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-vb.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-vhdl.js +3 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-wiki.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-xq.js +3 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-yaml.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/prettify.js +30 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/run_prettify.js +34 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/jquery.hotkeys.js +100 -0
- data/app/assets/javascripts/rails_marketplace/js/flot/curvedLines.js +483 -0
- data/app/assets/javascripts/rails_marketplace/js/flot/date.js +104 -0
- data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.orderBars.js +201 -0
- data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.pie.js +820 -0
- data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.resize.js +57 -0
- data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.spline.js +212 -0
- data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.stack.js +188 -0
- data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.time.min.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.tooltip.min.js +12 -0
- data/app/assets/javascripts/rails_marketplace/js/gauge/gauge.min.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/gauge/gauge_demo.js +21 -0
- data/app/assets/javascripts/rails_marketplace/js/icheck/icheck.min.js +11 -0
- data/app/assets/javascripts/rails_marketplace/js/input_mask/jquery.inputmask.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/ion_range/ion.rangeSlider.min.js +66 -0
- data/app/assets/javascripts/rails_marketplace/js/jquery.min.js +5 -0
- data/app/assets/javascripts/rails_marketplace/js/knob/jquery.knob.min.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/maps/gdp-data.js +185 -0
- data/app/assets/javascripts/rails_marketplace/js/maps/jquery-jvectormap-2.0.3.min.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/maps/jquery-jvectormap-us-aea-en.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/maps/jquery-jvectormap-world-mill-en.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/maps/us-unemployment.json +1 -0
- data/app/assets/javascripts/rails_marketplace/js/moment/moment.min.js +7 -0
- data/app/assets/javascripts/rails_marketplace/js/moris/example.js +127 -0
- data/app/assets/javascripts/rails_marketplace/js/moris/morris.min.js +7 -0
- data/app/assets/javascripts/rails_marketplace/js/moris/raphael-min.js +11 -0
- data/app/assets/javascripts/rails_marketplace/js/notify/pnotify.buttons.js +132 -0
- data/app/assets/javascripts/rails_marketplace/js/notify/pnotify.core.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/notify/pnotify.nonblock.js +151 -0
- data/app/assets/javascripts/rails_marketplace/js/nprogress.js +476 -0
- data/app/assets/javascripts/rails_marketplace/js/pace/pace.min.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/parsley/parsley.min.js +9 -0
- data/app/assets/javascripts/rails_marketplace/js/progressbar/bootstrap-progressbar.min.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/select/select2.full.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/sidebar/classie.js +80 -0
- data/app/assets/javascripts/rails_marketplace/js/sidebar/component.css +569 -0
- data/app/assets/javascripts/rails_marketplace/js/sidebar/modernizr.custom.js +4 -0
- data/app/assets/javascripts/rails_marketplace/js/sidebar/sidebarEffects.js +63 -0
- data/app/assets/javascripts/rails_marketplace/js/skycons/skycons.min.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/sparkline/jquery.sparkline.min.js +5 -0
- data/app/assets/javascripts/rails_marketplace/js/switchery/switchery.min.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/tags/jquery.tagsinput.min.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/textarea/autosize.min.js +6 -0
- data/app/assets/javascripts/rails_marketplace/js/validator/validator.js +411 -0
- data/app/assets/javascripts/rails_marketplace/js/wizard/jquery.smartWizard.js +489 -0
- data/app/assets/javascripts/rails_marketplace/less/custom.css +6355 -0
- data/app/assets/javascripts/rails_marketplace/marketplace.js +17 -0
- data/app/assets/javascripts/rails_marketplace/welcome.coffee +3 -0
- data/app/assets/stylesheets/rails_marketplace/application.scss +31 -0
- data/app/assets/stylesheets/rails_marketplace/catalog.scss +132 -0
- data/app/assets/stylesheets/rails_marketplace/css/animate.min.css +11 -0
- data/app/assets/stylesheets/rails_marketplace/css/bootstrap.min.css +6 -0
- data/app/assets/stylesheets/rails_marketplace/css/calendar/fullcalendar.css +1116 -0
- data/app/assets/stylesheets/rails_marketplace/css/calendar/fullcalendar.min.css +5 -0
- data/app/assets/stylesheets/rails_marketplace/css/calendar/fullcalendar.print.css +208 -0
- data/app/assets/stylesheets/rails_marketplace/css/colorpicker/bootstrap-colorpicker.min.css +9 -0
- data/app/assets/stylesheets/rails_marketplace/css/colorpicker/img/bootstrap-colorpicker/alpha-horizontal.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/colorpicker/img/bootstrap-colorpicker/alpha.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/colorpicker/img/bootstrap-colorpicker/hue-horizontal.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/colorpicker/img/bootstrap-colorpicker/hue.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/colorpicker/img/bootstrap-colorpicker/saturation.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/custom.css +5347 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/css/demo_page.css +103 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/css/demo_table.css +258 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/css/demo_table_jui.css +501 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/css/jquery.dataTables.css +221 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/css/jquery.dataTables_themeroller.css +244 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/Sorting icons.psd +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/back_disabled.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/back_enabled.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/back_enabled_hover.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/favicon.ico +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/forward_disabled.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/forward_enabled.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/forward_enabled_hover.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/sort_asc.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/sort_asc_disabled.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/sort_both.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/sort_desc.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/sort_desc_disabled.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/tools/css/dataTables.tableTools.css +336 -0
- data/app/assets/stylesheets/rails_marketplace/css/editor/external/google-code-prettify/prettify.css +1 -0
- data/app/assets/stylesheets/rails_marketplace/css/editor/index.css +42 -0
- data/app/assets/stylesheets/rails_marketplace/css/floatexamples.css +22 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/_all.css +530 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/aero.css +53 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/aero.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/aero@2x.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/blue.css +53 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/blue.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/blue@2x.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/flat.css +53 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/flat.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/flat@2x.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/green.css +53 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/green.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/green@2x.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/grey.css +53 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/grey.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/grey@2x.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/orange.css +53 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/orange.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/orange@2x.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/pink.css +53 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/pink.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/pink@2x.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/purple.css +53 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/purple.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/purple@2x.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/red.css +53 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/red.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/red@2x.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/yellow.css +53 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/yellow.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/yellow@2x.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/ion.rangeSlider.css +146 -0
- data/app/assets/stylesheets/rails_marketplace/css/ion.rangeSlider.skinFlat.css +106 -0
- data/app/assets/stylesheets/rails_marketplace/css/maps/jquery-jvectormap-2.0.3.css +135 -0
- data/app/assets/stylesheets/rails_marketplace/css/normalize.css +421 -0
- data/app/assets/stylesheets/rails_marketplace/css/nprogress.css +74 -0
- data/app/assets/stylesheets/rails_marketplace/css/progressbar/bootstrap-progressbar-3.3.0.css +161 -0
- data/app/assets/stylesheets/rails_marketplace/css/select/select2.min.css +404 -0
- data/app/assets/stylesheets/rails_marketplace/css/switchery/switchery.min.css +1 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/css/font-awesome.css +2086 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/css/font-awesome.min.css +4 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/fonts/FontAwesome.otf +0 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/fonts/fontawesome-webfont.eot +0 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/fonts/fontawesome-webfont.svg +655 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/fonts/fontawesome-webfont.ttf +0 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/fonts/fontawesome-webfont.woff +0 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/fonts/fontawesome-webfont.woff2 +0 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/glyphicons-halflings-regular.eot +0 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/glyphicons-halflings-regular.svg +288 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/glyphicons-halflings-regular.woff +0 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/animated.less +34 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/bordered-pulled.less +25 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/core.less +12 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/fixed-width.less +6 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/font-awesome.less +17 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/icons.less +697 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/larger.less +13 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/list.less +19 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/mixins.less +26 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/path.less +15 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/rotated-flipped.less +20 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/spinning.less +29 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/stacked.less +20 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/variables.less +708 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_animated.scss +34 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_bordered-pulled.scss +25 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_core.scss +12 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_fixed-width.scss +6 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_icons.scss +697 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_larger.scss +13 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_list.scss +19 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_mixins.scss +26 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_path.scss +15 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_rotated-flipped.scss +20 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_spinning.scss +29 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_stacked.scss +20 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_variables.scss +708 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/font-awesome.scss +17 -0
- data/app/assets/stylesheets/rails_marketplace/images/1.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/4.jpg +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/american-express.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/back_disabled.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/back_enabled.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/back_enabled_hover.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/bootstrap-colorpicker/alpha-horizontal.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/bootstrap-colorpicker/alpha.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/bootstrap-colorpicker/hue-horizontal.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/bootstrap-colorpicker/hue.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/bootstrap-colorpicker/saturation.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/data.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/favicon.ico +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/forward_disabled.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/forward_enabled.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/forward_enabled_hover.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/icons.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/img.jpg +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/loading.gif +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/mastercard.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/paypal2.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/picture-2.jpg +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/picture.jpg +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/picture2.jpg +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/prod1.jpg +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/prod2.jpg +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/prod3.jpg +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/prod4.jpg +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/prod5.jpg +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/sprite-skin-flat.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/sprite-skin-modern.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/sprite-skin-nice.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/sprite-skin-simple.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/user.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/visa.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/marketplace.scss +20 -0
- data/app/assets/stylesheets/rails_marketplace/pace.css +76 -0
- data/app/assets/stylesheets/rails_marketplace/welcome.scss +3 -0
- data/app/assets/stylesheets/scaffold.css +56 -0
- data/app/controllers/rails_marketplace/admin_controller.rb +151 -0
- data/app/controllers/rails_marketplace/application_controller.rb +4 -0
- data/app/controllers/rails_marketplace/catalog_controller.rb +172 -0
- data/app/controllers/rails_marketplace/seller_controller.rb +181 -0
- data/app/helpers/rails_marketplace/admin_helper.rb +16 -0
- data/app/helpers/rails_marketplace/application_helper.rb +4 -0
- data/app/helpers/rails_marketplace/catalog_helper.rb +4 -0
- data/app/helpers/rails_marketplace/plainpage_helper.rb +4 -0
- data/app/helpers/rails_marketplace/seller_helper.rb +16 -0
- data/app/models/rails_marketplace/admin.rb +10 -0
- data/app/models/rails_marketplace/admin_setting.rb +13 -0
- data/app/models/rails_marketplace/cart.rb +49 -0
- data/app/models/rails_marketplace/cart_product.rb +7 -0
- data/app/models/rails_marketplace/category.rb +22 -0
- data/app/models/rails_marketplace/category_product.rb +6 -0
- data/app/models/rails_marketplace/customer.rb +6 -0
- data/app/models/rails_marketplace/order.rb +22 -0
- data/app/models/rails_marketplace/order_product.rb +7 -0
- data/app/models/rails_marketplace/product.rb +34 -0
- data/app/models/rails_marketplace/seller.rb +13 -0
- data/app/models/rails_marketplace/seller_setting.rb +5 -0
- data/app/views/layouts/rails_marketplace/application.html.erb +37 -0
- data/app/views/layouts/rails_marketplace/seller_central.html.erb +58 -0
- data/app/views/layouts/rails_marketplace/super_admin.html.erb +58 -0
- data/app/views/rails_marketplace/admin/add_category.html.erb +63 -0
- data/app/views/rails_marketplace/admin/categories.html.erb +50 -0
- data/app/views/rails_marketplace/admin/category_products.html.erb +54 -0
- data/app/views/rails_marketplace/admin/dashboard.html.erb +50 -0
- data/app/views/rails_marketplace/admin/edit_category.html.erb +63 -0
- data/app/views/rails_marketplace/admin/login_form.html.erb +20 -0
- data/app/views/rails_marketplace/admin/products.html.erb +54 -0
- data/app/views/rails_marketplace/admin/seller_products.html.erb +54 -0
- data/app/views/rails_marketplace/admin/sellers.html.erb +48 -0
- data/app/views/rails_marketplace/admin/settings_form.html.erb +39 -0
- data/app/views/rails_marketplace/admin/signup_form.html.erb +25 -0
- data/app/views/rails_marketplace/catalog/cart.html.erb +80 -0
- data/app/views/rails_marketplace/catalog/category_products.html.erb +52 -0
- data/app/views/rails_marketplace/catalog/checkout.html.erb +207 -0
- data/app/views/rails_marketplace/catalog/checkout_success.html.erb +15 -0
- data/app/views/rails_marketplace/catalog/index.html.erb +1 -0
- data/app/views/rails_marketplace/catalog/product_detail.html.erb +88 -0
- data/app/views/rails_marketplace/partials/_admin_sidenav.html.erb +80 -0
- data/app/views/rails_marketplace/partials/_admin_topnav.html.erb +111 -0
- data/app/views/rails_marketplace/partials/_footer.html.erb +19 -0
- data/app/views/rails_marketplace/partials/_menu.html.erb +42 -0
- data/app/views/rails_marketplace/partials/_sidenav.html.erb +77 -0
- data/app/views/rails_marketplace/partials/_topnav.html.erb +105 -0
- data/app/views/rails_marketplace/seller/add_bulk_products.html.erb +0 -0
- data/app/views/rails_marketplace/seller/add_product.html.erb +67 -0
- data/app/views/rails_marketplace/seller/dashboard.html.erb +50 -0
- data/app/views/rails_marketplace/seller/edit_product.html.erb +69 -0
- data/app/views/rails_marketplace/seller/login_form.html.erb +36 -0
- data/app/views/rails_marketplace/seller/order_details.html.erb +69 -0
- data/app/views/rails_marketplace/seller/orders.html.erb +68 -0
- data/app/views/rails_marketplace/seller/products.html.erb +55 -0
- data/app/views/rails_marketplace/seller/settings_general.html.erb +64 -0
- data/app/views/rails_marketplace/seller/settings_payment.html.erb +34 -0
- data/app/views/rails_marketplace/seller/settings_shipping.html.erb +34 -0
- data/app/views/rails_marketplace/seller/settings_tax.html.erb +34 -0
- data/app/views/rails_marketplace/seller/signup_form.html.erb +28 -0
- data/app/views/rails_marketplace/seller/step_two.html.erb +17 -0
- data/app/views/rails_marketplace/shared/_admin_error_messages.html.erb +12 -0
- data/app/views/rails_marketplace/shared/_product_error_messages.html.erb +12 -0
- data/app/views/rails_marketplace/shared/_seller_error_messages.html.erb +12 -0
- data/config/routes.rb +58 -0
- data/db/migrate/20161013194852_create_sellers.rb +13 -0
- data/db/migrate/20161013195006_create_customers.rb +13 -0
- data/db/migrate/20161013195758_create_orders.rb +8 -0
- data/db/migrate/20161014013032_create_category_products.rb +10 -0
- data/db/migrate/20161014013058_create_order_products.rb +13 -0
- data/db/migrate/20161017185755_create_admins.rb +12 -0
- data/db/migrate/20161017232347_create_products.rb +14 -0
- data/db/migrate/20161019012043_add_reference_product_seller.rb +5 -0
- data/db/migrate/20161019013502_change_data_type_images_files.rb +6 -0
- data/db/migrate/20161019022020_add_reference_order_customers.rb +5 -0
- data/db/migrate/20161109191644_create_categories.rb +15 -0
- data/db/migrate/20161110021043_create_friendly_id_slugs.rb +15 -0
- data/db/migrate/20161110021131_add_slug_to_category.rb +6 -0
- data/db/migrate/20161110024118_add_slug_to_product.rb +6 -0
- data/db/migrate/20161111001446_create_carts.rb +8 -0
- data/db/migrate/20161111004451_create_cart_products.rb +12 -0
- data/db/migrate/20161115013956_add_currency_format_to_price.rb +6 -0
- data/db/migrate/20161115015227_monetize_product.rb +5 -0
- data/db/migrate/20161115032905_add_stripe_key_to_admin.rb +6 -0
- data/db/migrate/20161124015608_add_order_fields.rb +16 -0
- data/db/migrate/20161207193917_add_seller_to_orders.rb +6 -0
- data/db/migrate/20161208012601_add_price_to_cart_products.rb +6 -0
- data/db/migrate/20161208013402_add_money_to_cart_products.rb +6 -0
- data/db/migrate/20170217183953_create_seller_settings.rb +29 -0
- data/db/migrate/20170218003202_create_admin_settings.rb +24 -0
- data/db/migrate/20170224230449_create_stripe_managed_accounts.rb +9 -0
- data/db/migrate/20170224233736_add_stripe_to_admin_settings.rb +9 -0
- data/db/migrate/20170224235259_add_id_to_settings.rb +6 -0
- data/db/migrate/20170225002939_delete_stripe_accounts.rb +8 -0
- data/db/migrate/20170225003252_add_stripe_account_id_to_seller_settings.rb +5 -0
- data/lib/rails_marketplace.rb +4 -0
- data/lib/rails_marketplace/engine.rb +9 -0
- data/lib/rails_marketplace/version.rb +3 -0
- data/lib/tasks/rails_marketplace_tasks.rake +4 -0
- data/spec/controllers/rails_marketplace/catalog_controller_spec.rb +75 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +29 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +32 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +41 -0
- data/spec/dummy/config/environments/production.rb +79 -0
- data/spec/dummy/config/environments/test.rb +42 -0
- data/spec/dummy/config/initializers/assets.rb +11 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/db/schema.rb +194 -0
- data/spec/dummy/log/development.log +889 -0
- data/spec/dummy/log/test.log +1229 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/helpers/rails_marketplace/catalog_helper_spec.rb +17 -0
- data/spec/routing/rails_marketplace/catalog_routing_spec.rb +44 -0
- data/spec/spec_helper.rb +44 -0
- data/spec/views/rails_marketplace/catalog/edit.html.erb_spec.rb +15 -0
- data/spec/views/rails_marketplace/catalog/index.html.erb_spec.rb +15 -0
- data/spec/views/rails_marketplace/catalog/new.html.erb_spec.rb +15 -0
- data/spec/views/rails_marketplace/catalog/show.html.erb_spec.rb +12 -0
- metadata +595 -0
@@ -0,0 +1,57 @@
|
|
1
|
+
/*
|
2
|
+
Flot plugin for automatically redrawing plots when the placeholder
|
3
|
+
size changes, e.g. on window resizes.
|
4
|
+
|
5
|
+
It works by listening for changes on the placeholder div (through the
|
6
|
+
jQuery resize event plugin) - if the size changes, it will redraw the
|
7
|
+
plot.
|
8
|
+
|
9
|
+
There are no options. If you need to disable the plugin for some
|
10
|
+
plots, you can just fix the size of their placeholders.
|
11
|
+
*/
|
12
|
+
|
13
|
+
|
14
|
+
/* Inline dependency:
|
15
|
+
* jQuery resize event - v1.2 - 3/14/2010
|
16
|
+
* http://benalman.com/projects/jquery-resize-plugin/
|
17
|
+
*
|
18
|
+
* Copyright (c) 2010 "Cowboy" Ben Alman
|
19
|
+
* Dual licensed under the MIT and GPL licenses.
|
20
|
+
* http://benalman.com/about/license/
|
21
|
+
*/
|
22
|
+
(function($,h,c){var a=$([]),e=$.resize=$.extend($.resize,{}),i,k="setTimeout",j="resize",d=j+"-special-event",b="delay",f="throttleWindow";e[b]=250;e[f]=true;$.event.special[j]={setup:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.add(l);$.data(this,d,{w:l.width(),h:l.height()});if(a.length===1){g()}},teardown:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.not(l);l.removeData(d);if(!a.length){clearTimeout(i)}},add:function(l){if(!e[f]&&this[k]){return false}var n;function m(s,o,p){var q=$(this),r=$.data(this,d);r.w=o!==c?o:q.width();r.h=p!==c?p:q.height();n.apply(this,arguments)}if($.isFunction(l)){n=l;return m}else{n=l.handler;l.handler=m}}};function g(){i=h[k](function(){a.each(function(){var n=$(this),m=n.width(),l=n.height(),o=$.data(this,d);if(m!==o.w||l!==o.h){n.trigger(j,[o.w=m,o.h=l])}});g()},e[b])}})(jQuery,this);
|
23
|
+
|
24
|
+
|
25
|
+
(function ($) {
|
26
|
+
var redrawing = 0;
|
27
|
+
var options = { }; // no options
|
28
|
+
|
29
|
+
function init(plot) {
|
30
|
+
function bindEvents(plot, eventHolder) {
|
31
|
+
if (!redrawing)
|
32
|
+
plot.getPlaceholder().resize(onResize);
|
33
|
+
|
34
|
+
function onResize() {
|
35
|
+
var placeholder = plot.getPlaceholder();
|
36
|
+
|
37
|
+
// somebody might have hidden us and we can't plot
|
38
|
+
// when we don't have the dimensions
|
39
|
+
if (placeholder.width() == 0 || placeholder.height() == 0)
|
40
|
+
return;
|
41
|
+
|
42
|
+
++redrawing;
|
43
|
+
$.plot(placeholder, plot.getData(), plot.getOptions());
|
44
|
+
--redrawing;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
plot.hooks.bindEvents.push(bindEvents);
|
49
|
+
}
|
50
|
+
|
51
|
+
$.plot.plugins.push({
|
52
|
+
init: init,
|
53
|
+
options: options,
|
54
|
+
name: 'resize',
|
55
|
+
version: '1.0'
|
56
|
+
});
|
57
|
+
})(jQuery);
|
@@ -0,0 +1,212 @@
|
|
1
|
+
/**
|
2
|
+
* Flot plugin that provides spline interpolation for line graphs
|
3
|
+
* author: Alex Bardas < alex.bardas@gmail.com >
|
4
|
+
* modified by: Avi Kohn https://github.com/AMKohn
|
5
|
+
* based on the spline interpolation described at:
|
6
|
+
* http://scaledinnovation.com/analytics/splines/aboutSplines.html
|
7
|
+
*
|
8
|
+
* Example usage: (add in plot options series object)
|
9
|
+
* for linespline:
|
10
|
+
* series: {
|
11
|
+
* ...
|
12
|
+
* lines: {
|
13
|
+
* show: false
|
14
|
+
* },
|
15
|
+
* splines: {
|
16
|
+
* show: true,
|
17
|
+
* tension: x, (float between 0 and 1, defaults to 0.5),
|
18
|
+
* lineWidth: y (number, defaults to 2),
|
19
|
+
* fill: z (float between 0 .. 1 or false, as in flot documentation)
|
20
|
+
* },
|
21
|
+
* ...
|
22
|
+
* }
|
23
|
+
* areaspline:
|
24
|
+
* series: {
|
25
|
+
* ...
|
26
|
+
* lines: {
|
27
|
+
* show: true,
|
28
|
+
* lineWidth: 0, (line drawing will not execute)
|
29
|
+
* fill: x, (float between 0 .. 1, as in flot documentation)
|
30
|
+
* ...
|
31
|
+
* },
|
32
|
+
* splines: {
|
33
|
+
* show: true,
|
34
|
+
* tension: 0.5 (float between 0 and 1)
|
35
|
+
* },
|
36
|
+
* ...
|
37
|
+
* }
|
38
|
+
*
|
39
|
+
*/
|
40
|
+
|
41
|
+
(function($) {
|
42
|
+
'use strict'
|
43
|
+
|
44
|
+
/**
|
45
|
+
* @param {Number} x0, y0, x1, y1: coordinates of the end (knot) points of the segment
|
46
|
+
* @param {Number} x2, y2: the next knot (not connected, but needed to calculate p2)
|
47
|
+
* @param {Number} tension: control how far the control points spread
|
48
|
+
* @return {Array}: p1 -> control point, from x1 back toward x0
|
49
|
+
* p2 -> the next control point, returned to become the next segment's p1
|
50
|
+
*
|
51
|
+
* @api private
|
52
|
+
*/
|
53
|
+
function getControlPoints(x0, y0, x1, y1, x2, y2, tension) {
|
54
|
+
|
55
|
+
var pow = Math.pow,
|
56
|
+
sqrt = Math.sqrt,
|
57
|
+
d01, d12, fa, fb, p1x, p1y, p2x, p2y;
|
58
|
+
|
59
|
+
// Scaling factors: distances from this knot to the previous and following knots.
|
60
|
+
d01 = sqrt(pow(x1 - x0, 2) + pow(y1 - y0, 2));
|
61
|
+
d12 = sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2));
|
62
|
+
|
63
|
+
fa = tension * d01 / (d01 + d12);
|
64
|
+
fb = tension - fa;
|
65
|
+
|
66
|
+
p1x = x1 + fa * (x0 - x2);
|
67
|
+
p1y = y1 + fa * (y0 - y2);
|
68
|
+
|
69
|
+
p2x = x1 - fb * (x0 - x2);
|
70
|
+
p2y = y1 - fb * (y0 - y2);
|
71
|
+
|
72
|
+
return [p1x, p1y, p2x, p2y];
|
73
|
+
}
|
74
|
+
|
75
|
+
var line = [];
|
76
|
+
|
77
|
+
function drawLine(points, ctx, height, fill, seriesColor) {
|
78
|
+
var c = $.color.parse(seriesColor);
|
79
|
+
|
80
|
+
c.a = typeof fill == "number" ? fill : .3;
|
81
|
+
c.normalize();
|
82
|
+
c = c.toString();
|
83
|
+
|
84
|
+
ctx.beginPath();
|
85
|
+
ctx.moveTo(points[0][0], points[0][1]);
|
86
|
+
|
87
|
+
var plength = points.length;
|
88
|
+
|
89
|
+
for (var i = 0; i < plength; i++) {
|
90
|
+
ctx[points[i][3]].apply(ctx, points[i][2]);
|
91
|
+
}
|
92
|
+
|
93
|
+
ctx.stroke();
|
94
|
+
|
95
|
+
ctx.lineWidth = 0;
|
96
|
+
ctx.lineTo(points[plength - 1][0], height);
|
97
|
+
ctx.lineTo(points[0][0], height);
|
98
|
+
|
99
|
+
ctx.closePath();
|
100
|
+
|
101
|
+
if (fill !== false) {
|
102
|
+
ctx.fillStyle = c;
|
103
|
+
ctx.fill();
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
107
|
+
/**
|
108
|
+
* @param {Object} ctx: canvas context
|
109
|
+
* @param {String} type: accepted strings: 'bezier' or 'quadratic' (defaults to quadratic)
|
110
|
+
* @param {Array} points: 2 points for which to draw the interpolation
|
111
|
+
* @param {Array} cpoints: control points for those segment points
|
112
|
+
*
|
113
|
+
* @api private
|
114
|
+
*/
|
115
|
+
function queue(ctx, type, points, cpoints) {
|
116
|
+
if (type === void 0 || (type !== 'bezier' && type !== 'quadratic')) {
|
117
|
+
type = 'quadratic';
|
118
|
+
}
|
119
|
+
type = type + 'CurveTo';
|
120
|
+
|
121
|
+
if (line.length == 0) line.push([points[0], points[1], cpoints.concat(points.slice(2)), type]);
|
122
|
+
else if (type == "quadraticCurveTo" && points.length == 2) {
|
123
|
+
cpoints = cpoints.slice(0, 2).concat(points);
|
124
|
+
|
125
|
+
line.push([points[0], points[1], cpoints, type]);
|
126
|
+
}
|
127
|
+
else line.push([points[2], points[3], cpoints.concat(points.slice(2)), type]);
|
128
|
+
}
|
129
|
+
|
130
|
+
/**
|
131
|
+
* @param {Object} plot
|
132
|
+
* @param {Object} ctx: canvas context
|
133
|
+
* @param {Object} series
|
134
|
+
*
|
135
|
+
* @api private
|
136
|
+
*/
|
137
|
+
|
138
|
+
function drawSpline(plot, ctx, series) {
|
139
|
+
// Not interested if spline is not requested
|
140
|
+
if (series.splines.show !== true) {
|
141
|
+
return;
|
142
|
+
}
|
143
|
+
|
144
|
+
var cp = [],
|
145
|
+
// array of control points
|
146
|
+
tension = series.splines.tension || 0.5,
|
147
|
+
idx, x, y, points = series.datapoints.points,
|
148
|
+
ps = series.datapoints.pointsize,
|
149
|
+
plotOffset = plot.getPlotOffset(),
|
150
|
+
len = points.length,
|
151
|
+
pts = [];
|
152
|
+
|
153
|
+
line = [];
|
154
|
+
|
155
|
+
// Cannot display a linespline/areaspline if there are less than 3 points
|
156
|
+
if (len / ps < 4) {
|
157
|
+
$.extend(series.lines, series.splines);
|
158
|
+
return;
|
159
|
+
}
|
160
|
+
|
161
|
+
for (idx = 0; idx < len; idx += ps) {
|
162
|
+
x = points[idx];
|
163
|
+
y = points[idx + 1];
|
164
|
+
if (x == null || x < series.xaxis.min || x > series.xaxis.max || y < series.yaxis.min || y > series.yaxis.max) {
|
165
|
+
continue;
|
166
|
+
}
|
167
|
+
|
168
|
+
pts.push(series.xaxis.p2c(x) + plotOffset.left, series.yaxis.p2c(y) + plotOffset.top);
|
169
|
+
}
|
170
|
+
|
171
|
+
len = pts.length;
|
172
|
+
|
173
|
+
// Draw an open curve, not connected at the ends
|
174
|
+
for (idx = 0; idx < len - 2; idx += 2) {
|
175
|
+
cp = cp.concat(getControlPoints.apply(this, pts.slice(idx, idx + 6).concat([tension])));
|
176
|
+
}
|
177
|
+
|
178
|
+
ctx.save();
|
179
|
+
ctx.strokeStyle = series.color;
|
180
|
+
ctx.lineWidth = series.splines.lineWidth;
|
181
|
+
|
182
|
+
queue(ctx, 'quadratic', pts.slice(0, 4), cp.slice(0, 2));
|
183
|
+
|
184
|
+
for (idx = 2; idx < len - 3; idx += 2) {
|
185
|
+
queue(ctx, 'bezier', pts.slice(idx, idx + 4), cp.slice(2 * idx - 2, 2 * idx + 2));
|
186
|
+
}
|
187
|
+
|
188
|
+
queue(ctx, 'quadratic', pts.slice(len - 2, len), [cp[2 * len - 10], cp[2 * len - 9], pts[len - 4], pts[len - 3]]);
|
189
|
+
|
190
|
+
drawLine(line, ctx, plot.height() + 10, series.splines.fill, series.color);
|
191
|
+
|
192
|
+
ctx.restore();
|
193
|
+
}
|
194
|
+
|
195
|
+
$.plot.plugins.push({
|
196
|
+
init: function(plot) {
|
197
|
+
plot.hooks.drawSeries.push(drawSpline);
|
198
|
+
},
|
199
|
+
options: {
|
200
|
+
series: {
|
201
|
+
splines: {
|
202
|
+
show: false,
|
203
|
+
lineWidth: 2,
|
204
|
+
tension: 0.5,
|
205
|
+
fill: false
|
206
|
+
}
|
207
|
+
}
|
208
|
+
},
|
209
|
+
name: 'spline',
|
210
|
+
version: '0.8.2'
|
211
|
+
});
|
212
|
+
})(jQuery);
|
@@ -0,0 +1,188 @@
|
|
1
|
+
/* Flot plugin for stacking data sets rather than overlyaing them.
|
2
|
+
|
3
|
+
Copyright (c) 2007-2014 IOLA and Ole Laursen.
|
4
|
+
Licensed under the MIT license.
|
5
|
+
|
6
|
+
The plugin assumes the data is sorted on x (or y if stacking horizontally).
|
7
|
+
For line charts, it is assumed that if a line has an undefined gap (from a
|
8
|
+
null point), then the line above it should have the same gap - insert zeros
|
9
|
+
instead of "null" if you want another behaviour. This also holds for the start
|
10
|
+
and end of the chart. Note that stacking a mix of positive and negative values
|
11
|
+
in most instances doesn't make sense (so it looks weird).
|
12
|
+
|
13
|
+
Two or more series are stacked when their "stack" attribute is set to the same
|
14
|
+
key (which can be any number or string or just "true"). To specify the default
|
15
|
+
stack, you can set the stack option like this:
|
16
|
+
|
17
|
+
series: {
|
18
|
+
stack: null/false, true, or a key (number/string)
|
19
|
+
}
|
20
|
+
|
21
|
+
You can also specify it for a single series, like this:
|
22
|
+
|
23
|
+
$.plot( $("#placeholder"), [{
|
24
|
+
data: [ ... ],
|
25
|
+
stack: true
|
26
|
+
}])
|
27
|
+
|
28
|
+
The stacking order is determined by the order of the data series in the array
|
29
|
+
(later series end up on top of the previous).
|
30
|
+
|
31
|
+
Internally, the plugin modifies the datapoints in each series, adding an
|
32
|
+
offset to the y value. For line series, extra data points are inserted through
|
33
|
+
interpolation. If there's a second y value, it's also adjusted (e.g for bar
|
34
|
+
charts or filled areas).
|
35
|
+
|
36
|
+
*/
|
37
|
+
|
38
|
+
(function ($) {
|
39
|
+
var options = {
|
40
|
+
series: { stack: null } // or number/string
|
41
|
+
};
|
42
|
+
|
43
|
+
function init(plot) {
|
44
|
+
function findMatchingSeries(s, allseries) {
|
45
|
+
var res = null;
|
46
|
+
for (var i = 0; i < allseries.length; ++i) {
|
47
|
+
if (s == allseries[i])
|
48
|
+
break;
|
49
|
+
|
50
|
+
if (allseries[i].stack == s.stack)
|
51
|
+
res = allseries[i];
|
52
|
+
}
|
53
|
+
|
54
|
+
return res;
|
55
|
+
}
|
56
|
+
|
57
|
+
function stackData(plot, s, datapoints) {
|
58
|
+
if (s.stack == null || s.stack === false)
|
59
|
+
return;
|
60
|
+
|
61
|
+
var other = findMatchingSeries(s, plot.getData());
|
62
|
+
if (!other)
|
63
|
+
return;
|
64
|
+
|
65
|
+
var ps = datapoints.pointsize,
|
66
|
+
points = datapoints.points,
|
67
|
+
otherps = other.datapoints.pointsize,
|
68
|
+
otherpoints = other.datapoints.points,
|
69
|
+
newpoints = [],
|
70
|
+
px, py, intery, qx, qy, bottom,
|
71
|
+
withlines = s.lines.show,
|
72
|
+
horizontal = s.bars.horizontal,
|
73
|
+
withbottom = ps > 2 && (horizontal ? datapoints.format[2].x : datapoints.format[2].y),
|
74
|
+
withsteps = withlines && s.lines.steps,
|
75
|
+
fromgap = true,
|
76
|
+
keyOffset = horizontal ? 1 : 0,
|
77
|
+
accumulateOffset = horizontal ? 0 : 1,
|
78
|
+
i = 0, j = 0, l, m;
|
79
|
+
|
80
|
+
while (true) {
|
81
|
+
if (i >= points.length)
|
82
|
+
break;
|
83
|
+
|
84
|
+
l = newpoints.length;
|
85
|
+
|
86
|
+
if (points[i] == null) {
|
87
|
+
// copy gaps
|
88
|
+
for (m = 0; m < ps; ++m)
|
89
|
+
newpoints.push(points[i + m]);
|
90
|
+
i += ps;
|
91
|
+
}
|
92
|
+
else if (j >= otherpoints.length) {
|
93
|
+
// for lines, we can't use the rest of the points
|
94
|
+
if (!withlines) {
|
95
|
+
for (m = 0; m < ps; ++m)
|
96
|
+
newpoints.push(points[i + m]);
|
97
|
+
}
|
98
|
+
i += ps;
|
99
|
+
}
|
100
|
+
else if (otherpoints[j] == null) {
|
101
|
+
// oops, got a gap
|
102
|
+
for (m = 0; m < ps; ++m)
|
103
|
+
newpoints.push(null);
|
104
|
+
fromgap = true;
|
105
|
+
j += otherps;
|
106
|
+
}
|
107
|
+
else {
|
108
|
+
// cases where we actually got two points
|
109
|
+
px = points[i + keyOffset];
|
110
|
+
py = points[i + accumulateOffset];
|
111
|
+
qx = otherpoints[j + keyOffset];
|
112
|
+
qy = otherpoints[j + accumulateOffset];
|
113
|
+
bottom = 0;
|
114
|
+
|
115
|
+
if (px == qx) {
|
116
|
+
for (m = 0; m < ps; ++m)
|
117
|
+
newpoints.push(points[i + m]);
|
118
|
+
|
119
|
+
newpoints[l + accumulateOffset] += qy;
|
120
|
+
bottom = qy;
|
121
|
+
|
122
|
+
i += ps;
|
123
|
+
j += otherps;
|
124
|
+
}
|
125
|
+
else if (px > qx) {
|
126
|
+
// we got past point below, might need to
|
127
|
+
// insert interpolated extra point
|
128
|
+
if (withlines && i > 0 && points[i - ps] != null) {
|
129
|
+
intery = py + (points[i - ps + accumulateOffset] - py) * (qx - px) / (points[i - ps + keyOffset] - px);
|
130
|
+
newpoints.push(qx);
|
131
|
+
newpoints.push(intery + qy);
|
132
|
+
for (m = 2; m < ps; ++m)
|
133
|
+
newpoints.push(points[i + m]);
|
134
|
+
bottom = qy;
|
135
|
+
}
|
136
|
+
|
137
|
+
j += otherps;
|
138
|
+
}
|
139
|
+
else { // px < qx
|
140
|
+
if (fromgap && withlines) {
|
141
|
+
// if we come from a gap, we just skip this point
|
142
|
+
i += ps;
|
143
|
+
continue;
|
144
|
+
}
|
145
|
+
|
146
|
+
for (m = 0; m < ps; ++m)
|
147
|
+
newpoints.push(points[i + m]);
|
148
|
+
|
149
|
+
// we might be able to interpolate a point below,
|
150
|
+
// this can give us a better y
|
151
|
+
if (withlines && j > 0 && otherpoints[j - otherps] != null)
|
152
|
+
bottom = qy + (otherpoints[j - otherps + accumulateOffset] - qy) * (px - qx) / (otherpoints[j - otherps + keyOffset] - qx);
|
153
|
+
|
154
|
+
newpoints[l + accumulateOffset] += bottom;
|
155
|
+
|
156
|
+
i += ps;
|
157
|
+
}
|
158
|
+
|
159
|
+
fromgap = false;
|
160
|
+
|
161
|
+
if (l != newpoints.length && withbottom)
|
162
|
+
newpoints[l + 2] += bottom;
|
163
|
+
}
|
164
|
+
|
165
|
+
// maintain the line steps invariant
|
166
|
+
if (withsteps && l != newpoints.length && l > 0
|
167
|
+
&& newpoints[l] != null
|
168
|
+
&& newpoints[l] != newpoints[l - ps]
|
169
|
+
&& newpoints[l + 1] != newpoints[l - ps + 1]) {
|
170
|
+
for (m = 0; m < ps; ++m)
|
171
|
+
newpoints[l + ps + m] = newpoints[l + m];
|
172
|
+
newpoints[l + 1] = newpoints[l - ps + 1];
|
173
|
+
}
|
174
|
+
}
|
175
|
+
|
176
|
+
datapoints.points = newpoints;
|
177
|
+
}
|
178
|
+
|
179
|
+
plot.hooks.processDatapoints.push(stackData);
|
180
|
+
}
|
181
|
+
|
182
|
+
$.plot.plugins.push({
|
183
|
+
init: init,
|
184
|
+
options: options,
|
185
|
+
name: 'stack',
|
186
|
+
version: '1.2'
|
187
|
+
});
|
188
|
+
})(jQuery);
|