rsence 2.0.0.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (311) hide show
  1. data/INSTALL.rdoc +295 -0
  2. data/LICENSE +622 -0
  3. data/README.rdoc +24 -0
  4. data/VERSION +1 -0
  5. data/bin/build_client.rb +254 -0
  6. data/bin/help +6 -0
  7. data/bin/launch.rb +120 -0
  8. data/bin/rdoc.sh +2 -0
  9. data/bin/restart +6 -0
  10. data/bin/rsence +120 -0
  11. data/bin/run +6 -0
  12. data/bin/run.rb +6 -0
  13. data/bin/save +6 -0
  14. data/bin/start +6 -0
  15. data/bin/status +6 -0
  16. data/bin/stop +6 -0
  17. data/conf/config.ru +5 -0
  18. data/conf/default_conf.yaml +337 -0
  19. data/conf/default_strings.yaml +77 -0
  20. data/conf/local_conf.yaml +14 -0
  21. data/conf/unicorn.conf +78 -0
  22. data/js/comm/comm/autosync/autosync.js +18 -0
  23. data/js/comm/comm/autosync/js.inc +0 -0
  24. data/js/comm/comm/comm.js +195 -0
  25. data/js/comm/comm/js.inc +0 -0
  26. data/js/comm/comm/queue/js.inc +0 -0
  27. data/js/comm/comm/queue/queue.js +183 -0
  28. data/js/comm/comm/session/js.inc +0 -0
  29. data/js/comm/comm/session/session.js +51 -0
  30. data/js/comm/comm/sessionwatcher/js.inc +0 -0
  31. data/js/comm/comm/sessionwatcher/sessionwatcher.js +43 -0
  32. data/js/comm/comm/transporter/js.inc +0 -0
  33. data/js/comm/comm/transporter/transporter.js +257 -0
  34. data/js/comm/comm/urlresponder/js.inc +0 -0
  35. data/js/comm/comm/urlresponder/urlresponder.js +148 -0
  36. data/js/comm/comm/values/js.inc +0 -0
  37. data/js/comm/comm/values/values.js +432 -0
  38. data/js/comm/jsloader/js.inc +0 -0
  39. data/js/comm/jsloader/jsloader.js +114 -0
  40. data/js/comm/reloadapp/js.inc +0 -0
  41. data/js/comm/reloadapp/reloadapp.js +150 -0
  42. data/js/comm/reloadapp/themes/default/reloadapp_warning-ie6.gif +0 -0
  43. data/js/comm/reloadapp/themes/default/reloadapp_warning.png +0 -0
  44. data/js/comm/sha/js.inc +0 -0
  45. data/js/comm/sha/sha.js +432 -0
  46. data/js/comm/values/value/js.inc +0 -0
  47. data/js/comm/values/value/value.js +182 -0
  48. data/js/comm/values/valuematrix/js.inc +0 -0
  49. data/js/comm/values/valuematrix/valuematrix.js +138 -0
  50. data/js/controls/button/button.js +57 -0
  51. data/js/controls/button/js.inc +0 -0
  52. data/js/controls/button/themes/bright/button.css +89 -0
  53. data/js/controls/button/themes/bright/button.html +7 -0
  54. data/js/controls/button/themes/bright/button_parts1-ie6.gif +0 -0
  55. data/js/controls/button/themes/bright/button_parts1.png +0 -0
  56. data/js/controls/button/themes/default/button.css +89 -0
  57. data/js/controls/button/themes/default/button.html +7 -0
  58. data/js/controls/button/themes/default/button_parts1-ie6.gif +0 -0
  59. data/js/controls/button/themes/default/button_parts1.png +0 -0
  60. data/js/controls/checkbox/checkbox.js +47 -0
  61. data/js/controls/checkbox/js.inc +0 -0
  62. data/js/controls/checkbox/themes/default/checkbox.css +69 -0
  63. data/js/controls/checkbox/themes/default/checkbox.html +5 -0
  64. data/js/controls/checkbox/themes/default/checkbox_parts1-ie6.gif +0 -0
  65. data/js/controls/checkbox/themes/default/checkbox_parts1.png +0 -0
  66. data/js/controls/datetime/calendar/calendar.js +197 -0
  67. data/js/controls/datetime/calendar/js.inc +0 -0
  68. data/js/controls/datetime/calendar/themes/default/calendar.css +108 -0
  69. data/js/controls/datetime/calendar/themes/default/calendar.html +9 -0
  70. data/js/controls/datetime/calendar/themes/default/calendar_arrows-ie6.gif +0 -0
  71. data/js/controls/datetime/calendar/themes/default/calendar_arrows.png +0 -0
  72. data/js/controls/datetime/datetimevalue/datetimevalue.js +246 -0
  73. data/js/controls/datetime/datetimevalue/js.inc +0 -0
  74. data/js/controls/datetime/timesheet/js.inc +0 -0
  75. data/js/controls/datetime/timesheet/themes/default/timesheet.css +30 -0
  76. data/js/controls/datetime/timesheet/themes/default/timesheet.html +2 -0
  77. data/js/controls/datetime/timesheet/timesheet.js +182 -0
  78. data/js/controls/datetime/timesheet_item/js.inc +0 -0
  79. data/js/controls/datetime/timesheet_item/themes/default/timesheet_item.css +42 -0
  80. data/js/controls/datetime/timesheet_item/themes/default/timesheet_item.html +8 -0
  81. data/js/controls/datetime/timesheet_item/timesheet_item.js +247 -0
  82. data/js/controls/datetime/timesheet_item_edit/js.inc +0 -0
  83. data/js/controls/datetime/timesheet_item_edit/timesheet_item_edit.js +274 -0
  84. data/js/controls/dialogs/alert_sheet/alert_sheet.js +62 -0
  85. data/js/controls/dialogs/alert_sheet/js.inc +0 -0
  86. data/js/controls/dialogs/confirm_sheet/confirm_sheet.js +36 -0
  87. data/js/controls/dialogs/confirm_sheet/js.inc +0 -0
  88. data/js/controls/dialogs/sheet/js.inc +0 -0
  89. data/js/controls/dialogs/sheet/sheet.js +83 -0
  90. data/js/controls/dialogs/sheet/themes/default/sheet.css +64 -0
  91. data/js/controls/dialogs/sheet/themes/default/sheet.html +14 -0
  92. data/js/controls/dialogs/sheet/themes/default/sheet_bg-ie6.gif +0 -0
  93. data/js/controls/dialogs/sheet/themes/default/sheet_bg.png +0 -0
  94. data/js/controls/dialogs/sheet/themes/default/sheet_dim-ie6.gif +0 -0
  95. data/js/controls/dialogs/sheet/themes/default/sheet_dim.png +0 -0
  96. data/js/controls/dialogs/sheet/themes/default/sheet_parts1-ie6.gif +0 -0
  97. data/js/controls/dialogs/sheet/themes/default/sheet_parts1.png +0 -0
  98. data/js/controls/dialogs/sheet/themes/default/sheet_parts2-ie6.gif +0 -0
  99. data/js/controls/dialogs/sheet/themes/default/sheet_parts2.png +0 -0
  100. data/js/controls/dialogs/sheet/themes/default/sheet_warning-ie6.gif +0 -0
  101. data/js/controls/dialogs/sheet/themes/default/sheet_warning.png +0 -0
  102. data/js/controls/imageview/imageview.js +108 -0
  103. data/js/controls/imageview/js.inc +0 -0
  104. data/js/controls/imageview/themes/default/blank.gif +0 -0
  105. data/js/controls/lists/checkboxlist/checkboxlist.js +170 -0
  106. data/js/controls/lists/checkboxlist/js.inc +0 -0
  107. data/js/controls/lists/listitems/js.inc +0 -0
  108. data/js/controls/lists/listitems/listitems.js +65 -0
  109. data/js/controls/lists/radiobuttonlist/js.inc +0 -0
  110. data/js/controls/lists/radiobuttonlist/radiobuttonlist.js +126 -0
  111. data/js/controls/passwordcontrol/js.inc +0 -0
  112. data/js/controls/passwordcontrol/passwordcontrol.js +22 -0
  113. data/js/controls/passwordcontrol/themes/default/passwordcontrol.css +0 -0
  114. data/js/controls/passwordcontrol/themes/default/passwordcontrol.html +18 -0
  115. data/js/controls/progress/progressbar/js.inc +0 -0
  116. data/js/controls/progress/progressbar/progressbar.js +36 -0
  117. data/js/controls/progress/progressbar/themes/default/progressbar.css +16 -0
  118. data/js/controls/progress/progressbar/themes/default/progressbar.html +2 -0
  119. data/js/controls/progress/progressindicator/js.inc +0 -0
  120. data/js/controls/progress/progressindicator/progressindicator.js +43 -0
  121. data/js/controls/radiobutton/js.inc +0 -0
  122. data/js/controls/radiobutton/radiobutton.js +41 -0
  123. data/js/controls/radiobutton/themes/default/radiobutton.css +69 -0
  124. data/js/controls/radiobutton/themes/default/radiobutton.html +5 -0
  125. data/js/controls/radiobutton/themes/default/radiobutton_parts1-ie6.gif +0 -0
  126. data/js/controls/radiobutton/themes/default/radiobutton_parts1.png +0 -0
  127. data/js/controls/sliders/slider/js.inc +0 -0
  128. data/js/controls/sliders/slider/slider.js +356 -0
  129. data/js/controls/sliders/slider/themes/default/hslider_tracks-ie6.gif +0 -0
  130. data/js/controls/sliders/slider/themes/default/hslider_tracks.png +0 -0
  131. data/js/controls/sliders/slider/themes/default/slider.css +108 -0
  132. data/js/controls/sliders/slider/themes/default/slider.html +5 -0
  133. data/js/controls/sliders/slider/themes/default/slider_thumbs-ie6.gif +0 -0
  134. data/js/controls/sliders/slider/themes/default/slider_thumbs.png +0 -0
  135. data/js/controls/sliders/vslider/js.inc +0 -0
  136. data/js/controls/sliders/vslider/themes/default/vslider.css +52 -0
  137. data/js/controls/sliders/vslider/themes/default/vslider.html +5 -0
  138. data/js/controls/sliders/vslider/themes/default/vslider_tracks-ie6.gif +0 -0
  139. data/js/controls/sliders/vslider/themes/default/vslider_tracks.png +0 -0
  140. data/js/controls/sliders/vslider/vslider.js +40 -0
  141. data/js/controls/stepper/js.inc +0 -0
  142. data/js/controls/stepper/stepper.js +212 -0
  143. data/js/controls/stepper/themes/default/stepper-ie6.gif +0 -0
  144. data/js/controls/stepper/themes/default/stepper.css +14 -0
  145. data/js/controls/stepper/themes/default/stepper.html +2 -0
  146. data/js/controls/stepper/themes/default/stepper.png +0 -0
  147. data/js/controls/stringview/js.inc +0 -0
  148. data/js/controls/stringview/stringview.js +49 -0
  149. data/js/controls/stringview/themes/default/stringview.css +8 -0
  150. data/js/controls/stringview/themes/default/stringview.html +1 -0
  151. data/js/controls/tab/js.inc +0 -0
  152. data/js/controls/tab/tab.js +276 -0
  153. data/js/controls/tab/themes/bright/tab.css +76 -0
  154. data/js/controls/tab/themes/bright/tab.html +6 -0
  155. data/js/controls/tab/themes/bright/tab_bg_color-ie6.gif +0 -0
  156. data/js/controls/tab/themes/bright/tab_bg_color.png +0 -0
  157. data/js/controls/tab/themes/bright/tab_border_pattern-ie6.gif +0 -0
  158. data/js/controls/tab/themes/bright/tab_border_pattern.png +0 -0
  159. data/js/controls/tab/themes/bright/tab_parts1-ie6.gif +0 -0
  160. data/js/controls/tab/themes/bright/tab_parts1.png +0 -0
  161. data/js/controls/tab/themes/default/tab.css +77 -0
  162. data/js/controls/tab/themes/default/tab.html +6 -0
  163. data/js/controls/tab/themes/default/tab_bg_color-ie6.gif +0 -0
  164. data/js/controls/tab/themes/default/tab_bg_color.png +0 -0
  165. data/js/controls/tab/themes/default/tab_border_pattern-ie6.gif +0 -0
  166. data/js/controls/tab/themes/default/tab_border_pattern.png +0 -0
  167. data/js/controls/tab/themes/default/tab_parts1-ie6.gif +0 -0
  168. data/js/controls/tab/themes/default/tab_parts1.png +0 -0
  169. data/js/controls/textarea/js.inc +0 -0
  170. data/js/controls/textarea/textarea.js +23 -0
  171. data/js/controls/textarea/themes/default/textarea.css +21 -0
  172. data/js/controls/textarea/themes/default/textarea.html +18 -0
  173. data/js/controls/textcontrol/js.inc +0 -0
  174. data/js/controls/textcontrol/textcontrol.js +372 -0
  175. data/js/controls/textcontrol/themes/default/textcontrol.css +107 -0
  176. data/js/controls/textcontrol/themes/default/textcontrol.html +18 -0
  177. data/js/controls/textcontrol/themes/default/textcontrol_parts1-ie6.gif +0 -0
  178. data/js/controls/textcontrol/themes/default/textcontrol_parts1.png +0 -0
  179. data/js/controls/textcontrol/themes/default/textcontrol_parts2-ie6.gif +0 -0
  180. data/js/controls/textcontrol/themes/default/textcontrol_parts2.png +0 -0
  181. data/js/controls/textcontrol/themes/default/textcontrol_parts3-ie6.gif +0 -0
  182. data/js/controls/textcontrol/themes/default/textcontrol_parts3.png +0 -0
  183. data/js/controls/uploader/js.inc +0 -0
  184. data/js/controls/uploader/themes/default/upload_progress.gif +0 -0
  185. data/js/controls/uploader/themes/default/uploader.css +108 -0
  186. data/js/controls/uploader/themes/default/uploader.html +27 -0
  187. data/js/controls/uploader/uploader.js +153 -0
  188. data/js/controls/validatorview/js.inc +0 -0
  189. data/js/controls/validatorview/themes/default/validator-ie6.gif +0 -0
  190. data/js/controls/validatorview/themes/default/validator.png +0 -0
  191. data/js/controls/validatorview/themes/default/validatorview.css +0 -0
  192. data/js/controls/validatorview/themes/default/validatorview.html +0 -0
  193. data/js/controls/validatorview/validatorview.js +55 -0
  194. data/js/controls/window/js.inc +0 -0
  195. data/js/controls/window/themes/default/window.css +219 -0
  196. data/js/controls/window/themes/default/window.html +17 -0
  197. data/js/controls/window/themes/default/window_bg_active-ie6.gif +0 -0
  198. data/js/controls/window/themes/default/window_bg_active.png +0 -0
  199. data/js/controls/window/themes/default/window_bg_inactive-ie6.gif +0 -0
  200. data/js/controls/window/themes/default/window_bg_inactive.png +0 -0
  201. data/js/controls/window/themes/default/window_buttons-ie6.gif +0 -0
  202. data/js/controls/window/themes/default/window_buttons.png +0 -0
  203. data/js/controls/window/themes/default/window_parts1-ie6.gif +0 -0
  204. data/js/controls/window/themes/default/window_parts1.png +0 -0
  205. data/js/controls/window/themes/default/window_parts2-ie6.gif +0 -0
  206. data/js/controls/window/themes/default/window_parts2.png +0 -0
  207. data/js/controls/window/window.js +284 -0
  208. data/js/core/class/class.js +317 -0
  209. data/js/core/class/js.inc +0 -0
  210. data/js/core/elem/elem.js +1376 -0
  211. data/js/core/elem/js.inc +0 -0
  212. data/js/core/event/event.js +1021 -0
  213. data/js/core/event/js.inc +0 -0
  214. data/js/core/iefix/ie_css_element.htc +5 -0
  215. data/js/core/iefix/ie_css_style.htc +5 -0
  216. data/js/core/iefix/iefix.js +359 -0
  217. data/js/core/iefix/js.inc +0 -0
  218. data/js/debugg/debugg.js +43 -0
  219. data/js/debugg/js.inc +0 -0
  220. data/js/foundation/application/application.js +209 -0
  221. data/js/foundation/application/js.inc +0 -0
  222. data/js/foundation/control/control.js +342 -0
  223. data/js/foundation/control/controldefaults/controldefaults.js +59 -0
  224. data/js/foundation/control/controldefaults/js.inc +0 -0
  225. data/js/foundation/control/dummyvalue/dummyvalue.js +50 -0
  226. data/js/foundation/control/dummyvalue/js.inc +0 -0
  227. data/js/foundation/control/dyncontrol/dyncontrol.js +494 -0
  228. data/js/foundation/control/dyncontrol/js.inc +0 -0
  229. data/js/foundation/control/dyncontrol/themes/default/dyncontrol.css +0 -0
  230. data/js/foundation/control/dyncontrol/themes/default/dyncontrol.html +0 -0
  231. data/js/foundation/control/eventresponder/eventresponder.js +713 -0
  232. data/js/foundation/control/eventresponder/js.inc +0 -0
  233. data/js/foundation/control/js.inc +0 -0
  234. data/js/foundation/control/valueresponder/js.inc +0 -0
  235. data/js/foundation/control/valueresponder/valueresponder.js +77 -0
  236. data/js/foundation/geom/point/js.inc +0 -0
  237. data/js/foundation/geom/point/point.js +202 -0
  238. data/js/foundation/geom/rect/js.inc +0 -0
  239. data/js/foundation/geom/rect/rect.js +610 -0
  240. data/js/foundation/json_renderer/js.inc +0 -0
  241. data/js/foundation/json_renderer/json_renderer.js +231 -0
  242. data/js/foundation/system/js.inc +0 -0
  243. data/js/foundation/system/system.js +369 -0
  244. data/js/foundation/thememanager/js.inc +0 -0
  245. data/js/foundation/thememanager/thememanager.js +387 -0
  246. data/js/foundation/view/js.inc +0 -0
  247. data/js/foundation/view/markupview/js.inc +0 -0
  248. data/js/foundation/view/markupview/markupview.js +113 -0
  249. data/js/foundation/view/morphanimation/js.inc +0 -0
  250. data/js/foundation/view/morphanimation/morphanimation.js +236 -0
  251. data/js/foundation/view/view.js +1804 -0
  252. data/js/foundation/view/viewdefaults/js.inc +0 -0
  253. data/js/foundation/view/viewdefaults/viewdefaults.js +25 -0
  254. data/js/views/centerview/centerview.js +45 -0
  255. data/js/views/centerview/js.inc +0 -0
  256. data/js/views/inlineview/inlineview.js +14 -0
  257. data/js/views/inlineview/js.inc +0 -0
  258. data/js/views/scrollview/js.inc +0 -0
  259. data/js/views/scrollview/scrollview.js +39 -0
  260. data/lib/conf/default.rb +220 -0
  261. data/lib/conf/wizard.rb +303 -0
  262. data/lib/daemon/daemon.rb +293 -0
  263. data/lib/http/broker.rb +102 -0
  264. data/lib/http/rackup.rb +88 -0
  265. data/lib/http/request.rb +69 -0
  266. data/lib/http/response.rb +63 -0
  267. data/lib/plugins/gui_plugin.rb +129 -0
  268. data/lib/plugins/guiparser.rb +114 -0
  269. data/lib/plugins/plugin.rb +652 -0
  270. data/lib/plugins/plugin_plugins.rb +47 -0
  271. data/lib/plugins/plugin_sqlite_db.rb +72 -0
  272. data/lib/plugins/plugin_util.rb +96 -0
  273. data/lib/plugins/pluginmanager.rb +517 -0
  274. data/lib/plugins/servlet.rb +69 -0
  275. data/lib/session/msg.rb +291 -0
  276. data/lib/session/sessionmanager.rb +491 -0
  277. data/lib/session/sessionstorage.rb +314 -0
  278. data/lib/transporter/transporter.rb +254 -0
  279. data/lib/util/gzstring.rb +5 -0
  280. data/lib/values/hvalue.rb +323 -0
  281. data/lib/values/valuemanager.rb +152 -0
  282. data/plugins/client_pkg/client_pkg.rb +186 -0
  283. data/plugins/client_pkg/info.yaml +25 -0
  284. data/plugins/client_pkg/lib/client_pkg_build.rb +569 -0
  285. data/plugins/client_pkg/lib/client_pkg_cache.rb +50 -0
  286. data/plugins/client_pkg/lib/client_pkg_serve.rb +210 -0
  287. data/plugins/client_pkg/log/build_log +0 -0
  288. data/plugins/index_html/img/loading.gif +0 -0
  289. data/plugins/index_html/img/riassence.gif +0 -0
  290. data/plugins/index_html/index_html.rb +150 -0
  291. data/plugins/index_html/tmpl/index.html +22 -0
  292. data/plugins/index_html/tmpl/startup_index.html +29 -0
  293. data/plugins/legacy/disabled +0 -0
  294. data/plugins/legacy/disabled- +0 -0
  295. data/plugins/legacy/info.yaml +22 -0
  296. data/plugins/legacy/legacy.rb +15 -0
  297. data/plugins/main/js/riassence_ns.js +87 -0
  298. data/plugins/main/main.rb +234 -0
  299. data/plugins/main/values.yaml +8 -0
  300. data/plugins/ticketservices/lib/common.rb +300 -0
  301. data/plugins/ticketservices/lib/favicon.rb +38 -0
  302. data/plugins/ticketservices/lib/file.rb +58 -0
  303. data/plugins/ticketservices/lib/img.rb +50 -0
  304. data/plugins/ticketservices/lib/objblob.rb +66 -0
  305. data/plugins/ticketservices/lib/rsrc.rb +34 -0
  306. data/plugins/ticketservices/lib/upload.rb +206 -0
  307. data/plugins/ticketservices/ticketservices.rb +268 -0
  308. data/var/db/.git_include +0 -0
  309. data/var/log/.git_include +0 -0
  310. data/var/run/.git_include +0 -0
  311. metadata +390 -0
