From ece2f6395c2c6ef71126aff6fa447590eb4007eb Mon Sep 17 00:00:00 2001 From: Sebastian Schuster Date: Mon, 27 May 2013 17:43:48 +0200 Subject: [PATCH] Converted reporting_engine into a Rails engine --- {assets => lib/assets}/images/close.gif | Bin {assets => lib/assets}/images/delete.gif | Bin {assets => lib/assets}/images/delete.png | Bin {assets => lib/assets}/images/disk.gif | Bin {assets => lib/assets}/images/disks.gif | Bin .../assets}/images/icon_info_red.gif | Bin {assets => lib/assets}/images/loading.gif | Bin {assets => lib/assets}/images/remove.gif | Bin {assets => lib/assets}/images/remove.png | Bin lib/assets/images/reporting_engine/close.gif | Bin 0 -> 139 bytes lib/assets/images/reporting_engine/delete.gif | Bin 0 -> 67 bytes lib/assets/images/reporting_engine/delete.png | Bin 0 -> 1022 bytes lib/assets/images/reporting_engine/disk.gif | Bin 0 -> 64 bytes lib/assets/images/reporting_engine/disks.gif | Bin 0 -> 67 bytes .../images/reporting_engine/icon_info_red.gif | Bin 0 -> 67 bytes .../images/reporting_engine/loading.gif | Bin 0 -> 1553 bytes lib/assets/images/reporting_engine/remove.gif | Bin 0 -> 54 bytes lib/assets/images/reporting_engine/remove.png | Bin 0 -> 3744 bytes .../assets}/javascripts/cordinc_tooltip.js | 0 .../assets}/javascripts/reporting.js | 0 .../assets}/javascripts/reporting/controls.js | 0 .../assets}/javascripts/reporting/filters.js | 0 .../javascripts/reporting/group_bys.js | 0 .../reporting/lang/reporting-de.js | 0 .../reporting/lang/reporting-en.js | 0 .../javascripts/reporting/progressbar.js | 0 .../reporting/prototype_progress_bar.js | 0 .../javascripts/reporting/restore_query.js | 0 .../reporting_engine/cordinc_tooltip.js | 159 +++++ .../javascripts/reporting_engine/reporting.js | 72 ++ .../reporting_engine/reporting/controls.js | 192 ++++++ .../reporting_engine/reporting/filters.js | 518 +++++++++++++++ .../reporting_engine/reporting/group_bys.js | 208 ++++++ .../reporting/lang/reporting-de.js | 3 + .../reporting/lang/reporting-en.js | 3 + .../reporting_engine/reporting/progressbar.js | 49 ++ .../reporting/prototype_progress_bar.js | 116 ++++ .../reporting/restore_query.js | 90 +++ .../javascripts/reporting_engine}/sortable.js | 0 lib/assets/javascripts/sortable.js | 306 +++++++++ {assets => lib/assets}/stylesheets/help.css | 0 .../assets}/stylesheets/reporting.css | 0 .../stylesheets/reporting_engine/help.css | 56 ++ .../reporting_engine/reporting.css | 619 ++++++++++++++++++ lib/open_project/reporting_engine.rb | 5 + lib/open_project/reporting_engine/engine.rb | 33 + .../reporting_engine/engine_module.rb} | 0 .../helpers}/reporting_helper.rb | 20 +- lib/open_project/reporting_engine/patches.rb | 2 + .../patches}/big_decimal_patch.rb | 4 +- .../patches}/to_date_patch.rb | 4 +- .../reporting_engine/proactive_autoloader.rb | 0 .../reporting_engine/report.rb | 2 +- .../reporting_engine/report/chainable.rb | 0 .../reporting_engine/report/controller.rb | 0 .../reporting_engine/report/filter.rb | 4 +- .../reporting_engine/report/filter/base.rb | 0 .../report/filter/multi_choice.rb | 0 .../report/filter/no_filter.rb | 0 .../reporting_engine/report/group_by.rb | 8 +- .../reporting_engine/report/group_by/base.rb | 0 .../report/group_by/ruby_aggregation.rb | 0 .../report/group_by/singleton_value.rb | 0 .../report/group_by/sql_aggregation.rb | 0 .../report/inherited_attribute.rb | 2 +- .../reporting_engine/report/operator.rb | 0 .../reporting_engine/report/query_utils.rb | 0 .../reporting_engine/report/result.rb | 0 .../reporting_engine/report/sql_statement.rb | 0 .../reporting_engine/report/table.rb | 0 .../reporting_engine/report/transformer.rb | 0 .../reporting_engine/report/validation.rb | 0 .../report/validation/dates.rb | 0 .../report/validation/integers.rb | 0 .../reporting_engine/report/validation/sql.rb | 0 .../reporting_engine/report/walker.rb | 0 .../reporting_engine/tasks/spec.rake | 0 lib/open_project/reporting_engine/version.rb | 5 + .../reporting_engine/widget.rb | 4 +- .../reporting_engine/widget/base.rb | 0 .../reporting_engine/widget/controls.rb | 0 .../reporting_engine/widget/controls/apply.rb | 0 .../reporting_engine/widget/controls/clear.rb | 0 .../widget/controls/delete.rb | 0 .../widget/controls/query_name.rb | 0 .../reporting_engine/widget/controls/save.rb | 0 .../widget/controls/save_as.rb | 0 .../reporting_engine/widget/filters.rb | 0 .../reporting_engine/widget/filters/base.rb | 0 .../reporting_engine/widget/filters/date.rb | 0 .../reporting_engine/widget/filters/heavy.rb | 0 .../reporting_engine/widget/filters/label.rb | 0 .../widget/filters/multi_choice.rb | 0 .../widget/filters/multi_values.rb | 0 .../widget/filters/operators.rb | 0 .../reporting_engine/widget/filters/option.rb | 0 .../widget/filters/remove_button.rb | 0 .../widget/filters/text_box.rb | 0 .../reporting_engine/widget/group_bys.rb | 0 .../reporting_engine/widget/help.rb | 0 .../reporting_engine/widget/settings.rb | 0 .../widget/settings/fieldset.rb | 0 .../reporting_engine/widget/table.rb | 2 +- .../widget/table/progressbar.rb | 0 .../widget/table/report_table.rb | 0 lib/openproject-reportingengine.rb | 1 + lib/reporting_engine/version.rb | 3 - 107 files changed, 2462 insertions(+), 28 deletions(-) rename {assets => lib/assets}/images/close.gif (100%) rename {assets => lib/assets}/images/delete.gif (100%) rename {assets => lib/assets}/images/delete.png (100%) rename {assets => lib/assets}/images/disk.gif (100%) rename {assets => lib/assets}/images/disks.gif (100%) rename {assets => lib/assets}/images/icon_info_red.gif (100%) rename {assets => lib/assets}/images/loading.gif (100%) rename {assets => lib/assets}/images/remove.gif (100%) rename {assets => lib/assets}/images/remove.png (100%) create mode 100644 lib/assets/images/reporting_engine/close.gif create mode 100644 lib/assets/images/reporting_engine/delete.gif create mode 100644 lib/assets/images/reporting_engine/delete.png create mode 100644 lib/assets/images/reporting_engine/disk.gif create mode 100644 lib/assets/images/reporting_engine/disks.gif create mode 100644 lib/assets/images/reporting_engine/icon_info_red.gif create mode 100644 lib/assets/images/reporting_engine/loading.gif create mode 100644 lib/assets/images/reporting_engine/remove.gif create mode 100644 lib/assets/images/reporting_engine/remove.png rename {assets => lib/assets}/javascripts/cordinc_tooltip.js (100%) rename {assets => lib/assets}/javascripts/reporting.js (100%) rename {assets => lib/assets}/javascripts/reporting/controls.js (100%) rename {assets => lib/assets}/javascripts/reporting/filters.js (100%) rename {assets => lib/assets}/javascripts/reporting/group_bys.js (100%) rename {assets => lib/assets}/javascripts/reporting/lang/reporting-de.js (100%) rename {assets => lib/assets}/javascripts/reporting/lang/reporting-en.js (100%) rename {assets => lib/assets}/javascripts/reporting/progressbar.js (100%) rename {assets => lib/assets}/javascripts/reporting/prototype_progress_bar.js (100%) rename {assets => lib/assets}/javascripts/reporting/restore_query.js (100%) create mode 100644 lib/assets/javascripts/reporting_engine/cordinc_tooltip.js create mode 100644 lib/assets/javascripts/reporting_engine/reporting.js create mode 100644 lib/assets/javascripts/reporting_engine/reporting/controls.js create mode 100644 lib/assets/javascripts/reporting_engine/reporting/filters.js create mode 100644 lib/assets/javascripts/reporting_engine/reporting/group_bys.js create mode 100644 lib/assets/javascripts/reporting_engine/reporting/lang/reporting-de.js create mode 100644 lib/assets/javascripts/reporting_engine/reporting/lang/reporting-en.js create mode 100644 lib/assets/javascripts/reporting_engine/reporting/progressbar.js create mode 100644 lib/assets/javascripts/reporting_engine/reporting/prototype_progress_bar.js create mode 100644 lib/assets/javascripts/reporting_engine/reporting/restore_query.js rename {assets/javascripts => lib/assets/javascripts/reporting_engine}/sortable.js (100%) create mode 100644 lib/assets/javascripts/sortable.js rename {assets => lib/assets}/stylesheets/help.css (100%) rename {assets => lib/assets}/stylesheets/reporting.css (100%) create mode 100644 lib/assets/stylesheets/reporting_engine/help.css create mode 100644 lib/assets/stylesheets/reporting_engine/reporting.css create mode 100644 lib/open_project/reporting_engine.rb create mode 100644 lib/open_project/reporting_engine/engine.rb rename lib/{reporting_engine/engine.rb => open_project/reporting_engine/engine_module.rb} (100%) rename lib/{reporting_engine => open_project/reporting_engine/helpers}/reporting_helper.rb (58%) create mode 100644 lib/open_project/reporting_engine/patches.rb rename lib/{reporting_engine => open_project/reporting_engine/patches}/big_decimal_patch.rb (84%) rename lib/{reporting_engine => open_project/reporting_engine/patches}/to_date_patch.rb (88%) rename lib/{ => open_project}/reporting_engine/proactive_autoloader.rb (100%) rename lib/{ => open_project}/reporting_engine/report.rb (98%) rename lib/{ => open_project}/reporting_engine/report/chainable.rb (100%) rename lib/{ => open_project}/reporting_engine/report/controller.rb (100%) rename lib/{ => open_project}/reporting_engine/report/filter.rb (68%) rename lib/{ => open_project}/reporting_engine/report/filter/base.rb (100%) rename lib/{ => open_project}/reporting_engine/report/filter/multi_choice.rb (100%) rename lib/{ => open_project}/reporting_engine/report/filter/no_filter.rb (100%) rename lib/{ => open_project}/reporting_engine/report/group_by.rb (51%) rename lib/{ => open_project}/reporting_engine/report/group_by/base.rb (100%) rename lib/{ => open_project}/reporting_engine/report/group_by/ruby_aggregation.rb (100%) rename lib/{ => open_project}/reporting_engine/report/group_by/singleton_value.rb (100%) rename lib/{ => open_project}/reporting_engine/report/group_by/sql_aggregation.rb (100%) rename lib/{ => open_project}/reporting_engine/report/inherited_attribute.rb (97%) rename lib/{ => open_project}/reporting_engine/report/operator.rb (100%) rename lib/{ => open_project}/reporting_engine/report/query_utils.rb (100%) rename lib/{ => open_project}/reporting_engine/report/result.rb (100%) rename lib/{ => open_project}/reporting_engine/report/sql_statement.rb (100%) rename lib/{ => open_project}/reporting_engine/report/table.rb (100%) rename lib/{ => open_project}/reporting_engine/report/transformer.rb (100%) rename lib/{ => open_project}/reporting_engine/report/validation.rb (100%) rename lib/{ => open_project}/reporting_engine/report/validation/dates.rb (100%) rename lib/{ => open_project}/reporting_engine/report/validation/integers.rb (100%) rename lib/{ => open_project}/reporting_engine/report/validation/sql.rb (100%) rename lib/{ => open_project}/reporting_engine/report/walker.rb (100%) rename lib/{ => open_project}/reporting_engine/tasks/spec.rake (100%) create mode 100644 lib/open_project/reporting_engine/version.rb rename lib/{ => open_project}/reporting_engine/widget.rb (91%) rename lib/{ => open_project}/reporting_engine/widget/base.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/controls.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/controls/apply.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/controls/clear.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/controls/delete.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/controls/query_name.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/controls/save.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/controls/save_as.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/filters.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/filters/base.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/filters/date.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/filters/heavy.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/filters/label.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/filters/multi_choice.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/filters/multi_values.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/filters/operators.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/filters/option.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/filters/remove_button.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/filters/text_box.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/group_bys.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/help.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/settings.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/settings/fieldset.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/table.rb (97%) rename lib/{ => open_project}/reporting_engine/widget/table/progressbar.rb (100%) rename lib/{ => open_project}/reporting_engine/widget/table/report_table.rb (100%) create mode 100644 lib/openproject-reportingengine.rb delete mode 100644 lib/reporting_engine/version.rb diff --git a/assets/images/close.gif b/lib/assets/images/close.gif similarity index 100% rename from assets/images/close.gif rename to lib/assets/images/close.gif diff --git a/assets/images/delete.gif b/lib/assets/images/delete.gif similarity index 100% rename from assets/images/delete.gif rename to lib/assets/images/delete.gif diff --git a/assets/images/delete.png b/lib/assets/images/delete.png similarity index 100% rename from assets/images/delete.png rename to lib/assets/images/delete.png diff --git a/assets/images/disk.gif b/lib/assets/images/disk.gif similarity index 100% rename from assets/images/disk.gif rename to lib/assets/images/disk.gif diff --git a/assets/images/disks.gif b/lib/assets/images/disks.gif similarity index 100% rename from assets/images/disks.gif rename to lib/assets/images/disks.gif diff --git a/assets/images/icon_info_red.gif b/lib/assets/images/icon_info_red.gif similarity index 100% rename from assets/images/icon_info_red.gif rename to lib/assets/images/icon_info_red.gif diff --git a/assets/images/loading.gif b/lib/assets/images/loading.gif similarity index 100% rename from assets/images/loading.gif rename to lib/assets/images/loading.gif diff --git a/assets/images/remove.gif b/lib/assets/images/remove.gif similarity index 100% rename from assets/images/remove.gif rename to lib/assets/images/remove.gif diff --git a/assets/images/remove.png b/lib/assets/images/remove.png similarity index 100% rename from assets/images/remove.png rename to lib/assets/images/remove.png diff --git a/lib/assets/images/reporting_engine/close.gif b/lib/assets/images/reporting_engine/close.gif new file mode 100644 index 0000000000000000000000000000000000000000..f072eb5fc6817afca52d77b6725b6dd87f4c754d GIT binary patch literal 139 zcmZ?wbhEHb6k-r!*v!D-IP08d{~6h?)2S;j?KpdD%D!u+Q_dc_e7j@k)yO3m*POU{ z;l`aickeR5fZ|UUFjEIag3MrGv6yhubM;<}*L(Y8XBh@~JVn%! iAwzBjc9t284iOie7$&4JT#%U}{36e5ZPZ#p25SI%b~O9| literal 0 HcmV?d00001 diff --git a/lib/assets/images/reporting_engine/delete.gif b/lib/assets/images/reporting_engine/delete.gif new file mode 100644 index 0000000000000000000000000000000000000000..7667901311e78b258a3cccaca98c7391a03b2d3d GIT binary patch literal 67 zcmZ?wbhEHbQosX}gIrh<`yfw_XAft8V=m5Hf>wt=C6L7#I^08k%$iKnkC`wb>W5f!x){P`er zISV`@iy0WWK7cTz(;AZ*KtYytM_)$E)e-c?47?>FXd_r9RGcbJr{=KJX&hzKb z|NjT_M!{$ZjGz!;Z+)@@=v~H=AirP+hi5m^fE*i77srr_TfKdrd<+I0Opd?*n_pj& zG~M}eK~htvgZS>Q0Qp1n8r7~Gi7=O}VO4HlP`RWfeOttoggVD9GbXHO6g+ox>0MA5 Ndb;|#taD0e0suNuR676w literal 0 HcmV?d00001 diff --git a/lib/assets/images/reporting_engine/disk.gif b/lib/assets/images/reporting_engine/disk.gif new file mode 100644 index 0000000000000000000000000000000000000000..7e56515ad2f743bd5f8b4eb2c4e07c2eae62ae68 GIT binary patch literal 64 zcmZ?wbhEHbB&b}*GlEu}jan$tw I6cGk%03qlRd;kCd literal 0 HcmV?d00001 diff --git a/lib/assets/images/reporting_engine/disks.gif b/lib/assets/images/reporting_engine/disks.gif new file mode 100644 index 0000000000000000000000000000000000000000..df582582cbdc6e0c5e0163bdf0a0fa2f0b1c4d11 GIT binary patch literal 67 zcmZ?wbhEHbnb99Af5rT)t{mCEg5urg=A(g z{C|6SPb~9Xage|wB`SrZk2FOMYM!buln2sX?5Y+T78iB(Zu9cS7|LZyZ++}u$^oi1 z_j@S}bW9OzU2R+RMy&~OT>X-oZ98$jq#ogNfJ!BM-42wHGZk*6s2KD}U*IA%epmxb zm}|6BK9YoIF;*xSL!+z@<64lB7->LTW2Vi4ostCA(z&2XniwNIv}fFo-`MbG;)u4G z^p@F!)|9HhZprHd_vXjDoxs6WkK-6P0@lfxnGT>*p(QHoUV=u1FAqb@b%*W=a3{`LsH5k^AvQNL>6fPpy#oU(&MuH(*aEX4b35*} zn4n7)`I2U%=+Z=?BVZQ?vjQFW4gD@~XSOO6b{qu81`4&LFuU2(ilxW+1|ZkNMnWe79C$gs zWT?Ele|HR{JGPe)5BTW>0Ey?-Ls6S#GoV0tbt6ku7B&*0 z;i9QM$W1Rj*rRIdceL)rAOSl+sDe3LkB87<%){;ZdHp6|SNlopDXRx< zxBDF9-lTo&v`8$humFygUij@qgT=Qzhj8{ym2-{Xciwqq_Xwk%=O3B-MNAL_6e`3U zyxwmXex4`g0^1RYw~Dth3av3Dl^AAlpO3mG!nLr#&ZZ7c_wUboI+deC+&%TFjK2Lm z!Y&f1h|T_On%RCV&=4bx`!>(YezqGVhl&QpED?N6GV)HmzJ9&rh$x*i?*@o9#6QI< z5ZI_MRX;0+pY8$`j)eF#TlUyG(eE%E7S!rj;mj^M5vhUicPm zVWQ2z+imFyg}SRABmOBY_@osR!>7Ov!ioK`NB6_Rv}7Ud?35ed5Sb@?yND?kv~RCa wqs^a3Sh>&&L4)!LKI?D2&k@))k(LESaga|C278ChSzn3NWVkcuNoY&{0f?~U_5c6? literal 0 HcmV?d00001 diff --git a/lib/assets/images/reporting_engine/remove.gif b/lib/assets/images/reporting_engine/remove.gif new file mode 100644 index 0000000000000000000000000000000000000000..0ac6342b7e15af96fd338a2f3c20b8ccb189ad12 GIT binary patch literal 54 zcmZ?wbhEHb literal 0 HcmV?d00001 diff --git a/lib/assets/images/reporting_engine/remove.png b/lib/assets/images/reporting_engine/remove.png new file mode 100644 index 0000000000000000000000000000000000000000..bd2299292f45da3feb9eeb5028f4e7571dc46607 GIT binary patch literal 3744 zcmV;R4qx$!P)EX>4Tx0C?J+Q+HUC_ZB|i_hk=OLfG)Jmu!ImA|tE_$Pihg5Rw34gb)%y#f69p zRumNxoJdu~g4GI0orvO~D7a@qiilc^Ra`jkAKa(4eR}Wh?fcjJyyu+f{LXpL4}cL8 zCXwc%Y5+M>g*-agACFH+#L2yY0u@N$1RxOR%fe>`#Q*^C19^CUbg)1C0k3ZW0swH; zE+i7i;s1lWP$pLZAdvvzA`<5d0gzGv$SzdK6adH=0I*ZDWC{S3003-xd_p1ssto|_ z^hrJi0NAOM+!p}Yq8zCR0F40vnJ7mj0zkU}U{!%qECRs70HCZuA}$2Lt^t5qwlYTo zfV~9(c8*w(4?ti5fSE!p%m5%b0suoE6U_r4Oaq`W(!b!TUvP!ENC5!A%azTSOVTqG zxRuZvck=My;vwR~Y_URN7by^C3FIQ2mzyIKNaq7g&I|wm8u`(|{y0C7=jP<$=4R(? z@ASo@{%i1WB0eGU-~POe0t5gMPS5Y!U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-dOeP(OgoD?m@jM?(rBX)@hXW{z%Bym_-SFVS zr!et&96CDM;px+5c=-A_f z8nK|D0NK~B6_`vVSX}%DvaAjp8a~9UtE=o;j34{Yy1Ke|>~?#JUazMP4-Y{QggmIQun_Lw?}X7&hhno;>~5_8{P5ZKufO&5eMN3e zprxfn)!*OW;q`j`gb-1ZB*pLds{aW( zI5A7F~4}!ZSSPH zxtU5N5_&?2v8>Eo^8R}^O(JogJ&Q)-Diw*9l@+Hy8~*ynWBU^^`Yly0j^Jeg0000< KMNUMnLSTZ@qb_Oy literal 0 HcmV?d00001 diff --git a/assets/javascripts/cordinc_tooltip.js b/lib/assets/javascripts/cordinc_tooltip.js similarity index 100% rename from assets/javascripts/cordinc_tooltip.js rename to lib/assets/javascripts/cordinc_tooltip.js diff --git a/assets/javascripts/reporting.js b/lib/assets/javascripts/reporting.js similarity index 100% rename from assets/javascripts/reporting.js rename to lib/assets/javascripts/reporting.js diff --git a/assets/javascripts/reporting/controls.js b/lib/assets/javascripts/reporting/controls.js similarity index 100% rename from assets/javascripts/reporting/controls.js rename to lib/assets/javascripts/reporting/controls.js diff --git a/assets/javascripts/reporting/filters.js b/lib/assets/javascripts/reporting/filters.js similarity index 100% rename from assets/javascripts/reporting/filters.js rename to lib/assets/javascripts/reporting/filters.js diff --git a/assets/javascripts/reporting/group_bys.js b/lib/assets/javascripts/reporting/group_bys.js similarity index 100% rename from assets/javascripts/reporting/group_bys.js rename to lib/assets/javascripts/reporting/group_bys.js diff --git a/assets/javascripts/reporting/lang/reporting-de.js b/lib/assets/javascripts/reporting/lang/reporting-de.js similarity index 100% rename from assets/javascripts/reporting/lang/reporting-de.js rename to lib/assets/javascripts/reporting/lang/reporting-de.js diff --git a/assets/javascripts/reporting/lang/reporting-en.js b/lib/assets/javascripts/reporting/lang/reporting-en.js similarity index 100% rename from assets/javascripts/reporting/lang/reporting-en.js rename to lib/assets/javascripts/reporting/lang/reporting-en.js diff --git a/assets/javascripts/reporting/progressbar.js b/lib/assets/javascripts/reporting/progressbar.js similarity index 100% rename from assets/javascripts/reporting/progressbar.js rename to lib/assets/javascripts/reporting/progressbar.js diff --git a/assets/javascripts/reporting/prototype_progress_bar.js b/lib/assets/javascripts/reporting/prototype_progress_bar.js similarity index 100% rename from assets/javascripts/reporting/prototype_progress_bar.js rename to lib/assets/javascripts/reporting/prototype_progress_bar.js diff --git a/assets/javascripts/reporting/restore_query.js b/lib/assets/javascripts/reporting/restore_query.js similarity index 100% rename from assets/javascripts/reporting/restore_query.js rename to lib/assets/javascripts/reporting/restore_query.js diff --git a/lib/assets/javascripts/reporting_engine/cordinc_tooltip.js b/lib/assets/javascripts/reporting_engine/cordinc_tooltip.js new file mode 100644 index 0000000000..c4c2ee260c --- /dev/null +++ b/lib/assets/javascripts/reporting_engine/cordinc_tooltip.js @@ -0,0 +1,159 @@ +/* + * Copyright (c) 2009 Charles Cordingley (www.cordinc.com) + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * cordinc_tooltip.js, v1.0.2 - 27 August 2008 + * For help see www.cordinc.com/projects/tooltips.html + */ +var Tooltip = Class.create({ + initialize: function(target, tooltip) { + var options = Object.extend({ + start_effect: function(element) {}, + end_effect: function(element) {}, + zindex: 1000, + offset: {x:0, y:0}, + hook: {target:'topRight', tip:'bottomLeft'}, + trigger: false, + DOM_location: false, + className: false, + delay: {} + }, arguments[2] || {}); + this.target = $(target); + this.show_at = (options.show_at_id !== undefined) ? $(options.show_at_id) : undefined + this.tooltip = $(tooltip); + this.options = options; + this.event_target = this.options.trigger?$(this.options.trigger):this.target; + + if (this.options.className) { + this.tooltip.addClassName(this.options.className); + } + this.tooltip.hide(); + this.display=false; + + this.mouse_over = this.displayTooltip.bindAsEventListener(this); + this.mouse_out = this.removeTooltip.bindAsEventListener(this); + this.event_target.observe("mouseover", this.mouse_over); + this.event_target.observe("mouseout", this.mouse_out); + }, + + displayTooltip: function(event){ + event.stop(); + + if (this.display) {return;} + if (this.options.delay.start) { + var self = this; + this.timer_id = setTimeout(function(){self.timer_id = false; self.showTooltip(event);}, this.options.delay.start*1000); + } else { + this.showTooltip(event); + } + }, + + showTooltip: function(event) { + var show_at = (this.show_at !== undefined) ? this.show_at : this.target + this.display=true; + position = this.positionTooltip(event); + + this.clone = this.tooltip.cloneNode(true); + parentId = this.options.DOM_location?$(this.options.DOM_location.parentId):show_at.parentNode; + successorId = this.options.DOM_location?$(this.options.DOM_location.successorId):show_at; + parentId.insertBefore(this.clone, successorId); + + this.clone.setStyle({ + position: 'absolute', + top: position.top + "px", + left: position.left + "px", + display: "inline", + zIndex:this.options.zindex, + /* fix for ur dashboard */ + visibility: 'visible', + width: "400px" + }); + + if (this.options.start_effect) { + this.options.start_effect(this.clone); + } + }, + + positionTooltip: function(event) { + target_position = this.target.cumulativeOffset(); + + tooltip_dimensions = this.tooltip.getDimensions(); + target_dimensions = this.target.getDimensions(); + + this.positionModify(target_position, target_dimensions, this.options.hook.target, 1); + this.positionModify(target_position, tooltip_dimensions, this.options.hook.tip, -1); + + target_position.top += this.options.offset.y; + target_position.left += this.options.offset.x; + + return target_position; + }, + + positionModify: function(position, box, corner, neg) { + if (corner == 'topRight') { + position.left += box.width*neg; + } else if (corner == 'topLeft') { + } else if (corner == 'bottomLeft') { + position.top += box.height*neg; + } else if (corner == 'bottomRight') { + position.top += box.height*neg; + position.left += box.width*neg; + } else if (corner == 'topMid') { + position.left += (box.width/2)*neg; + } else if (corner == 'leftMid') { + position.top += (box.height/2)*neg; + } else if (corner == 'bottomMid') { + position.top += box.height*neg; + position.left += (box.width/2)*neg; + } else if (corner == 'rightMid') { + position.top += (box.height/2)*neg; + position.left += box.width*neg; + } + }, + + removeTooltip: function(event) { + if (this.timer_id) { + clearTimeout(this.timer_id); + this.timer_id = false; + return; + } + + if (this.options.end_effect) { + this.options.end_effect(this.clone); + } + + if (this.options.delay.end) { + var self = this; + setTimeout(function(){self.clearTooltip();}, this.options.delay.end*1000); + } else { + this.clearTooltip(); + } + }, + + clearTooltip: function() { + if (this.clone !== undefined && this.clone !== null) { + this.clone.remove(); + this.clone = null; + this.display=false; + } + }, + + destroy: function() { + this.event_target.stopObserving("mouseover", this.mouse_over); + this.event_target.stopObserving("mouseout", this.mouse_out); + this.clearTooltip(); + } +}) \ No newline at end of file diff --git a/lib/assets/javascripts/reporting_engine/reporting.js b/lib/assets/javascripts/reporting_engine/reporting.js new file mode 100644 index 0000000000..8bb67904ce --- /dev/null +++ b/lib/assets/javascripts/reporting_engine/reporting.js @@ -0,0 +1,72 @@ +/*jslint white: false, nomen: true, devel: true, on: true, debug: false, evil: true, onevar: false, browser: true, white: false, indent: 2 */ +/*global window, $, $$, Reporting, Element */ + +window.Reporting = { + source: ($$("head")[0].select("script[src*='reporting.js']")[0].src), + + require: function (libraryName) { + var jsName = Reporting.source.replace("reporting.js", "reporting/" + libraryName + ".js"); + try { + // inserting via DOM fails in Safari 2.0, so brute force approach + document.write('