repsheet_visualizer 0.2.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (504) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/Gemfile.lock +8 -6
  4. data/lib/repsheet_visualizer/application/app.rb +51 -5
  5. data/lib/repsheet_visualizer/application/backend.rb +27 -0
  6. data/lib/repsheet_visualizer/application/public/fonts/FontAwesome.otf +0 -0
  7. data/lib/repsheet_visualizer/application/public/fonts/fontawesome-webfont.eot +0 -0
  8. data/lib/repsheet_visualizer/application/public/fonts/fontawesome-webfont.svg +414 -0
  9. data/lib/repsheet_visualizer/application/public/fonts/fontawesome-webfont.ttf +0 -0
  10. data/lib/repsheet_visualizer/application/public/fonts/fontawesome-webfont.woff +0 -0
  11. data/lib/repsheet_visualizer/application/public/fonts/glyphicons-halflings-regular.eot +0 -0
  12. data/lib/repsheet_visualizer/application/public/fonts/glyphicons-halflings-regular.svg +228 -0
  13. data/lib/repsheet_visualizer/application/public/fonts/glyphicons-halflings-regular.ttf +0 -0
  14. data/lib/repsheet_visualizer/application/public/fonts/glyphicons-halflings-regular.woff +0 -0
  15. data/lib/repsheet_visualizer/application/public/img/jquery/handle-vertical.png +0 -0
  16. data/lib/repsheet_visualizer/application/public/img/jquery/handle.png +0 -0
  17. data/lib/repsheet_visualizer/application/public/img/layout/sidebar-bg.png +0 -0
  18. data/lib/repsheet_visualizer/application/public/img/loaders/ajax-loader.gif +0 -0
  19. data/lib/repsheet_visualizer/application/public/img/photos/map.png +0 -0
  20. data/lib/repsheet_visualizer/application/public/js/App.js +372 -0
  21. data/lib/repsheet_visualizer/application/public/js/Login.js +17 -0
  22. data/lib/repsheet_visualizer/application/public/js/demos/buttons.js +7 -0
  23. data/lib/repsheet_visualizer/application/public/js/demos/calendar.js +142 -0
  24. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/area.js +73 -0
  25. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/chart1.js +77 -0
  26. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/chart2.js +70 -0
  27. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/chart3.js +71 -0
  28. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/chart4.js +69 -0
  29. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/donut.js +49 -0
  30. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/horizontal.js +56 -0
  31. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/line.js +76 -0
  32. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/pie.js +50 -0
  33. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/scatter.js +62 -0
  34. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/stacked-area.js +86 -0
  35. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/stacked-horizontal.js +60 -0
  36. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/stacked-vertical.js +75 -0
  37. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/vertical.js +70 -0
  38. data/lib/repsheet_visualizer/application/public/js/demos/charts/morris/area.js +28 -0
  39. data/lib/repsheet_visualizer/application/public/js/demos/charts/morris/bar.js +29 -0
  40. data/lib/repsheet_visualizer/application/public/js/demos/charts/morris/donut.js +26 -0
  41. data/lib/repsheet_visualizer/application/public/js/demos/charts/morris/line.js +30 -0
  42. data/lib/repsheet_visualizer/application/public/js/demos/dashboard.js +26 -0
  43. data/lib/repsheet_visualizer/application/public/js/demos/form-extended.js +61 -0
  44. data/lib/repsheet_visualizer/application/public/js/demos/popups.js +16 -0
  45. data/lib/repsheet_visualizer/application/public/js/demos/pricing.js +10 -0
  46. data/lib/repsheet_visualizer/application/public/js/demos/sliders.js +77 -0
  47. data/lib/repsheet_visualizer/application/public/js/libs/bootstrap.js +1999 -0
  48. data/lib/repsheet_visualizer/application/public/js/libs/bootstrap.min.js +6 -0
  49. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  50. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  51. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
  52. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  53. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  54. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  55. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  56. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  57. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  58. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  59. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
  60. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
  61. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
  62. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
  63. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/jquery-ui-1.9.2.custom.css +294 -0
  64. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/jquery-ui-1.9.2.custom.min.css +7 -0
  65. data/lib/repsheet_visualizer/application/public/js/libs/jquery-1.9.1.min.js +5 -0
  66. data/lib/repsheet_visualizer/application/public/js/libs/jquery-ui-1.9.2.custom.min.js +6 -0
  67. data/lib/repsheet_visualizer/application/public/js/libs/jquery.min.map +1 -0
  68. data/lib/repsheet_visualizer/application/public/js/libs/raphael-2.1.2.min.js +11 -0
  69. data/lib/repsheet_visualizer/application/public/js/plugins/autosize/jquery.autosize.min.js +7 -0
  70. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/DT_bootstrap.js +148 -0
  71. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/Sorting icons.psd +0 -0
  72. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/back_disabled.png +0 -0
  73. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/back_enabled.png +0 -0
  74. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/back_enabled_hover.png +0 -0
  75. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/datatable-row-openclose.png +0 -0
  76. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/favicon.ico +0 -0
  77. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/forward_disabled.png +0 -0
  78. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/forward_enabled.png +0 -0
  79. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/forward_enabled_hover.png +0 -0
  80. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/sort_asc.png +0 -0
  81. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/sort_asc_disabled.png +0 -0
  82. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/sort_both.png +0 -0
  83. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/sort_desc.png +0 -0
  84. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/sort_desc_disabled.png +0 -0
  85. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/jquery.dataTables.min.js +155 -0
  86. data/lib/repsheet_visualizer/application/public/js/plugins/datepicker/bootstrap-datepicker.js +1258 -0
  87. data/lib/repsheet_visualizer/application/public/js/plugins/datepicker/datepicker.css +481 -0
  88. data/lib/repsheet_visualizer/application/public/js/plugins/datepicker/less/datepicker.less +122 -0
  89. data/lib/repsheet_visualizer/application/public/js/plugins/fileupload/bootstrap-fileupload.css +132 -0
  90. data/lib/repsheet_visualizer/application/public/js/plugins/fileupload/bootstrap-fileupload.js +169 -0
  91. data/lib/repsheet_visualizer/application/public/js/plugins/fileupload/bootstrap-fileupload.min.css +31 -0
  92. data/lib/repsheet_visualizer/application/public/js/plugins/fileupload/bootstrap-fileupload.min.js +7 -0
  93. data/lib/repsheet_visualizer/application/public/js/plugins/flot/jquery.flot.js +2599 -0
  94. data/lib/repsheet_visualizer/application/public/js/plugins/flot/jquery.flot.orderBars.js +186 -0
  95. data/lib/repsheet_visualizer/application/public/js/plugins/flot/jquery.flot.pie.js +750 -0
  96. data/lib/repsheet_visualizer/application/public/js/plugins/flot/jquery.flot.resize.js +57 -0
  97. data/lib/repsheet_visualizer/application/public/js/plugins/flot/jquery.flot.stack.js +184 -0
  98. data/lib/repsheet_visualizer/application/public/js/plugins/flot/jquery.flot.tooltip.min.js +14 -0
  99. data/lib/repsheet_visualizer/application/public/js/plugins/fullcalendar/fullcalendar.css +589 -0
  100. data/lib/repsheet_visualizer/application/public/js/plugins/fullcalendar/fullcalendar.js +6110 -0
  101. data/lib/repsheet_visualizer/application/public/js/plugins/fullcalendar/fullcalendar.min.js +7 -0
  102. data/lib/repsheet_visualizer/application/public/js/plugins/fullcalendar/fullcalendar.print.css +32 -0
  103. data/lib/repsheet_visualizer/application/public/js/plugins/fullcalendar/gcal.js +107 -0
  104. data/lib/repsheet_visualizer/application/public/js/plugins/howl/howl.js +70 -0
  105. data/lib/repsheet_visualizer/application/public/js/plugins/howl/howl.min.js +2 -0
  106. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/jquery.icheck.js +462 -0
  107. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/jquery.icheck.min.js +11 -0
  108. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/all.css +61 -0
  109. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/_all.css +540 -0
  110. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/aero.css +54 -0
  111. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/aero.png +0 -0
  112. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/aero@2x.png +0 -0
  113. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/blue.css +54 -0
  114. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/blue.png +0 -0
  115. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/blue@2x.png +0 -0
  116. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/flat.css +54 -0
  117. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/flat.png +0 -0
  118. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/flat@2x.png +0 -0
  119. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/green.css +54 -0
  120. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/green.png +0 -0
  121. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/green@2x.png +0 -0
  122. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/grey.css +54 -0
  123. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/grey.png +0 -0
  124. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/grey@2x.png +0 -0
  125. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/orange.css +54 -0
  126. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/orange.png +0 -0
  127. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/orange@2x.png +0 -0
  128. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/pink.css +54 -0
  129. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/pink.png +0 -0
  130. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/pink@2x.png +0 -0
  131. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/purple.css +54 -0
  132. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/purple.png +0 -0
  133. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/purple@2x.png +0 -0
  134. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/red.css +54 -0
  135. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/red.png +0 -0
  136. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/red@2x.png +0 -0
  137. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/yellow.css +54 -0
  138. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/yellow.png +0 -0
  139. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/yellow@2x.png +0 -0
  140. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/futurico/futurico.css +54 -0
  141. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/futurico/futurico.png +0 -0
  142. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/futurico/futurico@2x.png +0 -0
  143. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/_all.css +740 -0
  144. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/aero.css +74 -0
  145. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/blue.css +74 -0
  146. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/green.css +74 -0
  147. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/grey.css +74 -0
  148. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/line.css +74 -0
  149. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/line.png +0 -0
  150. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/line@2x.png +0 -0
  151. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/orange.css +74 -0
  152. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/pink.css +74 -0
  153. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/purple.css +74 -0
  154. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/red.css +74 -0
  155. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/yellow.css +74 -0
  156. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/_all.css +600 -0
  157. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/aero.css +60 -0
  158. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/aero.png +0 -0
  159. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/aero@2x.png +0 -0
  160. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/blue.css +60 -0
  161. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/blue.png +0 -0
  162. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/blue@2x.png +0 -0
  163. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/green.css +60 -0
  164. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/green.png +0 -0
  165. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/green@2x.png +0 -0
  166. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/grey.css +60 -0
  167. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/grey.png +0 -0
  168. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/grey@2x.png +0 -0
  169. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/minimal.css +60 -0
  170. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/minimal.png +0 -0
  171. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/minimal@2x.png +0 -0
  172. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/orange.css +60 -0
  173. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/orange.png +0 -0
  174. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/orange@2x.png +0 -0
  175. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/pink.css +60 -0
  176. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/pink.png +0 -0
  177. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/pink@2x.png +0 -0
  178. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/purple.css +60 -0
  179. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/purple.png +0 -0
  180. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/purple@2x.png +0 -0
  181. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/red.css +60 -0
  182. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/red.png +0 -0
  183. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/red@2x.png +0 -0
  184. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/yellow.css +60 -0
  185. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/yellow.png +0 -0
  186. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/yellow@2x.png +0 -0
  187. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/polaris/polaris.css +60 -0
  188. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/polaris/polaris.png +0 -0
  189. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/polaris/polaris@2x.png +0 -0
  190. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/_all.css +600 -0
  191. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/aero.css +60 -0
  192. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/aero.png +0 -0
  193. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/aero@2x.png +0 -0
  194. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/blue.css +60 -0
  195. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/blue.png +0 -0
  196. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/blue@2x.png +0 -0
  197. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/green.css +60 -0
  198. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/green.png +0 -0
  199. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/green@2x.png +0 -0
  200. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/grey.css +60 -0
  201. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/grey.png +0 -0
  202. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/grey@2x.png +0 -0
  203. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/orange.css +60 -0
  204. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/orange.png +0 -0
  205. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/orange@2x.png +0 -0
  206. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/pink.css +60 -0
  207. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/pink.png +0 -0
  208. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/pink@2x.png +0 -0
  209. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/purple.css +60 -0
  210. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/purple.png +0 -0
  211. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/purple@2x.png +0 -0
  212. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/red.css +60 -0
  213. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/red.png +0 -0
  214. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/red@2x.png +0 -0
  215. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/square.css +60 -0
  216. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/square.png +0 -0
  217. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/square@2x.png +0 -0
  218. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/yellow.css +60 -0
  219. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/yellow.png +0 -0
  220. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/yellow@2x.png +0 -0
  221. data/lib/repsheet_visualizer/application/public/js/plugins/magnific/jquery.magnific-popup.js +2026 -0
  222. data/lib/repsheet_visualizer/application/public/js/plugins/magnific/jquery.magnific-popup.min.js +4 -0
  223. data/lib/repsheet_visualizer/application/public/js/plugins/magnific/magnific-popup.css +396 -0
  224. data/lib/repsheet_visualizer/application/public/js/plugins/morris/morris.css +1 -0
  225. data/lib/repsheet_visualizer/application/public/js/plugins/morris/morris.min.js +1 -0
  226. data/lib/repsheet_visualizer/application/public/js/plugins/parsley/parsley.js +1363 -0
  227. data/lib/repsheet_visualizer/application/public/js/plugins/select2/select2-spinner.gif +0 -0
  228. data/lib/repsheet_visualizer/application/public/js/plugins/select2/select2.css +615 -0
  229. data/lib/repsheet_visualizer/application/public/js/plugins/select2/select2.js +3217 -0
  230. data/lib/repsheet_visualizer/application/public/js/plugins/select2/select2.min.js +22 -0
  231. data/lib/repsheet_visualizer/application/public/js/plugins/select2/select2.png +0 -0
  232. data/lib/repsheet_visualizer/application/public/js/plugins/select2/select2x2.png +0 -0
  233. data/lib/repsheet_visualizer/application/public/js/plugins/simplecolorpicker/jquery.simplecolorpicker.css +98 -0
  234. data/lib/repsheet_visualizer/application/public/js/plugins/simplecolorpicker/jquery.simplecolorpicker.js +211 -0
  235. data/lib/repsheet_visualizer/application/public/js/plugins/sparkline/jquery.sparkline.min.js +5 -0
  236. data/lib/repsheet_visualizer/application/public/js/plugins/tableCheckable/jquery.tableCheckable.js +122 -0
  237. data/lib/repsheet_visualizer/application/public/js/plugins/textarea-counter/jquery.textarea-counter.js +163 -0
  238. data/lib/repsheet_visualizer/application/public/js/plugins/timepicker/bootstrap-timepicker.css +121 -0
  239. data/lib/repsheet_visualizer/application/public/js/plugins/timepicker/bootstrap-timepicker.js +893 -0
  240. data/lib/repsheet_visualizer/application/public/stylesheets/App.css +3436 -0
  241. data/lib/repsheet_visualizer/application/public/stylesheets/Login.css +88 -0
  242. data/lib/repsheet_visualizer/application/public/stylesheets/bootstrap.min.css +9 -0
  243. data/lib/repsheet_visualizer/application/public/stylesheets/custom.css +0 -0
  244. data/lib/repsheet_visualizer/application/public/stylesheets/font-awesome.min.css +395 -0
  245. data/lib/repsheet_visualizer/application/views/actor.erb +169 -0
  246. data/lib/repsheet_visualizer/application/views/blacklist.erb +105 -0
  247. data/lib/repsheet_visualizer/application/views/index.erb +188 -0
  248. data/lib/repsheet_visualizer/application/views/layout.erb +73 -0
  249. data/lib/repsheet_visualizer/application/views/suspects.erb +105 -0
  250. data/lib/repsheet_visualizer/application/views/whitelist.erb +90 -78
  251. data/lib/repsheet_visualizer/application/views/worldview.erb +84 -78
  252. data/lib/repsheet_visualizer/version.rb +1 -1
  253. data/redesign/404.html +446 -0
  254. data/redesign/500.html +453 -0
  255. data/redesign/actor.html +237 -0
  256. data/redesign/blacklist.html +274 -0
  257. data/redesign/css/App.css +3436 -0
  258. data/redesign/css/Login.css +88 -0
  259. data/redesign/css/bootstrap.min.css +9 -0
  260. data/redesign/css/custom.css +0 -0
  261. data/redesign/css/font-awesome.min.css +395 -0
  262. data/redesign/fonts/FontAwesome.otf +0 -0
  263. data/redesign/fonts/fontawesome-webfont.eot +0 -0
  264. data/redesign/fonts/fontawesome-webfont.svg +414 -0
  265. data/redesign/fonts/fontawesome-webfont.ttf +0 -0
  266. data/redesign/fonts/fontawesome-webfont.woff +0 -0
  267. data/redesign/fonts/glyphicons-halflings-regular.eot +0 -0
  268. data/redesign/fonts/glyphicons-halflings-regular.svg +228 -0
  269. data/redesign/fonts/glyphicons-halflings-regular.ttf +0 -0
  270. data/redesign/fonts/glyphicons-halflings-regular.woff +0 -0
  271. data/redesign/img/jquery/handle-vertical.png +0 -0
  272. data/redesign/img/jquery/handle.png +0 -0
  273. data/redesign/img/layout/sidebar-bg.png +0 -0
  274. data/redesign/img/loaders/ajax-loader.gif +0 -0
  275. data/redesign/img/photos/map.png +0 -0
  276. data/redesign/index.html +333 -0
  277. data/redesign/js/App.js +372 -0
  278. data/redesign/js/Login.js +17 -0
  279. data/redesign/js/demos/buttons.js +7 -0
  280. data/redesign/js/demos/calendar.js +142 -0
  281. data/redesign/js/demos/charts/flot/area.js +73 -0
  282. data/redesign/js/demos/charts/flot/chart1.js +77 -0
  283. data/redesign/js/demos/charts/flot/chart2.js +70 -0
  284. data/redesign/js/demos/charts/flot/chart3.js +71 -0
  285. data/redesign/js/demos/charts/flot/chart4.js +69 -0
  286. data/redesign/js/demos/charts/flot/donut.js +49 -0
  287. data/redesign/js/demos/charts/flot/horizontal.js +56 -0
  288. data/redesign/js/demos/charts/flot/line.js +76 -0
  289. data/redesign/js/demos/charts/flot/pie.js +50 -0
  290. data/redesign/js/demos/charts/flot/scatter.js +62 -0
  291. data/redesign/js/demos/charts/flot/stacked-area.js +86 -0
  292. data/redesign/js/demos/charts/flot/stacked-horizontal.js +60 -0
  293. data/redesign/js/demos/charts/flot/stacked-vertical.js +75 -0
  294. data/redesign/js/demos/charts/flot/vertical.js +70 -0
  295. data/redesign/js/demos/charts/morris/area.js +28 -0
  296. data/redesign/js/demos/charts/morris/bar.js +29 -0
  297. data/redesign/js/demos/charts/morris/donut.js +26 -0
  298. data/redesign/js/demos/charts/morris/line.js +30 -0
  299. data/redesign/js/demos/dashboard.js +26 -0
  300. data/redesign/js/demos/form-extended.js +61 -0
  301. data/redesign/js/demos/popups.js +16 -0
  302. data/redesign/js/demos/pricing.js +10 -0
  303. data/redesign/js/demos/sliders.js +77 -0
  304. data/redesign/js/libs/bootstrap.js +1999 -0
  305. data/redesign/js/libs/bootstrap.min.js +6 -0
  306. data/redesign/js/libs/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  307. data/redesign/js/libs/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  308. data/redesign/js/libs/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
  309. data/redesign/js/libs/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  310. data/redesign/js/libs/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  311. data/redesign/js/libs/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  312. data/redesign/js/libs/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  313. data/redesign/js/libs/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  314. data/redesign/js/libs/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  315. data/redesign/js/libs/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  316. data/redesign/js/libs/css/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
  317. data/redesign/js/libs/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
  318. data/redesign/js/libs/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
  319. data/redesign/js/libs/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
  320. data/redesign/js/libs/css/ui-lightness/jquery-ui-1.9.2.custom.css +294 -0
  321. data/redesign/js/libs/css/ui-lightness/jquery-ui-1.9.2.custom.min.css +7 -0
  322. data/redesign/js/libs/jquery-1.9.1.min.js +5 -0
  323. data/redesign/js/libs/jquery-ui-1.9.2.custom.min.js +6 -0
  324. data/redesign/js/libs/jquery.min.map +1 -0
  325. data/redesign/js/libs/raphael-2.1.2.min.js +11 -0
  326. data/redesign/js/plugins/autosize/jquery.autosize.min.js +7 -0
  327. data/redesign/js/plugins/datatables/DT_bootstrap.js +148 -0
  328. data/redesign/js/plugins/datatables/img/Sorting icons.psd +0 -0
  329. data/redesign/js/plugins/datatables/img/back_disabled.png +0 -0
  330. data/redesign/js/plugins/datatables/img/back_enabled.png +0 -0
  331. data/redesign/js/plugins/datatables/img/back_enabled_hover.png +0 -0
  332. data/redesign/js/plugins/datatables/img/datatable-row-openclose.png +0 -0
  333. data/redesign/js/plugins/datatables/img/favicon.ico +0 -0
  334. data/redesign/js/plugins/datatables/img/forward_disabled.png +0 -0
  335. data/redesign/js/plugins/datatables/img/forward_enabled.png +0 -0
  336. data/redesign/js/plugins/datatables/img/forward_enabled_hover.png +0 -0
  337. data/redesign/js/plugins/datatables/img/sort_asc.png +0 -0
  338. data/redesign/js/plugins/datatables/img/sort_asc_disabled.png +0 -0
  339. data/redesign/js/plugins/datatables/img/sort_both.png +0 -0
  340. data/redesign/js/plugins/datatables/img/sort_desc.png +0 -0
  341. data/redesign/js/plugins/datatables/img/sort_desc_disabled.png +0 -0
  342. data/redesign/js/plugins/datatables/jquery.dataTables.min.js +155 -0
  343. data/redesign/js/plugins/datepicker/bootstrap-datepicker.js +1258 -0
  344. data/redesign/js/plugins/datepicker/datepicker.css +481 -0
  345. data/redesign/js/plugins/datepicker/less/datepicker.less +122 -0
  346. data/redesign/js/plugins/fileupload/bootstrap-fileupload.css +132 -0
  347. data/redesign/js/plugins/fileupload/bootstrap-fileupload.js +169 -0
  348. data/redesign/js/plugins/fileupload/bootstrap-fileupload.min.css +31 -0
  349. data/redesign/js/plugins/fileupload/bootstrap-fileupload.min.js +7 -0
  350. data/redesign/js/plugins/flot/jquery.flot.js +2599 -0
  351. data/redesign/js/plugins/flot/jquery.flot.orderBars.js +186 -0
  352. data/redesign/js/plugins/flot/jquery.flot.pie.js +750 -0
  353. data/redesign/js/plugins/flot/jquery.flot.resize.js +57 -0
  354. data/redesign/js/plugins/flot/jquery.flot.stack.js +184 -0
  355. data/redesign/js/plugins/flot/jquery.flot.tooltip.min.js +14 -0
  356. data/redesign/js/plugins/fullcalendar/fullcalendar.css +589 -0
  357. data/redesign/js/plugins/fullcalendar/fullcalendar.js +6110 -0
  358. data/redesign/js/plugins/fullcalendar/fullcalendar.min.js +7 -0
  359. data/redesign/js/plugins/fullcalendar/fullcalendar.print.css +32 -0
  360. data/redesign/js/plugins/fullcalendar/gcal.js +107 -0
  361. data/redesign/js/plugins/howl/howl.js +70 -0
  362. data/redesign/js/plugins/howl/howl.min.js +2 -0
  363. data/redesign/js/plugins/icheck/jquery.icheck.js +462 -0
  364. data/redesign/js/plugins/icheck/jquery.icheck.min.js +11 -0
  365. data/redesign/js/plugins/icheck/skins/all.css +61 -0
  366. data/redesign/js/plugins/icheck/skins/flat/_all.css +540 -0
  367. data/redesign/js/plugins/icheck/skins/flat/aero.css +54 -0
  368. data/redesign/js/plugins/icheck/skins/flat/aero.png +0 -0
  369. data/redesign/js/plugins/icheck/skins/flat/aero@2x.png +0 -0
  370. data/redesign/js/plugins/icheck/skins/flat/blue.css +54 -0
  371. data/redesign/js/plugins/icheck/skins/flat/blue.png +0 -0
  372. data/redesign/js/plugins/icheck/skins/flat/blue@2x.png +0 -0
  373. data/redesign/js/plugins/icheck/skins/flat/flat.css +54 -0
  374. data/redesign/js/plugins/icheck/skins/flat/flat.png +0 -0
  375. data/redesign/js/plugins/icheck/skins/flat/flat@2x.png +0 -0
  376. data/redesign/js/plugins/icheck/skins/flat/green.css +54 -0
  377. data/redesign/js/plugins/icheck/skins/flat/green.png +0 -0
  378. data/redesign/js/plugins/icheck/skins/flat/green@2x.png +0 -0
  379. data/redesign/js/plugins/icheck/skins/flat/grey.css +54 -0
  380. data/redesign/js/plugins/icheck/skins/flat/grey.png +0 -0
  381. data/redesign/js/plugins/icheck/skins/flat/grey@2x.png +0 -0
  382. data/redesign/js/plugins/icheck/skins/flat/orange.css +54 -0
  383. data/redesign/js/plugins/icheck/skins/flat/orange.png +0 -0
  384. data/redesign/js/plugins/icheck/skins/flat/orange@2x.png +0 -0
  385. data/redesign/js/plugins/icheck/skins/flat/pink.css +54 -0
  386. data/redesign/js/plugins/icheck/skins/flat/pink.png +0 -0
  387. data/redesign/js/plugins/icheck/skins/flat/pink@2x.png +0 -0
  388. data/redesign/js/plugins/icheck/skins/flat/purple.css +54 -0
  389. data/redesign/js/plugins/icheck/skins/flat/purple.png +0 -0
  390. data/redesign/js/plugins/icheck/skins/flat/purple@2x.png +0 -0
  391. data/redesign/js/plugins/icheck/skins/flat/red.css +54 -0
  392. data/redesign/js/plugins/icheck/skins/flat/red.png +0 -0
  393. data/redesign/js/plugins/icheck/skins/flat/red@2x.png +0 -0
  394. data/redesign/js/plugins/icheck/skins/flat/yellow.css +54 -0
  395. data/redesign/js/plugins/icheck/skins/flat/yellow.png +0 -0
  396. data/redesign/js/plugins/icheck/skins/flat/yellow@2x.png +0 -0
  397. data/redesign/js/plugins/icheck/skins/futurico/futurico.css +54 -0
  398. data/redesign/js/plugins/icheck/skins/futurico/futurico.png +0 -0
  399. data/redesign/js/plugins/icheck/skins/futurico/futurico@2x.png +0 -0
  400. data/redesign/js/plugins/icheck/skins/line/_all.css +740 -0
  401. data/redesign/js/plugins/icheck/skins/line/aero.css +74 -0
  402. data/redesign/js/plugins/icheck/skins/line/blue.css +74 -0
  403. data/redesign/js/plugins/icheck/skins/line/green.css +74 -0
  404. data/redesign/js/plugins/icheck/skins/line/grey.css +74 -0
  405. data/redesign/js/plugins/icheck/skins/line/line.css +74 -0
  406. data/redesign/js/plugins/icheck/skins/line/line.png +0 -0
  407. data/redesign/js/plugins/icheck/skins/line/line@2x.png +0 -0
  408. data/redesign/js/plugins/icheck/skins/line/orange.css +74 -0
  409. data/redesign/js/plugins/icheck/skins/line/pink.css +74 -0
  410. data/redesign/js/plugins/icheck/skins/line/purple.css +74 -0
  411. data/redesign/js/plugins/icheck/skins/line/red.css +74 -0
  412. data/redesign/js/plugins/icheck/skins/line/yellow.css +74 -0
  413. data/redesign/js/plugins/icheck/skins/minimal/_all.css +600 -0
  414. data/redesign/js/plugins/icheck/skins/minimal/aero.css +60 -0
  415. data/redesign/js/plugins/icheck/skins/minimal/aero.png +0 -0
  416. data/redesign/js/plugins/icheck/skins/minimal/aero@2x.png +0 -0
  417. data/redesign/js/plugins/icheck/skins/minimal/blue.css +60 -0
  418. data/redesign/js/plugins/icheck/skins/minimal/blue.png +0 -0
  419. data/redesign/js/plugins/icheck/skins/minimal/blue@2x.png +0 -0
  420. data/redesign/js/plugins/icheck/skins/minimal/green.css +60 -0
  421. data/redesign/js/plugins/icheck/skins/minimal/green.png +0 -0
  422. data/redesign/js/plugins/icheck/skins/minimal/green@2x.png +0 -0
  423. data/redesign/js/plugins/icheck/skins/minimal/grey.css +60 -0
  424. data/redesign/js/plugins/icheck/skins/minimal/grey.png +0 -0
  425. data/redesign/js/plugins/icheck/skins/minimal/grey@2x.png +0 -0
  426. data/redesign/js/plugins/icheck/skins/minimal/minimal.css +60 -0
  427. data/redesign/js/plugins/icheck/skins/minimal/minimal.png +0 -0
  428. data/redesign/js/plugins/icheck/skins/minimal/minimal@2x.png +0 -0
  429. data/redesign/js/plugins/icheck/skins/minimal/orange.css +60 -0
  430. data/redesign/js/plugins/icheck/skins/minimal/orange.png +0 -0
  431. data/redesign/js/plugins/icheck/skins/minimal/orange@2x.png +0 -0
  432. data/redesign/js/plugins/icheck/skins/minimal/pink.css +60 -0
  433. data/redesign/js/plugins/icheck/skins/minimal/pink.png +0 -0
  434. data/redesign/js/plugins/icheck/skins/minimal/pink@2x.png +0 -0
  435. data/redesign/js/plugins/icheck/skins/minimal/purple.css +60 -0
  436. data/redesign/js/plugins/icheck/skins/minimal/purple.png +0 -0
  437. data/redesign/js/plugins/icheck/skins/minimal/purple@2x.png +0 -0
  438. data/redesign/js/plugins/icheck/skins/minimal/red.css +60 -0
  439. data/redesign/js/plugins/icheck/skins/minimal/red.png +0 -0
  440. data/redesign/js/plugins/icheck/skins/minimal/red@2x.png +0 -0
  441. data/redesign/js/plugins/icheck/skins/minimal/yellow.css +60 -0
  442. data/redesign/js/plugins/icheck/skins/minimal/yellow.png +0 -0
  443. data/redesign/js/plugins/icheck/skins/minimal/yellow@2x.png +0 -0
  444. data/redesign/js/plugins/icheck/skins/polaris/polaris.css +60 -0
  445. data/redesign/js/plugins/icheck/skins/polaris/polaris.png +0 -0
  446. data/redesign/js/plugins/icheck/skins/polaris/polaris@2x.png +0 -0
  447. data/redesign/js/plugins/icheck/skins/square/_all.css +600 -0
  448. data/redesign/js/plugins/icheck/skins/square/aero.css +60 -0
  449. data/redesign/js/plugins/icheck/skins/square/aero.png +0 -0
  450. data/redesign/js/plugins/icheck/skins/square/aero@2x.png +0 -0
  451. data/redesign/js/plugins/icheck/skins/square/blue.css +60 -0
  452. data/redesign/js/plugins/icheck/skins/square/blue.png +0 -0
  453. data/redesign/js/plugins/icheck/skins/square/blue@2x.png +0 -0
  454. data/redesign/js/plugins/icheck/skins/square/green.css +60 -0
  455. data/redesign/js/plugins/icheck/skins/square/green.png +0 -0
  456. data/redesign/js/plugins/icheck/skins/square/green@2x.png +0 -0
  457. data/redesign/js/plugins/icheck/skins/square/grey.css +60 -0
  458. data/redesign/js/plugins/icheck/skins/square/grey.png +0 -0
  459. data/redesign/js/plugins/icheck/skins/square/grey@2x.png +0 -0
  460. data/redesign/js/plugins/icheck/skins/square/orange.css +60 -0
  461. data/redesign/js/plugins/icheck/skins/square/orange.png +0 -0
  462. data/redesign/js/plugins/icheck/skins/square/orange@2x.png +0 -0
  463. data/redesign/js/plugins/icheck/skins/square/pink.css +60 -0
  464. data/redesign/js/plugins/icheck/skins/square/pink.png +0 -0
  465. data/redesign/js/plugins/icheck/skins/square/pink@2x.png +0 -0
  466. data/redesign/js/plugins/icheck/skins/square/purple.css +60 -0
  467. data/redesign/js/plugins/icheck/skins/square/purple.png +0 -0
  468. data/redesign/js/plugins/icheck/skins/square/purple@2x.png +0 -0
  469. data/redesign/js/plugins/icheck/skins/square/red.css +60 -0
  470. data/redesign/js/plugins/icheck/skins/square/red.png +0 -0
  471. data/redesign/js/plugins/icheck/skins/square/red@2x.png +0 -0
  472. data/redesign/js/plugins/icheck/skins/square/square.css +60 -0
  473. data/redesign/js/plugins/icheck/skins/square/square.png +0 -0
  474. data/redesign/js/plugins/icheck/skins/square/square@2x.png +0 -0
  475. data/redesign/js/plugins/icheck/skins/square/yellow.css +60 -0
  476. data/redesign/js/plugins/icheck/skins/square/yellow.png +0 -0
  477. data/redesign/js/plugins/icheck/skins/square/yellow@2x.png +0 -0
  478. data/redesign/js/plugins/magnific/jquery.magnific-popup.js +2026 -0
  479. data/redesign/js/plugins/magnific/jquery.magnific-popup.min.js +4 -0
  480. data/redesign/js/plugins/magnific/magnific-popup.css +396 -0
  481. data/redesign/js/plugins/morris/morris.css +1 -0
  482. data/redesign/js/plugins/morris/morris.min.js +1 -0
  483. data/redesign/js/plugins/parsley/parsley.js +1363 -0
  484. data/redesign/js/plugins/select2/select2-spinner.gif +0 -0
  485. data/redesign/js/plugins/select2/select2.css +615 -0
  486. data/redesign/js/plugins/select2/select2.js +3217 -0
  487. data/redesign/js/plugins/select2/select2.min.js +22 -0
  488. data/redesign/js/plugins/select2/select2.png +0 -0
  489. data/redesign/js/plugins/select2/select2x2.png +0 -0
  490. data/redesign/js/plugins/simplecolorpicker/jquery.simplecolorpicker.css +98 -0
  491. data/redesign/js/plugins/simplecolorpicker/jquery.simplecolorpicker.js +211 -0
  492. data/redesign/js/plugins/sparkline/jquery.sparkline.min.js +5 -0
  493. data/redesign/js/plugins/tableCheckable/jquery.tableCheckable.js +122 -0
  494. data/redesign/js/plugins/textarea-counter/jquery.textarea-counter.js +163 -0
  495. data/redesign/js/plugins/timepicker/bootstrap-timepicker.css +121 -0
  496. data/redesign/js/plugins/timepicker/bootstrap-timepicker.js +893 -0
  497. data/redesign/page-blank.html +417 -0
  498. data/redesign/suspects.html +273 -0
  499. data/redesign/whitelist.html +273 -0
  500. data/repsheet_visualizer.gemspec +1 -0
  501. data/script/fill +2 -0
  502. metadata +508 -5
  503. data/lib/repsheet_visualizer/application/views/activity.erb +0 -74
  504. data/lib/repsheet_visualizer/application/views/actors.erb +0 -130
