rsence-pre 2.2.2.1 → 2.3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.3.0.0.pre
|
data/conf/default_conf.yaml
CHANGED
@@ -78,13 +78,18 @@
|
|
78
78
|
:latency: 0
|
79
79
|
#
|
80
80
|
# HTTP Port number to listen to.
|
81
|
-
:port: 8001
|
81
|
+
:port: '8001'
|
82
82
|
#
|
83
83
|
# Bind this ip address ('0.0.0.0' means all)
|
84
84
|
:bind_address: '127.0.0.1'
|
85
85
|
#
|
86
86
|
# Rack handler to use, defaults to puma
|
87
87
|
:rack_require: puma
|
88
|
+
#
|
89
|
+
# These are default options. Ymmv, but these work fine for puma
|
90
|
+
:handler_options:
|
91
|
+
:Verbose: false
|
92
|
+
:Threads: '4:64' # puma default is '0:16'
|
88
93
|
#
|
89
94
|
# When enabled, sets http cache headers
|
90
95
|
# to cache content as long as possible.
|
data/js/comm/queue/queue.js
CHANGED
@@ -70,20 +70,18 @@ COMM.Transporter = HApplication.extend({
|
|
70
70
|
* to report js errors to the server.
|
71
71
|
* If no error, returns an empty string.
|
72
72
|
**/
|
73
|
-
getClientEvalError: function(){
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
},
|
73
|
+
// getClientEvalError: function(){
|
74
|
+
// var _this = COMM.Transporter;
|
75
|
+
// return _this._clientEvalError?'&err_msg=' +
|
76
|
+
// COMM.Values._encodeString(_this._clientEvalError):'';
|
77
|
+
// },
|
78
78
|
|
79
79
|
parseResponseArray: function( _responseText ){
|
80
|
-
|
81
|
-
return _arr;
|
80
|
+
return HVM.decode( _responseText );
|
82
81
|
},
|
83
82
|
|
84
83
|
_nativeParseResponseArray: function( _responseText ){
|
85
|
-
|
86
|
-
return _arr;
|
84
|
+
return JSON.parse( _responseText );
|
87
85
|
},
|
88
86
|
|
89
87
|
setValues: function( _values ){
|
@@ -176,7 +174,9 @@ COMM.Transporter = HApplication.extend({
|
|
176
174
|
flushBusy: function(){
|
177
175
|
var _this = COMM.Transporter;
|
178
176
|
_this.busy = false;
|
179
|
-
COMM.Values.tosync.length !== 0
|
177
|
+
if( COMM.Values.tosync.length !== 0 ){
|
178
|
+
_this.sync();
|
179
|
+
}
|
180
180
|
},
|
181
181
|
failMessage: function(_title,_message){
|
182
182
|
var _this = COMM.Transporter,
|
@@ -320,18 +320,34 @@ COMM.Transporter = HApplication.extend({
|
|
320
320
|
}
|
321
321
|
// console.log('sync.');
|
322
322
|
this.busy = true;
|
323
|
+
var _now = new Date().getTime();
|
323
324
|
if(window['sesWatcher'] && window.sesWatcher['sesTimeoutValue']){
|
324
325
|
// Sets the value of the session watcher to the current time. It could cause an unnecessary re-sync poll immediately after this sync otherwise.
|
325
|
-
sesWatcher.sesTimeoutValue.set(
|
326
|
+
sesWatcher.sesTimeoutValue.set( _now );
|
326
327
|
}
|
327
|
-
var
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
328
|
+
var
|
329
|
+
_this = this,
|
330
|
+
// _values = HVM.sync(),
|
331
|
+
// _boundary = _now.toString(36)+(Math.random()*10000).toString(36)+(Math.random()*10000).toString(36),
|
332
|
+
// _separator = '--'+_boundary,
|
333
|
+
// _errorMessage = _this.getClientEvalError(),
|
334
|
+
_body = HVM.sync();
|
335
|
+
// _body = _separator+
|
336
|
+
// '\r\nContent-Disposition: form-data; name="ses_key"\r\nContent-Type: text/plain\r\n'+
|
337
|
+
// '\r\n'+COMM.Session.ses_key+'\r\n'+_separator;
|
338
|
+
// if( _values ){
|
339
|
+
// _body += '\r\nContent-Disposition: form-data; name="values"\r\nContent-Type: application/json; charset=UTF-8\r\n'+
|
340
|
+
// '\r\n'+_values+'\r\n'+_separator+'--\r\n';
|
341
|
+
// }
|
342
|
+
// else {
|
343
|
+
// _body += '--\r\n';
|
344
|
+
// }
|
345
|
+
// _body = [_sesKey,_errorMessage,_values?'&values='+_values:''].join('');
|
332
346
|
COMM.request(
|
333
347
|
_this.url, {
|
334
348
|
_this: _this,
|
349
|
+
// contentType: 'multipart/form-data; boundary='+_boundary,
|
350
|
+
contentType: 'application/json',
|
335
351
|
onSuccess: COMM.Transporter.success,
|
336
352
|
onFailure: COMM.Transporter.failure,
|
337
353
|
method: 'POST',
|
data/js/comm/values/values.js
CHANGED
@@ -468,22 +468,54 @@ COMM.Values = HClass.extend({
|
|
468
468
|
* An encoded string representation of values to synchronize.
|
469
469
|
**/
|
470
470
|
sync: function(){
|
471
|
-
|
472
|
-
|
471
|
+
var
|
472
|
+
_this = this,
|
473
|
+
_response = [ COMM.Session.ses_key,{},[] ],
|
474
|
+
_error = COMM.Transporter._clientEvalError;
|
475
|
+
|
476
|
+
if( _error ){
|
477
|
+
_response[2].push({'err_msg':_error});
|
473
478
|
}
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
479
|
+
|
480
|
+
// new implementation, symmetric with the server response format
|
481
|
+
if( this.tosync.length > 0 ){
|
482
|
+
_response[1].set=[];
|
483
|
+
var
|
484
|
+
_syncValues = _response[1].set,
|
485
|
+
_values = _this.values,
|
486
|
+
_tosync = _this.tosync,
|
487
|
+
i = _tosync.length,
|
488
|
+
_id, _value;
|
489
|
+
while(i--){
|
490
|
+
_id = _tosync.shift();
|
491
|
+
_value = _values[_id].value;
|
492
|
+
_syncValues.push( [ _id, _value ] );
|
493
|
+
}
|
484
494
|
}
|
485
|
-
|
495
|
+
// console.log('response:',_response);
|
496
|
+
// console.log('encoded:',_this.encode(_response));
|
497
|
+
return _this.encode(_response);
|
486
498
|
},
|
499
|
+
|
500
|
+
// Old sync implementation:
|
501
|
+
// sync: function(){
|
502
|
+
// if(this.tosync.length===0){
|
503
|
+
// return false;
|
504
|
+
// }
|
505
|
+
// var
|
506
|
+
// _syncValues = {},
|
507
|
+
// _this = this,
|
508
|
+
// _values = _this.values,
|
509
|
+
// _tosync = _this.tosync,
|
510
|
+
// _len = _tosync.length,
|
511
|
+
// i = 0, _id, _value;
|
512
|
+
// for(;i<_len;i++){
|
513
|
+
// _id = _tosync.shift();
|
514
|
+
// _value = _values[_id].value;
|
515
|
+
// _syncValues[_id] = _value;
|
516
|
+
// }
|
517
|
+
// return encodeURIComponent(_this.encode(_syncValues));
|
518
|
+
// },
|
487
519
|
|
488
520
|
_detectNativeJSONSupport: function(){
|
489
521
|
if(window['JSON']){
|
@@ -289,7 +289,7 @@ HSlider = HControl.extend({
|
|
289
289
|
|
290
290
|
prevOrientation: 'c',
|
291
291
|
|
292
|
-
|
292
|
+
orientations: ['n','s','c'],
|
293
293
|
|
294
294
|
/** = Description
|
295
295
|
* Changes the thumb graphic. Possible orientations by default are
|
@@ -316,17 +316,16 @@ HSlider = HControl.extend({
|
|
316
316
|
}
|
317
317
|
var _toggleCSS = this.toggleCSSClass,
|
318
318
|
_ctrlId = this.markupElemIds.control,
|
319
|
-
_orientations =
|
319
|
+
_orientations = this.orientations,
|
320
320
|
_iOrientation = '',
|
321
321
|
_cssClassName = '',
|
322
|
-
|
323
|
-
_cssClassVert = this._isVertical?'v':'',
|
322
|
+
_componentName = this.componentName,
|
324
323
|
_activeOrientation = false,
|
325
324
|
i = 0;
|
326
|
-
for(;i<
|
325
|
+
for(;i<3;i++){
|
327
326
|
_iOrientation = _orientations[i];
|
328
327
|
_activeOrientation = (_orientation===_iOrientation);
|
329
|
-
_cssClassName = (_orientation==='c')?
|
328
|
+
_cssClassName = (_orientation==='c')?_componentName+'_'+'thumb':_componentName+'_'+'thumb'+'_'+_iOrientation;
|
330
329
|
_toggleCSS( _ctrlId, _cssClassName, _activeOrientation );
|
331
330
|
}
|
332
331
|
|
@@ -1,108 +1,80 @@
|
|
1
|
-
.
|
2
|
-
.
|
3
|
-
.
|
1
|
+
.slider_track_left,
|
2
|
+
.slider_track_right,
|
3
|
+
.slider_track {
|
4
4
|
position: absolute;
|
5
5
|
height: 7px; top: 7px;
|
6
|
-
font-size:
|
6
|
+
font-size: 0;
|
7
7
|
background-image: #{this.getCssFilePath('hslider_tracks.png')};
|
8
8
|
}
|
9
9
|
|
10
|
-
.
|
10
|
+
.slider_track_left {
|
11
11
|
left: 10px; width: 4px;
|
12
|
-
background-position:
|
12
|
+
background-position: 0 0;
|
13
13
|
}
|
14
14
|
|
15
|
-
.
|
15
|
+
.slider_track_right {
|
16
16
|
right: 10px; width: 4px;
|
17
|
-
background-position: -4px
|
17
|
+
background-position: -4px 0;
|
18
18
|
}
|
19
19
|
|
20
|
-
.
|
20
|
+
.slider_track {
|
21
21
|
left: 14px; right: 14px;
|
22
|
-
background-position:
|
22
|
+
background-position: 0 -14px;
|
23
23
|
}
|
24
24
|
|
25
|
-
.disabled .
|
26
|
-
background-position:
|
25
|
+
.disabled .slider_track_left {
|
26
|
+
background-position: 0 -7px;
|
27
27
|
}
|
28
28
|
|
29
|
-
.disabled .
|
29
|
+
.disabled .slider_track_right {
|
30
30
|
background-position: -4px -7px;
|
31
31
|
}
|
32
32
|
|
33
|
-
.disabled .
|
34
|
-
background-position:
|
33
|
+
.disabled .slider_track {
|
34
|
+
background-position: 0 -21px;
|
35
35
|
}
|
36
36
|
|
37
|
-
.
|
37
|
+
.slider_thumb {
|
38
38
|
position: absolute;
|
39
|
-
top:
|
40
|
-
font-size:
|
41
|
-
background-position:
|
39
|
+
top: 0; height: 21px; width: 21px;
|
40
|
+
font-size: 0;
|
41
|
+
background-position: 0 0;
|
42
42
|
background-image: #{this.getCssFilePath('slider_thumbs.png')};
|
43
43
|
}
|
44
44
|
|
45
|
-
.
|
46
|
-
background-position:
|
45
|
+
.slider_thumb:active {
|
46
|
+
background-position: 0 -22px;
|
47
47
|
}
|
48
48
|
|
49
|
-
.disabled .
|
50
|
-
background-position:
|
49
|
+
.disabled .slider_thumb {
|
50
|
+
background-position: 0 -44px;
|
51
51
|
}
|
52
52
|
|
53
|
-
.
|
54
|
-
.
|
55
|
-
.hslider_thumb_e,
|
56
|
-
.hslider_thumb_w {
|
53
|
+
.slider_thumb_n,
|
54
|
+
.slider_thumb_s {
|
57
55
|
position: absolute;
|
58
|
-
top:
|
56
|
+
top: 0; height: 21px; width: 21px;
|
59
57
|
background-image: #{this.getCssFilePath('slider_thumbs.png')};
|
60
58
|
}
|
61
59
|
|
62
|
-
.
|
63
|
-
|
64
|
-
left: 0px;
|
60
|
+
.slider_thumb_n {
|
61
|
+
background-position: -22px 0;
|
65
62
|
}
|
66
|
-
|
67
|
-
.hslider_thumb_n {
|
68
|
-
background-position: -22px 0px;
|
69
|
-
}
|
70
|
-
.hslider_thumb_n:active {
|
63
|
+
.slider_thumb_n:active {
|
71
64
|
background-position: -22px -22px;
|
72
65
|
}
|
73
|
-
.disabled .
|
66
|
+
.disabled .slider_thumb_n {
|
74
67
|
background-position: -22px -44px;
|
75
68
|
}
|
76
69
|
|
77
|
-
.
|
78
|
-
background-position: -44px
|
70
|
+
.slider_thumb_s {
|
71
|
+
background-position: -44px 0;
|
79
72
|
}
|
80
|
-
.
|
73
|
+
.slider_thumb_s:active {
|
81
74
|
background-position: -44px -22px;
|
82
75
|
}
|
83
|
-
.disabled .
|
76
|
+
.disabled .slider_thumb_s {
|
84
77
|
background-position: -44px -44px;
|
85
78
|
}
|
86
79
|
|
87
|
-
.hslider_thumb_w {
|
88
|
-
background-position: -66px 0px;
|
89
|
-
}
|
90
|
-
.hslider_thumb_w:active {
|
91
|
-
background-position: -66px -22px;
|
92
|
-
}
|
93
|
-
.disabled .hslider_thumb_w {
|
94
|
-
background-position: -66px -44px;
|
95
|
-
}
|
96
|
-
|
97
|
-
.hslider_thumb_e {
|
98
|
-
background-position: -88px 0px;
|
99
|
-
}
|
100
|
-
.hslider_thumb_e:active {
|
101
|
-
background-position: -88px -22px;
|
102
|
-
}
|
103
|
-
.disabled .hslider_thumb_e {
|
104
|
-
background-position: -88px -44px;
|
105
|
-
}
|
106
|
-
|
107
|
-
|
108
80
|
|
@@ -1,5 +1,5 @@
|
|
1
|
-
<div class="
|
2
|
-
<div class="
|
3
|
-
<div class="
|
4
|
-
<div class="
|
1
|
+
<div class="slider_track_left"></div>
|
2
|
+
<div class="slider_track_right"></div>
|
3
|
+
<div class="slider_track"></div>
|
4
|
+
<div class="slider_thumb" id="control#{_ID}"></div>
|
5
5
|
${this.thumbSize=21;}
|
@@ -3,27 +3,27 @@
|
|
3
3
|
.vslider_track {
|
4
4
|
position: absolute;
|
5
5
|
width: 7px; left: 7px;
|
6
|
-
font-size:
|
6
|
+
font-size: 0;
|
7
7
|
background-image: #{this.getCssFilePath('vslider_tracks.png')};
|
8
8
|
}
|
9
9
|
|
10
10
|
.vslider_track_top {
|
11
11
|
top: 10px; height: 4px;
|
12
|
-
background-position:
|
12
|
+
background-position: 0 0;
|
13
13
|
}
|
14
14
|
|
15
15
|
.vslider_track_bottom {
|
16
16
|
bottom: 10px; height: 4px;
|
17
|
-
background-position:
|
17
|
+
background-position: 0 -4px;
|
18
18
|
}
|
19
19
|
|
20
20
|
.vslider_track {
|
21
21
|
top: 14px; bottom: 14px;
|
22
|
-
background-position: -14px
|
22
|
+
background-position: -14px 0;
|
23
23
|
}
|
24
24
|
|
25
25
|
.disabled .vslider_track_top {
|
26
|
-
background-position: -7px
|
26
|
+
background-position: -7px 0;
|
27
27
|
}
|
28
28
|
|
29
29
|
.disabled .vslider_track_bottom {
|
@@ -31,22 +31,55 @@
|
|
31
31
|
}
|
32
32
|
|
33
33
|
.disabled .vslider_track {
|
34
|
-
background-position: -21px
|
34
|
+
background-position: -21px 0;
|
35
35
|
}
|
36
36
|
|
37
37
|
.vslider_thumb {
|
38
38
|
position: absolute;
|
39
39
|
font-size: 0px;
|
40
|
-
left:
|
41
|
-
background-position:
|
40
|
+
left: 0; width: 21px; height: 21px;
|
41
|
+
background-position: 0 0;
|
42
42
|
background-image: #{this.getCssFilePath('slider_thumbs.png')};
|
43
43
|
}
|
44
44
|
|
45
45
|
.vslider_thumb:active {
|
46
|
-
background-position:
|
46
|
+
background-position: 0 -22px;
|
47
47
|
}
|
48
48
|
|
49
49
|
.disabled .vslider_thumb {
|
50
|
-
background-position:
|
50
|
+
background-position: 0 -44px;
|
51
|
+
}
|
52
|
+
|
53
|
+
.vslider_thumb_e,
|
54
|
+
.vslider_thumb_w {
|
55
|
+
position: absolute;
|
56
|
+
top: 0; height: 21px; width: 21px;
|
57
|
+
background-image: #{this.getCssFilePath('slider_thumbs.png')};
|
58
|
+
}
|
59
|
+
|
60
|
+
.vslider_thumb_e,
|
61
|
+
.vslider_thumb_w {
|
62
|
+
left: 0;
|
63
|
+
}
|
64
|
+
|
65
|
+
.vslider_thumb_w {
|
66
|
+
background-position: -66px 0;
|
67
|
+
}
|
68
|
+
.vslider_thumb_w:active {
|
69
|
+
background-position: -66px -22px;
|
70
|
+
}
|
71
|
+
.disabled .vslider_thumb_w {
|
72
|
+
background-position: -66px -44px;
|
73
|
+
}
|
74
|
+
|
75
|
+
.vslider_thumb_e {
|
76
|
+
background-position: -88px 0;
|
77
|
+
}
|
78
|
+
.vslider_thumb_e:active {
|
79
|
+
background-position: -88px -22px;
|
51
80
|
}
|
81
|
+
.disabled .vslider_thumb_e {
|
82
|
+
background-position: -88px -44px;
|
83
|
+
}
|
84
|
+
|
52
85
|
|
@@ -140,7 +140,7 @@ HStepper = HControl.extend({
|
|
140
140
|
**/
|
141
141
|
mouseDown: function( x, y ){
|
142
142
|
this.setMouseUp(true);
|
143
|
-
this._setRepeatInterval( ( y -
|
143
|
+
this._setRepeatInterval( ( y - this.pageY() ) <= 11 );
|
144
144
|
return true;
|
145
145
|
},
|
146
146
|
|
@@ -43,14 +43,12 @@ var HStringView, HLabel;
|
|
43
43
|
*
|
44
44
|
**/
|
45
45
|
refreshLabel: function() {
|
46
|
-
if(this.markupElemIds) {
|
47
|
-
if(this.
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
this.setMarkupOfPart( 'value', this.label );
|
53
|
-
}
|
46
|
+
if(this.markupElemIds && this.markupElemIds.value) {
|
47
|
+
if( this.value !== undefined ){
|
48
|
+
this.setAttrOfPart( 'value', 'title', this.label );
|
49
|
+
}
|
50
|
+
else {
|
51
|
+
this.setMarkupOfPart( 'value', this.label );
|
54
52
|
}
|
55
53
|
}
|
56
54
|
}
|
@@ -1 +1 @@
|
|
1
|
-
<div class="stringview" id="value#{_ID}"
|
1
|
+
<div class="stringview" id="value#{_ID}"></div>
|
@@ -152,23 +152,16 @@ HTextControl = HControl.extend({
|
|
152
152
|
textBlur: function(){
|
153
153
|
this.hasTextFocus = false;
|
154
154
|
this._clearChangeEventFn();
|
155
|
-
this._updateValueFromField();
|
156
155
|
if(this.options.refreshOnBlur){
|
156
|
+
this._updateValueFromField();
|
157
157
|
this.refreshValue();
|
158
158
|
}
|
159
159
|
return true;
|
160
160
|
},
|
161
161
|
|
162
162
|
idle: function(){
|
163
|
-
if(
|
164
|
-
|
165
|
-
try{
|
166
|
-
this.base();
|
167
|
-
}
|
168
|
-
catch(e){
|
169
|
-
console.error('HTextControl::onIdle error -> ',e);
|
170
|
-
debugger;
|
171
|
-
this.base();
|
163
|
+
if( this.hasTextFocus && this.options.refreshOnIdle && this.options.refreshOnInput ){
|
164
|
+
this._updateValueFromField();
|
172
165
|
}
|
173
166
|
},
|
174
167
|
|
@@ -354,12 +347,12 @@ HTextControl = HControl.extend({
|
|
354
347
|
*
|
355
348
|
**/
|
356
349
|
textEnter: function(){
|
357
|
-
this.setValue(
|
358
|
-
this.validateText(
|
359
|
-
this.getTextFieldValue()
|
360
|
-
)
|
361
|
-
);
|
362
350
|
if(this.options.refreshOnInput){
|
351
|
+
this.setValue(
|
352
|
+
this.validateText(
|
353
|
+
this.getTextFieldValue()
|
354
|
+
)
|
355
|
+
);
|
363
356
|
this.refreshValue();
|
364
357
|
}
|
365
358
|
return false;
|
@@ -380,7 +373,8 @@ HNumericTextControl = HTextControl.extend({
|
|
380
373
|
defaultEvents: {
|
381
374
|
mouseWheel: true,
|
382
375
|
textEnter: true,
|
383
|
-
contextMenu: true
|
376
|
+
contextMenu: true,
|
377
|
+
keyDown: true
|
384
378
|
},
|
385
379
|
|
386
380
|
/** Uses the mouseWheel event to step up/down the value.
|
@@ -391,6 +385,18 @@ HNumericTextControl = HTextControl.extend({
|
|
391
385
|
this.setValue(Math.round(this.validateText(_value)));
|
392
386
|
},
|
393
387
|
|
388
|
+
keyDown: function(_key){
|
389
|
+
if(_key===Event.KEY_UP){
|
390
|
+
this.mouseWheel(1);
|
391
|
+
return true;
|
392
|
+
}
|
393
|
+
else if(_key===Event.KEY_DOWN){
|
394
|
+
this.mouseWheel(-1);
|
395
|
+
return true;
|
396
|
+
}
|
397
|
+
return false;
|
398
|
+
},
|
399
|
+
|
394
400
|
/** = Description
|
395
401
|
* Extends the validateText method to ensure the
|
396
402
|
* input is a number.
|
@@ -7,8 +7,8 @@
|
|
7
7
|
color: #000;
|
8
8
|
background-color: transparent;
|
9
9
|
vertical-align: middle;
|
10
|
-
border:
|
11
|
-
left:
|
10
|
+
border: 0;
|
11
|
+
left: 0; top: 0;
|
12
12
|
#{(BROWSER_TYPE.firefox||BROWSER_TYPE.ie7||BROWSER_TYPE.ie8||BROWSER_TYPE.ie9||BROWSER_TYPE.opera)?'padding-left:2px;width:100% !important;height:90% !important;':BROWSER_TYPE.ie6?'right:4px;bottom:2px;':'padding:2px;right:0px;bottom:0px;width:auto;height:auto;'}
|
13
13
|
}
|
14
14
|
|
@@ -23,7 +23,8 @@
|
|
23
23
|
|
24
24
|
.default .textcontrol_input_parent {
|
25
25
|
position: absolute;
|
26
|
-
#{(BROWSER_TYPE.firefox||BROWSER_TYPE.ie7||BROWSER_TYPE.ie8||BROWSER_TYPE.ie9||BROWSER_TYPE.opera)?'left:0;padding-left:1px;top:0;right:4px;bottom:0;':BROWSER_TYPE.ie6?'left:2px;top:1px;right:1px;bottom:1px;':'left:-2px;top:-2px;right:-2px;bottom:-2px;'}
|
26
|
+
#{(BROWSER_TYPE.chrome||BROWSER_TYPE.firefox||BROWSER_TYPE.ie7||BROWSER_TYPE.ie8||BROWSER_TYPE.ie9||BROWSER_TYPE.opera)?'left:0;padding-left:1px;top:0;right:4px;bottom:0;':BROWSER_TYPE.ie6?'left:2px;top:1px;right:1px;bottom:1px;':'left:-2px;top:-2px;right:-2px;bottom:-2px;'}
|
27
|
+
#{(BROWSER_TYPE.chrome)?'top:1px;':''}
|
27
28
|
}
|
28
29
|
|
29
30
|
.default .textcontrol_bg {
|
@@ -34,10 +35,10 @@
|
|
34
35
|
}
|
35
36
|
|
36
37
|
.default .active>.textcontrol_bg {
|
37
|
-
left:
|
38
|
-
-moz-box-shadow:
|
39
|
-
-webkit-box-shadow:
|
40
|
-
box-shadow:
|
38
|
+
left: 0; top: 0; right: 0; bottom: 0;
|
39
|
+
-moz-box-shadow: 0 0 3px #333;
|
40
|
+
-webkit-box-shadow: 0 0 3px #333;
|
41
|
+
box-shadow: 0 0 3px #333;
|
41
42
|
}
|
42
43
|
|
43
44
|
.default .disabled .textcontrol_bg {
|
@@ -57,22 +58,22 @@
|
|
57
58
|
}
|
58
59
|
|
59
60
|
.default .textcontrol_nw {
|
60
|
-
left:
|
61
|
-
background-position:
|
61
|
+
left: 0; top: 0;
|
62
|
+
background-position: 0 0;
|
62
63
|
}
|
63
64
|
|
64
65
|
.default .textcontrol_ne {
|
65
|
-
right:
|
66
|
-
background-position: -7px
|
66
|
+
right: 0; top: 0;
|
67
|
+
background-position: -7px 0;
|
67
68
|
}
|
68
69
|
|
69
70
|
.default .textcontrol_sw {
|
70
|
-
left:
|
71
|
-
background-position:
|
71
|
+
left: 0; bottom: 0;
|
72
|
+
background-position: 0 -7px;
|
72
73
|
}
|
73
74
|
|
74
75
|
.default .textcontrol_se {
|
75
|
-
right:
|
76
|
+
right: 0; bottom: 0;
|
76
77
|
background-position: -7px -7px;
|
77
78
|
}
|
78
79
|
|
@@ -88,13 +89,13 @@
|
|
88
89
|
}
|
89
90
|
|
90
91
|
.default .textcontrol_w {
|
91
|
-
left:
|
92
|
-
background-position:
|
92
|
+
left: 0;
|
93
|
+
background-position: 0 0;
|
93
94
|
}
|
94
95
|
|
95
96
|
.default .textcontrol_e {
|
96
|
-
right:
|
97
|
-
background-position: -7px
|
97
|
+
right: 0;
|
98
|
+
background-position: -7px 0;
|
98
99
|
}
|
99
100
|
|
100
101
|
|
@@ -109,13 +110,13 @@
|
|
109
110
|
}
|
110
111
|
|
111
112
|
.default .textcontrol_n {
|
112
|
-
top:
|
113
|
-
background-position:
|
113
|
+
top: 0;
|
114
|
+
background-position: 0 0;
|
114
115
|
}
|
115
116
|
|
116
117
|
.default .textcontrol_s {
|
117
|
-
bottom:
|
118
|
-
background-position:
|
118
|
+
bottom: 0;
|
119
|
+
background-position: 0 -7px;
|
119
120
|
}
|
120
121
|
|
121
122
|
|