rails_adminlte2 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (407) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +4 -0
  5. data/CODE_OF_CONDUCT.md +49 -0
  6. data/Gemfile +4 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +56 -0
  9. data/Rakefile +6 -0
  10. data/bin/console +14 -0
  11. data/bin/setup +8 -0
  12. data/lib/rails_adminlte2/engine.rb +6 -0
  13. data/lib/rails_adminlte2/version.rb +3 -0
  14. data/lib/rails_adminlte2.rb +7 -0
  15. data/rails_adminlte2.gemspec +24 -0
  16. data/vendor/assets/fonts/FontAwesome.otf +0 -0
  17. data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
  18. data/vendor/assets/fonts/fontawesome-webfont.svg +414 -0
  19. data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
  20. data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
  21. data/vendor/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  22. data/vendor/assets/fonts/glyphicons-halflings-regular.svg +229 -0
  23. data/vendor/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  24. data/vendor/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  25. data/vendor/assets/fonts/ionicons.eot +0 -0
  26. data/vendor/assets/fonts/ionicons.svg +1623 -0
  27. data/vendor/assets/fonts/ionicons.ttf +0 -0
  28. data/vendor/assets/fonts/ionicons.woff +0 -0
  29. data/vendor/assets/images/avatar.png +0 -0
  30. data/vendor/assets/images/avatar04.png +0 -0
  31. data/vendor/assets/images/avatar2.png +0 -0
  32. data/vendor/assets/images/avatar3.png +0 -0
  33. data/vendor/assets/images/avatar5.png +0 -0
  34. data/vendor/assets/images/boxed-bg.jpg +0 -0
  35. data/vendor/assets/images/boxed-bg.png +0 -0
  36. data/vendor/assets/images/credit/american-express.png +0 -0
  37. data/vendor/assets/images/credit/cirrus.png +0 -0
  38. data/vendor/assets/images/credit/mastercard.png +0 -0
  39. data/vendor/assets/images/credit/mestro.png +0 -0
  40. data/vendor/assets/images/credit/paypal.png +0 -0
  41. data/vendor/assets/images/credit/paypal2.png +0 -0
  42. data/vendor/assets/images/credit/visa.png +0 -0
  43. data/vendor/assets/images/default-50x50.gif +0 -0
  44. data/vendor/assets/images/icons.png +0 -0
  45. data/vendor/assets/images/photo1.png +0 -0
  46. data/vendor/assets/images/photo2.png +0 -0
  47. data/vendor/assets/images/photo3.jpg +0 -0
  48. data/vendor/assets/images/photo4.jpg +0 -0
  49. data/vendor/assets/images/user1-128x128.jpg +0 -0
  50. data/vendor/assets/images/user2-160x160.jpg +0 -0
  51. data/vendor/assets/images/user3-128x128.jpg +0 -0
  52. data/vendor/assets/images/user4-128x128.jpg +0 -0
  53. data/vendor/assets/images/user5-128x128.jpg +0 -0
  54. data/vendor/assets/images/user6-128x128.jpg +0 -0
  55. data/vendor/assets/images/user7-128x128.jpg +0 -0
  56. data/vendor/assets/images/user8-128x128.jpg +0 -0
  57. data/vendor/assets/javascripts/adminlte/adminlte.js +763 -0
  58. data/vendor/assets/javascripts/adminlte/adminlte.min.js +13 -0
  59. data/vendor/assets/javascripts/adminlte/plugins/bootstrap-slider/bootstrap-slider.js +1167 -0
  60. data/vendor/assets/javascripts/adminlte/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js +14975 -0
  61. data/vendor/assets/javascripts/adminlte/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js +8 -0
  62. data/vendor/assets/javascripts/adminlte/plugins/chartjs/Chart.js +3477 -0
  63. data/vendor/assets/javascripts/adminlte/plugins/chartjs/Chart.min.js +11 -0
  64. data/vendor/assets/javascripts/adminlte/plugins/colorpicker/bootstrap-colorpicker.js +949 -0
  65. data/vendor/assets/javascripts/adminlte/plugins/colorpicker/bootstrap-colorpicker.min.js +1 -0
  66. data/vendor/assets/javascripts/adminlte/plugins/datepicker/bootstrap-datepicker.js +1671 -0
  67. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.ar.js +15 -0
  68. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.az.js +12 -0
  69. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.bg.js +14 -0
  70. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.ca.js +14 -0
  71. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.cs.js +15 -0
  72. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.cy.js +14 -0
  73. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.da.js +15 -0
  74. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.de.js +17 -0
  75. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.el.js +13 -0
  76. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.es.js +14 -0
  77. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.et.js +18 -0
  78. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.fa.js +17 -0
  79. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.fi.js +16 -0
  80. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.fr.js +17 -0
  81. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.gl.js +11 -0
  82. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.he.js +15 -0
  83. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.hr.js +13 -0
  84. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.hu.js +16 -0
  85. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.id.js +15 -0
  86. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.is.js +14 -0
  87. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.it.js +17 -0
  88. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.ja.js +15 -0
  89. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.ka.js +17 -0
  90. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.kk.js +15 -0
  91. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.kr.js +13 -0
  92. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.lt.js +16 -0
  93. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.lv.js +16 -0
  94. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.mk.js +15 -0
  95. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.ms.js +14 -0
  96. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.nb.js +14 -0
  97. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.nl-BE.js +17 -0
  98. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.nl.js +14 -0
  99. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.no.js +16 -0
  100. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.pl.js +15 -0
  101. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.pt-BR.js +15 -0
  102. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.pt.js +16 -0
  103. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.ro.js +16 -0
  104. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.rs-latin.js +14 -0
  105. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.rs.js +14 -0
  106. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.ru.js +15 -0
  107. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.sk.js +15 -0
  108. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.sl.js +14 -0
  109. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.sq.js +15 -0
  110. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.sv.js +16 -0
  111. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.sw.js +15 -0
  112. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.th.js +14 -0
  113. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.tr.js +16 -0
  114. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.ua.js +15 -0
  115. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.vi.js +16 -0
  116. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js +16 -0
  117. data/vendor/assets/javascripts/adminlte/plugins/datepicker/locales/bootstrap-datepicker.zh-TW.js +17 -0
  118. data/vendor/assets/javascripts/adminlte/plugins/daterangepicker/daterangepicker.js +1304 -0
  119. data/vendor/assets/javascripts/adminlte/plugins/daterangepicker/moment.js +3043 -0
  120. data/vendor/assets/javascripts/adminlte/plugins/daterangepicker/moment.min.js +7 -0
  121. data/vendor/assets/javascripts/adminlte/plugins/fastclick/fastclick.js +841 -0
  122. data/vendor/assets/javascripts/adminlte/plugins/fastclick/fastclick.min.js +1 -0
  123. data/vendor/assets/javascripts/adminlte/plugins/flot/excanvas.js +1427 -0
  124. data/vendor/assets/javascripts/adminlte/plugins/flot/excanvas.min.js +1 -0
  125. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.colorhelpers.js +180 -0
  126. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.colorhelpers.min.js +1 -0
  127. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.canvas.js +345 -0
  128. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.canvas.min.js +1 -0
  129. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.categories.js +190 -0
  130. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.categories.min.js +1 -0
  131. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.crosshair.js +176 -0
  132. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.crosshair.min.js +1 -0
  133. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.errorbars.js +353 -0
  134. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.errorbars.min.js +1 -0
  135. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.fillbetween.js +226 -0
  136. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.fillbetween.min.js +1 -0
  137. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.image.js +241 -0
  138. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.image.min.js +1 -0
  139. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.js +3137 -0
  140. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.min.js +2 -0
  141. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.navigate.js +346 -0
  142. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.navigate.min.js +1 -0
  143. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.pie.js +817 -0
  144. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.pie.min.js +1 -0
  145. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.resize.js +60 -0
  146. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.resize.min.js +1 -0
  147. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.selection.js +360 -0
  148. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.selection.min.js +1 -0
  149. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.stack.js +188 -0
  150. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.stack.min.js +1 -0
  151. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.symbol.js +71 -0
  152. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.symbol.min.js +1 -0
  153. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.threshold.js +142 -0
  154. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.threshold.min.js +1 -0
  155. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.time.js +429 -0
  156. data/vendor/assets/javascripts/adminlte/plugins/flot/jquery.flot.time.min.js +1 -0
  157. data/vendor/assets/javascripts/adminlte/plugins/fullcalendar/fullcalendar.js +9732 -0
  158. data/vendor/assets/javascripts/adminlte/plugins/fullcalendar/fullcalendar.min.js +8 -0
  159. data/vendor/assets/javascripts/adminlte/plugins/iCheck/icheck.js +478 -0
  160. data/vendor/assets/javascripts/adminlte/plugins/iCheck/icheck.min.js +10 -0
  161. data/vendor/assets/javascripts/adminlte/plugins/input-mask/jquery.inputmask.date.extensions.js +488 -0
  162. data/vendor/assets/javascripts/adminlte/plugins/input-mask/jquery.inputmask.extensions.js +122 -0
  163. data/vendor/assets/javascripts/adminlte/plugins/input-mask/jquery.inputmask.js +1627 -0
  164. data/vendor/assets/javascripts/adminlte/plugins/input-mask/jquery.inputmask.numeric.extensions.js +177 -0
  165. data/vendor/assets/javascripts/adminlte/plugins/input-mask/jquery.inputmask.phone.extensions.js +50 -0
  166. data/vendor/assets/javascripts/adminlte/plugins/input-mask/jquery.inputmask.regex.extensions.js +169 -0
  167. data/vendor/assets/javascripts/adminlte/plugins/input-mask/phone-codes/phone-be.json +45 -0
  168. data/vendor/assets/javascripts/adminlte/plugins/input-mask/phone-codes/phone-codes.json +294 -0
  169. data/vendor/assets/javascripts/adminlte/plugins/input-mask/phone-codes/readme.txt +1 -0
  170. data/vendor/assets/javascripts/adminlte/plugins/ionslider/ion.rangeSlider.min.js +22 -0
  171. data/vendor/assets/javascripts/adminlte/plugins/jQuery/jQuery-2.1.4.min.js +4 -0
  172. data/vendor/assets/javascripts/adminlte/plugins/jQueryUI/jquery-ui.js +16617 -0
  173. data/vendor/assets/javascripts/adminlte/plugins/jQueryUI/jquery-ui.min.js +13 -0
  174. data/vendor/assets/javascripts/adminlte/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js +8 -0
  175. data/vendor/assets/javascripts/adminlte/plugins/jvectormap/jquery-jvectormap-usa-en.js +1 -0
  176. data/vendor/assets/javascripts/adminlte/plugins/jvectormap/jquery-jvectormap-world-mill-en.js +1 -0
  177. data/vendor/assets/javascripts/adminlte/plugins/knob/jquery.knob.js +805 -0
  178. data/vendor/assets/javascripts/adminlte/plugins/morris/morris.js +1892 -0
  179. data/vendor/assets/javascripts/adminlte/plugins/morris/morris.min.js +7 -0
  180. data/vendor/assets/javascripts/adminlte/plugins/pace/pace.js +935 -0
  181. data/vendor/assets/javascripts/adminlte/plugins/pace/pace.min.js +2 -0
  182. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/az.js +3 -0
  183. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/bg.js +3 -0
  184. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/ca.js +3 -0
  185. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/cs.js +3 -0
  186. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/da.js +3 -0
  187. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/de.js +3 -0
  188. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/en.js +3 -0
  189. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/es.js +3 -0
  190. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/et.js +3 -0
  191. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/eu.js +3 -0
  192. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/fa.js +3 -0
  193. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/fi.js +3 -0
  194. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/fr.js +3 -0
  195. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/gl.js +3 -0
  196. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/he.js +3 -0
  197. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/hi.js +3 -0
  198. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/hr.js +3 -0
  199. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/hu.js +3 -0
  200. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/id.js +3 -0
  201. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/is.js +3 -0
  202. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/it.js +3 -0
  203. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/ko.js +3 -0
  204. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/lt.js +3 -0
  205. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/lv.js +3 -0
  206. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/mk.js +3 -0
  207. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/nb.js +3 -0
  208. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/nl.js +3 -0
  209. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/pl.js +3 -0
  210. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/pt-BR.js +3 -0
  211. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/pt.js +3 -0
  212. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/ro.js +3 -0
  213. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/ru.js +3 -0
  214. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/sk.js +3 -0
  215. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/sr.js +3 -0
  216. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/sv.js +3 -0
  217. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/th.js +3 -0
  218. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/tr.js +3 -0
  219. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/uk.js +3 -0
  220. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/vi.js +3 -0
  221. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/zh-CN.js +3 -0
  222. data/vendor/assets/javascripts/adminlte/plugins/select2/i18n/zh-TW.js +3 -0
  223. data/vendor/assets/javascripts/adminlte/plugins/select2/select2.full.js +6114 -0
  224. data/vendor/assets/javascripts/adminlte/plugins/select2/select2.full.min.js +3 -0
  225. data/vendor/assets/javascripts/adminlte/plugins/select2/select2.js +5403 -0
  226. data/vendor/assets/javascripts/adminlte/plugins/select2/select2.min.js +2 -0
  227. data/vendor/assets/javascripts/adminlte/plugins/slimScroll/jquery.slimscroll.js +490 -0
  228. data/vendor/assets/javascripts/adminlte/plugins/slimScroll/jquery.slimscroll.min.js +1 -0
  229. data/vendor/assets/javascripts/adminlte/plugins/sparkline/jquery.sparkline.js +3054 -0
  230. data/vendor/assets/javascripts/adminlte/plugins/sparkline/jquery.sparkline.min.js +5 -0
  231. data/vendor/assets/javascripts/adminlte/plugins/timepicker/bootstrap-timepicker.js +903 -0
  232. data/vendor/assets/javascripts/adminlte/plugins/timepicker/bootstrap-timepicker.min.js +5 -0
  233. data/vendor/assets/javascripts/bootstrap.js +2317 -0
  234. data/vendor/assets/javascripts/bootstrap.min.js +7 -0
  235. data/vendor/assets/stylesheets/adminlte/adminlte.css +4928 -0
  236. data/vendor/assets/stylesheets/adminlte/adminlte.min.css +7 -0
  237. data/vendor/assets/stylesheets/adminlte/plugins/bootstrap-slider/slider.css +169 -0
  238. data/vendor/assets/stylesheets/adminlte/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.css +117 -0
  239. data/vendor/assets/stylesheets/adminlte/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css +3 -0
  240. data/vendor/assets/stylesheets/adminlte/plugins/colorpicker/bootstrap-colorpicker.css +214 -0
  241. data/vendor/assets/stylesheets/adminlte/plugins/colorpicker/bootstrap-colorpicker.min.css +9 -0
  242. data/vendor/assets/stylesheets/adminlte/plugins/colorpicker/img/alpha-horizontal.png +0 -0
  243. data/vendor/assets/stylesheets/adminlte/plugins/colorpicker/img/alpha.png +0 -0
  244. data/vendor/assets/stylesheets/adminlte/plugins/colorpicker/img/hue-horizontal.png +0 -0
  245. data/vendor/assets/stylesheets/adminlte/plugins/colorpicker/img/hue.png +0 -0
  246. data/vendor/assets/stylesheets/adminlte/plugins/colorpicker/img/saturation.png +0 -0
  247. data/vendor/assets/stylesheets/adminlte/plugins/datepicker/datepicker3.css +790 -0
  248. data/vendor/assets/stylesheets/adminlte/plugins/daterangepicker/daterangepicker-bs3.css +335 -0
  249. data/vendor/assets/stylesheets/adminlte/plugins/fullcalendar/fullcalendar.css +977 -0
  250. data/vendor/assets/stylesheets/adminlte/plugins/fullcalendar/fullcalendar.min.css +5 -0
  251. data/vendor/assets/stylesheets/adminlte/plugins/fullcalendar/fullcalendar.print.css +202 -0
  252. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/all.css +61 -0
  253. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/_all.css +560 -0
  254. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/aero.css +56 -0
  255. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/aero.png +0 -0
  256. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/aero@2x.png +0 -0
  257. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/blue.css +56 -0
  258. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/blue.png +0 -0
  259. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/blue@2x.png +0 -0
  260. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/flat.css +56 -0
  261. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/flat.png +0 -0
  262. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/flat@2x.png +0 -0
  263. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/green.css +56 -0
  264. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/green.png +0 -0
  265. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/green@2x.png +0 -0
  266. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/grey.css +56 -0
  267. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/grey.png +0 -0
  268. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/grey@2x.png +0 -0
  269. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/orange.css +56 -0
  270. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/orange.png +0 -0
  271. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/orange@2x.png +0 -0
  272. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/pink.css +56 -0
  273. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/pink.png +0 -0
  274. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/pink@2x.png +0 -0
  275. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/purple.css +56 -0
  276. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/purple.png +0 -0
  277. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/purple@2x.png +0 -0
  278. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/red.css +56 -0
  279. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/red.png +0 -0
  280. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/red@2x.png +0 -0
  281. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/yellow.css +56 -0
  282. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/yellow.png +0 -0
  283. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/yellow@2x.png +0 -0
  284. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/futurico/futurico.css +56 -0
  285. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/futurico/futurico.png +0 -0
  286. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/futurico/futurico@2x.png +0 -0
  287. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/_all.css +740 -0
  288. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/aero.css +74 -0
  289. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/blue.css +74 -0
  290. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/green.css +74 -0
  291. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/grey.css +74 -0
  292. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/line.css +74 -0
  293. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/line.png +0 -0
  294. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/line@2x.png +0 -0
  295. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/orange.css +74 -0
  296. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/pink.css +74 -0
  297. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/purple.css +74 -0
  298. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/red.css +74 -0
  299. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/yellow.css +74 -0
  300. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/_all.css +557 -0
  301. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/aero.css +62 -0
  302. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/aero.png +0 -0
  303. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/aero@2x.png +0 -0
  304. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/blue.css +62 -0
  305. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/blue.png +0 -0
  306. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/blue@2x.png +0 -0
  307. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/green.css +62 -0
  308. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/green.png +0 -0
  309. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/green@2x.png +0 -0
  310. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/grey.css +62 -0
  311. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/grey.png +0 -0
  312. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/grey@2x.png +0 -0
  313. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/minimal.css +62 -0
  314. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/minimal.png +0 -0
  315. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/minimal@2x.png +0 -0
  316. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/orange.css +62 -0
  317. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/orange.png +0 -0
  318. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/orange@2x.png +0 -0
  319. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/pink.css +62 -0
  320. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/pink.png +0 -0
  321. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/pink@2x.png +0 -0
  322. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/purple.css +62 -0
  323. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/purple.png +0 -0
  324. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/purple@2x.png +0 -0
  325. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/red.css +62 -0
  326. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/red.png +0 -0
  327. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/red@2x.png +0 -0
  328. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/yellow.css +62 -0
  329. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/yellow.png +0 -0
  330. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/yellow@2x.png +0 -0
  331. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/polaris/polaris.css +62 -0
  332. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/polaris/polaris.png +0 -0
  333. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/polaris/polaris@2x.png +0 -0
  334. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/_all.css +620 -0
  335. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/aero.css +62 -0
  336. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/aero.png +0 -0
  337. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/aero@2x.png +0 -0
  338. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/blue.css +62 -0
  339. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/blue.png +0 -0
  340. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/blue@2x.png +0 -0
  341. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/green.css +62 -0
  342. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/green.png +0 -0
  343. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/green@2x.png +0 -0
  344. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/grey.css +62 -0
  345. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/grey.png +0 -0
  346. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/grey@2x.png +0 -0
  347. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/orange.css +62 -0
  348. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/orange.png +0 -0
  349. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/orange@2x.png +0 -0
  350. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/pink.css +62 -0
  351. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/pink.png +0 -0
  352. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/pink@2x.png +0 -0
  353. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/purple.css +62 -0
  354. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/purple.png +0 -0
  355. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/purple@2x.png +0 -0
  356. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/red.css +62 -0
  357. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/red.png +0 -0
  358. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/red@2x.png +0 -0
  359. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/square.css +62 -0
  360. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/square.png +0 -0
  361. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/square@2x.png +0 -0
  362. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/yellow.css +62 -0
  363. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/yellow.png +0 -0
  364. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/yellow@2x.png +0 -0
  365. data/vendor/assets/stylesheets/adminlte/plugins/ionslider/img/sprite-skin-flat.png +0 -0
  366. data/vendor/assets/stylesheets/adminlte/plugins/ionslider/img/sprite-skin-nice.png +0 -0
  367. data/vendor/assets/stylesheets/adminlte/plugins/ionslider/ion.rangeSlider.css +126 -0
  368. data/vendor/assets/stylesheets/adminlte/plugins/ionslider/ion.rangeSlider.skinFlat.css +89 -0
  369. data/vendor/assets/stylesheets/adminlte/plugins/ionslider/ion.rangeSlider.skinNice.css +85 -0
  370. data/vendor/assets/stylesheets/adminlte/plugins/jvectormap/jquery-jvectormap-1.2.2.css +40 -0
  371. data/vendor/assets/stylesheets/adminlte/plugins/morris/morris.css +2 -0
  372. data/vendor/assets/stylesheets/adminlte/plugins/pace/pace.css +85 -0
  373. data/vendor/assets/stylesheets/adminlte/plugins/pace/pace.min.css +1 -0
  374. data/vendor/assets/stylesheets/adminlte/plugins/select2/select2.css +431 -0
  375. data/vendor/assets/stylesheets/adminlte/plugins/select2/select2.min.css +1 -0
  376. data/vendor/assets/stylesheets/adminlte/plugins/timepicker/bootstrap-timepicker.css +121 -0
  377. data/vendor/assets/stylesheets/adminlte/plugins/timepicker/bootstrap-timepicker.min.css +10 -0
  378. data/vendor/assets/stylesheets/adminlte/skins/_all-skins.css +1799 -0
  379. data/vendor/assets/stylesheets/adminlte/skins/_all-skins.min.css +1 -0
  380. data/vendor/assets/stylesheets/adminlte/skins/skin-black-light.css +176 -0
  381. data/vendor/assets/stylesheets/adminlte/skins/skin-black-light.min.css +1 -0
  382. data/vendor/assets/stylesheets/adminlte/skins/skin-black.css +154 -0
  383. data/vendor/assets/stylesheets/adminlte/skins/skin-black.min.css +1 -0
  384. data/vendor/assets/stylesheets/adminlte/skins/skin-blue-light.css +167 -0
  385. data/vendor/assets/stylesheets/adminlte/skins/skin-blue-light.min.css +1 -0
  386. data/vendor/assets/stylesheets/adminlte/skins/skin-blue.css +142 -0
  387. data/vendor/assets/stylesheets/adminlte/skins/skin-blue.min.css +1 -0
  388. data/vendor/assets/stylesheets/adminlte/skins/skin-green-light.css +156 -0
  389. data/vendor/assets/stylesheets/adminlte/skins/skin-green-light.min.css +1 -0
  390. data/vendor/assets/stylesheets/adminlte/skins/skin-green.css +134 -0
  391. data/vendor/assets/stylesheets/adminlte/skins/skin-green.min.css +1 -0
  392. data/vendor/assets/stylesheets/adminlte/skins/skin-purple-light.css +156 -0
  393. data/vendor/assets/stylesheets/adminlte/skins/skin-purple-light.min.css +1 -0
  394. data/vendor/assets/stylesheets/adminlte/skins/skin-purple.css +134 -0
  395. data/vendor/assets/stylesheets/adminlte/skins/skin-purple.min.css +1 -0
  396. data/vendor/assets/stylesheets/adminlte/skins/skin-red-light.css +156 -0
  397. data/vendor/assets/stylesheets/adminlte/skins/skin-red-light.min.css +1 -0
  398. data/vendor/assets/stylesheets/adminlte/skins/skin-red.css +134 -0
  399. data/vendor/assets/stylesheets/adminlte/skins/skin-red.min.css +1 -0
  400. data/vendor/assets/stylesheets/adminlte/skins/skin-yellow-light.css +156 -0
  401. data/vendor/assets/stylesheets/adminlte/skins/skin-yellow-light.min.css +1 -0
  402. data/vendor/assets/stylesheets/adminlte/skins/skin-yellow.css +134 -0
  403. data/vendor/assets/stylesheets/adminlte/skins/skin-yellow.min.css +1 -0
  404. data/vendor/assets/stylesheets/bootstrap.css +6800 -0
  405. data/vendor/assets/stylesheets/bootstrap.css.map +1 -0
  406. data/vendor/assets/stylesheets/bootstrap.min.css +5 -0
  407. metadata +491 -0