File without changes
@@ -0,0 +1,108 @@
1
+ .calendar_control {
2
+ position: absolute;
3
+ left: 0px; top: 0px; right: 1px; bottom: 1px;
4
+ border: 1px solid #999;
5
+ }
6
+ .calendar_head {
7
+ position: absolute;
8
+ left: 0px; top: 0px; right: 0px; height: 20px;
9
+ }
10
+ .calendar_head_prev_month,
11
+ .calendar_head_next_month {
12
+ position: absolute;
13
+ top: 2px; width: 16px; height: 16px;
14
+ font-size: 0; line-height: 0;
15
+ line-height: 20px;
16
+ cursor: pointer;
17
+ background-image: #{this.getCssFilePath('calendar_arrows.png')};
18
+ }
19
+ .calendar_head_prev_month {
20
+ background-position: 0px 0px;
21
+ left: 2px;
22
+ }
23
+ .calendar_head_next_month {
24
+ background-position: -16px 0px;
25
+ right: 2px;
26
+ }
27
+ .calendar_head_prev_month:hover {
28
+ background-position: 0px -16px;
29
+ }
30
+ .calendar_head_next_month:hover {
31
+ background-position: -16px -16px;
32
+ }
33
+ .calendar_head_prev_month:active,
34
+ .calendar_head_next_month:active {
35
+ background-color: #fff;
36
+ }
37
+ .calender_head_month_year {
38
+ position: absolute;
39
+ top: 0px; left: 20px; right: 20px; height: 20px;
40
+ color: #000;
41
+ font-family: Arial, sans-serif;
42
+ font-weight: bold;
43
+ font-size: 13px;
44
+ line-height: 20px;
45
+ vertical-align: middle;
46
+ text-align: center;
47
+ }
48
+ .calendar_weekdays {
49
+ position: absolute;
50
+ top: 20px; left: 0px; right: 0px; height: 15px;
51
+ }
52
+ .calendar_weekdays div {
53
+ position: absolute;
54
+ top: 0px; height: 15px; width: 25px;
55
+ color: #000;
56
+ font-family: Arial, sans-serif;
57
+ font-size: 11px;
58
+ line-height: 15px;
59
+ vertical-align: middle;
60
+ text-align: center;
61
+ }
62
+ .calendar_weeks {
63
+ position: absolute;
64
+ top: 34px; left: 0px; right: 2px; bottom: 2px;
65
+ }
66
+ .calendar_weeks_week_row {
67
+ position: absolute;
68
+ left: 0px; right: 0px;
69
+ }
70
+ .calendar_weeks_week_col_no,
71
+ .calendar_weeks_week_col_sel,
72
+ .calendar_weeks_week_col_wk,
73
+ .calendar_weeks_week_col_yes {
74
+ position: absolute;
75
+ text-decoration: none;
76
+ top: 0px;
77
+ font-family: Arial, sans-serif;
78
+ font-size: 15px;
79
+ vertical-align: middle;
80
+ text-align: center;
81
+ cursor: pointer;
82
+ }
83
+ .calendar_weeks_week_col_wk {
84
+ color: #000;
85
+ cursor: default;
86
+ }
87
+ .calendar_weeks_week_col_no {
88
+ color: #666;
89
+ border-left: 1px solid #999;
90
+ border-top: 1px solid #999;
91
+ }
92
+ .calendar_weeks_week_col_no:hover {
93
+ background-color: #fff;
94
+ color: #000;
95
+ }
96
+ .calendar_weeks_week_col_yes,
97
+ .calendar_weeks_week_col_sel {
98
+ color: #000;
99
+ background-color: #ddd;
100
+ font-weight: bold;
101
+ border-left: 1px solid #666;
102
+ border-top: 1px solid #666;
103
+ }
104
+ .calendar_weeks_week_col_sel,
105
+ .calendar_weeks_week_col_yes:hover {
106
+ background-color: #fff;
107
+ }
108
+
@@ -0,0 +1,9 @@
1
+ <div class="calendar_control" id="control#{_ID}">
2
+ <div class="calendar_head">
3
+ <div class="calendar_head_prev_month" onclick="HSystem.views[#{this.viewId}].prevMonth();"></div>
4
+ <div class="calender_head_month_year" id="state#{_ID}"></div>
5
+ <div class="calendar_head_next_month" onclick="HSystem.views[#{this.viewId}].nextMonth();"></div>
6
+ </div>
7
+ <div class="calendar_weekdays" id="label#{_ID}"></div>
8
+ <div class="calendar_weeks" id="value#{_ID}"></div>
9
+ </div>
@@ -0,0 +1,246 @@
1
+ /* Riassence Framework
2
+ * Copyright 2009 Riassence Inc.
3
+ * http://riassence.com/
4
+ *
5
+ * You should have received a copy of the GNU General Public License along
6
+ * with this software package. If not, contact licensing@riassence.com
7
+ */
8
+
9
+
10
+ /*** = Description
11
+ ** Auxiliary class for time handling.
12
+ ***/
13
+ HDateTime = HClass.extend({
14
+ msWeek: 604800000,
15
+ msDay: 86400000,
16
+ msHour: 3600000,
17
+ msMinute: 60000,
18
+ months_localized: [
19
+ 'January', 'February', 'March', 'April', 'May', 'June', 'July',
20
+ 'August', 'September', 'October', 'November', 'December'
21
+ ],
22
+
23
+ /** = Description
24
+ * Returns month name of the given date.
25
+ *
26
+ * = Parameters
27
+ * +_date+:: Date to return month name from.
28
+ *
29
+ * = Returns
30
+ * Month name
31
+ *
32
+ **/
33
+ monthName: function(_date){
34
+ _date = (_date instanceof Date)?_date:this.date();
35
+ return this.months_localized[_date.getUTCMonth()];
36
+ },
37
+
38
+ /** = Description
39
+ * Returns week number for date given as input.
40
+ *
41
+ * = Parameters
42
+ * +_date+:: Date to return week number from.
43
+ *
44
+ * = Returns
45
+ * Number of the week.
46
+ *
47
+ **/
48
+ week: function(_date){
49
+ _date = (_date instanceof Date)?_date:this.date();
50
+ var _firstDateOfYear = this.firstDateOfYear(_date),
51
+ _firstWeekOfYear = this.firstDateOfWeek(_firstDateOfYear);
52
+ if(_firstWeekOfYear.getUTCDate()<=28){
53
+ _firstWeekOfYear = new Date(_firstWeekOfYear.getTime()+this.msWeek-this.tzMs(_firstWeekOfYear));
54
+ }
55
+ var _week = Math.ceil(
56
+ ( ( ( _date.getTime() - _firstWeekOfYear - this.tzMs(_date) ) / this.msDay ) + _firstDateOfYear.getUTCDay() + 1 ) / 7
57
+ );
58
+ if((_week === 53) && (this.firstDateOfWeek(this.lastDateOfYear(_date)).getUTCDate() > 28 )){
59
+ _week = 1;
60
+ }
61
+ return _week;
62
+ },
63
+
64
+ /** = Description
65
+ * Returns day of the month for the date given as input.
66
+ *
67
+ * = Parameters
68
+ * +_date+:: Date to return day of the month.
69
+ *
70
+ * = Returns
71
+ * Day of the month
72
+ *
73
+ **/
74
+ mday: function(_date){
75
+ _date = (_date instanceof Date)?_date:this.date();
76
+ return _date.getUTCDate();
77
+ },
78
+
79
+ /** = Description
80
+ * Returns month number for the date given as input.
81
+ * Note that months are numbered from 0 to 11.
82
+ *
83
+ * = Parameters
84
+ * +_date+:: Date to return month number from.
85
+ *
86
+ * = Returns
87
+ * Number of the month 0 (January) to 11 (December).
88
+ *
89
+ **/
90
+ month: function(_date){
91
+ _date = (_date instanceof Date)?_date:this.date();
92
+ return _date.getUTCMonth();
93
+ },
94
+
95
+ /** = Description
96
+ * Returns year for given date.
97
+ *
98
+ * = Parameters
99
+ * +_date+:: Date to return year from.
100
+ *
101
+ * = Returns
102
+ * Year
103
+ *
104
+ **/
105
+ year: function(_date){
106
+ _date = (_date instanceof Date)?_date:this.date();
107
+ return _date.getUTCFullYear();
108
+ },
109
+
110
+ /** = Description
111
+ * Returns the timezone offset in milliseconds.
112
+ *
113
+ * = Parameters
114
+ * +_date+:: The date to get timezone offset from.
115
+ *
116
+ * = Returns
117
+ * Timezone offset in milliseconds.
118
+ *
119
+ **/
120
+ tzMs: function(_date){
121
+ return _date.getTimezoneOffset()*this.msMinute;
122
+ },
123
+
124
+ /** = Description
125
+ * Returns a Date instance for epoch given in seconds.
126
+ *
127
+ * = Parameters
128
+ * +epoch_seconds+:: Point of time given in seconds
129
+ * since 1 January 1970 00:00:00 UTC.
130
+ *
131
+ * = Returns
132
+ * Date object
133
+ *
134
+ **/
135
+ date: function(epoch_seconds){
136
+ epoch_seconds = (typeof epoch_seconds === 'number')?epoch_seconds:this.value;
137
+ var _date = new Date(epoch_seconds*1000);
138
+ return _date;
139
+ },
140
+
141
+ /** = Description
142
+ * Returns a Date object with first millisecond of the year.
143
+ *
144
+ * = Parameters
145
+ * +_date+:: The date to get the first millisecond of the same year.
146
+ *
147
+ * = Returns
148
+ * The Date object for the first millisecond of the year
149
+ *
150
+ **/
151
+ firstDateOfYear: function(_date){
152
+ _date = (_date instanceof Date)?_date:this.date();
153
+ var _date1 = new Date( _date.getUTCFullYear(), 0, 1 ),
154
+ _date2 = new Date( _date1.getTime() - this.tzMs(_date1) );
155
+ return _date2;
156
+ },
157
+
158
+ /** = Description
159
+ * Get last millisecond of the input given date's year as a Date object.
160
+ *
161
+ * = Parameters
162
+ * +_date+:: The last millisecond of the year on the date given.
163
+ *
164
+ * = Returns
165
+ * Last millisecond of the year as a Date object.
166
+ *
167
+ **/
168
+ lastDateOfYear: function(_date){
169
+ _date = (_date instanceof Date)?_date:this.date();
170
+ var _date1 = new Date( new Date( _date.getUTCFullYear()+1, 0, 1 ) - 1 ),
171
+ _date2 = new Date( _date1.getTime() - this.tzMs(_date1) );
172
+ return _date2;
173
+ },
174
+
175
+ /** = Description
176
+ * Returns the first millisecond of the input given date's month.
177
+ *
178
+ * = Parameters
179
+ * +_date+:: The date to get the first millisecond of the month
180
+ *
181
+ * = Returns
182
+ * The first millisecond on the given date's month as a Date object.
183
+ *
184
+ **/
185
+ firstDateOfMonth: function(_date){
186
+ _date = (_date instanceof Date)?_date:this.date();
187
+ var _date1 = new Date( _date.getUTCFullYear(), _date.getUTCMonth(), 1 ),
188
+ _date2 = new Date( _date1.getTime() - this.tzMs(_date1) );
189
+ return _date2;
190
+ },
191
+
192
+ /** = Description
193
+ * Returns the last millisecond of the input given date's month.
194
+ *
195
+ * = Parameters
196
+ * +_date+:: The date to get the last millisecond of the month.
197
+ *
198
+ * = Returns
199
+ * The last millisecond of the given date's month as a Date object.
200
+ *
201
+ **/
202
+ lastDateOfMonth: function(_date){
203
+ _date = (_date instanceof Date)?_date:this.date();
204
+ var _date1 = new Date( new Date( _date.getUTCFullYear(), _date.getUTCMonth()+1, 1 ) - 1 ),
205
+ _date2 = new Date( _date1.getTime() - this.tzMs(_date1) );
206
+ return _date2;
207
+ },
208
+
209
+ /** = Description
210
+ * Returns the first millisecond when the week starts for date given as input.
211
+ *
212
+ * = Parameters
213
+ * +_date+:: The date to get the first millisecond.
214
+ *
215
+ * = Returns
216
+ * Date for the first millisecond of the week.
217
+ *
218
+ **/
219
+ firstDateOfWeek: function(_date){
220
+ _date = (_date instanceof Date)?_date:this.date();
221
+ var _wday = _date.getUTCDay();
222
+ if(_wday===0){
223
+ _wday = 7;
224
+ }
225
+ var _dateMs = ((_wday-1)*this.msDay),
226
+ _date1 = new Date( _date.getTime() - _dateMs ),
227
+ _date2 = new Date( _date1.getTime() );
228
+ return _date2;
229
+ },
230
+
231
+ /** = Description
232
+ * Returns the last millisecond of the week for the given date.
233
+ *
234
+ * = Parameters
235
+ * +_date+:: The date to get the last millisecond
236
+ *
237
+ * = Returns
238
+ * The last millisecond of the week as a Date object.
239
+ *
240
+ **/
241
+ lastDateOfWeek: function(_date){
242
+ var _firstDateOfWeek = this.firstDateOfWeek(_date),
243
+ _lastDateOfWeek = new Date( _firstDateOfWeek.getTime() + this.msWeek - this.msDay - 1 );
244
+ return _lastDateOfWeek;
245
+ }
246
+ });
File without changes
File without changes
@@ -0,0 +1,30 @@
1
+ .timesheet_hours_col {
2
+ position: absolute;
3
+ top: 0px; left: 0px; width: 32px;
4
+ font-family: Arial, sans-serif;
5
+ font-size: 11px;
6
+ color: #666;
7
+ vertical-align: middle;
8
+ text-align: right;
9
+ }
10
+ .timesheet_hours_row {
11
+ position: absolute;
12
+ left: 0px; width: 32px;
13
+ }
14
+ .timesheet_lines_col {
15
+ position: absolute;
16
+ top: 0px; left: 36px; right: 0px;
17
+ border-left: 1px solid #aaa;
18
+ border-bottom: 1px solid #aaa;
19
+ border-right: 1px solid #aaa;
20
+ }
21
+ .timesheet_lines_row0,
22
+ .timesheet_lines_row1 {
23
+ position: absolute;
24
+ left: 0px; right: 0px; height: 1px;
25
+ line-height: 1px; font-size: 0px;
26
+ background-color: #ccc;
27
+ }
28
+ .timesheet_lines_row0 {
29
+ background-color: #aaa;
30
+ }
@@ -0,0 +1,2 @@
1
+ <div class="timesheet_hours_col" id="label#{_ID}"></div>
2
+ <div class="timesheet_lines_col" id="state#{_ID}"></div>
@@ -0,0 +1,182 @@
1
+ /* Riassence Framework
2
+ * Copyright 2009 Riassence Inc.
3
+ * http://riassence.com/
4
+ *
5
+ * You should have received a copy of the GNU General Public License along
6
+ * with this software package. If not, contact licensing@riassence.com
7
+ */
8
+
9
+ /*** = Description
10
+ ** HTimesheet is a simple timesheet control.
11
+ ***/
12
+ HTimeSheet = HControl.extend({
13
+ componentName: 'timesheet',
14
+ pxPerHour: 24,
15
+ itemOffsetLeft: 36,
16
+ itemOffsetRight: 0,
17
+ /** = Description
18
+ * Redraws the timesheet.
19
+ *
20
+ **/
21
+ refresh: function(){
22
+ if(this.drawn){
23
+ var _areaHeight = this.rect.height;
24
+ this.pxPerHour = (_areaHeight-(_areaHeight%48)) / 24;
25
+ if(this.options['hideLabel']){
26
+ this.setStyleOfPart( 'label', 'display', 'none' );
27
+ this.setStyleOfPart( 'state', 'left', '0px' );
28
+ this.itemOffsetLeft = 0;
29
+ }
30
+ else{
31
+ this.setStyleOfPart( 'label', 'height', (this.pxPerHour*24)+'px' );
32
+ }
33
+ this.setStyleOfPart( 'state', 'height', (this.pxPerHour*24)+'px' );
34
+ }
35
+ this.base();
36
+ },
37
+
38
+ /** = Description
39
+ * Refreshes the hour labels.
40
+ *
41
+ **/
42
+ refreshLabel: function(){
43
+ var hour = 1,
44
+ hours = [],
45
+ rowHeight = this.pxPerHour;
46
+ lineHeight = Math.round(this.pxPerHour/2);
47
+ for(; hour < 24; hour++){
48
+ hours.push('<div style="line-height:'+rowHeight+'px;height:'+rowHeight+'px;top:'+Math.round((hour*rowHeight)-lineHeight)+'px" class="timesheet_hours_row">'+hour+':00</div>');
49
+ }
50
+ this.markupElemIds && this.markupElemIds.label && ELEM.setHTML(this.markupElemIds.label,hours.join(''));
51
+ this.refreshState();
52
+ },
53
+
54
+ /** = Description
55
+ * Refreshes the lines which mark hours and half-hours.
56
+ *
57
+ **/
58
+ refreshState: function(){
59
+ var line = 0,
60
+ lines = [],
61
+ lineHeight = Math.round(this.pxPerHour/2);
62
+ for(; line < 48; line++){
63
+ lines.push('<div style="top:'+(line*lineHeight)+'px" class="timesheet_lines_row'+(line%2)+'"></div>');
64
+ }
65
+ this.markupElemIds && this.markupElemIds.label && ELEM.setHTML(this.markupElemIds.state,lines.join(''));
66
+ },
67
+ dragItem: false,
68
+
69
+ /** = Description
70
+ * Creates an item into timesheet with default label 'New Item'.
71
+ *
72
+ * = Parameters
73
+ * +origY+:: Y coordinate of the new item.
74
+ *
75
+ **/
76
+ createItem: function(origY){
77
+ var _lineHeight = Math.round(this.pxPerHour/2);
78
+ origY = Math.floor( origY / _lineHeight )*_lineHeight;
79
+ var maxY = _lineHeight*48,
80
+ lineHeight = Math.round(this.pxPerHour/2);
81
+ if(origY>maxY){
82
+ origY = maxY;
83
+ }
84
+ var item = HTimeSheetItem.nu(
85
+ this.createItemRect(origY,lineHeight),
86
+ this, {
87
+ label: 'New Item',
88
+ events: {
89
+ draggable: true
90
+ }
91
+ }
92
+ );
93
+ this.dragItem = item;
94
+ },
95
+
96
+ /** = Description
97
+ * Dragging is used to mark items on the timesheet.
98
+ *
99
+ * = Parameters
100
+ * +x+:: x coordinate of the origin of drag
101
+ * +y+:: y coordinate of the origin of drag
102
+ *
103
+ **/
104
+ startDrag: function(x,y){
105
+ this.createItem(y-this.pageY());
106
+ EVENT.startDragging( this.dragItem );
107
+ },
108
+ listItemViews: false,
109
+
110
+ /** = Description
111
+ * Sets the editor given as parameter as the editor of instance.
112
+ *
113
+ * = Parameters
114
+ * +_editor+::
115
+ *
116
+ **/
117
+ setEditor: function( _editor ){
118
+ this.editor = _editor;
119
+ },
120
+
121
+ /** = Description
122
+ * Returns HRect the size of given parameters and suitable for timesheet.
123
+ *
124
+ * = Parameters
125
+ * +_origY+:: Y coordinate.
126
+ * +_lineHeight+:: The height of item on time sheet.
127
+ *
128
+ **/
129
+ createItemRect: function(_origY, _lineHeight){
130
+ var _left = this.itemOffsetLeft,
131
+ _top = _origY,
132
+ _right = this.rect.width - this.itemOffsetRight,
133
+ _bottom = _origY + _lineHeight;
134
+ return HRect.nu( _left, _top, _right, _bottom );
135
+ },
136
+
137
+ /** = Description
138
+ * Destructor; destroys the editor first and commences inherited die.
139
+ *
140
+ **/
141
+ die: function(){
142
+ this.editor.die();
143
+ this.base();
144
+ },
145
+
146
+ /** = Description
147
+ * Redraws and refreshes the values on timesheet.
148
+ *
149
+ **/
150
+ refreshValue: function(){
151
+ var _data = this.value, i;
152
+ if(this.listItemViews === false){
153
+ this.listItemViews = [];
154
+ }
155
+ if(this.listItemViews.length !== 0){
156
+ for( i=0; i<this.listItemViews.length; i++){
157
+ this.listItemViews[i].die();
158
+ }
159
+ this.listItemViews = [];
160
+ }
161
+ if(_data instanceof Array){
162
+ var _value, _label, _item;
163
+ for( i=0; i<_data.length; i++){
164
+ _value = _data[i];
165
+ _label = _value['label'];
166
+ _item = HTimeSheetItem.nu(
167
+ this.createItemRect( 0, 12 ),
168
+ this, {
169
+ label: _label,
170
+ value: _value,
171
+ events: {
172
+ draggable: true
173
+ }
174
+ }
175
+ );
176
+ _item.dragMode = 'normal';
177
+ this.listItemViews.push( _item );
178
+ }
179
+ }
180
+ }
181
+ });
182
+