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
File without changes
|
@@ -0,0 +1,55 @@
|
|
1
|
+
/* Riassence Framework
|
2
|
+
* Copyright 2008 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
|
+
HValidatorView = HControl.extend({
|
10
|
+
|
11
|
+
constructor: function(_rect, _parent, _options) {
|
12
|
+
if(_options !== undefined){
|
13
|
+
if(_options.valueField && _options.valueField.componentBehaviour[1] === 'control'){
|
14
|
+
_rect.offsetTo(
|
15
|
+
_options.valueField.rect.right,
|
16
|
+
_options.valueField.rect.top
|
17
|
+
);
|
18
|
+
}
|
19
|
+
}
|
20
|
+
this.base(_rect, _parent, _options);
|
21
|
+
},
|
22
|
+
|
23
|
+
/** = Description
|
24
|
+
* Ensures the value set is a Boolean.
|
25
|
+
*
|
26
|
+
* = Parameters
|
27
|
+
* +_flag+:: True to set the status to selected, false to set to unselected.
|
28
|
+
*
|
29
|
+
**/
|
30
|
+
setValue: function(_flag) {
|
31
|
+
if (!_flag && _flag !== false) {
|
32
|
+
_flag = false;
|
33
|
+
}
|
34
|
+
this.base(_flag);
|
35
|
+
},
|
36
|
+
|
37
|
+
/** = Description
|
38
|
+
* Updates the graphics to match the Boolean value.
|
39
|
+
*
|
40
|
+
**/
|
41
|
+
refreshValue: function(){
|
42
|
+
var _this = this,
|
43
|
+
_value = _this.value,
|
44
|
+
_trueValue = _value === true,
|
45
|
+
_x = _trueValue?-21:0,
|
46
|
+
_y = _this.enabled?0:-21,
|
47
|
+
_title = _trueValue?'':_value,
|
48
|
+
_elemId = _this.elemId;
|
49
|
+
ELEM.setStyle(_elemId,'background-image',"url("+_this.getThemeGfxFile('validator.png')+")");
|
50
|
+
ELEM.setStyle(_elemId,'background-repeat','no-repeat');
|
51
|
+
ELEM.setStyle(_elemId,'background-position',_x+'px '+_y+'px');
|
52
|
+
}
|
53
|
+
|
54
|
+
|
55
|
+
});
|
File without changes
|
@@ -0,0 +1,219 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
.window_titlebar,
|
4
|
+
.window_titlebar_edge_left,
|
5
|
+
.window_titlebar_center,
|
6
|
+
.window_titlebar_edge_right,
|
7
|
+
.window_bg,
|
8
|
+
.window_body,
|
9
|
+
.window_body_edge_left,
|
10
|
+
.window_body_edge_right,
|
11
|
+
.window_body_corner_left,
|
12
|
+
.window_body_corner_right,
|
13
|
+
.window_body_edge_bottom,
|
14
|
+
.window_label,
|
15
|
+
.window_controls,
|
16
|
+
.window_subview,
|
17
|
+
.window_controls_close,
|
18
|
+
.window_controls_collapse,
|
19
|
+
.window_controls_zoom {
|
20
|
+
position: absolute;
|
21
|
+
display: block;
|
22
|
+
overflow: hidden;
|
23
|
+
cursor: inherit;
|
24
|
+
background-repeat: no-repeat;
|
25
|
+
}
|
26
|
+
|
27
|
+
.window_controls * {
|
28
|
+
cursor: pointer;
|
29
|
+
}
|
30
|
+
|
31
|
+
.window_titlebar {
|
32
|
+
left: 0px; top: 0px; height: 24px; min-width: 96px; right: 0px;
|
33
|
+
}
|
34
|
+
|
35
|
+
.window_titlebar * {
|
36
|
+
background-image: #{this.getCssFilePath('window_parts1.png')};
|
37
|
+
}
|
38
|
+
|
39
|
+
.window_titlebar_edge_left {
|
40
|
+
left: 0px; top: 0px; width: 24px; height: 24px;
|
41
|
+
background-position: 0px 0px;
|
42
|
+
}
|
43
|
+
|
44
|
+
.inactive .window_titlebar_edge_left {
|
45
|
+
background-position: 0px -48px;
|
46
|
+
}
|
47
|
+
|
48
|
+
.window_titlebar_edge_right {
|
49
|
+
right: 0px; top: 0px; width: 24px; height: 24px;
|
50
|
+
background-position: -24px 0px;
|
51
|
+
}
|
52
|
+
|
53
|
+
.inactive .window_titlebar_edge_right {
|
54
|
+
right: 0px; top: 0px; width: 24px; height: 24px;
|
55
|
+
background-position: -24px -48px;
|
56
|
+
}
|
57
|
+
|
58
|
+
.window_titlebar_center {
|
59
|
+
left: 24px; top: 0px; right: 24px; height: 24px;
|
60
|
+
background-position: 0px 0px;
|
61
|
+
background-repeat: repeat-x;
|
62
|
+
background-image: #{this.getCssFilePath('window_parts2.png')};
|
63
|
+
}
|
64
|
+
|
65
|
+
.inactive .window_titlebar_center {
|
66
|
+
background-position: 0px -48px;
|
67
|
+
}
|
68
|
+
|
69
|
+
.window_bg {
|
70
|
+
left: 24px; top: 24px; right: 24px; bottom: 24px;
|
71
|
+
background-repeat: repeat;
|
72
|
+
background-image: #{this.getCssFilePath('window_bg_active.png')};
|
73
|
+
}
|
74
|
+
|
75
|
+
.inactive .window_bg {
|
76
|
+
background-image: #{this.getCssFilePath('window_bg_inactive.png')};
|
77
|
+
}
|
78
|
+
|
79
|
+
.window_body {
|
80
|
+
left: 0px; top: 24px; right: 0px; bottom: 0px;
|
81
|
+
}
|
82
|
+
|
83
|
+
.window_body * {
|
84
|
+
background-image: #{this.getCssFilePath('window_parts1.png')};
|
85
|
+
}
|
86
|
+
|
87
|
+
.window_body_edge_left {
|
88
|
+
left: 0px; top: 0px; bottom: 24px; width: 24px;
|
89
|
+
background-repeat: repeat-y;
|
90
|
+
background-position: -72px 0px;
|
91
|
+
}
|
92
|
+
|
93
|
+
.inactive .window_body_edge_left {
|
94
|
+
background-position: -120px 0px;
|
95
|
+
}
|
96
|
+
|
97
|
+
.window_body_edge_right {
|
98
|
+
right: 0px; top: 0px; bottom: 24px; width: 24px;
|
99
|
+
background-repeat: repeat-y;
|
100
|
+
background-position: -96px 0px;
|
101
|
+
}
|
102
|
+
|
103
|
+
.inactive .window_body_edge_right {
|
104
|
+
background-position: -144px 0px;
|
105
|
+
}
|
106
|
+
|
107
|
+
.window_body_corner_left {
|
108
|
+
left: 0px; bottom: 0px; height: 24px; width: 24px;
|
109
|
+
background-position: 0px -24px;
|
110
|
+
}
|
111
|
+
.inactive .window_body_corner_left {
|
112
|
+
background-position: 0px -72px;
|
113
|
+
}
|
114
|
+
|
115
|
+
.window_body_corner_right {
|
116
|
+
right: 0px; bottom: 0px; height: 24px; width: 24px;
|
117
|
+
background-position: -24px -24px;
|
118
|
+
}
|
119
|
+
|
120
|
+
.inactive .window_body_corner_right {
|
121
|
+
background-position: -24px -72px;
|
122
|
+
}
|
123
|
+
|
124
|
+
.window_body_edge_bottom {
|
125
|
+
left: 24px; bottom: 0px; right: 24px; height: 24px;
|
126
|
+
background-repeat: repeat-x;
|
127
|
+
background-position: 0px -24px;
|
128
|
+
background-image: #{this.getCssFilePath('window_parts2.png')};
|
129
|
+
}
|
130
|
+
|
131
|
+
.inactive .window_body_edge_bottom {
|
132
|
+
background-position: 0px -72px;
|
133
|
+
}
|
134
|
+
|
135
|
+
.window_label {
|
136
|
+
left: 0px; top: 0px; right: 0px; height: 24px;
|
137
|
+
line-height: 25px;
|
138
|
+
text-align: center;
|
139
|
+
vertical-align: middle;
|
140
|
+
font-family: Arial, sans-serif;
|
141
|
+
font-size: 13px;
|
142
|
+
font-weight: bold;
|
143
|
+
color: #000;
|
144
|
+
}
|
145
|
+
|
146
|
+
.inactive .window_label {
|
147
|
+
color: #666;
|
148
|
+
}
|
149
|
+
|
150
|
+
.window_controls {
|
151
|
+
left: 0px; top: 0px; right: 0px; bottom: 0px;
|
152
|
+
}
|
153
|
+
|
154
|
+
.window_subview {
|
155
|
+
left: 2px; top: 26px; right: 2px; bottom: 2px;
|
156
|
+
}
|
157
|
+
|
158
|
+
.window_resize_se {
|
159
|
+
position: absolute;
|
160
|
+
right: 0px; bottom: 0px; width: 13px; height: 13px;
|
161
|
+
cursor: se-resize;
|
162
|
+
z-index: 10000;
|
163
|
+
background-position: -59px -35px;
|
164
|
+
font-size: 0px;
|
165
|
+
background-image: #{this.getCssFilePath('window_parts1.png')};
|
166
|
+
}
|
167
|
+
|
168
|
+
.inactive .window_resize_se {
|
169
|
+
background-position: -59px -83px;
|
170
|
+
}
|
171
|
+
|
172
|
+
.window_controls_close,
|
173
|
+
.window_controls_collapse,
|
174
|
+
.window_controls_zoom {
|
175
|
+
top: 6px; width: 15px; height: 15px;
|
176
|
+
background-image: #{this.getCssFilePath('window_buttons.png')};
|
177
|
+
}
|
178
|
+
|
179
|
+
.window_controls_close {
|
180
|
+
left: 8px;
|
181
|
+
background-position: 0px 0px;
|
182
|
+
}
|
183
|
+
|
184
|
+
.window_controls:hover .window_controls_close {
|
185
|
+
background-position: 0px -15px;
|
186
|
+
}
|
187
|
+
|
188
|
+
.window_controls:hover .window_controls_close:active {
|
189
|
+
background-position: 0px -30px;
|
190
|
+
}
|
191
|
+
|
192
|
+
|
193
|
+
.window_controls_collapse {
|
194
|
+
left: 27px;
|
195
|
+
background-position: -30px 0px;
|
196
|
+
}
|
197
|
+
|
198
|
+
.window_controls:hover .window_controls_collapse {
|
199
|
+
background-position: -30px -15px;
|
200
|
+
}
|
201
|
+
|
202
|
+
.window_controls:hover .window_controls_collapse:active {
|
203
|
+
background-position: -30px -30px;
|
204
|
+
}
|
205
|
+
|
206
|
+
|
207
|
+
.window_controls_zoom {
|
208
|
+
left: 46px;
|
209
|
+
background-position: -15px 0px;
|
210
|
+
}
|
211
|
+
|
212
|
+
.window_controls:hover .window_controls_zoom {
|
213
|
+
background-position: -15px -15px;
|
214
|
+
}
|
215
|
+
|
216
|
+
.window_controls:hover .window_controls_zoom:active {
|
217
|
+
background-position: -15px -30px;
|
218
|
+
}
|
219
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<div class="window_titlebar">
|
2
|
+
<div class="window_titlebar_edge_left"></div>
|
3
|
+
<div class="window_titlebar_center"></div>
|
4
|
+
<div class="window_titlebar_edge_right"></div>
|
5
|
+
</div>
|
6
|
+
<div class="window_bg"></div>
|
7
|
+
<div class="window_body">
|
8
|
+
<div class="window_body_edge_left"></div>
|
9
|
+
<div class="window_body_edge_right"></div>
|
10
|
+
<div class="window_body_edge_bottom"></div>
|
11
|
+
<div class="window_body_corner_left"></div>
|
12
|
+
<div class="window_body_corner_right"></div>
|
13
|
+
</div>
|
14
|
+
<div class="window_label" id="label#{_ID}">#{this.label}</div>
|
15
|
+
<div class="window_controls" id="control#{_ID}">#{this.options.closeButton?'<div class="window_controls_close" onclick="HSystem.views['+this.viewId+'].windowClose();"></div>':''}#{this.options.collapseButton?'<div class="window_controls_collapse" onclick="HSystem.views['+this.viewId+'].windowCollapse();"></div>':''}#{this.options.zoomButton?'<div class="window_controls_zoom" onclick="HSystem.views['+this.viewId+'].windowZoom();"></div>':''}</div>
|
16
|
+
<div class="window_subview" id="subview#{_ID}"></div>
|
17
|
+
#{this.options.noResize?'':'<div class="window_resize_se"></div>'}
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,284 @@
|
|
1
|
+
/* Riassence Framework
|
2
|
+
* Copyright 2008 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
|
+
** The HWindow component can contain subviews and its position and size
|
11
|
+
** is modifiable by the user (within limits).
|
12
|
+
** Its label is the title of the HWindow and its constructor support a
|
13
|
+
** few additions to the set of HDynControl#controlDefaults.
|
14
|
+
** See #controlDefaults
|
15
|
+
**
|
16
|
+
***/
|
17
|
+
HWindow = HDynControl.extend({
|
18
|
+
|
19
|
+
componentName: 'window',
|
20
|
+
|
21
|
+
/** = Description
|
22
|
+
* In addition to the standard HControl#constructor options,
|
23
|
+
* the following properties can be set:
|
24
|
+
*
|
25
|
+
* Key:: Description
|
26
|
+
* +minX+:: The minimum X-coordinate allowed to be dragged or resized to.
|
27
|
+
* Defaults to +0+.
|
28
|
+
* +minY+:: The minimum Y-coordinate allowed to be dragged or resized to.
|
29
|
+
* Defaults to +0+.
|
30
|
+
* +maxX+:: The maximum X-coordinate allowed to be dragged or resized to.
|
31
|
+
* Defaults to the browser window width.
|
32
|
+
* +maxY+:: The maximum Y-coordinate allowed to be dragged or resized to.
|
33
|
+
* Defaults to the browser window height.
|
34
|
+
* +minSize+:: An array containing exactly two values: +[ width, height ]+.
|
35
|
+
* Defines the minimum size allowed for resizing.
|
36
|
+
* Defaults to +[ 96, 54 ]+
|
37
|
+
* +maxSize+:: An array containing exactly two values: +[ width, height ]+.
|
38
|
+
* Defines the maximum size allowed for resizing.
|
39
|
+
* Defaults to the browser window size.
|
40
|
+
* +resizeW+:: The size of the west (left) resizable edge. Defaults to +6+.
|
41
|
+
* +resizeE+:: The size of the east (right) resizable edge. Defaults to +6+.
|
42
|
+
* +resizeN+:: The size of the north (top) resizable edge. Defaults to +6+.
|
43
|
+
* +resizeS+:: The size of the south (bottom) resizable edge. Default to +6+.
|
44
|
+
* +resizeNW+:: The size of the north-west (left top) resizable corner.
|
45
|
+
* Defaults to +[ 6, 6 ]+
|
46
|
+
* +resizeNE+:: The size of the north-east (right top) resizable corner.
|
47
|
+
* Defaults to +[ 6, 6 ]+
|
48
|
+
* +resizeSW+:: The size of the south-west (left bottom) resizable corner.
|
49
|
+
* Defaults to +[ 6, 6 ]+
|
50
|
+
* +resizeSE+:: The size of the south-east (right bottom) resizable corner.
|
51
|
+
* Defaults to +[ 16, 16 ]+
|
52
|
+
* +noResize+:: A flag (when true) disables all resizing and only allows
|
53
|
+
* moving.
|
54
|
+
* +fullWindowMove+:: A flag (when true) enables the full HWindow area
|
55
|
+
* responds to drag events. By default it's false,
|
56
|
+
* meaning only the title bar is draggable.
|
57
|
+
* +closeButton+:: A flag (when true) enables the close button of HWindow.
|
58
|
+
* By default, it's disabled. When enabled, extend the
|
59
|
+
* HWindow#windowClose method. By default it destructs
|
60
|
+
* the HWindow instance.
|
61
|
+
* +collapseButton+:: A flag (when true) enables the collapse (or minimize)
|
62
|
+
* button of the HWindow instance. By default it's
|
63
|
+
* disabled. When enabled, extend the
|
64
|
+
* HWindow#windowCollapse method, which by default
|
65
|
+
* zooms the window to its +minSize+.
|
66
|
+
* +zoomButton+:: A flag (when true) enables the zoom (or maximize)
|
67
|
+
* button of the HWindow instance. By default it's
|
68
|
+
* disabled. When enabled, extend the
|
69
|
+
* HWindow#windowZoom method, which by default zooms the
|
70
|
+
* contents of the HWindow to fit or the +maxSize+ depending
|
71
|
+
* on which is smaller.
|
72
|
+
*
|
73
|
+
**/
|
74
|
+
controlDefaults: (HDynControl.prototype.controlDefaults.extend({
|
75
|
+
constructor: function(_ctrl){
|
76
|
+
var _winSize = ELEM.windowSize(),
|
77
|
+
_winWidth = _winSize[0],
|
78
|
+
_winHeight = _winSize[1];
|
79
|
+
if(!this.minSize){
|
80
|
+
this.minSize = [96,54];
|
81
|
+
}
|
82
|
+
if(!this.maxSize){
|
83
|
+
this.maxSize = _winSize;
|
84
|
+
}
|
85
|
+
if(!this.maxX){
|
86
|
+
this.maxX = _winWidth-this.minSize[0];
|
87
|
+
}
|
88
|
+
if(!this.maxY){
|
89
|
+
this.maxY = _winHeight-this.minSize[1];
|
90
|
+
}
|
91
|
+
if(!this.events){
|
92
|
+
this.events = {
|
93
|
+
draggable: true
|
94
|
+
};
|
95
|
+
}
|
96
|
+
if(!this.resizeNW){
|
97
|
+
this.resizeNW = [ 6, 6 ];
|
98
|
+
}
|
99
|
+
if(!this.resizeNE){
|
100
|
+
this.resizeNE = [ 6, 6 ];
|
101
|
+
}
|
102
|
+
if(!this.resizeSW){
|
103
|
+
this.resizeSW = [ 6, 6 ];
|
104
|
+
}
|
105
|
+
if(!this.resizeSE){
|
106
|
+
this.resizeSE = [ 16, 16 ];
|
107
|
+
}
|
108
|
+
},
|
109
|
+
maxX: 'auto',
|
110
|
+
maxY: 'auto',
|
111
|
+
maxSize: 'auto',
|
112
|
+
resizeW: 4,
|
113
|
+
resizeE: 4,
|
114
|
+
resizeN: 4,
|
115
|
+
resizeS: 4,
|
116
|
+
fullWindowMove: false,
|
117
|
+
closeButton: false,
|
118
|
+
collapseButton: false,
|
119
|
+
zoomButton: false
|
120
|
+
})),
|
121
|
+
|
122
|
+
draw: function(){
|
123
|
+
var _drawn = this.drawn;
|
124
|
+
this.base();
|
125
|
+
if(!_drawn){
|
126
|
+
HSystem.windowFocus(this);
|
127
|
+
}
|
128
|
+
},
|
129
|
+
|
130
|
+
// -- overrides the drag rules to adapt to the !fullWindowMove as well
|
131
|
+
// as disabling draggability in window button areas. ++
|
132
|
+
|
133
|
+
/** = Description
|
134
|
+
* makeRectRules function
|
135
|
+
*
|
136
|
+
*
|
137
|
+
**/
|
138
|
+
makeRectRules: function(){
|
139
|
+
var _this = this,
|
140
|
+
_rectRules = _this.base(),
|
141
|
+
_rect = _this.rect,
|
142
|
+
_opts = _this.options,
|
143
|
+
_leftPx=_opts.resizeW;
|
144
|
+
if(!_opts.fullWindowMove){
|
145
|
+
if(_opts.zoomButton){
|
146
|
+
_leftPx = 61;
|
147
|
+
}
|
148
|
+
else if(_opts.collapseButton){
|
149
|
+
_leftPx = 46;
|
150
|
+
}
|
151
|
+
else if(_opts.closeButton){
|
152
|
+
_leftPx = 27;
|
153
|
+
}
|
154
|
+
_rectRules[8] = [_leftPx,_opts.resizeN,_rect.width-_opts.resizeE,25];
|
155
|
+
}
|
156
|
+
return _rectRules;
|
157
|
+
},
|
158
|
+
|
159
|
+
maxRect: function(){
|
160
|
+
var _rect = this.base();
|
161
|
+
if(_rect[2]<this.options.minSize[0]){
|
162
|
+
_rect[2] = this.options.minSize[0];
|
163
|
+
}
|
164
|
+
else if(_rect[2]>this.options.maxSize[0]){
|
165
|
+
_rect[2] = this.options.maxSize[0];
|
166
|
+
}
|
167
|
+
if(_rect[3]<this.options.minSize[1]){
|
168
|
+
_rect[3] = this.options.minSize[1];
|
169
|
+
}
|
170
|
+
else if(_rect[3]>this.options.maxSize[1]){
|
171
|
+
_rect[3] = this.options.maxSize[1];
|
172
|
+
}
|
173
|
+
return _rect;
|
174
|
+
},
|
175
|
+
|
176
|
+
/** Reports to HSystem that this window has the focus and the
|
177
|
+
* previously active window needs to blur
|
178
|
+
**/
|
179
|
+
gainedActiveStatus: function(){
|
180
|
+
HSystem.windowFocus(this);
|
181
|
+
},
|
182
|
+
|
183
|
+
/** HSystem calls this method, whenever this window is allowed to be focused
|
184
|
+
**/
|
185
|
+
windowFocus: function(){
|
186
|
+
this.toggleCSSClass(this.elemId, 'inactive', false);
|
187
|
+
},
|
188
|
+
|
189
|
+
/** HSystem calls this method, whenever this window needs to lose its
|
190
|
+
* focus (another window focused)
|
191
|
+
**/
|
192
|
+
windowBlur: function(){
|
193
|
+
this.toggleCSSClass(this.elemId, 'inactive', true);
|
194
|
+
this.setStyle('cursor','default');
|
195
|
+
},
|
196
|
+
|
197
|
+
/** This method gets called, whenever the close button has been clicked
|
198
|
+
**/
|
199
|
+
windowClose: function(){
|
200
|
+
this.die(); // extend this to this.app.die(), if your app needs to die instead of just the window
|
201
|
+
},
|
202
|
+
|
203
|
+
/** This method gets called, whenever the collapse (minimize) button has
|
204
|
+
* been clicked
|
205
|
+
**/
|
206
|
+
windowCollapse: function(){
|
207
|
+
var _minRect = HRect.nu(
|
208
|
+
this.rect.leftTop,
|
209
|
+
this.rect.leftTop.subtract(
|
210
|
+
0-this.options.minSize[0],
|
211
|
+
0-this.options.minSize[1]
|
212
|
+
)
|
213
|
+
);
|
214
|
+
_minRect.setHeight(26);
|
215
|
+
if(this.rect.equals(_minRect)){
|
216
|
+
if(this.prevRect !== undefined && !this.prevRect.equals(_minRect)){
|
217
|
+
this.animateTo( HRect.nu( this.prevRect ) );
|
218
|
+
}
|
219
|
+
else {
|
220
|
+
this.windowZoom();
|
221
|
+
}
|
222
|
+
}
|
223
|
+
else {
|
224
|
+
this.prevRect = HRect.nu(_minRect);
|
225
|
+
this.animateTo( _minRect );
|
226
|
+
}
|
227
|
+
},
|
228
|
+
|
229
|
+
/** This method gets called, whenever the zoom (maximize/restore)
|
230
|
+
* button has been clicked
|
231
|
+
**/
|
232
|
+
windowZoom: function(){
|
233
|
+
var _maxSize = this.options.maxSize === 'auto' ? this.parentSize() : this.options.maxSize,
|
234
|
+
_maxRect = HRect.nu(
|
235
|
+
this.options.minX,
|
236
|
+
this.options.minY,
|
237
|
+
_maxSize[0],
|
238
|
+
_maxSize[1]
|
239
|
+
),
|
240
|
+
_fitsRect = HRect.nu( this.rect ),
|
241
|
+
i = 0,
|
242
|
+
_views = this.views,
|
243
|
+
_view, _size, _right, _bottom;
|
244
|
+
for( ; i < _views.length; i++ ){
|
245
|
+
_view = HSystem.views[_views[i]];
|
246
|
+
_size = ELEM.getVisibleSize(_view.elemId);
|
247
|
+
_pos = ELEM.getVisiblePosition(_view.elemId);
|
248
|
+
_right = _size[0]+_pos[0];
|
249
|
+
_bottom = _size[1]+_pos[1];
|
250
|
+
if(_right > _fitsRect.width){
|
251
|
+
_fitsRect.setWidth(_right);
|
252
|
+
}
|
253
|
+
if(_bottom > _fitsRect.height){
|
254
|
+
_fitsRect.setHeight(_bottom);
|
255
|
+
}
|
256
|
+
}
|
257
|
+
if(_fitsRect.width > _maxSize[0]){
|
258
|
+
_fitsRect.setWidth( _maxSize[0] );
|
259
|
+
}
|
260
|
+
else if(_fitsRect.width < this.options.minSize[0]){
|
261
|
+
_fitsRect.setWidth( this.options.minSize[0] );
|
262
|
+
}
|
263
|
+
if(_fitsRect.height > _maxSize[1]){
|
264
|
+
_fitsRect.setHeight( _maxSize[1] );
|
265
|
+
}
|
266
|
+
else if(_fitsRect.height < this.options.minSize[1]){
|
267
|
+
_fitsRect.setHeight( this.options.minSize[1] );
|
268
|
+
}
|
269
|
+
if(this.rect.equals(_fitsRect)){
|
270
|
+
if(this.prevRect !== undefined && !this.prevRect.equals(_fitsRect)){
|
271
|
+
this.animateTo( HRect.nu(this.prevRect) );
|
272
|
+
}
|
273
|
+
else {
|
274
|
+
this.prevRect = HRect.nu( this.rect );
|
275
|
+
this.animateTo( _maxRect );
|
276
|
+
}
|
277
|
+
}
|
278
|
+
else {
|
279
|
+
this.prevRect = HRect.nu(_fitsRect);
|
280
|
+
this.animateTo( _fitsRect );
|
281
|
+
}
|
282
|
+
}
|
283
|
+
});
|
284
|
+
|