rsence 2.0.9.23 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/INSTALL.rdoc +61 -49
- data/README.rdoc +20 -4
- data/VERSION +1 -1
- data/conf/default_conf.yaml +8 -0
- data/conf/rsence_command_strings.yaml +31 -20
- data/docs/ExampleGuiPlugin.rdoc +2 -2
- data/js/comm/comm.js +27 -5
- data/js/comm/transporter/transporter.js +1 -1
- data/js/comm/values/values.js +12 -5
- data/js/controls/button/button.js +12 -2
- data/js/controls/dialogs/alert_sheet/alert_sheet.js +13 -1
- data/js/controls/dialogs/confirm_sheet/confirm_sheet.js +13 -2
- data/js/controls/dialogs/sheet/sheet.js +35 -28
- data/js/controls/imageview/imageview.js +13 -13
- data/js/controls/progress/progressindicator/progressindicator.js +5 -5
- data/js/controls/sliders/slider/slider.js +4 -31
- data/js/controls/stepper/stepper.js +12 -19
- data/js/controls/textcontrol/textcontrol.js +0 -50
- data/js/controls/textcontrol/themes/default/textcontrol.html +1 -1
- data/js/controls/window/window.js +1 -1
- data/js/core/elem/elem.js +146 -160
- data/js/core/rsence_ns/rsence_ns.js +7 -0
- data/js/foundation/control/eventresponder/eventresponder.js +8 -7
- data/js/foundation/eventmanager/eventmanager.js +81 -48
- data/js/foundation/geom/rect/rect.js +1 -1
- data/js/foundation/json_renderer/json_renderer.js +4 -1
- data/js/foundation/system/system.js +37 -34
- data/js/foundation/view/morphanimation/morphanimation.js +53 -43
- data/js/foundation/view/view.js +119 -118
- data/js/lists/listitems/listitems.js +10 -10
- data/js/lists/propertylist/js.inc +0 -0
- data/js/lists/propertylist/propertylist.js +574 -0
- data/js/lists/propertylist/propertylisteditor/js.inc +0 -0
- data/js/lists/propertylist/propertylisteditor/propertylisteditor.js +233 -0
- data/js/lists/radiobuttonlist/radiobuttonlist.js +15 -8
- data/js/menus/minimenu/js.inc +0 -0
- data/js/menus/minimenu/minimenu.js +139 -0
- data/js/menus/minimenu/minimenuitem/js.inc +0 -0
- data/js/menus/minimenu/minimenuitem/minimenuitem.js +33 -0
- data/js/menus/minimenu/minimenuitem/themes/default/minimenuitem.css +45 -0
- data/js/menus/minimenu/minimenuitem/themes/default/minimenuitem.html +4 -0
- data/js/menus/minimenu/minimenuitem/themes/default/minimenuitem_checkmark.png +0 -0
- data/js/menus/minimenu/themes/default/minimenu.css +63 -0
- data/js/menus/minimenu/themes/default/minimenu.html +7 -0
- data/js/menus/minimenu/themes/default/minimenu.png +0 -0
- data/js/util/reloadapp/reloadapp.js +1 -1
- data/lib/conf/argv.rb +40 -11
- data/lib/daemon/daemon.rb +63 -22
- data/lib/plugins/gui_plugin.rb +28 -31
- data/lib/plugins/guiparser.rb +37 -7
- data/lib/plugins/plugin.rb +260 -28
- data/lib/plugins/plugin_base.rb +14 -0
- data/lib/plugins/plugin_plugins.rb +11 -1
- data/lib/plugins/pluginmanager.rb +127 -44
- data/lib/plugins/plugins.rb +10 -1
- data/lib/session/msg.rb +25 -1
- data/lib/session/sessionmanager.rb +11 -2
- data/lib/session/sessionstorage.rb +14 -14
- data/lib/transporter/transporter.rb +29 -13
- data/lib/values/hvalue.rb +30 -0
- data/plugins/client_pkg/info.yaml +2 -2
- data/plugins/{index_html → main}/img/loading.gif +0 -0
- data/plugins/{index_html → main}/img/riassence.gif +0 -0
- data/plugins/main/info.yaml +5 -4
- data/plugins/main/main.rb +180 -24
- data/plugins/{index_html → main}/tmpl/index.html +4 -2
- data/plugins/ticket/info.yaml +2 -2
- data/plugins/ticket/lib/upload.rb +57 -5
- data/plugins/ticket/ticket.rb +10 -4
- data/setup/welcome/info.yaml +2 -2
- data/setup/welcome/text/welcome.html +1 -1
- metadata +22 -11
- data/plugins/index_html/index_html.rb +0 -120
- data/plugins/index_html/info.yaml +0 -18
@@ -26,6 +26,7 @@ HStepper = HControl.extend({
|
|
26
26
|
|
27
27
|
defaultEvents: {
|
28
28
|
mouseDown: true,
|
29
|
+
click: true,
|
29
30
|
keyDown: true,
|
30
31
|
mouseWheel: true
|
31
32
|
},
|
@@ -101,17 +102,6 @@ HStepper = HControl.extend({
|
|
101
102
|
);
|
102
103
|
},
|
103
104
|
|
104
|
-
// -- Returns an action string for the setInterval in _setRepeatInterval ++
|
105
|
-
_repeatIntervalStr: function( _up ){
|
106
|
-
return [
|
107
|
-
'HSystem.views[',
|
108
|
-
this.viewId,
|
109
|
-
'].step',
|
110
|
-
(_up?'Up':'Down'),
|
111
|
-
'();'
|
112
|
-
].join('');
|
113
|
-
},
|
114
|
-
|
115
105
|
// -- Background-offset of the state images up/down,
|
116
106
|
// overrideable in the html template ++
|
117
107
|
bgStateUp: '0px -23px',
|
@@ -131,15 +121,13 @@ HStepper = HControl.extend({
|
|
131
121
|
_setRepeatInterval: function( _up ){
|
132
122
|
var _this = this,
|
133
123
|
_options = _this.options;
|
124
|
+
_this._repeatInterval && clearInterval( _this._repeatInterval );
|
134
125
|
_this._bgStateOn( _up );
|
135
|
-
|
136
|
-
|
137
|
-
_this.
|
138
|
-
|
139
|
-
|
140
|
-
_this.stepDown();
|
141
|
-
_this._repeatInterval = setInterval( _this._repeatIntervalStr(0), _options.repeatInterval );
|
142
|
-
}
|
126
|
+
_up?_this.stepUp():_this.stepDown();
|
127
|
+
_this._repeatInterval = setInterval(
|
128
|
+
_up?function(){_this.stepUp();}:function(){_this.stepDown();},
|
129
|
+
_options.repeatInterval
|
130
|
+
);
|
143
131
|
},
|
144
132
|
|
145
133
|
// Stops the repeating stepping up or down enabled in _setRepeatInterval
|
@@ -153,6 +141,7 @@ HStepper = HControl.extend({
|
|
153
141
|
mouseDown: function( x, y ){
|
154
142
|
this.setMouseUp(true);
|
155
143
|
this._setRepeatInterval( ( y - ELEM.getVisiblePosition( this.elemId )[1] ) <= 11 );
|
144
|
+
|
156
145
|
},
|
157
146
|
|
158
147
|
/** Stops the repeating stepping, when the mouse button goes up
|
@@ -161,6 +150,10 @@ HStepper = HControl.extend({
|
|
161
150
|
this._clearRepeatInterval();
|
162
151
|
},
|
163
152
|
|
153
|
+
click: function(){
|
154
|
+
this.mouseUp();
|
155
|
+
},
|
156
|
+
|
164
157
|
/** Stops the repeating stepping, when the control becomes inactive
|
165
158
|
**/
|
166
159
|
blur: function(){
|
@@ -42,56 +42,6 @@ HTextControl = HControl.extend({
|
|
42
42
|
}
|
43
43
|
}
|
44
44
|
},
|
45
|
-
|
46
|
-
// drawSubviews: function(){
|
47
|
-
// if(this['markupElemIds']!==undefined && this.markupElemIds['value']!==undefined) {
|
48
|
-
// // this.adjustInputStyle();
|
49
|
-
// }
|
50
|
-
// this.setEnabled(this.enabled);
|
51
|
-
// },
|
52
|
-
//
|
53
|
-
// /** = Description
|
54
|
-
// * Tweaks the input element to fit the match the size properly
|
55
|
-
// * in different browsers. Can't be done reliably by using just
|
56
|
-
// * the theme css, because some browsers are broken
|
57
|
-
// * regarding styling of input elements.
|
58
|
-
// *
|
59
|
-
// **/
|
60
|
-
// adjustInputStyle: function(){
|
61
|
-
// var _input = this.markupElemIds.value,
|
62
|
-
// _label = this.markupElemIds.label;
|
63
|
-
// if(BROWSER_TYPE.firefox){
|
64
|
-
// if(this.componentName === 'textarea'){
|
65
|
-
// ELEM.setStyle(_input,'padding-top','0px');
|
66
|
-
// }
|
67
|
-
// else {
|
68
|
-
// ELEM.setStyle(_input,'margin-top','1px');
|
69
|
-
// }
|
70
|
-
// ELEM.setStyle(_input,'padding-left','0px');
|
71
|
-
// ELEM.setStyle(_label,'left','2px');
|
72
|
-
// ELEM.setStyle(_label,'top','0px');
|
73
|
-
// ELEM.setStyle(_label,'right','2px');
|
74
|
-
// ELEM.setStyle(_label,'bottom','2px');
|
75
|
-
// }
|
76
|
-
// else if(BROWSER_TYPE.ie){
|
77
|
-
// ELEM.flushLoop();
|
78
|
-
// var _size = ELEM.getVisibleSize( this.elemId ),
|
79
|
-
// _width = _size[0],
|
80
|
-
// _height = _size[1];
|
81
|
-
// ELEM.setStyle(_input,'left','2px');
|
82
|
-
// ELEM.setStyle(_input,'top','1px');
|
83
|
-
// ELEM.setStyle(_input,'padding-top','0px');
|
84
|
-
// ELEM.setStyle(_input,'padding-left','0px');
|
85
|
-
// ELEM.setStyle(_input,'padding-right','8px');
|
86
|
-
// ELEM.setStyle(_input,'padding-bottom','0px');
|
87
|
-
// ELEM.setStyle(_input,'width',(_width-10)+'px');
|
88
|
-
// ELEM.setStyle(_input,'height',(_height-2)+'px');
|
89
|
-
// ELEM.setStyle(_label,'left','0px');
|
90
|
-
// ELEM.setStyle(_label,'top','0px');
|
91
|
-
// ELEM.setStyle(_label,'right','0px');
|
92
|
-
// ELEM.setStyle(_label,'bottom','0px');
|
93
|
-
// }
|
94
|
-
// },
|
95
45
|
|
96
46
|
setStyle: function(_name, _value, _cacheOverride) {
|
97
47
|
if (!this['markupElemIds']||!this.markupElemIds['value']) {
|
@@ -240,7 +240,7 @@ HWindow = HDynControl.extend({
|
|
240
240
|
_view, _size, _right, _bottom;
|
241
241
|
for( ; i < _views.length; i++ ){
|
242
242
|
_view = HSystem.views[_views[i]];
|
243
|
-
_size = ELEM.
|
243
|
+
_size = ELEM.getSize(_view.elemId);
|
244
244
|
_pos = ELEM.getVisiblePosition(_view.elemId);
|
245
245
|
_right = _size[0]+_pos[0]-this.pageX();
|
246
246
|
_bottom = _size[1]+_pos[1]-this.pageY();
|
data/js/core/elem/elem.js
CHANGED
@@ -24,6 +24,9 @@ BROWSER_TYPE = {
|
|
24
24
|
/* Microsoft Internet Explorer version 8 */
|
25
25
|
ie8: false,
|
26
26
|
|
27
|
+
/* Microsoft Internet Explorer version 9 */
|
28
|
+
ie9: false,
|
29
|
+
|
27
30
|
/* Any version of Opera */
|
28
31
|
opera: false,
|
29
32
|
|
@@ -57,7 +60,8 @@ ELEM = {
|
|
57
60
|
* The interval to flush the buffer specified in milliseconds.
|
58
61
|
* Defaults to 60fps which is the most common refresh rate of displays.
|
59
62
|
**/
|
60
|
-
ELEMTickerInterval: 16.667,
|
63
|
+
// ELEMTickerInterval: 16.667,
|
64
|
+
ELEMTickerInterval: 33,
|
61
65
|
|
62
66
|
// stuff moved inside this function, because (surprise, surprise!) ie6 had some issues with it.
|
63
67
|
_constructor: function() {
|
@@ -225,14 +229,16 @@ ELEM = {
|
|
225
229
|
**/
|
226
230
|
setHTML: function(_id, _html) {
|
227
231
|
try {
|
228
|
-
var _this = ELEM;
|
229
|
-
if (!
|
232
|
+
var _this = ELEM, _elem = _this._elements[_id];
|
233
|
+
if (!_elem) {
|
230
234
|
return;
|
231
235
|
}
|
232
236
|
if (! ((typeof _html === 'string') || (typeof _html === 'number'))) {
|
233
237
|
return;
|
234
238
|
}
|
235
|
-
|
239
|
+
if (_elem.innerHTML !== _html ){
|
240
|
+
_elem.innerHTML = _html;
|
241
|
+
}
|
236
242
|
} catch(e) {}
|
237
243
|
//_this._initCache(_id);
|
238
244
|
},
|
@@ -376,14 +382,7 @@ ELEM = {
|
|
376
382
|
h = _elem.offsetHeight,
|
377
383
|
_parent = _elem.parentNode;
|
378
384
|
while (_parent && _parent.nodeName.toLowerCase() !== 'body') {
|
379
|
-
|
380
|
-
_parentOverflow = document.defaultView.getComputedStyle(
|
381
|
-
_parent, null
|
382
|
-
).getPropertyValue('overflow');
|
383
|
-
}
|
384
|
-
else {
|
385
|
-
_parentOverflow = _parent.currentStyle.getAttribute('overflow');
|
386
|
-
}
|
385
|
+
_this._getComputedStyle( _parent, 'overflow' );
|
387
386
|
_parentOverflow = _parentOverflow !== 'visible';
|
388
387
|
if (w > _parent.clientWidth && _parentOverflow) {
|
389
388
|
w = _parent.clientWidth - _elem.offsetLeft;
|
@@ -433,6 +432,38 @@ ELEM = {
|
|
433
432
|
return [w, h];
|
434
433
|
},
|
435
434
|
|
435
|
+
_getVisibleLeftPosition: function(_id){
|
436
|
+
var
|
437
|
+
_this = ELEM,
|
438
|
+
x = 0,
|
439
|
+
_elem = _this._elements[_id];
|
440
|
+
while (_elem !== document) {
|
441
|
+
x += _elem.offsetLeft;
|
442
|
+
x -= _elem.scrollLeft;
|
443
|
+
_elem = _elem.parentNode;
|
444
|
+
if (!_elem) {
|
445
|
+
break;
|
446
|
+
}
|
447
|
+
}
|
448
|
+
return x;
|
449
|
+
},
|
450
|
+
|
451
|
+
_getVisibleTopPosition: function(_id){
|
452
|
+
var
|
453
|
+
_this = ELEM,
|
454
|
+
y = 0,
|
455
|
+
_elem = _this._elements[_id];
|
456
|
+
while (_elem !== document) {
|
457
|
+
y += _elem.offsetTop;
|
458
|
+
y -= _elem.scrollTop;
|
459
|
+
_elem = _elem.parentNode;
|
460
|
+
if (!_elem) {
|
461
|
+
break;
|
462
|
+
}
|
463
|
+
}
|
464
|
+
return y;
|
465
|
+
},
|
466
|
+
|
436
467
|
/** = Description
|
437
468
|
* Returns the real position of the element, subtracting whatever
|
438
469
|
* scroll bars do to the position..
|
@@ -445,21 +476,11 @@ ELEM = {
|
|
445
476
|
*
|
446
477
|
**/
|
447
478
|
getVisiblePosition: function(_id) {
|
448
|
-
var _this = ELEM
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
x += _elem.offsetLeft;
|
454
|
-
y += _elem.offsetTop;
|
455
|
-
x -= _elem.scrollLeft;
|
456
|
-
y -= _elem.scrollTop;
|
457
|
-
_elem = _elem.parentNode;
|
458
|
-
if (!_elem) {
|
459
|
-
break;
|
460
|
-
}
|
461
|
-
}
|
462
|
-
return [x, y];
|
479
|
+
var _this = ELEM;
|
480
|
+
return [
|
481
|
+
_this._getVisibleLeftPosition(_id),
|
482
|
+
_this._getVisibleTopPosition(_id)
|
483
|
+
];
|
463
484
|
},
|
464
485
|
|
465
486
|
/** = Description
|
@@ -473,28 +494,20 @@ ELEM = {
|
|
473
494
|
*
|
474
495
|
**/
|
475
496
|
getOpacity: function(_id) {
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
//
|
481
|
-
if (
|
482
|
-
|
483
|
-
|
484
|
-
//
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
return parseFloat(_opacity);
|
491
|
-
}
|
492
|
-
if (_opacity === (_this._elements[_id].currentStyle['filter'] || '').match(/alpha(opacity=(.*))/)) {
|
493
|
-
if (_opacity[1]) {
|
494
|
-
return parseFloat(_opacity[1]) / 100;
|
495
|
-
}
|
496
|
-
}
|
497
|
-
return 1.0;
|
497
|
+
throw "ELEM.getOpacity: known error.";
|
498
|
+
// var
|
499
|
+
// _this = ELEM,
|
500
|
+
// _elem = _this.get(_id),
|
501
|
+
// _opacity = _this._getComputedStyle( _elem, 'opacity' );
|
502
|
+
// if (ELEM.ie && (_elem.currentStyle['filter'] || '').match(/alpha(opacity=(.*))/)) {
|
503
|
+
// if (_opacity[1]) {
|
504
|
+
// return parseFloat(_opacity[1]) / 100;
|
505
|
+
// }
|
506
|
+
// }
|
507
|
+
// else ( === 0)) {
|
508
|
+
// return parseFloat(_opacity);
|
509
|
+
// }
|
510
|
+
// return 1.0;
|
498
511
|
},
|
499
512
|
|
500
513
|
/** = Description
|
@@ -518,9 +531,6 @@ ELEM = {
|
|
518
531
|
var _prevAlpha = _this.getStyle(_id, 'filter', true);
|
519
532
|
_this._elements[_id].style.setAttribute('filter', _prevAlpha.replace(/alpha([^)]*)/gi, '') + 'alpha(opacity=' + _opacity * 100 + ')');
|
520
533
|
}
|
521
|
-
else if (BROWSER_TYPE.ie) {
|
522
|
-
_this._elements[_id].style.setAttribute('opacity', _opacity);
|
523
|
-
}
|
524
534
|
else {
|
525
535
|
_this._elements[_id].style.setProperty('opacity', _opacity, '');
|
526
536
|
}
|
@@ -539,8 +549,7 @@ ELEM = {
|
|
539
549
|
*
|
540
550
|
**/
|
541
551
|
getIntStyle: function(_id, _key) {
|
542
|
-
|
543
|
-
return parseInt(_value, 10);
|
552
|
+
return parseInt(ELEM.getStyle(_id, _key), 10);
|
544
553
|
},
|
545
554
|
|
546
555
|
/** = Description
|
@@ -559,6 +568,16 @@ ELEM = {
|
|
559
568
|
ELEM.setStyle(_id, 'height', _coords[3] + 'px');
|
560
569
|
},
|
561
570
|
|
571
|
+
_getExtraLeftWidth: function(_id){
|
572
|
+
var _int = ELEM.getIntStyle;
|
573
|
+
return _int(_id, 'padding-left') + _int(_id, 'border-left-width');
|
574
|
+
},
|
575
|
+
|
576
|
+
_getExtraRightWidth: function(_id){
|
577
|
+
var _int = ELEM.getIntStyle;
|
578
|
+
return _int(_id, 'padding-right') + _int(_id, 'border-right-width');
|
579
|
+
},
|
580
|
+
|
562
581
|
/** = Description
|
563
582
|
* Returns the amount of width of the element taken by 'extra' space: border
|
564
583
|
* and padding size.
|
@@ -571,8 +590,18 @@ ELEM = {
|
|
571
590
|
*
|
572
591
|
**/
|
573
592
|
getExtraWidth: function(_id) {
|
593
|
+
var _this = ELEM;
|
594
|
+
return _this._getExtraLeftWidth(_id) + _this._getExtraRightWidth(_id);
|
595
|
+
},
|
596
|
+
|
597
|
+
_getExtraTopWidth: function(_id){
|
598
|
+
var _int = ELEM.getIntStyle;
|
599
|
+
return _int(_id, 'padding-top') + _int(_id, 'border-top-width');
|
600
|
+
},
|
601
|
+
|
602
|
+
_getExtraBottomWidth: function(_id){
|
574
603
|
var _int = ELEM.getIntStyle;
|
575
|
-
return _int(_id, 'padding-
|
604
|
+
return _int(_id, 'padding-bottom') + _int(_id, 'border-bottom-width');
|
576
605
|
},
|
577
606
|
|
578
607
|
/** = Description
|
@@ -587,8 +616,8 @@ ELEM = {
|
|
587
616
|
*
|
588
617
|
**/
|
589
618
|
getExtraHeight: function(_id) {
|
590
|
-
var
|
591
|
-
return
|
619
|
+
var _this = ELEM;
|
620
|
+
return _this._getExtraTopWidth(_id) + _this._getExtraBottomWidth(_id);
|
592
621
|
},
|
593
622
|
|
594
623
|
/** = Description
|
@@ -930,6 +959,26 @@ ELEM = {
|
|
930
959
|
}
|
931
960
|
},
|
932
961
|
|
962
|
+
_setElementStyle: function(_elem,_key,_value){
|
963
|
+
_elem.style.setProperty(_key, _value, '');
|
964
|
+
},
|
965
|
+
_setElementStyleIE: function(_elem,_key,_value){
|
966
|
+
var
|
967
|
+
_this = ELEM,
|
968
|
+
_camelKey = _key.replace(
|
969
|
+
/((-)([a-z])(\w))/g,
|
970
|
+
function($0, $1, $2, $3, $4) {
|
971
|
+
return $3.toUpperCase() + $4;
|
972
|
+
}
|
973
|
+
);
|
974
|
+
_elem.style[_camelKey] = _value;
|
975
|
+
if (BROWSER_TYPE.ie6) {
|
976
|
+
if (iefix._traverseStyleProperties.indexOf(_key) !== -1) {
|
977
|
+
_this._ieFixesNeeded = true;
|
978
|
+
}
|
979
|
+
}
|
980
|
+
},
|
981
|
+
|
933
982
|
/** = Description
|
934
983
|
* Sets the named element style attribute value.
|
935
984
|
*
|
@@ -948,8 +997,7 @@ ELEM = {
|
|
948
997
|
var _this = ELEM,
|
949
998
|
_cached = _this._styleCache[_id],
|
950
999
|
_elems = _this._elements,
|
951
|
-
_differs
|
952
|
-
_styleTodo;
|
1000
|
+
_differs;
|
953
1001
|
_this._setStyleCount++;
|
954
1002
|
if (_cached === undefined) {
|
955
1003
|
_this._initCache(_id);
|
@@ -964,27 +1012,12 @@ ELEM = {
|
|
964
1012
|
_this.setOpacity(_id, _value);
|
965
1013
|
}
|
966
1014
|
else {
|
967
|
-
|
968
|
-
var _camelKey = _key.replace(
|
969
|
-
/((-)([a-z])(\w))/g,
|
970
|
-
function($0, $1, $2, $3, $4) {
|
971
|
-
return $3.toUpperCase() + $4;
|
972
|
-
}
|
973
|
-
);
|
974
|
-
_elems[_id].style[_camelKey] = _cached[_key];
|
975
|
-
}
|
976
|
-
else {
|
977
|
-
_elems[_id].style.setProperty(_key, _cached[_key], '');
|
978
|
-
}
|
979
|
-
}
|
980
|
-
if (BROWSER_TYPE.ie6) {
|
981
|
-
if (iefix._traverseStyleProperties.indexOf(_key) !== -1) {
|
982
|
-
_this._ieFixesNeeded = true;
|
983
|
-
}
|
1015
|
+
_this._setElementStyle( _elems[_id], _key, _cached[_key] );
|
984
1016
|
}
|
985
1017
|
}
|
986
1018
|
else {
|
987
|
-
|
1019
|
+
var
|
1020
|
+
_elemTodoH = _this._elemTodoH,
|
988
1021
|
_styleTodo = _this._styleTodo[_id];
|
989
1022
|
if (_styleTodo.indexOf(_key) === -1) {
|
990
1023
|
_styleTodo.push(_key);
|
@@ -1071,6 +1104,25 @@ ELEM = {
|
|
1071
1104
|
];
|
1072
1105
|
},
|
1073
1106
|
|
1107
|
+
_getComputedStyle: function(_elem,_key){
|
1108
|
+
return document.defaultView.getComputedStyle(_elem,null).getPropertyValue(_key);
|
1109
|
+
},
|
1110
|
+
_getComputedStyleIE: function(_elem,_key){
|
1111
|
+
if(_key === 'width'){
|
1112
|
+
return _elem.clientWidth+'px';
|
1113
|
+
}
|
1114
|
+
if(_key === 'height'){
|
1115
|
+
return _elem.clientHeight+'px';
|
1116
|
+
}
|
1117
|
+
var _camelName = _key.replace(
|
1118
|
+
/((-)([a-z])(\w))/g,
|
1119
|
+
function($0, $1, $2, $3, $4) {
|
1120
|
+
return $3.toUpperCase() + $4;
|
1121
|
+
}
|
1122
|
+
);
|
1123
|
+
return _elem.currentStyle[_camelName];
|
1124
|
+
},
|
1125
|
+
|
1074
1126
|
/** = Description
|
1075
1127
|
* Gets the named element style attribute value.
|
1076
1128
|
*
|
@@ -1087,30 +1139,6 @@ ELEM = {
|
|
1087
1139
|
*
|
1088
1140
|
**/
|
1089
1141
|
getStyle: function(_id, _key, _bypass){
|
1090
|
-
var _this=ELEM,
|
1091
|
-
_cached=_this._styleCache[_id],
|
1092
|
-
_retval;
|
1093
|
-
_this._getStyleCount++;
|
1094
|
-
if ((_cached[_key] === undefined) || _bypass) {
|
1095
|
-
if (!_bypass) {
|
1096
|
-
_this._getStyleMissCount++;
|
1097
|
-
}
|
1098
|
-
if ((_key === 'opacity') && _bypass) {
|
1099
|
-
_retval = _this.getOpacity(_id);
|
1100
|
-
}
|
1101
|
-
else if (BROWSER_TYPE.ie7 || BROWSER_TYPE.ie8){
|
1102
|
-
_retval = _this._elements[_id].style[_key];
|
1103
|
-
}
|
1104
|
-
else {
|
1105
|
-
_retval = document.defaultView.getComputedStyle(_this._elements[_id], null).getPropertyValue(_key);
|
1106
|
-
}
|
1107
|
-
_cached[_key] = _retval;
|
1108
|
-
}
|
1109
|
-
return _cached[_key];
|
1110
|
-
},
|
1111
|
-
|
1112
|
-
/* The Internet Explorer version of getStyle */
|
1113
|
-
_getStyleIE: function( _id, _key, _bypass){
|
1114
1142
|
var _this=ELEM,
|
1115
1143
|
_cached=_this._styleCache[_id],
|
1116
1144
|
_retval;
|
@@ -1123,13 +1151,7 @@ ELEM = {
|
|
1123
1151
|
_retval = _this.getOpacity(_id);
|
1124
1152
|
}
|
1125
1153
|
else {
|
1126
|
-
|
1127
|
-
/((-)([a-z])(\w))/g,
|
1128
|
-
function($0, $1, $2, $3, $4) {
|
1129
|
-
return $3.toUpperCase() + $4;
|
1130
|
-
}
|
1131
|
-
);
|
1132
|
-
_retval = _this._elements[_id].currentStyle[_camelName];
|
1154
|
+
_retval = _this._getComputedStyle(_this._elements[_id],_key);
|
1133
1155
|
}
|
1134
1156
|
_cached[_key] = _retval;
|
1135
1157
|
}
|
@@ -1151,63 +1173,16 @@ ELEM = {
|
|
1151
1173
|
if (!_elem) {
|
1152
1174
|
return;
|
1153
1175
|
}
|
1154
|
-
_elemS = _elem.style;
|
1155
1176
|
_loopMaxP = _styleTodo.length;
|
1156
1177
|
_currTodo = _styleTodo.splice(0, _loopMaxP);
|
1157
1178
|
for (_cid = 0; _cid !== _loopMaxP; _cid++) {
|
1158
|
-
_key = _currTodo.pop();
|
1159
|
-
_this._flushStylCount++;
|
1160
|
-
if (_key === 'opacity') {
|
1161
|
-
_retval = _this.setOpacity(_id, _cached[_key]);
|
1162
|
-
}
|
1163
|
-
else {
|
1164
|
-
_elemS.setProperty(_key, _cached[_key], '');
|
1165
|
-
}
|
1166
|
-
}
|
1167
|
-
},
|
1168
|
-
|
1169
|
-
/* Internet Explorer version of _flushStyleCache */
|
1170
|
-
_flushStyleCacheIE: function(_id) {
|
1171
|
-
var _this = ELEM,
|
1172
|
-
_styleTodo = _this._styleTodo[_id],
|
1173
|
-
_cached = _this._styleCache[_id],
|
1174
|
-
_elem = _this._elements[_id];
|
1175
|
-
if (!_elem) {
|
1176
|
-
return;
|
1177
|
-
}
|
1178
|
-
var _elemS = _elem.style,
|
1179
|
-
_loopMaxP = _styleTodo.length,
|
1180
|
-
i = 0,
|
1181
|
-
_key,
|
1182
|
-
_currTodo = _styleTodo.splice(0, _loopMaxP);
|
1183
|
-
for (; i !== _loopMaxP; i++) {
|
1184
1179
|
_key = _currTodo.pop();
|
1185
1180
|
_this._flushStylCount++;
|
1186
1181
|
if (_key === 'opacity') {
|
1187
1182
|
_this.setOpacity(_id, _cached[_key]);
|
1188
1183
|
}
|
1189
1184
|
else {
|
1190
|
-
|
1191
|
-
if (iefix._traverseStyleProperties.indexOf(_key) !== -1) {
|
1192
|
-
_this._ieFixesNeeded = true;
|
1193
|
-
}
|
1194
|
-
}
|
1195
|
-
try {
|
1196
|
-
var _camelKey = _key.replace(
|
1197
|
-
/((-)([a-z])(\w))/g,
|
1198
|
-
function($0, $1, $2, $3, $4) {
|
1199
|
-
return $3.toUpperCase() + $4;
|
1200
|
-
}
|
1201
|
-
);
|
1202
|
-
// _elemS[_camelKey] = _cached[_key];
|
1203
|
-
_elemS.setAttribute(
|
1204
|
-
_camelKey,
|
1205
|
-
_cached[_key]
|
1206
|
-
);
|
1207
|
-
}
|
1208
|
-
catch(e) {
|
1209
|
-
console.log(e);
|
1210
|
-
}
|
1185
|
+
_this._setElementStyle( _elem, _key, _cached[_key] );
|
1211
1186
|
}
|
1212
1187
|
}
|
1213
1188
|
},
|
@@ -1215,13 +1190,15 @@ ELEM = {
|
|
1215
1190
|
/* The ELEM "post-constructor" */
|
1216
1191
|
_init: function() {
|
1217
1192
|
|
1193
|
+
if(RSenceInit !== undefined){
|
1194
|
+
RSenceInit();
|
1195
|
+
}
|
1196
|
+
|
1218
1197
|
var _this = ELEM;
|
1219
1198
|
|
1220
1199
|
if (BROWSER_TYPE.ie) {
|
1221
|
-
_this.
|
1222
|
-
|
1223
|
-
// if (BROWSER_TYPE.ie) {
|
1224
|
-
_this._flushStyleCache = _this._flushStyleCacheIE;
|
1200
|
+
_this._getComputedStyle = _this._getComputedStyleIE;
|
1201
|
+
_this._setElementStyle = _this._setElementStyleIE;
|
1225
1202
|
}
|
1226
1203
|
|
1227
1204
|
if(!_this['_timer']){
|
@@ -1293,6 +1270,15 @@ ELEM = {
|
|
1293
1270
|
_browserType.ie6 = _isIE && (_ua.indexOf("MSIE 6") !== -1);
|
1294
1271
|
_browserType.ie7 = _isIE && (_ua.indexOf("MSIE 7") !== -1);
|
1295
1272
|
_browserType.ie8 = _isIE && (_ua.indexOf("MSIE 8") !== -1);
|
1273
|
+
_browserType.ie9 = _isIE && (_ua.indexOf("MSIE 9") !== -1);
|
1274
|
+
|
1275
|
+
// Experimental; don't treat IE9 as an IE at all.
|
1276
|
+
// NOTE: IE9 Beta does still not behave like a standard web browser.
|
1277
|
+
// It will probably require as much tuning as earlier IE versions.
|
1278
|
+
if(_browserType.ie9){
|
1279
|
+
_browserType.ie = false;
|
1280
|
+
}
|
1281
|
+
|
1296
1282
|
_browserType.firefox = _ua.indexOf("Firefox") !== -1;
|
1297
1283
|
_browserType.firefox2 = _ua.indexOf("Firefox/2.") !== -1;
|
1298
1284
|
_browserType.firefox3 = _ua.indexOf("Firefox/3.") !== -1;
|