rsence-pre 2.2.0.2 → 2.2.0.3

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 CHANGED
@@ -1 +1 @@
1
- 2.2.0.2.pre
1
+ 2.2.0.3.pre
@@ -8,7 +8,7 @@
8
8
  vertical-align: middle;
9
9
  border: 0;
10
10
  left:0px;top:0px;
11
- #{(BROWSER_TYPE.firefox||BROWSER_TYPE.ie7||BROWSER_TYPE.ie8||BROWSER_TYPE.opera)?'padding:0;padding-left:2px;width:100% !important;height:100% !important;':BROWSER_TYPE.ie6?'right:2px;bottom:2px;':'padding:2px;right:0px;bottom:0px;width:auto;height:auto;'}
11
+ #{(BROWSER_TYPE.firefox||BROWSER_TYPE.ie7||BROWSER_TYPE.ie8||BROWSER_TYPE.ie9||BROWSER_TYPE.opera)?'padding:0;padding-left:2px;width:100% !important;height:100% !important;':BROWSER_TYPE.ie6?'right:2px;bottom:2px;':'padding:2px;right:0px;bottom:0px;width:auto;height:auto;'}
12
12
  }
13
13
 
14
14
  .default .disabled .textarea_input {
@@ -17,5 +17,5 @@
17
17
 
18
18
  .default .textarea_input_parent {
19
19
  position: absolute;
20
- #{(BROWSER_TYPE.firefox||BROWSER_TYPE.ie7||BROWSER_TYPE.ie8||BROWSER_TYPE.opera)?'left:0;padding-left:1px;top:1px;right:3px;bottom:1px;':BROWSER_TYPE.ie?'left:2px;top:1px;right:1px;bottom:1px;':'left:-2px;top:-2px;right:-2px;bottom:-2px;'}
20
+ #{(BROWSER_TYPE.firefox||BROWSER_TYPE.ie7||BROWSER_TYPE.ie8||BROWSER_TYPE.ie9||BROWSER_TYPE.opera)?'left:0;padding-left:1px;top:1px;right:3px;bottom:1px;':BROWSER_TYPE.ie?'left:2px;top:1px;right:1px;bottom:1px;':'left:-2px;top:-2px;right:-2px;bottom:-2px;'}
21
21
  }
@@ -18,7 +18,7 @@
18
18
 
19
19
  .default .textcontrol_input_parent {
20
20
  position: absolute;
21
- #{(BROWSER_TYPE.firefox||BROWSER_TYPE.ie7||BROWSER_TYPE.ie8||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;'}
21
+ #{(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;'}
22
22
  }
23
23
 
24
24
  .default .textcontrol_bg {
@@ -300,7 +300,6 @@ if ([]['indexOf']===undefined) {
300
300
  };
301
301
  }
302
302
 
303
-
304
303
  // ff version 3.0.3 fails on this, when firebug installed: try/catch block
305
304
  try {
306
305
 
@@ -315,4 +314,3 @@ if(window['console']===undefined){
315
314
 
316
315
  } catch(e) {}
317
316
 
318
-
data/js/core/elem/elem.js CHANGED
@@ -73,8 +73,6 @@ ELEM = {
73
73
  _constructor: function() {
74
74
  var _this = ELEM;
75
75
 
76
- _this._enableRecycler = false;
77
-
78
76
  // pre-init queue
79
77
  _this._domLoadQueue = [];
80
78
  _this._domLoadTimer = null;
@@ -83,18 +81,6 @@ ELEM = {
83
81
  _this._domLoadStatus = false;
84
82
 
85
83
  // initial tasks
86
- _this._initDone = false;
87
-
88
- _this._makeCount = 0;
89
-
90
- _this._setStyleCount = 0;
91
- _this._setStyleDiffCount = 0;
92
- _this._getStyleCount = 0;
93
- _this._getStyleMissCount = 0;
94
-
95
- _this._flushLoopCount = 0;
96
- _this._flushLoopFlushedCount = 0;
97
- _this._flushStylCount = 0;
98
84
 
99
85
  _this._flushTime = 0;
100
86
  _this._flushCounter = 0;
@@ -107,13 +93,7 @@ ELEM = {
107
93
  _this._slowness = 1;
108
94
 
109
95
  _this._elements = [];
110
- if (_this._enableRecycler) {
111
- _this._recycler = {
112
- _tagNames: []
113
- };
114
- } else {
115
- _this._freeElemIds = [];
116
- }
96
+ _this._freeElemIds = [];
117
97
  _this._styleCache = {};
118
98
  _this._styleTodo = {};
119
99
  _this._attrTodo = {};
@@ -122,32 +102,15 @@ ELEM = {
122
102
  _this._elemTodoH = {};
123
103
  _this._blockElems = ",ADDRESS,BLOCKQUOTE,CENTER,DIR,DIV,DL,FIELDSET,FORM,H1,H2,H3,H4,H5,H6,HR,ISINDEX,MENU,NOFRAMES,NOSCRIPT,OL,P,PRE,TABLE,UL,";
124
104
  },
125
-
126
-
127
- _fillTrash: function(_count, _tagName) {
128
- if (!ELEM._enableRecycler) {
129
- return;
130
- }
131
- var _this = ELEM,
132
- i = 0,
133
- _toDel = [],
134
- _recycler = _this._initRecycler(_tagName),
135
- _trashId = _recycler._trashId;
136
- for (; i !== _count; i++) {
137
- _toDel.push(_this.make(_trashId, _tagName));
138
- }
139
- for (i = 0; i !== _count; i++) {
140
- _this.del(_toDel[i]);
141
- }
142
- },
143
-
105
+
144
106
  // adds an element reference
145
107
  // returns its id
146
108
  _add: function(_elem) {
147
- var _id,
148
- _this = ELEM,
149
- _elements = _this._elements,
150
- _hasFreeElemIds = (_this._freeElemIds.length !== 0);
109
+ var
110
+ _id,
111
+ _this = ELEM,
112
+ _elements = _this._elements,
113
+ _hasFreeElemIds = (_this._freeElemIds.length !== 0);
151
114
  if (_hasFreeElemIds) {
152
115
  _id = _this._freeElemIds.pop();
153
116
  _elements[_id] = _elem;
@@ -182,9 +145,10 @@ ELEM = {
182
145
  *
183
146
  **/
184
147
  bindId: function(_domId) {
185
- var _this = ELEM,
186
- _elem = document.getElementById(_domId),
187
- _elemId = _this._add(_elem);
148
+ var
149
+ _this = ELEM,
150
+ _elem = document.getElementById(_domId),
151
+ _elemId = _this._add(_elem);
188
152
  _this._initCache(_elemId);
189
153
  return _elemId;
190
154
  },
@@ -200,8 +164,9 @@ ELEM = {
200
164
  *
201
165
  **/
202
166
  bind: function(_elem) {
203
- var _this = ELEM,
204
- _id = _this._add(_elem);
167
+ var
168
+ _this = ELEM,
169
+ _id = _this._add(_elem);
205
170
  _this._initCache(_id);
206
171
  return _id;
207
172
  },
@@ -270,22 +235,6 @@ ELEM = {
270
235
  return '';
271
236
  },
272
237
 
273
- _initRecycler: function(_tagName) {
274
- if (!ELEM._enableRecycler) {
275
- return null;
276
- }
277
- var _this = ELEM,
278
- _recycler = _this._recycler;
279
- if (!_recycler[_tagName]) {
280
- _recycler._tagNames.push(_tagName);
281
- _recycler[_tagName] = [];
282
- _recycler[_tagName]._countIn = 1;
283
- _recycler[_tagName]._countOut = 0;
284
- _recycler[_tagName]._trashId = _this.make(_this._trashId, 'div');
285
- }
286
- return _recycler[_tagName]._trashId;
287
- },
288
-
289
238
  /** = Description
290
239
  * Deletes an element and its associated buffers by ELEM ID.
291
240
  *
@@ -294,37 +243,27 @@ ELEM = {
294
243
  *
295
244
  **/
296
245
  del: function(_id) {
297
- var _this = ELEM,
298
- _elem = _this._elements[_id];
299
- if (_this._flushing) {
300
- _this.del(_id);
301
- }
302
- _this._flushing = true;
303
- if (_this._enableRecycler) {
304
- var _tagName = _elem.tagName,
305
- _trashId = _this._initRecycler(_tagName),
306
- _recycler = _this._recycler[_tagName];
307
- _this.append(_id, _trashId);
308
- }
309
-
246
+ var
247
+ _this = ELEM,
248
+ _elem = _this._elements[_id];
249
+ // if (_this._flushing) {
250
+ // console.log('warn: already flushin.. retrying delete');
251
+ // setTimeout( function(){_this.del(_id)}, 10 );
252
+ // }
253
+ // _this._flushing = true;
310
254
  var _elemTodoIdx = _this._elemTodo.indexOf(_id);
311
255
  if (_elemTodoIdx !== -1) {
312
256
  _this._elemTodo.splice(_elemTodoIdx, 1);
313
257
  }
314
258
  _this._initCache(_id);
315
- if (_this._enableRecycler) {
316
- _recycler._countIn++;
317
- _recycler.push(_id);
318
- } else {
319
- _this._freeElemIds.push(_id);
320
- var _parentNode = _elem.parentNode;
321
- if (_parentNode !== null) {
322
- _parentNode.removeChild(_elem);
323
- }
324
- _elem = null;
325
- _this._elements[_id] = null;
326
- }
327
- _this._flushing = false;
259
+ _this._freeElemIds.push(_id);
260
+ var _parentNode = _elem.parentNode;
261
+ if (_parentNode !== null) {
262
+ _parentNode.removeChild(_elem);
263
+ }
264
+ _elem = null;
265
+ _this._elements[_id] = null;
266
+ // _this._flushing = false;
328
267
  },
329
268
 
330
269
  /** = Description
@@ -336,9 +275,10 @@ ELEM = {
336
275
  *
337
276
  **/
338
277
  append: function(_sourceId, _targetId) {
339
- var _this = ELEM,
340
- _source = _this._elements[_sourceId],
341
- _target = _this._elements[_targetId];
278
+ var
279
+ _this = ELEM,
280
+ _source = _this._elements[_sourceId],
281
+ _target = _this._elements[_targetId];
342
282
  _target.appendChild(_source);
343
283
  },
344
284
 
@@ -381,12 +321,13 @@ ELEM = {
381
321
  *
382
322
  **/
383
323
  getVisibleSize: function(_id) {
384
- var _parentOverflow,
385
- _this = ELEM,
386
- _elem = _this._elements[_id],
387
- w = _elem.offsetWidth,
388
- h = _elem.offsetHeight,
389
- _parent = _elem.parentNode;
324
+ var
325
+ _parentOverflow,
326
+ _this = ELEM,
327
+ _elem = _this._elements[_id],
328
+ w = _elem.offsetWidth,
329
+ h = _elem.offsetHeight,
330
+ _parent = _elem.parentNode;
390
331
  while (_parent && _parent.nodeName.toLowerCase() !== 'body') {
391
332
  _this._getComputedStyle( _parent, 'overflow' );
392
333
  _parentOverflow = _parentOverflow !== 'visible';
@@ -413,10 +354,11 @@ ELEM = {
413
354
  *
414
355
  **/
415
356
  getSize: function(_id) {
416
- var _this = ELEM,
417
- _elem = _this._elements[_id],
418
- w = _elem.offsetWidth,
419
- h = _elem.offsetHeight;
357
+ var
358
+ _this = ELEM,
359
+ _elem = _this._elements[_id],
360
+ w = _elem.offsetWidth,
361
+ h = _elem.offsetHeight;
420
362
  return [w, h];
421
363
  },
422
364
 
@@ -431,10 +373,11 @@ ELEM = {
431
373
  *
432
374
  **/
433
375
  getScrollSize: function(_id) {
434
- var _this = ELEM,
435
- _elem = _this._elements[_id],
436
- w = _elem.scrollWidth,
437
- h = _elem.scrollHeight;
376
+ var
377
+ _this = ELEM,
378
+ _elem = _this._elements[_id],
379
+ w = _elem.scrollWidth,
380
+ h = _elem.scrollHeight;
438
381
  return [w, h];
439
382
  },
440
383
 
@@ -500,20 +443,20 @@ ELEM = {
500
443
  *
501
444
  **/
502
445
  getOpacity: function(_id) {
503
- throw "ELEM.getOpacity: known error.";
504
- // var
505
- // _this = ELEM,
506
- // _elem = _this.get(_id),
507
- // _opacity = _this._getComputedStyle( _elem, 'opacity' );
508
- // if (ELEM.ie && (_elem.currentStyle['filter'] || '').match(/alpha(opacity=(.*))/)) {
509
- // if (_opacity[1]) {
510
- // return parseFloat(_opacity[1]) / 100;
511
- // }
512
- // }
513
- // else ( === 0)) {
514
- // return parseFloat(_opacity);
515
- // }
516
- // return 1.0;
446
+ var
447
+ _this = ELEM,
448
+ _elem = _this.get(_id),
449
+ _opacity = _this._getComputedStyle( _elem, 'opacity' );
450
+ if (ELEM.ie && (_elem.currentStyle['filter'] || '').match(/alpha(opacity=(.*))/)) {
451
+ if (_opacity[1]) {
452
+ return parseFloat(_opacity[1]) / 100;
453
+ }
454
+ return 1;
455
+ }
456
+ else {
457
+ return parseFloat(_opacity);
458
+ }
459
+ return 1.0;
517
460
  },
518
461
 
519
462
  /** = Description
@@ -700,10 +643,9 @@ ELEM = {
700
643
  *
701
644
  **/
702
645
  flushLoop: function(_delay) {
703
- var _this = ELEM;
704
- _this._flushLoopCount++;
705
- if (BROWSER_TYPE.ie6 && /* (_this._flushLoopCount % 5 === 0) && */ _this._ieFixesNeeded) {
706
- //window.status = 'traversetree0:'+_this._flushLoopCount;
646
+ var
647
+ _this = ELEM;
648
+ if (BROWSER_TYPE.ie6 && _this._ieFixesNeeded) {
707
649
  iefix._traverseTree();
708
650
  _this._ieFixesNeeded = false;
709
651
  }
@@ -716,11 +658,11 @@ ELEM = {
716
658
  }, _delay
717
659
  );
718
660
  return;
719
- } else {
661
+ }
662
+ else {
720
663
  if (!_this._needFlush) {
721
664
  // goto sleep mode
722
665
  if (BROWSER_TYPE.ie6 && _this._ieFixesNeeded) {
723
- //window.status = 'traversetree1:'+_this._flushLoopCount;
724
666
  iefix._traverseTree();
725
667
  _this._ieFixesNeeded = false;
726
668
  }
@@ -731,7 +673,7 @@ ELEM = {
731
673
  );
732
674
  return;
733
675
  }
734
- _delay = parseInt(_this._slowness * (_this._flushTime / _this._flushCounter), _this.ELEMTickerInterval);
676
+ _delay = Math.round(_this._slowness * (_this._flushTime / _this._flushCounter), _this.ELEMTickerInterval);
735
677
  if (_delay < _this._minDelay || !_delay) {
736
678
  _delay = _this._minDelay;
737
679
  }
@@ -743,13 +685,14 @@ ELEM = {
743
685
  );
744
686
  }
745
687
  _this._flushTime -= new Date().getTime();
746
- var i,
747
- _id,
748
- _elemTodo = _this._elemTodo,
749
- _loopMaxL = _elemTodo.length,
750
- _currTodo = _elemTodo.splice(0, _loopMaxL),
751
- _flushStartTime = new Date().getTime();
752
- for (i = 0; i < _loopMaxL; i++) {
688
+ var
689
+ i = 0,
690
+ _id,
691
+ _elemTodo = _this._elemTodo,
692
+ _loopMaxL = _elemTodo.length,
693
+ _currTodo = _elemTodo.splice(0, _loopMaxL),
694
+ _flushStartTime = new Date().getTime();
695
+ for (; i < _loopMaxL; i++) {
753
696
  _this._flushLoopFlushed++;
754
697
  _id = _currTodo.pop();
755
698
  _this._elemTodoH[_id] = false;
@@ -766,16 +709,17 @@ ELEM = {
766
709
 
767
710
  /* Method for flushing the attribute cache */
768
711
  _flushAttrCache: function(_id) {
769
- var _this = ELEM,
770
- _attrTodo = _this._attrTodo[_id],
771
- _attrCache = _this._attrCache[_id],
772
- _elem = _this._elements[_id],
773
- //_elemP=_elem.setAttribute,
774
- _key,
775
- _val,
776
- i,
777
- _iMax = _attrTodo.length,
778
- _currTodo = _attrTodo.splice(0, _iMax);
712
+ var
713
+ _this = ELEM,
714
+ _attrTodo = _this._attrTodo[_id],
715
+ _attrCache = _this._attrCache[_id],
716
+ _elem = _this._elements[_id],
717
+ //_elemP=_elem.setAttribute,
718
+ _key,
719
+ _val,
720
+ i,
721
+ _iMax = _attrTodo.length,
722
+ _currTodo = _attrTodo.splice(0, _iMax);
779
723
  for (i = 0; i !== _iMax; i++) {
780
724
  _key = _currTodo.pop();
781
725
  _val = _attrCache[_key];
@@ -799,13 +743,15 @@ ELEM = {
799
743
  *
800
744
  **/
801
745
  getAttr: function(_id, _key, _bypass) {
802
- var _this = ELEM,
803
- _attrVal = _this._attrCache[_id][_key],
804
- _val;
746
+ var
747
+ _this = ELEM,
748
+ _attrVal = _this._attrCache[_id][_key],
749
+ _val;
805
750
  if (_attrVal !== undefined && !_bypass) {
806
751
  return _attrVal;
807
752
  }
808
- var _elem = _this._elements[_id];
753
+ var
754
+ _elem = _this._elements[_id];
809
755
  if (_elem.getAttribute(_key) === null) {
810
756
  _elem[_key] = '';
811
757
  }
@@ -828,10 +774,11 @@ ELEM = {
828
774
  *
829
775
  **/
830
776
  setAttr: function(_id, _key, _value, _bypass) {
831
- var _this = ELEM,
832
- _attrTodo = _this._attrTodo[_id],
833
- _attrCache = _this._attrCache[_id],
834
- _differs = _value !== _this.getAttr(_id, _key);
777
+ var
778
+ _this = ELEM,
779
+ _attrTodo = _this._attrTodo[_id],
780
+ _attrCache = _this._attrCache[_id],
781
+ _differs = _value !== _this.getAttr(_id, _key);
835
782
  if (_differs || _bypass) {
836
783
  _attrCache[_key] = _value;
837
784
  if (_bypass) {
@@ -859,10 +806,11 @@ ELEM = {
859
806
  *
860
807
  **/
861
808
  delAttr: function(_id, _key) {
862
- var _differs,
863
- _this = ELEM,
864
- _attrTodo = _this._attrTodo[_id],
865
- _attrCache = _this._attrCache[_id];
809
+ var
810
+ _differs,
811
+ _this = ELEM,
812
+ _attrTodo = _this._attrTodo[_id],
813
+ _attrCache = _this._attrCache[_id];
866
814
  delete _attrCache[_key];
867
815
  _this._elements[_id].removeAttribute(_key);
868
816
  if (_attrTodo.indexOf(_key) !== -1) {
@@ -889,11 +837,13 @@ ELEM = {
889
837
  *
890
838
  **/
891
839
  hasClassName: function(_elemId, _className) {
892
- var _element = ELEM.get(_elemId);
893
- if (!_element) {
840
+ var
841
+ _elem = ELEM.get(_elemId);
842
+ if (!_elem) {
894
843
  return null;
895
844
  }
896
- var _classNames = _element.className.split(' ');
845
+ var
846
+ _classNames = _elem.className.split(' ');
897
847
  return (_classNames.indexOf(_className) !== -1);
898
848
  },
899
849
 
@@ -999,18 +949,18 @@ ELEM = {
999
949
  *
1000
950
  **/
1001
951
  setStyle: function(_id, _key, _value, _bypass) {
1002
- var _this = ELEM,
1003
- _cached = _this._styleCache[_id],
1004
- _elems = _this._elements,
1005
- _differs;
1006
- _this._setStyleCount++;
952
+ if( BROWSER_TYPE.ie9 ){ _bypass = true; }
953
+ var
954
+ _this = ELEM,
955
+ _cached = _this._styleCache[_id],
956
+ _elems = _this._elements,
957
+ _differs;
1007
958
  if (_cached === undefined) {
1008
959
  _this._initCache(_id);
1009
960
  _cached = _this._styleCache[_id];
1010
961
  }
1011
962
  _differs = _value !== _cached[_key];
1012
963
  if (_differs) {
1013
- _this._setStyleDiffCount++;
1014
964
  _cached[_key] = _value;
1015
965
  if (_bypass) {
1016
966
  if (_key === 'opacity') {
@@ -1065,36 +1015,13 @@ ELEM = {
1065
1015
  }
1066
1016
  if (_tagName === undefined) {
1067
1017
  _tagName = 'DIV';
1068
- } else {
1018
+ }
1019
+ else {
1069
1020
  _tagName = _tagName.toUpperCase();
1070
1021
  }
1071
1022
  var _this = ELEM,
1072
1023
  _elem,
1073
1024
  _id;
1074
- _this._makeCount++;
1075
- if (_this._enableRecycler) {
1076
- if (_this._recycler[_tagName]) {
1077
- if (_this._recycler[_tagName].length !== 0) {
1078
- // Recycle the id of a previously deleted element
1079
- _id = _this._recycler[_tagName].pop();
1080
- _this._recycler[_tagName]._countOut++;
1081
- _elem = _this._elements[_id];
1082
- //_elem.innerHTML='';
1083
- /*
1084
- if(_elem.tagName!==_tagName){
1085
- _elem.outerHTML='<'+_tagName+'></'+_tagName+'>';
1086
- }
1087
- */
1088
- if (_this._blockElems.indexOf(',' + _tagName + ',') !== -1) {
1089
- _this.setCSS(_id, 'display:block;');
1090
- } else {
1091
- _this.setCSS(_id, 'display:inline;');
1092
- }
1093
- _this.append(_id, _targetId);
1094
- return _id;
1095
- }
1096
- }
1097
- }
1098
1025
  _elem = document.createElement(_tagName);
1099
1026
  _id = _this._add(_elem);
1100
1027
  _this._initCache(_id);
@@ -1164,37 +1091,43 @@ ELEM = {
1164
1091
  *
1165
1092
  **/
1166
1093
  getStyle: function(_id, _key, _bypass){
1167
- var _this=ELEM,
1168
- _cached=_this._styleCache[_id],
1169
- _retval;
1170
- _this._getStyleCount++;
1094
+ var
1095
+ _this=ELEM,
1096
+ _cached=_this._styleCache[_id],
1097
+ _retval;
1171
1098
  if ((_cached[_key] === undefined) || _bypass) {
1172
- if (!_bypass) {
1173
- _this._getStyleMissCount++;
1174
- }
1175
1099
  if ((_key === 'opacity') && _bypass) {
1176
1100
  _retval = _this.getOpacity(_id);
1177
1101
  }
1178
1102
  else {
1179
1103
  _retval = _this._getComputedStyle(_this._elements[_id],_key);
1104
+ if(_key === 'z-index' && _retval === 'auto'){
1105
+ _retval = -1;
1106
+ }
1180
1107
  }
1181
1108
  _cached[_key] = _retval;
1182
1109
  }
1110
+ else {
1111
+ if(_key === 'z-index'){
1112
+ console.log('cached:',_cached[_key]);
1113
+ }
1114
+ }
1183
1115
  return _cached[_key];
1184
1116
  },
1185
1117
 
1186
1118
  /* Style buffer flushing algorithm */
1187
1119
  _flushStyleCache: function(_id) {
1188
- var _this = ELEM,
1189
- _styleTodo = _this._styleTodo[_id],
1190
- _cached = _this._styleCache[_id],
1191
- _elem = _this._elements[_id],
1192
- _elemS,
1193
- _loopMaxP,
1194
- _cid,
1195
- _key,
1196
- _currTodo,
1197
- _retval;
1120
+ var
1121
+ _this = ELEM,
1122
+ _styleTodo = _this._styleTodo[_id],
1123
+ _cached = _this._styleCache[_id],
1124
+ _elem = _this._elements[_id],
1125
+ _elemS,
1126
+ _loopMaxP,
1127
+ _cid,
1128
+ _key,
1129
+ _currTodo,
1130
+ _retval;
1198
1131
  if (!_elem) {
1199
1132
  return;
1200
1133
  }
@@ -1202,7 +1135,6 @@ ELEM = {
1202
1135
  _currTodo = _styleTodo.splice(0, _loopMaxP);
1203
1136
  for (_cid = 0; _cid !== _loopMaxP; _cid++) {
1204
1137
  _key = _currTodo.pop();
1205
- _this._flushStylCount++;
1206
1138
  if (_key === 'opacity') {
1207
1139
  _this.setOpacity(_id, _cached[_key]);
1208
1140
  }
@@ -1217,7 +1149,6 @@ ELEM = {
1217
1149
 
1218
1150
  /* The ELEM "post-constructor" */
1219
1151
  _init: function() {
1220
-
1221
1152
  if(RSenceInit !== undefined){
1222
1153
  RSenceInit();
1223
1154
  }
@@ -1233,12 +1164,6 @@ ELEM = {
1233
1164
  _this.bind(document.body);
1234
1165
  }
1235
1166
 
1236
- if (_this._enableRecycler) {
1237
- _this._trashId = _this.make(0, 'div');
1238
- _this.setCSS(_this._trashId, "display:none;visibility:hidden;");
1239
- _this.setAttr(_this._trashId, 'id', 'trashcan_' + _this._trashId);
1240
- }
1241
-
1242
1167
  if(BROWSER_TYPE.symbian){
1243
1168
  var TestClass = HClass.extend({
1244
1169
  test: true,
@@ -1254,7 +1179,6 @@ ELEM = {
1254
1179
  return;
1255
1180
  }
1256
1181
  }
1257
-
1258
1182
  _this._flushDomLoadQueueBusy = false;
1259
1183
  while(!ELEM._initDone){
1260
1184
  ELEM._flushDomLoadQueue();
@@ -1308,7 +1232,8 @@ ELEM = {
1308
1232
  // NOTE: IE9 Beta does still not behave like a standard web browser.
1309
1233
  // It will probably require as much tuning as earlier IE versions.
1310
1234
  if(_browserType.ie9){
1311
- _browserType.ie = false;
1235
+ // _browserType.ie = false;
1236
+ // _browserType.safari = true;
1312
1237
  }
1313
1238
 
1314
1239
  _browserType.firefox = _ua.indexOf("Firefox") !== -1;
@@ -1339,7 +1264,7 @@ ELEM = {
1339
1264
  _this = ELEM;
1340
1265
  // A hack for ie (ripped from DomLoaded.js)
1341
1266
  // http://www.cherny.com/demos/onload/domloaded.js
1342
- if (BROWSER_TYPE.ie) {
1267
+ if (BROWSER_TYPE.ie && !BROWSER_TYPE.ie9) {
1343
1268
  var _ie_proto = "javascript:void(0)";
1344
1269
  if (location.protocol === "https:") {
1345
1270
  _ie_proto = "src=//0";
@@ -1398,4 +1323,3 @@ var//RSence.Core
1398
1323
  LOAD = ELEM._domLoader;
1399
1324
 
1400
1325
  ELEM._warmup();
1401
-
@@ -48,7 +48,7 @@ Event = {
48
48
  **/
49
49
  isLeftClick: function(e) {
50
50
  // IE: left 1, middle 4, right 2
51
- if (BROWSER_TYPE.ie) {
51
+ if (BROWSER_TYPE.ie && !BROWSER_TYPE.ie9) {
52
52
  return (e.button === 1 || e.button === 3 || e.button === 5);
53
53
  }
54
54
  else {
@@ -147,7 +147,7 @@ Event = {
147
147
 
148
148
  // Activates the garbage collector of Internet Explorer
149
149
  // when the document is unloaded:
150
- if (BROWSER_TYPE.ie) {
150
+ if (BROWSER_TYPE.ie && !BROWSER_TYPE.ie9) {
151
151
  Event.observe(window, "unload", Event.unloadCache, false);
152
152
  }
153
153
 
@@ -45,6 +45,7 @@ HTimeSheet = HControl.extend({
45
45
  itemOffsetRight: 0, // Theme settings; don't enter in options
46
46
  itemOffsetTop: 20, // Theme settings; don't enter in options
47
47
  itemOffsetBottom: 0, // Theme settings; don't enter in options
48
+ itemDisplayTime: true,
48
49
  hourOffsetTop: -4, // Theme settings; don't enter in options
49
50
  constructor: function( _ctrl ){
50
51
  if( this.defaultLabel === undefined ){
@@ -229,7 +230,8 @@ HTimeSheet = HControl.extend({
229
230
  this.dragPreviewRect,
230
231
  this, {
231
232
  value: _dummyValue,
232
- visible: false
233
+ visible: false,
234
+ displayTime: this.options.itemDisplayTime
233
235
  }
234
236
  );
235
237
  this.dragPreview.setStyleOfPart('state','color','#fff');
@@ -247,7 +249,7 @@ HTimeSheet = HControl.extend({
247
249
  var
248
250
  _startTime = this.pxToTime( y-this.pageY() ),
249
251
  _endTime = _startTime + this.minDuration;
250
- console.log('start:',(new Date(_startTime*1000)).toUTCString(),', end:',(new Date(_endTime*1000)).toUTCString());
252
+ // console.log('start:',(new Date(_startTime*1000)).toUTCString(),', end:',(new Date(_endTime*1000)).toUTCString());
251
253
  this.refreshDragPreview( _startTime, _endTime );
252
254
  this.dragPreview.bringToFront();
253
255
  this.dragPreview.show();
@@ -478,6 +480,7 @@ HTimeSheet = HControl.extend({
478
480
  _rect,
479
481
  this, {
480
482
  value: _value,
483
+ displayTime: this.options.itemDisplayTime,
481
484
  events: {
482
485
  draggable: true,
483
486
  // click: true,
@@ -15,6 +15,10 @@ HTimeSheetItem = HControl.extend({
15
15
  componentName: 'timesheet_item',
16
16
  markupElemNames: ['bg', 'label', 'state', 'icons', 'value', 'subview'],
17
17
 
18
+ controlDefaults: HControlDefaults.extend({
19
+ displayTime: true
20
+ }),
21
+
18
22
  drawIcon: function( _iconOrder, _iconId ){
19
23
  var
20
24
  _iconElemId = ELEM.make( this.markupElemIds.icons, 'div' );
@@ -40,6 +44,9 @@ HTimeSheetItem = HControl.extend({
40
44
  },
41
45
 
42
46
  refreshState: function( _start, _duration ){
47
+ if(!this.options.displayTime){
48
+ return;
49
+ }
43
50
  var
44
51
  _startTime = _start || this.value.start,
45
52
  _endTime = _startTime + ( _duration || this.value.duration ),
@@ -141,7 +141,7 @@ EVENT = {
141
141
  /** Starts event listening.
142
142
  **/
143
143
  start: function() {
144
- var _globalEventTargetElement = BROWSER_TYPE.ie?document:window,
144
+ var _globalEventTargetElement = (BROWSER_TYPE.ie && !BROWSER_TYPE.ie9)?document:window,
145
145
  _this = EVENT;
146
146
  // _eventMap = [
147
147
  Event.observe( _globalEventTargetElement, 'mousemove', _this.mouseMove );
@@ -221,7 +221,7 @@ EVENT = {
221
221
  _this = EVENT,
222
222
  _propIn,
223
223
  _init = ( _this.listeners[_elemId] === undefined || _this.listeners[_elemId] === false );
224
- if (BROWSER_TYPE.ie) {
224
+ if (BROWSER_TYPE.ie && !BROWSER_TYPE.ie9) {
225
225
  _elem.setAttribute('ctrl', _ctrl);
226
226
  }
227
227
  else {
@@ -694,7 +694,7 @@ EVENT = {
694
694
  if (_isLeftButton === undefined) {
695
695
  _isLeftButton = Event.isLeftClick(e);
696
696
  }
697
- if (BROWSER_TYPE.ie) {
697
+ if (BROWSER_TYPE.ie && !BROWSER_TYPE.ie9) {
698
698
  _isLeftButton = true; // IE only supports click on left button
699
699
  }
700
700
  // Prevent right-click event from triggering click.
@@ -1286,11 +1286,12 @@ HView = HClass.extend({
1286
1286
  // Remove this object's bindings, except the DOM element.
1287
1287
  this.remove();
1288
1288
  // Remove the DOM element bindings.
1289
- for ( i = 0; i < this._domElementBindings.length; i++) {
1290
- ELEM.del(this._domElementBindings[i]);
1289
+ if( this._domElementBindings ){
1290
+ for ( i = 0; i < this._domElementBindings.length; i++) {
1291
+ ELEM.del(this._domElementBindings.pop());
1292
+ }
1293
+ // this._domElementBindings = [];
1291
1294
  }
1292
- this._domElementBindings = [];
1293
-
1294
1295
 
1295
1296
  // Remove the DOM object itself
1296
1297
  ELEM.del(this.elemId);
@@ -102,7 +102,7 @@ HMiniMenu = HRadioButtonList.extend({
102
102
  this.valueMatrix = null;
103
103
  var _menuItemView = this.menuItemView;
104
104
  this.base();
105
- _menuItemView.die();
105
+ _menuItemView && _menuItemView.die();
106
106
  },
107
107
 
108
108
  drawSubviews: function(){
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsence-pre
3
3
  version: !ruby/object:Gem::Version
4
- hash: 123
4
+ hash: 121
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 2
9
9
  - 0
10
- - 2
11
- version: 2.2.0.2
10
+ - 3
11
+ version: 2.2.0.3
12
12
  platform: ruby
13
13
  authors:
14
14
  - Riassence Inc.
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-03-11 00:00:00 +02:00
19
+ date: 2011-03-29 00:00:00 +03:00
20
20
  default_executable: rsence-pre
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency