rsence-pre 2.2.2.1 → 2.3.0.0
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/VERSION +1 -1
- data/conf/default_conf.yaml +6 -1
- data/js/comm/queue/queue.js +0 -1
- data/js/comm/transporter/transporter.js +32 -16
- data/js/comm/values/values.js +45 -13
- data/js/controls/sliders/slider/slider.js +5 -6
- data/js/controls/sliders/slider/themes/default/slider.css +34 -62
- data/js/controls/sliders/slider/themes/default/slider.html +4 -4
- data/js/controls/sliders/vslider/themes/default/vslider.css +43 -10
- data/js/controls/sliders/vslider/vslider.js +3 -1
- data/js/controls/stepper/stepper.js +1 -1
- data/js/controls/stringview/stringview.js +6 -8
- data/js/controls/stringview/themes/default/stringview.html +1 -1
- data/js/controls/textcontrol/textcontrol.js +22 -16
- data/js/controls/textcontrol/themes/default/textcontrol.css +23 -22
- data/js/controls/window/window.js +1 -1
- data/js/core/class/class.js +4 -4
- data/js/core/event/event.js +3 -2
- data/js/datetime/calendar/calendar.coffee +114 -58
- data/js/datetime/calendar/themes/default/calendar.css +4 -2
- data/js/foundation/control/control.js +2 -0
- data/js/foundation/control/dyncontrol/dyncontrol.js +15 -0
- data/js/foundation/control/eventresponder/eventresponder.js +29 -20
- data/js/foundation/eventmanager/eventmanager.coffee +1090 -0
- data/js/foundation/eventmanager/eventmanager.js +116 -28
- data/js/foundation/json_renderer/json_renderer.js +4 -2
- data/js/foundation/system/system.js +3 -0
- data/js/foundation/view/view.js +6 -30
- data/js/lists/listitems/listitems.js +8 -1
- data/js/lists/radiobuttonlist/radiobuttonlist.js +9 -4
- data/js/menus/minimenu/minimenu.js +11 -5
- data/js/menus/minimenuitem/minimenuitem.js +6 -4
- data/js/tables/table/table.coffee +19 -0
- data/js/tables/table/themes/default/table.css +0 -0
- data/js/tables/table/themes/default/table.html +19 -0
- data/lib/rsence/argv/initenv_argv.rb +1 -1
- data/lib/rsence/http/broker.rb +3 -1
- data/lib/rsence/msg.rb +1 -1
- data/lib/rsence/plugins/gui_plugin.rb +2 -0
- data/lib/rsence/sessionmanager.rb +7 -7
- data/lib/rsence/sessionstorage.rb +3 -1
- data/lib/rsence/transporter.rb +56 -32
- data/lib/rsence/valuemanager.rb +3 -3
- data/plugins/client_pkg/client_pkg.rb +5 -0
- data/plugins/client_pkg/lib/client_pkg_build.rb +29 -4
- metadata +10 -7
@@ -137,20 +137,55 @@ EVENT = {
|
|
137
137
|
_this.hoverTimer = new Date().getTime();
|
138
138
|
// Time since last hover event triggered
|
139
139
|
},
|
140
|
+
|
141
|
+
|
142
|
+
// cleans up events that would be lost when browser window is blurred
|
143
|
+
_domWindowBlur: function(){
|
144
|
+
// console.log('window blurred');
|
145
|
+
var
|
146
|
+
_this = EVENT,
|
147
|
+
_status = _this.status;
|
148
|
+
// _status[_this.button1] = false;
|
149
|
+
// _status[_this.button2] = false;
|
150
|
+
// _status[_this.crsrX] = -1;
|
151
|
+
// _status[_this.crsrY] = -1;
|
152
|
+
_status[_this.keysDown] = [];
|
153
|
+
_status[_this.altKeyDown] = false;
|
154
|
+
_status[_this.ctrlKeyDown] = false;
|
155
|
+
_status[_this.shiftKeyDown] = false;
|
156
|
+
_status[_this.metaKeyDown] = false;
|
157
|
+
_status[_this.cmdKeyDown] = false;
|
158
|
+
_this.enableDroppableChecks = false;
|
159
|
+
if( HSystem.defaultInterval !== HSystem._blurredInterval ){
|
160
|
+
_this._sysDefaultInterval = HSystem.defaultInterval;
|
161
|
+
COMM.Queue.push( function(){
|
162
|
+
HSystem.defaultInterval = HSystem._blurredInterval;
|
163
|
+
} );
|
164
|
+
}
|
165
|
+
},
|
166
|
+
_domWindowFocus: function(){
|
167
|
+
var
|
168
|
+
_this = EVENT;
|
169
|
+
_this.enableDroppableChecks = _this._origDroppableChecks;
|
170
|
+
if( HSystem.defaultInterval === HSystem._blurredInterval && _this._sysDefaultInterval ){
|
171
|
+
COMM.Queue.push( function(){
|
172
|
+
HSystem.defaultInterval = _this._sysDefaultInterval;
|
173
|
+
} );
|
174
|
+
}
|
175
|
+
// console.log('window focused');
|
176
|
+
},
|
140
177
|
|
141
178
|
/** Starts event listening.
|
142
179
|
**/
|
143
180
|
start: function() {
|
144
181
|
var _globalEventTargetElement = (BROWSER_TYPE.ie && !BROWSER_TYPE.ie9)?document:window,
|
145
182
|
_this = EVENT;
|
146
|
-
// _eventMap = [
|
147
183
|
Event.observe( _globalEventTargetElement, 'mousemove', _this.mouseMove );
|
148
184
|
Event.observe( _globalEventTargetElement, 'mouseup', _this.mouseUp );
|
149
185
|
Event.observe( _globalEventTargetElement, 'mousedown', _this.mouseDown );
|
150
186
|
Event.observe( _globalEventTargetElement, 'click', _this.click );
|
151
187
|
Event.observe( _globalEventTargetElement, 'keyup', _this.keyUp );
|
152
188
|
Event.observe( _globalEventTargetElement, 'keydown', _this.keyDown );
|
153
|
-
// IE and WebKit browsers don't need keyPress for repeat
|
154
189
|
if( !BROWSER_TYPE.safari && !BROWSER_TYPE.ie){
|
155
190
|
Event.observe( _globalEventTargetElement, 'keypress', _this.keyPress );
|
156
191
|
}
|
@@ -158,16 +193,13 @@ EVENT = {
|
|
158
193
|
Event.observe( _globalEventTargetElement, 'resize', _this.resize );
|
159
194
|
Event.observe( _globalEventTargetElement, 'mousewheel', _this.mouseWheel );
|
160
195
|
Event.observe( _globalEventTargetElement, 'dblclick', _this.doubleClick );
|
161
|
-
// ],
|
162
|
-
// i = 0;
|
163
|
-
// for (; i !== _eventMap.length; i++) {
|
164
|
-
// Event.observe(_globalEventTargetElement, _eventMap[i][0], _eventMap[i][1]);
|
165
|
-
// }
|
166
196
|
if (window.addEventListener) {
|
167
197
|
window.addEventListener('DOMMouseScroll', EVENT.mouseWheel, false);
|
168
198
|
window.addEventListener('resize', EVENT.resize, false);
|
169
199
|
}
|
170
|
-
|
200
|
+
_this._origDroppableChecks = _this.enableDroppableChecks;
|
201
|
+
Event.observe( window, 'blur', _this._domWindowBlur );
|
202
|
+
Event.observe( window, 'focus', _this._domWindowFocus );
|
171
203
|
_this.listeners = [];
|
172
204
|
// keep elemId buffer of all listeners
|
173
205
|
_this.focused = [];
|
@@ -431,8 +463,9 @@ EVENT = {
|
|
431
463
|
**/
|
432
464
|
mouseMove: function(e) {
|
433
465
|
var _this = EVENT,
|
434
|
-
|
435
|
-
|
466
|
+
_scrollPos = ELEM.getScrollPosition(0),
|
467
|
+
x = Event.pointerX(e) - _scrollPos[0],
|
468
|
+
y = Event.pointerY(e) - _scrollPos[1],
|
436
469
|
_currentlyDragging = _this.flushMouseMove(x, y);
|
437
470
|
_this.status[_this.crsrX] = x;
|
438
471
|
_this.status[_this.crsrY] = y;
|
@@ -457,18 +490,37 @@ EVENT = {
|
|
457
490
|
clearTimeout(_this._lastCoordFlushTimeout);
|
458
491
|
|
459
492
|
// send drag event to all drag-interested ctrls
|
460
|
-
for (; i
|
493
|
+
for (; i < _this.dragItems.length; i++) {
|
461
494
|
_elemId = _this.dragItems[i];
|
462
495
|
_this.focusOptions[_elemId].ctrl.drag(x, y);
|
463
496
|
_this.coordCacheFlush(_elemId);
|
464
497
|
_currentlyDragging = true;
|
465
498
|
}
|
499
|
+
if(!_currentlyDragging){
|
500
|
+
if (new Date().getTime() > _this.hoverTimer + _this.hoverInterval) {
|
501
|
+
// sends mouseMove pseudo-events to ctrls interested
|
502
|
+
for (i = 0; i < _this.coordListeners.length; i++) {
|
503
|
+
_elemId = _this.coordListeners[i];
|
504
|
+
_ctrl = _this.focusOptions[_elemId].ctrl;
|
505
|
+
_ctrl.mouseMove(x, y);
|
506
|
+
}
|
507
|
+
_this.hoverTimer = new Date().getTime();
|
508
|
+
}
|
509
|
+
else {
|
510
|
+
_this._lastCoordFlushTimeout = setTimeout(
|
511
|
+
function(){
|
512
|
+
EVENT.flushMouseMove(x,y);
|
513
|
+
}, _this.hoverInterval
|
514
|
+
);
|
515
|
+
}
|
516
|
+
return false;
|
517
|
+
}
|
466
518
|
|
467
519
|
if (_this.enableDroppableChecks) {
|
468
520
|
// Check which items are under the mouse coordinates now.
|
469
521
|
if (new Date().getTime() > _this.hoverTimer + _this.hoverInterval) {
|
470
522
|
// sends mouseMove pseudo-events to ctrls interested
|
471
|
-
for (i = 0; i
|
523
|
+
for (i = 0; i < _this.coordListeners.length; i++) {
|
472
524
|
_elemId = _this.coordListeners[i];
|
473
525
|
_ctrl = _this.focusOptions[_elemId].ctrl;
|
474
526
|
_ctrl.mouseMove(x, y);
|
@@ -478,7 +530,7 @@ EVENT = {
|
|
478
530
|
}
|
479
531
|
// sends drag&drop pseudo-events
|
480
532
|
var _wasTopmostDroppable;
|
481
|
-
for (i = 0; i
|
533
|
+
for (i = 0; i < _this.dragItems.length; i++) {
|
482
534
|
// Find the current droppable while dragging.
|
483
535
|
_wasTopmostDroppable = _this.topmostDroppable;
|
484
536
|
_this.topmostDroppable = null;
|
@@ -528,7 +580,7 @@ EVENT = {
|
|
528
580
|
);
|
529
581
|
}
|
530
582
|
}
|
531
|
-
return
|
583
|
+
return true;
|
532
584
|
},
|
533
585
|
|
534
586
|
// Loops through all registered items and store indices of elements
|
@@ -546,7 +598,7 @@ EVENT = {
|
|
546
598
|
_size,
|
547
599
|
_coords,
|
548
600
|
_hovered = [];
|
549
|
-
for (; i
|
601
|
+
for (; i < _this.listeners.length; i++) {
|
550
602
|
if (!_this.listeners[i] || !_this.focusOptions[i].ctrl) {
|
551
603
|
continue;
|
552
604
|
}
|
@@ -628,7 +680,7 @@ EVENT = {
|
|
628
680
|
_this.status[_this.button2] = true;
|
629
681
|
}
|
630
682
|
|
631
|
-
for (; i
|
683
|
+
for (; i < _this.focused.length; i++) {
|
632
684
|
if (_this.focused[i] === true) {
|
633
685
|
// Set the active control to the currently focused item.
|
634
686
|
if (_this.focusOptions[i].ctrl.enabled) {
|
@@ -647,14 +699,14 @@ EVENT = {
|
|
647
699
|
_this.changeActiveControl(_newActiveControl);
|
648
700
|
}
|
649
701
|
// Call the mouseDown and startDrag events after the active control change has been handled.
|
650
|
-
for (i = 0; i
|
702
|
+
for (i = 0; i < _startDragElementIds.length; i++) {
|
651
703
|
_this.dragItems.push(_startDragElementIds[i]);
|
652
704
|
_this.focusOptions[_startDragElementIds[i]].ctrl.startDrag(x, y, _isLeftButton);
|
653
705
|
_didStartDrag = true;
|
654
706
|
}
|
655
707
|
|
656
708
|
var _stopEvent = _mouseDownElementIds.length;
|
657
|
-
for (i = 0; i
|
709
|
+
for (i = 0; i < _mouseDownElementIds.length; i++) {
|
658
710
|
if (_this.focusOptions[_mouseDownElementIds[i]].ctrl.mouseDown(x, y, _isLeftButton)) {
|
659
711
|
_stopEvent--;
|
660
712
|
}
|
@@ -720,24 +772,31 @@ EVENT = {
|
|
720
772
|
if(!_isLeftButton){
|
721
773
|
return true;
|
722
774
|
}
|
723
|
-
|
775
|
+
var _fCount = 0;
|
776
|
+
for (; i < _this.focused.length; i++) {
|
724
777
|
if (_this.focused[i] === true) {
|
778
|
+
_fCount+=1;
|
725
779
|
// Set the active control to the currently focused item.
|
780
|
+
|
726
781
|
if (_this.focusOptions[i].ctrl.enabled) {
|
727
782
|
_newActiveControl = _this.focusOptions[i].ctrl;
|
728
783
|
}
|
784
|
+
if(_this.traceFocused){
|
785
|
+
_newActiveControl.setStyle('border','2px solid #FF00FF');
|
786
|
+
}
|
729
787
|
if (_this.focusOptions[i].click === true) {
|
730
788
|
_clickElementIds.push(i);
|
731
789
|
}
|
732
790
|
}
|
733
791
|
}
|
792
|
+
console.log('focused length:',_fCount);
|
734
793
|
// Handle the active control selection.
|
735
794
|
if (_newActiveControl) {
|
736
795
|
// console.log('click new active control');
|
737
796
|
_this.changeActiveControl(_newActiveControl);
|
738
797
|
}
|
739
798
|
var _stopEvent = _clickElementIds.length;
|
740
|
-
for (i = 0; i
|
799
|
+
for (i = 0; i < _clickElementIds.length; i++) {
|
741
800
|
if (_this.focusOptions[_clickElementIds[i]].ctrl.click(x, y, _isLeftButton)) {
|
742
801
|
_stopEvent--;
|
743
802
|
}
|
@@ -775,6 +834,8 @@ EVENT = {
|
|
775
834
|
// else{
|
776
835
|
// console.log('allow losing focus: ',_prevActiveCtrl.componentName,' -> ',_ctrl.componentName);
|
777
836
|
// }
|
837
|
+
_this.blur(_prevActiveCtrl);
|
838
|
+
_this.focus(_ctrl);
|
778
839
|
_prevActiveCtrl.active = false;
|
779
840
|
if(_this.focusTrace){
|
780
841
|
_prevActiveCtrl.setStyle('border','2px solid green');
|
@@ -798,6 +859,7 @@ EVENT = {
|
|
798
859
|
_this.activeControl = null;
|
799
860
|
}
|
800
861
|
}
|
862
|
+
|
801
863
|
},
|
802
864
|
|
803
865
|
|
@@ -826,7 +888,7 @@ EVENT = {
|
|
826
888
|
i = 0;
|
827
889
|
_this._modifiers(e);
|
828
890
|
// Send endDrag for the currently dragged items even when they don't have focus, and clear the drag item array.
|
829
|
-
for (; i
|
891
|
+
for (; i < _this.dragItems.length; i++) {
|
830
892
|
_elemId = _this.dragItems[i];
|
831
893
|
_ctrl = _this.focusOptions[_elemId].ctrl;
|
832
894
|
_ctrl.endDrag(x, y, _isLeftButton);
|
@@ -887,10 +949,12 @@ EVENT = {
|
|
887
949
|
i = 0;
|
888
950
|
_this._modifiers(e);
|
889
951
|
// Check for doubleClick listeners.
|
890
|
-
for (i = 0; i
|
952
|
+
for (i = 0; i < _this.focused.length; i++) {
|
891
953
|
if (_this.focused[i] === true) {
|
892
954
|
if (_this.focusOptions[i].doubleClick === true) {
|
893
|
-
_this.focusOptions[i].ctrl.doubleClick(x, y, true)
|
955
|
+
if ( _this.focusOptions[i].ctrl.doubleClick(x, y, true) ){
|
956
|
+
Event.stop(e);
|
957
|
+
}
|
894
958
|
}
|
895
959
|
}
|
896
960
|
}
|
@@ -918,7 +982,7 @@ EVENT = {
|
|
918
982
|
if (BROWSER_TYPE.opera || BROWSER_TYPE.safari || BROWSER_TYPE.ie) {
|
919
983
|
_delta = 0 - _delta;
|
920
984
|
}
|
921
|
-
for (; i
|
985
|
+
for (; i < _this.focused.length; i++) {
|
922
986
|
if (_this.focused[i] === true) {
|
923
987
|
if (_this.focusOptions[i].mouseWheel === true) {
|
924
988
|
Event.stop(e);
|
@@ -947,7 +1011,7 @@ EVENT = {
|
|
947
1011
|
i = 0;
|
948
1012
|
_this._modifiers(e);
|
949
1013
|
// Check for contextMenu listeners.
|
950
|
-
for (i = 0; i
|
1014
|
+
for (i = 0; i < _this.focused.length; i++) {
|
951
1015
|
if (_this.focused[i] === true) {
|
952
1016
|
if (_this.focusOptions[i].contextMenu === true) {
|
953
1017
|
if( _this.focusOptions[i].ctrl.contextMenu() ){
|
@@ -988,7 +1052,7 @@ EVENT = {
|
|
988
1052
|
}
|
989
1053
|
}
|
990
1054
|
// Insert key to the realtime array, remove in keyUp
|
991
|
-
if
|
1055
|
+
if(!_this.isKeyDown(_keyCode)) {
|
992
1056
|
_this.status[_this.keysDown].push(_keyCode);
|
993
1057
|
}
|
994
1058
|
if (!_this.status[_this.cmdKeyDown] && _stopEvent){
|
@@ -1037,12 +1101,36 @@ EVENT = {
|
|
1037
1101
|
_this.status[_this.cmdKeyDown] = false;
|
1038
1102
|
}
|
1039
1103
|
// Remove the key from the realtime array, inserted in keyDown
|
1040
|
-
|
1041
|
-
|
1104
|
+
if(_this.isKeyDown(_keyCode)){
|
1105
|
+
_keyCodeIndex = _this.status[_this.keysDown].indexOf(_keyCode);
|
1042
1106
|
_this.status[_this.keysDown].splice(_keyCodeIndex, 1);
|
1043
1107
|
}
|
1044
1108
|
},
|
1045
1109
|
|
1110
|
+
isKeyDown: function(_keyCode){
|
1111
|
+
return ( this.status[this.keysDown].indexOf(_keyCode) !== -1 );
|
1112
|
+
},
|
1113
|
+
|
1114
|
+
isKeyUp: function(_keyCode){
|
1115
|
+
return !this.isKeyDown(_keyCode);
|
1116
|
+
},
|
1117
|
+
|
1118
|
+
isAltKeyDown: function(){
|
1119
|
+
return this.status[this.altKeyDown];
|
1120
|
+
},
|
1121
|
+
|
1122
|
+
isCtrlKeyDown: function(){
|
1123
|
+
return this.status[this.ctrlKeyDown];
|
1124
|
+
},
|
1125
|
+
|
1126
|
+
isShiftKeyDown: function(){
|
1127
|
+
return this.status[this.shiftKeyDown];
|
1128
|
+
},
|
1129
|
+
|
1130
|
+
isMetaKeyDown: function(){
|
1131
|
+
return this.status[this.metaKeyDown];
|
1132
|
+
},
|
1133
|
+
|
1046
1134
|
/* The keyPress itself is ignored per se and used only as a repetition event for the last keyDown. */
|
1047
1135
|
keyPress: function(e) {
|
1048
1136
|
var
|
@@ -271,7 +271,7 @@ COMM.JSONRenderer = HClass.extend({
|
|
271
271
|
}
|
272
272
|
if( !_isViewClass ){
|
273
273
|
if( _hasRect ){
|
274
|
-
console.log( "renderNode warning; Supposedly rect-incompatible class supplied: "+_className );
|
274
|
+
!this.isProduction && console.log( "renderNode warning; Supposedly rect-incompatible class supplied: "+_className );
|
275
275
|
}
|
276
276
|
}
|
277
277
|
|
@@ -444,7 +444,9 @@ COMM.JSONRenderer = HClass.extend({
|
|
444
444
|
}
|
445
445
|
}
|
446
446
|
catch (e){
|
447
|
-
|
447
|
+
var _optStr;
|
448
|
+
console.log('err:',e);
|
449
|
+
COMM.Queue.clientException(e,{name:'renderNode error',options:_options,className:_className,rect:_rect});
|
448
450
|
}
|
449
451
|
// Iterates recursively through all subviews, if specified.
|
450
452
|
if(_hasSubviews){
|
@@ -44,6 +44,9 @@ HSystem = {
|
|
44
44
|
|
45
45
|
/** The default HSystem ticker interval. Unit is milliseconds. **/
|
46
46
|
defaultInterval: 10,
|
47
|
+
|
48
|
+
// The ticker interval, when window has no focus.
|
49
|
+
_blurredInterval: 300,
|
47
50
|
|
48
51
|
/** The default HApplication priority. Unit is "On the n:th tick: poll". **/
|
49
52
|
defaultPriority: 20,
|
data/js/foundation/view/view.js
CHANGED
@@ -31,6 +31,9 @@
|
|
31
31
|
***/
|
32
32
|
var//RSence.Foundation
|
33
33
|
HView = HClass.extend({
|
34
|
+
|
35
|
+
isView: true, // attribute to check if the object is a view
|
36
|
+
isCtrl: false, // attribute to check for if the object is a control
|
34
37
|
|
35
38
|
/** Component specific theme path.
|
36
39
|
**/
|
@@ -347,9 +350,6 @@ HView = HClass.extend({
|
|
347
350
|
// Set the geometry
|
348
351
|
this.setRect(_rect);
|
349
352
|
|
350
|
-
this._cachedLeft = _rect.left;
|
351
|
-
this._cachedTop = _rect.top;
|
352
|
-
|
353
353
|
// Additional DOM element bindings are saved into this array so they can be
|
354
354
|
// deleted from the element manager when the view gets destroyed.
|
355
355
|
this._domElementBindings = [];
|
@@ -541,8 +541,8 @@ HView = HClass.extend({
|
|
541
541
|
**/
|
542
542
|
_makeElem: function(_parentElemId){
|
543
543
|
this.elemId = ELEM.make(_parentElemId,'div');
|
544
|
-
ELEM.setAttr( this.elemId, 'view_id', this.viewId );
|
545
|
-
ELEM.setAttr( this.elemId, 'elem_id', this.elemId );
|
544
|
+
ELEM.setAttr( this.elemId, 'view_id', this.viewId, true );
|
545
|
+
ELEM.setAttr( this.elemId, 'elem_id', this.elemId, true );
|
546
546
|
},
|
547
547
|
|
548
548
|
/** --
|
@@ -661,12 +661,6 @@ HView = HClass.extend({
|
|
661
661
|
_this._updateZIndex();
|
662
662
|
}
|
663
663
|
|
664
|
-
if ( _this._cachedLeft !== _rect.left || _this._cachedTop !== _rect.top) {
|
665
|
-
_this.invalidatePositionCache();
|
666
|
-
_this._cachedLeft = _rect.left;
|
667
|
-
_this._cachedTop = _rect.top;
|
668
|
-
}
|
669
|
-
|
670
664
|
_this.drawn = true;
|
671
665
|
}
|
672
666
|
return this;
|
@@ -1464,7 +1458,7 @@ HView = HClass.extend({
|
|
1464
1458
|
if(!this.views && !this.isProduction){
|
1465
1459
|
console.log('HView#die: no subviews for component name: ',this.componentName,', self:',this);
|
1466
1460
|
}
|
1467
|
-
while (this.views.length !== 0) {
|
1461
|
+
while (this.views && this.views.length !== 0) {
|
1468
1462
|
_childViewId = this.views[0];
|
1469
1463
|
this.destroyView(_childViewId);
|
1470
1464
|
}
|
@@ -1977,24 +1971,6 @@ HView = HClass.extend({
|
|
1977
1971
|
},
|
1978
1972
|
|
1979
1973
|
|
1980
|
-
/** = Description
|
1981
|
-
* Invalidates event manager's element position cache for this view and its
|
1982
|
-
* subviews. Actual functionality is implemented in HControl.
|
1983
|
-
*
|
1984
|
-
* = Returns
|
1985
|
-
* +self+
|
1986
|
-
*
|
1987
|
-
**/
|
1988
|
-
invalidatePositionCache: function() {
|
1989
|
-
for(var i=0; i<this.views.length; i++) {
|
1990
|
-
if( typeof HSystem.views[this.views[i]]['invalidatePositionCache'] === 'function' ){
|
1991
|
-
HSystem.views[this.views[i]].invalidatePositionCache();
|
1992
|
-
}
|
1993
|
-
}
|
1994
|
-
return this;
|
1995
|
-
},
|
1996
|
-
|
1997
|
-
|
1998
1974
|
/** = Description
|
1999
1975
|
* Binds a DOM element to the +ELEM+ cache. This is a wrapper for
|
2000
1976
|
* the ELEM#elem_bind that keeps track of the bound elements and
|
@@ -32,7 +32,7 @@ HListItems = HValueResponder.extend({
|
|
32
32
|
_parent = _rect;
|
33
33
|
}
|
34
34
|
else {
|
35
|
-
console.warn && console.warn( "Warning: the rect constructor argument of HListItems is deprecated." );
|
35
|
+
!this.isProduction && console.warn && console.warn( "Warning: the rect constructor argument of HListItems is deprecated." );
|
36
36
|
}
|
37
37
|
this.parent = _parent;
|
38
38
|
if ( this.parent.setListItemResponder ){
|
@@ -76,6 +76,13 @@ HListItems = HValueResponder.extend({
|
|
76
76
|
var
|
77
77
|
HListItemControl = HControl.extend({
|
78
78
|
|
79
|
+
constructor: function( _rect, _parent, _options ){
|
80
|
+
this.base( _rect, _parent, _options );
|
81
|
+
if( this.options.listItems && this.options.listItems instanceof Array ){
|
82
|
+
this.setListItems( this.options.listItems );
|
83
|
+
}
|
84
|
+
},
|
85
|
+
|
79
86
|
_cleanListItems: function(_listItemsIn){
|
80
87
|
var _listItems = [],
|
81
88
|
_row, _rowType,
|
@@ -101,7 +101,7 @@ HRadioButtonList = HListItemControl.extend({
|
|
101
101
|
this.base(_state);
|
102
102
|
if(!this['listItemViews']){ return; }
|
103
103
|
for(var i=0;i<this.listItems.length;i++){
|
104
|
-
this.listItemViews[i].setEnabled(_state)
|
104
|
+
this.listItemViews[i].setEnabled(_state);
|
105
105
|
}
|
106
106
|
},
|
107
107
|
|
@@ -122,7 +122,10 @@ HRadioButtonList = HListItemControl.extend({
|
|
122
122
|
}
|
123
123
|
if(_listItems[ this.value ] !== undefined){
|
124
124
|
_value = _listItems[ this.value ];
|
125
|
-
this.parent.
|
125
|
+
if( this.parent.value !== _value[0] ){
|
126
|
+
// console.log('radio button index responder:',_value[0],', parent value:',this.parent.value);
|
127
|
+
this.parent.setValue( _value[0] );
|
128
|
+
}
|
126
129
|
}
|
127
130
|
}
|
128
131
|
}),
|
@@ -141,8 +144,10 @@ HRadioButtonList = HListItemControl.extend({
|
|
141
144
|
}
|
142
145
|
for ( var i = 0; i < this.listItems.length; i++ ) {
|
143
146
|
if ( this.listItems[i][0] === _value ) {
|
144
|
-
this.radioButtonResponder.
|
145
|
-
|
147
|
+
// if( this.radioButtonResponder.value !== i ){
|
148
|
+
this.radioButtonResponder.setValue( -1 );
|
149
|
+
this.radioButtonResponder.setValue( i );
|
150
|
+
// }
|
146
151
|
break;
|
147
152
|
}
|
148
153
|
}
|
@@ -18,6 +18,7 @@ HMiniMenu = HRadioButtonList.extend({
|
|
18
18
|
|
19
19
|
defaultEvents: {
|
20
20
|
draggable: true,
|
21
|
+
mouseUp: true,
|
21
22
|
click: true,
|
22
23
|
resize: true
|
23
24
|
},
|
@@ -29,6 +30,7 @@ HMiniMenu = HRadioButtonList.extend({
|
|
29
30
|
},
|
30
31
|
|
31
32
|
repositionMenuItems: function(){
|
33
|
+
if(!this.listItems || (this.listItems && !this.listItems.length)){ return; }
|
32
34
|
var
|
33
35
|
x = this.pageX(),
|
34
36
|
y = this.pageY(),
|
@@ -58,6 +60,7 @@ HMiniMenu = HRadioButtonList.extend({
|
|
58
60
|
},
|
59
61
|
|
60
62
|
click: function(){
|
63
|
+
if(!this.active){return false;}
|
61
64
|
this.menuShow();
|
62
65
|
return false;
|
63
66
|
},
|
@@ -90,23 +93,26 @@ HMiniMenu = HRadioButtonList.extend({
|
|
90
93
|
|
91
94
|
startDrag: function(x,y){
|
92
95
|
this.dragStart = [x,y];
|
96
|
+
if(!this.active){return false;}
|
93
97
|
this.menuShow();
|
94
98
|
return false;
|
95
99
|
},
|
96
100
|
|
97
101
|
lostActiveStatus: function(_newActive){
|
98
|
-
|
99
|
-
if( !_newActive.isChildOf( this.menuItemView ) ){
|
102
|
+
if( _newActive && !_newActive.isChildOf( this.menuItemView ) ){
|
100
103
|
this.menuHide();
|
101
104
|
}
|
102
105
|
this.base(_newActive);
|
103
106
|
},
|
104
107
|
|
105
108
|
gainedActiveStatus: function(_prevActive){
|
106
|
-
|
109
|
+
if( _prevActive && _prevActive.isChildOf( this.menuItemView ) ){
|
110
|
+
this.menuHide();
|
111
|
+
// EVENT.changeActiveControl(null);
|
112
|
+
}
|
107
113
|
this.base(_prevActive);
|
108
114
|
},
|
109
|
-
|
115
|
+
|
110
116
|
endDrag: function(x,y){
|
111
117
|
if( (Math.round(this.dragStart[0]*0.2)===Math.round(x*0.2)) &&
|
112
118
|
(Math.round(this.dragStart[1]*0.2)===Math.round(y*0.2))
|
@@ -154,7 +160,7 @@ HMiniMenu = HRadioButtonList.extend({
|
|
154
160
|
this.valueMatrix = this.menuItemView.valueMatrix;
|
155
161
|
this.refreshValue();
|
156
162
|
if( this.options.initialVisibility ){
|
157
|
-
EVENT.changeActiveControl(
|
163
|
+
EVENT.changeActiveControl(null);
|
158
164
|
this.menuShow();
|
159
165
|
}
|
160
166
|
},
|
@@ -24,12 +24,14 @@ HMiniMenuItem = HRadioButton.extend({
|
|
24
24
|
_activateParentParent: function(){
|
25
25
|
var _parentParent = this.parent.options.logicParent;
|
26
26
|
EVENT.changeActiveControl(_parentParent);
|
27
|
+
// EVENT.changeActiveControl(null);
|
28
|
+
// EVENT.blur( _this );
|
27
29
|
},
|
28
30
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
31
|
+
gainedActiveStatus: function( _prevActive ){
|
32
|
+
// console.log('menuitem gained active status',_prevActive === this.parent.options.logicParent);
|
33
|
+
this.base( _prevActive );
|
34
|
+
},
|
33
35
|
|
34
36
|
lostActiveStatus: function( _newActive ){
|
35
37
|
this.parent.options.logicParent.menuHide();
|
@@ -0,0 +1,19 @@
|
|
1
|
+
HTable = HControl.extend({
|
2
|
+
componentName: 'table'
|
3
|
+
markupElemNames: ['bg','header','content','header-columns']
|
4
|
+
_resetElements: ->
|
5
|
+
if @_tableElements
|
6
|
+
ELEM.del( _id ) for _id in @_tableElements
|
7
|
+
@_tableElements = []
|
8
|
+
@_rowElements = []
|
9
|
+
@_colElements = []
|
10
|
+
_createTableRow: ( _row, i )->
|
11
|
+
console.log( 'row:', _row, ', i:',i )
|
12
|
+
|
13
|
+
_refreshTableContents: ->
|
14
|
+
_value = @value
|
15
|
+
@_createTableRow( _row, i ) for _row, i in _value
|
16
|
+
refreshValue: ->
|
17
|
+
@_refreshTableContents() if @drawn and ( @value.constructor == Array )
|
18
|
+
})
|
19
|
+
|
File without changes
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<div id="bg#{_ID}" class="table_bg">
|
2
|
+
<div class="table_nw"></div>
|
3
|
+
<div class="table_n"></div>
|
4
|
+
<div class="table_ne"></div>
|
5
|
+
<div class="table_w"></div>
|
6
|
+
<div class="table_c"></div>
|
7
|
+
<div class="table_e"></div>
|
8
|
+
<div class="table_sw"></div>
|
9
|
+
<div class="table_s"></div>
|
10
|
+
<div class="table_se"></div>
|
11
|
+
</div>
|
12
|
+
<div id="header#{_ID}" class="table_header">
|
13
|
+
<div class="table_header_left"></div>
|
14
|
+
<div class="table_header_middle"></div>
|
15
|
+
<div class="table_header_right"></div>
|
16
|
+
<div id="header_columns#{_ID}" class="table_columns"></div>
|
17
|
+
</div>
|
18
|
+
<div id="content#{_ID}" class="table_content"></div>
|
19
|
+
</div>
|
@@ -157,7 +157,7 @@ module ArgvUtil
|
|
157
157
|
say @strs[:initenv][:enter_http_port]
|
158
158
|
str_http_port = @strs[:initenv][:http_port]
|
159
159
|
config[:http_server][:port] = ask(str_http_port) do |q|
|
160
|
-
q.default = config[:http_server][:port]
|
160
|
+
q.default = config[:http_server][:port].to_s
|
161
161
|
end
|
162
162
|
|
163
163
|
say @strs[:initenv][:enter_tcp_ip]
|
data/lib/rsence/http/broker.rb
CHANGED
@@ -124,7 +124,9 @@ class Broker
|
|
124
124
|
'mongrel' => lambda { Rack::Handler::Mongrel },
|
125
125
|
'puma' => lambda { Rack::Handler::Puma }
|
126
126
|
}[rack_require].call
|
127
|
-
handler.run(
|
127
|
+
handler.run( self.new, {
|
128
|
+
:Host => host, :Port => port
|
129
|
+
}.merge( conf[:handler_options] ) )
|
128
130
|
end
|
129
131
|
|
130
132
|
# Generic 404 error handler. Just sets up response status, headers, body as a small "Page Not Found" html page
|
data/lib/rsence/msg.rb
CHANGED
@@ -135,7 +135,7 @@ module RSence
|
|
135
135
|
if options[:servlet]
|
136
136
|
@do_gzip = false
|
137
137
|
else
|
138
|
-
@response['Content-Type'] = '
|
138
|
+
@response['Content-Type'] = 'application/json; charset=utf-8'
|
139
139
|
@response['Cache-Control'] = 'no-cache'
|
140
140
|
|
141
141
|
# gnu-zipped responses:
|
@@ -95,6 +95,7 @@ module RSence
|
|
95
95
|
end
|
96
96
|
sleep 0.1 until client_pkg.ready?
|
97
97
|
client_pkg.add_packages( @client_pkgs[:packages ] ) if @client_pkgs.has_key?(:packages )
|
98
|
+
client_pkg.add_compounds( @client_pkgs[:compound_packages] ) if @client_pkgs.has_key?(:compound_packages)
|
98
99
|
client_pkg.add_themes( @client_pkgs[:theme_names ] ) if @client_pkgs.has_key?(:theme_names )
|
99
100
|
client_pkg.add_gfx_formats( @client_pkgs[:gfx_formats ] ) if @client_pkgs.has_key?(:gfx_formats )
|
100
101
|
client_pkg.add_reserved_names( @client_pkgs[:reserved_names] ) if @client_pkgs.has_key?(:reserved_names)
|
@@ -117,6 +118,7 @@ module RSence
|
|
117
118
|
client_pkg.del_reserved_names( @client_pkgs[:reserved_names] ) if @client_pkgs.has_key?(:reserved_names)
|
118
119
|
client_pkg.del_gfx_formats( @client_pkgs[:gfx_formats ] ) if @client_pkgs.has_key?(:gfx_formats )
|
119
120
|
client_pkg.del_themes( @client_pkgs[:theme_names ] ) if @client_pkgs.has_key?(:theme_names )
|
121
|
+
client_pkg.del_compounds( @client_pkgs[:compound_packages] ) if @client_pkgs.has_key?(:compound_packages)
|
120
122
|
client_pkg.del_packages( @client_pkgs[:packages].keys ) if @client_pkgs.has_key?(:packages )
|
121
123
|
client_pkg.rebuild_client
|
122
124
|
end
|