rsence-pre 3.0.0.8 → 3.0.0.9

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.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/client/conf/client_pkg.yaml +6 -2
  4. data/client/js/comm/queue/queue.js +32 -44
  5. data/client/js/comm/transporter/transporter.js +24 -16
  6. data/client/js/comm/values/values.js +27 -15
  7. data/client/js/controls/button/button.coffee +14 -5
  8. data/client/js/controls/button/themes/default/button.css +4 -2
  9. data/client/js/controls/checkbox/checkbox.js +4 -4
  10. data/client/js/controls/dialogs/sheet/sheet.js +11 -11
  11. data/client/js/controls/dialogs/sheet/themes/default/sheet.html +1 -1
  12. data/client/js/controls/imageview/imageview.js +15 -15
  13. data/client/js/controls/numerictextcontrol/numerictextcontrol.coffee +32 -10
  14. data/client/js/controls/onoffbutton/onoffbutton.coffee +5 -5
  15. data/client/js/controls/progress/progressbar/progressbar.js +6 -7
  16. data/client/js/controls/progress/progressbar/themes/default/progressbar.css +4 -4
  17. data/client/js/controls/progress/progressbar/themes/default/progressbar.html +1 -2
  18. data/client/js/controls/sliders/slider/slider.js +74 -79
  19. data/client/js/controls/stepper/stepper.js +31 -31
  20. data/client/js/controls/stringview/stringview.js +20 -8
  21. data/client/js/controls/tab/tab.js +57 -63
  22. data/client/js/controls/tab/themes/default/tab.html +4 -1
  23. data/client/js/controls/textcontrol/textcontrol.coffee +13 -3
  24. data/client/js/controls/validatorview/validatorview.js +4 -4
  25. data/client/js/controls/window/window.js +43 -56
  26. data/client/js/core/class/class.js +25 -23
  27. data/client/js/core/elem/elem.coffee +8 -1
  28. data/client/js/core/rsence_ns/rsence_ns.coffee +6 -2
  29. data/client/js/core/util/util_methods/util_methods.coffee +57 -15
  30. data/client/js/datetime/calendar/calendar.coffee +196 -199
  31. data/client/js/datetime/calendar/themes/default/calendar.css +81 -159
  32. data/client/js/datetime/calendar/themes/default/calendar.html +9 -18
  33. data/client/js/datetime/datepicker/datepicker.coffee +18 -3
  34. data/client/js/datetime/datetimepicker/datetimepicker.coffee +6 -1
  35. data/client/js/datetime/datetimevalue/datetimevalue.coffee +194 -0
  36. data/client/js/datetime/momentjs/momentjs.js +310 -76
  37. data/client/js/datetime/timepicker/timepicker.coffee +6 -1
  38. data/client/js/datetime/timesheet/timesheet.js +59 -61
  39. data/client/js/foundation/control/control.js +45 -44
  40. data/client/js/foundation/control/controldefaults/controldefaults.js +13 -9
  41. data/client/js/foundation/control/dyncontrol/dyncontrol.js +45 -57
  42. data/client/js/foundation/control/eventresponder/eventresponder.js +97 -97
  43. data/client/js/foundation/control/valuematrix/valuematrix.js +13 -13
  44. data/client/js/foundation/eventmanager/eventmanager.coffee +50 -32
  45. data/client/js/foundation/geom/rect/rect.js +43 -32
  46. data/client/js/foundation/locale_settings/locale_settings.js +36 -25
  47. data/client/js/foundation/system/system.js +79 -67
  48. data/client/js/foundation/thememanager/thememanager.coffee +11 -1
  49. data/client/js/foundation/value/pullvalue/pullvalue.coffee +7 -0
  50. data/client/js/foundation/value/pushvalue/pushvalue.coffee +25 -0
  51. data/client/js/foundation/value/value.js +22 -15
  52. data/client/js/foundation/view/view.js +94 -55
  53. data/client/js/foundation/view/viewdefaults/viewdefaults.js +5 -1
  54. data/client/js/lists/listitems/listitems.js +26 -4
  55. data/client/js/menus/combobox/combobox.coffee +55 -0
  56. data/client/js/menus/minimenu/minimenu.js +61 -30
  57. data/client/js/menus/minimenu/themes/default/minimenu.css +1 -6
  58. data/client/js/menus/minimenu/themes/default/minimenu.html +5 -4
  59. data/client/js/menus/minimenuitem/minimenuitem.js +6 -6
  60. data/client/js/menus/popupmenu/themes/default/popupmenu.css +1 -6
  61. data/client/js/menus/popupmenu/themes/default/popupmenu.html +5 -4
  62. data/client/js/tables/table/table.coffee +109 -64
  63. data/client/js/tables/table/themes/default/table.css +4 -0
  64. data/lib/rsence/msg.rb +64 -64
  65. data/lib/rsence/plugins/plugin.rb +68 -52
  66. data/lib/rsence/session/sequel_sessionstorage.rb +5 -5
  67. data/lib/rsence/value.rb +79 -59
  68. data/plugins/client_pkg/lib/client_pkg_build.rb +5 -1
  69. data/plugins/client_pkg/lib/client_pkg_serve.rb +40 -32
  70. data/plugins/main/js/main.js +46 -28
  71. metadata +6 -8
  72. data/client/js/datetime/calendar/themes/default/calendar_arrows.png +0 -0
  73. data/client/js/datetime/calendar/themes/default/calendar_bg.png +0 -0
  74. data/client/js/datetime/calendar/themes/default/calendar_parts1.png +0 -0
  75. data/client/js/datetime/calendar/themes/default/calendar_parts2.png +0 -0
  76. data/client/js/datetime/datetimepicker/datetimepicker.js +0 -210
  77. data/client/js/datetime/datetimevalue/datetimevalue.js +0 -265
