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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e6dd280bbf9fe1c080d0eba1085327fc25663fe6
4
- data.tar.gz: fd9c7ce53a81ecd4099461708f70ea6b256033f0
3
+ metadata.gz: 99b457f1d439877cd2926e8609e5c1545558534f
4
+ data.tar.gz: 5a20ca0ee688f859946145175fe0e7127bd87dca
5
5
  SHA512:
6
- metadata.gz: f19eaa0dacb233b00ec7b3eef43c0ae976c74112878582ef4cbbfb76b92f9d54cd166058e97431df64cdaf86f121e875d3b250100398610cc055b998a03f8f6a
7
- data.tar.gz: 7a0dbe67283aeddecf7c6173276735cf828a64465e7a53c5d9765c19967a4942346748f2204c385a41ad6c281be60f48d6ce68b7345d0f3f6b9cc29883ba739c
6
+ metadata.gz: 28a2abfa6afa5e310262b3420cdbf99f4fee16d28fac1a15bb8a40a3cf1ec99bb27a787649ecf7864caeb6890504dfe4a4951513e279b12dcbf4e23de032564d
7
+ data.tar.gz: 1738b4fa751e468bc48d55f11ed29997695cb0723effb9f6401a69bb23b1854f2e812a2288ba2a2af7c8ae8a45dd9f3a2be117245f6f0fb9618bef72a55979ba
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.0.8.pre
1
+ 3.0.0.9.pre
@@ -17,8 +17,6 @@
17
17
  # RSence.*
18
18
  - rsence_ns
19
19
 
20
- - locale_settings # HLocaleSettings
21
-
22
20
  # RSence.Core
23
21
  - class # HClass
24
22
  - sha # SHA
@@ -26,6 +24,8 @@
26
24
  - event # Event
27
25
  - util_methods # UtilMethods
28
26
 
27
+ - locale_settings # HLocaleSettings
28
+
29
29
  # RSence.Foundation
30
30
  - system # HSystem
31
31
  - valueresponder # HValueResponder
@@ -41,6 +41,9 @@
41
41
  - autosync # ( automatic sync setup )
42
42
  - values # COMM.Values
43
43
  - value # HValue
44
+ - keyvalue # HKeyValue
45
+ - pushvalue # HPushValue
46
+ - pullvalue # HPullValue
44
47
  - jsloader # COMM.JSLoader
45
48
  - json_renderer # COMM.JSONRenderer
46
49
  - valuematrix # HValueMatrixInterface & HValueMatrix
@@ -120,6 +123,7 @@
120
123
  - minimenuitem # HMiniMenuItem
121
124
  - popupmenu # HPopupMenu
122
125
  - menuitem # HMenuItem
126
+ - combobox # HCombobox
123
127
 
124
128
  tables:
125
129
  - table # HTable
@@ -9,17 +9,17 @@
9
9
  ***/
10
10
  //var//RSence.COMM
