rsence-pre 2.1.0.1.pre
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.yardopts +10 -0
- data/INSTALL.rdoc +330 -0
- data/LICENSE.txt +622 -0
- data/README.rdoc +98 -0
- data/VERSION +1 -0
- data/bin/rsence +25 -0
- data/bin/rsence-pre +25 -0
- data/conf/default_conf.yaml +346 -0
- data/conf/default_strings.yaml +76 -0
- data/conf/rsence_command_strings.yaml +444 -0
- data/docs/ExampleGuiPlugin.rdoc +193 -0
- data/docs/JavascriptBundles.rdoc +0 -0
- data/docs/PluginBundleInfo.rdoc +173 -0
- data/docs/PluginBundles.rdoc +96 -0
- data/docs/Values.rdoc +163 -0
- data/js/comm/autosync/autosync.js +17 -0
- data/js/comm/autosync/js.inc +0 -0
- data/js/comm/comm.js +203 -0
- data/js/comm/js.inc +0 -0
- data/js/comm/jsloader/js.inc +0 -0
- data/js/comm/jsloader/jsloader.js +112 -0
- data/js/comm/queue/js.inc +0 -0
- data/js/comm/queue/queue.js +184 -0
- data/js/comm/session/js.inc +0 -0
- data/js/comm/session/session.js +52 -0
- data/js/comm/sessionwatcher/js.inc +0 -0
- data/js/comm/sessionwatcher/sessionwatcher.js +44 -0
- data/js/comm/transporter/js.inc +0 -0
- data/js/comm/transporter/transporter.js +261 -0
- data/js/comm/urlresponder/js.inc +0 -0
- data/js/comm/urlresponder/urlresponder.js +149 -0
- data/js/comm/values/js.inc +0 -0
- data/js/comm/values/values.js +433 -0
- data/js/controls/button/button.js +72 -0
- data/js/controls/button/js.inc +0 -0
- data/js/controls/button/themes/bright/button.css +89 -0
- data/js/controls/button/themes/bright/button.html +7 -0
- data/js/controls/button/themes/bright/button_parts1-ie6.gif +0 -0
- data/js/controls/button/themes/bright/button_parts1.png +0 -0
- data/js/controls/button/themes/default/button.css +89 -0
- data/js/controls/button/themes/default/button.html +7 -0
- data/js/controls/button/themes/default/button_parts1-ie6.gif +0 -0
- data/js/controls/button/themes/default/button_parts1.png +0 -0
- data/js/controls/checkbox/checkbox.js +49 -0
- data/js/controls/checkbox/js.inc +0 -0
- data/js/controls/checkbox/themes/default/checkbox.css +69 -0
- data/js/controls/checkbox/themes/default/checkbox.html +5 -0
- data/js/controls/checkbox/themes/default/checkbox_parts1-ie6.gif +0 -0
- data/js/controls/checkbox/themes/default/checkbox_parts1.png +0 -0
- data/js/controls/dialogs/alert_sheet/alert_sheet.js +63 -0
- data/js/controls/dialogs/alert_sheet/js.inc +0 -0
- data/js/controls/dialogs/confirm_sheet/confirm_sheet.js +37 -0
- data/js/controls/dialogs/confirm_sheet/js.inc +0 -0
- data/js/controls/dialogs/sheet/js.inc +0 -0
- data/js/controls/dialogs/sheet/sheet.js +84 -0
- data/js/controls/dialogs/sheet/themes/default/sheet.css +64 -0
- data/js/controls/dialogs/sheet/themes/default/sheet.html +14 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_bg-ie6.gif +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_bg.png +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_dim-ie6.gif +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_dim.png +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_parts1-ie6.gif +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_parts1.png +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_parts2-ie6.gif +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_parts2.png +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_warning-ie6.gif +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_warning.png +0 -0
- data/js/controls/imageview/imageview.js +109 -0
- data/js/controls/imageview/js.inc +0 -0
- data/js/controls/imageview/themes/default/blank.gif +0 -0
- data/js/controls/passwordcontrol/js.inc +0 -0
- data/js/controls/passwordcontrol/passwordcontrol.js +23 -0
- data/js/controls/passwordcontrol/themes/default/passwordcontrol.css +0 -0
- data/js/controls/passwordcontrol/themes/default/passwordcontrol.html +18 -0
- data/js/controls/progress/progressbar/js.inc +0 -0
- data/js/controls/progress/progressbar/progressbar.js +40 -0
- data/js/controls/progress/progressbar/themes/default/progressbar.css +16 -0
- data/js/controls/progress/progressbar/themes/default/progressbar.html +2 -0
- data/js/controls/progress/progressindicator/js.inc +0 -0
- data/js/controls/progress/progressindicator/progressindicator.js +44 -0
- data/js/controls/radiobutton/js.inc +0 -0
- data/js/controls/radiobutton/radiobutton.js +43 -0
- data/js/controls/radiobutton/themes/default/radiobutton.css +69 -0
- data/js/controls/radiobutton/themes/default/radiobutton.html +5 -0
- data/js/controls/radiobutton/themes/default/radiobutton_parts1-ie6.gif +0 -0
- data/js/controls/radiobutton/themes/default/radiobutton_parts1.png +0 -0
- data/js/controls/sliders/slider/js.inc +0 -0
- data/js/controls/sliders/slider/slider.js +357 -0
- data/js/controls/sliders/slider/themes/default/hslider_tracks-ie6.gif +0 -0
- data/js/controls/sliders/slider/themes/default/hslider_tracks.png +0 -0
- data/js/controls/sliders/slider/themes/default/slider.css +108 -0
- data/js/controls/sliders/slider/themes/default/slider.html +5 -0
- data/js/controls/sliders/slider/themes/default/slider_thumbs-ie6.gif +0 -0
- data/js/controls/sliders/slider/themes/default/slider_thumbs.png +0 -0
- data/js/controls/sliders/vslider/js.inc +0 -0
- data/js/controls/sliders/vslider/themes/default/vslider.css +52 -0
- data/js/controls/sliders/vslider/themes/default/vslider.html +5 -0
- data/js/controls/sliders/vslider/themes/default/vslider_tracks-ie6.gif +0 -0
- data/js/controls/sliders/vslider/themes/default/vslider_tracks.png +0 -0
- data/js/controls/sliders/vslider/vslider.js +41 -0
- data/js/controls/stepper/js.inc +0 -0
- data/js/controls/stepper/stepper.js +213 -0
- data/js/controls/stepper/themes/default/stepper-ie6.gif +0 -0
- data/js/controls/stepper/themes/default/stepper.css +14 -0
- data/js/controls/stepper/themes/default/stepper.html +2 -0
- data/js/controls/stepper/themes/default/stepper.png +0 -0
- data/js/controls/stringview/js.inc +0 -0
- data/js/controls/stringview/stringview.js +49 -0
- data/js/controls/stringview/themes/default/stringview.css +8 -0
- data/js/controls/stringview/themes/default/stringview.html +1 -0
- data/js/controls/tab/js.inc +0 -0
- data/js/controls/tab/tab.js +280 -0
- data/js/controls/tab/themes/bright/tab.css +76 -0
- data/js/controls/tab/themes/bright/tab.html +6 -0
- data/js/controls/tab/themes/bright/tab_bg_color-ie6.gif +0 -0
- data/js/controls/tab/themes/bright/tab_bg_color.png +0 -0
- data/js/controls/tab/themes/bright/tab_border_pattern-ie6.gif +0 -0
- data/js/controls/tab/themes/bright/tab_border_pattern.png +0 -0
- data/js/controls/tab/themes/bright/tab_parts1-ie6.gif +0 -0
- data/js/controls/tab/themes/bright/tab_parts1.png +0 -0
- data/js/controls/tab/themes/default/tab.css +77 -0
- data/js/controls/tab/themes/default/tab.html +6 -0
- data/js/controls/tab/themes/default/tab_bg_color-ie6.gif +0 -0
- data/js/controls/tab/themes/default/tab_bg_color.png +0 -0
- data/js/controls/tab/themes/default/tab_border_pattern-ie6.gif +0 -0
- data/js/controls/tab/themes/default/tab_border_pattern.png +0 -0
- data/js/controls/tab/themes/default/tab_parts1-ie6.gif +0 -0
- data/js/controls/tab/themes/default/tab_parts1.png +0 -0
- data/js/controls/textarea/js.inc +0 -0
- data/js/controls/textarea/textarea.js +24 -0
- data/js/controls/textarea/themes/default/textarea.css +21 -0
- data/js/controls/textarea/themes/default/textarea.html +18 -0
- data/js/controls/textcontrol/js.inc +0 -0
- data/js/controls/textcontrol/textcontrol.js +374 -0
- data/js/controls/textcontrol/themes/default/textcontrol.css +107 -0
- data/js/controls/textcontrol/themes/default/textcontrol.html +18 -0
- data/js/controls/textcontrol/themes/default/textcontrol_parts1-ie6.gif +0 -0
- data/js/controls/textcontrol/themes/default/textcontrol_parts1.png +0 -0
- data/js/controls/textcontrol/themes/default/textcontrol_parts2-ie6.gif +0 -0
- data/js/controls/textcontrol/themes/default/textcontrol_parts2.png +0 -0
- data/js/controls/textcontrol/themes/default/textcontrol_parts3-ie6.gif +0 -0
- data/js/controls/textcontrol/themes/default/textcontrol_parts3.png +0 -0
- data/js/controls/uploader/js.inc +0 -0
- data/js/controls/uploader/themes/default/upload_progress.gif +0 -0
- data/js/controls/uploader/themes/default/uploader.css +108 -0
- data/js/controls/uploader/themes/default/uploader.html +27 -0
- data/js/controls/uploader/uploader.js +154 -0
- data/js/controls/validatorview/js.inc +0 -0
- data/js/controls/validatorview/themes/default/validator-ie6.gif +0 -0
- data/js/controls/validatorview/themes/default/validator.png +0 -0
- data/js/controls/validatorview/themes/default/validatorview.css +0 -0
- data/js/controls/validatorview/themes/default/validatorview.html +0 -0
- data/js/controls/validatorview/validatorview.js +62 -0
- data/js/controls/window/js.inc +0 -0
- data/js/controls/window/themes/default/window.css +219 -0
- data/js/controls/window/themes/default/window.html +17 -0
- data/js/controls/window/themes/default/window_bg_active-ie6.gif +0 -0
- data/js/controls/window/themes/default/window_bg_active.png +0 -0
- data/js/controls/window/themes/default/window_bg_inactive-ie6.gif +0 -0
- data/js/controls/window/themes/default/window_bg_inactive.png +0 -0
- data/js/controls/window/themes/default/window_buttons-ie6.gif +0 -0
- data/js/controls/window/themes/default/window_buttons.png +0 -0
- data/js/controls/window/themes/default/window_parts1-ie6.gif +0 -0
- data/js/controls/window/themes/default/window_parts1.png +0 -0
- data/js/controls/window/themes/default/window_parts2-ie6.gif +0 -0
- data/js/controls/window/themes/default/window_parts2.png +0 -0
- data/js/controls/window/window.js +286 -0
- data/js/core/class/class.js +318 -0
- data/js/core/class/js.inc +0 -0
- data/js/core/elem/elem.js +1383 -0
- data/js/core/elem/js.inc +0 -0
- data/js/core/event/event.js +153 -0
- data/js/core/event/js.inc +0 -0
- data/js/core/iefix/ie_css_element.htc +5 -0
- data/js/core/iefix/ie_css_style.htc +5 -0
- data/js/core/iefix/iefix.js +359 -0
- data/js/core/iefix/js.inc +0 -0
- data/js/core/rsence_ns/js.inc +0 -0
- data/js/core/rsence_ns/rsence_ns.js +21 -0
- data/js/datetime/calendar/calendar.js +198 -0
- data/js/datetime/calendar/js.inc +0 -0
- data/js/datetime/calendar/themes/default/calendar.css +108 -0
- data/js/datetime/calendar/themes/default/calendar.html +9 -0
- data/js/datetime/calendar/themes/default/calendar_arrows-ie6.gif +0 -0
- data/js/datetime/calendar/themes/default/calendar_arrows.png +0 -0
- data/js/datetime/datetimevalue/datetimevalue.js +247 -0
- data/js/datetime/datetimevalue/js.inc +0 -0
- data/js/datetime/timesheet/js.inc +0 -0
- data/js/datetime/timesheet/themes/default/timesheet.css +30 -0
- data/js/datetime/timesheet/themes/default/timesheet.html +2 -0
- data/js/datetime/timesheet/timesheet.js +183 -0
- data/js/datetime/timesheet_item/js.inc +0 -0
- data/js/datetime/timesheet_item/themes/default/timesheet_item.css +42 -0
- data/js/datetime/timesheet_item/themes/default/timesheet_item.html +8 -0
- data/js/datetime/timesheet_item/timesheet_item.js +248 -0
- data/js/datetime/timesheet_item_edit/js.inc +0 -0
- data/js/datetime/timesheet_item_edit/timesheet_item_edit.js +274 -0
- data/js/foundation/application/application.js +208 -0
- data/js/foundation/application/js.inc +0 -0
- data/js/foundation/control/control.js +339 -0
- data/js/foundation/control/controldefaults/controldefaults.js +56 -0
- data/js/foundation/control/controldefaults/js.inc +0 -0
- data/js/foundation/control/dummyvalue/dummyvalue.js +51 -0
- data/js/foundation/control/dummyvalue/js.inc +0 -0
- data/js/foundation/control/dyncontrol/dyncontrol.js +500 -0
- data/js/foundation/control/dyncontrol/js.inc +0 -0
- data/js/foundation/control/dyncontrol/themes/default/dyncontrol.css +0 -0
- data/js/foundation/control/dyncontrol/themes/default/dyncontrol.html +0 -0
- data/js/foundation/control/eventresponder/eventresponder.js +750 -0
- data/js/foundation/control/eventresponder/js.inc +0 -0
- data/js/foundation/control/js.inc +0 -0
- data/js/foundation/control/valuematrix/js.inc +0 -0
- data/js/foundation/control/valuematrix/valuematrix.js +135 -0
- data/js/foundation/control/valueresponder/js.inc +0 -0
- data/js/foundation/control/valueresponder/valueresponder.js +79 -0
- data/js/foundation/eventmanager/eventmanager.js +991 -0
- data/js/foundation/eventmanager/js.inc +0 -0
- data/js/foundation/geom/point/js.inc +0 -0
- data/js/foundation/geom/point/point.js +202 -0
- data/js/foundation/geom/rect/js.inc +0 -0
- data/js/foundation/geom/rect/rect.js +651 -0
- data/js/foundation/json_renderer/js.inc +0 -0
- data/js/foundation/json_renderer/json_renderer.js +246 -0
- data/js/foundation/system/js.inc +0 -0
- data/js/foundation/system/system.js +381 -0
- data/js/foundation/thememanager/js.inc +0 -0
- data/js/foundation/thememanager/thememanager.js +393 -0
- data/js/foundation/value/js.inc +0 -0
- data/js/foundation/value/value.js +183 -0
- data/js/foundation/view/js.inc +0 -0
- data/js/foundation/view/markupview/js.inc +0 -0
- data/js/foundation/view/markupview/markupview.js +114 -0
- data/js/foundation/view/morphanimation/js.inc +0 -0
- data/js/foundation/view/morphanimation/morphanimation.js +237 -0
- data/js/foundation/view/view.js +1812 -0
- data/js/foundation/view/viewdefaults/js.inc +0 -0
- data/js/foundation/view/viewdefaults/viewdefaults.js +26 -0
- data/js/lists/checkboxlist/checkboxlist.js +171 -0
- data/js/lists/checkboxlist/js.inc +0 -0
- data/js/lists/listitems/js.inc +0 -0
- data/js/lists/listitems/listitems.js +88 -0
- data/js/lists/propertylist/js.inc +0 -0
- data/js/lists/propertylist/propertylist.js +326 -0
- data/js/lists/radiobuttonlist/js.inc +0 -0
- data/js/lists/radiobuttonlist/radiobuttonlist.js +116 -0
- data/js/util/reloadapp/js.inc +0 -0
- data/js/util/reloadapp/reloadapp.js +152 -0
- data/js/util/reloadapp/themes/default/reloadapp_warning-ie6.gif +0 -0
- data/js/util/reloadapp/themes/default/reloadapp_warning.png +0 -0
- data/js/util/sha/js.inc +0 -0
- data/js/util/sha/sha.js +426 -0
- data/js/views/centerview/centerview.js +75 -0
- data/js/views/centerview/js.inc +0 -0
- data/js/views/inlineview/inlineview.js +15 -0
- data/js/views/inlineview/js.inc +0 -0
- data/js/views/scrollview/js.inc +0 -0
- data/js/views/scrollview/scrollview.js +40 -0
- data/lib/conf/argv.rb +850 -0
- data/lib/conf/default.rb +219 -0
- data/lib/daemon/daemon.rb +387 -0
- data/lib/daemon/sigcomm.rb +64 -0
- data/lib/http/broker.rb +150 -0
- data/lib/http/rackup.rb +91 -0
- data/lib/http/request.rb +66 -0
- data/lib/http/response.rb +65 -0
- data/lib/plugins/dependencies.rb +285 -0
- data/lib/plugins/gui_plugin.rb +160 -0
- data/lib/plugins/guiparser.rb +123 -0
- data/lib/plugins/plugin.rb +438 -0
- data/lib/plugins/plugin_base.rb +162 -0
- data/lib/plugins/plugin_plugins.rb +81 -0
- data/lib/plugins/plugin_sqlite_db.rb +98 -0
- data/lib/plugins/pluginmanager.rb +635 -0
- data/lib/plugins/plugins.rb +169 -0
- data/lib/plugins/servlet.rb +108 -0
- data/lib/rsence.rb +32 -0
- data/lib/session/msg.rb +327 -0
- data/lib/session/sessionmanager.rb +522 -0
- data/lib/session/sessionstorage.rb +340 -0
- data/lib/transporter/transporter.rb +263 -0
- data/lib/util/gzstring.rb +9 -0
- data/lib/util/ruby19_fixes.rb +18 -0
- data/lib/values/hvalue.rb +378 -0
- data/lib/values/valuemanager.rb +172 -0
- data/plugins/client_pkg/client_pkg.rb +157 -0
- data/plugins/client_pkg/info.yaml +25 -0
- data/plugins/client_pkg/lib/client_pkg_build.rb +561 -0
- data/plugins/client_pkg/lib/client_pkg_cache.rb +50 -0
- data/plugins/client_pkg/lib/client_pkg_serve.rb +218 -0
- data/plugins/index_html/img/loading.gif +0 -0
- data/plugins/index_html/img/riassence.gif +0 -0
- data/plugins/index_html/index_html.rb +120 -0
- data/plugins/index_html/info.yaml +18 -0
- data/plugins/index_html/tmpl/index.html +15 -0
- data/plugins/main/info.yaml +18 -0
- data/plugins/main/js/main.js +84 -0
- data/plugins/main/main.rb +255 -0
- data/plugins/main/values.yaml +8 -0
- data/plugins/ticket/info.yaml +21 -0
- data/plugins/ticket/lib/common.rb +392 -0
- data/plugins/ticket/lib/favicon.rb +39 -0
- data/plugins/ticket/lib/file.rb +58 -0
- data/plugins/ticket/lib/img.rb +50 -0
- data/plugins/ticket/lib/objblob.rb +66 -0
- data/plugins/ticket/lib/rsrc.rb +34 -0
- data/plugins/ticket/lib/upload.rb +236 -0
- data/plugins/ticket/ticket.rb +333 -0
- data/setup/welcome/gui/welcome.yaml +92 -0
- data/setup/welcome/info.yaml +13 -0
- data/setup/welcome/text/welcome.html +9 -0
- data/setup/welcome/values.yaml +9 -0
- data/setup/welcome/welcome.rb +54 -0
- metadata +407 -0
@@ -0,0 +1,444 @@
|
|
1
|
+
# Strings for various methods
|
2
|
+
:messages:
|
3
|
+
:invalid_option_expected_number: |+
|
4
|
+
Invalid option for <%%= option_name.to_s %>:
|
5
|
+
Expected number, got: <%%= arg.inspect %>.
|
6
|
+
|
7
|
+
Type 'rsence help <%%= @cmd.to_s %>' for usage.
|
8
|
+
:no_such_configuration_file: |+
|
9
|
+
No such configuration file:
|
10
|
+
<%%= arg.inspect %>
|
11
|
+
|
12
|
+
Type 'rsence help <%%= @cmd.to_s %>' for usage.
|
13
|
+
:no_value_for_option: |+
|
14
|
+
No value for option:
|
15
|
+
<%%= option_name.to_s.inspect %>
|
16
|
+
|
17
|
+
Type 'rsence help <%%= @cmd.to_s %> for usage."
|
18
|
+
:no_such_directory: |
|
19
|
+
No such directory:
|
20
|
+
<%%= path.inspect %>
|
21
|
+
:not_a_directory: |
|
22
|
+
Not a directory:
|
23
|
+
<%%= path.inspect %>
|
24
|
+
:missing_conf_directory: |
|
25
|
+
Missing conf directory:
|
26
|
+
<%%= conf_path.inspect %>
|
27
|
+
:invalid_conf_directory: |
|
28
|
+
Not a conf directory:
|
29
|
+
<%%= conf_path.inspect %>
|
30
|
+
:missing_conf_file: |
|
31
|
+
Missing conf file:
|
32
|
+
<%%= conf_file.inspect %>
|
33
|
+
:invalid_conf_file_not_file: |
|
34
|
+
Invalid conf file, not a file:
|
35
|
+
<%%= conf_file.inspect %>
|
36
|
+
:warn_no_plugin_directory_in_project: |
|
37
|
+
Warning! No plugin directory in project, expected:
|
38
|
+
<%%= plugin_path.inspect %>
|
39
|
+
:plugin_directory_not_a_directory: |
|
40
|
+
Plugin directory not a directory, expected:
|
41
|
+
<%%= plugin_path.inspect %>
|
42
|
+
:warn_no_plugin_directory_in_project: |
|
43
|
+
Warning! No <%%= dir_name %> directory in project, creating:
|
44
|
+
<%%= dir_path.inspect %>
|
45
|
+
:invalid_environment: |
|
46
|
+
Invalid environment: <%%= env_path.inspect %>
|
47
|
+
|
48
|
+
Type 'rsence help <%%= @cmd.to_s %>' for usage."
|
49
|
+
Type 'rsence help initenv' for environment initialization usage."
|
50
|
+
:invalid_option_chr: |
|
51
|
+
Invalid option character for option character block <%%= arg.inspect %>:
|
52
|
+
<%%= chr.inspect %>
|
53
|
+
|
54
|
+
Type 'rsence help <%%= @cmd.to_s %>' for usage."
|
55
|
+
:invalid_option: |
|
56
|
+
Invalid option:
|
57
|
+
<%%= arg.inspect %>.
|
58
|
+
|
59
|
+
Type 'rsence help <%%= @cmd.to_s %>' for usage."
|
60
|
+
:no_pid: |
|
61
|
+
No PID, unable to check process status.
|
62
|
+
:no_pid_file: |
|
63
|
+
No PID file, unable to check process status.
|
64
|
+
:no_pid_support: |
|
65
|
+
No PID support, unable to check process status.
|
66
|
+
:no_process_running_but_something_responds: |
|
67
|
+
No process running, but something responds on <%%= addr %>:<%%= port %>.
|
68
|
+
:no_process_running_and_nothing_responds: |
|
69
|
+
No process running, and nothing responds on <%%= addr %>:<%%= port %>.
|
70
|
+
:process_running_and_responds: |
|
71
|
+
Process ID <%%= pid %> is running and responds on <%%= addr %>:<%%= port %>.
|
72
|
+
:process_running_but_nothing_responds: |
|
73
|
+
Process ID <%%= pid %> is running, but does not respond on <%%= addr %>:<%%= port %>.
|
74
|
+
:saving_message: <
|
75
|
+
Saving session data...
|
76
|
+
:no_pid_unable_to_save: |
|
77
|
+
No PID, unable to signal the save command to the process.
|
78
|
+
:no_process_running: |
|
79
|
+
No process running.
|
80
|
+
:session_data_saved: |
|
81
|
+
Session data saved.
|
82
|
+
# Strings for the initenv command
|
83
|
+
:initenv:
|
84
|
+
:env_already_initialized: |
|
85
|
+
Environment already initialized.
|
86
|
+
:env_not_empty: |
|
87
|
+
Environment directory <%%= @args[:env_path] %> is not empty.
|
88
|
+
:creating_env: |+
|
89
|
+
|
90
|
+
Creating a new RSence environment at <%%= @args[:env_path] %>
|
91
|
+
|
92
|
+
RSence will first ask a few questions about your environment
|
93
|
+
in order to initialize and prepare the project configuration.
|
94
|
+
|
95
|
+
You may abort this command at any time by pressing CTRL-C
|
96
|
+
Nothing will be written until you have answered all the questions.
|
97
|
+
|
98
|
+
Pressing the ENTER (or RETURN) key at each prompt will choose the
|
99
|
+
default option shown.
|
100
|
+
If you are not sure about how to answer a question, press
|
101
|
+
the ENTER (or RETURN) key to continue.
|
102
|
+
|
103
|
+
:enter_title: |+
|
104
|
+
|
105
|
+
Please enter the title of your project.
|
106
|
+
This title will be used in the default page title.
|
107
|
+
|
108
|
+
:project_title: Project Title
|
109
|
+
:enter_db_url: |+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
Please specify the connection string for the session database to use.
|
114
|
+
By default, a local SQLite database is created in the 'db' subdirectory
|
115
|
+
of the environment directory. Any database supported by Sequel is supported
|
116
|
+
by RSence.
|
117
|
+
|
118
|
+
For further information about database connection strings, read the Sequel
|
119
|
+
documentation at:
|
120
|
+
http://sequel.rubyforge.org/rdoc/files/doc/opening_databases_rdoc.html
|
121
|
+
|
122
|
+
You will also need the appropriate ruby driver for the database selected. If
|
123
|
+
none is installed, RSence will not be able to store persistent session data
|
124
|
+
between server restarts.
|
125
|
+
|
126
|
+
:db_url: Session database connection string
|
127
|
+
:enter_http_port: |+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
Please enter a HTTP port for the server to listen to. This port must not be a
|
132
|
+
TCP port already in use.
|
133
|
+
|
134
|
+
:http_port: HTTP Port
|
135
|
+
:enter_tcp_ip: |+
|
136
|
+
|
137
|
+
|
138
|
+
Please enter a TCP/IP address for the HTTP server to listen to. This address
|
139
|
+
must be an address configured by a network interface of this computer.
|
140
|
+
|
141
|
+
The address 0.0.0.0 matches any interfaces.
|
142
|
+
The address 127.0.0.1 matches only the localhost address, this address is
|
143
|
+
not accessible from any other computer.
|
144
|
+
|
145
|
+
:tcp_ip: Interface TCP/IP address
|
146
|
+
:enter_root_dir: |+
|
147
|
+
|
148
|
+
|
149
|
+
Please enter a root directory for RSence to respond in.
|
150
|
+
By default this is the root directory of the server: /
|
151
|
+
|
152
|
+
:root_dir: URI Prefix
|
153
|
+
:config_summary: |+
|
154
|
+
|
155
|
+
Configuration Summary
|
156
|
+
|
157
|
+
Please verify that the configuration is correct.
|
158
|
+
This configuration will be written into the configuration file:
|
159
|
+
<%%= conf_file %>
|
160
|
+
|
161
|
+
Title: <%%= config[:index_html][:title] %>
|
162
|
+
|
163
|
+
Database: <%%= config[:database][:ses_db] %>
|
164
|
+
|
165
|
+
HTTP Server:
|
166
|
+
Address: <%%= config[:http_server][:bind_address] %>
|
167
|
+
Port: <%%= config[:http_server][:port] %>
|
168
|
+
URI Prefix: <%%= config[:base_url] %>
|
169
|
+
|
170
|
+
This means the URL will be <%%= test_url %>
|
171
|
+
|
172
|
+
:confirm_config: "Is the configuration correct, "
|
173
|
+
:creating_dirs: "Creating directories..."
|
174
|
+
:installing_welcome_plugin: |+
|
175
|
+
Installing the welcome plugin. To remove it, just delete this folder:
|
176
|
+
<%%= welcome_plugin_dst %>
|
177
|
+
:creating_files: "Creating files..."
|
178
|
+
:congratulations: |+
|
179
|
+
|
180
|
+
<%= '-='*39 %>-
|
181
|
+
|
182
|
+
RSence project environment for '<%%= config[:index_html][:title] %>' created.
|
183
|
+
|
184
|
+
You may configure the environment by editing the file:
|
185
|
+
|
186
|
+
<%%= conf_file %>
|
187
|
+
|
188
|
+
If you would like to test this environment now, start the RSence server:
|
189
|
+
|
190
|
+
rsence run <%%= env_dir %>
|
191
|
+
|
192
|
+
Then point your browser to:
|
193
|
+
|
194
|
+
<%%= test_url %>
|
195
|
+
|
196
|
+
The latest documentation and further information is available at the
|
197
|
+
RSence website:
|
198
|
+
|
199
|
+
http://rsence.org/
|
200
|
+
|
201
|
+
|
202
|
+
Congratulations!
|
203
|
+
|
204
|
+
:readme: |
|
205
|
+
This directory contains a RSence environment titled '<%%= config[:index_html][:title] %>'.
|
206
|
+
Visit http://rsence.org/ for further information.
|
207
|
+
# Help for the 'rsence' command line tool.
|
208
|
+
:help:
|
209
|
+
:head: |+
|
210
|
+
RSence command-line tool, version <%= @@version %>
|
211
|
+
|
212
|
+
:tail: |+
|
213
|
+
RSence is a self-contained rich internet application client-server framework.
|
214
|
+
For further information, see http://rsence.org/
|
215
|
+
:unknown: >
|
216
|
+
Unknown command:
|
217
|
+
|
218
|
+
:help_help: >
|
219
|
+
Type 'rsence help' for usage.
|
220
|
+
|
221
|
+
:help_main: |+
|
222
|
+
usage: rsence <command> [options] [args]
|
223
|
+
|
224
|
+
Type 'rsence help <command>' for help on a specific command.
|
225
|
+
|
226
|
+
Available commands:
|
227
|
+
<%= help_avail_cmds %>
|
228
|
+
|
229
|
+
:path: |+
|
230
|
+
The [PATH] is the RSence environment to use.
|
231
|
+
The [PATH] defaults to the current working directory.
|
232
|
+
|
233
|
+
:options: |+
|
234
|
+
Available options:
|
235
|
+
|
236
|
+
--conf <file.yaml> Use additional config file. You can give this option
|
237
|
+
several times. The <file.yaml> is the configuration
|
238
|
+
file to load.
|
239
|
+
|
240
|
+
--debug (-d) Debug mode. Shortcut for several options useful for
|
241
|
+
developers. Not the preferred mode for production.
|
242
|
+
|
243
|
+
--verbose (-v) More verbose output. Also enabled by --debug
|
244
|
+
|
245
|
+
--log-fg (-f) Directs the output of the log messages to stdout
|
246
|
+
instead of the log files. Useful for development.
|
247
|
+
|
248
|
+
--trace-js Logs all js/json going through the msg object.
|
249
|
+
|
250
|
+
--trace-delegate Logs all plugin delegate calls.
|
251
|
+
|
252
|
+
--port <number> The port number the http server listens to.
|
253
|
+
|
254
|
+
--addr <ip address> The IP address or net mask the http server listens to.
|
255
|
+
'0.0.0.0' matches all interfaces.
|
256
|
+
'127.0.0.1' matches the local loopback interface.
|
257
|
+
|
258
|
+
--server <handler> The Rack handler to use. Defaults to mongrel
|
259
|
+
|
260
|
+
--reset-sessions (-r) Resets all active sessions.
|
261
|
+
|
262
|
+
--auto-update (-a) Automatically checks for changes in installed plugin
|
263
|
+
and component bundles. Rebuilds changed component
|
264
|
+
bundles and reload changed plugin bundles.
|
265
|
+
Useful for development purposes.
|
266
|
+
Also enabled by --debug
|
267
|
+
|
268
|
+
--latency <number> Sleeps <number> amount of milliseconds on every
|
269
|
+
request. Useful for testing slow connections.
|
270
|
+
|
271
|
+
--say (-S) Uses speech synthesis via the 'say' command to
|
272
|
+
provide audible feedback, when --auto-update is
|
273
|
+
enabled. Says 'Autobuild complete.',
|
274
|
+
'Loaded [plugin name].', 'Unloaded [plugin name].',
|
275
|
+
'Reloaded [plugin name].', 'Reloading plugins.' and
|
276
|
+
'Plugins reloaded.'
|
277
|
+
Only available on Mac OS X and other systems with a
|
278
|
+
'say' command installed.
|
279
|
+
|
280
|
+
:initenv: |+
|
281
|
+
usage: 'rsence initenv [options] [PATH]'
|
282
|
+
|
283
|
+
The 'initenv' command creates a new RSence environment.
|
284
|
+
|
285
|
+
The expected structure of a project environment (where 'project_directory'
|
286
|
+
is the directory of your project) is:
|
287
|
+
|
288
|
+
[d] project_name : The name of your project.
|
289
|
+
[d] conf : The directory of config files.
|
290
|
+
[f] config.yaml : The config file to load by default.
|
291
|
+
[d] db : Directory containing database files.
|
292
|
+
[d] log : Directory containing log files.
|
293
|
+
[d] plugins : Directory containing installed plugins.
|
294
|
+
[d] run : Directory containing runtime pid files.
|
295
|
+
[f] README : Description of the environment directory.
|
296
|
+
[f] VERSION : RSence version the environment was created with
|
297
|
+
|
298
|
+
The 'config.yaml' file contains patches specific to your project.
|
299
|
+
|
300
|
+
The configuration files are loaded and applied in this order:
|
301
|
+
1: [rsence_install_path]/conf/default_conf.yaml
|
302
|
+
2: [rsence_install_path]/conf/local_conf.yaml
|
303
|
+
3: /etc/rsence/config.yaml
|
304
|
+
4: ~/.rsence/config.yaml
|
305
|
+
5: [project_directory]/conf/config.yaml
|
306
|
+
6: Any files given using --conf parameters, in order of occurrence.
|
307
|
+
|
308
|
+
The plugins directory contains the plugins that are run in the project.
|
309
|
+
|
310
|
+
|
311
|
+
Available options:
|
312
|
+
|
313
|
+
--port <number> The port number the http server listens to.
|
314
|
+
|
315
|
+
--addr <ip address> The IP address or net mask the http server listens to.
|
316
|
+
'0.0.0.0' matches all interfaces.
|
317
|
+
'127.0.0.1' matches the local loopback interface.
|
318
|
+
Defaults to 0.0.0.0
|
319
|
+
|
320
|
+
--server <handler> The Rack handler to use. Defaults to mongrel
|
321
|
+
|
322
|
+
--title <title> The title of the index page.
|
323
|
+
|
324
|
+
--database <conn_str> Use the Sequel connection string to configure the
|
325
|
+
default session database.
|
326
|
+
|
327
|
+
--uri-prefix <path> Configure RSence to use this http "directory" as
|
328
|
+
the prefix. It defaults to the root directory: /
|
329
|
+
|
330
|
+
--blank Doesn't install the Welcome -plugin.
|
331
|
+
|
332
|
+
--non-interactive (-q) Doesn't ask anything, just creates the environment
|
333
|
+
with the options supplied.
|
334
|
+
|
335
|
+
For further configuration, edit the config.yaml file.
|
336
|
+
|
337
|
+
:run: |+
|
338
|
+
usage: 'rsence run [options] [PATH]'
|
339
|
+
|
340
|
+
The 'run' command starts RSence in foreground (no daemon). Exit with CTRL-C.
|
341
|
+
|
342
|
+
:start: |+
|
343
|
+
usage: 'rsence start [options] [PATH]'
|
344
|
+
|
345
|
+
The 'start' command starts RSence in the background (as a daemon).
|
346
|
+
|
347
|
+
Use the 'stop' command to stop RSence.
|
348
|
+
|
349
|
+
Use the 'restart' command to restart RSence in the background.
|
350
|
+
|
351
|
+
Use the 'status' command to see if RSence is running.
|
352
|
+
|
353
|
+
:stop: |+
|
354
|
+
usage: 'rsence stop [options] [PATH]'
|
355
|
+
|
356
|
+
The 'stop' command stops RSence running in the background (as a daemon).
|
357
|
+
|
358
|
+
Use the 'status' command to see if RSence is running.
|
359
|
+
|
360
|
+
:restart: |+
|
361
|
+
usage: 'rsence restart [options] [PATH]'
|
362
|
+
|
363
|
+
The 'restart' command restarts RSence in the background (as a daemon).
|
364
|
+
If RSence wasn't running before the 'restart' command was issued, the
|
365
|
+
effect is the same as 'start'.
|
366
|
+
|
367
|
+
Use the 'stop' command to stop RSence.
|
368
|
+
|
369
|
+
Use the 'status' command to see if RSence is running.
|
370
|
+
|
371
|
+
:status: |+
|
372
|
+
usage: 'rsence status [options] [PATH]'
|
373
|
+
|
374
|
+
The 'status' command checks if RSence is running.
|
375
|
+
If started with the 'start', 'run' or 'restart' command, a PID file is written.
|
376
|
+
Status checks if the PID file exists, if the RSence process responds and if
|
377
|
+
the configured TCP port responds in the configured IP address.
|
378
|
+
|
379
|
+
Available options:
|
380
|
+
|
381
|
+
--conf <file.yaml> Use additional config file. You can give this option
|
382
|
+
several times. The <file.yaml> is the configuration
|
383
|
+
file to load.
|
384
|
+
|
385
|
+
--debug (-d) Debug mode. Shortcut for several options useful for
|
386
|
+
developers. Not the preferred mode for production.
|
387
|
+
|
388
|
+
--verbose (-v) More verbose output. Also enabled by --debug
|
389
|
+
|
390
|
+
--port <number> The port number the http server listens to.
|
391
|
+
|
392
|
+
--addr <ip address> The IP address or net mask the http server listens to.
|
393
|
+
|
394
|
+
:save: |+
|
395
|
+
usage: 'rsence save [options] [PATH]'
|
396
|
+
|
397
|
+
The 'save' command signals the RSence process to tell the plugins to save their
|
398
|
+
data and the session manager to save its session database.
|
399
|
+
|
400
|
+
Available options:
|
401
|
+
|
402
|
+
--conf <file.yaml> Use additional config file. You can give this option
|
403
|
+
several times. The <file.yaml> is the configuration
|
404
|
+
file to load.
|
405
|
+
|
406
|
+
--debug (-d) Debug mode. Shortcut for several options useful for
|
407
|
+
developers. Not the preferred mode for production.
|
408
|
+
|
409
|
+
--verbose (-v) More verbose output. Also enabled by --debug
|
410
|
+
|
411
|
+
:version: |+
|
412
|
+
usage: 'rsence version'
|
413
|
+
|
414
|
+
The 'version' command simply outputs the version number of RSence.
|
415
|
+
|
416
|
+
RSence follows the standard four-numbered sequence-based version identification
|
417
|
+
scheme. The scheme is defined like: major.minor[.maintenance[.package]][.pre]
|
418
|
+
|
419
|
+
The major number designates major changes in functionality, sometimes limiting
|
420
|
+
backwards compatibility with software written for previous versions.
|
421
|
+
|
422
|
+
The minor number designates minor changes in functionality, like minor or
|
423
|
+
moderate changes in functionality that usually don't impact backwards
|
424
|
+
compatibilty of software written for a previous release with the same major
|
425
|
+
version.
|
426
|
+
|
427
|
+
The maintenance number designates bug fixes and other minimal changes to
|
428
|
+
the release. In a maintenance number change, no new features are introduced.
|
429
|
+
|
430
|
+
The package number is a sequence used for the package release. Rubygems
|
431
|
+
requires an unique version for each gem released, so pre-releases usually
|
432
|
+
occupy the first package numbers of any release.
|
433
|
+
|
434
|
+
The '.pre' suffix signifies a pre-release, like "Alpha" or "Beta". To
|
435
|
+
install a prerelease version, gem requires the '--pre' command line argument.
|
436
|
+
Release versions never have the '.pre' suffix. There are usually several
|
437
|
+
package number increments of a new release.
|
438
|
+
|
439
|
+
Version number conventions in written text should include both major and
|
440
|
+
minor version numbers prefixed with 'RSence'. The maintennance number
|
441
|
+
is usally not mentioned unless an issue is fix or such is discussed.
|
442
|
+
|
443
|
+
For instance: "RSence 2.0 has undergone some major refactoring since 1.2.1"
|
444
|
+
|
@@ -0,0 +1,193 @@
|
|
1
|
+
= Example: The "welcome" GUIPlugin bundle
|
2
|
+
|
3
|
+
This bundle is installed by default for each new RSence project environment, when created by the +rsence initenv+ command. It displays a simple user interface that contains a congratulatory message of a successful setup. Feel free to experiment with the plugin in your project environment.
|
4
|
+
|
5
|
+
=== File / directory structure
|
6
|
+
This is just an example, the meaning of gui/
|
7
|
+
!!!plain
|
8
|
+
|-- info.yaml
|
9
|
+
|-- values.yaml
|
10
|
+
|-- text
|
11
|
+
| `-- welcome.html
|
12
|
+
|-- gui
|
13
|
+
| `-- welcome.yaml
|
14
|
+
`-- welcome.rb
|
15
|
+
|
16
|
+
=== The +info.yaml+ file of the "welcome" bundle
|
17
|
+
This file defines the meta-information used by RSence to decide the loading order, dependencies and such. This bundle doesn't have any dependencies, so it's just using the default +depends_on: :system+, which means its loaded and called in order after the built-in plugins of RSence.
|
18
|
+
|
19
|
+
The human-readable product name of the bundle
|
20
|
+
!!!yaml
|
21
|
+
title: Welcome message
|
22
|
+
|
23
|
+
The human-readable version of the bundle
|
24
|
+
!!!yaml
|
25
|
+
version: 1.0.0
|
26
|
+
|
27
|
+
A brief description of the package
|
28
|
+
!!!yaml
|
29
|
+
description: |
|
30
|
+
This is a simple welcome message plugin. It's installed in new project
|
31
|
+
environments, when the rsence initenv in executed.
|
32
|
+
You may safely remove this plugin bundle.
|
33
|
+
|
34
|
+
System version requirements. In this case "RSence 2.0.0 or newer"
|
35
|
+
!!!yaml
|
36
|
+
sys_version: '>= 2.0.0'
|
37
|
+
|
38
|
+
=== The +values.yaml+ file of the "welcome" bundle
|
39
|
+
Only two values are used by the "welcome" plugin bundle. One to signal the server the "Close" button is clicked and the other to signal that the "Don't show again" check box is checked.
|
40
|
+
|
41
|
+
The checkbox uses Boolean values and it doesn't need a responder so none is bound. Its default value is false.
|
42
|
+
!!!yaml
|
43
|
+
:dont_show_again:
|
44
|
+
:value: false
|
45
|
+
|
46
|
+
The button (and sheet) in the gui are bound to this value, which defaults to 0 and has the +close_button+ method defined as the responder, which called when the value is changed in the client by clicking the "Close" button.
|
47
|
+
!!!yaml
|
48
|
+
:close:
|
49
|
+
:value: 0
|
50
|
+
:responders:
|
51
|
+
- { :method: close_button }
|
52
|
+
|
53
|
+
=== The +welcome.rb+ source code file of the "welcome" bundle.
|
54
|
+
The code in this file not only define the type and features of the plugin bundle, but also defines a few methods that are triggered.
|
55
|
+
|
56
|
+
The class definition itself, just subclass {RSence::Plugins::GUIPlugin__ GUIPlugin}.
|
57
|
+
class WelcomePlugin < GUIPlugin
|
58
|
+
|
59
|
+
The +gui_params+ method is called by the {RSence::Plugins::GUIParser GUIParser} just before processing the GUITree data. In this case, it's extended to provide not only the values (delivered by the superclass), but also a custom entry, the +:text+ hash with the +:welcome+ member, which is the contents of the +welcome.html+ file inside the +text+ directory of the bundle. The params is accessed using dot notation in Symbol form in the GUITree yaml file.
|
60
|
+
def gui_params( msg )
|
61
|
+
params = super
|
62
|
+
params[:text] = {
|
63
|
+
:welcome => file_read('text/welcome.html')
|
64
|
+
}
|
65
|
+
return params
|
66
|
+
end
|
67
|
+
|
68
|
+
The +close_button+ method is defined as a responder for the +:close+ value defined in the +values.yaml+. It's called when the "Close" button is clicked in the client. If the other value; +:dont_show_again+, has the data value +true+ ("Don't show again" -checkbox is checked), also calls the +disable_self+ method. Finally returns +true+, because the data doesn't need further validation and is good as-is.
|
69
|
+
def close_button( msg, value )
|
70
|
+
dont_show_again = get_ses(msg)[:dont_show_again]
|
71
|
+
if (value.data == 1) and (dont_show_again.data == true)
|
72
|
+
disable_self
|
73
|
+
end
|
74
|
+
return true
|
75
|
+
end
|
76
|
+
|
77
|
+
The +disable_self+ method just disables the "welcome" plugin and tells RSence to unload itself. The "disabled" file means the bundle won't be loaded as long as the file is in place.
|
78
|
+
def disable_self
|
79
|
+
file_write( 'disabled', '' )
|
80
|
+
@plugins.unload_bundle( @name )
|
81
|
+
end
|
82
|
+
|
83
|
+
Ends the class block:
|
84
|
+
end
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
=== The +gui/welcome.yaml+ file of the "welcome" bundle
|
89
|
+
This file has the user interface description encoded in YAML[http://yaml.org/]. It's converted by a {RSence::Plugins::GUIParser GUIParser} instance automatically set up by the {RSence::Plugins::GUIPlugin__ GUIPlugin} class instance, when the RSence web page is loaded (and reloaded) by the user.
|
90
|
+
|
91
|
+
By convention, place the type and version of the GUITree specification first. This is used by the system to interpret the contents accordingly.
|
92
|
+
!!!yaml
|
93
|
+
type: GUITree
|
94
|
+
version: 0.6
|
95
|
+
|
96
|
+
By convention, place the dependencies next. These are the javascript packages to load by the client before rendering the GUITree.
|
97
|
+
!!!yaml
|
98
|
+
dependencies:
|
99
|
+
- default_theme
|
100
|
+
- controls
|
101
|
+
|
102
|
+
Next, the root class of the user interface tree is defined. This is usually an instance of +HApplication+, in this case the +RSence.GUIApp+ is used, because it's a customized extension of +HApplication+ designed for GUITree usage and supports options like +title+ and +priority+ by default.
|
103
|
+
!!!yaml
|
104
|
+
class: RSence.GUIApp
|
105
|
+
options:
|
106
|
+
title: Welcome App
|
107
|
+
priority: 20
|
108
|
+
|
109
|
+
To have the +RSence.GUIApp+ instance titled "Welcome App" contain any views, we define the +subviews+ for it:
|
110
|
+
!!!yaml
|
111
|
+
subviews:
|
112
|
+
|
113
|
+
The first subview is an instance of the +HSheet+ component, which is a component that self-centers, dims the background and its visibility controlled by its value.
|
114
|
+
!!!yaml
|
115
|
+
- class: HSheet
|
116
|
+
|
117
|
+
All components use a +rect+ item to define their geometry, this is usually in form of an Array with at exactly +4+ or +6+ coordinates. In this case, with the offset of +0+ units from the left edge of its parent and +0+ units from the top edge of its parent. It has a size of +600+ units wide and +500+ units tall. Each unit at the default (100%) zoom level is exactly 1 pixel.
|
118
|
+
!!!yaml
|
119
|
+
rect: [ 0, 0, 600, 500 ]
|
120
|
+
|
121
|
+
There is also a {RSence::HValue +HValue+} named +close+ defined in the +values.yaml+. This binds the +HSheet+ instance to the value and vice versa.
|
122
|
+
!!!yaml
|
123
|
+
bind: :values.close
|
124
|
+
|
125
|
+
We also extend the component to kill its application (the +RSence.GUIApp+ defined above), which in effect destructs all the views defined by this GUITree when the data of the value becomes 1.
|
126
|
+
!!!yaml
|
127
|
+
extend:
|
128
|
+
refreshValue: |
|
129
|
+
|
130
|
+
Custom Javascript extensions can be written inline like this. Functions are identified as text blocks that begin with 'function('. Other types are mapped as-is and converted to JSON structures.
|
131
|
+
!!!js
|
132
|
+
function(){
|
133
|
+
this.base();
|
134
|
+
if ( this.value==1 ) {
|
135
|
+
this.app.die();
|
136
|
+
}
|
137
|
+
}
|
138
|
+
|
139
|
+
Then, we define the first subview of the +HSheet+ instance as a +HScrollView+, which is a view that has scroll bars. Its +rect+ is defined with stretching content filling entirely the area of its parent (the +HSheet+) except for the +42+ units at the bottom of its parent (the +HSheet+). Its minimum size is defined as +550+ units wide and +300+ units tall. Its options define that it displays horizontal scroll bars if the content doesn't fit and a white background with a black border at the bottom.
|
140
|
+
!!!yaml
|
141
|
+
- class: HScrollView
|
142
|
+
rect: [ 0, 0, 550, 300, 0, 42 ]
|
143
|
+
options:
|
144
|
+
scrollX: false
|
145
|
+
scrollY: auto
|
146
|
+
style:
|
147
|
+
- [ 'background-color', 'white' ]
|
148
|
+
- [ 'border-bottom', '1px solid black' ]
|
149
|
+
|
150
|
+
Then, a few few items are defined as its subviews. An HImageView displaying the RSence logo, a +HView+ displaying a link to rsence.org and a +HInlineView+ displaying the contents of the +text/welcome.html+ file.
|
151
|
+
!!!yaml
|
152
|
+
- class: HImageView
|
153
|
+
rect: [ 18, 10, 559, 110 ]
|
154
|
+
options:
|
155
|
+
value: http://rsence.org/rsence_org_logo.gif
|
156
|
+
- class: HView
|
157
|
+
rect: [ null, 95, 310, 25, 35, null ]
|
158
|
+
options:
|
159
|
+
html: |
|
160
|
+
<i style="font-family:Helvetica,Arial,sans-serif;font-size:16px;">
|
161
|
+
<a style="color:#28c;font-weight:bold" href="http://rsence.org/">http://www.rsence.org/</a>
|
162
|
+
</i>
|
163
|
+
style:
|
164
|
+
- - text-align
|
165
|
+
- right
|
166
|
+
- class: HInlineView
|
167
|
+
rect: [ 0, 0, null, null, 0, 0 ]
|
168
|
+
options:
|
169
|
+
html: :text.welcome
|
170
|
+
style:
|
171
|
+
- - font-family
|
172
|
+
- 'Helvetica, Arial, sans-serif'
|
173
|
+
- - font-size
|
174
|
+
- 16px
|
175
|
+
- - line-height
|
176
|
+
- 20px
|
177
|
+
|
178
|
+
Finally, we define a +HClickValueButton+ (a button with the click event triggering a change of its value to +1+), which is bound to the same value as the +HSheet+, causing the +HSheet+ and the application including all child views to be destructed. The value change is also synchronized to the server-side responder method +close_button+ in the +welcome.rb+ file.
|
179
|
+
!!!yaml
|
180
|
+
- class: HClickValueButton
|
181
|
+
rect: [ null, null, 60, 24, 8, 8 ]
|
182
|
+
bind: :values.close
|
183
|
+
options:
|
184
|
+
label: Close
|
185
|
+
|
186
|
+
We also define a +HCheckbox+ with another value bound, the +:dont_show_again+. This causes the plugin to be disabled when the close button is clicked.
|
187
|
+
!!!yaml
|
188
|
+
- class: HCheckbox
|
189
|
+
rect: [ null, null, 130, 24, 74, 8 ]
|
190
|
+
bind: :values.dont_show_again
|
191
|
+
options:
|
192
|
+
label: Don't show again
|
193
|
+
|
File without changes
|