rsence 2.0.0.pre → 2.0.0.1.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 +87 -0
- data/VERSION +1 -0
- data/bin/rsence +5 -101
- data/conf/config.yaml +4 -0
- data/conf/default_conf.yaml +6 -4
- data/conf/{local_conf.yaml → local_conf.yaml.devel} +2 -1
- data/js/comm/comm/autosync/autosync.js +0 -1
- data/js/comm/comm/queue/queue.js +1 -1
- data/js/comm/comm/urlresponder/urlresponder.js +58 -35
- data/js/comm/comm/values/values.js +13 -3
- data/js/comm/jsloader/jsloader.js +29 -12
- data/js/controls/button/themes/default/button_parts1-ie6.gif +0 -0
- data/js/controls/checkbox/themes/default/checkbox_parts1-ie6.gif +0 -0
- data/js/controls/datetime/timesheet/timesheet.js +2 -2
- data/js/controls/dialogs/sheet/themes/default/sheet_bg-ie6.gif +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_parts1-ie6.gif +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_parts2-ie6.gif +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_warning-ie6.gif +0 -0
- data/js/controls/passwordcontrol/themes/default/passwordcontrol.html +1 -1
- data/js/controls/radiobutton/themes/default/radiobutton_parts1-ie6.gif +0 -0
- data/js/controls/sliders/slider/themes/default/hslider_tracks-ie6.gif +0 -0
- data/js/controls/sliders/slider/themes/default/slider.css +2 -0
- data/js/controls/sliders/slider/themes/default/slider_thumbs-ie6.gif +0 -0
- data/js/controls/sliders/vslider/themes/default/vslider.css +2 -0
- data/js/controls/sliders/vslider/themes/default/vslider_tracks-ie6.gif +0 -0
- data/js/controls/stepper/themes/default/stepper-ie6.gif +0 -0
- data/js/controls/tab/tab.js +2 -6
- data/js/controls/tab/themes/default/tab.css +1 -0
- data/js/controls/tab/themes/default/tab.html +1 -1
- data/js/controls/tab/themes/default/tab_border_pattern-ie6.gif +0 -0
- data/js/controls/tab/themes/default/tab_parts1-ie6.gif +0 -0
- data/js/controls/textarea/themes/default/textarea.css +21 -0
- data/js/controls/textarea/themes/default/textarea.html +2 -2
- data/js/controls/textcontrol/textcontrol.js +56 -69
- data/js/controls/textcontrol/themes/default/textcontrol.css +23 -20
- data/js/controls/textcontrol/themes/default/textcontrol.html +1 -1
- data/js/controls/window/themes/default/window.css +1 -0
- data/js/controls/window/themes/default/window_bg_active-ie6.gif +0 -0
- data/js/controls/window/themes/default/window_bg_inactive-ie6.gif +0 -0
- data/js/controls/window/themes/default/window_buttons-ie6.gif +0 -0
- data/js/controls/window/themes/default/window_parts1-ie6.gif +0 -0
- data/js/controls/window/themes/default/window_parts2-ie6.gif +0 -0
- data/js/controls/window/window.js +28 -7
- data/js/core/class/class.js +31 -30
- data/js/core/elem/elem.js +94 -71
- data/js/core/event/event.js +34 -26
- data/js/core/iefix/iefix.js +46 -31
- data/js/debugg/debugg.js +43 -0
- data/js/debugg/js.inc +0 -0
- data/js/foundation/application/application.js +3 -1
- data/js/foundation/control/dyncontrol/dyncontrol.js +1 -0
- data/js/foundation/control/eventresponder/eventresponder.js +1 -1
- data/js/foundation/json_renderer/json_renderer.js +1 -3
- data/js/foundation/system/system.js +4 -4
- data/js/foundation/thememanager/thememanager.js +3 -3
- data/js/foundation/view/view.js +71 -1
- data/lib/conf/argv.rb +664 -0
- data/lib/conf/default.rb +51 -52
- data/lib/daemon/daemon.rb +281 -195
- data/lib/plugins/plugin_plugins.rb +47 -0
- data/lib/plugins/pluginmanager.rb +17 -12
- data/lib/transporter/transporter.rb +6 -9
- data/plugins/client_pkg/client_pkg.rb +12 -9
- data/plugins/client_pkg/lib/client_pkg_build.rb +1 -1
- data/plugins/index_html/tmpl/index.html +3 -3
- data/plugins/main/main.rb +1 -0
- metadata +16 -14
- data/bin/build_client.rb +0 -254
- data/bin/help +0 -6
- data/bin/launch.rb +0 -120
- data/bin/rdoc.sh +0 -2
- data/bin/restart +0 -6
- data/bin/run +0 -6
- data/bin/run.rb +0 -6
- data/bin/save +0 -6
- data/bin/start +0 -6
- data/bin/status +0 -6
- data/bin/stop +0 -6
@@ -11,7 +11,7 @@
|
|
11
11
|
<div class="textcontrol_sw"></div>
|
12
12
|
|
13
13
|
<div id="label#{_ID}" title="#{this.label}" class="textcontrol_input_parent">
|
14
|
-
<input type="text" class="textcontrol_input"
|
14
|
+
<input type="text" class="textcontrol_input" #{this.enabled?'':'disabled'}
|
15
15
|
onfocus="HSystem.views[#{this.viewId}].textFocus();"
|
16
16
|
onblur="HSystem.views[#{this.viewId}].textBlur();"
|
17
17
|
id="value#{_ID}" value="#{this.value}" />
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -106,6 +106,9 @@ HWindow = HDynControl.extend({
|
|
106
106
|
this.resizeSE = [ 16, 16 ];
|
107
107
|
}
|
108
108
|
},
|
109
|
+
maxX: 'auto',
|
110
|
+
maxY: 'auto',
|
111
|
+
maxSize: 'auto',
|
109
112
|
resizeW: 4,
|
110
113
|
resizeE: 4,
|
111
114
|
resizeN: 4,
|
@@ -153,6 +156,23 @@ HWindow = HDynControl.extend({
|
|
153
156
|
return _rectRules;
|
154
157
|
},
|
155
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
|
+
|
156
176
|
/** Reports to HSystem that this window has the focus and the
|
157
177
|
* previously active window needs to blur
|
158
178
|
**/
|
@@ -210,11 +230,12 @@ HWindow = HDynControl.extend({
|
|
210
230
|
* button has been clicked
|
211
231
|
**/
|
212
232
|
windowZoom: function(){
|
213
|
-
var
|
233
|
+
var _maxSize = this.options.maxSize === 'auto' ? this.parentSize() : this.options.maxSize,
|
234
|
+
_maxRect = HRect.nu(
|
214
235
|
this.options.minX,
|
215
236
|
this.options.minY,
|
216
|
-
|
217
|
-
|
237
|
+
_maxSize[0],
|
238
|
+
_maxSize[1]
|
218
239
|
),
|
219
240
|
_fitsRect = HRect.nu( this.rect ),
|
220
241
|
i = 0,
|
@@ -233,14 +254,14 @@ HWindow = HDynControl.extend({
|
|
233
254
|
_fitsRect.setHeight(_bottom);
|
234
255
|
}
|
235
256
|
}
|
236
|
-
if(_fitsRect.width >
|
237
|
-
_fitsRect.setWidth(
|
257
|
+
if(_fitsRect.width > _maxSize[0]){
|
258
|
+
_fitsRect.setWidth( _maxSize[0] );
|
238
259
|
}
|
239
260
|
else if(_fitsRect.width < this.options.minSize[0]){
|
240
261
|
_fitsRect.setWidth( this.options.minSize[0] );
|
241
262
|
}
|
242
|
-
if(_fitsRect.height >
|
243
|
-
_fitsRect.setHeight(
|
263
|
+
if(_fitsRect.height > _maxSize[1]){
|
264
|
+
_fitsRect.setHeight( _maxSize[1] );
|
244
265
|
}
|
245
266
|
else if(_fitsRect.height < this.options.minSize[1]){
|
246
267
|
_fitsRect.setHeight( this.options.minSize[1] );
|
data/js/core/class/class.js
CHANGED
@@ -68,21 +68,22 @@ HClass.prototype = {
|
|
68
68
|
|
69
69
|
/* The property copying method. */
|
70
70
|
extend: function(_source, _value) {
|
71
|
-
var _extend = HClass.prototype.extend
|
71
|
+
var _extend = HClass.prototype.extend,
|
72
|
+
_ancestor, _method, _previous, _returnValue, i, _name, _prototype, _protected;
|
72
73
|
if (arguments.length === 2) {
|
73
|
-
|
74
|
+
_ancestor = this[_source];
|
74
75
|
// only methods are inherited
|
75
76
|
if ((_ancestor instanceof Function) && (_value instanceof Function) &&
|
76
77
|
_ancestor.valueOf() !== _value.valueOf() && (/\bbase\b/).test(_value)) {
|
77
|
-
|
78
|
+
_method = _value;
|
78
79
|
_value = function() {
|
79
80
|
// saves the this.base that is the this.base method of this child
|
80
|
-
|
81
|
+
_previous = this.base;
|
81
82
|
// copies previous this.base from the direction from HClass
|
82
83
|
this.base = _ancestor;
|
83
84
|
// current class's method is called
|
84
85
|
// now inside the function when called this.base points to parent method
|
85
|
-
|
86
|
+
_returnValue = _method.apply(this, arguments);
|
86
87
|
// then because event this function can be called from child method
|
87
88
|
// resets the base to as is was before calling this function
|
88
89
|
this.base = _previous;
|
@@ -98,19 +99,19 @@ HClass.prototype = {
|
|
98
99
|
return this[_source] = _value;
|
99
100
|
// this is called when called by HClass.extend
|
100
101
|
} else if (_source) {
|
101
|
-
|
102
|
-
|
102
|
+
_prototype = {toSource: null};
|
103
|
+
_protected = ["toString", "valueOf"];
|
103
104
|
// we want default constructor function
|
104
105
|
if (HClass._prototyping) {
|
105
106
|
// 3. index
|
106
107
|
_protected.push("constructor");
|
107
108
|
}
|
108
|
-
for (
|
109
|
+
for (i = 0; (_name = _protected[i]); i++) {
|
109
110
|
if (_source[_name] !== _prototype[_name]) {
|
110
111
|
_extend.call(this, _name, _source[_name]);
|
111
112
|
}
|
112
113
|
}
|
113
|
-
for (
|
114
|
+
for (_name in _source) {
|
114
115
|
if (!_prototype[_name]) {
|
115
116
|
_extend.call(this, _name, _source[_name]);
|
116
117
|
}
|
@@ -186,7 +187,8 @@ HClass.prototype = {
|
|
186
187
|
**/
|
187
188
|
HClass.extend = function(_instance, _static) {
|
188
189
|
// reference to HClass's prototype extend method (HClass's class structure extend method)
|
189
|
-
var _extend = HClass.prototype.extend
|
190
|
+
var _extend = HClass.prototype.extend,
|
191
|
+
_prototype, _constructor, _klass, _object;
|
190
192
|
// if _instance is undefined,null,"" etc. creates object so that code below works
|
191
193
|
if (!_instance) {
|
192
194
|
_instance = {};
|
@@ -194,15 +196,15 @@ HClass.extend = function(_instance, _static) {
|
|
194
196
|
HClass._prototyping = true;
|
195
197
|
// this is base for single instance or prototype (class structure) for object that are created
|
196
198
|
// from this class
|
197
|
-
|
199
|
+
_prototype = new this;
|
198
200
|
// copies properties and methods from _instance to _prototype (class structure)
|
199
201
|
_extend.call(_prototype, _instance);
|
200
202
|
// this constructor came from _instance
|
201
|
-
|
203
|
+
_constructor = _prototype.constructor;
|
202
204
|
_prototype.constructor = this;
|
203
205
|
delete HClass._prototyping;
|
204
206
|
|
205
|
-
|
207
|
+
_klass = function() {
|
206
208
|
if (!HClass._prototyping) {
|
207
209
|
_constructor.apply(this, arguments);
|
208
210
|
}
|
@@ -224,7 +226,7 @@ HClass.extend = function(_instance, _static) {
|
|
224
226
|
_extend.call(_klass, _static);
|
225
227
|
// if _constructor is marked as null returns the created instance (that is also class structure for
|
226
228
|
// instances if class is returned
|
227
|
-
|
229
|
+
_object = (_constructor !== null) ? _klass : _prototype;
|
228
230
|
if (_object.init instanceof Function) {
|
229
231
|
_object.init();
|
230
232
|
}
|
@@ -279,23 +281,22 @@ var Base = HClass;
|
|
279
281
|
|
280
282
|
// Array fix
|
281
283
|
if ([]['indexOf']===undefined) {
|
282
|
-
Object.extend = function(
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
};
|
288
|
-
Object.extend(Array.prototype, {
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
}
|
284
|
+
// Object.extend = function(_destination, _source) {
|
285
|
+
// for (var _property in _source) {
|
286
|
+
// _destination[_property] = _source[_property];
|
287
|
+
// }
|
288
|
+
// return _destination;
|
289
|
+
// };
|
290
|
+
// Object.extend(Array.prototype, {
|
291
|
+
Array.prototype.indexOf = function(_anObject){
|
292
|
+
var i = 0, l = this.length;
|
293
|
+
for (; i < l; i++) {
|
294
|
+
if (this[i] === _anObject) {
|
295
|
+
return i;
|
295
296
|
}
|
296
|
-
return -1;
|
297
297
|
}
|
298
|
-
|
298
|
+
return -1;
|
299
|
+
};
|
299
300
|
}
|
300
301
|
|
301
302
|
|
@@ -304,7 +305,7 @@ try {
|
|
304
305
|
|
305
306
|
// console.log surrogate for browsers without a console
|
306
307
|
if(window['console']===undefined){
|
307
|
-
console = {
|
308
|
+
window.console = {
|
308
309
|
log: function(){
|
309
310
|
}
|
310
311
|
};
|
data/js/core/elem/elem.js
CHANGED
@@ -195,8 +195,7 @@ ELEM = {
|
|
195
195
|
|
196
196
|
// deprecated; backwards-compatibility
|
197
197
|
_replace: function(_id, _elem) {
|
198
|
-
|
199
|
-
_this._elements[_id] = _elem;
|
198
|
+
ELEM._elements[_id] = _elem;
|
200
199
|
},
|
201
200
|
|
202
201
|
/** = Description
|
@@ -374,7 +373,7 @@ ELEM = {
|
|
374
373
|
h = _elem.offsetHeight,
|
375
374
|
_parent = _elem.parentNode;
|
376
375
|
while (_parent && _parent.nodeName.toLowerCase() !== 'body') {
|
377
|
-
if (!
|
376
|
+
if (!BROWSER_TYPE.ie) {
|
378
377
|
_parentOverflow = document.defaultView.getComputedStyle(
|
379
378
|
_parent, null
|
380
379
|
).getPropertyValue('overflow');
|
@@ -505,17 +504,17 @@ ELEM = {
|
|
505
504
|
**/
|
506
505
|
setOpacity: function(_id, _opacity) {
|
507
506
|
var _this = ELEM;
|
508
|
-
if (_opacity === 1 &&
|
507
|
+
if (_opacity === 1 && BROWSER_TYPE.ie6) {
|
509
508
|
_this._elements[_id].style.setAttribute('filter', _this.getStyle(_id, 'filter', true).replace(/alpha([^)]*)/gi, ''));
|
510
509
|
}
|
511
510
|
else {
|
512
511
|
if (_opacity < 0.01) {
|
513
512
|
_opacity = 0;
|
514
513
|
}
|
515
|
-
if (
|
514
|
+
if (BROWSER_TYPE.ie6) {
|
516
515
|
_this._elements[_id].style.setAttribute('filter', _this.getStyle(_id, 'filter', true).replace(/alpha([^)]*)/gi, '') + 'alpha(opacity=' + _opacity * 100 + ')');
|
517
516
|
}
|
518
|
-
else if (
|
517
|
+
else if (BROWSER_TYPE.ie) {
|
519
518
|
(_this._elements[_id].style.setAttribute('opacity', _opacity));
|
520
519
|
}
|
521
520
|
else {
|
@@ -664,7 +663,7 @@ ELEM = {
|
|
664
663
|
flushLoop: function(_delay) {
|
665
664
|
var _this = ELEM;
|
666
665
|
_this._flushLoopCount++;
|
667
|
-
if (
|
666
|
+
if (BROWSER_TYPE.ie6 && /* (_this._flushLoopCount % 5 === 0) && */ _this._ieFixesNeeded) {
|
668
667
|
//window.status = 'traversetree0:'+_this._flushLoopCount;
|
669
668
|
iefix._traverseTree();
|
670
669
|
_this._ieFixesNeeded = false;
|
@@ -681,7 +680,7 @@ ELEM = {
|
|
681
680
|
} else {
|
682
681
|
if (!_this._needFlush) {
|
683
682
|
// goto sleep mode
|
684
|
-
if (
|
683
|
+
if (BROWSER_TYPE.ie6 && _this._ieFixesNeeded) {
|
685
684
|
//window.status = 'traversetree1:'+_this._flushLoopCount;
|
686
685
|
iefix._traverseTree();
|
687
686
|
_this._ieFixesNeeded = false;
|
@@ -961,7 +960,7 @@ ELEM = {
|
|
961
960
|
_this.setOpacity(_id, _value);
|
962
961
|
}
|
963
962
|
else {
|
964
|
-
if(
|
963
|
+
if( BROWSER_TYPE.ie ) {
|
965
964
|
var _camelKey = _key.replace(
|
966
965
|
/((-)([a-z])(\w))/g,
|
967
966
|
function($0, $1, $2, $3, $4) {
|
@@ -974,7 +973,7 @@ ELEM = {
|
|
974
973
|
_elems[_id].style.setProperty(_key, _cached[_key], '');
|
975
974
|
}
|
976
975
|
}
|
977
|
-
if (
|
976
|
+
if (BROWSER_TYPE.ie6) {
|
978
977
|
if (iefix._traverseStyleProperties.indexOf(_key) !== -1) {
|
979
978
|
_this._ieFixesNeeded = true;
|
980
979
|
}
|
@@ -1181,7 +1180,7 @@ ELEM = {
|
|
1181
1180
|
_this.setOpacity(_id, _cached[_key]);
|
1182
1181
|
}
|
1183
1182
|
else {
|
1184
|
-
if (
|
1183
|
+
if (BROWSER_TYPE.ie6) {
|
1185
1184
|
if (iefix._traverseStyleProperties.indexOf(_key) !== -1) {
|
1186
1185
|
_this._ieFixesNeeded = true;
|
1187
1186
|
}
|
@@ -1208,34 +1207,61 @@ ELEM = {
|
|
1208
1207
|
|
1209
1208
|
/* The ELEM "post-constructor" */
|
1210
1209
|
_init: function() {
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
ELEM.getStyle = _this._getStyleIE;
|
1210
|
+
|
1211
|
+
var _this = ELEM;
|
1212
|
+
|
1213
|
+
if (BROWSER_TYPE.ie6) {
|
1214
|
+
_this.getStyle = _this._getStyleIE;
|
1217
1215
|
}
|
1218
|
-
if (
|
1219
|
-
|
1216
|
+
if (BROWSER_TYPE.ie) {
|
1217
|
+
_this._flushStyleCache = _this._flushStyleCacheIE;
|
1220
1218
|
}
|
1221
1219
|
|
1222
|
-
_this
|
1220
|
+
if(!_this['_timer']){
|
1221
|
+
_this.bind(document.body);
|
1222
|
+
}
|
1223
1223
|
|
1224
|
-
// creates an 'trash' for div elements
|
1225
1224
|
if (_this._enableRecycler) {
|
1226
1225
|
_this._trashId = _this.make(0, 'div');
|
1227
1226
|
_this.setCSS(_this._trashId, "display:none;visibility:hidden;");
|
1228
1227
|
_this.setAttr(_this._trashId, 'id', 'trashcan_' + _this._trashId);
|
1229
1228
|
}
|
1230
1229
|
|
1231
|
-
|
1230
|
+
if(BROWSER_TYPE.symbian){
|
1231
|
+
var TestClass = HClass.extend({
|
1232
|
+
test: true,
|
1233
|
+
constructor: null
|
1234
|
+
});
|
1235
|
+
// Symbian dies in the loop when loading itself cached on reload, restart loop by re-calling this function in 1 second.
|
1236
|
+
if(!TestClass.test){
|
1237
|
+
var _gotoOpera = confirm('Your Web Browser fails. Please restart the S60 Web Browser or install a better browser.\nDo you want to download and install Opera Mobile now?');
|
1238
|
+
if(_gotoOpera){
|
1239
|
+
location.href = 'http://www.opera.com/download/get.pl?sub=++++&id=32792&location=270¬hanks=yes';
|
1240
|
+
}
|
1241
|
+
// Can't do anything wightout proper JS support.
|
1242
|
+
return;
|
1243
|
+
}
|
1244
|
+
}
|
1232
1245
|
|
1233
|
-
|
1234
|
-
|
1246
|
+
_this._flushDomLoadQueueBusy = false;
|
1247
|
+
while(!ELEM._initDone){
|
1248
|
+
ELEM._flushDomLoadQueue();
|
1235
1249
|
}
|
1250
|
+
_this._timer = setTimeout( function(){ if(!ELEM._flushDomLoadQueueBusy){ELEM.flushLoop(ELEM._minDelay); }}, ELEM._minDelay );
|
1251
|
+
// _this._flushDomLoadQueueTimer = setInterval( function(){ELEM._flushDomLoadQueue();}, 10 );
|
1236
1252
|
|
1237
|
-
|
1238
|
-
|
1253
|
+
// alert(_this._minDelay);
|
1254
|
+
},
|
1255
|
+
|
1256
|
+
_flushDomLoadQueue: function(){
|
1257
|
+
var _cmd,
|
1258
|
+
_type,
|
1259
|
+
_cmdResult;
|
1260
|
+
if(ELEM._domLoadQueue.length === 0){
|
1261
|
+
ELEM._initDone = true;
|
1262
|
+
}
|
1263
|
+
else {
|
1264
|
+
_cmd = ELEM._domLoadQueue.shift();
|
1239
1265
|
_type = (typeof _cmd);
|
1240
1266
|
if (_type === 'function') {
|
1241
1267
|
_cmd.call();
|
@@ -1243,58 +1269,45 @@ ELEM = {
|
|
1243
1269
|
else if (_type === 'string') {
|
1244
1270
|
_cmdResult = eval(_cmd);
|
1245
1271
|
if (typeof _cmdResult === 'string') {
|
1246
|
-
|
1272
|
+
ELEM._domLoadQueue.push(_cmdResult);
|
1247
1273
|
}
|
1248
1274
|
}
|
1249
1275
|
}
|
1250
|
-
_this._initDone = true;
|
1251
1276
|
},
|
1252
1277
|
|
1253
1278
|
/* Checks browser versions and starts the document load check */
|
1254
1279
|
_warmup: function() {
|
1255
1280
|
var _this = ELEM,
|
1256
1281
|
_ua = navigator.userAgent,
|
1257
|
-
_isIE = (document.all && _ua.indexOf("Opera") === -1),
|
1258
|
-
|
1259
|
-
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
],
|
1271
|
-
i = 0,
|
1272
|
-
_typeKeyGlobal,
|
1273
|
-
_typeKeyLocal,
|
1274
|
-
_typeBool;
|
1275
|
-
for( ; i < _browserTypesTable.length; i++ ){
|
1276
|
-
_typeKeyGlobal = _browserTypesTable[i][0];
|
1277
|
-
_typeKeyLocal = _browserTypesTable[i][1];
|
1278
|
-
_typeBool = _browserTypesTable[i][2];
|
1279
|
-
BROWSER_TYPE[_typeKeyGlobal] = _typeBool;
|
1280
|
-
_this[_typeKeyLocal] = _typeBool;
|
1281
|
-
}
|
1282
|
+
_isIE = (document.all && (_ua.indexOf("Opera") === -1)),
|
1283
|
+
_browserType = BROWSER_TYPE;
|
1284
|
+
_browserType.opera = _ua.indexOf("Opera") !== -1;
|
1285
|
+
_browserType.safari = _ua.indexOf("KHTML") !== -1;
|
1286
|
+
_browserType.symbian = _ua.indexOf("SymbianOS") !== -1;
|
1287
|
+
_browserType.chrome = _ua.indexOf("Chrome") !== -1;
|
1288
|
+
_browserType.ie = _isIE;
|
1289
|
+
_browserType.ie6 = _isIE && (_ua.indexOf("MSIE 6") !== -1);
|
1290
|
+
_browserType.ie7 = _isIE && (_ua.indexOf("MSIE 7") !== -1);
|
1291
|
+
_browserType.ie8 = _isIE && (_ua.indexOf("MSIE 8") !== -1);
|
1292
|
+
_browserType.firefox = _ua.indexOf("Firefox") !== -1;
|
1293
|
+
_browserType.firefox2 = _ua.indexOf("Firefox/2.") !== -1;
|
1294
|
+
_browserType.firefox3 = _ua.indexOf("Firefox/3.") !== -1;
|
1282
1295
|
_this._domWaiter();
|
1283
1296
|
},
|
1284
1297
|
|
1285
1298
|
/* Adds commands to be run when the document load check turns true */
|
1286
1299
|
_domLoader: function(_cmd) {
|
1287
|
-
var
|
1288
|
-
|
1289
|
-
if (_this._initDone === true) {
|
1300
|
+
var _type = (typeof _cmd);
|
1301
|
+
if (ELEM._initDone === true) {
|
1290
1302
|
if( _type === 'string' ) {
|
1291
1303
|
eval(_cmd);
|
1292
1304
|
}
|
1293
1305
|
else if (_type === 'function'){
|
1294
1306
|
_cmd.call();
|
1295
1307
|
}
|
1296
|
-
}
|
1297
|
-
|
1308
|
+
}
|
1309
|
+
else {
|
1310
|
+
ELEM._domLoadQueue.push(_cmd);
|
1298
1311
|
}
|
1299
1312
|
},
|
1300
1313
|
|
@@ -1304,7 +1317,7 @@ ELEM = {
|
|
1304
1317
|
_this = ELEM;
|
1305
1318
|
// A hack for ie (ripped from DomLoaded.js)
|
1306
1319
|
// http://www.cherny.com/demos/onload/domloaded.js
|
1307
|
-
if (
|
1320
|
+
if (BROWSER_TYPE.ie) {
|
1308
1321
|
var _ie_proto = "javascript:void(0)";
|
1309
1322
|
if (location.protocol === "https:") {
|
1310
1323
|
_ie_proto = "src=//0";
|
@@ -1312,12 +1325,10 @@ ELEM = {
|
|
1312
1325
|
document.write("<scr" + "ipt id=__ie_onload defer src=" + _ie_proto + "></scr" + "ipt>");
|
1313
1326
|
var _ie_script = document.getElementById("__ie_onload");
|
1314
1327
|
_ie_script.onreadystatechange = function() {
|
1315
|
-
if (this.readyState === "complete") {
|
1328
|
+
if ((this.readyState === "complete") && true) {
|
1329
|
+
clearTimeout(ELEM._domLoadTimer);
|
1316
1330
|
ELEM._domLoadStatus = true;
|
1317
1331
|
ELEM._init();
|
1318
|
-
delete ELEM._domLoadQueue;
|
1319
|
-
clearTimeout(ELEM._domLoadTimer);
|
1320
|
-
delete ELEM._domLoadTimer;
|
1321
1332
|
}
|
1322
1333
|
};
|
1323
1334
|
// the event will trigger on ie, so we don't have to keep on polling:
|
@@ -1325,8 +1336,9 @@ ELEM = {
|
|
1325
1336
|
}
|
1326
1337
|
|
1327
1338
|
// Safari / KHTML readyness detection:
|
1328
|
-
else if (
|
1329
|
-
(/loaded|complete/.test(document.readyState))) {
|
1339
|
+
else if (BROWSER_TYPE.safari && document.readyState === 'complete'){
|
1340
|
+
// (/loaded|complete/.test(document.readyState))) {
|
1341
|
+
// (/loaded|complete/.test(document.readyState))) {
|
1330
1342
|
_this._domLoadStatus = true;
|
1331
1343
|
}
|
1332
1344
|
|
@@ -1335,13 +1347,24 @@ ELEM = {
|
|
1335
1347
|
_this._domLoadStatus = true;
|
1336
1348
|
}
|
1337
1349
|
|
1338
|
-
if (
|
1339
|
-
_this._domLoadTimer = setTimeout('ELEM._domWaiter()', ELEMTickerInterval * 10);
|
1340
|
-
} else {
|
1341
|
-
_this._init();
|
1342
|
-
delete _this._domLoadQueue;
|
1350
|
+
if (_this._domLoadStatus) {
|
1343
1351
|
clearTimeout(_this._domLoadTimer);
|
1344
|
-
|
1352
|
+
if(BROWSER_TYPE.symbian){
|
1353
|
+
// document.body.innerHTML produces beyond-wtf "fastinnerhtml!", maybe they "fixed" an unit test?
|
1354
|
+
// see: http://trac.webkit.org/browser/S60/trunk/WebCore/khtml/html/html_elementimpl.cpp#L750
|
1355
|
+
//document.body.innerHTML += '';
|
1356
|
+
|
1357
|
+
// This check ensures we are use actually testing the beyond buggy S60 Web Browser.
|
1358
|
+
// Better versions are handled like regular safari/webkit/chrome/khtml
|
1359
|
+
BROWSER_TYPE.symbian = document.body.innerHTML === "fastinnerhtml!";
|
1360
|
+
// var _timer = setTimeout(_this._init, 5000);
|
1361
|
+
}
|
1362
|
+
// else {
|
1363
|
+
_this._init();
|
1364
|
+
// }
|
1365
|
+
}
|
1366
|
+
else {
|
1367
|
+
_this._domLoadTimer = setTimeout('ELEM._domWaiter()', ELEMTickerInterval * 10);
|
1345
1368
|
}
|
1346
1369
|
}
|
1347
1370
|
};
|