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,5 @@
1
+ <PUBLIC:COMPONENT lightWeight="true">
2
+ <script type="text/javascript">
3
+ try{element.attachEvent("onpropertychange",iefix.htcElementEntry);}catch(e){window.status=e;}
4
+ </script>
5
+ </PUBLIC:COMPONENT>
@@ -0,0 +1,5 @@
1
+ <PUBLIC:COMPONENT lightWeight="true">
2
+ <script type="text/javascript">
3
+ element.attachEvent("onreadystatechange", iefix.htcStyleEntry);
4
+ </script>
5
+ </PUBLIC:COMPONENT>
@@ -0,0 +1,359 @@
1
+ /* Riassence Framework
2
+ * Copyright 2006 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
+ // Injects htc stuff into IE
10
+ ie_htc_path = null;
11
+ function ie_early_fixes() {
12
+ try{
13
+ document.execCommand("BackgroundImageCache",false,true);
14
+ }
15
+ catch(e){}
16
+
17
+ var _script = document.scripts[document.scripts.length - 1],
18
+ _src = _script.src;
19
+
20
+ ie_htc_path = _src.substring(0, _src.lastIndexOf("/") + 1);
21
+
22
+ }
23
+ ie_early_fixes();
24
+
25
+ /***
26
+ **** iefix contains a collection of fixes for IE's bad behavior
27
+ ***/
28
+ iefix = {
29
+
30
+ // call this on resize, loaded events:
31
+ setWinSize: function(){
32
+ window.innerWidth=document.documentElement.clientWidth;
33
+ window.innerHeight=document.documentElement.clientHeight;
34
+ },
35
+
36
+ // checks if the element has the .hasLayout flag set:
37
+ _hasLayout: function(_element){
38
+ return _element.currentStyle.hasLayout;
39
+ },
40
+
41
+ // finds the next parent with fixed or absolute positioning:
42
+ // NOTICE: .init() makes ._layoutHeight() from this by replacing width with height
43
+ layoutWidth: function(_element) {
44
+ var _this=iefix,
45
+ _parent,
46
+ i=0,
47
+ // gets the parent from which the width is calculated
48
+ _layoutParent=_element.offsetParent;
49
+ while(_layoutParent&&!_this._hasLayout(_layoutParent)){
50
+ _layoutParent=_layoutParent.offsetParent;
51
+ }
52
+ if(!_layoutParent._resizewidthElements){
53
+ _layoutParent._resizewidthElements=[];
54
+ }
55
+ if(!_element._addedResizewidthFix){
56
+ _layoutParent._resizewidthElements.push(_element);
57
+ _parent=_layoutParent;
58
+ while(_parent.offsetParent){
59
+ _parent=_parent.offsetParent;
60
+ if(_parent._resizewidthElements){_parent._resizewidthElements.push(_element);}
61
+ if(_parent.style.position==="absolute"||_parent.style.position==="fixed"){break;}
62
+ }
63
+ _element._addedResizewidthFix=true;
64
+ }
65
+ if(!_layoutParent._resizewidth){
66
+ _layoutParent.attachEvent("onpropertychange", function(){
67
+ if(window.event.propertyName==="style.width"){
68
+ for (;i<_layoutParent._resizewidthElements.length;i++){
69
+ _this.resizeRight(_layoutParent._resizewidthElements[i]);
70
+ }
71
+ }
72
+ });
73
+ _layoutParent._resizewidth=true;
74
+ }
75
+ return (_layoutParent||document.documentElement).clientWidth;
76
+ },
77
+
78
+ // // calculates the border width of the _element:
79
+ // // NOTICE: .init() makes ._getBorderHeight() from this by replacing Width with Height
80
+ // getBorderWidth: function(_element){
81
+ // return _element.offsetWidth-_element.clientWidth;
82
+ // },
83
+
84
+ // calculates the actual value in pixels from _value:
85
+ getPixelValue: function(_element,_value) {
86
+ var _this=iefix,_style,_runtimeStyle;
87
+ if(_this._PIXEL.test(_value)){return parseInt(_value,10);}
88
+ // saves style in temp
89
+ _style=_element.style.left;
90
+ _runtimeStyle=_element.runtimeStyle.left;
91
+ _element.runtimeStyle.left=_element.currentStyle.left;
92
+ _this.resizing=true;
93
+ _element.style.left=_value||0;
94
+ // has pixel value
95
+ _value=_element.style.pixelLeft;
96
+ _element.style.left=_style;
97
+ _this.resizing=false;
98
+ _element.runtimeStyle.left=_runtimeStyle;
99
+ return _value;
100
+ },
101
+
102
+ // calculates pixel value from the value given (even percentages)
103
+ // NOTICE: .init() makes ._getPixelHeght() from this by replacing Width with Height
104
+ getPixelWidth: function(_element,_value){
105
+ var _this=iefix;
106
+ if(_this._PERCENT.test(_value)){return parseInt(parseFloat(_value)/100*_this.layoutWidth(_element),10);}
107
+ return _this.getPixelValue(_element, _value);
108
+ },
109
+
110
+ // // calculates padding width of the _element:
111
+ // // NOTICE: .init() makes .getPaddingHeight() from this by replacing Left/Right/Width with Top/Bottom/Height
112
+ // // NOTICE: .init() also makes ._getMarginWidth() and ._getMarginHeight from this.
113
+ // getPaddingWidth: function(_element) {
114
+ // var _this=iefix;
115
+ // return _this.getPixelWidth(_element,_element.currentStyle.paddingLeft)+_this.getPixelWidth(_element,_element.currentStyle.paddingRight);
116
+ // },
117
+
118
+ // calculates element's position from the right edge of the parent:
119
+ // NOTICE: .init() makes _resizeBottom() from this by replacing left/width with top/height
120
+ resizeRight: function(_element){
121
+ var _this=iefix,_left,_width;
122
+ //window.status = 'resizeRight';
123
+ if(_element.currentStyle===null){return;}
124
+ _left=parseInt(_element.currentStyle.left,10);
125
+ _width=_this.layoutWidth(_element)-parseInt(_element.currentStyle.right,10)-_left;
126
+ if(parseInt(_element.runtimeStyle.width,10)===_width){return;}
127
+ _element.runtimeStyle.width="";
128
+ if(_element.offsetWidth<_width){
129
+ // Disabled, because no-one uses quirks mode anymore, right?
130
+ // _width-=_this.getBorderWidth(_element)+_this.getPaddingWidth(_element);
131
+ if(_width<0){_width=0;}
132
+ _element.runtimeStyle.width=_width;
133
+ }
134
+ },
135
+
136
+ // (css-property) opacity fix:
137
+ fixOpacity: function(_element){
138
+ var _opacity=(parseFloat(_element.currentStyle.opacity)*100)||1,
139
+ _filter=_element.filters["DXImageTransform.Microsoft.Alpha"];
140
+ if(_filter){_filter.Opacity=_opacity;_filter.Enabled=true;}
141
+ else{_element.runtimeStyle.filter+="progid:DXImageTransform.Microsoft.Alpha(opacity="+_opacity+")";}
142
+ },
143
+
144
+ // png background image fix:
145
+ fixBackgroundImage: function(_element) {
146
+ //window.status='fixBackgroundImage: ';
147
+ var _this=iefix,_url,_filter;
148
+ _url=_element.currentStyle.backgroundImage.match(/url\(\s*['"]?([^'")]+)['"]?\s*\)/);
149
+ //window.status+=' url:'+_url;
150
+ //window.status+=' pngCheck:'+_this.pngCheck.test(_url);
151
+ if(!_url){return;}
152
+ else{_url=_url[1];}
153
+ _filter=_element.filters["DXImageTransform.Microsoft.AlphaImageLoader"];
154
+ if(_this.pngCheck.test(_url)){ // needs more work
155
+ // access before filter is set makes error
156
+ if(_filter){
157
+ _filter.sizingMethod="crop";
158
+ _filter.src=_url;
159
+ _filter.Enabled=true;
160
+ }
161
+ else{
162
+ _element.runtimeStyle.filter+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_url+"',sizingMethod='crop')";
163
+ }
164
+ _element.runtimeStyle.zoom="0";
165
+ _element.runtimeStyle.backgroundImage="none";
166
+ }
167
+ else if(_filter){
168
+ _filter.Enabled=false;
169
+ }
170
+ },
171
+
172
+ // png img opacity fix:
173
+ addFilter: function(_element,_image){
174
+ var _this=iefix,_filter,_tempUrl;
175
+ _filter=_element.filters["DXImageTransform.Microsoft.AlphaImageLoader"];
176
+ if(_filter){_filter.src=_element.src;_filter.Enabled=true;}
177
+ else{_element.runtimeStyle.filter+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_element.src+"',sizingMethod='scale')";}
178
+ _tempURL=_element.src;
179
+ _element.src=_this.blankGifPath;
180
+ _image.src=_tempURL;
181
+ },
182
+
183
+ // checks if image is png
184
+ fixImg: function(_element){
185
+ var _this=iefix,_image;
186
+ if(_this.pngCheck.test(_element.src)){ // needs more work
187
+ _image=new Image(_element.width,_element.height);
188
+ _image.onload=function(){_element.width=_image.width;_element.height=_image.height;_image=null;};
189
+ _this.addFilter(_element,_image);
190
+ }
191
+ },
192
+
193
+ _noStyleTagNames: ['PARAM','HTML'],
194
+ // applies fixes to the _element
195
+ inlineStyleChanged: function(_element){
196
+ var _this=iefix,
197
+ _currentStyle=_element.currentStyle;
198
+ if(_this._noStyleTagNames.indexOf(_element.tagName)!==-1){
199
+ return;
200
+ }
201
+ // check if element needs to be positioned from the right
202
+ try{
203
+ var _posMatch = (_currentStyle.position==="absolute"||_currentStyle.position==="fixed"),
204
+ _resizeWidth = _element._resizewidth,
205
+ _resizeHeight = _element._resizeheight,
206
+ _autoRight = _currentStyle.right==="auto",
207
+ _autoBottom = _currentStyle.bottom==="auto";
208
+ if(_resizeWidth||(_posMatch&&!_autoRight)){
209
+ _this.resizeRight(_element);
210
+ }
211
+ // check if element needs to be positioned from the bottom
212
+ if(_resizeHeight||(_posMatch&&!_autoBottom)){
213
+ _this.resizeBottom(_element);
214
+ if(parseInt(_element.height)>parseInt(_element.fontSize,10)){
215
+ // TODO: needs line height calculation here too for elements smaller than the line height or font size
216
+ _element.fontSize = _element.height;
217
+ _element.lineHeight = _element.height;
218
+ }
219
+ }
220
+
221
+ // check if opacity needs to be fixed:
222
+ if(_element.currentStyle.opacity){_this.fixOpacity(_element);}
223
+
224
+ } catch(e) {
225
+ console.log("iefix error! element:",_element);
226
+ }
227
+
228
+ // check if background image needs to be fixed:
229
+ //if(_element.currentStyle.backgroundImage){_this.fixBackgroundImage(_element);}
230
+
231
+ // check if png needs to be fixed:
232
+ //if(_element.tagName==="IMG"||(_element.tagName==="INPUT"&&_element.type==="image")){_this.fixImg(_element);}
233
+
234
+ // anti-click-through fix:
235
+ //else
236
+ if(_element.style.backgroundColor==='transparent'&&(_element.style.backgroundImage==='none'||!_element.style.backgroundImage)){
237
+ _element.style.backgroundImage="url("+ie_htc_path+"128.gif)"; // transparent gif, 128x128
238
+ }
239
+ },
240
+
241
+ _traverseCount: 0,
242
+ // traverses from the _element node from the bottom to fix right|bottom positioning
243
+ _traverseTree: function(_element){
244
+ var _this=iefix;
245
+ _this._traverseCount++;
246
+ // console.log( 'traversecount: '+_this._traverseCount );
247
+ _element=_element||document.documentElement;
248
+ while(_element){
249
+ if(_element.nodeType===1){
250
+ _this.inlineStyleChanged(_element);
251
+ }
252
+ var _next=_element.firstChild;
253
+ if(!_next){ _next=_element.nextSibling;}
254
+ while(!_next&&_element.parentNode) {
255
+ _element=_element.parentNode;
256
+ _next=_element.nextSibling;
257
+ }
258
+ _element=_next;
259
+ }
260
+ },
261
+
262
+ // triggers an htc style event to elements affected by the style.
263
+ stylesheet_refresh: function(_styleSheet){
264
+ _styleSheet.cssText += "";
265
+ },
266
+
267
+ // initial constructs
268
+ init: function() {
269
+ var _this = iefix;
270
+ _this._AUTO = /^(auto|0cm)$/;
271
+ _this._PIXEL = /^\d+(px)?$/i;
272
+ _this._PERCENT = /^\d+%$/;
273
+ _this.pngCheck = new RegExp(".png$", "i"); // needs more work
274
+ //this.pngCheck = new RegExp("((\.gif)|(\.jpg))$", "i"); // needs more work
275
+ // needed for png hack
276
+ _this.blankGifPath=ie_htc_path+"0.gif";
277
+ // eval("_this.getMarginWidth="+String(_this.getPaddingWidth).replace(/padding/g,"margin"));
278
+ // eval("_this.getPaddingHeight="+String(_this.getPaddingWidth).replace(/Width/g,"Height").replace(/Left/g,"Top").replace(/Right/g,"Bottom"));
279
+ // eval("_this.getMarginHeight="+String(_this.getPaddingHeight).replace(/padding/g,"margin"));
280
+ // eval("_this.getBorderHeight="+String(_this.getBorderWidth).replace(/Width/g,"Height"));
281
+ eval("_this.layoutHeight="+String(_this.layoutWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Right/g,"Bottom"));
282
+ eval("_this.getPixelHeight="+String(_this.getPixelWidth).replace(/Width/g,"Height"));
283
+ eval("_this.resizeBottom="+String(_this.resizeRight).replace(/Width/g,"Height").replace(/width/g,"height").replace(/left/g,"top").replace(/right/g,"bottom"));
284
+ _this.resizing = false;
285
+ },
286
+
287
+ // entry point from ie_css_style.htc
288
+ htcStyleEntry: function(){
289
+ //window.status = 'htcStyleEntry';
290
+ if(document.readyState==="complete"&&window.event.srcElement.readyState==="complete"){
291
+ iefix._traverseTree();
292
+ }
293
+ },
294
+
295
+ _traverseStyleProperties: ['width','height','left','top','right','bottom','display','position','visibility'],
296
+ //_traverseStyleProperties: ['right','bottom','width','height'],
297
+
298
+ //_elemEntryCount: 0,
299
+
300
+ // entry point from ie_css_element.htc
301
+ htcElementEntry: function(){
302
+ //iefix._elemEntryCount++;
303
+ //window.status="htcElementEntry: "+iefix._elemEntryCount;
304
+ var _element=window.event.srcElement, _propName=window.event.propertyName;
305
+ if (_propName==="style.opacity"){
306
+ //window.status = 'htcElementEntry: '+iefix._elemEntryCount+' opacity';
307
+ iefix.fixOpacity(_element);
308
+ }
309
+ else if((_propName==="src"&&_element.tagName==="IMG")||(_element.tagName==="INPUT"&&_element.type==="image")){
310
+ window.status = 'htcElementEntry: '+iefix._elemEntryCount+' img';
311
+ iefix.fixImg(_element);
312
+ }
313
+ //else if(_propName==='style.cssText'){
314
+ //window.status = 'htcElementEntry: '+iefix._elemEntryCount+' cssText';
315
+ //iefix._traverseTree();
316
+ //}
317
+ else if(_propName.substring(0,6)==='style.'){
318
+ if(iefix._traverseStyleProperties.indexOf(_propName.split('style.')[1])!==-1){
319
+ //window.status = 'htcElementEntry: '+iefix._elemEntryCount+' style';
320
+ iefix._traverseTree();
321
+ }
322
+
323
+ /*
324
+ else {
325
+ window.status+=window.event.propertyName+' ';
326
+ }*/
327
+
328
+ }
329
+ //iefix._traverseTree(); // really should have more checks, this impacts performance heavily!
330
+
331
+ }
332
+ };
333
+ iefix.init();
334
+
335
+
336
+ ie_complete=document.readyState==="complete";
337
+ ie_initialized=false;
338
+
339
+ ie_documentLoaded=function(){if(document.readyState==="complete"){iefix._traverseTree();}};
340
+ ie_fixes=function(){
341
+ if( !ie_initialized
342
+ ){
343
+ if(ie_complete){
344
+ //var _stylesheet=document.createStyleSheet();
345
+ //_stylesheet.cssText='style,link{behavior:url('+ie_htc_path+'ie_css_style.htc)}\n*{behavior:url('+ie_htc_path+'ie_css_element.htc)}';
346
+ ie_documentLoaded();
347
+ }
348
+ else{
349
+ //document.write('<style type="text/css">style,link{behavior:url('+ie_htc_path+'ie_css_style.htc)}\n*{behavior:url('+ie_htc_path+'ie_css_element.htc)}</style>');
350
+ document.onreadystatechange=ie_documentLoaded;
351
+ }
352
+ ie_initialized=true;
353
+ }
354
+ };
355
+ ie_fixes();
356
+ // window.onresize=function(){iefix.setWinSize();iefix._traverseTree();};
357
+
358
+
359
+
File without changes
@@ -0,0 +1,43 @@
1
+ LOAD(function(){
2
+ debugg = HApplication.extend({
3
+ constructor: function(){
4
+ this.base(20,'Debugg');
5
+ this.view = HScrollView.extend({
6
+ onIdle: function(){
7
+ this.base();
8
+ this.bringToFront();
9
+ }
10
+ }).nu(
11
+ [0,720,null,400,0,null],
12
+ this
13
+ // , {
14
+ // // styles: [
15
+ // // ['background-color','#ccc']
16
+ // // ]
17
+ // }
18
+ );
19
+ this.debugHtml = '';
20
+ },
21
+ log: function(){
22
+ if(arguments.length === 1){
23
+ this.debugHtml += '<br>'+this.view.escapeHTML(arguments[0]);
24
+ }
25
+ else {
26
+ this.debugHtml += '<br>'+this.view.escapeHTML(COMM.Values.encode(arguments));
27
+ }
28
+ this.view.setHTML(this.debugHtml);
29
+ },
30
+ obj_log: function(_obj){
31
+ var _html = '{<br>';
32
+ for(var o in _obj){
33
+ _html += o+': '+_obj[o]+'<br>';
34
+ }
35
+ _html += '}';
36
+ this.log(_html);
37
+ }
38
+ }).nu();
39
+ if(window['console'] === undefined){
40
+ console = debugg;
41
+ }
42
+ debugg.log('Debugg start.');
43
+ });
data/js/debugg/js.inc ADDED
File without changes
@@ -0,0 +1,209 @@
1
+ /* Riassence Framework
2
+ * Copyright 2006 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
+ **
12
+ ** Simple application template.
13
+ **
14
+ ** Depends on <HSystem>
15
+ **
16
+ ** HApplication instances are good namespaces to bind your client-side logic to.
17
+ ** Feel free to extend HApplication to suit your needs. The primary default
18
+ ** purpose is root-level component (<HView>) management and being the
19
+ ** root controller for <onIdle> events.
20
+ **
21
+ ** = Instance members
22
+ ** +views+:: A list of child component ids bound to it via +HView+ and +HSystem+
23
+ ** +parent+:: Usually +HSystem+.
24
+ ** +parents+:: An array containing parent instances. In this case, just +HSystem+.
25
+ ** +isBusy+:: A flag that is true when the app is doing onIdle events or stopped.
26
+ **
27
+ ** = Usage
28
+ ** Creates the +HApplication+ instance +myApp+, makes a +HWindow+ instance
29
+ ** as its first view.
30
+ ** var myApp = HApplication.nu(10,'Sample Application');
31
+ ** HWindow.nu( [10,10,320,200], myApp, {label:'myWin'} );
32
+ **
33
+ ***/
34
+ HApplication = HClass.extend({
35
+
36
+ componentBehaviour: ['app'],
37
+
38
+ elemId: 0,
39
+
40
+ /** = Description
41
+ *
42
+ * = Parameters
43
+ * All parameters are optional.
44
+ *
45
+ * +_priority+:: The priority, a number between 1 and Infinity. Smaller
46
+ * number means higher priority, affects onIdle polling.
47
+ *
48
+ * +_label+:: A label for the application; for process managers.
49
+ *
50
+ **/
51
+ constructor: function(_priority, _label){
52
+
53
+ // Special null viewId for HApplication instances,
54
+ // they share a system-level root view; the document object
55
+ this.viewId = null;
56
+
57
+ // storage for views
58
+ this.views = [];
59
+
60
+ // storage for dom element id's in view, not utilized in HApplication by default
61
+ this.markupElemIds = [];
62
+
63
+ // Views in Z order. The actual Z data is stored in HSystem, this is just a
64
+ // reference to that array.
65
+ this.viewsZOrder = HSystem.viewsZOrder;
66
+
67
+ // Finalize initialization via HSystem
68
+ HSystem.addApp(this,_priority);
69
+
70
+ if(_label){
71
+ this.label = _label;
72
+ }
73
+ else{
74
+ this.label = 'ProcessID='+this.appId;
75
+ }
76
+ },
77
+
78
+ /** = Description
79
+ * Used by addView to build a +self.parents+ array of parent classes.
80
+ *
81
+ * = Parameters
82
+ * +_viewId+:: The target view's ID.
83
+ **/
84
+ buildParents: function(_viewId){
85
+ var _view = HSystem.views[_viewId],
86
+ i = 0;
87
+ _view.parent = this;
88
+ _view.parents = [];
89
+ for(; i < this.parents.length; i++) {
90
+ _view.parents.push(this.parents[i]);
91
+ }
92
+ _view.parents.push(this);
93
+ },
94
+
95
+ /** = Description
96
+ * Adds a view to the app, +HView+ defines an indentical structure for subviews.
97
+ *
98
+ * Called from inside the +HView+ constructor and should be automatic for all
99
+ * components that accept the +_parent+ parameter, usually the second argument,
100
+ * after the +HRect+ instance.
101
+ *
102
+ * = Parameters
103
+ * +_view+:: Usually +this+ inside +HView+ -derived components.
104
+ *
105
+ * = Returns
106
+ * The view ID.
107
+ *
108
+ **/
109
+ addView: function(_view) {
110
+
111
+ var _viewId = HSystem.addView(_view);
112
+ this.views.push(_viewId);
113
+
114
+ this.buildParents(_viewId);
115
+ this.viewsZOrder.push(_viewId);
116
+
117
+ return _viewId;
118
+ },
119
+
120
+ /** = Description
121
+ * Removes the view of the given +_viewId+.
122
+ *
123
+ * Call this if you need to remove a child view from its parent without
124
+ * destroying its view, making it in effect a view without parent.
125
+ * Useful, for example, for moving a view from one parent component to
126
+ * another when dragging a component to a droppable container.
127
+ *
128
+ * = Parameters
129
+ * +_viewId+:: The view ID.
130
+ *
131
+ **/
132
+ removeView: function(_viewId){
133
+ HSystem.views[_viewId].remove();
134
+ },
135
+
136
+ /** = Description
137
+ * Removes and destructs the view of the given +_viewId+.
138
+ *
139
+ * Call this if you need to remove a child view from its parent, destroying
140
+ * its child views recursively and removing all of the DOM elements too.
141
+ *
142
+ * = Parameters
143
+ * +_viewId+:: The view ID.
144
+ *
145
+ **/
146
+ destroyView: function(_viewId){
147
+ HSystem.views[_viewId].die();
148
+ },
149
+
150
+ /** = Description
151
+ * The destructor of the +HApplication+ instance.
152
+ *
153
+ * Stops this application and destroys all its views recursively.
154
+ *
155
+ **/
156
+ die: function(){
157
+ HSystem.killApp(this.appId, false);
158
+ },
159
+
160
+
161
+ /** = Description
162
+ * Destructs all views but doesn't destroy the +HApplication+ instance.
163
+ *
164
+ * Destroys all the views added to this application but doesn't destroy the
165
+ * application itself.
166
+ *
167
+ **/
168
+ destroyAllViews: function(){
169
+ for(var i = 0; i < this.views.length; i++) {
170
+ HSystem.views[this.views[i]].die();
171
+ }
172
+ },
173
+
174
+
175
+ /* Calls the idle method of each view. Don't extend this method. */
176
+ _pollViews: function(){
177
+ var i, _viewId, _view;
178
+ for(i=0;i<this.views.length;i++){
179
+ _viewId = this.views[i];
180
+ _view = HSystem.views[_viewId];
181
+ if((_view!==null)&&(_view['onIdle']!==undefined)){
182
+ _view.onIdle();
183
+ }
184
+ }
185
+ },
186
+
187
+ /** Gets called by +HSystem+. It makes +onIdle+ extensions more failure
188
+ * resistant. Do not extend.
189
+ **/
190
+ _startIdle: function(){
191
+ HSystem.busyApps[ this.appId ] = true;
192
+ this.onIdle();
193
+ this._pollViews();
194
+ HSystem.busyApps[ this.appId ] = false;
195
+ },
196
+
197
+ /** = Description
198
+ * The receiver of the +onIdle+ "poll event". The app priority defines the interval.
199
+ *
200
+ * Extend this method, if you are going to perform regular actions in a app.
201
+ *
202
+ * Intended for "slow infinite loops".
203
+ *
204
+ **/
205
+ onIdle: function(){
206
+ /* Your code here */
207
+ }
208
+ });
209
+ HApplication.implement(HValueResponder.nu());