@@ -1,7 +1,12 @@
1
1
  HTimePicker = HDatePicker.extend
2
2
  controlDefaults: HDatePicker.prototype.controlDefaults.extend
3
- fieldFormat: 'HH:mm:ss'
3
+ fieldFormat: null
4
4
  refreshAfter: 3
5
5
  preserveTime: false
6
6
  preserveDate: true
7
7
  calendarPicker: false
8
+ scrollUnit: 'minutes'
9
+ customOptions: (_options)->
10
+ _options.fieldFormat = HLocale.dateTime.strings.timeFormat if _options.fieldFormat == null
11
+ @base(_options)
12
+ _options.calendarPicker = false # always enforce the picker false on HTimePicker
@@ -8,22 +8,21 @@ HLocale.components.HTimeSheet = {
8
8
 
9
9
  var//RSence.DateTime
10
10
  HTimeSheet = HControl.extend({
11
-
11
+
12
12
  debug: false,
13
-
14
- localeStrings: HLocale.components.HTimeSheet.strings,
13
+
15
14
  componentName: 'timesheet',
16
15
  markupElemNames: [
17
16
  'label', 'value', 'timeline'
18
17
  ],
19
-
18
+
20
19
  defaultEvents: {
21
20
  draggable: true,
22
21
  click: true,
23
22
  doubleClick: true,
24
23
  resize: true
25
24
  },
26
-
25
+
27
26
  controlDefaults: HControlDefaults.extend({
28
27
  timeStart: 0, // 1970-01-01 00:00:00
29
28
  timeEnd: 86399, // 1970-01-01 23:59:59
@@ -44,35 +43,40 @@ HTimeSheet = HControl.extend({
44
43
  allowDoubleClickCreate: true,
45
44
  minDragSize: 5, // minimum amount of pixels dragged required for accepting a drag
46
45
  hourOffsetTop: -4, // Theme settings; don't enter in options
47
- constructor: function( _ctrl ){
48
- if( this.defaultLabel === undefined ){
49
- this.defaultLabel = _ctrl.localeStrings.newItemLabel;
50
- }
46
+ dummyValue: {
47
+ label: '',
48
+ start: 0,
49
+ color: '#000000'
51
50
  }
52
51
  }),
53
-
52
+
53
+ customOptions: function( _options ){
54
+ this.localeStrings = HLocale.components.HTimeSheet.strings;
55
+ if( _options.defaultLabel === undefined ){ _options.defaultLabel = this.localeStrings.newItemLabel; }
56
+ },
57
+
54
58
  themeSettings: function( _itemOffsetLeft, _itemOffsetTop, _itemOffsetRight, _itemOffsetBottom, _hourOffsetTop ){
55
59
  if( this.options.hideHours ){
56
60
  ELEM.addClassName( this.elemId, 'nohours' );
57
61
  this.options.itemOffsetLeft = 0;
58
62
  }
59
63
  else if( _itemOffsetLeft !== undefined ) {
60
- this.options.itemOffsetLeft = _itemOffsetLeft;
64
+ this.options.itemOffsetLeft = _itemOffsetLeft;
61
65
  }
62
66
  if( _itemOffsetTop !== undefined ) {
63
- this.options.itemOffsetTop = _itemOffsetTop;
67
+ this.options.itemOffsetTop = _itemOffsetTop;
64
68
  }
65
69
  if( _itemOffsetRight !== undefined ) {
66
- this.options.itemOffsetRight = _itemOffsetRight;
70
+ this.options.itemOffsetRight = _itemOffsetRight;
67
71
  }
68
72
  if( _itemOffsetBottom !== undefined ) {
69
- this.options.itemOffsetBottom = _itemOffsetBottom;
73
+ this.options.itemOffsetBottom = _itemOffsetBottom;
70
74
  }
71
75
  if( _hourOffsetTop !== undefined ) {
72
- this.options.hourOffsetTop = _hourOffsetTop;
76
+ this.options.hourOffsetTop = _hourOffsetTop;
73
77
  }
74
78
  },
75
-
79
+
76
80
  autoLabel: function(){
77
81
  var
78
82
  _locale = HLocale.dateTime,
@@ -82,15 +86,15 @@ HTimeSheet = HControl.extend({
82
86
  this.refreshLabel();
83
87
  }
84
88
  },
85
-
89
+
86
90
  clearHours: function(){
87
91
  for( var i = 0; i < this.hourItems.length; i++ ){
88
92
  ELEM.del( this.hourItems[i] );
89
93
  }
90
94
  },
91
-
95
+
92
96
  drawHours: function(){
93
-
97
+
94
98
  var
95
99
  _parentElemId = this.markupElemIds.timeline,
96
100
  _dateStart = new Date( this.options.timeStart * 1000 ),
@@ -114,11 +118,11 @@ HTimeSheet = HControl.extend({
114
118
  _pxPerNotch = _pxPerHour / _notchesPerHour,
115
119
  _notchItem,
116
120
  _notchTop;
117
-
121
+
118
122
  ELEM.setStyle( _parentElemId, 'visibility', 'hidden', true );
119
-
123
+
120
124
  ELEM.setStyle( this.markupElemIds.value, 'bottom', _bottomPos+'px' );
121
-
125
+
122
126
  if( this['hourItems'] !== undefined ){
123
127
  this.clearHours();
124
128
  }
@@ -152,11 +156,11 @@ HTimeSheet = HControl.extend({
152
156
  this.hourItems.push( _notchItem );
153
157
  }
154
158
  }
155
-
159
+
156
160
  ELEM.setStyle( this.markupElemIds.timeline, 'visibility', 'inherit' );
157
-
161
+
158
162
  },
159
-
163
+
160
164
  // extra hook for refreshing; updates label and hours before doing common things
161
165
  refresh: function(){
162
166
  if( this.drawn ){
@@ -167,25 +171,25 @@ HTimeSheet = HControl.extend({
167
171
  }
168
172
  this.base();
169
173
  },
170
-
174
+
171
175
  // set the timezone offset (in seconds)
172
176
  setTzOffset: function( _tzOffset ){
173
177
  this.options.tzOffset = _tzOffset;
174
178
  this.refresh();
175
179
  },
176
-
180
+
177
181
  // set the start timestamp of the timesheet
178
182
  setTimeStart: function( _timeStart ){
179
183
  this.options.timeStart = _timeStart;
180
184
  this.refresh();
181
185
  },
182
-
186
+
183
187
  // set the end timestamp of the timesheet
184
188
  setTimeEnd: function( _timeEnd ){
185
189
  this.options.timeEnd = _timeEnd;
186
190
  this.refresh();
187
191
  },
188
-
192
+
189
193
  // sets the range of timestams of the timesheet
190
194
  setTimeRange: function( _timeRange ){
191
195
  if( (_timeRange instanceof Array) && (_timeRange.length === 2) ){
@@ -201,7 +205,7 @@ HTimeSheet = HControl.extend({
201
205
  this.setTimeEnd( _timeRange.timeEnd );
202
206
  }
203
207
  },
204
-
208
+
205
209
  // sets the timestamp of the timesheet
206
210
  setDate: function( _date ){
207
211
  var
@@ -213,21 +217,15 @@ HTimeSheet = HControl.extend({
213
217
  this.setTimeRange( _newTimeRange );
214
218
  this.refresh();
215
219
  },
216
-
220
+
217
221
  // draw decorations
218
222
  drawSubviews: function(){
219
223
  this.drawHours();
220
224
  var
221
225
  _options = this.options,
222
226
  _minDuration = Math.round(3600/_options.notchesPerHour),
223
- _dummyValue = {
224
- // id: 'new',
225
- label: '',
226
- start: 0,
227
- duration: _minDuration,
228
- // locked: false,
229
- color: '#cc0000'
230
- };
227
+ _dummyValue = HVM.clone( this.options.dummyValue );
228
+ _dummyValue['duration'] = _minDuration;
231
229
  this.dragPreviewRect = this.rectFromValue({start:_options.timeStart,duration:_minDuration});
232
230
  this.minDuration = _minDuration;
233
231
  this.dragPreview = HTimeSheetItem.nu(
@@ -241,7 +239,7 @@ HTimeSheet = HControl.extend({
241
239
  );
242
240
  this.dragPreview.setStyleOfPart('state','color','#fff');
243
241
  },
244
-
242
+
245
243
  // event listener for clicks, simulates double clicks in case of not double click aware browser
246
244
  click: function( x, y, b ){
247
245
  var
@@ -283,7 +281,7 @@ HTimeSheet = HControl.extend({
283
281
  this.prevClickTime = false;
284
282
  }
285
283
  },
286
-
284
+
287
285
  // creates an item on click
288
286
  clickCreate: function(x,y){
289
287
  var
@@ -299,7 +297,7 @@ HTimeSheet = HControl.extend({
299
297
  this.dragPreview.hide();
300
298
  }
301
299
  },
302
-
300
+
303
301
  // event listener for double clicks
304
302
  doubleClick: function(x,y){
305
303
  this.prevClickTime = false;
@@ -320,7 +318,7 @@ HTimeSheet = HControl.extend({
320
318
  }
321
319
  this.doubleClickSimCreated = false;
322
320
  },
323
-
321
+
324
322
  // update the preview area
325
323
  refreshDragPreview: function( _startTime, _endTime ){
326
324
  this.dragPreviewRect.setTop( this.timeToPx( _startTime, true ) );
@@ -333,7 +331,7 @@ HTimeSheet = HControl.extend({
333
331
  this.dragPreview.value.duration = _endTime - _startTime;
334
332
  this.dragPreview.refreshValue();
335
333
  },
336
-
334
+
337
335
  // drag & drop event listeners, used for dragging new timesheet items
338
336
  startDrag: function( x, y, b ){
339
337
  // console.log('st');
@@ -344,7 +342,7 @@ HTimeSheet = HControl.extend({
344
342
  this.dragPreview.show();
345
343
  return true;
346
344
  },
347
-
345
+
348
346
  drag: function( x, y, b ){
349
347
  // console.log('dr');
350
348
  var
@@ -362,7 +360,7 @@ HTimeSheet = HControl.extend({
362
360
  this.refreshDragPreview( _startTime, _endTime );
363
361
  return true;
364
362
  },
365
-
363
+
366
364
  endDrag: function( x, y, b ){
367
365
  // console.log('ed');
368
366
  var
@@ -392,7 +390,7 @@ HTimeSheet = HControl.extend({
392
390
  }
393
391
  return false;
394
392
  },
395
-
393
+
396
394
  // a resize triggers refresh, of which the important part is refreshValue, which triggers redraw of the time sheet items
397
395
  resize: function(){
398
396
  this.base();
@@ -437,12 +435,12 @@ HTimeSheet = HControl.extend({
437
435
  }
438
436
  return false;
439
437
  },
440
-
438
+
441
439
  /** = Description
442
440
  * Sets the editor given as parameter as the editor of instance.
443
441
  *
444
442
  * = Parameters
445
- * +_editor+::
443
+ * +_editor+::
446
444
  *
447
445
  **/
448
446
  setEditor: function( _editor ){
@@ -458,7 +456,7 @@ HTimeSheet = HControl.extend({
458
456
  this.editor = null;
459
457
  this.base();
460
458
  },
461
-
459
+
462
460
  // converts pixels to time
463
461
  pxToTime: function( _px, _noSnap ){
464
462
  var
@@ -487,23 +485,23 @@ HTimeSheet = HControl.extend({
487
485
 
488
486
  // converts time to pixels
489
487
  timeToPx: function( _time, _snap ){
490
-
488
+
491
489
  if( _snap ){
492
490
  _time = this.snapTime( _time );
493
491
  }
494
-
492
+
495
493
  var
496
494
  _options = this.options,
497
495
  _timeStart = _options.timeStart,
498
496
  _timeEnd = _options.timeEnd;
499
-
497
+
500
498
  if( _time < _timeStart ){
501
499
  _time = _timeStart;
502
500
  }
503
501
  if( _time > _timeEnd ){
504
502
  _time = _timeEnd;
505
503
  }
506
-
504
+
507
505
  var
508
506
  _timeRange = _timeEnd - _timeStart,
509
507
  _itemOptions = this.itemOptions,
@@ -567,7 +565,7 @@ HTimeSheet = HControl.extend({
567
565
 
568
566
  // calls createTimeSheetItem with each value of the timesheet value array
569
567
  drawTimeSheetItems: function(){
570
-
568
+
571
569
  var
572
570
  _data = this.value,
573
571
  i = 0,
@@ -635,11 +633,11 @@ HTimeSheet = HControl.extend({
635
633
  _overlaps = [],
636
634
  _testRects = this._getTestRects( _items ),
637
635
  i,j;
638
-
636
+
639
637
  for( i = 0; i < _items.length; i++){
640
638
  _overlaps[i] = 0;
641
639
  }
642
-
640
+
643
641
  for( i = 0; i < _items.length - 1; i++ ){
644
642
  for( j = i + 1; j < _items.length; j++ ){
645
643
  if( _items[i].rect.intersects( _testRects[j] ) ){
@@ -650,7 +648,7 @@ HTimeSheet = HControl.extend({
650
648
  }
651
649
  return Math.max.apply( Math, _overlaps );
652
650
  },
653
-
651
+
654
652
  _getTestRects: function( _items ){
655
653
  var _rects = [];
656
654
  for( var i = 0; i < _items.length; i++){
@@ -708,7 +706,7 @@ HTimeSheet = HControl.extend({
708
706
  _colWidth,
709
707
  _overlaps,
710
708
  _testRects;
711
-
709
+
712
710
  // No overlapping; nothing to do
713
711
  if( _overlapCount === 0 ){
714
712
  return false;
@@ -832,7 +830,7 @@ but not used and not guaranteed to be preserved:
832
830
  *
833
831
  **/
834
832
  refreshValue: function(){
835
-
833
+
836
834
  if(!this.itemOptions){
837
835
  return;
838
836
  }
@@ -850,5 +848,5 @@ but not used and not guaranteed to be preserved:
850
848
  this.drawTimeline();
851
849
  }
852
850
  }
853
-
851
+
854
852
  });
@@ -1,9 +1,9 @@
1
1
 
2
2
  /** = Description
3
- * The foundation class for all active visual components that
3
+ * The foundation class for all active visual components that
4
4
  * implement events and values.
5
- *
6
- * Extend +HControl+ to suit your needs. See any component
5
+ *
6
+ * Extend +HControl+ to suit your needs. See any component
7
7
  * for extension reference.
8
8
  *
9
9
  **/
@@ -11,55 +11,55 @@ var//RSence.Foundation
11
11
  HControl = HView.extend({
12
12
 
13
13
  isCtrl: true,
14
-
14
+
15
15
  /** A flag: when true, calls the +refreshValue+ method whenever
16
16
  * +self.value+ is changed.
17
17
  **/
18
18
  refreshOnValueChange: true,
19
-
19
+
20
20
  /** The event object structure that specifies which events to listen to.
21
21
  **/
22
22
  events: null,
23
-
23
+
24
24
  /** The enabled/disabled flag. See setEnabled.
25
25
  **/
26
26
  enabled: null,
27
-
27
+
28
28
  /** The current value of a component. See setValue.
29
29
  **/
30
30
  value: null,
31
-
31
+
32
32
  /** The current HValue compatible object. Do not set directly.
33
33
  * Holds reference to the bound HValue instance.
34
34
  * Set with HValue.bind.
35
35
  **/
36
36
  valueObj: null,
37
-
37
+
38
38
  /** The minimum numeric value allowed, when the component
39
39
  * utilizes value ranges. See setValueRange
40
40
  **/
41
41
  minValue: null,
42
-
42
+
43
43
  /** The maximum allowed value, when the component
44
44
  * utilizes value ranges. See setValueRange
45
45
  **/
46
46
  maxValue: null,
47
-
48
- /** A boolean value that shows whether this control is currently
47
+
48
+ /** A boolean value that shows whether this control is currently
49
49
  * active or not. Control gets active when the user clicks on it.
50
50
  **/
51
51
  active: null,
52
-
52
+
53
53
  /** -- Use this object to specify class-specific default settings. ++
54
54
  * The controlDefaults is a HControlDefaults object that is extended
55
55
  * in the constructor with the options block given. The format of
56
56
  * it is an Object.
57
57
  **/
58
58
  controlDefaults: HControlDefaults,
59
-
59
+
60
60
  /** = Description
61
- * The constructor of HControl implements the same model as HView,
62
- * but accepts a third parameter: the options object, that contain
61
+ * The constructor of HControl implements the same model as HView,
62
+ * but accepts a third parameter: the options object, that contain
63
63
  * optional properties, like the value and events.
64
64
  *
65
65
  * = Parameters
@@ -82,7 +82,7 @@ HControl = HView.extend({
82
82
  * points, like: +( left, top, right, bottom )+.
83
83
  * Arrays with 6 items are a bit more complex (and powerful) as they can specify
84
84
  * the flexible offsets too.
85
- *
85
+ *
86
86
  * === The array indexes for a +_rect+ configured as an 4-item array:
87
87
  * Always left/top aligned, all items must be specified.
88
88
  * Index:: Description
@@ -177,13 +177,13 @@ HControl = HView.extend({
177
177
  * +enabled+:: A Boolean value defining the initial enabled -state
178
178
  * of the component. Set to false to initially disable the
179
179
  * component. See setEnabled
180
- * +active+:: A Boolean value defining the initial active (clicked
180
+ * +active+:: A Boolean value defining the initial active (clicked
181
181
  * or focused) state of the component.
182
182
  * +minValue+:: A Number for components utilizing value ranges.
183
183
  * See setValueRange
184
184
  * +maxValue+:: A Number for components utilizing value ranges.
185
185
  * See setValueRange
186
- *
186
+ *
187
187
  *
188
188
  **/
189
189
  constructor: function(_rect, _parent, _options) {
@@ -191,9 +191,9 @@ HControl = HView.extend({
191
191
  _options = {};
192
192
  }
193
193
  var _this = this;
194
-
195
- _options = (_this.controlDefaults.extend(_options)).nu(this);
196
-
194
+
195
+ _options = (_this.controlDefaults.extend(_options)).nu(_this);
196
+
197
197
  if(_this.isinherited) {
198
198
  _this.base(_rect, _parent, _options);
199
199
  }
@@ -202,18 +202,18 @@ HControl = HView.extend({
202
202
  _this.base(_rect, _parent, _options);
203
203
  _this.isinherited = false;
204
204
  }
205
-
205
+
206
206
  var _isValueRange = (_options.minValue || _options.maxValue),
207
207
  _events = _options.events;
208
-
208
+
209
209
  if(_isValueRange) {
210
210
  _this.minValue = _options.minValue;
211
211
  _this.maxValue = _options.maxValue;
212
212
  }
213
-
213
+
214
214
  _this.setEvents(_events);
215
215
  _this.setEnabled(_options.enabled);
216
-
216
+
217
217
  // The traditional HValue instance to pass in options to be bound:
218
218
  if(_options.valueObj){
219
219
  _options.valueObj.bind(_this);
@@ -240,20 +240,21 @@ HControl = HView.extend({
240
240
  if(!_this.valueObj) {
241
241
  _this.valueObj = HDummyValue.nu();
242
242
  }
243
-
243
+
244
244
  if((_this.value===null)&&(_options.value!==undefined)) {
245
245
  _this.setValue(_options.value);
246
246
  }
247
247
  if(_isValueRange) {
248
248
  _this.setValueRange(this.value, _options.minValue, _options.maxValue);
249
249
  }
250
- if(!_this.isinherited) {
250
+ if(!this.isinherited && this.options.autoDraw) {
251
+ var _time = new Date().getTime();
251
252
  _this.draw();
252
253
  }
253
254
  },
254
-
255
+
255
256
  /** = Description
256
- * The destructor of +HControl+ instances.
257
+ * The destructor of +HControl+ instances.
257
258
  * Releases events and values before passing through to the base HView.die.
258
259
  * Extend it, you you allocate new instance members that need to be
259
260
  * deallocated upon destruction.
@@ -268,13 +269,13 @@ HControl = HView.extend({
268
269
  EVENT.unreg(_this);
269
270
  _this.base();
270
271
  },
271
-
272
+
272
273
  /** = Description
273
274
  * Assigns the object a new value range. Used for sliders, steppers etc. Calls
274
275
  * setValue with the value given.
275
276
  *
276
277
  * = Parameters
277
- * +_value+:: The new value to be set to the component's
278
+ * +_value+:: The new value to be set to the component's
278
279
  * HValue compatible instance.
279
280
  *
280
281
  * +_minValue+:: The new minimum value limit. See minValue.
@@ -295,7 +296,7 @@ HControl = HView.extend({
295
296
  }
296
297
  return this;
297
298
  },
298
-
299
+
299
300
  /** = Description
300
301
  * Called when the +self.value+ has been changed. By default
301
302
  * tries to update the value element defined in the theme of
@@ -314,14 +315,14 @@ HControl = HView.extend({
314
315
  }
315
316
  return this;
316
317
  },
317
-
318
+
318
319
  /** = Description
319
320
  * Called mostly internally whenever a property change requires usually visual
320
- * action. It's called by methods like setLabel and setValue.
321
- * Extends HView.refresh. The boolean properties refreshOnValueChange and
322
- * refreshOnLabelChange control whether refreshValue or refreshLabel
323
- * should be called. It's used as-is in most components. If you implement
324
- * your class extension with properties similar to value or label,
321
+ * action. It's called by methods like setLabel and setValue.
322
+ * Extends HView.refresh. The boolean properties refreshOnValueChange and
323
+ * refreshOnLabelChange control whether refreshValue or refreshLabel
324
+ * should be called. It's used as-is in most components. If you implement
325
+ * your class extension with properties similar to value or label,
325
326
  * you are advised to extend the refresh method.
326
327
  *
327
328
  * = Returns
@@ -340,19 +341,19 @@ HControl = HView.extend({
340
341
  },
341
342
 
342
343
  {
343
-
344
+
344
345
  // The CSS class name to set when the component is disabled
345
346
  CSS_DISABLED: "disabled",
346
-
347
+
347
348
  // The CSS class name to set when the component is selected
348
349
  CSS_SELECTED: "selected",
349
-
350
+
350
351
  // The CSS class name to set when the component is enabled
351
352
  CSS_ENABLED: "enabled",
352
-
353
+
353
354
  // The CSS class name to set when the component is active (clicked/focused)
354
355
  CSS_ACTIVE: "active"
355
-
356
+
356
357
  });
357
358
 
358
359
  HControl.implement( HValueResponder );
@@ -5,7 +5,11 @@
5
5
  ***/
6
6
  var//RSence.Foundation
7
7
  HControlDefaults = HClass.extend({
8
-
8
+
9
+ /** Whether or not to draw when constructed.
10
+ */
11
+ autoDraw: true,
12
+
9
13
  /** The default label. A label is the "visual value" of a component that
10
14
  * operates on a "hidden" value.
11
15
  **/
@@ -14,36 +18,36 @@ HControlDefaults = HClass.extend({
14
18
  /** The default initial visibility of the component.
15
19
  **/
16
20
  visible: true,
17
-
21
+
18
22
  /** The default initial event responders to register to a component.
19
23
  * By default no events are enabled.
20
24
  **/
21
25
  events: null,
22
-
26
+
23
27
  constructor: function(){
24
28
  if(!this.events){
25
29
  this.events = {};
26
30
  }
27
31
  },
28
-
32
+
29
33
  /** The default initial value of the component.
30
34
  **/
31
35
  value: 0,
32
-
36
+
33
37
  /** The default initial enabled state of the component.
34
38
  **/
35
39
  enabled: true,
36
-
40
+
37
41
  /** The default initial active state of the component.
38
42
  **/
39
43
  active: false,
40
-
44
+
41
45
  /** The default initial minimum value of the component.
42
46
  **/
43
47
  minValue: -2147483648,
44
-
48
+
45
49
  /** The default initial maximum value of the component.
46
50
  **/
47
51
  maxValue: 2147483648
48
-
52
+
49
53
  });