11
11
  COMM.Queue = HApplication.extend({
12
-
12
+
13
13
  /** The constructor takes no arguments and starts queue flushing automatically.
14
14
  **/
15
15
  constructor: function(){
16
-
16
+
17
17
  // The queue itself, is packed with anonymous functions
18
18
  this.commandQueue = [];
19
-
19
+
20
20
  // Flag to signal the pause and resume status.
21
21
  this.paused = false;
22
-
22
+
23
23
  // Run with priority 10; not too demanding but not too sluggish either
24
24
  this.base(10);
25
25
 
@@ -30,7 +30,7 @@ COMM.Queue = HApplication.extend({
30
30
  this._headElem = document.getElementsByTagName('head')[0];
31
31
  }
32
32
  },
33
-
33
+
34
34
  /** Checks periodically, if the queue needs flushing.
35
35
  **/
36
36
  onIdle: function(){
@@ -38,7 +38,7 @@ COMM.Queue = HApplication.extend({
38
38
  // empty and the state is not resumed:
39
39
  !this.paused && this.commandQueue.length !== 0 && this.flush();
40
40
  },
41
-
41
+
42
42
  /** = Description
43
43
  * Pauses the queue.
44
44
  *
@@ -51,7 +51,7 @@ COMM.Queue = HApplication.extend({
51
51
  pause: function(){
52
52
  this.paused = true;
53
53
  },
54
-
54
+
55
55
  /** = Description
56
56
  * Resumes queue flushing.
57
57
  *
@@ -64,7 +64,7 @@ COMM.Queue = HApplication.extend({
64
64
  this.paused = false;
65
65
  this.flush();
66
66
  },
67
-
67
+
68
68
  /** A Group of localizable strings; errors and warnings.
69
69
  **/
70
70
  STRINGS: {
@@ -87,7 +87,7 @@ COMM.Queue = HApplication.extend({
87
87
  ].join('');
88
88
  return _errorText;
89
89
  },
90
-
90
+
91
91
  /** = Description
92
92
  * Flushes the queue until stopped.
93
93
  *
@@ -96,23 +96,25 @@ COMM.Queue = HApplication.extend({
96
96
  *
97
97
  **/
98
98
  flush: function(){
99
- var i = 0, // current index in the for-loop.
100
- _item, // the current item to execute
101
- _function, // the function to run
102
- _arguments, // the arguments of the function
103
- _len = this.commandQueue.length; // the length of the queue
104
-
99
+ var
100
+ i = 0, // current index in the for-loop.
101
+ _item, // the current item to execute
102
+ _function, // the function to run
103
+ _arguments, // the arguments of the function
104
+ _startTime = this.msNow(),
105
+ _len = this.commandQueue.length; // the length of the queue
106
+
105
107
  // Iterates through the items.
106
108
  for(;i<_len;i++){
107
-
108
- // Checks that the queue hasn't been paused.
109
+
110
+ // Checks that the queue hasn't been paused
109
111
  if(this.paused){
110
112
  break; // stops flushing, if paused.
111
113
  }
112
-
114
+
113
115
  // The first item in the queue is removed from the queue.
114
116
  _item = this.commandQueue.shift();
115
-
117
+
116
118
  // Execute the item, with arugments if the item
117
119
  try{
118
120
  if(typeof _item === 'function'){
@@ -124,18 +126,24 @@ COMM.Queue = HApplication.extend({
124
126
  _function.apply(this,_arguments);
125
127
  }
126
128
  }
127
-
129
+
128
130
  // Displays an error message in the Javascript console, if failure.
129
131
  catch(e){
130
132
  this.clientException( e, _item );
131
133
  }
134
+
135
+ if(this.msNow()-_startTime>250){
136
+ var _this = this; _this.pause();
137
+ setTimeout(function(){_this.resume();},0);
138
+ break;
139
+ }
132
140
  }
133
141
  },
134
-
142
+
135
143
  /** = Description
136
144
  * Adds an item to the beginning of the queue.
137
145
  *
138
- * Use to make the given +_function+ with its
146
+ * Use to make the given +_function+ with its
139
147
  * optional +_arguments+ the next item to flush.
140
148
  *
141
149
  * = Parameters:
@@ -151,11 +159,11 @@ COMM.Queue = HApplication.extend({
151
159
  this.commandQueue.unshift(_function);
152
160
  }
153
161
  },
154
-
162
+
155
163
  /** = Description
156
164
  * Adds an item to the end of the queue.
157
165
  *
158
- * Use to make the given +_function+ with its
166
+ * Use to make the given +_function+ with its
159
167
  * optional +_arguments+ the last item to flush.
160
168
  *
161
169
  * = Parameters:
@@ -171,26 +179,6 @@ COMM.Queue = HApplication.extend({
171
179
  this.commandQueue.push(_function);
172
180
  }
173
181
  },
174
-
175
- /** Like +unshift+, but uses the code block as a string to be
176
- * passed on as an evaluated anonymous function.
177
- **/
178
- unshiftEval: function(_evalStr,_arguments){
179
- var _function;
180
- console.log('WARNING: COMM.unshiftEval is deprecated; Update your code!');
181
- eval('_function = function(){'+_evalStr+'}');
182
- this.unshift(_function);
183
- },
184
-
185
- /** Like +push+, but uses the code block as a string to be
186
- * passed on as an evaluated anonymous function.
187
- **/
188
- pushEval: function(_evalStr){
189
- var _function;
190
- console.log('WARNING: COMM.pushEval is deprecated; Update your code!');
191
- eval('_function = function(){'+_evalStr+'}');
192
- this.push(_function);
193
- },
194
182
 
195
183
  _scripts: {},
196
184
 
@@ -15,7 +15,7 @@
15
15
  ***/
16
16
  //var//RSence.COMM
17
17
  COMM.Transporter = HApplication.extend({
18
-
18
+
19
19
  /** Sets up the default settings upon construction.
20
20
  **/
21
21
  constructor: function(){
@@ -42,7 +42,7 @@ COMM.Transporter = HApplication.extend({
42
42
  }
43
43
  }
44
44
  },
45
-
45
+
46
46
  /** Tries to (re)connect to the server as often as possible,
47
47
  * mandated essentially by the priority of its
48
48
  * HApplication instance.
@@ -50,7 +50,7 @@ COMM.Transporter = HApplication.extend({
50
50
  onIdle: function(){
51
51
  this.sync();
52
52
  },
53
-
53
+
54
54
  /** (Re)sets the priority of itself, effects how
55
55
  * frequently +onIdle+ is called.
56
56
  * Usually set by the server.
@@ -58,7 +58,7 @@ COMM.Transporter = HApplication.extend({
58
58
  poll: function(_pri){
59
59
  HSystem.reniceApp(this.appId,_pri);
60
60
  },
61
-
61
+
62
62
  /** Returns the last transaction error of itself. Used by +sync+
63
63
  * to report js errors to the server.
64
64
  * If no error, returns an empty string.
@@ -68,15 +68,15 @@ COMM.Transporter = HApplication.extend({
68
68
  // return _this._clientEvalError?'&err_msg=' +
69
69
  // COMM.Values._encodeString(_this._clientEvalError):'';
70
70
  // },
71
-
71
+
72
72
  parseResponseArray: function( _responseText ){
73
73
  return this.decodeObject( _responseText );
74
74
  },
75
-
75
+
76
76
  _nativeParseResponseArray: function( _responseText ){
77
77
  return JSON.parse( _responseText );
78
78
  },
79
-
79
+
80
80
  setValues: function( _values ){
81
81
  if(!_values instanceof Object){
82
82
  console.log("Invalid values block: ", _values );
@@ -84,21 +84,29 @@ COMM.Transporter = HApplication.extend({
84
84
  }
85
85
  var
86
86
  i = 0,
87
+ _value,
88
+ _valueType,
87
89
  _valueManager = COMM.Values,
88
90
  _itemtype,
89
91
  _valueId,
90
92
  _valueData;
91
93
  if(_values['new'] instanceof Array){
92
94
  for(i=0;i<_values['new'].length;i++){
93
- _valueId = _values['new'][i][0];
94
- _valueData = _values['new'][i][1];
95
- _valueManager.create( _valueId, _valueData );
95
+ _value = _values['new'][i];
96
+ _valueId = _value[0];
97
+ _valueData = _value[1];
98
+ _valueType = 0;
99
+ if( _value.length === 3 ){
100
+ _valueType = _value[2];
101
+ }
102
+ _valueManager.create( _valueId, _valueData, _valueType );
96
103
  }
97
104
  }
98
105
  if(_values.set instanceof Array){
99
106
  for(i=0;i<_values.set.length;i++){
100
- _valueId = _values.set[i][0];
101
- _valueData = _values.set[i][1];
107
+ _value = _values.set[i];
108
+ _valueId = _value[0];
109
+ _valueData = _value[1];
102
110
  _valueManager.s( _valueId, _valueData );
103
111
  }
104
112
  }
@@ -109,7 +117,7 @@ COMM.Transporter = HApplication.extend({
109
117
  }
110
118
  }
111
119
  },
112
-
120
+
113
121
  /** = Description
114
122
  * Handles synchronization responses.
115
123
  *
@@ -169,7 +177,7 @@ COMM.Transporter = HApplication.extend({
169
177
  _this._serverInterruptView = false;
170
178
  }
171
179
  },
172
-
180
+
173
181
  /** Sets the +busy+ flag to false and resynchronizes immediately,
174
182
  * if COMM.Values contain any unsynchronized values.
175
183
  **/
@@ -294,7 +302,7 @@ COMM.Transporter = HApplication.extend({
294
302
  _this._serverInterruptView._setCustomColor(_customColor);
295
303
  }
296
304
  },
297
-
305
+
298
306
  /** Called by the XMLHttpRequest, when there was a failure in communication.
299
307
  **/
300
308
  failure: function(_resp){
@@ -308,7 +316,7 @@ COMM.Transporter = HApplication.extend({
308
316
  _this.failMessage('Transporter Error','Transporter was unable to complete the synchronization request.');
309
317
  }
310
318
  },
311
-
319
+
312
320
  /** Starts requests.
313
321
  **/
314
322
  sync: function(){
@@ -6,19 +6,19 @@
6
6
  ***/
7
7
  //var//RSence.COMM
8
8
  COMM.Values = UtilMethods.extend({
9
-
9
+
10
10
  /** No constructor, singleton class.
11
11
  **/
12
12
  constructor: null,
13
-
13
+
14
14
  /** An +Object+ containing all values by key.
15
15
  **/
16
16
  values: {},
17
-
17
+
18
18
  /** A list of value keys whose value has changed. To be synchronized asap.
19
19
  **/
20
20
  tosync: [],
21
-
21
+
22
22
  /** = Description
23
23
  * Creates a new +HValue+ instance. Its main purpose is to act as the main
24
24
  * client-side value creation interface for the server representation of
@@ -27,12 +27,24 @@ COMM.Values = UtilMethods.extend({
27
27
  * = Parameters
28
28
  * +_id+:: The unique id of the +HValue+ instance (set by the server)
29
29
  * +_data:: The initial data of the +HValue+ instance (set by the server)
30
+ * +_type:: The value type: 0=HValue, 1=HPushValue, 2=HPullValue
30
31
  *
31
32
  **/
32
- create: function(_id,_data){
33
- HValue.nu(_id,_data);
33
+ create: function(_id,_data,_type){
34
+ if(!_type){
35
+ HValue.nu(_id,_data);
36
+ }
37
+ else if(_type === 1){
38
+ HPushValue.nu(_id,_data);
39
+ }
40
+ else if(_type === 2){
41
+ HPullValue.nu(_id,_data);
42
+ }
43
+ else{
44
+ console.warn("Unknown value type:",_type);
45
+ }
34
46
  },
35
-
47
+
36
48
  /** = Description
37
49
  * Binds a +HValue+ instance created externally to +self.values+.
38
50
  * Called from +HValue+ upon construction.
@@ -45,7 +57,7 @@ COMM.Values = UtilMethods.extend({
45
57
  add: function(_id,_value){
46
58
  this.values[_id] = _value;
47
59
  },
48
-
60
+
49
61
  /** = Description
50
62
  * Sets the data of the +HValue+ instance by +_Id+.
51
63
  *
@@ -57,7 +69,7 @@ COMM.Values = UtilMethods.extend({
57
69
  set: function(_id,_data){
58
70
  this.values[_id].set(_data);
59
71
  },
60
-
72
+
61
73
  /** = Description
62
74
  * Sets and decodes the +_data+. Main value setter interface
63
75
  * for the server representation of +HValue+.
@@ -72,7 +84,7 @@ COMM.Values = UtilMethods.extend({
72
84
  _data = _this.decode(_data);
73
85
  _this.values[_id].s(_data);
74
86
  },
75
-
87
+
76
88
  /** = Description
77
89
  * Deletes a +HValue+ instance by +_id+.
78
90
  *
@@ -95,7 +107,7 @@ COMM.Values = UtilMethods.extend({
95
107
  _value.views = [];
96
108
  delete _values[_id];
97
109
  },
98
-
110
+
99
111
  /** = Description
100
112
  * Marks the +HValue+ instance as changed and tries to send it
101
113
  * immediately, unless COMM.Transporter has an ongoing transfer.
@@ -115,7 +127,7 @@ COMM.Values = UtilMethods.extend({
115
127
  }
116
128
  }
117
129
  },
118
-
130
+
119
131
  /** = Description
120
132
  * Use this method to detect the type of the object given.
121
133
  *
@@ -137,7 +149,7 @@ COMM.Values = UtilMethods.extend({
137
149
  type: function(_obj){
138
150
  return this.typeChr( _obj );
139
151
  },
140
-
152
+
141
153
  /** = Description
142
154
  * Returns an URI-encoded string representation of all the changed values to
143
155
  * synchronize to the server.
@@ -166,7 +178,7 @@ COMM.Values = UtilMethods.extend({
166
178
  _id, _value;
167
179
  while(i--){
168
180
  _id = _tosync.shift();
169
- _value = _values[_id].value;
181
+ _value = _values[_id].toSync();
170
182
  _syncValues.push( [ _id, _value ] );
171
183
  }
172
184
  }
@@ -184,7 +196,7 @@ COMM.Values = UtilMethods.extend({
184
196
  clone: function(_obj){
185
197
  return this.cloneObject(_obj);
186
198
  }
187
-
199
+
188
200
  });
189
201
 
190
202
  // Backwards compatibility assignment for code that still
@@ -8,7 +8,8 @@ HButton = HControl.extend
8
8
  componentName: 'button'
9
9
  optimizeWidthOnRefresh: true
10
10
  controlDefaults: HControlDefaults.extend
11
- defaultKeyClick: false
11
+ defaultKeyClick: false # use defaultResponder instead; it's a better name
12
+ defaultResponder: false
12
13
  pack: false
13
14
 
14
15
  defaultEvents:
@@ -27,7 +28,13 @@ HButton = HControl.extend
27
28
  @
28
29
 
29
30
  defaultKey: ->
30
- if @options.defaultKeyClick
31
+ if @enabled and ( @options.defaultKeyClick or @options.defaultResponder )
32
+ if @options.defaultKeyClick and !@isProduction
33
+ console.warn("defaultKeyClick is deprecated; use defaultResponder instead (sorry)")
34
+ @setCSSClass('clickeffect')
35
+ @timeouts.push( setTimeout( =>
36
+ @unsetCSSClass('clickeffect')
37
+ , 200 ) )
31
38
  @click()
32
39
  return false
33
40
  null
@@ -37,10 +44,12 @@ HButton = HControl.extend
37
44
 
38
45
  refresh: ->
39
46
  @base()
40
- if @options.defaultKeyClick
41
- @toggleCSSClass(@elemId,'action',true)
47
+ if @options.defaultKeyClick or @options.defaultResponder
48
+ if @options.defaultKeyClick and !@isProduction
49
+ console.warn("defaultKeyClick is deprecated; use defaultResponder instead (sorry)")
50
+ @setCSSClass('action')
42
51
  else
43
- @toggleCSSClass(@elemId,'action',false)
52
+ @unsetCSSClass('action')
44
53
 
45
54
  labelPadding: 0
46
55
  optimizeWidth: ->
@@ -21,7 +21,7 @@
21
21
  .default.disabled > .button_control > .button_bg {
22
22
  border-color: #ddd;
23
23
  box-shadow: 0 0 3px #666;
24
- opacity: 0.75;
24
+ opacity: 0.9;
25
25
  #{this.gradientCSS('#d6d6d6',[66,'#d0d0d0'],[71,'#d3d3d3'],'#cccccc')}
26
26
  }
27
27
  .default > .button_control > .button_label {
@@ -36,7 +36,7 @@
36
36
  color: #333;
37
37
  }
38
38
  .default.disabled > .button_control > .button_label {
39
- color: #999;
39
+ color: #555;
40
40
  }
41
41
 
42
42
  .default.enabled.action > .button_control > .button_bg {
@@ -77,12 +77,14 @@
77
77
  color: #000;
78
78
  }
79
79
 
80
+ .default.enabled.action.clickeffect > .button_control > .button_bg,
80
81
  .default.enabled.action > .button_control:active > .button_bg {
81
82
  border: 1px solid #fff;
82
83
  margin: -1px;
83
84
  box-shadow: 0 0 3px #fff;
84
85
  #{this.gradientCSS('#111',[29,'#333'],[33,'#333'],'#000')}
85
86
  }
87
+ .default.enabled.action.clickeffect > .button_control:active > .button_label,
86
88
  .default.enabled.action > .button_control:active > .button_label {
87
89
  color: #fff;
88
90
  text-shadow: 0 0 2px #000;
@@ -29,12 +29,12 @@ HCheckbox = HButton.extend({
29
29
  refreshValue: function(){
30
30
  if(this.markupElemIds.control){
31
31
  if(this.value){
32
- this.toggleCSSClass(this.markupElemIds.control, 'checked', true);
33
- this.toggleCSSClass(this.markupElemIds.control, 'unchecked', false);
32
+ this.setCSSClass('control', 'checked');
33
+ this.unsetCSSClass('control', 'unchecked');
34
34
  }
35
35
  else{
36
- this.toggleCSSClass(this.markupElemIds.control, 'checked', false);
37
- this.toggleCSSClass(this.markupElemIds.control, 'unchecked', true);
36
+ this.unsetCSSClass('control', 'checked');
37
+ this.setCSSClass('control', 'unchecked');
38
38
  }
39
39
  }
40
40
  }
@@ -1,29 +1,29 @@
1
1
 
2
2
  /*** = Description
3
3
  ** HSheet is a container component that toggles its visibility
4
- ** based on its value. When the value is 0, it's visible, otherwise
4
+ ** based on its value. When the value is 0, it's visible, otherwise
5
5
  ** it's hidden. It expands to fill its parent view.
6
- **
6
+ **
7
7
  ** Its rect specifies the relative size and position of the centered inner
8
8
  ** sheet, which acts as a subview.
9
- **
9
+ **
10
10
  ** It's practical when combined with button values.
11
- **
11
+ **
12
12
  ** Also see HAlertSheet and HConfirmSheet components.
13
- **
13
+ **
14
14
  ***/
15
15
  var//RSence.Controls
16
16
  HSheet = HControl.extend({
17
-
17
+
18
18
  componentName: 'sheet',
19
19
 
20
20
  defaultEvents: {
21
21
  resize: true
22
22
  },
23
-
23
+
24
24
  /** = Description
25
25
  * Shows of hides HSheet depending on the value.
26
- * If the value is 0 the HSheet#show() will be called.
26
+ * If the value is 0 the HSheet#show() will be called.
27
27
  * Otherwise HSheet#hide() is called.
28
28
  *
29
29
  **/
@@ -37,7 +37,7 @@ HSheet = HControl.extend({
37
37
  },
38
38
 
39
39
  /** = Description
40
- * Draws the sheet rectangle once it has been created and
40
+ * Draws the sheet rectangle once it has been created and
41
41
  * if it has not been set as hidden by constructor.
42
42
  *
43
43
  * = Returns
@@ -104,7 +104,7 @@ HSheet = HControl.extend({
104
104
  // ELEM.del( this._dimmerElem );
105
105
  // this.base();
106
106
  // },
107
- markupElemNames: [ 'dimmer', 'state', 'subview' ],
107
+ markupElemNames: [ 'dimmer', 'state', 'subview', 'bg' ],
108
108
 
109
109
  centerRect: function(){
110
110
  // console.log('centerRect');
@@ -134,6 +134,6 @@ HSheet = HControl.extend({
134
134
  this.centerRect();
135
135
  this.base();
136
136
  }
137
-
137
+
138
138
  });
139
139
 
@@ -1,6 +1,6 @@
1
1
  <div class="sheet_dimmer" id="dimmer]I["></div>
2
2
  <div class="sheet_content" id="state]I[">
3
- <div class="sheet_bg"></div>
3
+ <div class="sheet_bg" id="bg]I["></div>
4
4
  <div class="sheet_body">
5
5
  <div class="sheet_body_edge_left"></div>
6
6
  <div class="sheet_body_edge_right"></div>