bookyt 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (357) hide show
  1. data/app/assets/images/16x16/add.png +0 -0
  2. data/app/assets/images/16x16/alert.png +0 -0
  3. data/app/assets/images/16x16/combolink.png +0 -0
  4. data/app/assets/images/16x16/copy.png +0 -0
  5. data/app/assets/images/16x16/delete.png +0 -0
  6. data/app/assets/images/16x16/edit.png +0 -0
  7. data/app/assets/images/16x16/filter.png +0 -0
  8. data/app/assets/images/16x16/index.png +0 -0
  9. data/app/assets/images/16x16/notice.png +0 -0
  10. data/app/assets/images/16x16/pdf.png +0 -0
  11. data/app/assets/images/16x16/print.png +0 -0
  12. data/app/assets/images/16x16/show.png +0 -0
  13. data/app/assets/images/22x22/arrow-right.png +0 -0
  14. data/app/assets/images/22x22/edit.png +0 -0
  15. data/app/assets/images/22x22/insert_booking.png +0 -0
  16. data/app/assets/images/22x22/remove.png +0 -0
  17. data/app/assets/images/32x32/edit.png +0 -0
  18. data/app/assets/images/32x32/remove.png +0 -0
  19. data/app/assets/images/48x48/accounting.png +0 -0
  20. data/app/assets/images/48x48/basic_claims_data.png +0 -0
  21. data/app/assets/images/48x48/contacts.png +0 -0
  22. data/app/assets/images/48x48/invoicing.png +0 -0
  23. data/app/assets/images/48x48/nav_users.png +0 -0
  24. data/app/assets/images/48x48/settings.png +0 -0
  25. data/app/assets/images/48x48/store.png +0 -0
  26. data/app/assets/images/button_bg.png +0 -0
  27. data/app/assets/images/crystal-icons/16x16/filter.png +0 -0
  28. data/app/assets/images/down.png +0 -0
  29. data/app/assets/images/favicon.ico +0 -0
  30. data/app/assets/images/flavour-extended/48x48/invoice.png +0 -0
  31. data/app/assets/images/free-business-desktop-icons/48x48/business.png +0 -0
  32. data/app/assets/images/gnome-web-icons/48x48/Gnome-X-Office-Address-Book-48.png +0 -0
  33. data/app/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  34. data/app/assets/images/jquery-ui/ui-bg_flat_55_fbec88_40x100.png +0 -0
  35. data/app/assets/images/jquery-ui/ui-bg_glass_75_759fcf_1x400.png +0 -0
  36. data/app/assets/images/jquery-ui/ui-bg_glass_85_aeb9cf_1x400.png +0 -0
  37. data/app/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  38. data/app/assets/images/jquery-ui/ui-bg_gloss-wave_55_aeb9cf_500x100.png +0 -0
  39. data/app/assets/images/jquery-ui/ui-bg_inset-hard_100_759fcf_1x100.png +0 -0
  40. data/app/assets/images/jquery-ui/ui-bg_inset-hard_100_f6f6f6_1x100.png +0 -0
  41. data/app/assets/images/jquery-ui/ui-icons_217bc0_256x240.png +0 -0
  42. data/app/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
  43. data/app/assets/images/jquery-ui/ui-icons_469bdd_256x240.png +0 -0
  44. data/app/assets/images/jquery-ui/ui-icons_6da8d5_256x240.png +0 -0
  45. data/app/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
  46. data/app/assets/images/jquery-ui/ui-icons_d8e7f3_256x240.png +0 -0
  47. data/app/assets/images/jquery-ui/ui-icons_f9bd01_256x240.png +0 -0
  48. data/app/assets/images/jquery/tooltip/black_arrow.png +0 -0
  49. data/app/assets/images/letter-logo.alpha.png +0 -0
  50. data/app/assets/images/letter-logo.big.png +0 -0
  51. data/app/assets/images/letter-logo.orig.png +0 -0
  52. data/app/assets/images/letter-logo.png +0 -0
  53. data/app/assets/images/loading.gif +0 -0
  54. data/app/assets/images/logo.png +0 -0
  55. data/app/assets/images/oxygen-icons/16x16/application-pdf.png +0 -0
  56. data/app/assets/images/oxygen-icons/16x16/document-preview.png +0 -0
  57. data/app/assets/images/oxygen-icons/16x16/document-print.png +0 -0
  58. data/app/assets/images/oxygen-icons/16x16/edit-copy.png +0 -0
  59. data/app/assets/images/oxygen-icons/16x16/go-next.png +0 -0
  60. data/app/assets/images/oxygen-icons/16x16/mail-mark-notjunk.png +0 -0
  61. data/app/assets/images/oxygen-icons/16x16/status_unknown.png +0 -0
  62. data/app/assets/images/oxygen-icons/48x48/system-users.png +0 -0
  63. data/app/assets/images/rails.png +0 -0
  64. data/app/assets/images/up.png +0 -0
  65. data/app/assets/javascripts/application.js +49 -0
  66. data/app/assets/javascripts/cyt.js +86 -0
  67. data/app/assets/javascripts/jquery-ui.js +11437 -0
  68. data/app/assets/javascripts/jquery.dirtyform.js +242 -0
  69. data/app/assets/javascripts/jquery.form.js +785 -0
  70. data/app/assets/javascripts/jquery.js +8936 -0
  71. data/app/assets/javascripts/jquery.meio.mask.js +683 -0
  72. data/app/assets/javascripts/jquery.remotipart.js +46 -0
  73. data/app/assets/javascripts/jquery.ui.combobox.js +77 -0
  74. data/app/assets/javascripts/jquery_ujs.js +316 -0
  75. data/app/assets/javascripts/nested_form.js +51 -0
  76. data/app/assets/javascripts/tooltip.js +343 -0
  77. data/app/assets/stylesheets/.gitkeep +0 -0
  78. data/app/assets/stylesheets/ie.scss +16 -0
  79. data/app/assets/stylesheets/ie6.scss +4 -0
  80. data/app/assets/stylesheets/partials/_base.sass +39 -0
  81. data/app/assets/stylesheets/partials/_content.sass +60 -0
  82. data/app/assets/stylesheets/partials/_jquery.sass +2 -0
  83. data/app/assets/stylesheets/partials/_layout.sass +21 -0
  84. data/app/assets/stylesheets/partials/_sidebar.sass +5 -0
  85. data/app/assets/stylesheets/partials/content/_accounting.sass +41 -0
  86. data/app/assets/stylesheets/partials/content/_ajax_indicator.sass +28 -0
  87. data/app/assets/stylesheets/partials/content/_app.sass +43 -0
  88. data/app/assets/stylesheets/partials/content/_combobox.sass +8 -0
  89. data/app/assets/stylesheets/partials/content/_cyt.sass +200 -0
  90. data/app/assets/stylesheets/partials/content/_fancy_buttons.sass +10 -0
  91. data/app/assets/stylesheets/partials/content/_flash_errors.sass +46 -0
  92. data/app/assets/stylesheets/partials/content/_form_view.sass +20 -0
  93. data/app/assets/stylesheets/partials/content/_icons.sass +35 -0
  94. data/app/assets/stylesheets/partials/content/_invoice.sass +6 -0
  95. data/app/assets/stylesheets/partials/content/_overview.sass +40 -0
  96. data/app/assets/stylesheets/partials/content/_pagination.sass +61 -0
  97. data/app/assets/stylesheets/partials/content/_person.sass +5 -0
  98. data/app/assets/stylesheets/partials/content/_scaffold.sass +67 -0
  99. data/app/assets/stylesheets/partials/content/_table_list.sass +26 -0
  100. data/app/assets/stylesheets/partials/content/formtastic/_formtastic.sass +201 -0
  101. data/app/assets/stylesheets/partials/content/formtastic/_formtastic_cyt.sass +90 -0
  102. data/app/assets/stylesheets/partials/formtastic/_custom_fields.sass +2 -0
  103. data/app/assets/stylesheets/partials/formtastic/_formtastic_base.sass +652 -0
  104. data/app/assets/stylesheets/partials/jquery/_jquery_ui.sass +1461 -0
  105. data/app/assets/stylesheets/partials/jquery/_tooltip.sass +21 -0
  106. data/app/assets/stylesheets/partials/layout/_header.sass +29 -0
  107. data/app/assets/stylesheets/partials/layout/_navigation.sass +2 -0
  108. data/app/assets/stylesheets/partials/layout/navigation/_main.sass +34 -0
  109. data/app/assets/stylesheets/partials/layout/navigation/_sidebar.sass +18 -0
  110. data/app/assets/stylesheets/partials/print/_app.sass +21 -0
  111. data/app/assets/stylesheets/partials/print/_layout.sass +24 -0
  112. data/app/assets/stylesheets/print.scss +5 -0
  113. data/app/assets/stylesheets/screen.scss +12 -0
  114. data/app/controllers/account_types_controller.rb +2 -0
  115. data/app/controllers/accounts_controller.rb +30 -0
  116. data/app/controllers/application_controller.rb +12 -0
  117. data/app/controllers/attachments_controller.rb +15 -0
  118. data/app/controllers/authorized_controller.rb +24 -0
  119. data/app/controllers/bank_accounts_controller.rb +2 -0
  120. data/app/controllers/booking_imports_controller.rb +2 -0
  121. data/app/controllers/booking_templates_controller.rb +8 -0
  122. data/app/controllers/bookings_controller.rb +64 -0
  123. data/app/controllers/charge_booking_templates_controller.rb +2 -0
  124. data/app/controllers/charge_rates_controller.rb +2 -0
  125. data/app/controllers/companies_controller.rb +8 -0
  126. data/app/controllers/credit_invoices_controller.rb +29 -0
  127. data/app/controllers/customers_controller.rb +12 -0
  128. data/app/controllers/debit_invoices_controller.rb +43 -0
  129. data/app/controllers/direct_bookings_controller.rb +17 -0
  130. data/app/controllers/employees_controller.rb +3 -0
  131. data/app/controllers/employments_controller.rb +2 -0
  132. data/app/controllers/invoices_controller.rb +21 -0
  133. data/app/controllers/notes_controller.rb +34 -0
  134. data/app/controllers/overview_controller.rb +6 -0
  135. data/app/controllers/people_controller.rb +13 -0
  136. data/app/controllers/salaries_controller.rb +46 -0
  137. data/app/controllers/tenants_controller.rb +39 -0
  138. data/app/controllers/users_controller.rb +26 -0
  139. data/app/helpers/application_helper.rb +52 -0
  140. data/app/helpers/booking_helper.rb +10 -0
  141. data/app/helpers/booking_template_helper.rb +17 -0
  142. data/app/helpers/charge_rate_helper.rb +5 -0
  143. data/app/helpers/invoice_helper.rb +9 -0
  144. data/app/helpers/vat_rate_helper.rb +10 -0
  145. data/app/inputs/combobox_input.rb +23 -0
  146. data/app/inputs/date_field_input.rb +5 -0
  147. data/app/inputs/hour_field_input.rb +5 -0
  148. data/app/models/ability.rb +34 -0
  149. data/app/models/attachment.rb +13 -0
  150. data/app/models/booking_import.rb +8 -0
  151. data/app/models/booking_import_observer.rb +7 -0
  152. data/app/models/booking_reference.rb +4 -0
  153. data/app/models/booking_template.rb +92 -0
  154. data/app/models/charge_booking_template.rb +57 -0
  155. data/app/models/charge_rate.rb +30 -0
  156. data/app/models/civil_status.rb +5 -0
  157. data/app/models/company.rb +5 -0
  158. data/app/models/credit_invoice.rb +32 -0
  159. data/app/models/customer.rb +4 -0
  160. data/app/models/debit_invoice.rb +24 -0
  161. data/app/models/employee.rb +6 -0
  162. data/app/models/employment.rb +28 -0
  163. data/app/models/invoice.rb +145 -0
  164. data/app/models/line_item.rb +22 -0
  165. data/app/models/note.rb +8 -0
  166. data/app/models/person.rb +65 -0
  167. data/app/models/product.rb +2 -0
  168. data/app/models/profit.rb +9 -0
  169. data/app/models/religion.rb +5 -0
  170. data/app/models/role.rb +9 -0
  171. data/app/models/salary.rb +93 -0
  172. data/app/models/tenant.rb +43 -0
  173. data/app/models/user.rb +44 -0
  174. data/app/models/vat_rate.rb +11 -0
  175. data/app/uploaders/attachment_uploader.rb +12 -0
  176. data/app/views/account_types/_account_type.html.haml +6 -0
  177. data/app/views/account_types/_form.html.haml +7 -0
  178. data/app/views/account_types/_list.html.haml +7 -0
  179. data/app/views/account_types/index.html.haml +6 -0
  180. data/app/views/account_types/show.html.haml +6 -0
  181. data/app/views/accounts/_account.html.haml +12 -0
  182. data/app/views/accounts/_booking_item.html.haml +15 -0
  183. data/app/views/accounts/_booking_list.html.haml +19 -0
  184. data/app/views/accounts/_booking_list_footer.html.haml +2 -0
  185. data/app/views/accounts/_booking_list_header.html.haml +8 -0
  186. data/app/views/accounts/_booking_list_paginate.html.haml +5 -0
  187. data/app/views/accounts/_booking_list_saldo.html.haml +8 -0
  188. data/app/views/accounts/_booking_list_turnover.html.haml +9 -0
  189. data/app/views/accounts/_carry_booking.html.haml +9 -0
  190. data/app/views/accounts/_form.html.haml +10 -0
  191. data/app/views/accounts/_list_footer.html.haml +2 -0
  192. data/app/views/accounts/_list_header.html.haml +5 -0
  193. data/app/views/accounts/index.html.haml +8 -0
  194. data/app/views/accounts/show.html.haml +10 -0
  195. data/app/views/application/_form.html.haml +7 -0
  196. data/app/views/application/_list.html.haml +15 -0
  197. data/app/views/application/_search_form.html.haml +5 -0
  198. data/app/views/application/_show.html.haml +2 -0
  199. data/app/views/application/create.js.erb +3 -0
  200. data/app/views/application/destroy.js.erb +2 -0
  201. data/app/views/application/edit.html.haml +5 -0
  202. data/app/views/application/edit.js.erb +3 -0
  203. data/app/views/application/index.html.haml +7 -0
  204. data/app/views/application/new.html.haml +5 -0
  205. data/app/views/application/new.js.erb +3 -0
  206. data/app/views/application/show.html.haml +5 -0
  207. data/app/views/application/update.js.erb +3 -0
  208. data/app/views/attachments/_attachment.html.haml +5 -0
  209. data/app/views/attachments/_form.html.haml +15 -0
  210. data/app/views/attachments/_list.html.haml +6 -0
  211. data/app/views/bank_accounts/_bank_account.html.haml +1 -0
  212. data/app/views/booking_imports/_booking_import.html.haml +5 -0
  213. data/app/views/booking_imports/_form.html.haml +6 -0
  214. data/app/views/booking_imports/_list.html.haml +7 -0
  215. data/app/views/booking_imports/create.js.erb +4 -0
  216. data/app/views/booking_imports/index.html.haml +6 -0
  217. data/app/views/booking_imports/show.html.haml +6 -0
  218. data/app/views/booking_templates/_booking_template.html.haml +16 -0
  219. data/app/views/booking_templates/_form.html.haml +12 -0
  220. data/app/views/booking_templates/_list.html.haml +10 -0
  221. data/app/views/booking_templates/index.html.haml +6 -0
  222. data/app/views/bookings/_booking.html.haml +17 -0
  223. data/app/views/bookings/_form.html.haml +14 -0
  224. data/app/views/bookings/_list.html.haml +11 -0
  225. data/app/views/bookings/_new_form.html.haml +8 -0
  226. data/app/views/bookings/_sidebar.html.haml +7 -0
  227. data/app/views/bookings/_simple_form.html.haml +12 -0
  228. data/app/views/bookings/index.html.haml +9 -0
  229. data/app/views/bookings/new.html.haml +8 -0
  230. data/app/views/bookings/select.html.haml +11 -0
  231. data/app/views/bookings/show.html.haml +27 -0
  232. data/app/views/bookings/simple_edit.html.haml +4 -0
  233. data/app/views/charge_booking_templates/_charge_booking_template.html.haml +15 -0
  234. data/app/views/charge_booking_templates/_form.html.haml +12 -0
  235. data/app/views/charge_booking_templates/_list.html.haml +10 -0
  236. data/app/views/charge_rates/_form.html.haml +14 -0
  237. data/app/views/companies/_company.html.haml +5 -0
  238. data/app/views/companies/_form.html.haml +8 -0
  239. data/app/views/companies/_list.html.haml +6 -0
  240. data/app/views/companies/index.html.haml +6 -0
  241. data/app/views/companies/show.html.haml +27 -0
  242. data/app/views/credit_invoices/_credit_invoice.html.haml +9 -0
  243. data/app/views/credit_invoices/_form.html.haml +41 -0
  244. data/app/views/credit_invoices/_list.html.haml +20 -0
  245. data/app/views/credit_invoices/index.html.haml +7 -0
  246. data/app/views/credit_invoices/show.html.haml +56 -0
  247. data/app/views/customers/_customer.html.haml +5 -0
  248. data/app/views/customers/_form.html.haml +8 -0
  249. data/app/views/customers/_list.html.haml +6 -0
  250. data/app/views/customers/index.html.haml +6 -0
  251. data/app/views/customers/show.html.haml +22 -0
  252. data/app/views/debit_invoices/_debit_invoice.html.haml +9 -0
  253. data/app/views/debit_invoices/_form.html.haml +38 -0
  254. data/app/views/debit_invoices/_invoice_body.html.haml +8 -0
  255. data/app/views/debit_invoices/_invoice_info.html.haml +10 -0
  256. data/app/views/debit_invoices/_invoice_parties.html.haml +9 -0
  257. data/app/views/debit_invoices/_list.html.haml +21 -0
  258. data/app/views/debit_invoices/index.html.haml +7 -0
  259. data/app/views/debit_invoices/letter.html.haml +9 -0
  260. data/app/views/debit_invoices/letter.pdf.prawn +57 -0
  261. data/app/views/debit_invoices/show.html.haml +56 -0
  262. data/app/views/devise/confirmations/new.html.haml +10 -0
  263. data/app/views/devise/mailer/confirmation_instructions.html.haml +6 -0
  264. data/app/views/devise/mailer/reset_password_instructions.html.haml +10 -0
  265. data/app/views/devise/mailer/unlock_instructions.html.haml +8 -0
  266. data/app/views/devise/passwords/edit.html.haml +15 -0
  267. data/app/views/devise/passwords/new.html.haml +11 -0
  268. data/app/views/devise/sessions/new.html.haml +13 -0
  269. data/app/views/devise/shared/_links.haml +15 -0
  270. data/app/views/devise/unlocks/new.html.haml +11 -0
  271. data/app/views/direct_bookings/_form.html.haml +12 -0
  272. data/app/views/direct_bookings/_item.html.haml +17 -0
  273. data/app/views/direct_bookings/_list.html.haml +10 -0
  274. data/app/views/direct_bookings/_list_footer.html.haml +6 -0
  275. data/app/views/direct_bookings/_show.html.haml +3 -0
  276. data/app/views/direct_bookings/_show_all.html.haml +8 -0
  277. data/app/views/direct_bookings/list.js.erb +2 -0
  278. data/app/views/direct_bookings/new.js.erb +2 -0
  279. data/app/views/employees/_employee.html.haml +5 -0
  280. data/app/views/employees/_form.html.haml +19 -0
  281. data/app/views/employees/_list.html.haml +6 -0
  282. data/app/views/employees/index.html.haml +6 -0
  283. data/app/views/employees/show.html.haml +31 -0
  284. data/app/views/employments/_employment.html.haml +10 -0
  285. data/app/views/employments/_form.html.haml +24 -0
  286. data/app/views/employments/_list.html.haml +11 -0
  287. data/app/views/employments/_show.html.haml +9 -0
  288. data/app/views/employments/index.html.haml +5 -0
  289. data/app/views/invoices/_form.html.haml +13 -0
  290. data/app/views/invoices/_invoice.html.haml +7 -0
  291. data/app/views/invoices/_list.html.haml +20 -0
  292. data/app/views/invoices/_sidebar.html.haml +11 -0
  293. data/app/views/invoices/index.html.haml +17 -0
  294. data/app/views/invoices/show.html.haml +56 -0
  295. data/app/views/layouts/_flash_new.html.haml +1 -0
  296. data/app/views/layouts/_list_item_actions_for.html.haml +3 -0
  297. data/app/views/layouts/application.html.haml +46 -0
  298. data/app/views/line_items/_form.html.haml +6 -0
  299. data/app/views/line_items/_line_item.html.haml +7 -0
  300. data/app/views/line_items/_list_footer.html.haml +7 -0
  301. data/app/views/notes/_form.html.haml +10 -0
  302. data/app/views/notes/_list.html.haml +15 -0
  303. data/app/views/notes/index.html.haml +9 -0
  304. data/app/views/notes/show.html.haml +12 -0
  305. data/app/views/overview/index.html.haml +14 -0
  306. data/app/views/people/_form.html.haml +8 -0
  307. data/app/views/people/_list.html.haml +7 -0
  308. data/app/views/people/_person.html.haml +6 -0
  309. data/app/views/people/_show.html.haml +6 -0
  310. data/app/views/people/show.html.haml +21 -0
  311. data/app/views/persons/_civil.html.haml +5 -0
  312. data/app/views/persons/_show.html.haml +6 -0
  313. data/app/views/salaries/_form.html.haml +14 -0
  314. data/app/views/salaries/_list.html.haml +12 -0
  315. data/app/views/salaries/_salary.html.haml +10 -0
  316. data/app/views/salaries/_salary_certificate.html.haml +25 -0
  317. data/app/views/salaries/payslip.html.haml +40 -0
  318. data/app/views/salaries/show.html.haml +30 -0
  319. data/app/views/salaries/statistics.html.haml +6 -0
  320. data/app/views/tenants/_account.html.haml +7 -0
  321. data/app/views/tenants/_account_group_sheet.html.haml +8 -0
  322. data/app/views/tenants/_form.html.haml +17 -0
  323. data/app/views/tenants/_list.html.haml +7 -0
  324. data/app/views/tenants/_tenant.html.haml +7 -0
  325. data/app/views/tenants/balance_sheet.html.haml +43 -0
  326. data/app/views/tenants/index.html.haml +6 -0
  327. data/app/views/tenants/new.js.erb +1 -0
  328. data/app/views/tenants/profit_sheet.html.haml +26 -0
  329. data/app/views/tenants/show.html.haml +18 -0
  330. data/app/views/users/_demo.de-CH.html.haml +7 -0
  331. data/app/views/users/_demo.de.html.haml +7 -0
  332. data/app/views/users/_demo.html.haml +7 -0
  333. data/app/views/users/_form.html.haml +17 -0
  334. data/app/views/users/_list.html.haml +9 -0
  335. data/app/views/users/_show.html.haml +13 -0
  336. data/app/views/users/_user.html.haml +7 -0
  337. data/app/views/users/index.html.haml +6 -0
  338. data/app/views/users/new.js.erb +1 -0
  339. data/app/views/users/show.html.haml +14 -0
  340. data/lib/acts_as_csv.rb +113 -0
  341. data/lib/bookyt/engine.rb +18 -0
  342. data/lib/bookyt/version.rb +3 -0
  343. data/lib/float.rb +17 -0
  344. data/lib/pagination_list_link_renderer.rb +63 -0
  345. data/lib/parse_date.rb +27 -0
  346. data/lib/prawn/letter_document.rb +136 -0
  347. data/lib/raiffeisen_importer.rb +15 -0
  348. data/lib/recipes/bookyt.rb +15 -0
  349. data/lib/simple_navigation/renderer/list.rb +20 -0
  350. data/lib/simple_navigation/renderer/overview.rb +46 -0
  351. data/lib/sqlite3_extensions.rb +45 -0
  352. data/lib/tasks/.gitkeep +0 -0
  353. data/lib/tasks/bookyt.rake +15 -0
  354. data/lib/tasks/cucumber.rake +53 -0
  355. data/lib/tasks/environment_seeds.rake +7 -0
  356. data/lib/tasks/users.rake +46 -0
  357. metadata +423 -0