@@ -0,0 +1 @@
1
+ (function($){var REDRAW_ATTEMPTS=10;var REDRAW_SHRINK=.95;function init(plot){var canvas=null,target=null,options=null,maxRadius=null,centerLeft=null,centerTop=null,processed=false,ctx=null;var highlights=[];plot.hooks.processOptions.push(function(plot,options){if(options.series.pie.show){options.grid.show=false;if(options.series.pie.label.show=="auto"){if(options.legend.show){options.series.pie.label.show=false}else{options.series.pie.label.show=true}}if(options.series.pie.radius=="auto"){if(options.series.pie.label.show){options.series.pie.radius=3/4}else{options.series.pie.radius=1}}if(options.series.pie.tilt>1){options.series.pie.tilt=1}else if(options.series.pie.tilt<0){options.series.pie.tilt=0}}});plot.hooks.bindEvents.push(function(plot,eventHolder){var options=plot.getOptions();if(options.series.pie.show){if(options.grid.hoverable){eventHolder.unbind("mousemove").mousemove(onMouseMove)}if(options.grid.clickable){eventHolder.unbind("click").click(onClick)}}});plot.hooks.processDatapoints.push(function(plot,series,data,datapoints){var options=plot.getOptions();if(options.series.pie.show){processDatapoints(plot,series,data,datapoints)}});plot.hooks.drawOverlay.push(function(plot,octx){var options=plot.getOptions();if(options.series.pie.show){drawOverlay(plot,octx)}});plot.hooks.draw.push(function(plot,newCtx){var options=plot.getOptions();if(options.series.pie.show){draw(plot,newCtx)}});function processDatapoints(plot,series,datapoints){if(!processed){processed=true;canvas=plot.getCanvas();target=$(canvas).parent();options=plot.getOptions();plot.setData(combine(plot.getData()))}}function combine(data){var total=0,combined=0,numCombined=0,color=options.series.pie.combine.color,newdata=[];for(var i=0;i<data.length;++i){var value=data[i].data;if($.isArray(value)&&value.length==1){value=value[0]}if($.isArray(value)){if(!isNaN(parseFloat(value[1]))&&isFinite(value[1])){value[1]=+value[1]}else{value[1]=0}}else if(!isNaN(parseFloat(value))&&isFinite(value)){value=[1,+value]}else{value=[1,0]}data[i].data=[value]}for(var i=0;i<data.length;++i){total+=data[i].data[0][1]}for(var i=0;i<data.length;++i){var value=data[i].data[0][1];if(value/total<=options.series.pie.combine.threshold){combined+=value;numCombined++;if(!color){color=data[i].color}}}for(var i=0;i<data.length;++i){var value=data[i].data[0][1];if(numCombined<2||value/total>options.series.pie.combine.threshold){newdata.push({data:[[1,value]],color:data[i].color,label:data[i].label,angle:value*Math.PI*2/total,percent:value/(total/100)})}}if(numCombined>1){newdata.push({data:[[1,combined]],color:color,label:options.series.pie.combine.label,angle:combined*Math.PI*2/total,percent:combined/(total/100)})}return newdata}function draw(plot,newCtx){if(!target){return}var canvasWidth=plot.getPlaceholder().width(),canvasHeight=plot.getPlaceholder().height(),legendWidth=target.children().filter(".legend").children().width()||0;ctx=newCtx;processed=false;maxRadius=Math.min(canvasWidth,canvasHeight/options.series.pie.tilt)/2;centerTop=canvasHeight/2+options.series.pie.offset.top;centerLeft=canvasWidth/2;if(options.series.pie.offset.left=="auto"){if(options.legend.position.match("w")){centerLeft+=legendWidth/2}else{centerLeft-=legendWidth/2}if(centerLeft<maxRadius){centerLeft=maxRadius}else if(centerLeft>canvasWidth-maxRadius){centerLeft=canvasWidth-maxRadius}}else{centerLeft+=options.series.pie.offset.left}var slices=plot.getData(),attempts=0;do{if(attempts>0){maxRadius*=REDRAW_SHRINK}attempts+=1;clear();if(options.series.pie.tilt<=.8){drawShadow()}}while(!drawPie()&&attempts<REDRAW_ATTEMPTS);if(attempts>=REDRAW_ATTEMPTS){clear();target.prepend("<div class='error'>Could not draw pie with labels contained inside canvas</div>")}if(plot.setSeries&&plot.insertLegend){plot.setSeries(slices);plot.insertLegend()}function clear(){ctx.clearRect(0,0,canvasWidth,canvasHeight);target.children().filter(".pieLabel, .pieLabelBackground").remove()}function drawShadow(){var shadowLeft=options.series.pie.shadow.left;var shadowTop=options.series.pie.shadow.top;var edge=10;var alpha=options.series.pie.shadow.alpha;var radius=options.series.pie.radius>1?options.series.pie.radius:maxRadius*options.series.pie.radius;if(radius>=canvasWidth/2-shadowLeft||radius*options.series.pie.tilt>=canvasHeight/2-shadowTop||radius<=edge){return}ctx.save();ctx.translate(shadowLeft,shadowTop);ctx.globalAlpha=alpha;ctx.fillStyle="#000";ctx.translate(centerLeft,centerTop);ctx.scale(1,options.series.pie.tilt);for(var i=1;i<=edge;i++){ctx.beginPath();ctx.arc(0,0,radius,0,Math.PI*2,false);ctx.fill();radius-=i}ctx.restore()}function drawPie(){var startAngle=Math.PI*options.series.pie.startAngle;var radius=options.series.pie.radius>1?options.series.pie.radius:maxRadius*options.series.pie.radius;ctx.save();ctx.translate(centerLeft,centerTop);ctx.scale(1,options.series.pie.tilt);ctx.save();var currentAngle=startAngle;for(var i=0;i<slices.length;++i){slices[i].startAngle=currentAngle;drawSlice(slices[i].angle,slices[i].color,true)}ctx.restore();if(options.series.pie.stroke.width>0){ctx.save();ctx.lineWidth=options.series.pie.stroke.width;currentAngle=startAngle;for(var i=0;i<slices.length;++i){drawSlice(slices[i].angle,options.series.pie.stroke.color,false)}ctx.restore()}drawDonutHole(ctx);ctx.restore();if(options.series.pie.label.show){return drawLabels()}else return true;function drawSlice(angle,color,fill){if(angle<=0||isNaN(angle)){return}if(fill){ctx.fillStyle=color}else{ctx.strokeStyle=color;ctx.lineJoin="round"}ctx.beginPath();if(Math.abs(angle-Math.PI*2)>1e-9){ctx.moveTo(0,0)}ctx.arc(0,0,radius,currentAngle,currentAngle+angle/2,false);ctx.arc(0,0,radius,currentAngle+angle/2,currentAngle+angle,false);ctx.closePath();currentAngle+=angle;if(fill){ctx.fill()}else{ctx.stroke()}}function drawLabels(){var currentAngle=startAngle;var radius=options.series.pie.label.radius>1?options.series.pie.label.radius:maxRadius*options.series.pie.label.radius;for(var i=0;i<slices.length;++i){if(slices[i].percent>=options.series.pie.label.threshold*100){if(!drawLabel(slices[i],currentAngle,i)){return false}}currentAngle+=slices[i].angle}return true;function drawLabel(slice,startAngle,index){if(slice.data[0][1]==0){return true}var lf=options.legend.labelFormatter,text,plf=options.series.pie.label.formatter;if(lf){text=lf(slice.label,slice)}else{text=slice.label}if(plf){text=plf(text,slice)}var halfAngle=(startAngle+slice.angle+startAngle)/2;var x=centerLeft+Math.round(Math.cos(halfAngle)*radius);var y=centerTop+Math.round(Math.sin(halfAngle)*radius)*options.series.pie.tilt;var html="<span class='pieLabel' id='pieLabel"+index+"' style='position:absolute;top:"+y+"px;left:"+x+"px;'>"+text+"</span>";target.append(html);var label=target.children("#pieLabel"+index);var labelTop=y-label.height()/2;var labelLeft=x-label.width()/2;label.css("top",labelTop);label.css("left",labelLeft);if(0-labelTop>0||0-labelLeft>0||canvasHeight-(labelTop+label.height())<0||canvasWidth-(labelLeft+label.width())<0){return false}if(options.series.pie.label.background.opacity!=0){var c=options.series.pie.label.background.color;if(c==null){c=slice.color}var pos="top:"+labelTop+"px;left:"+labelLeft+"px;";$("<div class='pieLabelBackground' style='position:absolute;width:"+label.width()+"px;height:"+label.height()+"px;"+pos+"background-color:"+c+";'></div>").css("opacity",options.series.pie.label.background.opacity).insertBefore(label)}return true}}}}function drawDonutHole(layer){if(options.series.pie.innerRadius>0){layer.save();var innerRadius=options.series.pie.innerRadius>1?options.series.pie.innerRadius:maxRadius*options.series.pie.innerRadius;layer.globalCompositeOperation="destination-out";layer.beginPath();layer.fillStyle=options.series.pie.stroke.color;layer.arc(0,0,innerRadius,0,Math.PI*2,false);layer.fill();layer.closePath();layer.restore();layer.save();layer.beginPath();layer.strokeStyle=options.series.pie.stroke.color;layer.arc(0,0,innerRadius,0,Math.PI*2,false);layer.stroke();layer.closePath();layer.restore()}}function isPointInPoly(poly,pt){for(var c=false,i=-1,l=poly.length,j=l-1;++i<l;j=i)(poly[i][1]<=pt[1]&&pt[1]<poly[j][1]||poly[j][1]<=pt[1]&&pt[1]<poly[i][1])&&pt[0]<(poly[j][0]-poly[i][0])*(pt[1]-poly[i][1])/(poly[j][1]-poly[i][1])+poly[i][0]&&(c=!c);return c}function findNearbySlice(mouseX,mouseY){var slices=plot.getData(),options=plot.getOptions(),radius=options.series.pie.radius>1?options.series.pie.radius:maxRadius*options.series.pie.radius,x,y;for(var i=0;i<slices.length;++i){var s=slices[i];if(s.pie.show){ctx.save();ctx.beginPath();ctx.moveTo(0,0);ctx.arc(0,0,radius,s.startAngle,s.startAngle+s.angle/2,false);ctx.arc(0,0,radius,s.startAngle+s.angle/2,s.startAngle+s.angle,false);ctx.closePath();x=mouseX-centerLeft;y=mouseY-centerTop;if(ctx.isPointInPath){if(ctx.isPointInPath(mouseX-centerLeft,mouseY-centerTop)){ctx.restore();return{datapoint:[s.percent,s.data],dataIndex:0,series:s,seriesIndex:i}}}else{var p1X=radius*Math.cos(s.startAngle),p1Y=radius*Math.sin(s.startAngle),p2X=radius*Math.cos(s.startAngle+s.angle/4),p2Y=radius*Math.sin(s.startAngle+s.angle/4),p3X=radius*Math.cos(s.startAngle+s.angle/2),p3Y=radius*Math.sin(s.startAngle+s.angle/2),p4X=radius*Math.cos(s.startAngle+s.angle/1.5),p4Y=radius*Math.sin(s.startAngle+s.angle/1.5),p5X=radius*Math.cos(s.startAngle+s.angle),p5Y=radius*Math.sin(s.startAngle+s.angle),arrPoly=[[0,0],[p1X,p1Y],[p2X,p2Y],[p3X,p3Y],[p4X,p4Y],[p5X,p5Y]],arrPoint=[x,y];if(isPointInPoly(arrPoly,arrPoint)){ctx.restore();return{datapoint:[s.percent,s.data],dataIndex:0,series:s,seriesIndex:i}}}ctx.restore()}}return null}function onMouseMove(e){triggerClickHoverEvent("plothover",e)}function onClick(e){triggerClickHoverEvent("plotclick",e)}function triggerClickHoverEvent(eventname,e){var offset=plot.offset();var canvasX=parseInt(e.pageX-offset.left);var canvasY=parseInt(e.pageY-offset.top);var item=findNearbySlice(canvasX,canvasY);if(options.grid.autoHighlight){for(var i=0;i<highlights.length;++i){var h=highlights[i];if(h.auto==eventname&&!(item&&h.series==item.series)){unhighlight(h.series)}}}if(item){highlight(item.series,eventname)}var pos={pageX:e.pageX,pageY:e.pageY};target.trigger(eventname,[pos,item])}function highlight(s,auto){var i=indexOfHighlight(s);if(i==-1){highlights.push({series:s,auto:auto});plot.triggerRedrawOverlay()}else if(!auto){highlights[i].auto=false}}function unhighlight(s){if(s==null){highlights=[];plot.triggerRedrawOverlay()}var i=indexOfHighlight(s);if(i!=-1){highlights.splice(i,1);plot.triggerRedrawOverlay()}}function indexOfHighlight(s){for(var i=0;i<highlights.length;++i){var h=highlights[i];if(h.series==s)return i}return-1}function drawOverlay(plot,octx){var options=plot.getOptions();var radius=options.series.pie.radius>1?options.series.pie.radius:maxRadius*options.series.pie.radius;octx.save();octx.translate(centerLeft,centerTop);octx.scale(1,options.series.pie.tilt);for(var i=0;i<highlights.length;++i){drawHighlight(highlights[i].series)}drawDonutHole(octx);octx.restore();function drawHighlight(series){if(series.angle<=0||isNaN(series.angle)){return}octx.fillStyle="rgba(255, 255, 255, "+options.series.pie.highlight.opacity+")";octx.beginPath();if(Math.abs(series.angle-Math.PI*2)>1e-9){octx.moveTo(0,0)}octx.arc(0,0,radius,series.startAngle,series.startAngle+series.angle/2,false);octx.arc(0,0,radius,series.startAngle+series.angle/2,series.startAngle+series.angle,false);octx.closePath();octx.fill()}}}var options={series:{pie:{show:false,radius:"auto",innerRadius:0,startAngle:3/2,tilt:1,shadow:{left:5,top:15,alpha:.02},offset:{top:0,left:"auto"},stroke:{color:"#fff",width:1},label:{show:"auto",formatter:function(label,slice){return"<div style='font-size:x-small;text-align:center;padding:2px;color:"+slice.color+";'>"+label+"<br/>"+Math.round(slice.percent)+"%</div>"},radius:1,background:{color:null,opacity:0},threshold:0},combine:{threshold:-1,color:null,label:"Other"},highlight:{opacity:.5}}}};$.plot.plugins.push({init:init,options:options,name:"pie",version:"1.1"})})(jQuery);
@@ -0,0 +1,60 @@
1
+ /* Flot plugin for automatically redrawing plots as the placeholder resizes.
2
+
3
+ Copyright (c) 2007-2013 IOLA and Ole Laursen.
4
+ Licensed under the MIT license.
5
+
6
+ It works by listening for changes on the placeholder div (through the jQuery
7
+ resize event plugin) - if the size changes, it will redraw the plot.
8
+
9
+ There are no options. If you need to disable the plugin for some plots, you
10
+ can just fix the size of their placeholders.
11
+
12
+ */
13
+
14
+ /* Inline dependency:
15
+ * jQuery resize event - v1.1 - 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
+
23
+ (function($,t,n){function p(){for(var n=r.length-1;n>=0;n--){var o=$(r[n]);if(o[0]==t||o.is(":visible")){var h=o.width(),d=o.height(),v=o.data(a);!v||h===v.w&&d===v.h?i[f]=i[l]:(i[f]=i[c],o.trigger(u,[v.w=h,v.h=d]))}else v=o.data(a),v.w=0,v.h=0}s!==null&&(s=t.requestAnimationFrame(p))}var r=[],i=$.resize=$.extend($.resize,{}),s,o="setTimeout",u="resize",a=u+"-special-event",f="delay",l="pendingDelay",c="activeDelay",h="throttleWindow";i[l]=250,i[c]=20,i[f]=i[l],i[h]=!0,$.event.special[u]={setup:function(){if(!i[h]&&this[o])return!1;var t=$(this);r.push(this),t.data(a,{w:t.width(),h:t.height()}),r.length===1&&(s=n,p())},teardown:function(){if(!i[h]&&this[o])return!1;var t=$(this);for(var n=r.length-1;n>=0;n--)if(r[n]==this){r.splice(n,1);break}t.removeData(a),r.length||(cancelAnimationFrame(s),s=null)},add:function(t){function s(t,i,s){var o=$(this),u=o.data(a);u.w=i!==n?i:o.width(),u.h=s!==n?s:o.height(),r.apply(this,arguments)}if(!i[h]&&this[o])return!1;var r;if($.isFunction(t))return r=t,s;r=t.handler,t.handler=s}},t.requestAnimationFrame||(t.requestAnimationFrame=function(){return t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e,n){return t.setTimeout(e,i[f])}}()),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(){return t.webkitCancelRequestAnimationFrame||t.mozCancelRequestAnimationFrame||t.oCancelRequestAnimationFrame||t.msCancelRequestAnimationFrame||clearTimeout}())})(jQuery,this);
24
+
25
+ (function ($) {
26
+ var options = { }; // no options
27
+
28
+ function init(plot) {
29
+ function onResize() {
30
+ var placeholder = plot.getPlaceholder();
31
+
32
+ // somebody might have hidden us and we can't plot
33
+ // when we don't have the dimensions
34
+ if (placeholder.width() == 0 || placeholder.height() == 0)
35
+ return;
36
+
37
+ plot.resize();
38
+ plot.setupGrid();
39
+ plot.draw();
40
+ }
41
+
42
+ function bindEvents(plot, eventHolder) {
43
+ plot.getPlaceholder().resize(onResize);
44
+ }
45
+
46
+ function shutdown(plot, eventHolder) {
47
+ plot.getPlaceholder().unbind("resize", onResize);
48
+ }
49
+
50
+ plot.hooks.bindEvents.push(bindEvents);
51
+ plot.hooks.shutdown.push(shutdown);
52
+ }
53
+
54
+ $.plot.plugins.push({
55
+ init: init,
56
+ options: options,
57
+ name: 'resize',
58
+ version: '1.0'
59
+ });
60
+ })(jQuery);
@@ -0,0 +1 @@
1
+ (function($,t,n){function p(){for(var n=r.length-1;n>=0;n--){var o=$(r[n]);if(o[0]==t||o.is(":visible")){var h=o.width(),d=o.height(),v=o.data(a);!v||h===v.w&&d===v.h?i[f]=i[l]:(i[f]=i[c],o.trigger(u,[v.w=h,v.h=d]))}else v=o.data(a),v.w=0,v.h=0}s!==null&&(s=t.requestAnimationFrame(p))}var r=[],i=$.resize=$.extend($.resize,{}),s,o="setTimeout",u="resize",a=u+"-special-event",f="delay",l="pendingDelay",c="activeDelay",h="throttleWindow";i[l]=250,i[c]=20,i[f]=i[l],i[h]=!0,$.event.special[u]={setup:function(){if(!i[h]&&this[o])return!1;var t=$(this);r.push(this),t.data(a,{w:t.width(),h:t.height()}),r.length===1&&(s=n,p())},teardown:function(){if(!i[h]&&this[o])return!1;var t=$(this);for(var n=r.length-1;n>=0;n--)if(r[n]==this){r.splice(n,1);break}t.removeData(a),r.length||(cancelAnimationFrame(s),s=null)},add:function(t){function s(t,i,s){var o=$(this),u=o.data(a);u.w=i!==n?i:o.width(),u.h=s!==n?s:o.height(),r.apply(this,arguments)}if(!i[h]&&this[o])return!1;var r;if($.isFunction(t))return r=t,s;r=t.handler,t.handler=s}},t.requestAnimationFrame||(t.requestAnimationFrame=function(){return t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e,n){return t.setTimeout(e,i[f])}}()),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(){return t.webkitCancelRequestAnimationFrame||t.mozCancelRequestAnimationFrame||t.oCancelRequestAnimationFrame||t.msCancelRequestAnimationFrame||clearTimeout}())})(jQuery,this);(function($){var options={};function init(plot){function onResize(){var placeholder=plot.getPlaceholder();if(placeholder.width()==0||placeholder.height()==0)return;plot.resize();plot.setupGrid();plot.draw()}function bindEvents(plot,eventHolder){plot.getPlaceholder().resize(onResize)}function shutdown(plot,eventHolder){plot.getPlaceholder().unbind("resize",onResize)}plot.hooks.bindEvents.push(bindEvents);plot.hooks.shutdown.push(shutdown)}$.plot.plugins.push({init:init,options:options,name:"resize",version:"1.0"})})(jQuery);
@@ -0,0 +1,360 @@
1
+ /* Flot plugin for selecting regions of a plot.
2
+
3
+ Copyright (c) 2007-2013 IOLA and Ole Laursen.
4
+ Licensed under the MIT license.
5
+
6
+ The plugin supports these options:
7
+
8
+ selection: {
9
+ mode: null or "x" or "y" or "xy",
10
+ color: color,
11
+ shape: "round" or "miter" or "bevel",
12
+ minSize: number of pixels
13
+ }
14
+
15
+ Selection support is enabled by setting the mode to one of "x", "y" or "xy".
16
+ In "x" mode, the user will only be able to specify the x range, similarly for
17
+ "y" mode. For "xy", the selection becomes a rectangle where both ranges can be
18
+ specified. "color" is color of the selection (if you need to change the color
19
+ later on, you can get to it with plot.getOptions().selection.color). "shape"
20
+ is the shape of the corners of the selection.
21
+
22
+ "minSize" is the minimum size a selection can be in pixels. This value can
23
+ be customized to determine the smallest size a selection can be and still
24
+ have the selection rectangle be displayed. When customizing this value, the
25
+ fact that it refers to pixels, not axis units must be taken into account.
26
+ Thus, for example, if there is a bar graph in time mode with BarWidth set to 1
27
+ minute, setting "minSize" to 1 will not make the minimum selection size 1
28
+ minute, but rather 1 pixel. Note also that setting "minSize" to 0 will prevent
29
+ "plotunselected" events from being fired when the user clicks the mouse without
30
+ dragging.
31
+
32
+ When selection support is enabled, a "plotselected" event will be emitted on
33
+ the DOM element you passed into the plot function. The event handler gets a
34
+ parameter with the ranges selected on the axes, like this:
35
+
36
+ placeholder.bind( "plotselected", function( event, ranges ) {
37
+ alert("You selected " + ranges.xaxis.from + " to " + ranges.xaxis.to)
38
+ // similar for yaxis - with multiple axes, the extra ones are in
39
+ // x2axis, x3axis, ...
40
+ });
41
+
42
+ The "plotselected" event is only fired when the user has finished making the
43
+ selection. A "plotselecting" event is fired during the process with the same
44
+ parameters as the "plotselected" event, in case you want to know what's
45
+ happening while it's happening,
46
+
47
+ A "plotunselected" event with no arguments is emitted when the user clicks the
48
+ mouse to remove the selection. As stated above, setting "minSize" to 0 will
49
+ destroy this behavior.
50
+
51
+ The plugin allso adds the following methods to the plot object:
52
+
53
+ - setSelection( ranges, preventEvent )
54
+
55
+ Set the selection rectangle. The passed in ranges is on the same form as
56
+ returned in the "plotselected" event. If the selection mode is "x", you
57
+ should put in either an xaxis range, if the mode is "y" you need to put in
58
+ an yaxis range and both xaxis and yaxis if the selection mode is "xy", like
59
+ this:
60
+
61
+ setSelection({ xaxis: { from: 0, to: 10 }, yaxis: { from: 40, to: 60 } });
62
+
63
+ setSelection will trigger the "plotselected" event when called. If you don't
64
+ want that to happen, e.g. if you're inside a "plotselected" handler, pass
65
+ true as the second parameter. If you are using multiple axes, you can
66
+ specify the ranges on any of those, e.g. as x2axis/x3axis/... instead of
67
+ xaxis, the plugin picks the first one it sees.
68
+
69
+ - clearSelection( preventEvent )
70
+
71
+ Clear the selection rectangle. Pass in true to avoid getting a
72
+ "plotunselected" event.
73
+
74
+ - getSelection()
75
+
76
+ Returns the current selection in the same format as the "plotselected"
77
+ event. If there's currently no selection, the function returns null.
78
+
79
+ */
80
+
81
+ (function ($) {
82
+ function init(plot) {
83
+ var selection = {
84
+ first: { x: -1, y: -1}, second: { x: -1, y: -1},
85
+ show: false,
86
+ active: false
87
+ };
88
+
89
+ // FIXME: The drag handling implemented here should be
90
+ // abstracted out, there's some similar code from a library in
91
+ // the navigation plugin, this should be massaged a bit to fit
92
+ // the Flot cases here better and reused. Doing this would
93
+ // make this plugin much slimmer.
94
+ var savedhandlers = {};
95
+
96
+ var mouseUpHandler = null;
97
+
98
+ function onMouseMove(e) {
99
+ if (selection.active) {
100
+ updateSelection(e);
101
+
102
+ plot.getPlaceholder().trigger("plotselecting", [ getSelection() ]);
103
+ }
104
+ }
105
+
106
+ function onMouseDown(e) {
107
+ if (e.which != 1) // only accept left-click
108
+ return;
109
+
110
+ // cancel out any text selections
111
+ document.body.focus();
112
+
113
+ // prevent text selection and drag in old-school browsers
114
+ if (document.onselectstart !== undefined && savedhandlers.onselectstart == null) {
115
+ savedhandlers.onselectstart = document.onselectstart;
116
+ document.onselectstart = function () { return false; };
117
+ }
118
+ if (document.ondrag !== undefined && savedhandlers.ondrag == null) {
119
+ savedhandlers.ondrag = document.ondrag;
120
+ document.ondrag = function () { return false; };
121
+ }
122
+
123
+ setSelectionPos(selection.first, e);
124
+
125
+ selection.active = true;
126
+
127
+ // this is a bit silly, but we have to use a closure to be
128
+ // able to whack the same handler again
129
+ mouseUpHandler = function (e) { onMouseUp(e); };
130
+
131
+ $(document).one("mouseup", mouseUpHandler);
132
+ }
133
+
134
+ function onMouseUp(e) {
135
+ mouseUpHandler = null;
136
+
137
+ // revert drag stuff for old-school browsers
138
+ if (document.onselectstart !== undefined)
139
+ document.onselectstart = savedhandlers.onselectstart;
140
+ if (document.ondrag !== undefined)
141
+ document.ondrag = savedhandlers.ondrag;
142
+
143
+ // no more dragging
144
+ selection.active = false;
145
+ updateSelection(e);
146
+
147
+ if (selectionIsSane())
148
+ triggerSelectedEvent();
149
+ else {
150
+ // this counts as a clear
151
+ plot.getPlaceholder().trigger("plotunselected", [ ]);
152
+ plot.getPlaceholder().trigger("plotselecting", [ null ]);
153
+ }
154
+
155
+ return false;
156
+ }
157
+
158
+ function getSelection() {
159
+ if (!selectionIsSane())
160
+ return null;
161
+
162
+ if (!selection.show) return null;
163
+
164
+ var r = {}, c1 = selection.first, c2 = selection.second;
165
+ $.each(plot.getAxes(), function (name, axis) {
166
+ if (axis.used) {
167
+ var p1 = axis.c2p(c1[axis.direction]), p2 = axis.c2p(c2[axis.direction]);
168
+ r[name] = { from: Math.min(p1, p2), to: Math.max(p1, p2) };
169
+ }
170
+ });
171
+ return r;
172
+ }
173
+
174
+ function triggerSelectedEvent() {
175
+ var r = getSelection();
176
+
177
+ plot.getPlaceholder().trigger("plotselected", [ r ]);
178
+
179
+ // backwards-compat stuff, to be removed in future
180
+ if (r.xaxis && r.yaxis)
181
+ plot.getPlaceholder().trigger("selected", [ { x1: r.xaxis.from, y1: r.yaxis.from, x2: r.xaxis.to, y2: r.yaxis.to } ]);
182
+ }
183
+
184
+ function clamp(min, value, max) {
185
+ return value < min ? min: (value > max ? max: value);
186
+ }
187
+
188
+ function setSelectionPos(pos, e) {
189
+ var o = plot.getOptions();
190
+ var offset = plot.getPlaceholder().offset();
191
+ var plotOffset = plot.getPlotOffset();
192
+ pos.x = clamp(0, e.pageX - offset.left - plotOffset.left, plot.width());
193
+ pos.y = clamp(0, e.pageY - offset.top - plotOffset.top, plot.height());
194
+
195
+ if (o.selection.mode == "y")
196
+ pos.x = pos == selection.first ? 0 : plot.width();
197
+
198
+ if (o.selection.mode == "x")
199
+ pos.y = pos == selection.first ? 0 : plot.height();
200
+ }
201
+
202
+ function updateSelection(pos) {
203
+ if (pos.pageX == null)
204
+ return;
205
+
206
+ setSelectionPos(selection.second, pos);
207
+ if (selectionIsSane()) {
208
+ selection.show = true;
209
+ plot.triggerRedrawOverlay();
210
+ }
211
+ else
212
+ clearSelection(true);
213
+ }
214
+
215
+ function clearSelection(preventEvent) {
216
+ if (selection.show) {
217
+ selection.show = false;
218
+ plot.triggerRedrawOverlay();
219
+ if (!preventEvent)
220
+ plot.getPlaceholder().trigger("plotunselected", [ ]);
221
+ }
222
+ }
223
+
224
+ // function taken from markings support in Flot
225
+ function extractRange(ranges, coord) {
226
+ var axis, from, to, key, axes = plot.getAxes();
227
+
228
+ for (var k in axes) {
229
+ axis = axes[k];
230
+ if (axis.direction == coord) {
231
+ key = coord + axis.n + "axis";
232
+ if (!ranges[key] && axis.n == 1)
233
+ key = coord + "axis"; // support x1axis as xaxis
234
+ if (ranges[key]) {
235
+ from = ranges[key].from;
236
+ to = ranges[key].to;
237
+ break;
238
+ }
239
+ }
240
+ }
241
+
242
+ // backwards-compat stuff - to be removed in future
243
+ if (!ranges[key]) {
244
+ axis = coord == "x" ? plot.getXAxes()[0] : plot.getYAxes()[0];
245
+ from = ranges[coord + "1"];
246
+ to = ranges[coord + "2"];
247
+ }
248
+
249
+ // auto-reverse as an added bonus
250
+ if (from != null && to != null && from > to) {
251
+ var tmp = from;
252
+ from = to;
253
+ to = tmp;
254
+ }
255
+
256
+ return { from: from, to: to, axis: axis };
257
+ }
258
+
259
+ function setSelection(ranges, preventEvent) {
260
+ var axis, range, o = plot.getOptions();
261
+
262
+ if (o.selection.mode == "y") {
263
+ selection.first.x = 0;
264
+ selection.second.x = plot.width();
265
+ }
266
+ else {
267
+ range = extractRange(ranges, "x");
268
+
269
+ selection.first.x = range.axis.p2c(range.from);
270
+ selection.second.x = range.axis.p2c(range.to);
271
+ }
272
+
273
+ if (o.selection.mode == "x") {
274
+ selection.first.y = 0;
275
+ selection.second.y = plot.height();
276
+ }
277
+ else {
278
+ range = extractRange(ranges, "y");
279
+
280
+ selection.first.y = range.axis.p2c(range.from);
281
+ selection.second.y = range.axis.p2c(range.to);
282
+ }
283
+
284
+ selection.show = true;
285
+ plot.triggerRedrawOverlay();
286
+ if (!preventEvent && selectionIsSane())
287
+ triggerSelectedEvent();
288
+ }
289
+
290
+ function selectionIsSane() {
291
+ var minSize = plot.getOptions().selection.minSize;
292
+ return Math.abs(selection.second.x - selection.first.x) >= minSize &&
293
+ Math.abs(selection.second.y - selection.first.y) >= minSize;
294
+ }
295
+
296
+ plot.clearSelection = clearSelection;
297
+ plot.setSelection = setSelection;
298
+ plot.getSelection = getSelection;
299
+
300
+ plot.hooks.bindEvents.push(function(plot, eventHolder) {
301
+ var o = plot.getOptions();
302
+ if (o.selection.mode != null) {
303
+ eventHolder.mousemove(onMouseMove);
304
+ eventHolder.mousedown(onMouseDown);
305
+ }
306
+ });
307
+
308
+
309
+ plot.hooks.drawOverlay.push(function (plot, ctx) {
310
+ // draw selection
311
+ if (selection.show && selectionIsSane()) {
312
+ var plotOffset = plot.getPlotOffset();
313
+ var o = plot.getOptions();
314
+
315
+ ctx.save();
316
+ ctx.translate(plotOffset.left, plotOffset.top);
317
+
318
+ var c = $.color.parse(o.selection.color);
319
+
320
+ ctx.strokeStyle = c.scale('a', 0.8).toString();
321
+ ctx.lineWidth = 1;
322
+ ctx.lineJoin = o.selection.shape;
323
+ ctx.fillStyle = c.scale('a', 0.4).toString();
324
+
325
+ var x = Math.min(selection.first.x, selection.second.x) + 0.5,
326
+ y = Math.min(selection.first.y, selection.second.y) + 0.5,
327
+ w = Math.abs(selection.second.x - selection.first.x) - 1,
328
+ h = Math.abs(selection.second.y - selection.first.y) - 1;
329
+
330
+ ctx.fillRect(x, y, w, h);
331
+ ctx.strokeRect(x, y, w, h);
332
+
333
+ ctx.restore();
334
+ }
335
+ });
336
+
337
+ plot.hooks.shutdown.push(function (plot, eventHolder) {
338
+ eventHolder.unbind("mousemove", onMouseMove);
339
+ eventHolder.unbind("mousedown", onMouseDown);
340
+
341
+ if (mouseUpHandler)
342
+ $(document).unbind("mouseup", mouseUpHandler);
343
+ });
344
+
345
+ }
346
+
347
+ $.plot.plugins.push({
348
+ init: init,
349
+ options: {
350
+ selection: {
351
+ mode: null, // one of null, "x", "y" or "xy"
352
+ color: "#e8cfac",
353
+ shape: "round", // one of "round", "miter", or "bevel"
354
+ minSize: 5 // minimum number of pixels
355
+ }
356
+ },
357
+ name: 'selection',
358
+ version: '1.1'
359
+ });
360
+ })(jQuery);
@@ -0,0 +1 @@
1
+ (function($){function init(plot){var selection={first:{x:-1,y:-1},second:{x:-1,y:-1},show:false,active:false};var savedhandlers={};var mouseUpHandler=null;function onMouseMove(e){if(selection.active){updateSelection(e);plot.getPlaceholder().trigger("plotselecting",[getSelection()])}}function onMouseDown(e){if(e.which!=1)return;document.body.focus();if(document.onselectstart!==undefined&&savedhandlers.onselectstart==null){savedhandlers.onselectstart=document.onselectstart;document.onselectstart=function(){return false}}if(document.ondrag!==undefined&&savedhandlers.ondrag==null){savedhandlers.ondrag=document.ondrag;document.ondrag=function(){return false}}setSelectionPos(selection.first,e);selection.active=true;mouseUpHandler=function(e){onMouseUp(e)};$(document).one("mouseup",mouseUpHandler)}function onMouseUp(e){mouseUpHandler=null;if(document.onselectstart!==undefined)document.onselectstart=savedhandlers.onselectstart;if(document.ondrag!==undefined)document.ondrag=savedhandlers.ondrag;selection.active=false;updateSelection(e);if(selectionIsSane())triggerSelectedEvent();else{plot.getPlaceholder().trigger("plotunselected",[]);plot.getPlaceholder().trigger("plotselecting",[null])}return false}function getSelection(){if(!selectionIsSane())return null;if(!selection.show)return null;var r={},c1=selection.first,c2=selection.second;$.each(plot.getAxes(),function(name,axis){if(axis.used){var p1=axis.c2p(c1[axis.direction]),p2=axis.c2p(c2[axis.direction]);r[name]={from:Math.min(p1,p2),to:Math.max(p1,p2)}}});return r}function triggerSelectedEvent(){var r=getSelection();plot.getPlaceholder().trigger("plotselected",[r]);if(r.xaxis&&r.yaxis)plot.getPlaceholder().trigger("selected",[{x1:r.xaxis.from,y1:r.yaxis.from,x2:r.xaxis.to,y2:r.yaxis.to}])}function clamp(min,value,max){return value<min?min:value>max?max:value}function setSelectionPos(pos,e){var o=plot.getOptions();var offset=plot.getPlaceholder().offset();var plotOffset=plot.getPlotOffset();pos.x=clamp(0,e.pageX-offset.left-plotOffset.left,plot.width());pos.y=clamp(0,e.pageY-offset.top-plotOffset.top,plot.height());if(o.selection.mode=="y")pos.x=pos==selection.first?0:plot.width();if(o.selection.mode=="x")pos.y=pos==selection.first?0:plot.height()}function updateSelection(pos){if(pos.pageX==null)return;setSelectionPos(selection.second,pos);if(selectionIsSane()){selection.show=true;plot.triggerRedrawOverlay()}else clearSelection(true)}function clearSelection(preventEvent){if(selection.show){selection.show=false;plot.triggerRedrawOverlay();if(!preventEvent)plot.getPlaceholder().trigger("plotunselected",[])}}function extractRange(ranges,coord){var axis,from,to,key,axes=plot.getAxes();for(var k in axes){axis=axes[k];if(axis.direction==coord){key=coord+axis.n+"axis";if(!ranges[key]&&axis.n==1)key=coord+"axis";if(ranges[key]){from=ranges[key].from;to=ranges[key].to;break}}}if(!ranges[key]){axis=coord=="x"?plot.getXAxes()[0]:plot.getYAxes()[0];from=ranges[coord+"1"];to=ranges[coord+"2"]}if(from!=null&&to!=null&&from>to){var tmp=from;from=to;to=tmp}return{from:from,to:to,axis:axis}}function setSelection(ranges,preventEvent){var axis,range,o=plot.getOptions();if(o.selection.mode=="y"){selection.first.x=0;selection.second.x=plot.width()}else{range=extractRange(ranges,"x");selection.first.x=range.axis.p2c(range.from);selection.second.x=range.axis.p2c(range.to)}if(o.selection.mode=="x"){selection.first.y=0;selection.second.y=plot.height()}else{range=extractRange(ranges,"y");selection.first.y=range.axis.p2c(range.from);selection.second.y=range.axis.p2c(range.to)}selection.show=true;plot.triggerRedrawOverlay();if(!preventEvent&&selectionIsSane())triggerSelectedEvent()}function selectionIsSane(){var minSize=plot.getOptions().selection.minSize;return Math.abs(selection.second.x-selection.first.x)>=minSize&&Math.abs(selection.second.y-selection.first.y)>=minSize}plot.clearSelection=clearSelection;plot.setSelection=setSelection;plot.getSelection=getSelection;plot.hooks.bindEvents.push(function(plot,eventHolder){var o=plot.getOptions();if(o.selection.mode!=null){eventHolder.mousemove(onMouseMove);eventHolder.mousedown(onMouseDown)}});plot.hooks.drawOverlay.push(function(plot,ctx){if(selection.show&&selectionIsSane()){var plotOffset=plot.getPlotOffset();var o=plot.getOptions();ctx.save();ctx.translate(plotOffset.left,plotOffset.top);var c=$.color.parse(o.selection.color);ctx.strokeStyle=c.scale("a",.8).toString();ctx.lineWidth=1;ctx.lineJoin=o.selection.shape;ctx.fillStyle=c.scale("a",.4).toString();var x=Math.min(selection.first.x,selection.second.x)+.5,y=Math.min(selection.first.y,selection.second.y)+.5,w=Math.abs(selection.second.x-selection.first.x)-1,h=Math.abs(selection.second.y-selection.first.y)-1;ctx.fillRect(x,y,w,h);ctx.strokeRect(x,y,w,h);ctx.restore()}});plot.hooks.shutdown.push(function(plot,eventHolder){eventHolder.unbind("mousemove",onMouseMove);eventHolder.unbind("mousedown",onMouseDown);if(mouseUpHandler)$(document).unbind("mouseup",mouseUpHandler)})}$.plot.plugins.push({init:init,options:{selection:{mode:null,color:"#e8cfac",shape:"round",minSize:5}},name:"selection",version:"1.1"})})(jQuery);
@@ -0,0 +1,188 @@
1
+ /* Flot plugin for stacking data sets rather than overlyaing them.
2
+
3
+ Copyright (c) 2007-2013 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);
@@ -0,0 +1 @@
1
+ (function($){var options={series:{stack:null}};function init(plot){function findMatchingSeries(s,allseries){var res=null;for(var i=0;i<allseries.length;++i){if(s==allseries[i])break;if(allseries[i].stack==s.stack)res=allseries[i]}return res}function stackData(plot,s,datapoints){if(s.stack==null||s.stack===false)return;var other=findMatchingSeries(s,plot.getData());if(!other)return;var ps=datapoints.pointsize,points=datapoints.points,otherps=other.datapoints.pointsize,otherpoints=other.datapoints.points,newpoints=[],px,py,intery,qx,qy,bottom,withlines=s.lines.show,horizontal=s.bars.horizontal,withbottom=ps>2&&(horizontal?datapoints.format[2].x:datapoints.format[2].y),withsteps=withlines&&s.lines.steps,fromgap=true,keyOffset=horizontal?1:0,accumulateOffset=horizontal?0:1,i=0,j=0,l,m;while(true){if(i>=points.length)break;l=newpoints.length;if(points[i]==null){for(m=0;m<ps;++m)newpoints.push(points[i+m]);i+=ps}else if(j>=otherpoints.length){if(!withlines){for(m=0;m<ps;++m)newpoints.push(points[i+m])}i+=ps}else if(otherpoints[j]==null){for(m=0;m<ps;++m)newpoints.push(null);fromgap=true;j+=otherps}else{px=points[i+keyOffset];py=points[i+accumulateOffset];qx=otherpoints[j+keyOffset];qy=otherpoints[j+accumulateOffset];bottom=0;if(px==qx){for(m=0;m<ps;++m)newpoints.push(points[i+m]);newpoints[l+accumulateOffset]+=qy;bottom=qy;i+=ps;j+=otherps}else if(px>qx){if(withlines&&i>0&&points[i-ps]!=null){intery=py+(points[i-ps+accumulateOffset]-py)*(qx-px)/(points[i-ps+keyOffset]-px);newpoints.push(qx);newpoints.push(intery+qy);for(m=2;m<ps;++m)newpoints.push(points[i+m]);bottom=qy}j+=otherps}else{if(fromgap&&withlines){i+=ps;continue}for(m=0;m<ps;++m)newpoints.push(points[i+m]);if(withlines&&j>0&&otherpoints[j-otherps]!=null)bottom=qy+(otherpoints[j-otherps+accumulateOffset]-qy)*(px-qx)/(otherpoints[j-otherps+keyOffset]-qx);newpoints[l+accumulateOffset]+=bottom;i+=ps}fromgap=false;if(l!=newpoints.length&&withbottom)newpoints[l+2]+=bottom}if(withsteps&&l!=newpoints.length&&l>0&&newpoints[l]!=null&&newpoints[l]!=newpoints[l-ps]&&newpoints[l+1]!=newpoints[l-ps+1]){for(m=0;m<ps;++m)newpoints[l+ps+m]=newpoints[l+m];newpoints[l+1]=newpoints[l-ps+1]}}datapoints.points=newpoints}plot.hooks.processDatapoints.push(stackData)}$.plot.plugins.push({init:init,options:options,name:"stack",version:"1.2"})})(jQuery);