rsence-pre 2.3.0.1 → 2.3.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.0.1.pre
1
+ 2.3.0.2.pre
data/js/comm/comm.js CHANGED
@@ -164,7 +164,7 @@ COMM = {
164
164
  _this.options = _options;
165
165
  _this.X = _comm._XMLHttpRequest();
166
166
  if(_method === 'GET' && _params.length !== 0){
167
- _url += ((_url.indexOf('?')!==-1)?'&':'?')+_comm._arrayToQueryString(_params);
167
+ _url += (~_url.indexOf('?')?'&':'?')+_comm._arrayToQueryString(_params);
168
168
  }
169
169
  if(!_async){
170
170
  console.log(
@@ -66,7 +66,7 @@ COMM.JSLoader = HClass.extend({
66
66
  var
67
67
  _this = this,
68
68
  _url = _this._formatUrl( _jsName );
69
- if((_this._loadedJS.indexOf(_url)!==-1)) {
69
+ if(~_this._loadedJS.indexOf(_url)) {
70
70
  return;
71
71
  }
72
72
  // console.log('jsLoader load:',_url);
@@ -52,7 +52,7 @@ COMM.URLResponder = HApplication.extend({
52
52
  // - callBack is the component registered
53
53
  delResponder: function(_matchStr,_callBack){
54
54
  _callBack.hide();
55
- if(this.prevCallBacks.indexOf(_callBack) !== -1){
55
+ if(~this.prevCallBacks.indexOf(_callBack)){
56
56
  this.prevCallBacks.splice(this.prevCallBacks.indexOf(_callBack),1);
57
57
  this.prevMatchStrs.splice(this.prevMatchStrs.indexOf(_matchStr),1);
58
58
  }
@@ -87,7 +87,7 @@ COMM.URLResponder = HApplication.extend({
87
87
 
88
88
  // Checks the matchStr agains regular expressions
89
89
  checkMatch: function(_matchStr){
90
- if(this.prevMatchStrs.indexOf( _matchStr ) !== -1 ){
90
+ if(~this.prevMatchStrs.indexOf( _matchStr )){
91
91
  return 0;
92
92
  }
93
93
  var i=0, _urlMatch, _urlCallBacks=[], _urlCallBack;
@@ -101,14 +101,14 @@ COMM.URLResponder = HApplication.extend({
101
101
  for(i=0;i<_urlCallBacks.length;i++){
102
102
  _urlCallBack = _urlCallBacks[i];
103
103
  _urlCallBack.show();
104
- if(this.prevMatchStrs.indexOf(_matchStr)!==-1){
104
+ if(~this.prevMatchStrs.indexOf(_matchStr)){
105
105
  this.prevMatchStrs.push( _matchStr );
106
106
  }
107
107
  }
108
108
  var _prevCallBack;
109
109
  for(i=0;i<this.prevCallBacks.length;i++){
110
110
  _prevCallBack = this.prevCallBacks[i];
111
- if(_urlCallBacks.indexOf(_prevCallBack) === -1){
111
+ if(!~_urlCallBacks.indexOf(_prevCallBack)){
112
112
  this.prevCallBacks[i].hide();
113
113
  }
114
114
  }
@@ -114,7 +114,7 @@ COMM.Values = HClass.extend({
114
114
  **/
115
115
  changed: function(_value){
116
116
  var _this = this;
117
- if(_this.tosync.indexOf(_value.id)===-1){
117
+ if(!~_this.tosync.indexOf(_value.id)){
118
118
  _this.tosync.push(_value.id);
119
119
  var _transporter = COMM.Transporter;
120
120
  if(!_transporter.busy){
@@ -156,7 +156,7 @@ COMM.Values = HClass.extend({
156
156
  return '-';
157
157
  }
158
158
  var _type = (typeof _obj).slice(0,1);
159
- if(this._builtins.indexOf(_type)!==-1){
159
+ if(~this._builtins.indexOf(_type)){
160
160
  return _type;
161
161
  }
162
162
  else if(_type==='o'){
@@ -24,6 +24,10 @@ var//RSence.Controls
24
24
  HSheet = HControl.extend({
25
25
 
26
26
  componentName: 'sheet',
27
+
28
+ defaultEvents: {
29
+ resize: true
30
+ },
27
31
 
28
32
  /** = Description
29
33
  * Shows of hides HSheet depending on the value.
@@ -39,62 +43,104 @@ HSheet = HControl.extend({
39
43
  this.hide();
40
44
  }
41
45
  },
42
-
46
+
43
47
  /** = Description
44
48
  * Draws the sheet rectangle once it has been created and
45
49
  * if it has not been set as hidden by constructor.
46
50
  *
47
51
  * = Returns
48
52
  * +self+
49
-
50
53
  **/
51
- drawRect: function() {
52
- if (this.parent && this.rect.isValid) {
53
- var
54
- _this = this,
55
- _elemId = _this.elemId,
56
- _rect = _this.rect,
57
- _width = _rect.width,
58
- _top = _rect.top,
59
- _left = 0-Math.floor(_rect.width/2)+_rect.left,
60
- _height = _rect.height,
61
- _styles = [
62
- 'left', '0px',
63
- 'top', '0px',
64
- 'right', '0px',
65
- 'bottom', '0px',
66
- 'width', 'auto',
67
- 'height', 'auto',
68
- 'min-width', _width+'px',
69
- 'min-height', _height+'px'
70
- ],
71
- i = 0, _len;
72
- for( _len = _styles.length; i < _len; i+=2 ){
73
- ELEM.setStyle( _elemId, _styles[i], _styles[i+1] );
74
- }
75
- if(_this['markupElemIds']){
76
- var _stateId = _this.markupElemIds['state'];
77
- _styles = [
78
- 'left', _left+'px',
79
- 'top', _top+'px',
80
- 'width', _width+'px',
81
- 'height', _height+'px'
82
- ];
83
- i = 0;
84
- for( _len = _styles.length; i < _len; i+=2 ){
85
- ELEM.setStyle( _stateId, _styles[i], _styles[i+1] );
86
- }
87
- }
88
- //-- Show the rectangle once it gets created, unless visibility was set to++
89
- //-- hidden in the constructor.++
90
- if(undefined === _this.isHidden || _this.isHidden === false) {
91
- ELEM.setStyle( _elemId, 'visibility', 'inherit');
92
- }
93
- ELEM.setStyle( _elemId, 'display', 'block');
94
- _this._updateZIndex();
95
- _this.drawn = true;
96
- }
97
- return this;
54
+ // drawRect: function() {
55
+ // if (this.parent && this.rect.isValid) {
56
+ // var
57
+ // _this = this,
58
+ // _elemId = _this.elemId,
59
+ // _rect = _this.rect,
60
+ // _width = _rect.width,
61
+ // _top = _rect.top,
62
+ // _left = 0-Math.floor(_rect.width/2)+_rect.left,
63
+ // _height = _rect.height,
64
+ // _styles = [
65
+ // 'left', '0px',
66
+ // 'top', '0px',
67
+ // 'right', '0px',
68
+ // 'bottom', '0px',
69
+ // 'width', 'auto',
70
+ // 'height', 'auto',
71
+ // 'min-width', _width+'px',
72
+ // 'min-height', _height+'px'
73
+ // ],
74
+ // i = 0, _len;
75
+ // for( _len = _styles.length; i < _len; i+=2 ){
76
+ // ELEM.setStyle( _elemId, _styles[i], _styles[i+1] );
77
+ // }
78
+ // if(_this['markupElemIds']){
79
+ // var _stateId = _this.markupElemIds['state'];
80
+ // _styles = [
81
+ // 'left', _left+'px',
82
+ // 'top', _top+'px',
83
+ // 'width', _width+'px',
84
+ // 'height', _height+'px'
85
+ // ];
86
+ // i = 0;
87
+ // for( _len = _styles.length; i < _len; i+=2 ){
88
+ // ELEM.setStyle( _stateId, _styles[i], _styles[i+1] );
89
+ // }
90
+ // }
91
+ // //-- Show the rectangle once it gets created, unless visibility was set to++
92
+ // //-- hidden in the constructor.++
93
+ // if(undefined === _this.isHidden || _this.isHidden === false) {
94
+ // ELEM.setStyle( _elemId, 'visibility', 'inherit');
95
+ // }
96
+ // ELEM.setStyle( _elemId, 'display', 'block');
97
+ // _this._updateZIndex();
98
+ // _this.drawn = true;
99
+ // }
100
+ // return this;
101
+ // },
102
+
103
+ drawSubviews: function(){
104
+ this.setStyle('overflow','visible');
105
+ // var _dimmerElem = ELEM.make(this.elemId);
106
+ // ELEM.addClassName( _dimmerElem, 'sheet_dimmer' );
107
+ // this._dimmerElem = _dimmerElem;
108
+ this.centerRect();
109
+ },
110
+
111
+ // die: function(){
112
+ // ELEM.del( this._dimmerElem );
113
+ // this.base();
114
+ // },
115
+ markupElemNames: [ 'dimmer', 'state', 'subview' ],
116
+
117
+ centerRect: function(){
118
+ // console.log('centerRect');
119
+
120
+ // console.log('parentSize:',ELEM.getVisibleSize( this.parent.elemId ));
121
+ var
122
+ _parentElemId = this.parent.elemId,
123
+ _parentSize = _parentElemId===0?ELEM.windowSize():ELEM.getVisibleSize( this.parent.elemId ),
124
+ _parentWidth = _parentSize[0],
125
+ _parentHeight = _parentSize[1],
126
+ _rect = this.rect,
127
+ _centerLeft = Math.round(_parentWidth*0.5-_rect.width*0.5),
128
+ _centerTop = 0,//Math.round(_parentHeight/2-_rect.height/2);
129
+ _dimmerLeft = 0-_centerLeft,
130
+ _dimmerTop = 0-_centerTop;
131
+ this.rect.offsetTo( _centerLeft, _centerTop );
132
+ this.setStyleOfPart('dimmer','left',_dimmerLeft+'px');
133
+ this.setStyleOfPart('dimmer','top',_dimmerTop+'px');
134
+ this.setStyleOfPart('dimmer','width',_parentWidth+'px');
135
+ this.setStyleOfPart('dimmer','height',_parentHeight+'px');
136
+ // console.log('zIndex:',ELEM.getStyle(this.elemId,'zIndex',true));
137
+ // ELEM.setStyle(this._dimmerElem,'zIndex',ELEM.getStyle(this.elemId,'zIndex')-1);
138
+ },
139
+
140
+ resize: function(){
141
+ this.centerRect();
142
+ this.base();
98
143
  }
144
+
99
145
  });
100
146
 
@@ -1,7 +1,7 @@
1
1
  .sheet_bg,
2
2
  .sheet_body,
3
3
  .sheet_dimmer,
4
- .sheet_center,
4
+ /*.sheet_center,*/
5
5
  .sheet_content,
6
6
  .sheet_body_edge_left,
7
7
  .sheet_body_edge_right,
@@ -16,49 +16,53 @@
16
16
  background-repeat: no-repeat;
17
17
  }
18
18
  .sheet_dimmer {
19
- top: 0px; left: 0px; right: 0px; bottom: 0px;
19
+ top: 0; left: 0; right: 0; bottom: 0;
20
20
  background-repeat: repeat;
21
21
  background-image: #{this.getCssFilePath('sheet_dim.png')};
22
22
  }
23
- .sheet_center {
24
- top: 0px; left: 50%; overflow: visible; width: 0px; height: 0px;
23
+ /*.sheet_center {
24
+ top: 0; left: 50%; overflow: visible; width: 0; height: 0;
25
+ }
26
+ */
27
+ .sheet_content {
28
+ top: 0; left: -2px; right: -2px; bottom: -2px; overflow: visible;
25
29
  }
26
30
  .sheet_bg {
27
- left: 24px; top: 0px; right: 24px; bottom: 24px;
31
+ left: 24px; top: 0; right: 24px; bottom: 24px;
28
32
  background-repeat: repeat;
29
33
  background-image: #{this.getCssFilePath('sheet_bg.png')};
30
34
  }
31
35
  .sheet_body {
32
- left: 0px; top: 0px; right: 0px; bottom: 0px;
36
+ left: 0; top: 0; right: 0; bottom: 0; overflow: visible;
33
37
  }
34
- .sheet_body * {
38
+ .sheet_body > * {
35
39
  background-image: #{this.getCssFilePath('sheet_parts1.png')};
36
40
  }
37
41
  .sheet_body_edge_left {
38
- left: 0px; top: 0px; bottom: 24px; width: 24px;
42
+ left: 0; top: 0; bottom: 24px; width: 24px;
39
43
  background-repeat: repeat-y;
40
- background-position: -48px 0px;
44
+ background-position: -48px 0;
41
45
  }
42
46
  .sheet_body_edge_right {
43
- right: 0px; top: 0px; bottom: 24px; width: 24px;
47
+ right: 0; top: 0; bottom: 24px; width: 24px;
44
48
  background-repeat: repeat-y;
45
- background-position: -72px 0px;
49
+ background-position: -72px 0;
46
50
  }
47
51
  .sheet_body_corner_left {
48
- left: 0px; bottom: 0px; height: 24px; width: 24px;
49
- background-position: 0px 0px;
52
+ left: 0; bottom: 0; height: 24px; width: 24px;
53
+ background-position: 0 0;
50
54
  }
51
55
  .sheet_body_corner_right {
52
- right: 0px; bottom: 0px; height: 24px; width: 24px;
53
- background-position: -24px 0px;
56
+ right: 0; bottom: 0; height: 24px; width: 24px;
57
+ background-position: -24px 0;
54
58
  }
55
59
  .sheet_body_edge_bottom {
56
- left: 24px; bottom: 0px; right: 24px; height: 24px;
60
+ left: 24px; bottom: 0; right: 24px; height: 24px;
57
61
  background-repeat: repeat-x;
58
- background-position: 0px 0px;
62
+ background-position: 0 0;
59
63
  background-image: #{this.getCssFilePath('sheet_parts2.png')};
60
64
  }
61
65
  .sheet_subview {
62
- left: 2px; top: 0px; right: 2px; bottom: 2px;
66
+ left: 2px; top: 0; right: 2px; bottom: 2px;
63
67
  }
64
68
 
@@ -1,14 +1,12 @@
1
- <div class="sheet_dimmer"></div>
2
- <div class="sheet_center">
3
- <div class="sheet_content" id="state#{_ID}">
4
- <div class="sheet_bg"></div>
5
- <div class="sheet_body">
6
- <div class="sheet_body_edge_left"></div>
7
- <div class="sheet_body_edge_right"></div>
8
- <div class="sheet_body_edge_bottom"></div>
9
- <div class="sheet_body_corner_left"></div>
10
- <div class="sheet_body_corner_right"></div>
11
- </div>
12
- <div class="sheet_subview" id="subview#{_ID}"></div>
1
+ <div class="sheet_dimmer" id="dimmer#{_ID}"></div>
2
+ <div class="sheet_content" id="state#{_ID}">
3
+ <div class="sheet_bg"></div>
4
+ <div class="sheet_body">
5
+ <div class="sheet_body_edge_left"></div>
6
+ <div class="sheet_body_edge_right"></div>
7
+ <div class="sheet_body_edge_bottom"></div>
8
+ <div class="sheet_body_corner_left"></div>
9
+ <div class="sheet_body_corner_right"></div>
13
10
  </div>
11
+ <div class="sheet_subview" id="subview#{_ID}"></div>
14
12
  </div>
@@ -117,14 +117,14 @@ HTab = HControl.extend({
117
117
  if(_tabIdx instanceof HTabView){
118
118
  _tabIdx = _tabIdx.tabIndex;
119
119
  }
120
- if(this.selectIdx!==-1){
120
+ if(~this.selectIdx){
121
121
  var _tabSelectElemId = this.tabLabels[this.selectIdx],
122
122
  _tabSelectViewId = this.tabs[this.selectIdx];
123
123
  ELEM.delClassName(_tabSelectElemId,'item-fg');
124
124
  ELEM.addClassName(_tabSelectElemId,'item-bg');
125
125
  HSystem.views[_tabSelectViewId].hide();
126
126
  }
127
- if(_tabIdx!==-1){
127
+ if(~_tabIdx){
128
128
  var _tabLabelElemId = this.tabLabels[_tabIdx],
129
129
  _tabViewId = this.tabs[_tabIdx];
130
130
  ELEM.delClassName(_tabLabelElemId,'item-bg');
@@ -281,7 +281,7 @@ HTab = HControl.extend({
281
281
  var//RSence.Controls
282
282
  HTabItem = {
283
283
  nu: function(_rect, _parent, _options){
284
- if( _rect.hasAncestor && _rect.hasAncestor( HView ) ){
284
+ if( _rect && _rect.hasAncestor && _rect.hasAncestor( HView ) ){
285
285
  _options = _parent;
286
286
  _parent = _rect;
287
287
  }
@@ -289,6 +289,9 @@ HTabItem = {
289
289
  console.warn && console.warn( "Warning: the rect constructor argument of HTabItem is deprecated." );
290
290
  }
291
291
  return _parent.addTab( _options.label, _options.select );
292
+ },
293
+ 'new': function(_rect, _parent, _options){
294
+ return this.nu(_rect,_parent,_options);
292
295
  }
293
296
  };
294
297
 
@@ -270,7 +270,7 @@ HTextControl = HControl.extend({
270
270
  _marker = this._randomMarker();
271
271
 
272
272
  // re-generate marker if it's found in the text.
273
- while( _origValue.indexOf( _marker ) !== -1){
273
+ while( ~_origValue.indexOf( _marker ) ){
274
274
  _marker = this._randomMarker();
275
275
  }
276
276
 
@@ -93,7 +93,7 @@ HUploader = HControl.extend
93
93
 
94
94
  refreshValue: ->
95
95
  return unless typeof @value == 'string'
96
- return if @value.indexOf(':::') == -1
96
+ return unless ~@value.indexOf(':::')
97
97
  _stateAndKey = @value.split(':::')
98
98
  return unless _stateAndKey.length == 2
99
99
  @setUploadState(
@@ -133,7 +133,7 @@ HClass.prototype = {
133
133
  )( arguments );
134
134
  };
135
135
  this.hasAncestor = function( _obj ){
136
- return this.ancestors.indexOf( _obj ) !== -1;
136
+ return !!~this.ancestors.indexOf( _obj );
137
137
  };
138
138
  this['new'] = this.nu;
139
139
  return this;
@@ -134,7 +134,7 @@ ELEM = HClass.extend
134
134
  del: (_id)->
135
135
  _elem = @_elements[_id]
136
136
  i = @_elemTodo.indexOf( _id )
137
- @_elemTodo.splice( i, 1 ) unless i == -1
137
+ @_elemTodo.splice( i, 1 ) if ~i
138
138
  delete @_attrTodo[_id]
139
139
  delete @_styleCache[_id]
140
140
  delete @_attrCache[_id]
@@ -487,7 +487,7 @@ ELEM = HClass.extend
487
487
  if _reCache or _noCache
488
488
  _attrCache[_key] = _value
489
489
  unless _noCache
490
- _attrTodo.push( _key ) if _attrTodo.indexOf( _key ) == -1
490
+ _attrTodo.push( _key ) unless ~_attrTodo.indexOf( _key )
491
491
  unless @_elemTodoH[_id]
492
492
  @_elemTodo.push( _id )
493
493
  @_elemTodoH[ _id ] = true
@@ -504,7 +504,7 @@ ELEM = HClass.extend
504
504
  delete _attrCache[_key]
505
505
  @_elements[_id].removeAttribute( _key )
506
506
  _todoIndex = _attrTodo.indexOf( _key )
507
- _attrTodo.splice( _todoIndex, 1 ) unless _todoIndex == -1
507
+ _attrTodo.splice( _todoIndex, 1 ) if ~_todoIndex
508
508
  @_checkNeedFlush()
509
509
  true
510
510
 
@@ -514,7 +514,7 @@ ELEM = HClass.extend
514
514
  hasClassName: (_id, _className)->
515
515
  return null unless @_elements[_id]? # item is deleted
516
516
  _classNames = @_elements[_id].className.split(' ')
517
- return _classNames.indexOf( _className ) != -1
517
+ return !!~_classNames.indexOf( _className )
518
518
 
519
519
  ###
520
520
  Adds a named CSS className to the element
@@ -590,7 +590,7 @@ ELEM = HClass.extend
590
590
  catch e
591
591
  console.log('ie setstyle error:'+_key+', '+_value+', '+e)
592
592
  if BROWSER_TYPE.ie6
593
- unless iefix._traverseStyleProperties.indexOf(_key) == -1
593
+ if ~iefix._traverseStyleProperties.indexOf(_key)
594
594
  @_ieFixesNeeded = true
595
595
  null
596
596
 
@@ -620,7 +620,7 @@ ELEM = HClass.extend
620
620
  @_setElementStyle( _elem, _key, _value )
621
621
  else
622
622
  _styleTodo = @_styleTodo[_id]
623
- _styleTodo.push( _key ) if _styleTodo.indexOf( _key ) == -1
623
+ _styleTodo.push( _key ) unless ~_styleTodo.indexOf( _key )
624
624
  unless @_elemTodoH[_id]
625
625
  @_elemTodo.push( _id )
626
626
  @_elemTodoH[_id] = true
@@ -760,25 +760,25 @@ ELEM = HClass.extend
760
760
  _warmup: ->
761
761
  _ua = navigator.userAgent
762
762
  _browserType = BROWSER_TYPE
763
- _browserType.opera = _ua.indexOf('Opera') != -1
764
- _browserType.safari = _ua.indexOf('KHTML') != -1
765
- _browserType.symbian = _ua.indexOf('SymbianOS') != -1
766
- _browserType.chrome = _ua.indexOf('Chrome') != -1
763
+ _browserType.opera = !!~_ua.indexOf('Opera')
764
+ _browserType.safari = !!~_ua.indexOf('KHTML')
765
+ _browserType.symbian = !!~_ua.indexOf('SymbianOS')
766
+ _browserType.chrome = !!~_ua.indexOf('Chrome')
767
767
  _isIE = document.all and not _browserType.opera
768
768
  if _isIE
769
769
  _browserType.ie = _isIE
770
- _browserType.ie6 = _ua.indexOf('MSIE 6') != -1
771
- _browserType.ie7 = _ua.indexOf('MSIE 7') != -1
772
- _browserType.ie8 = _ua.indexOf('MSIE 8') != -1
773
- _browserType.ie9 = _ua.indexOf('MSIE 9') != -1
774
- _browserType.ie10 = _ua.indexOf('MSIE 10') != -1
770
+ _browserType.ie6 = !!~_ua.indexOf('MSIE 6')
771
+ _browserType.ie7 = !!~_ua.indexOf('MSIE 7')
772
+ _browserType.ie8 = !!~_ua.indexOf('MSIE 8')
773
+ _browserType.ie9 = !!~_ua.indexOf('MSIE 9')
774
+ _browserType.ie10 = !!~_ua.indexOf('MSIE 10')
775
775
  unless _browserType.ie9
776
776
  _browserType.ie9 = _browserType.ie10 # IE 10 is treated like IE 9
777
- _browserType.mac = _ua.indexOf('Macintosh') != -1
778
- _browserType.win = _ua.indexOf('Windows') != -1
779
- _browserType.firefox = _ua.indexOf('Firefox') != -1
780
- _browserType.firefox2 = _ua.indexOf('Firefox/2.') != -1
781
- _browserType.firefox3 = _ua.indexOf('Firefox/3.') != -1
777
+ _browserType.mac = !!~_ua.indexOf('Macintosh')
778
+ _browserType.win = !!~_ua.indexOf('Windows')
779
+ _browserType.firefox = !!~_ua.indexOf('Firefox')
780
+ _browserType.firefox2 = !!~_ua.indexOf('Firefox/2.')
781
+ _browserType.firefox3 = !!~_ua.indexOf('Firefox/3.')
782
782
  _browserType.firefox4 = _browserType.firefox and not _browserType.firefox2 and not _browserType.firefox3
783
783
  @_domWaiter()
784
784
  null
@@ -195,7 +195,7 @@ iefix = {
195
195
  inlineStyleChanged: function(_element){
196
196
  var _this=iefix,
197
197
  _currentStyle=_element.currentStyle;
198
- if(_this._noStyleTagNames.indexOf(_element.tagName)!==-1){
198
+ if(~_this._noStyleTagNames.indexOf(_element.tagName)){
199
199
  return;
200
200
  }
201
201
  // check if element needs to be positioned from the right
@@ -315,7 +315,7 @@ iefix = {
315
315
  //iefix._traverseTree();
316
316
  //}
317
317
  else if(_propName.substring(0,6)==='style.'){
318
- if(iefix._traverseStyleProperties.indexOf(_propName.split('style.')[1])!==-1){
318
+ if(~iefix._traverseStyleProperties.indexOf(_propName.split('style.')[1])){
319
319
  //window.status = 'htcElementEntry: '+iefix._elemEntryCount+' style';
320
320
  iefix._traverseTree();
321
321
  }
@@ -619,8 +619,8 @@ HTimeSheet = HControl.extend({
619
619
  }
620
620
  var
621
621
  _isntSame = (i !== j),
622
- _isntListedSelf = (_overlaps.indexOf(i)===-1),
623
- _isntListedOther = (_overlaps.indexOf(j)===-1),
622
+ _isntListedSelf = (!~_overlaps.indexOf(i)),
623
+ _isntListedOther = (!~_overlaps.indexOf(j)),
624
624
  _rectOther = _items[j].rect;
625
625
  if( !_isntSame ){ return false; }
626
626
  if( !_isntListedSelf ){ return false; }
@@ -776,12 +776,12 @@ HTimeSheet = HControl.extend({
776
776
  _overlaps = [];
777
777
  for( j = 0; j < _itemCount; j++){
778
778
  if( this._doesOverlap( i, j, _overlaps, _testRect, _items ) ){
779
- if( _overlapCols.indexOf( k ) === -1 ){
779
+ if( !~_overlapCols.indexOf( k ) ){
780
780
  _overlapCols.push( k );
781
781
  }
782
782
  }
783
783
  }
784
- if( _vacantCols.indexOf( k ) === -1 && _overlapCols.indexOf( k ) === -1 ){
784
+ if( !~_vacantCols.indexOf( k ) && !~_overlapCols.indexOf( k ) ){
785
785
  _vacantCols.push( k );
786
786
  }
787
787
  }
@@ -449,7 +449,7 @@ HDynControl = HControl.extend({
449
449
  this._startPoint = new HPoint(x,y);
450
450
  this._startRect = new HRect( this.rect );
451
451
  this._detectActionFlag();
452
- if(this._actionFlag!==-1){
452
+ if(~this._actionFlag){
453
453
  this._actionFns[this._actionFlag](this,x,y);
454
454
  }
455
455
  return true; // prevents text selection
@@ -483,7 +483,7 @@ HDynControl = HControl.extend({
483
483
  x+=_scrollPos[0];
484
484
  y+=_scrollPos[1];
485
485
  }
486
- if(this._actionFlag!==-1){
486
+ if(~this._actionFlag){
487
487
  this._actionFns[this._actionFlag](this,x,y);
488
488
  }
489
489
  return true; // prevents text selection
@@ -518,7 +518,7 @@ HDynControl = HControl.extend({
518
518
  x+=_scrollPos[0];
519
519
  y+=_scrollPos[1];
520
520
  }
521
- if(this._actionFlag!==-1){
521
+ if(~this._actionFlag){
522
522
  this._actionFns[this._actionFlag](this,x,y);
523
523
  }
524
524
  this.setStyle('cursor','default');
@@ -9,6 +9,13 @@
9
9
  var
10
10
  HValueAction = HClass.extend({
11
11
  constructor: function( _rect, _parent, _options ){
12
+ if( _rect && _rect.hasAncestor && _rect.hasAncestor( HClass ) ){
13
+ _options = _parent;
14
+ _parent = _rect;
15
+ }
16
+ else {
17
+ console.warn && console.warn( "Warning: the rect constructor argument of HValueAction is deprecated:",_rect );
18
+ }
12
19
  this.parent = _parent;
13
20
  this.options = _options;
14
21
  if( _options.value ){
@@ -30,7 +37,7 @@ HValueAction = HClass.extend({
30
37
  HSystem.delView(this.viewId);
31
38
  this.parent.viewsZOrder.splice( _viewZIdx, 1 );
32
39
  var _sysUpdateZIndexOfChildrenBufferIndex = HSystem._updateZIndexOfChildrenBuffer.indexOf( this.viewId );
33
- if(_sysUpdateZIndexOfChildrenBufferIndex !== -1){
40
+ if(~_sysUpdateZIndexOfChildrenBufferIndex){
34
41
  HSystem._updateZIndexOfChildrenBuffer.splice( _sysUpdateZIndexOfChildrenBufferIndex, 1 );
35
42
  }
36
43
  this.parent = null;
@@ -92,14 +92,14 @@ HValueMatrix = HClass.extend({
92
92
  setValue: function(_index){
93
93
  if( _index !== this.value ){
94
94
  // Set the previous value object to false (reflects to its container component(s))
95
- if(this.value !== -1){
95
+ if(~this.value){
96
96
  if(this.ctrls[this.value]){
97
97
  this.ctrls[this.value].setValue(false);
98
98
  }
99
99
  }
100
100
  // Store the new index as the currently active value
101
101
  this.value = _index;
102
- if(_index !== -1){
102
+ if(~_index){
103
103
  // Set the new value object to true (reflects to its container component(s))
104
104
  if(_index<this.ctrls.length){
105
105
  this.ctrls[_index].setValue(true);
@@ -124,7 +124,7 @@ HValueMatrix = HClass.extend({
124
124
  **/
125
125
  release: function(_ctrl) {
126
126
  var _index = this.ctrls.indexOf(_ctrl);
127
- if(_index !== -1){
127
+ if(~_index){
128
128
  this.ctrls.splice( _index, 1 );
129
129
  if(_index === this.value){
130
130
  this.setValue(-1);
@@ -64,7 +64,7 @@ HValueResponder = HClass.extend({
64
64
  if(_value !== undefined && this['valueObj'] && this.valueDiffers(_value)) {
65
65
  var _valueManager = COMM.Values;
66
66
  this.value = _value;
67
- if( _valueManager._builtins.indexOf( _valueManager.type(_value) ) === -1 ){
67
+ if( !~_valueManager._builtins.indexOf( _valueManager.type(_value) ) ){
68
68
  this.valueObj.set( _valueManager.clone( _value ) );
69
69
  }
70
70
  else {