@@ -0,0 +1,343 @@
1
+ /**
2
+ * @license
3
+ * jQuery Tools 1.2.5 Tooltip - UI essentials
4
+ *
5
+ * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
6
+ *
7
+ * http://flowplayer.org/tools/tooltip/
8
+ *
9
+ * Since: November 2008
10
+ * Date: Wed Sep 22 06:02:10 2010 +0000
11
+ */
12
+ (function($) {
13
+ // static constructs
14
+ $.tools = $.tools || {version: '1.2.5'};
15
+
16
+ $.tools.tooltip = {
17
+
18
+ conf: {
19
+
20
+ // default effect variables
21
+ effect: 'toggle',
22
+ fadeOutSpeed: "fast",
23
+ predelay: 0,
24
+ delay: 30,
25
+ opacity: 1,
26
+ tip: 0,
27
+
28
+ // 'top', 'bottom', 'right', 'left', 'center'
29
+ position: ['top', 'center'],
30
+ offset: [0, 0],
31
+ relative: false,
32
+ cancelDefault: true,
33
+
34
+ // type to event mapping
35
+ events: {
36
+ def: "mouseenter,mouseleave",
37
+ input: "focus,blur",
38
+ widget: "focus mouseenter,blur mouseleave",
39
+ tooltip: "mouseenter,mouseleave"
40
+ },
41
+
42
+ // 1.2
43
+ layout: '<div/>',
44
+ tipClass: 'tooltip'
45
+ },
46
+
47
+ addEffect: function(name, loadFn, hideFn) {
48
+ effects[name] = [loadFn, hideFn];
49
+ }
50
+ };
51
+
52
+
53
+ var effects = {
54
+ toggle: [
55
+ function(done) {
56
+ var conf = this.getConf(), tip = this.getTip(), o = conf.opacity;
57
+ if (o < 1) { tip.css({opacity: o}); }
58
+ tip.show();
59
+ done.call();
60
+ },
61
+
62
+ function(done) {
63
+ this.getTip().hide();
64
+ done.call();
65
+ }
66
+ ],
67
+
68
+ fade: [
69
+ function(done) {
70
+ var conf = this.getConf();
71
+ this.getTip().fadeTo(conf.fadeInSpeed, conf.opacity, done);
72
+ },
73
+ function(done) {
74
+ this.getTip().fadeOut(this.getConf().fadeOutSpeed, done);
75
+ }
76
+ ]
77
+ };
78
+
79
+
80
+ /* calculate tip position relative to the trigger */
81
+ function getPosition(trigger, tip, conf) {
82
+
83
+
84
+ // get origin top/left position
85
+ var top = conf.relative ? trigger.position().top : trigger.offset().top,
86
+ left = conf.relative ? trigger.position().left : trigger.offset().left,
87
+ pos = conf.position[0];
88
+
89
+ top -= tip.outerHeight() - conf.offset[0];
90
+ left += trigger.outerWidth() + conf.offset[1];
91
+
92
+ // iPad position fix
93
+ if (/iPad/i.test(navigator.userAgent)) {
94
+ top -= $(window).scrollTop();
95
+ }
96
+
97
+ // adjust Y
98
+ var height = tip.outerHeight() + trigger.outerHeight();
99
+ if (pos == 'center') { top += height / 2; }
100
+ if (pos == 'bottom') { top += height; }
101
+
102
+
103
+ // adjust X
104
+ pos = conf.position[1];
105
+ var width = tip.outerWidth() + trigger.outerWidth();
106
+ if (pos == 'center') { left -= width / 2; }
107
+ if (pos == 'left') { left -= width; }
108
+
109
+ return {top: top, left: left};
110
+ }
111
+
112
+
113
+
114
+ function Tooltip(trigger, conf) {
115
+
116
+ var self = this,
117
+ fire = trigger.add(self),
118
+ tip,
119
+ timer = 0,
120
+ pretimer = 0,
121
+ title = trigger.attr("title"),
122
+ tipAttr = trigger.attr("data-tooltip"),
123
+ effect = effects[conf.effect],
124
+ shown,
125
+
126
+ // get show/hide configuration
127
+ isInput = trigger.is(":input"),
128
+ isWidget = isInput && trigger.is(":checkbox, :radio, select, :button, :submit"),
129
+ type = trigger.attr("type"),
130
+ evt = conf.events[type] || conf.events[isInput ? (isWidget ? 'widget' : 'input') : 'def'];
131
+
132
+
133
+ // check that configuration is sane
134
+ if (!effect) { throw "Nonexistent effect \"" + conf.effect + "\""; }
135
+
136
+ evt = evt.split(/,\s*/);
137
+ if (evt.length != 2) { throw "Tooltip: bad events configuration for " + type; }
138
+
139
+
140
+ // trigger --> show
141
+ trigger.bind(evt[0], function(e) {
142
+
143
+ clearTimeout(timer);
144
+ if (conf.predelay) {
145
+ pretimer = setTimeout(function() { self.show(e); }, conf.predelay);
146
+
147
+ } else {
148
+ self.show(e);
149
+ }
150
+
151
+ // trigger --> hide
152
+ }).bind(evt[1], function(e) {
153
+ clearTimeout(pretimer);
154
+ if (conf.delay) {
155
+ timer = setTimeout(function() { self.hide(e); }, conf.delay);
156
+
157
+ } else {
158
+ self.hide(e);
159
+ }
160
+
161
+ });
162
+
163
+
164
+ // remove default title
165
+ if (title && conf.cancelDefault) {
166
+ trigger.removeAttr("title");
167
+ trigger.data("title", title);
168
+ }
169
+
170
+ $.extend(self, {
171
+
172
+ show: function(e) {
173
+
174
+ // tip not initialized yet
175
+ if (!tip) {
176
+
177
+ // data-tooltip
178
+ if (tipAttr) {
179
+ tip = $(tipAttr);
180
+
181
+ // single tip element for all
182
+ } else if (conf.tip) {
183
+ tip = $(conf.tip).eq(0);
184
+
185
+ // autogenerated tooltip
186
+ } else if (title) {
187
+ tip = $(conf.layout).addClass(conf.tipClass).appendTo(document.body)
188
+ .hide().append(title);
189
+
190
+ // manual tooltip
191
+ } else {
192
+ tip = trigger.next();
193
+ if (!tip.length) { tip = trigger.parent().next(); }
194
+ }
195
+
196
+ if (!tip.length) { throw "Cannot find tooltip for " + trigger; }
197
+ }
198
+
199
+ if (self.isShown()) { return self; }
200
+
201
+ // stop previous animation
202
+ tip.stop(true, true);
203
+
204
+ // get position
205
+ var pos = getPosition(trigger, tip, conf);
206
+
207
+ // restore title for single tooltip element
208
+ if (conf.tip) {
209
+ tip.html(trigger.data("title"));
210
+ }
211
+
212
+ // onBeforeShow
213
+ e = e || $.Event();
214
+ e.type = "onBeforeShow";
215
+ fire.trigger(e, [pos]);
216
+ if (e.isDefaultPrevented()) { return self; }
217
+
218
+
219
+ // onBeforeShow may have altered the configuration
220
+ pos = getPosition(trigger, tip, conf);
221
+
222
+ // set position
223
+ tip.css({position:'absolute', top: pos.top, left: pos.left});
224
+
225
+ shown = true;
226
+
227
+ // invoke effect
228
+ effect[0].call(self, function() {
229
+ e.type = "onShow";
230
+ shown = 'full';
231
+ fire.trigger(e);
232
+ });
233
+
234
+
235
+ // tooltip events
236
+ var event = conf.events.tooltip.split(/,\s*/);
237
+
238
+ if (!tip.data("__set")) {
239
+
240
+ tip.bind(event[0], function() {
241
+ clearTimeout(timer);
242
+ clearTimeout(pretimer);
243
+ });
244
+
245
+ if (event[1] && !trigger.is("input:not(:checkbox, :radio), textarea")) {
246
+ tip.bind(event[1], function(e) {
247
+
248
+ // being moved to the trigger element
249
+ if (e.relatedTarget != trigger[0]) {
250
+ trigger.trigger(evt[1].split(" ")[0]);
251
+ }
252
+ });
253
+ }
254
+
255
+ tip.data("__set", true);
256
+ }
257
+
258
+ return self;
259
+ },
260
+
261
+ hide: function(e) {
262
+
263
+ if (!tip || !self.isShown()) { return self; }
264
+
265
+ // onBeforeHide
266
+ e = e || $.Event();
267
+ e.type = "onBeforeHide";
268
+ fire.trigger(e);
269
+ if (e.isDefaultPrevented()) { return; }
270
+
271
+ shown = false;
272
+
273
+ effects[conf.effect][1].call(self, function() {
274
+ e.type = "onHide";
275
+ fire.trigger(e);
276
+ });
277
+
278
+ return self;
279
+ },
280
+
281
+ isShown: function(fully) {
282
+ return fully ? shown == 'full' : shown;
283
+ },
284
+
285
+ getConf: function() {
286
+ return conf;
287
+ },
288
+
289
+ getTip: function() {
290
+ return tip;
291
+ },
292
+
293
+ getTrigger: function() {
294
+ return trigger;
295
+ }
296
+
297
+ });
298
+
299
+ // callbacks
300
+ $.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","), function(i, name) {
301
+
302
+ // configuration
303
+ if ($.isFunction(conf[name])) {
304
+ $(self).bind(name, conf[name]);
305
+ }
306
+
307
+ // API
308
+ self[name] = function(fn) {
309
+ if (fn) { $(self).bind(name, fn); }
310
+ return self;
311
+ };
312
+ });
313
+
314
+ }
315
+
316
+
317
+ // jQuery plugin implementation
318
+ $.fn.tooltip = function(conf) {
319
+
320
+ // return existing instance
321
+ var api = this.data("tooltip");
322
+ if (api) { return api; }
323
+
324
+ conf = $.extend(true, {}, $.tools.tooltip.conf, conf);
325
+
326
+ // position can also be given as string
327
+ if (typeof conf.position == 'string') {
328
+ conf.position = conf.position.split(/,?\s/);
329
+ }
330
+
331
+ // install tooltip for each entry in jQuery object
332
+ this.each(function() {
333
+ api = new Tooltip($(this), conf);
334
+ $(this).data("tooltip", api);
335
+ });
336
+
337
+ return conf.api ? api: this;
338
+ };
339
+
340
+ }) (jQuery);
341
+
342
+
343
+
File without changes
@@ -0,0 +1,16 @@
1
+ @import "blueprint";
2
+
3
+ // To generate css equivalent to the blueprint css but with your configuration applied, uncomment:
4
+ // @include blueprint-ie
5
+
6
+ //Recommended Blueprint configuration with scoping and semantic layout:
7
+ body.bp {
8
+ @include blueprint-ie(true);
9
+ // Note: Blueprint centers text to fix IE6 container centering.
10
+ // This means all your texts will be centered under all version of IE by default.
11
+ // If your container does not have the .container class, don't forget to restore
12
+ // the correct behavior to your main container (but not the body tag!)
13
+ // Example:
14
+ // .my-container
15
+ // text-align: left
16
+ }
@@ -0,0 +1,4 @@
1
+ a.button, form button {
2
+ background-image: none !important;
3
+ &:hover, &:active, &:focus {
4
+ background-image: none !important; } }
@@ -0,0 +1,39 @@
1
+ $blueprint-grid-columns: 24
2
+ $blueprint-grid-width: 30px
3
+ $blueprint-grid-margin: 10px
4
+
5
+ // Color definition
6
+ $dark_blue: #507aaa
7
+ $light_blue: #759fcf
8
+ $white: white
9
+ $gray: #555555
10
+ $link_color: $dark_blue
11
+ $link_color_hover: $light_blue
12
+ $bg_dark_blue: #aeb9cf
13
+ $red: red
14
+
15
+ // Font family definitions
16
+ =serif-font
17
+ font-family: Georgia, Times, "Times New Roman", serif
18
+
19
+ =sanserif-font
20
+ font-family: Helvetica, Verdana, Arial, sans-serif
21
+
22
+ // Font size definitions
23
+ $h1_size: 25px
24
+ $h2_size: 20px
25
+ $h3_size: 16px
26
+ $text_size: 14px
27
+
28
+ // Column widths
29
+ $column_header: $blueprint-grid-columns
30
+ $column_sidebar: 3
31
+ $column_content: $blueprint-grid-columns - $column_sidebar
32
+ $column_small_form: 7
33
+ $column_big_form: 10
34
+
35
+ // Content
36
+ $content_padding: 1em
37
+
38
+ // Borders
39
+ $border_radius: 5px
@@ -0,0 +1,60 @@
1
+ @import partials/content/table_list
2
+ @import partials/content/icons
3
+ @import partials/formtastic/formtastic_base
4
+ @import partials/formtastic/custom_fields
5
+ @import partials/content/ajax_indicator
6
+ @import partials/content/flash_errors
7
+ @import partials/content/fancy_buttons
8
+ @import partials/content/overview
9
+ @import partials/content/pagination
10
+ @import partials/content/cyt
11
+ @import partials/content/person
12
+ @import partials/content/form_view
13
+ @import partials/content/combobox
14
+
15
+ @import partials/content/app
16
+
17
+ // Headers styling
18
+ h1,
19
+ h2,
20
+ h3
21
+ +sanserif-font
22
+ font-weight: bold
23
+ border-bottom: 1px solid #bbbbbb
24
+
25
+ h2
26
+ font-size: $h2_size
27
+ margin-bottom: $h2_size
28
+
29
+ h1
30
+ font-size: $h1_size
31
+ margin-bottom: $h1_size
32
+
33
+ h3
34
+ font-size: $h3_size
35
+ margin-bottom: 0.4em
36
+ margin-top: 1.2em
37
+
38
+ a
39
+ text-decoration: none
40
+ color: $link_color
41
+ &:hover
42
+ color: $link_color_hover
43
+
44
+ // Form styling
45
+ form.formtastic
46
+ +float-form
47
+ // Overwrite some formtastic styling
48
+
49
+ // Snippet from Redmine.css
50
+ .contextual
51
+ float: right
52
+ white-space: nowrap
53
+ line-height: 1.4em
54
+ margin-top: 5px
55
+ padding-left: 10px
56
+ font-size: 0.9em
57
+ input
58
+ font-size: 1.9em
59
+
60
+ // End of snippet