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
@@ -16,17 +16,17 @@
16
16
  ***/
17
17
  var//RSence.Foundation
18
18
  HDynControl = HControl.extend({
19
-
19
+
20
20
  preserveTheme: true,
21
-
21
+
22
22
  defaultEvents: {
23
23
  draggable: true
24
24
  },
25
-
25
+
26
26
  /** = Description
27
27
  * In addition to the standard HControl#constructor options,
28
28
  * the following properties can be set:
29
- *
29
+ *
30
30
  * Key:: Description
31
31
  * +minX+:: The minimum X-coordinate allowed to be dragged or resized to.
32
32
  * Defaults to +0+.
@@ -58,36 +58,7 @@ HDynControl = HControl.extend({
58
58
  * moving.
59
59
  *
60
60
  **/
61
- controlDefaults: (HControlDefaults.extend({
62
- constructor: function(_ctrl){
63
- var _winSize = ELEM.windowSize(),
64
- _winWidth = _winSize[0],
65
- _winHeight = _winSize[1];
66
- if(!this.minSize){
67
- this.minSize = [24,54];
68
- }
69
- if(!this.maxSize){
70
- this.maxSize = _winSize;
71
- }
72
- if(!this.maxX){
73
- this.maxX = _winWidth-this.minSize[0];
74
- }
75
- if(!this.maxY){
76
- this.maxY = _winHeight-this.minSize[1];
77
- }
78
- if(!this.resizeNW){
79
- this.resizeNW = [ 1, 1 ];
80
- }
81
- if(!this.resizeNE){
82
- this.resizeNE = [ 1, 1 ];
83
- }
84
- if(!this.resizeSW){
85
- this.resizeSW = [ 1, 1 ];
86
- }
87
- if(!this.resizeSE){
88
- this.resizeSE = [ 1, 1 ];
89
- }
90
- },
61
+ controlDefaults: HControlDefaults.extend({
91
62
  minX: 0,
92
63
  minY: 0,
93
64
  maxX: null,
@@ -103,14 +74,31 @@ HDynControl = HControl.extend({
103
74
  resizeSW: null,
104
75
  resizeSE: null,
105
76
  noResize: false
106
- })),
107
-
77
+ }),
78
+
79
+ customOptions: function(_options){
80
+ var
81
+ _winSize = ELEM.windowSize(),
82
+ _winWidth = _winSize[0],
83
+ _winHeight = _winSize[1];
84
+ if(!_options.minSize){ _options.minSize = [24,54]; }
85
+
86
+ if(!_options.maxSize){ _options.maxSize = _winSize; }
87
+ if(!_options.maxX ){ _options.maxX = _winWidth-_options.minSize[0]; }
88
+ if(!_options.maxY ){ _options.maxY = _winHeight-_options.minSize[1]; }
89
+
90
+ if(!_options.resizeNW){ _options.resizeNW = [ 1, 1 ]; }
91
+ if(!_options.resizeNE){ _options.resizeNE = [ 1, 1 ]; }
92
+ if(!_options.resizeSW){ _options.resizeSW = [ 1, 1 ]; }
93
+ if(!_options.resizeSE){ _options.resizeSE = [ 1, 1 ]; }
94
+ },
95
+
108
96
  draw: function(){
109
97
  this.base();
110
98
  this._initActionFns();
111
99
  this._initActionFlag();
112
100
  },
113
-
101
+
114
102
  /* Method for checking the change is within the limits */
115
103
  _checkConstraints: function(_leftChange,_topChange){
116
104
  var _this = this, _rect = _this.rect,
@@ -158,12 +146,12 @@ HDynControl = HControl.extend({
158
146
  }
159
147
  _this.drawRect();
160
148
  },
161
-
149
+
162
150
  /* Method for returning the coordinate difference as a HPoint instance */
163
151
  _diffPoint: function(x,y){
164
152
  return this._startPoint.subtract(x,y);
165
153
  },
166
-
154
+
167
155
  /** = Description
168
156
  * Sub-event method responder when the north-west (left-top) corner is being
169
157
  * moved to resize the view.
@@ -181,7 +169,7 @@ HDynControl = HControl.extend({
181
169
  _this.rect.setLeftTop(_this._startRect.leftTop.subtract(_dp));
182
170
  _this._checkConstraints(1,1);
183
171
  },
184
-
172
+
185
173
  /** = Description
186
174
  * Sub-event method responder when the north-east (right-top) corner is being
187
175
  * moved to resize the view.
@@ -199,7 +187,7 @@ HDynControl = HControl.extend({
199
187
  _this.rect.setRightTop(_this._startRect.rightTop.subtract(_dp));
200
188
  _this._checkConstraints(0,1);
201
189
  },
202
-
190
+
203
191
  /** = Description
204
192
  * Sub-event method responder when the south-west (left-bottom) corner is being
205
193
  * moved to resize the view.
@@ -217,7 +205,7 @@ HDynControl = HControl.extend({
217
205
  _this.rect.setLeftBottom(_this._startRect.leftBottom.subtract(_dp));
218
206
  _this._checkConstraints(1,0);
219
207
  },
220
-
208
+
221
209
  /** = Description
222
210
  * Sub-event method responder when the south-east (right-bottom) corner is being
223
211
  * moved to resize the view.
@@ -235,7 +223,7 @@ HDynControl = HControl.extend({
235
223
  _this.rect.setRightBottom(_this._startRect.rightBottom.subtract(_dp));
236
224
  _this._checkConstraints(0,0);
237
225
  },
238
-
226
+
239
227
  /** = Description
240
228
  * Sub-event method responder when the west (left) edge is being
241
229
  * moved to resize the view.
@@ -253,7 +241,7 @@ HDynControl = HControl.extend({
253
241
  _this.rect.setLeft(_this._startRect.left-_dp.x);
254
242
  _this._checkConstraints(1,0);
255
243
  },
256
-
244
+
257
245
  /** = Description
258
246
  * Sub-event method responder when the east (right) edge is being
259
247
  * moved to resize the view.
@@ -271,7 +259,7 @@ HDynControl = HControl.extend({
271
259
  _this.rect.setRight(_this._startRect.right-_dp.x);
272
260
  _this._checkConstraints(0,0);
273
261
  },
274
-
262
+
275
263
  /** = Description
276
264
  * Sub-event method responder when the north (top) edge is being
277
265
  * moved to resize the view.
@@ -289,7 +277,7 @@ HDynControl = HControl.extend({
289
277
  _this.rect.setTop(_this._startRect.top-_dp.y);
290
278
  _this._checkConstraints(0,1);
291
279
  },
292
-
280
+
293
281
  /** = Description
294
282
  * Sub-event method responder when the south (bottom) edge is being
295
283
  * moved to resize the view.
@@ -307,7 +295,7 @@ HDynControl = HControl.extend({
307
295
  _this.rect.setBottom(_this._startRect.bottom-_dp.y);
308
296
  _this._checkConstraints(0,0);
309
297
  },
310
-
298
+
311
299
  /** = Description
312
300
  * Sub-event method responder when moving the offset of the view.
313
301
  * This is called when no resize areas are triggered.
@@ -325,7 +313,7 @@ HDynControl = HControl.extend({
325
313
  _this.rect.offsetTo(_this._startRect.leftTop.subtract(_dp));
326
314
  _this._checkConstraints(1,1);
327
315
  },
328
-
316
+
329
317
  /* Method to initialize the rules */
330
318
  _initActionFns: function(){
331
319
  this._actionFns = [];
@@ -341,17 +329,17 @@ HDynControl = HControl.extend({
341
329
  _actionFns[_resizeNE] = _this.dynResizeNE;
342
330
  _actionFns[_resizeSW] = _this.dynResizeSW;
343
331
  _actionFns[_resizeSE] = _this.dynResizeSE;
344
-
332
+
345
333
  _actionFns[_resizeW] = _this.dynResizeW;
346
334
  _actionFns[_resizeE] = _this.dynResizeE;
347
335
  _actionFns[_resizeN] = _this.dynResizeN;
348
336
  _actionFns[_resizeS] = _this.dynResizeS;
349
-
337
+
350
338
  _actionFns[_drag] = _this.dynDrag;
351
-
339
+
352
340
  },
353
-
354
-
341
+
342
+
355
343
  /** Calculates the rectangles for all the active areas.
356
344
  **/
357
345
  makeRectRules: function(){
@@ -371,7 +359,7 @@ HDynControl = HControl.extend({
371
359
  [_opts.resizeW,_opts.resizeN,_rect.width-_opts.resizeE,_rect.height-_opts.resizeS]
372
360
  ];
373
361
  },
374
-
362
+
375
363
  /* Method used for initializing the action flags. */
376
364
  _initActionFlag: function(){
377
365
  this._actionFlag = -1;
@@ -382,7 +370,7 @@ HDynControl = HControl.extend({
382
370
  this._actionRects.push( HRect.nu(_rr[0],_rr[1],_rr[2],_rr[3]) );
383
371
  }
384
372
  },
385
-
373
+
386
374
  /* Method used to detect the action flags. Also sets the cursor. */
387
375
  _detectActionFlag: function(){
388
376
  var i,
@@ -408,7 +396,7 @@ HDynControl = HControl.extend({
408
396
  }
409
397
  }
410
398
  },
411
-
399
+
412
400
  /** = Description
413
401
  * Event method responder that decides and initializes
414
402
  * a resize or move operation on the drag events.
@@ -447,7 +435,7 @@ HDynControl = HControl.extend({
447
435
  }
448
436
  return true; // prevents text selection
449
437
  },
450
-
438
+
451
439
  /** = Description
452
440
  * Event method responder that performs a resize or move recalculation
453
441
  * and redraw call when dragging one of the corners or edges to resize or