@@ -0,0 +1,186 @@
1
+ /*
2
+ * Flot plugin to order bars side by side.
3
+ *
4
+ * Released under the MIT license by Benjamin BUFFET, 20-Sep-2010.
5
+ *
6
+ * This plugin is an alpha version.
7
+ *
8
+ * To activate the plugin you must specify the parameter "order" for the specific serie :
9
+ *
10
+ * $.plot($("#placeholder"), [{ data: [ ... ], bars :{ order = null or integer }])
11
+ *
12
+ * If 2 series have the same order param, they are ordered by the position in the array;
13
+ *
14
+ * The plugin adjust the point by adding a value depanding of the barwidth
15
+ * Exemple for 3 series (barwidth : 0.1) :
16
+ *
17
+ * first bar d�calage : -0.15
18
+ * second bar d�calage : -0.05
19
+ * third bar d�calage : 0.05
20
+ *
21
+ */
22
+
23
+ (function($){
24
+ function init(plot){
25
+ var orderedBarSeries;
26
+ var nbOfBarsToOrder;
27
+ var borderWidth;
28
+ var borderWidthInXabsWidth;
29
+ var pixelInXWidthEquivalent = 1;
30
+ var isHorizontal = false;
31
+
32
+ /*
33
+ * This method add shift to x values
34
+ */
35
+ function reOrderBars(plot, serie, datapoints){
36
+ var shiftedPoints = null;
37
+
38
+ if(serieNeedToBeReordered(serie)){
39
+ checkIfGraphIsHorizontal(serie);
40
+ calculPixel2XWidthConvert(plot);
41
+ retrieveBarSeries(plot);
42
+ calculBorderAndBarWidth(serie);
43
+
44
+ if(nbOfBarsToOrder >= 2){
45
+ var position = findPosition(serie);
46
+ var decallage = 0;
47
+
48
+ var centerBarShift = calculCenterBarShift();
49
+
50
+ if (isBarAtLeftOfCenter(position)){
51
+ decallage = -1*(sumWidth(orderedBarSeries,position-1,Math.floor(nbOfBarsToOrder / 2)-1)) - centerBarShift;
52
+ }else{
53
+ decallage = sumWidth(orderedBarSeries,Math.ceil(nbOfBarsToOrder / 2),position-2) + centerBarShift + borderWidthInXabsWidth*2;
54
+ }
55
+
56
+ shiftedPoints = shiftPoints(datapoints,serie,decallage);
57
+ datapoints.points = shiftedPoints;
58
+ }
59
+ }
60
+ return shiftedPoints;
61
+ }
62
+
63
+ function serieNeedToBeReordered(serie){
64
+ return serie.bars != null
65
+ && serie.bars.show
66
+ && serie.bars.order != null;
67
+ }
68
+
69
+ function calculPixel2XWidthConvert(plot){
70
+ var gridDimSize = isHorizontal ? plot.getPlaceholder().innerHeight() : plot.getPlaceholder().innerWidth();
71
+ var minMaxValues = isHorizontal ? getAxeMinMaxValues(plot.getData(),1) : getAxeMinMaxValues(plot.getData(),0);
72
+ var AxeSize = minMaxValues[1] - minMaxValues[0];
73
+ pixelInXWidthEquivalent = AxeSize / gridDimSize;
74
+ }
75
+
76
+ function getAxeMinMaxValues(series,AxeIdx){
77
+ var minMaxValues = new Array();
78
+ for(var i = 0; i < series.length; i++){
79
+ minMaxValues[0] = series[i].data[0][AxeIdx];
80
+ minMaxValues[1] = series[i].data[series[i].data.length - 1][AxeIdx];
81
+ }
82
+ return minMaxValues;
83
+ }
84
+
85
+ function retrieveBarSeries(plot){
86
+ orderedBarSeries = findOthersBarsToReOrders(plot.getData());
87
+ nbOfBarsToOrder = orderedBarSeries.length;
88
+ }
89
+
90
+ function findOthersBarsToReOrders(series){
91
+ var retSeries = new Array();
92
+
93
+ for(var i = 0; i < series.length; i++){
94
+ if(series[i].bars.order != null && series[i].bars.show){
95
+ retSeries.push(series[i]);
96
+ }
97
+ }
98
+
99
+ return retSeries.sort(sortByOrder);
100
+ }
101
+
102
+ function sortByOrder(serie1,serie2){
103
+ var x = serie1.bars.order;
104
+ var y = serie2.bars.order;
105
+ return ((x < y) ? -1 : ((x > y) ? 1 : 0));
106
+ }
107
+
108
+ function calculBorderAndBarWidth(serie){
109
+ borderWidth = serie.bars.lineWidth ? serie.bars.lineWidth : 2;
110
+ borderWidthInXabsWidth = borderWidth * pixelInXWidthEquivalent;
111
+ }
112
+
113
+ function checkIfGraphIsHorizontal(serie){
114
+ if(serie.bars.horizontal){
115
+ isHorizontal = true;
116
+ }
117
+ }
118
+
119
+ function findPosition(serie){
120
+ var pos = 0
121
+ for (var i = 0; i < orderedBarSeries.length; ++i) {
122
+ if (serie == orderedBarSeries[i]){
123
+ pos = i;
124
+ break;
125
+ }
126
+ }
127
+
128
+ return pos+1;
129
+ }
130
+
131
+ function calculCenterBarShift(){
132
+ var width = 0;
133
+
134
+ if(nbOfBarsToOrder%2 != 0)
135
+ width = (orderedBarSeries[Math.ceil(nbOfBarsToOrder / 2)].bars.barWidth)/2;
136
+
137
+ return width;
138
+ }
139
+
140
+ function isBarAtLeftOfCenter(position){
141
+ return position <= Math.ceil(nbOfBarsToOrder / 2);
142
+ }
143
+
144
+ function sumWidth(series,start,end){
145
+ var totalWidth = 0;
146
+
147
+ for(var i = start; i <= end; i++){
148
+ totalWidth += series[i].bars.barWidth+borderWidthInXabsWidth*2;
149
+ }
150
+
151
+ return totalWidth;
152
+ }
153
+
154
+ function shiftPoints(datapoints,serie,dx){
155
+ var ps = datapoints.pointsize;
156
+ var points = datapoints.points;
157
+ var j = 0;
158
+ for(var i = isHorizontal ? 1 : 0;i < points.length; i += ps){
159
+ points[i] += dx;
160
+ //Adding the new x value in the serie to be abble to display the right tooltip value,
161
+ //using the index 3 to not overide the third index.
162
+ serie.data[j][3] = points[i];
163
+ j++;
164
+ }
165
+
166
+ return points;
167
+ }
168
+
169
+ plot.hooks.processDatapoints.push(reOrderBars);
170
+
171
+ }
172
+
173
+ var options = {
174
+ series : {
175
+ bars: {order: null} // or number/string
176
+ }
177
+ };
178
+
179
+ $.plot.plugins.push({
180
+ init: init,
181
+ options: options,
182
+ name: "orderBars",
183
+ version: "0.2"
184
+ });
185
+
186
+ })(jQuery)
@@ -0,0 +1,750 @@
1
+ /*
2
+ Flot plugin for rendering pie charts. The plugin assumes the data is
3
+ coming is as a single data value for each series, and each of those
4
+ values is a positive value or zero (negative numbers don't make
5
+ any sense and will cause strange effects). The data values do
6
+ NOT need to be passed in as percentage values because it
7
+ internally calculates the total and percentages.
8
+
9
+ * Created by Brian Medendorp, June 2009
10
+ * Updated November 2009 with contributions from: btburnett3, Anthony Aragues and Xavi Ivars
11
+
12
+ * Changes:
13
+ 2009-10-22: lineJoin set to round
14
+ 2009-10-23: IE full circle fix, donut
15
+ 2009-11-11: Added basic hover from btburnett3 - does not work in IE, and center is off in Chrome and Opera
16
+ 2009-11-17: Added IE hover capability submitted by Anthony Aragues
17
+ 2009-11-18: Added bug fix submitted by Xavi Ivars (issues with arrays when other JS libraries are included as well)
18
+
19
+
20
+ Available options are:
21
+ series: {
22
+ pie: {
23
+ show: true/false
24
+ radius: 0-1 for percentage of fullsize, or a specified pixel length, or 'auto'
25
+ innerRadius: 0-1 for percentage of fullsize or a specified pixel length, for creating a donut effect
26
+ startAngle: 0-2 factor of PI used for starting angle (in radians) i.e 3/2 starts at the top, 0 and 2 have the same result
27
+ tilt: 0-1 for percentage to tilt the pie, where 1 is no tilt, and 0 is completely flat (nothing will show)
28
+ offset: {
29
+ top: integer value to move the pie up or down
30
+ left: integer value to move the pie left or right, or 'auto'
31
+ },
32
+ stroke: {
33
+ color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#FFF')
34
+ width: integer pixel width of the stroke
35
+ },
36
+ label: {
37
+ show: true/false, or 'auto'
38
+ formatter: a user-defined function that modifies the text/style of the label text
39
+ radius: 0-1 for percentage of fullsize, or a specified pixel length
40
+ background: {
41
+ color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#000')
42
+ opacity: 0-1
43
+ },
44
+ threshold: 0-1 for the percentage value at which to hide labels (if they're too small)
45
+ },
46
+ combine: {
47
+ threshold: 0-1 for the percentage value at which to combine slices (if they're too small)
48
+ color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#CCC'), if null, the plugin will automatically use the color of the first slice to be combined
49
+ label: any text value of what the combined slice should be labeled
50
+ }
51
+ highlight: {
52
+ opacity: 0-1
53
+ }
54
+ }
55
+ }
56
+
57
+ More detail and specific examples can be found in the included HTML file.
58
+
59
+ */
60
+
61
+ (function ($)
62
+ {
63
+ function init(plot) // this is the "body" of the plugin
64
+ {
65
+ var canvas = null;
66
+ var target = null;
67
+ var maxRadius = null;
68
+ var centerLeft = null;
69
+ var centerTop = null;
70
+ var total = 0;
71
+ var redraw = true;
72
+ var redrawAttempts = 10;
73
+ var shrink = 0.95;
74
+ var legendWidth = 0;
75
+ var processed = false;
76
+ var raw = false;
77
+
78
+ // interactive variables
79
+ var highlights = [];
80
+
81
+ // add hook to determine if pie plugin in enabled, and then perform necessary operations
82
+ plot.hooks.processOptions.push(checkPieEnabled);
83
+ plot.hooks.bindEvents.push(bindEvents);
84
+
85
+ // check to see if the pie plugin is enabled
86
+ function checkPieEnabled(plot, options)
87
+ {
88
+ if (options.series.pie.show)
89
+ {
90
+ //disable grid
91
+ options.grid.show = false;
92
+
93
+ // set labels.show
94
+ if (options.series.pie.label.show=='auto')
95
+ if (options.legend.show)
96
+ options.series.pie.label.show = false;
97
+ else
98
+ options.series.pie.label.show = true;
99
+
100
+ // set radius
101
+ if (options.series.pie.radius=='auto')
102
+ if (options.series.pie.label.show)
103
+ options.series.pie.radius = 3/4;
104
+ else
105
+ options.series.pie.radius = 1;
106
+
107
+ // ensure sane tilt
108
+ if (options.series.pie.tilt>1)
109
+ options.series.pie.tilt=1;
110
+ if (options.series.pie.tilt<0)
111
+ options.series.pie.tilt=0;
112
+
113
+ // add processData hook to do transformations on the data
114
+ plot.hooks.processDatapoints.push(processDatapoints);
115
+ plot.hooks.drawOverlay.push(drawOverlay);
116
+
117
+ // add draw hook
118
+ plot.hooks.draw.push(draw);
119
+ }
120
+ }
121
+
122
+ // bind hoverable events
123
+ function bindEvents(plot, eventHolder)
124
+ {
125
+ var options = plot.getOptions();
126
+
127
+ if (options.series.pie.show && options.grid.hoverable)
128
+ eventHolder.unbind('mousemove').mousemove(onMouseMove);
129
+
130
+ if (options.series.pie.show && options.grid.clickable)
131
+ eventHolder.unbind('click').click(onClick);
132
+ }
133
+
134
+
135
+ // debugging function that prints out an object
136
+ function alertObject(obj)
137
+ {
138
+ var msg = '';
139
+ function traverse(obj, depth)
140
+ {
141
+ if (!depth)
142
+ depth = 0;
143
+ for (var i = 0; i < obj.length; ++i)
144
+ {
145
+ for (var j=0; j<depth; j++)
146
+ msg += '\t';
147
+
148
+ if( typeof obj[i] == "object")
149
+ { // its an object
150
+ msg += ''+i+':\n';
151
+ traverse(obj[i], depth+1);
152
+ }
153
+ else
154
+ { // its a value
155
+ msg += ''+i+': '+obj[i]+'\n';
156
+ }
157
+ }
158
+ }
159
+ traverse(obj);
160
+ alert(msg);
161
+ }
162
+
163
+ function calcTotal(data)
164
+ {
165
+ for (var i = 0; i < data.length; ++i)
166
+ {
167
+ var item = parseFloat(data[i].data[0][1]);
168
+ if (item)
169
+ total += item;
170
+ }
171
+ }
172
+
173
+ function processDatapoints(plot, series, data, datapoints)
174
+ {
175
+ if (!processed)
176
+ {
177
+ processed = true;
178
+
179
+ canvas = plot.getCanvas();
180
+ target = $(canvas).parent();
181
+ options = plot.getOptions();
182
+
183
+ plot.setData(combine(plot.getData()));
184
+ }
185
+ }
186
+
187
+ function setupPie()
188
+ {
189
+ legendWidth = target.children().filter('.legend').children().width();
190
+
191
+ // calculate maximum radius and center point
192
+ maxRadius = Math.min(canvas.width,(canvas.height/options.series.pie.tilt))/2;
193
+ centerTop = (canvas.height/2)+options.series.pie.offset.top;
194
+ centerLeft = (canvas.width/2);
195
+
196
+ if (options.series.pie.offset.left=='auto')
197
+ if (options.legend.position.match('w'))
198
+ centerLeft += legendWidth/2;
199
+ else
200
+ centerLeft -= legendWidth/2;
201
+ else
202
+ centerLeft += options.series.pie.offset.left;
203
+
204
+ if (centerLeft<maxRadius)
205
+ centerLeft = maxRadius;
206
+ else if (centerLeft>canvas.width-maxRadius)
207
+ centerLeft = canvas.width-maxRadius;
208
+ }
209
+
210
+ function fixData(data)
211
+ {
212
+ for (var i = 0; i < data.length; ++i)
213
+ {
214
+ if (typeof(data[i].data)=='number')
215
+ data[i].data = [[1,data[i].data]];
216
+ else if (typeof(data[i].data)=='undefined' || typeof(data[i].data[0])=='undefined')
217
+ {
218
+ if (typeof(data[i].data)!='undefined' && typeof(data[i].data.label)!='undefined')
219
+ data[i].label = data[i].data.label; // fix weirdness coming from flot
220
+ data[i].data = [[1,0]];
221
+
222
+ }
223
+ }
224
+ return data;
225
+ }
226
+
227
+ function combine(data)
228
+ {
229
+ data = fixData(data);
230
+ calcTotal(data);
231
+ var combined = 0;
232
+ var numCombined = 0;
233
+ var color = options.series.pie.combine.color;
234
+
235
+ var newdata = [];
236
+ for (var i = 0; i < data.length; ++i)
237
+ {
238
+ // make sure its a number
239
+ data[i].data[0][1] = parseFloat(data[i].data[0][1]);
240
+ if (!data[i].data[0][1])
241
+ data[i].data[0][1] = 0;
242
+
243
+ if (data[i].data[0][1]/total<=options.series.pie.combine.threshold)
244
+ {
245
+ combined += data[i].data[0][1];
246
+ numCombined++;
247
+ if (!color)
248
+ color = data[i].color;
249
+ }
250
+ else
251
+ {
252
+ newdata.push({
253
+ data: [[1,data[i].data[0][1]]],
254
+ color: data[i].color,
255
+ label: data[i].label,
256
+ angle: (data[i].data[0][1]*(Math.PI*2))/total,
257
+ percent: (data[i].data[0][1]/total*100)
258
+ });
259
+ }
260
+ }
261
+ if (numCombined>0)
262
+ newdata.push({
263
+ data: [[1,combined]],
264
+ color: color,
265
+ label: options.series.pie.combine.label,
266
+ angle: (combined*(Math.PI*2))/total,
267
+ percent: (combined/total*100)
268
+ });
269
+ return newdata;
270
+ }
271
+
272
+ function draw(plot, newCtx)
273
+ {
274
+ if (!target) return; // if no series were passed
275
+ ctx = newCtx;
276
+
277
+ setupPie();
278
+ var slices = plot.getData();
279
+
280
+ var attempts = 0;
281
+ while (redraw && attempts<redrawAttempts)
282
+ {
283
+ redraw = false;
284
+ if (attempts>0)
285
+ maxRadius *= shrink;
286
+ attempts += 1;
287
+ clear();
288
+ if (options.series.pie.tilt<=0.8)
289
+ drawShadow();
290
+ drawPie();
291
+ }
292
+ if (attempts >= redrawAttempts) {
293
+ clear();
294
+ target.prepend('<div class="error">Could not draw pie with labels contained inside canvas</div>');
295
+ }
296
+
297
+ if ( plot.setSeries && plot.insertLegend )
298
+ {
299
+ plot.setSeries(slices);
300
+ plot.insertLegend();
301
+ }
302
+
303
+ // we're actually done at this point, just defining internal functions at this point
304
+
305
+ function clear()
306
+ {
307
+ ctx.clearRect(0,0,canvas.width,canvas.height);
308
+ target.children().filter('.pieLabel, .pieLabelBackground').remove();
309
+ }
310
+
311
+ function drawShadow()
312
+ {
313
+ var shadowLeft = 5;
314
+ var shadowTop = 15;
315
+ var edge = 10;
316
+ var alpha = 0.02;
317
+
318
+ // set radius
319
+ if (options.series.pie.radius>1)
320
+ var radius = options.series.pie.radius;
321
+ else
322
+ var radius = maxRadius * options.series.pie.radius;
323
+
324
+ if (radius>=(canvas.width/2)-shadowLeft || radius*options.series.pie.tilt>=(canvas.height/2)-shadowTop || radius<=edge)
325
+ return; // shadow would be outside canvas, so don't draw it
326
+
327
+ ctx.save();
328
+ ctx.translate(shadowLeft,shadowTop);
329
+ ctx.globalAlpha = alpha;
330
+ ctx.fillStyle = '#000';
331
+
332
+ // center and rotate to starting position
333
+ ctx.translate(centerLeft,centerTop);
334
+ ctx.scale(1, options.series.pie.tilt);
335
+
336
+ //radius -= edge;
337
+ for (var i=1; i<=edge; i++)
338
+ {
339
+ ctx.beginPath();
340
+ ctx.arc(0,0,radius,0,Math.PI*2,false);
341
+ ctx.fill();
342
+ radius -= i;
343
+ }
344
+
345
+ ctx.restore();
346
+ }
347
+
348
+ function drawPie()
349
+ {
350
+ startAngle = Math.PI*options.series.pie.startAngle;
351
+
352
+ // set radius
353
+ if (options.series.pie.radius>1)
354
+ var radius = options.series.pie.radius;
355
+ else
356
+ var radius = maxRadius * options.series.pie.radius;
357
+
358
+ // center and rotate to starting position
359
+ ctx.save();
360
+ ctx.translate(centerLeft,centerTop);
361
+ ctx.scale(1, options.series.pie.tilt);
362
+ //ctx.rotate(startAngle); // start at top; -- This doesn't work properly in Opera
363
+
364
+ // draw slices
365
+ ctx.save();
366
+ var currentAngle = startAngle;
367
+ for (var i = 0; i < slices.length; ++i)
368
+ {
369
+ slices[i].startAngle = currentAngle;
370
+ drawSlice(slices[i].angle, slices[i].color, true);
371
+ }
372
+ ctx.restore();
373
+
374
+ // draw slice outlines
375
+ ctx.save();
376
+ ctx.lineWidth = options.series.pie.stroke.width;
377
+ currentAngle = startAngle;
378
+ for (var i = 0; i < slices.length; ++i)
379
+ drawSlice(slices[i].angle, options.series.pie.stroke.color, false);
380
+ ctx.restore();
381
+
382
+ // draw donut hole
383
+ drawDonutHole(ctx);
384
+
385
+ // draw labels
386
+ if (options.series.pie.label.show)
387
+ drawLabels();
388
+
389
+ // restore to original state
390
+ ctx.restore();
391
+
392
+ function drawSlice(angle, color, fill)
393
+ {
394
+ if (angle<=0)
395
+ return;
396
+
397
+ if (fill)
398
+ ctx.fillStyle = color;
399
+ else
400
+ {
401
+ ctx.strokeStyle = color;
402
+ ctx.lineJoin = 'round';
403
+ }
404
+
405
+ ctx.beginPath();
406
+ if (Math.abs(angle - Math.PI*2) > 0.000000001)
407
+ ctx.moveTo(0,0); // Center of the pie
408
+ else if ($.browser.msie)
409
+ angle -= 0.0001;
410
+ //ctx.arc(0,0,radius,0,angle,false); // This doesn't work properly in Opera
411
+ ctx.arc(0,0,radius,currentAngle,currentAngle+angle,false);
412
+ ctx.closePath();
413
+ //ctx.rotate(angle); // This doesn't work properly in Opera
414
+ currentAngle += angle;
415
+
416
+ if (fill)
417
+ ctx.fill();
418
+ else
419
+ ctx.stroke();
420
+ }
421
+
422
+ function drawLabels()
423
+ {
424
+ var currentAngle = startAngle;
425
+
426
+ // set radius
427
+ if (options.series.pie.label.radius>1)
428
+ var radius = options.series.pie.label.radius;
429
+ else
430
+ var radius = maxRadius * options.series.pie.label.radius;
431
+
432
+ for (var i = 0; i < slices.length; ++i)
433
+ {
434
+ if (slices[i].percent >= options.series.pie.label.threshold*100)
435
+ drawLabel(slices[i], currentAngle, i);
436
+ currentAngle += slices[i].angle;
437
+ }
438
+
439
+ function drawLabel(slice, startAngle, index)
440
+ {
441
+ if (slice.data[0][1]==0)
442
+ return;
443
+
444
+ // format label text
445
+ var lf = options.legend.labelFormatter, text, plf = options.series.pie.label.formatter;
446
+ if (lf)
447
+ text = lf(slice.label, slice);
448
+ else
449
+ text = slice.label;
450
+ if (plf)
451
+ text = plf(text, slice);
452
+
453
+ var halfAngle = ((startAngle+slice.angle) + startAngle)/2;
454
+ var x = centerLeft + Math.round(Math.cos(halfAngle) * radius);
455
+ var y = centerTop + Math.round(Math.sin(halfAngle) * radius) * options.series.pie.tilt;
456
+
457
+ var html = '<span class="pieLabel" id="pieLabel'+index+'" style="position:absolute;top:' + y + 'px;left:' + x + 'px;">' + text + "</span>";
458
+ target.append(html);
459
+ var label = target.children('#pieLabel'+index);
460
+ var labelTop = (y - label.height()/2);
461
+ var labelLeft = (x - label.width()/2);
462
+ label.css('top', labelTop);
463
+ label.css('left', labelLeft);
464
+
465
+ // check to make sure that the label is not outside the canvas
466
+ if (0-labelTop>0 || 0-labelLeft>0 || canvas.height-(labelTop+label.height())<0 || canvas.width-(labelLeft+label.width())<0)
467
+ redraw = true;
468
+
469
+ if (options.series.pie.label.background.opacity != 0) {
470
+ // put in the transparent background separately to avoid blended labels and label boxes
471
+ var c = options.series.pie.label.background.color;
472
+ if (c == null) {
473
+ c = slice.color;
474
+ }
475
+ var pos = 'top:'+labelTop+'px;left:'+labelLeft+'px;';
476
+ $('<div class="pieLabelBackground" style="position:absolute;width:' + label.width() + 'px;height:' + label.height() + 'px;' + pos +'background-color:' + c + ';"> </div>').insertBefore(label).css('opacity', options.series.pie.label.background.opacity);
477
+ }
478
+ } // end individual label function
479
+ } // end drawLabels function
480
+ } // end drawPie function
481
+ } // end draw function
482
+
483
+ // Placed here because it needs to be accessed from multiple locations
484
+ function drawDonutHole(layer)
485
+ {
486
+ // draw donut hole
487
+ if(options.series.pie.innerRadius > 0)
488
+ {
489
+ // subtract the center
490
+ layer.save();
491
+ innerRadius = options.series.pie.innerRadius > 1 ? options.series.pie.innerRadius : maxRadius * options.series.pie.innerRadius;
492
+ layer.globalCompositeOperation = 'destination-out'; // this does not work with excanvas, but it will fall back to using the stroke color
493
+ layer.beginPath();
494
+ layer.fillStyle = options.series.pie.stroke.color;
495
+ layer.arc(0,0,innerRadius,0,Math.PI*2,false);
496
+ layer.fill();
497
+ layer.closePath();
498
+ layer.restore();
499
+
500
+ // add inner stroke
501
+ layer.save();
502
+ layer.beginPath();
503
+ layer.strokeStyle = options.series.pie.stroke.color;
504
+ layer.arc(0,0,innerRadius,0,Math.PI*2,false);
505
+ layer.stroke();
506
+ layer.closePath();
507
+ layer.restore();
508
+ // TODO: add extra shadow inside hole (with a mask) if the pie is tilted.
509
+ }
510
+ }
511
+
512
+ //-- Additional Interactive related functions --
513
+
514
+ function isPointInPoly(poly, pt)
515
+ {
516
+ for(var c = false, i = -1, l = poly.length, j = l - 1; ++i < l; j = i)
517
+ ((poly[i][1] <= pt[1] && pt[1] < poly[j][1]) || (poly[j][1] <= pt[1] && pt[1]< poly[i][1]))
518
+ && (pt[0] < (poly[j][0] - poly[i][0]) * (pt[1] - poly[i][1]) / (poly[j][1] - poly[i][1]) + poly[i][0])
519
+ && (c = !c);
520
+ return c;
521
+ }
522
+
523
+ function findNearbySlice(mouseX, mouseY)
524
+ {
525
+ var slices = plot.getData(),
526
+ options = plot.getOptions(),
527
+ radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius;
528
+
529
+ for (var i = 0; i < slices.length; ++i)
530
+ {
531
+ var s = slices[i];
532
+
533
+ if(s.pie.show)
534
+ {
535
+ ctx.save();
536
+ ctx.beginPath();
537
+ ctx.moveTo(0,0); // Center of the pie
538
+ //ctx.scale(1, options.series.pie.tilt); // this actually seems to break everything when here.
539
+ ctx.arc(0,0,radius,s.startAngle,s.startAngle+s.angle,false);
540
+ ctx.closePath();
541
+ x = mouseX-centerLeft;
542
+ y = mouseY-centerTop;
543
+ if(ctx.isPointInPath)
544
+ {
545
+ if (ctx.isPointInPath(mouseX-centerLeft, mouseY-centerTop))
546
+ {
547
+ //alert('found slice!');
548
+ ctx.restore();
549
+ return {datapoint: [s.percent, s.data], dataIndex: 0, series: s, seriesIndex: i};
550
+ }
551
+ }
552
+ else
553
+ {
554
+ // excanvas for IE doesn;t support isPointInPath, this is a workaround.
555
+ p1X = (radius * Math.cos(s.startAngle));
556
+ p1Y = (radius * Math.sin(s.startAngle));
557
+ p2X = (radius * Math.cos(s.startAngle+(s.angle/4)));
558
+ p2Y = (radius * Math.sin(s.startAngle+(s.angle/4)));
559
+ p3X = (radius * Math.cos(s.startAngle+(s.angle/2)));
560
+ p3Y = (radius * Math.sin(s.startAngle+(s.angle/2)));
561
+ p4X = (radius * Math.cos(s.startAngle+(s.angle/1.5)));
562
+ p4Y = (radius * Math.sin(s.startAngle+(s.angle/1.5)));
563
+ p5X = (radius * Math.cos(s.startAngle+s.angle));
564
+ p5Y = (radius * Math.sin(s.startAngle+s.angle));
565
+ arrPoly = [[0,0],[p1X,p1Y],[p2X,p2Y],[p3X,p3Y],[p4X,p4Y],[p5X,p5Y]];
566
+ arrPoint = [x,y];
567
+ // TODO: perhaps do some mathmatical trickery here with the Y-coordinate to compensate for pie tilt?
568
+ if(isPointInPoly(arrPoly, arrPoint))
569
+ {
570
+ ctx.restore();
571
+ return {datapoint: [s.percent, s.data], dataIndex: 0, series: s, seriesIndex: i};
572
+ }
573
+ }
574
+ ctx.restore();
575
+ }
576
+ }
577
+
578
+ return null;
579
+ }
580
+
581
+ function onMouseMove(e)
582
+ {
583
+ triggerClickHoverEvent('plothover', e);
584
+ }
585
+
586
+ function onClick(e)
587
+ {
588
+ triggerClickHoverEvent('plotclick', e);
589
+ }
590
+
591
+ // trigger click or hover event (they send the same parameters so we share their code)
592
+ function triggerClickHoverEvent(eventname, e)
593
+ {
594
+ var offset = plot.offset(),
595
+ canvasX = parseInt(e.pageX - offset.left),
596
+ canvasY = parseInt(e.pageY - offset.top),
597
+ item = findNearbySlice(canvasX, canvasY);
598
+
599
+ if (options.grid.autoHighlight)
600
+ {
601
+ // clear auto-highlights
602
+ for (var i = 0; i < highlights.length; ++i)
603
+ {
604
+ var h = highlights[i];
605
+ if (h.auto == eventname && !(item && h.series == item.series))
606
+ unhighlight(h.series);
607
+ }
608
+ }
609
+
610
+ // highlight the slice
611
+ if (item)
612
+ highlight(item.series, eventname);
613
+
614
+ // trigger any hover bind events
615
+ var pos = { pageX: e.pageX, pageY: e.pageY };
616
+ target.trigger(eventname, [ pos, item ]);
617
+ }
618
+
619
+ function highlight(s, auto)
620
+ {
621
+ if (typeof s == "number")
622
+ s = series[s];
623
+
624
+ var i = indexOfHighlight(s);
625
+ if (i == -1)
626
+ {
627
+ highlights.push({ series: s, auto: auto });
628
+ plot.triggerRedrawOverlay();
629
+ }
630
+ else if (!auto)
631
+ highlights[i].auto = false;
632
+ }
633
+
634
+ function unhighlight(s)
635
+ {
636
+ if (s == null)
637
+ {
638
+ highlights = [];
639
+ plot.triggerRedrawOverlay();
640
+ }
641
+
642
+ if (typeof s == "number")
643
+ s = series[s];
644
+
645
+ var i = indexOfHighlight(s);
646
+ if (i != -1)
647
+ {
648
+ highlights.splice(i, 1);
649
+ plot.triggerRedrawOverlay();
650
+ }
651
+ }
652
+
653
+ function indexOfHighlight(s)
654
+ {
655
+ for (var i = 0; i < highlights.length; ++i)
656
+ {
657
+ var h = highlights[i];
658
+ if (h.series == s)
659
+ return i;
660
+ }
661
+ return -1;
662
+ }
663
+
664
+ function drawOverlay(plot, octx)
665
+ {
666
+ //alert(options.series.pie.radius);
667
+ var options = plot.getOptions();
668
+ //alert(options.series.pie.radius);
669
+
670
+ var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius;
671
+
672
+ octx.save();
673
+ octx.translate(centerLeft, centerTop);
674
+ octx.scale(1, options.series.pie.tilt);
675
+
676
+ for (i = 0; i < highlights.length; ++i)
677
+ drawHighlight(highlights[i].series);
678
+
679
+ drawDonutHole(octx);
680
+
681
+ octx.restore();
682
+
683
+ function drawHighlight(series)
684
+ {
685
+ if (series.angle < 0) return;
686
+
687
+ //octx.fillStyle = parseColor(options.series.pie.highlight.color).scale(null, null, null, options.series.pie.highlight.opacity).toString();
688
+ octx.fillStyle = "rgba(255, 255, 255, "+options.series.pie.highlight.opacity+")"; // this is temporary until we have access to parseColor
689
+
690
+ octx.beginPath();
691
+ if (Math.abs(series.angle - Math.PI*2) > 0.000000001)
692
+ octx.moveTo(0,0); // Center of the pie
693
+ octx.arc(0,0,radius,series.startAngle,series.startAngle+series.angle,false);
694
+ octx.closePath();
695
+ octx.fill();
696
+ }
697
+
698
+ }
699
+
700
+ } // end init (plugin body)
701
+
702
+ // define pie specific options and their default values
703
+ var options = {
704
+ series: {
705
+ pie: {
706
+ show: false,
707
+ radius: 'auto', // actual radius of the visible pie (based on full calculated radius if <=1, or hard pixel value)
708
+ innerRadius:0, /* for donut */
709
+ startAngle: 3/2,
710
+ tilt: 1,
711
+ offset: {
712
+ top: 0,
713
+ left: 'auto'
714
+ },
715
+ stroke: {
716
+ color: '#FFF',
717
+ width: 1
718
+ },
719
+ label: {
720
+ show: 'auto',
721
+ formatter: function(label, slice){
722
+ return '<div style="font-size:x-small;text-align:center;padding:2px;color:'+slice.color+';">'+label+'<br/>'+Math.round(slice.percent)+'%</div>';
723
+ }, // formatter function
724
+ radius: 1, // radius at which to place the labels (based on full calculated radius if <=1, or hard pixel value)
725
+ background: {
726
+ color: null,
727
+ opacity: 0
728
+ },
729
+ threshold: 0 // percentage at which to hide the label (i.e. the slice is too narrow)
730
+ },
731
+ combine: {
732
+ threshold: -1, // percentage at which to combine little slices into one larger slice
733
+ color: null, // color to give the new slice (auto-generated if null)
734
+ label: 'Other' // label to give the new slice
735
+ },
736
+ highlight: {
737
+ //color: '#FFF', // will add this functionality once parseColor is available
738
+ opacity: 0.5
739
+ }
740
+ }
741
+ }
742
+ };
743
+
744
+ $.plot.plugins.push({
745
+ init: init,
746
+ options: options,
747
+ name: "pie",
748
+ version: "1.0"
749
+ });
750
+ })(jQuery);