rsence 2.0.0.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/INSTALL.rdoc +295 -0
- data/LICENSE +622 -0
- data/README.rdoc +24 -0
- data/VERSION +1 -0
- data/bin/build_client.rb +254 -0
- data/bin/help +6 -0
- data/bin/launch.rb +120 -0
- data/bin/rdoc.sh +2 -0
- data/bin/restart +6 -0
- data/bin/rsence +120 -0
- data/bin/run +6 -0
- data/bin/run.rb +6 -0
- data/bin/save +6 -0
- data/bin/start +6 -0
- data/bin/status +6 -0
- data/bin/stop +6 -0
- data/conf/config.ru +5 -0
- data/conf/default_conf.yaml +337 -0
- data/conf/default_strings.yaml +77 -0
- data/conf/local_conf.yaml +14 -0
- data/conf/unicorn.conf +78 -0
- data/js/comm/comm/autosync/autosync.js +18 -0
- data/js/comm/comm/autosync/js.inc +0 -0
- data/js/comm/comm/comm.js +195 -0
- data/js/comm/comm/js.inc +0 -0
- data/js/comm/comm/queue/js.inc +0 -0
- data/js/comm/comm/queue/queue.js +183 -0
- data/js/comm/comm/session/js.inc +0 -0
- data/js/comm/comm/session/session.js +51 -0
- data/js/comm/comm/sessionwatcher/js.inc +0 -0
- data/js/comm/comm/sessionwatcher/sessionwatcher.js +43 -0
- data/js/comm/comm/transporter/js.inc +0 -0
- data/js/comm/comm/transporter/transporter.js +257 -0
- data/js/comm/comm/urlresponder/js.inc +0 -0
- data/js/comm/comm/urlresponder/urlresponder.js +148 -0
- data/js/comm/comm/values/js.inc +0 -0
- data/js/comm/comm/values/values.js +432 -0
- data/js/comm/jsloader/js.inc +0 -0
- data/js/comm/jsloader/jsloader.js +114 -0
- data/js/comm/reloadapp/js.inc +0 -0
- data/js/comm/reloadapp/reloadapp.js +150 -0
- data/js/comm/reloadapp/themes/default/reloadapp_warning-ie6.gif +0 -0
- data/js/comm/reloadapp/themes/default/reloadapp_warning.png +0 -0
- data/js/comm/sha/js.inc +0 -0
- data/js/comm/sha/sha.js +432 -0
- data/js/comm/values/value/js.inc +0 -0
- data/js/comm/values/value/value.js +182 -0
- data/js/comm/values/valuematrix/js.inc +0 -0
- data/js/comm/values/valuematrix/valuematrix.js +138 -0
- data/js/controls/button/button.js +57 -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 +47 -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/datetime/calendar/calendar.js +197 -0
- data/js/controls/datetime/calendar/js.inc +0 -0
- data/js/controls/datetime/calendar/themes/default/calendar.css +108 -0
- data/js/controls/datetime/calendar/themes/default/calendar.html +9 -0
- data/js/controls/datetime/calendar/themes/default/calendar_arrows-ie6.gif +0 -0
- data/js/controls/datetime/calendar/themes/default/calendar_arrows.png +0 -0
- data/js/controls/datetime/datetimevalue/datetimevalue.js +246 -0
- data/js/controls/datetime/datetimevalue/js.inc +0 -0
- data/js/controls/datetime/timesheet/js.inc +0 -0
- data/js/controls/datetime/timesheet/themes/default/timesheet.css +30 -0
- data/js/controls/datetime/timesheet/themes/default/timesheet.html +2 -0
- data/js/controls/datetime/timesheet/timesheet.js +182 -0
- data/js/controls/datetime/timesheet_item/js.inc +0 -0
- data/js/controls/datetime/timesheet_item/themes/default/timesheet_item.css +42 -0
- data/js/controls/datetime/timesheet_item/themes/default/timesheet_item.html +8 -0
- data/js/controls/datetime/timesheet_item/timesheet_item.js +247 -0
- data/js/controls/datetime/timesheet_item_edit/js.inc +0 -0
- data/js/controls/datetime/timesheet_item_edit/timesheet_item_edit.js +274 -0
- data/js/controls/dialogs/alert_sheet/alert_sheet.js +62 -0
- data/js/controls/dialogs/alert_sheet/js.inc +0 -0
- data/js/controls/dialogs/confirm_sheet/confirm_sheet.js +36 -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 +83 -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 +108 -0
- data/js/controls/imageview/js.inc +0 -0
- data/js/controls/imageview/themes/default/blank.gif +0 -0
- data/js/controls/lists/checkboxlist/checkboxlist.js +170 -0
- data/js/controls/lists/checkboxlist/js.inc +0 -0
- data/js/controls/lists/listitems/js.inc +0 -0
- data/js/controls/lists/listitems/listitems.js +65 -0
- data/js/controls/lists/radiobuttonlist/js.inc +0 -0
- data/js/controls/lists/radiobuttonlist/radiobuttonlist.js +126 -0
- data/js/controls/passwordcontrol/js.inc +0 -0
- data/js/controls/passwordcontrol/passwordcontrol.js +22 -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 +36 -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 +43 -0
- data/js/controls/radiobutton/js.inc +0 -0
- data/js/controls/radiobutton/radiobutton.js +41 -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 +356 -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 +40 -0
- data/js/controls/stepper/js.inc +0 -0
- data/js/controls/stepper/stepper.js +212 -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 +276 -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 +23 -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 +372 -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 +153 -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 +55 -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 +284 -0
- data/js/core/class/class.js +317 -0
- data/js/core/class/js.inc +0 -0
- data/js/core/elem/elem.js +1376 -0
- data/js/core/elem/js.inc +0 -0
- data/js/core/event/event.js +1021 -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/debugg/debugg.js +43 -0
- data/js/debugg/js.inc +0 -0
- data/js/foundation/application/application.js +209 -0
- data/js/foundation/application/js.inc +0 -0
- data/js/foundation/control/control.js +342 -0
- data/js/foundation/control/controldefaults/controldefaults.js +59 -0
- data/js/foundation/control/controldefaults/js.inc +0 -0
- data/js/foundation/control/dummyvalue/dummyvalue.js +50 -0
- data/js/foundation/control/dummyvalue/js.inc +0 -0
- data/js/foundation/control/dyncontrol/dyncontrol.js +494 -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 +713 -0
- data/js/foundation/control/eventresponder/js.inc +0 -0
- data/js/foundation/control/js.inc +0 -0
- data/js/foundation/control/valueresponder/js.inc +0 -0
- data/js/foundation/control/valueresponder/valueresponder.js +77 -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 +610 -0
- data/js/foundation/json_renderer/js.inc +0 -0
- data/js/foundation/json_renderer/json_renderer.js +231 -0
- data/js/foundation/system/js.inc +0 -0
- data/js/foundation/system/system.js +369 -0
- data/js/foundation/thememanager/js.inc +0 -0
- data/js/foundation/thememanager/thememanager.js +387 -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 +113 -0
- data/js/foundation/view/morphanimation/js.inc +0 -0
- data/js/foundation/view/morphanimation/morphanimation.js +236 -0
- data/js/foundation/view/view.js +1804 -0
- data/js/foundation/view/viewdefaults/js.inc +0 -0
- data/js/foundation/view/viewdefaults/viewdefaults.js +25 -0
- data/js/views/centerview/centerview.js +45 -0
- data/js/views/centerview/js.inc +0 -0
- data/js/views/inlineview/inlineview.js +14 -0
- data/js/views/inlineview/js.inc +0 -0
- data/js/views/scrollview/js.inc +0 -0
- data/js/views/scrollview/scrollview.js +39 -0
- data/lib/conf/default.rb +220 -0
- data/lib/conf/wizard.rb +303 -0
- data/lib/daemon/daemon.rb +293 -0
- data/lib/http/broker.rb +102 -0
- data/lib/http/rackup.rb +88 -0
- data/lib/http/request.rb +69 -0
- data/lib/http/response.rb +63 -0
- data/lib/plugins/gui_plugin.rb +129 -0
- data/lib/plugins/guiparser.rb +114 -0
- data/lib/plugins/plugin.rb +652 -0
- data/lib/plugins/plugin_plugins.rb +47 -0
- data/lib/plugins/plugin_sqlite_db.rb +72 -0
- data/lib/plugins/plugin_util.rb +96 -0
- data/lib/plugins/pluginmanager.rb +517 -0
- data/lib/plugins/servlet.rb +69 -0
- data/lib/session/msg.rb +291 -0
- data/lib/session/sessionmanager.rb +491 -0
- data/lib/session/sessionstorage.rb +314 -0
- data/lib/transporter/transporter.rb +254 -0
- data/lib/util/gzstring.rb +5 -0
- data/lib/values/hvalue.rb +323 -0
- data/lib/values/valuemanager.rb +152 -0
- data/plugins/client_pkg/client_pkg.rb +186 -0
- data/plugins/client_pkg/info.yaml +25 -0
- data/plugins/client_pkg/lib/client_pkg_build.rb +569 -0
- data/plugins/client_pkg/lib/client_pkg_cache.rb +50 -0
- data/plugins/client_pkg/lib/client_pkg_serve.rb +210 -0
- data/plugins/client_pkg/log/build_log +0 -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 +150 -0
- data/plugins/index_html/tmpl/index.html +22 -0
- data/plugins/index_html/tmpl/startup_index.html +29 -0
- data/plugins/legacy/disabled +0 -0
- data/plugins/legacy/disabled- +0 -0
- data/plugins/legacy/info.yaml +22 -0
- data/plugins/legacy/legacy.rb +15 -0
- data/plugins/main/js/riassence_ns.js +87 -0
- data/plugins/main/main.rb +234 -0
- data/plugins/main/values.yaml +8 -0
- data/plugins/ticketservices/lib/common.rb +300 -0
- data/plugins/ticketservices/lib/favicon.rb +38 -0
- data/plugins/ticketservices/lib/file.rb +58 -0
- data/plugins/ticketservices/lib/img.rb +50 -0
- data/plugins/ticketservices/lib/objblob.rb +66 -0
- data/plugins/ticketservices/lib/rsrc.rb +34 -0
- data/plugins/ticketservices/lib/upload.rb +206 -0
- data/plugins/ticketservices/ticketservices.rb +268 -0
- data/var/db/.git_include +0 -0
- data/var/log/.git_include +0 -0
- data/var/run/.git_include +0 -0
- metadata +390 -0
@@ -0,0 +1,62 @@
|
|
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
|
+
** HAlertSheet is a simple alert notification control.
|
11
|
+
***/
|
12
|
+
|
13
|
+
HAlertSheet = HSheet.extend({
|
14
|
+
|
15
|
+
/** = Description
|
16
|
+
* Refreshes the label of text if this['alertText'] is set.
|
17
|
+
*
|
18
|
+
**/
|
19
|
+
refreshLabel: function(){
|
20
|
+
this.base();
|
21
|
+
if(this['alertText']){
|
22
|
+
this.alertText.setValue( this.label );
|
23
|
+
}
|
24
|
+
},
|
25
|
+
|
26
|
+
/** = Description
|
27
|
+
* Draws the warning text (this.label) as a HStringView and a warning image
|
28
|
+
* and an alert button.
|
29
|
+
**/
|
30
|
+
drawSubviews: function(){
|
31
|
+
this.icon = HImageView.nu(
|
32
|
+
[ 16, 16, 48, 48 ],
|
33
|
+
this, {
|
34
|
+
value: this.getThemeGfxFile('sheet_warning.png')
|
35
|
+
}
|
36
|
+
);
|
37
|
+
this.alertText = HStringView.nu(
|
38
|
+
[ 80, 16, null, null, 8, 48 ],
|
39
|
+
this, {
|
40
|
+
value: this.label
|
41
|
+
}
|
42
|
+
);
|
43
|
+
this.alertButtons();
|
44
|
+
},
|
45
|
+
|
46
|
+
/** = Description
|
47
|
+
* Draws an alert button.
|
48
|
+
*
|
49
|
+
**/
|
50
|
+
alertButtons: function(){
|
51
|
+
this.okButton = HClickValueButton.nu(
|
52
|
+
[ null, null, 60, 23, 8, 8 ],
|
53
|
+
this, {
|
54
|
+
label: 'OK',
|
55
|
+
valueObj: this.valueObj,
|
56
|
+
events: {
|
57
|
+
click: true
|
58
|
+
}
|
59
|
+
}
|
60
|
+
);
|
61
|
+
}
|
62
|
+
});
|
File without changes
|
@@ -0,0 +1,36 @@
|
|
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
|
+
** Simple confirm sheet control. Acts like HAlertSheet but has a cancel
|
11
|
+
** button as well.
|
12
|
+
***/
|
13
|
+
|
14
|
+
HConfirmSheet = HAlertSheet.extend({
|
15
|
+
/** = Description
|
16
|
+
* Creates a cancel button.
|
17
|
+
*
|
18
|
+
**/
|
19
|
+
alertButtons: function(){
|
20
|
+
this.cancelButton = HClickValueButton.extend({
|
21
|
+
click: function(){
|
22
|
+
this.setValue( -1 );
|
23
|
+
}
|
24
|
+
}).nu(
|
25
|
+
[ null, null, 60, 23, 76, 8 ],
|
26
|
+
this, {
|
27
|
+
label: 'Cancel',
|
28
|
+
valueObj: this.valueObj,
|
29
|
+
events: {
|
30
|
+
click: true
|
31
|
+
}
|
32
|
+
}
|
33
|
+
);
|
34
|
+
this.base();
|
35
|
+
}
|
36
|
+
});
|
File without changes
|
File without changes
|
@@ -0,0 +1,83 @@
|
|
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
|
+
** HSheet is a container component that toggles its visibility
|
12
|
+
** based on its value. When the value is 0, it's visible, otherwise
|
13
|
+
** it's hidden. It expands to fill its parent view, the rect
|
14
|
+
** specifies the size of the sheet inside. The sheet is
|
15
|
+
** centered. It's practical when combined with button
|
16
|
+
** values. Also see HAlertSheet and HConfirmSheet components.
|
17
|
+
**
|
18
|
+
***/
|
19
|
+
HSheet = HControl.extend({
|
20
|
+
componentName: 'sheet',
|
21
|
+
|
22
|
+
/** = Description
|
23
|
+
* Shows of hides HSheet depending on the value.
|
24
|
+
* If the value is 0 the HSheet#show() will be called.
|
25
|
+
* Otherwise HSheet#hide() is called.
|
26
|
+
*
|
27
|
+
**/
|
28
|
+
refreshValue: function(){
|
29
|
+
if(this.value===0){
|
30
|
+
this.show();
|
31
|
+
}
|
32
|
+
else{
|
33
|
+
this.hide();
|
34
|
+
}
|
35
|
+
},
|
36
|
+
|
37
|
+
/** = Description
|
38
|
+
* Draws the sheet rectangle once it has been created and
|
39
|
+
* if it has not been set as hidden by constructor.
|
40
|
+
*
|
41
|
+
* = Returns
|
42
|
+
* +self+
|
43
|
+
|
44
|
+
**/
|
45
|
+
drawRect: function() {
|
46
|
+
if (this.parent && this.rect.isValid) {
|
47
|
+
var _this = this,
|
48
|
+
_elemId = _this.elemId,
|
49
|
+
_styl = ELEM.setStyle,
|
50
|
+
_rect = _this.rect,
|
51
|
+
_width = _rect.width,
|
52
|
+
_left = 0-Math.floor(_rect.width/2),
|
53
|
+
_height = _rect.height;
|
54
|
+
|
55
|
+
_styl( _elemId, 'left', '0px', true);
|
56
|
+
_styl( _elemId, 'top', '0px', true);
|
57
|
+
_styl( _elemId, 'right', '0px', true);
|
58
|
+
_styl( _elemId, 'bottom', '0px', true);
|
59
|
+
_styl( _elemId, 'width', 'auto', true);
|
60
|
+
_styl( _elemId, 'height', 'auto', true);
|
61
|
+
_styl( _elemId, 'min-width', _width+'px', true);
|
62
|
+
_styl( _elemId, 'min-height', _height+'px', true);
|
63
|
+
|
64
|
+
if(_this['markupElemIds']){
|
65
|
+
var _stateId = _this.markupElemIds['state'];
|
66
|
+
_styl( _stateId, 'left', _left+'px', true );
|
67
|
+
_styl( _stateId, 'top', '0px', true );
|
68
|
+
_styl( _stateId, 'width', _width+'px', true );
|
69
|
+
_styl( _stateId, 'height', _height+'px', true );
|
70
|
+
}
|
71
|
+
//-- Show the rectangle once it gets created, unless visibility was set to++
|
72
|
+
//-- hidden in the constructor.++
|
73
|
+
if(undefined === _this.isHidden || _this.isHidden === false) {
|
74
|
+
_styl( _elemId, 'visibility', 'inherit', true);
|
75
|
+
}
|
76
|
+
_styl( _elemId, 'display', 'block', true);
|
77
|
+
_this._updateZIndex();
|
78
|
+
_this.drawn = true;
|
79
|
+
}
|
80
|
+
return this;
|
81
|
+
}
|
82
|
+
});
|
83
|
+
|
@@ -0,0 +1,64 @@
|
|
1
|
+
.sheet_bg,
|
2
|
+
.sheet_body,
|
3
|
+
.sheet_dimmer,
|
4
|
+
.sheet_center,
|
5
|
+
.sheet_content,
|
6
|
+
.sheet_body_edge_left,
|
7
|
+
.sheet_body_edge_right,
|
8
|
+
.sheet_body_corner_left,
|
9
|
+
.sheet_body_corner_right,
|
10
|
+
.sheet_body_edge_bottom,
|
11
|
+
.sheet_subview {
|
12
|
+
position: absolute;
|
13
|
+
display: block;
|
14
|
+
overflow: hidden;
|
15
|
+
cursor: inherit;
|
16
|
+
background-repeat: no-repeat;
|
17
|
+
}
|
18
|
+
.sheet_dimmer {
|
19
|
+
top: 0px; left: 0px; right: 0px; bottom: 0px;
|
20
|
+
background-repeat: repeat;
|
21
|
+
background-image: #{this.getCssFilePath('sheet_dim.png')};
|
22
|
+
}
|
23
|
+
.sheet_center {
|
24
|
+
top: 0px; left: 50%; overflow: visible; width: 0px; height: 0px;
|
25
|
+
}
|
26
|
+
.sheet_bg {
|
27
|
+
left: 24px; top: 0px; right: 24px; bottom: 24px;
|
28
|
+
background-repeat: repeat;
|
29
|
+
background-image: #{this.getCssFilePath('sheet_bg.png')};
|
30
|
+
}
|
31
|
+
.sheet_body {
|
32
|
+
left: 0px; top: 0px; right: 0px; bottom: 0px;
|
33
|
+
}
|
34
|
+
.sheet_body * {
|
35
|
+
background-image: #{this.getCssFilePath('sheet_parts1.png')};
|
36
|
+
}
|
37
|
+
.sheet_body_edge_left {
|
38
|
+
left: 0px; top: 0px; bottom: 24px; width: 24px;
|
39
|
+
background-repeat: repeat-y;
|
40
|
+
background-position: -48px 0px;
|
41
|
+
}
|
42
|
+
.sheet_body_edge_right {
|
43
|
+
right: 0px; top: 0px; bottom: 24px; width: 24px;
|
44
|
+
background-repeat: repeat-y;
|
45
|
+
background-position: -72px 0px;
|
46
|
+
}
|
47
|
+
.sheet_body_corner_left {
|
48
|
+
left: 0px; bottom: 0px; height: 24px; width: 24px;
|
49
|
+
background-position: 0px 0px;
|
50
|
+
}
|
51
|
+
.sheet_body_corner_right {
|
52
|
+
right: 0px; bottom: 0px; height: 24px; width: 24px;
|
53
|
+
background-position: -24px 0px;
|
54
|
+
}
|
55
|
+
.sheet_body_edge_bottom {
|
56
|
+
left: 24px; bottom: 0px; right: 24px; height: 24px;
|
57
|
+
background-repeat: repeat-x;
|
58
|
+
background-position: 0px 0px;
|
59
|
+
background-image: #{this.getCssFilePath('sheet_parts2.png')};
|
60
|
+
}
|
61
|
+
.sheet_subview {
|
62
|
+
left: 2px; top: 0px; right: 2px; bottom: 2px;
|
63
|
+
}
|
64
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<div class="sheet_dimmer"></div>
|
2
|
+
<div class="sheet_center">
|
3
|
+
<div class="sheet_content" id="state#{_ID}">
|
4
|
+
<div class="sheet_bg"></div>
|
5
|
+
<div class="sheet_body">
|
6
|
+
<div class="sheet_body_edge_left"></div>
|
7
|
+
<div class="sheet_body_edge_right"></div>
|
8
|
+
<div class="sheet_body_edge_bottom"></div>
|
9
|
+
<div class="sheet_body_corner_left"></div>
|
10
|
+
<div class="sheet_body_corner_right"></div>
|
11
|
+
</div>
|
12
|
+
<div class="sheet_subview" id="subview#{_ID}"></div>
|
13
|
+
</div>
|
14
|
+
</div>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,108 @@
|
|
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
|
+
/*** = Description
|
10
|
+
** HImageView is a control unit intended to display images on the screen
|
11
|
+
** through the HTML <IMG> tag. The HImageView class is a container
|
12
|
+
** to visualize
|
13
|
+
** images loaded via URL. It supports scaling via two class methods,
|
14
|
+
** scaleToFit and scaleToOriginal. If the image is unable to be loaded,
|
15
|
+
** a default blank image will be rendered.
|
16
|
+
**
|
17
|
+
***/
|
18
|
+
HImageView = HControl.extend({
|
19
|
+
|
20
|
+
controlDefaults: (HControlDefaults.extend({
|
21
|
+
scaleToFit: true,
|
22
|
+
value: null,
|
23
|
+
constructor: function(_ctrl){
|
24
|
+
if(this.value===null){
|
25
|
+
// default to a blank image
|
26
|
+
this.value = _ctrl.getThemeGfxPath() + "/blank.gif";
|
27
|
+
}
|
28
|
+
}
|
29
|
+
})),
|
30
|
+
|
31
|
+
_makeScaleToFit: function(_parentId){
|
32
|
+
var _value = (this.value!==null)?this.value:(this.options.valueObj?this.options.valueObj.value:this.options.value);
|
33
|
+
this.elemId = ELEM.make(_parentId,'img');
|
34
|
+
ELEM.setAttr(this.elemId,'src',_value);
|
35
|
+
ELEM.setAttr(this.elemId,'alt',this.label);
|
36
|
+
ELEM.setAttr(this.elemId,'title',this.label);
|
37
|
+
},
|
38
|
+
_makeScaleToOriginal: function(_parentId){
|
39
|
+
var _value = (this.value!==null)?this.value:(this.options.valueObj?this.options.valueObj.value:this.options.value);
|
40
|
+
this.elemId = ELEM.make(_parentId,'div');
|
41
|
+
ELEM.setStyle(this.elemId,'background-image','url('+_value+')');
|
42
|
+
ELEM.setStyle(this.elemId,'background-position','0px 0px');
|
43
|
+
ELEM.setStyle(this.elemId,'background-repeat','no-repeat');
|
44
|
+
ELEM.setAttr(this.elemId,'title',this.label);
|
45
|
+
},
|
46
|
+
_makeElem: function(_parentId){
|
47
|
+
if(this.options.scaleToFit){
|
48
|
+
this._makeScaleToFit(_parentId);
|
49
|
+
}
|
50
|
+
else {
|
51
|
+
this._makeScaleToOriginal(_parentId);
|
52
|
+
}
|
53
|
+
},
|
54
|
+
|
55
|
+
/** = Description
|
56
|
+
* Used to refresh HImageView if the this.value is changed.
|
57
|
+
*
|
58
|
+
**/
|
59
|
+
refreshValue: function(){
|
60
|
+
if(this.options.scaleToFit){
|
61
|
+
ELEM.setAttr(this.elemId,'src',this.value);
|
62
|
+
}
|
63
|
+
else{
|
64
|
+
ELEM.setStyle(this.elemId,'background-image','url('+this.value+')');
|
65
|
+
}
|
66
|
+
},
|
67
|
+
|
68
|
+
/** = Description
|
69
|
+
* Refreshesh the label of HImageView.
|
70
|
+
*
|
71
|
+
**/
|
72
|
+
refreshLabel: function(){
|
73
|
+
if(this.options.scaleToFit){
|
74
|
+
ELEM.setAttr(this.elemId,'alt',this.label);
|
75
|
+
}
|
76
|
+
ELEM.setAttr(this.elemId,'title',this.label);
|
77
|
+
},
|
78
|
+
|
79
|
+
/** = Description
|
80
|
+
* Changes the size of the image element so that it fits in the rectangle of
|
81
|
+
* the view.
|
82
|
+
*
|
83
|
+
**/
|
84
|
+
scaleToFit: function() {
|
85
|
+
if(!this.options.scaleToFit){
|
86
|
+
ELEM.del(this.elemId);
|
87
|
+
this._makeScaleToFit(this._getParentElemId());
|
88
|
+
this.options.scaleToFit=true;
|
89
|
+
}
|
90
|
+
},
|
91
|
+
|
92
|
+
|
93
|
+
/** = Description
|
94
|
+
* Resizes the image element to its original dimesions. If the image is larger
|
95
|
+
* than the rectangle of this view, clipping will occur.
|
96
|
+
*
|
97
|
+
**/
|
98
|
+
scaleToOriginal: function() {
|
99
|
+
if(this.options.scaleToFit){
|
100
|
+
ELEM.del(this.elemId);
|
101
|
+
this._makeScaleToOriginal(this._getParentElemId());
|
102
|
+
this.options.scaleToFit=false;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
});
|
File without changes
|
Binary file
|
@@ -0,0 +1,170 @@
|
|
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
|
+
** This class is still at experimental phase.
|
11
|
+
** Please assume that the API _will_ change later.
|
12
|
+
** HCheckboxList is a combined list of HCheckboxes.
|
13
|
+
**
|
14
|
+
***/
|
15
|
+
HCheckboxList = HControl.extend({
|
16
|
+
|
17
|
+
/** = Description
|
18
|
+
* Draws borders with 1px and sets 'overflow' to 'auto'.
|
19
|
+
*
|
20
|
+
**/
|
21
|
+
drawSubviews: function(){
|
22
|
+
this.setStyle('border','1px solid #999');
|
23
|
+
this.setStyle('overflow','auto');
|
24
|
+
},
|
25
|
+
listItems: [],
|
26
|
+
listItemViews: [],
|
27
|
+
ListCheckbox: HCheckbox.extend({
|
28
|
+
|
29
|
+
/** = Description
|
30
|
+
* Adds listValues to the parent if they are true otherwise deletes them.
|
31
|
+
*
|
32
|
+
**/
|
33
|
+
refreshValue: function(){
|
34
|
+
this.base();
|
35
|
+
if(this.value === true){
|
36
|
+
this.parent.addItem( this.options.listValue );
|
37
|
+
}
|
38
|
+
else{
|
39
|
+
this.parent.delItem( this.options.listValue );
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}),
|
43
|
+
|
44
|
+
/** = Description
|
45
|
+
* Checks if +_listValue+ can be found from the values. Adds the value
|
46
|
+
* if it can't be found.
|
47
|
+
*
|
48
|
+
* = Parameters
|
49
|
+
* +_listValue+:: listValue to add.
|
50
|
+
*
|
51
|
+
**/
|
52
|
+
addItem: function( _listValue ){
|
53
|
+
if(this.value.indexOf(_listValue) === -1){
|
54
|
+
var _newValue = [], i = 0;
|
55
|
+
for( ; i < this.value.length; i++ ){
|
56
|
+
_newValue.push( this.value[i] );
|
57
|
+
}
|
58
|
+
_newValue.push( _listValue );
|
59
|
+
this.setValue( _newValue );
|
60
|
+
}
|
61
|
+
},
|
62
|
+
|
63
|
+
/** = Description
|
64
|
+
* Checks if the item can be found from this.value and deletes it
|
65
|
+
* in case it can be found.
|
66
|
+
*
|
67
|
+
* = Parameters
|
68
|
+
* +_listValue+:: A listValue to delete.
|
69
|
+
*
|
70
|
+
**/
|
71
|
+
delItem: function( _listValue ){
|
72
|
+
var _listIndex = this.value.indexOf(_listValue);
|
73
|
+
if(_listIndex !== -1){
|
74
|
+
var _newValue = [], i = 0;
|
75
|
+
for( ; i < this.value.length; i++ ){
|
76
|
+
if(this.value[i] !== _listValue){
|
77
|
+
_newValue.push( this.value[i] );
|
78
|
+
}
|
79
|
+
}
|
80
|
+
this.setValue( _newValue );
|
81
|
+
}
|
82
|
+
},
|
83
|
+
|
84
|
+
/** = Description
|
85
|
+
* Setter function for listItems and listImetViews. Destroys
|
86
|
+
* the old ListCheckboxes before creating the new ones based on the
|
87
|
+
* listItems given as an parameter.
|
88
|
+
*
|
89
|
+
* = Parameters
|
90
|
+
* +_listItems+:: listItems is an array-packed array, where each index in the
|
91
|
+
* surrounding array contains a [ value, label ] pair.
|
92
|
+
* The value is mapped to the value of the HRadiobuttonList
|
93
|
+
* instance when its HRadiobutton instance is selected.
|
94
|
+
*
|
95
|
+
**/
|
96
|
+
setListItems: function(_listItems){
|
97
|
+
var _listItem,
|
98
|
+
_value,
|
99
|
+
_label,
|
100
|
+
_checked,
|
101
|
+
_checkbox,
|
102
|
+
i = 0;
|
103
|
+
for ( ; i < this.listItemViews.length; i++ ) {
|
104
|
+
try {
|
105
|
+
this.listItemViews[i].die();
|
106
|
+
}
|
107
|
+
catch(e) {
|
108
|
+
console.log('HCheckboxList, setListItems item destruction error: ',e);
|
109
|
+
}
|
110
|
+
}
|
111
|
+
this.listItems = _listItems;
|
112
|
+
this.listItemViews = [];
|
113
|
+
for ( i = 0 ; i < _listItems.length; i++ ){
|
114
|
+
_listItem = _listItems[i];
|
115
|
+
_value = _listItem[0];
|
116
|
+
_label = _listItem[1];
|
117
|
+
_checked = (this.value.indexOf( _value ) !== -1);
|
118
|
+
_checkbox = this.ListCheckbox.nu(
|
119
|
+
[ 4, (i*23)+4, null, 23, 4, null ],
|
120
|
+
this, {
|
121
|
+
label: _label,
|
122
|
+
value: _checked,
|
123
|
+
listValue: _value
|
124
|
+
}
|
125
|
+
);
|
126
|
+
this.listItemViews[i] = _checkbox;
|
127
|
+
}
|
128
|
+
this.refreshValue();
|
129
|
+
},
|
130
|
+
|
131
|
+
/** = Description
|
132
|
+
* Sets listItems and ListItemViews to null and calls
|
133
|
+
* the inherited destructor.
|
134
|
+
*
|
135
|
+
**/
|
136
|
+
die: function(){
|
137
|
+
this.listItems = null;
|
138
|
+
this.listItemViews = null;
|
139
|
+
this.base();
|
140
|
+
},
|
141
|
+
|
142
|
+
/** = Description
|
143
|
+
* Checks whether there are listItemViews and if there are,
|
144
|
+
* refreshes their state.
|
145
|
+
*
|
146
|
+
* = Returns
|
147
|
+
* +self+
|
148
|
+
*
|
149
|
+
**/
|
150
|
+
refreshValue: function(){
|
151
|
+
if(this.listItemViews.length === 0){
|
152
|
+
return this;
|
153
|
+
}
|
154
|
+
var _value = this.value,
|
155
|
+
_listItems = this.listItems,
|
156
|
+
_listItemValue,
|
157
|
+
_selectedItems = [],
|
158
|
+
i = 0,
|
159
|
+
_isSelected;
|
160
|
+
for( ; i < _listItems.length; i++ ){
|
161
|
+
_listItemValue = _listItems[i][0];
|
162
|
+
_isSelected = (_value.indexOf( _listItemValue ) !== -1);
|
163
|
+
this.listItemViews[i].setValue( _isSelected );
|
164
|
+
if(_isSelected){
|
165
|
+
_selectedItems.push( _listItemValue );
|
166
|
+
}
|
167
|
+
}
|
168
|
+
return this;
|
169
|
+
}
|
170
|
+
});
|