rsence 2.2.0 → 2.2.1
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 +1 -1
- data/js/comm/queue/queue.js +17 -8
- data/js/comm/transporter/transporter.js +11 -10
- data/js/controls/button/themes/bright/button_parts1.png +0 -0
- data/js/controls/button/themes/default/button_parts1.png +0 -0
- data/js/controls/checkbox/themes/default/checkbox_parts1.png +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_bg.png +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_dim.png +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_parts1.png +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_parts2.png +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_warning.png +0 -0
- data/js/controls/radiobutton/themes/default/radiobutton_parts1.png +0 -0
- data/js/controls/searchfield/themes/default/searchfield_parts1.png +0 -0
- data/js/controls/sliders/slider/themes/default/hslider_tracks.png +0 -0
- data/js/controls/sliders/slider/themes/default/slider_thumbs.png +0 -0
- data/js/controls/sliders/vslider/themes/default/vslider_tracks.png +0 -0
- data/js/controls/tab/tab.js +4 -3
- data/js/controls/tab/themes/bright/tab_bg_color.png +0 -0
- data/js/controls/tab/themes/bright/tab_border_pattern.png +0 -0
- data/js/controls/tab/themes/bright/tab_parts1.png +0 -0
- data/js/controls/tab/themes/default/tab_bg_color.png +0 -0
- data/js/controls/tab/themes/default/tab_border_pattern.png +0 -0
- data/js/controls/tab/themes/default/tab_parts1.png +0 -0
- data/js/controls/textcontrol/textcontrol.js +3 -1
- data/js/controls/textcontrol/themes/default/textcontrol_parts1.png +0 -0
- data/js/controls/textcontrol/themes/default/textcontrol_parts2.png +0 -0
- data/js/controls/textcontrol/themes/default/textcontrol_parts3.png +0 -0
- data/js/controls/validatorview/themes/default/validator.png +0 -0
- data/js/controls/window/themes/default/window.css +66 -54
- data/js/controls/window/themes/default/window.html +6 -2
- data/js/controls/window/themes/default/window_bg_active.png +0 -0
- data/js/controls/window/themes/default/window_bg_inactive.png +0 -0
- data/js/controls/window/themes/default/window_buttons.png +0 -0
- data/js/controls/window/themes/default/window_parts1.png +0 -0
- data/js/controls/window/themes/default/window_parts2.png +0 -0
- data/js/controls/window/window.js +167 -40
- data/js/core/class/class.js +3 -0
- data/js/core/elem/elem.coffee +36 -16
- data/js/datetime/calendar/calendar.coffee +24 -8
- data/js/datetime/calendar/themes/default/calendar.html +2 -2
- data/js/datetime/calendar/themes/default/calendar_arrows.png +0 -0
- data/js/datetime/calendar/themes/default/calendar_bg.png +0 -0
- data/js/datetime/calendar/themes/default/calendar_parts1.png +0 -0
- data/js/datetime/calendar/themes/default/calendar_parts2.png +0 -0
- data/js/datetime/timesheet_item/themes/default/timesheet_item_icons.png +0 -0
- data/js/datetime/timesheet_item/timesheet_item.js +1 -1
- data/js/foundation/geom/rect/rect.js +83 -47
- data/js/foundation/thememanager/thememanager.js +3 -0
- data/js/foundation/view/markupview/markupview.js +1 -1
- data/js/foundation/view/view.js +136 -37
- data/js/lists/propertylist/propertylist.js +33 -31
- data/js/menus/minimenu/minimenu.js +4 -2
- data/js/menus/minimenu/themes/default/minimenu.png +0 -0
- data/js/menus/minimenuitem/themes/default/minimenuitem_checkmark.png +0 -0
- data/js/menus/popupmenu/themes/default/popupmenu.png +0 -0
- data/js/util/reloadapp/themes/default/reloadapp_warning.png +0 -0
- data/lib/rsence/argv/startup_argv.rb +1 -1
- data/lib/rsence/default_config.rb +2 -2
- data/lib/rsence/plugins/plugin.rb +0 -1
- data/plugins/client_pkg/client_pkg.rb +7 -9
- data/plugins/client_pkg/lib/client_pkg_build.rb +214 -99
- data/plugins/main/main.rb +5 -1
- metadata +4 -4
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -51,7 +51,7 @@ HWindow = HDynControl.extend({
|
|
51
51
|
* +resizeSE+:: The size of the south-east (right bottom) resizable corner.
|
52
52
|
* Defaults to +[ 16, 16 ]+
|
53
53
|
* +noResize+:: A flag (when true) disables all resizing and only allows
|
54
|
-
* moving.
|
54
|
+
* moving. Does not disable the (-) and (+) buttons.
|
55
55
|
* +fullWindowMove+:: A flag (when true) enables the full HWindow area
|
56
56
|
* responds to drag events. By default it's false,
|
57
57
|
* meaning only the title bar is draggable.
|
@@ -64,12 +64,15 @@ HWindow = HDynControl.extend({
|
|
64
64
|
* disabled. When enabled, extend the
|
65
65
|
* HWindow#windowCollapse method, which by default
|
66
66
|
* zooms the window to its +minSize+.
|
67
|
+
* +minimizeButton+:: An alias for +collapseButton+
|
67
68
|
* +zoomButton+:: A flag (when true) enables the zoom (or maximize)
|
68
69
|
* button of the HWindow instance. By default it's
|
69
70
|
* disabled. When enabled, extend the
|
70
71
|
* HWindow#windowZoom method, which by default zooms the
|
71
72
|
* contents of the HWindow to fit or the +maxSize+ depending
|
72
73
|
* on which is smaller.
|
74
|
+
* +resizeButton+:: An alias for +zoomButton+
|
75
|
+
* +maximizeButton+:: An alias for +zoomButton+
|
73
76
|
*
|
74
77
|
**/
|
75
78
|
controlDefaults: (HDynControl.prototype.controlDefaults.extend({
|
@@ -104,7 +107,7 @@ HWindow = HDynControl.extend({
|
|
104
107
|
this.resizeSW = [ 6, 6 ];
|
105
108
|
}
|
106
109
|
if(!this.resizeSE){
|
107
|
-
this.resizeSE = [
|
110
|
+
this.resizeSE = [ 25, 25 ];
|
108
111
|
}
|
109
112
|
},
|
110
113
|
maxX: 'auto',
|
@@ -117,7 +120,10 @@ HWindow = HDynControl.extend({
|
|
117
120
|
fullWindowMove: false,
|
118
121
|
closeButton: false,
|
119
122
|
collapseButton: false,
|
120
|
-
|
123
|
+
minimizeButton: false,
|
124
|
+
zoomButton: false,
|
125
|
+
resizeButton: false,
|
126
|
+
maximizeButton: false
|
121
127
|
})),
|
122
128
|
|
123
129
|
draw: function(){
|
@@ -127,6 +133,61 @@ HWindow = HDynControl.extend({
|
|
127
133
|
HSystem.windowFocus(this);
|
128
134
|
}
|
129
135
|
},
|
136
|
+
|
137
|
+
markupElemNames: [
|
138
|
+
'label', 'control', 'subview', 'close', 'collapse', 'zoom', 'resize'
|
139
|
+
],
|
140
|
+
|
141
|
+
refreshWidgetStates: function(){
|
142
|
+
if(!this.drawn){ return; }
|
143
|
+
var
|
144
|
+
_this = this,
|
145
|
+
_opts = _this.options,
|
146
|
+
_elemId, _elem,
|
147
|
+
// _elemId = _this.markupElemIds.zoom,
|
148
|
+
// _elem = ELEM.get(_elemId),
|
149
|
+
_enablePrefix = 'enable_', _disablePrefix = 'disable_',
|
150
|
+
_listenEvent = 'click',
|
151
|
+
_addClass, _delClass,
|
152
|
+
_widgets = [
|
153
|
+
[ 'zoom', (_this.enabled && (_opts.zoomButton || _opts.maximizeButton || _opts.resizeButton)), function(){_this.windowZoom();} ],
|
154
|
+
[ 'collapse', (_this.enabled && (_opts.collapseButton || _opts.minimizeButton)), function(){_this.windowCollapse();} ],
|
155
|
+
[ 'close', (_this.enabled && _opts.closeButton), function(){_this.windowClose();} ]
|
156
|
+
],
|
157
|
+
_elemName, _enabled, _callback,
|
158
|
+
_item, i = 0;
|
159
|
+
for(;i<_widgets.length;i++){
|
160
|
+
_item = _widgets[i];
|
161
|
+
_elemName = _item[0];
|
162
|
+
_enabled = _item[1];
|
163
|
+
_callback = _item[2];
|
164
|
+
_elemId = _this.markupElemIds[_elemName];
|
165
|
+
_elem = ELEM.get(_elemId);
|
166
|
+
Event.stopObserving( _elem, _listenEvent, _callback );
|
167
|
+
if(_enabled){
|
168
|
+
Event.observe( _elem, _listenEvent, _callback );
|
169
|
+
_addClass = _enablePrefix+_elemName;
|
170
|
+
_delClass = _disablePrefix+_elemName;
|
171
|
+
}
|
172
|
+
else {
|
173
|
+
_delClass = _enablePrefix+_elemName;
|
174
|
+
_addClass = _disablePrefix+_elemName;
|
175
|
+
}
|
176
|
+
ELEM.addClassName( _elemId, _addClass );
|
177
|
+
ELEM.delClassName( _elemId, _delClass );
|
178
|
+
}
|
179
|
+
_this.setStyleOfPart('resize','visibility',(_opts.noResize?'hidden':'inherit'));
|
180
|
+
},
|
181
|
+
|
182
|
+
drawSubviews: function(){
|
183
|
+
this.base();
|
184
|
+
this.refreshWidgetStates();
|
185
|
+
},
|
186
|
+
|
187
|
+
setEnabled: function(_state){
|
188
|
+
this.base(_state);
|
189
|
+
this.refreshWidgetStates();
|
190
|
+
},
|
130
191
|
|
131
192
|
// -- overrides the drag rules to adapt to the !fullWindowMove as well
|
132
193
|
// as disabling draggability in window button areas. ++
|
@@ -143,10 +204,10 @@ HWindow = HDynControl.extend({
|
|
143
204
|
_opts = _this.options,
|
144
205
|
_leftPx=_opts.resizeW;
|
145
206
|
if(!_opts.fullWindowMove){
|
146
|
-
if(_opts.zoomButton){
|
207
|
+
if(_opts.zoomButton || _opts.maximizeButton || _opts.resizeButton){
|
147
208
|
_leftPx = 61;
|
148
209
|
}
|
149
|
-
else if(_opts.collapseButton){
|
210
|
+
else if(_opts.collapseButton || _opts.minimizeButton){
|
150
211
|
_leftPx = 46;
|
151
212
|
}
|
152
213
|
else if(_opts.closeButton){
|
@@ -158,18 +219,18 @@ HWindow = HDynControl.extend({
|
|
158
219
|
},
|
159
220
|
|
160
221
|
maxRect: function(){
|
161
|
-
var _rect = this.base();
|
162
|
-
if(_rect[2]<
|
163
|
-
_rect[2] =
|
222
|
+
var _rect = this.base(), _opts = this.options;
|
223
|
+
if(_rect[2]<_opts.minSize[0]){
|
224
|
+
_rect[2] = _opts.minSize[0];
|
164
225
|
}
|
165
|
-
else if(_rect[2]>
|
166
|
-
_rect[2] =
|
226
|
+
else if(_rect[2]>_opts.maxSize[0]){
|
227
|
+
_rect[2] = _opts.maxSize[0];
|
167
228
|
}
|
168
|
-
if(_rect[3]<
|
169
|
-
_rect[3] =
|
229
|
+
if(_rect[3]<_opts.minSize[1]){
|
230
|
+
_rect[3] = _opts.minSize[1];
|
170
231
|
}
|
171
|
-
else if(_rect[3]>
|
172
|
-
_rect[3] =
|
232
|
+
else if(_rect[3]>_opts.maxSize[1]){
|
233
|
+
_rect[3] = _opts.maxSize[1];
|
173
234
|
}
|
174
235
|
return _rect;
|
175
236
|
},
|
@@ -204,44 +265,74 @@ HWindow = HDynControl.extend({
|
|
204
265
|
windowClose: function(){
|
205
266
|
this.die(); // extend this to this.app.die(), if your app needs to die instead of just the window
|
206
267
|
},
|
268
|
+
|
269
|
+
setLabel: function(_label){
|
270
|
+
this.base(_label);
|
271
|
+
var
|
272
|
+
_labelWidth = 128 + _win.stringWidth( _win.label );
|
273
|
+
if(this._origMinWidth === undefined){
|
274
|
+
this._origMinWidth = this.options.minSize[0];
|
275
|
+
}
|
276
|
+
if(this._origMinWidth<_labelWidth){
|
277
|
+
this.options.minSize[0] = _labelWidth;
|
278
|
+
}
|
279
|
+
else{
|
280
|
+
this.options.minSize[0] = this._origMinWidth;
|
281
|
+
}
|
282
|
+
this.makeRectRules();
|
283
|
+
},
|
207
284
|
|
208
285
|
/** This method gets called, whenever the collapse (minimize) button has
|
209
286
|
* been clicked
|
210
287
|
**/
|
211
|
-
windowCollapse: function(){
|
212
|
-
|
213
|
-
|
288
|
+
windowCollapse: function(_rectOnly){
|
289
|
+
var
|
290
|
+
_win = this, _opts = _win.options;
|
291
|
+
if(HSystem.globalCollapseHandler && !_rectOnly && HSystem.globalCollapseHandler( _win )){
|
292
|
+
return;
|
293
|
+
}
|
294
|
+
if(_opts.collapseUsing && !_rectOnly){
|
295
|
+
_opts.collapseUsing( this );
|
214
296
|
}
|
215
297
|
else {
|
216
|
-
var
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
298
|
+
var
|
299
|
+
_labelSize = 128 + _win.stringWidth( _win.label ),
|
300
|
+
_minWidth = (_opts.minSize[1] > _labelSize)?_opts.minSize[0]:_labelSize,
|
301
|
+
_minRect = HRect.nu(
|
302
|
+
_win.rect.leftTop,
|
303
|
+
_win.rect.leftTop.subtract(
|
304
|
+
0-_minWidth,
|
305
|
+
0-_opts.minSize[1]
|
221
306
|
)
|
222
307
|
);
|
223
|
-
if(
|
224
|
-
|
225
|
-
|
308
|
+
if(_rectOnly){
|
309
|
+
return _minRect;
|
310
|
+
}
|
311
|
+
if(!_win.rect.equals(_minRect)){
|
312
|
+
_win.prevRect = HRect.nu(_minRect);
|
313
|
+
_win.animateTo( _minRect );
|
226
314
|
}
|
227
315
|
}
|
316
|
+
this.makeRectRules();
|
228
317
|
},
|
229
318
|
|
230
319
|
/** This method gets called, whenever the zoom (maximize/restore)
|
231
320
|
* button has been clicked
|
232
321
|
**/
|
233
322
|
windowZoom: function(){
|
234
|
-
var
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
323
|
+
var
|
324
|
+
_maxSize = this.options.maxSize === 'auto' ? this.parentSize() : this.options.maxSize,
|
325
|
+
_maxRect = HRect.nu(
|
326
|
+
this.options.minX,
|
327
|
+
this.options.minY,
|
328
|
+
_maxSize[0],
|
329
|
+
_maxSize[1]
|
330
|
+
),
|
331
|
+
_fitsRect = HRect.nu( this.rect ),
|
332
|
+
_newRect,
|
333
|
+
i = 0,
|
334
|
+
_views = this.views,
|
335
|
+
_view, _size, _right, _bottom;
|
245
336
|
for( ; i < _views.length; i++ ){
|
246
337
|
_view = HSystem.views[_views[i]];
|
247
338
|
_size = ELEM.getSize(_view.elemId);
|
@@ -267,22 +358,58 @@ HWindow = HDynControl.extend({
|
|
267
358
|
else if(_fitsRect.height < this.options.minSize[1]){
|
268
359
|
_fitsRect.setHeight( this.options.minSize[1] );
|
269
360
|
}
|
361
|
+
// doesn't fit or right-clicked or alt-clicked, maximize:
|
270
362
|
if (!_fitsRect.equals(_maxRect) && (EVENT.status[ EVENT.button2 ] || EVENT.status[ EVENT.altKeyDown ]) ){
|
363
|
+
// console.log('force-max');
|
271
364
|
this.animateTo( _maxRect );
|
272
365
|
this.prevRect = HRect.nu( this.rect );
|
273
366
|
this.animateTo( _maxRect );
|
274
367
|
}
|
275
|
-
|
276
|
-
|
277
|
-
|
368
|
+
// already fits content
|
369
|
+
else if(this.rect.contains(_fitsRect)){
|
370
|
+
// restore previous
|
371
|
+
if(this.prevRect && !this.prevRect.equals(_fitsRect) && !this.prevRect.equals(this.windowCollapse(true))){
|
372
|
+
// restore previous size and position:
|
373
|
+
if( this.rect.equals( _maxRect ) ){
|
374
|
+
// console.log('restore');
|
375
|
+
this.animateTo( HRect.nu(this.prevRect) );
|
376
|
+
// this.prevRect = HRect.nu( this.rect );
|
377
|
+
}
|
378
|
+
else if( this.prevRect.equals( this.rect ) && !this.prevRect.equals(_fitsRect) ){
|
379
|
+
// console.log('smart-down');
|
380
|
+
this.animateTo( _fitsRect );
|
381
|
+
// this.prevRect = HRect.nu( this.rect );
|
382
|
+
}
|
383
|
+
else if( this.prevRect.equals( this.rect ) && this.prevRect.equals(_fitsRect) ){
|
384
|
+
// console.log('smart-max');
|
385
|
+
this.animateTo( _maxRect );
|
386
|
+
this.prevRect = HRect.nu( this.rect );
|
387
|
+
}
|
388
|
+
else{
|
389
|
+
// console.log('prev-size');
|
390
|
+
_newRect = HRect.nu( this.prevRect );
|
391
|
+
_newRect.offsetTo(this.rect.leftTop);
|
392
|
+
this.animateTo( _newRect );
|
393
|
+
this.prevRect = HRect.nu( _newRect );
|
394
|
+
}
|
395
|
+
}
|
396
|
+
// restore previous size only:
|
397
|
+
else if( this.rect.equals( _fitsRect ) && this.prevRect && !this.prevRect.equals(this.rect) ){
|
398
|
+
// console.log('restore-smart');
|
399
|
+
this.animateTo( this.prevRect );
|
400
|
+
// this.prevRect = HRect.nu( this.rect );
|
278
401
|
}
|
402
|
+
// maximize
|
279
403
|
else {
|
404
|
+
// console.log('max');
|
280
405
|
this.prevRect = HRect.nu( this.rect );
|
281
406
|
this.animateTo( _maxRect );
|
282
407
|
}
|
283
408
|
}
|
409
|
+
// smart-resize to fit content:
|
284
410
|
else {
|
285
|
-
|
411
|
+
// console.log('smart-up');
|
412
|
+
// this.prevRect = HRect.nu(_fitsRect);
|
286
413
|
this.animateTo( _fitsRect );
|
287
414
|
}
|
288
415
|
}
|
data/js/core/class/class.js
CHANGED
@@ -66,6 +66,9 @@ HClass = function() {
|
|
66
66
|
|
67
67
|
|
68
68
|
HClass.prototype = {
|
69
|
+
|
70
|
+
// detection for production build (compressed source; '_compressed' would be something like '_x4', whereas '_'+'compressed' is still '_compressed')
|
71
|
+
isProduction: '_'+'compressed' !== '_compressed',
|
69
72
|
|
70
73
|
/* The property copying method. */
|
71
74
|
extend: function(_source, _value) {
|
data/js/core/elem/elem.coffee
CHANGED
@@ -451,7 +451,7 @@ ELEM = HClass.extend
|
|
451
451
|
for i in [ 1.._loopMaxL ]
|
452
452
|
_key = _currTodo.shift()
|
453
453
|
_val = _attrCache[_key]
|
454
|
-
_elem
|
454
|
+
_elem[_key] = _val
|
455
455
|
null
|
456
456
|
|
457
457
|
###
|
@@ -459,27 +459,31 @@ ELEM = HClass.extend
|
|
459
459
|
###
|
460
460
|
_getAttrDirect: (_id, _key)->
|
461
461
|
_elem = @_elements[_id]
|
462
|
-
_elem
|
462
|
+
_attr = _elem[_key]
|
463
|
+
return _attr if _attr? and _attr != null
|
464
|
+
return _elem.getAttribute(_key)
|
463
465
|
|
464
466
|
###
|
465
467
|
Gets a named element attribute from the cache or selectively direct
|
466
468
|
###
|
467
469
|
getAttr: (_id, _key, _noCache)->
|
468
|
-
|
470
|
+
return null unless @_attrCache[_id]?
|
471
|
+
_key = 'className' if _key == 'class'
|
472
|
+
_val = @_attrCache[_id][_key]
|
473
|
+
if _noCache or not _val?
|
469
474
|
_val = @_getAttrDirect( _id, _key )
|
470
|
-
|
471
|
-
_val = @_attrCache[_id][_key]
|
472
|
-
@_attrCache[_id][_key] = _val
|
475
|
+
@_attrCache[_id][_key] = _val
|
473
476
|
_val
|
474
477
|
|
475
478
|
###
|
476
479
|
Sets a named element attribute into the cache and buffer or selectively direct
|
477
480
|
###
|
478
481
|
setAttr: (_id, _key, _value, _noCache)->
|
482
|
+
return null unless @_elements[_id]? # item is deleted
|
479
483
|
_attrTodo = @_attrTodo[_id]
|
480
484
|
_attrCache = @_attrCache[_id]
|
481
|
-
@_elements[_id]
|
482
|
-
_reCache = _value != @getAttr( _id, _key )
|
485
|
+
@_elements[_id][_key] = _value if _noCache
|
486
|
+
_reCache = ( _value != @getAttr( _id, _key ) )
|
483
487
|
if _reCache or _noCache
|
484
488
|
_attrCache[_key] = _value
|
485
489
|
unless _noCache
|
@@ -488,25 +492,27 @@ ELEM = HClass.extend
|
|
488
492
|
@_elemTodo.push( _id )
|
489
493
|
@_elemTodoH[ _id ] = true
|
490
494
|
@_checkNeedFlush()
|
491
|
-
|
495
|
+
true
|
492
496
|
|
493
497
|
###
|
494
498
|
Deletes a named element attribute
|
495
499
|
###
|
496
500
|
delAttr: (_id, _key)->
|
497
|
-
|
501
|
+
return null unless @_elements[_id]? # item is deleted
|
502
|
+
_attrTodo = @_attrTodo[_id]
|
498
503
|
_attrCache = @_attrCache[_id]
|
499
504
|
delete _attrCache[_key]
|
500
505
|
@_elements[_id].removeAttribute( _key )
|
501
506
|
_todoIndex = _attrTodo.indexOf( _key )
|
502
507
|
_attrTodo.splice( _todoIndex, 1 ) unless _todoIndex == -1
|
503
508
|
@_checkNeedFlush()
|
504
|
-
|
509
|
+
true
|
505
510
|
|
506
511
|
###
|
507
512
|
Checks if the element has a named CSS className
|
508
513
|
###
|
509
514
|
hasClassName: (_id, _className)->
|
515
|
+
return null unless @_elements[_id]? # item is deleted
|
510
516
|
_classNames = @_elements[_id].className.split(' ')
|
511
517
|
return _classNames.indexOf( _className ) != -1
|
512
518
|
|
@@ -514,6 +520,7 @@ ELEM = HClass.extend
|
|
514
520
|
Adds a named CSS className to the element
|
515
521
|
###
|
516
522
|
addClassName: (_id, _className)->
|
523
|
+
return null unless @_elements[_id]? # item is deleted
|
517
524
|
unless @hasClassName( _id, _className )
|
518
525
|
_elem = @_elements[_id]
|
519
526
|
if _elem.className.trim() == ''
|
@@ -527,7 +534,8 @@ ELEM = HClass.extend
|
|
527
534
|
###
|
528
535
|
Removes a named CSS className of the element
|
529
536
|
###
|
530
|
-
|
537
|
+
delClassName: (_id, _className)->
|
538
|
+
return null unless @_elements[_id]? # item is deleted
|
531
539
|
if @hasClassName( _id, _className )
|
532
540
|
_elem = @_elements[_id]
|
533
541
|
_classNames = _elem.className.split(' ')
|
@@ -535,6 +543,10 @@ ELEM = HClass.extend
|
|
535
543
|
_elem.className = _classNames.join(' ')
|
536
544
|
null
|
537
545
|
|
546
|
+
removeClassName: (_id, _className)->
|
547
|
+
console.log( 'ELEM.removeClassName is deprecated. Use ELEM.delClassName instead.' )
|
548
|
+
return @delClassName( _id, _className )
|
549
|
+
|
538
550
|
###
|
539
551
|
Checks if buffers need to be flushed
|
540
552
|
###
|
@@ -573,7 +585,10 @@ ELEM = HClass.extend
|
|
573
585
|
IE version of _setElementStyle
|
574
586
|
###
|
575
587
|
_setElementStyleIE: (_elem, _key, _value)->
|
576
|
-
|
588
|
+
try
|
589
|
+
_elem.style[@_camelize(_key)] = _value
|
590
|
+
catch e
|
591
|
+
console.log('ie setstyle error:'+_key+', '+_value+', '+e)
|
577
592
|
if BROWSER_TYPE.ie6
|
578
593
|
unless iefix._traverseStyleProperties.indexOf(_key) == -1
|
579
594
|
@_ieFixesNeeded = true
|
@@ -583,9 +598,10 @@ ELEM = HClass.extend
|
|
583
598
|
Sets and buffers the named style attribute value or selectively direct
|
584
599
|
###
|
585
600
|
setStyle: (_id, _key, _value, _noCache)->
|
601
|
+
return null unless @_elements[_id]? # item is deleted
|
586
602
|
if _id == undefined
|
587
603
|
console.log('ERROR; undefined id in ELEM#setStyle(',_id, _key, _value, _noCache,')')
|
588
|
-
_noCache = true if BROWSER_TYPE.ie9
|
604
|
+
# _noCache = true if BROWSER_TYPE.ie9
|
589
605
|
try
|
590
606
|
_cached = @_styleCache[_id]
|
591
607
|
catch e
|
@@ -652,12 +668,16 @@ ELEM = HClass.extend
|
|
652
668
|
_getComputedStyleIE: (_elem, _key)->
|
653
669
|
return _elem.clientWidth if _key == 'width'
|
654
670
|
return _elem.clientHeight if _key == 'height'
|
655
|
-
_elem.currentStyle
|
656
|
-
|
671
|
+
if _elem.currentStyle?
|
672
|
+
return _elem.currentStyle[@_camelize(_key)]
|
673
|
+
else
|
674
|
+
return _elem.style[@_camelize(_key)]
|
675
|
+
|
657
676
|
###
|
658
677
|
Gets the named element style attribute value.
|
659
678
|
###
|
660
679
|
getStyle: (_id, _key, _noCache)->
|
680
|
+
return null unless @_styleCache[_id]?
|
661
681
|
_cached = @_styleCache[_id]
|
662
682
|
_key = @_deCamelize(_key)
|
663
683
|
if _cached[_key] == undefined or _noCache
|