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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/client/conf/client_pkg.yaml +6 -2
- data/client/js/comm/queue/queue.js +32 -44
- data/client/js/comm/transporter/transporter.js +24 -16
- data/client/js/comm/values/values.js +27 -15
- data/client/js/controls/button/button.coffee +14 -5
- data/client/js/controls/button/themes/default/button.css +4 -2
- data/client/js/controls/checkbox/checkbox.js +4 -4
- data/client/js/controls/dialogs/sheet/sheet.js +11 -11
- data/client/js/controls/dialogs/sheet/themes/default/sheet.html +1 -1
- data/client/js/controls/imageview/imageview.js +15 -15
- data/client/js/controls/numerictextcontrol/numerictextcontrol.coffee +32 -10
- data/client/js/controls/onoffbutton/onoffbutton.coffee +5 -5
- data/client/js/controls/progress/progressbar/progressbar.js +6 -7
- data/client/js/controls/progress/progressbar/themes/default/progressbar.css +4 -4
- data/client/js/controls/progress/progressbar/themes/default/progressbar.html +1 -2
- data/client/js/controls/sliders/slider/slider.js +74 -79
- data/client/js/controls/stepper/stepper.js +31 -31
- data/client/js/controls/stringview/stringview.js +20 -8
- data/client/js/controls/tab/tab.js +57 -63
- data/client/js/controls/tab/themes/default/tab.html +4 -1
- data/client/js/controls/textcontrol/textcontrol.coffee +13 -3
- data/client/js/controls/validatorview/validatorview.js +4 -4
- data/client/js/controls/window/window.js +43 -56
- data/client/js/core/class/class.js +25 -23
- data/client/js/core/elem/elem.coffee +8 -1
- data/client/js/core/rsence_ns/rsence_ns.coffee +6 -2
- data/client/js/core/util/util_methods/util_methods.coffee +57 -15
- data/client/js/datetime/calendar/calendar.coffee +196 -199
- data/client/js/datetime/calendar/themes/default/calendar.css +81 -159
- data/client/js/datetime/calendar/themes/default/calendar.html +9 -18
- data/client/js/datetime/datepicker/datepicker.coffee +18 -3
- data/client/js/datetime/datetimepicker/datetimepicker.coffee +6 -1
- data/client/js/datetime/datetimevalue/datetimevalue.coffee +194 -0
- data/client/js/datetime/momentjs/momentjs.js +310 -76
- data/client/js/datetime/timepicker/timepicker.coffee +6 -1
- data/client/js/datetime/timesheet/timesheet.js +59 -61
- data/client/js/foundation/control/control.js +45 -44
- data/client/js/foundation/control/controldefaults/controldefaults.js +13 -9
- data/client/js/foundation/control/dyncontrol/dyncontrol.js +45 -57
- data/client/js/foundation/control/eventresponder/eventresponder.js +97 -97
- data/client/js/foundation/control/valuematrix/valuematrix.js +13 -13
- data/client/js/foundation/eventmanager/eventmanager.coffee +50 -32
- data/client/js/foundation/geom/rect/rect.js +43 -32
- data/client/js/foundation/locale_settings/locale_settings.js +36 -25
- data/client/js/foundation/system/system.js +79 -67
- data/client/js/foundation/thememanager/thememanager.coffee +11 -1
- data/client/js/foundation/value/pullvalue/pullvalue.coffee +7 -0
- data/client/js/foundation/value/pushvalue/pushvalue.coffee +25 -0
- data/client/js/foundation/value/value.js +22 -15
- data/client/js/foundation/view/view.js +94 -55
- data/client/js/foundation/view/viewdefaults/viewdefaults.js +5 -1
- data/client/js/lists/listitems/listitems.js +26 -4
- data/client/js/menus/combobox/combobox.coffee +55 -0
- data/client/js/menus/minimenu/minimenu.js +61 -30
- data/client/js/menus/minimenu/themes/default/minimenu.css +1 -6
- data/client/js/menus/minimenu/themes/default/minimenu.html +5 -4
- data/client/js/menus/minimenuitem/minimenuitem.js +6 -6
- data/client/js/menus/popupmenu/themes/default/popupmenu.css +1 -6
- data/client/js/menus/popupmenu/themes/default/popupmenu.html +5 -4
- data/client/js/tables/table/table.coffee +109 -64
- data/client/js/tables/table/themes/default/table.css +4 -0
- data/lib/rsence/msg.rb +64 -64
- data/lib/rsence/plugins/plugin.rb +68 -52
- data/lib/rsence/session/sequel_sessionstorage.rb +5 -5
- data/lib/rsence/value.rb +79 -59
- data/plugins/client_pkg/lib/client_pkg_build.rb +5 -1
- data/plugins/client_pkg/lib/client_pkg_serve.rb +40 -32
- data/plugins/main/js/main.js +46 -28
- metadata +6 -8
- data/client/js/datetime/calendar/themes/default/calendar_arrows.png +0 -0
- data/client/js/datetime/calendar/themes/default/calendar_bg.png +0 -0
- data/client/js/datetime/calendar/themes/default/calendar_parts1.png +0 -0
- data/client/js/datetime/calendar/themes/default/calendar_parts2.png +0 -0
- data/client/js/datetime/datetimepicker/datetimepicker.js +0 -210
- data/client/js/datetime/datetimevalue/datetimevalue.js +0 -265
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
/*** = Description
|
3
|
-
** HStepper is a control unit made of two adjacent buttons with up and down arrows
|
4
|
-
** to select the previous or next of a set of contiguous values.
|
3
|
+
** HStepper is a control unit made of two adjacent buttons with up and down arrows
|
4
|
+
** to select the previous or next of a set of contiguous values.
|
5
5
|
** Normally, a HStepper instance works in combination with a HTextControl or a HStringView instance.
|
6
6
|
**
|
7
7
|
** = Instance Variables
|
@@ -14,34 +14,34 @@
|
|
14
14
|
|
15
15
|
var//RSence.Controls
|
16
16
|
HStepper = HControl.extend({
|
17
|
-
|
17
|
+
|
18
18
|
componentName: "stepper",
|
19
|
-
|
19
|
+
|
20
20
|
defaultEvents: {
|
21
21
|
mouseDown: true,
|
22
22
|
click: true,
|
23
23
|
keyDown: true,
|
24
24
|
mouseWheel: true
|
25
25
|
},
|
26
|
-
|
27
|
-
controlDefaults:
|
26
|
+
|
27
|
+
controlDefaults: HControlDefaults.extend({
|
28
28
|
minValue: 0,
|
29
29
|
maxValue: 100,
|
30
30
|
stepSize: 1,
|
31
31
|
repeatInterval: 200,
|
32
32
|
wrapAround: false
|
33
|
-
})
|
34
|
-
|
33
|
+
}),
|
34
|
+
|
35
35
|
/** Setter for wrap-around behaviour
|
36
36
|
**/
|
37
37
|
setWrapAround: function(_on){
|
38
38
|
this.options.wrapAround = _on;
|
39
39
|
},
|
40
|
-
|
40
|
+
|
41
41
|
// -- Makes sure the value is in its boundaries and either wrap-around
|
42
42
|
// to min/max or revert to the current value ++
|
43
43
|
_checkValueBoundaries: function(_value){
|
44
|
-
|
44
|
+
|
45
45
|
// -- checks for boundaries ++
|
46
46
|
var _this = this,
|
47
47
|
_options = _this.options,
|
@@ -50,15 +50,15 @@ HStepper = HControl.extend({
|
|
50
50
|
_tooSmall = _value<_minVal,
|
51
51
|
_tooBig = _value>_maxVal,
|
52
52
|
_overflow = ( _tooSmall || _tooBig );
|
53
|
-
|
53
|
+
|
54
54
|
// -- The value is ok, just return it as it is ++
|
55
55
|
if (!_overflow) {
|
56
56
|
return _value;
|
57
57
|
}
|
58
|
-
|
59
|
-
|
58
|
+
|
59
|
+
|
60
60
|
/// -- Handle the overflow condition: ++
|
61
|
-
|
61
|
+
|
62
62
|
// -- Wrap around uses min/max as new value as either is reached ++
|
63
63
|
if (_options.wrapAround) {
|
64
64
|
if (_tooSmall) {
|
@@ -72,9 +72,9 @@ HStepper = HControl.extend({
|
|
72
72
|
else {
|
73
73
|
return _this.value;
|
74
74
|
}
|
75
|
-
|
75
|
+
|
76
76
|
},
|
77
|
-
|
77
|
+
|
78
78
|
/** Adds the step size to the value
|
79
79
|
**/
|
80
80
|
stepUp: function(){
|
@@ -84,7 +84,7 @@ HStepper = HControl.extend({
|
|
84
84
|
)
|
85
85
|
);
|
86
86
|
},
|
87
|
-
|
87
|
+
|
88
88
|
/** Subtracts the step size from the value
|
89
89
|
**/
|
90
90
|
stepDown: function(){
|
@@ -94,22 +94,22 @@ HStepper = HControl.extend({
|
|
94
94
|
)
|
95
95
|
);
|
96
96
|
},
|
97
|
-
|
97
|
+
|
98
98
|
// -- Background-offset of the state images up/down,
|
99
99
|
// overrideable in the html template ++
|
100
100
|
bgStateUp: '0px -23px',
|
101
101
|
bgStateDown: '0px -46px',
|
102
|
-
|
102
|
+
|
103
103
|
// enables the up/down effect in the image based on the _up boolean (true means up, false means down)
|
104
104
|
_bgStateOn: function( _up ){
|
105
105
|
ELEM.setStyle(this.markupElemIds.state,'background-position',_up?this.bgStateUp:this.bgStateDown);
|
106
106
|
},
|
107
|
-
|
107
|
+
|
108
108
|
// reverts the up/down effect
|
109
109
|
_bgStateOff: function(){
|
110
110
|
ELEM.setStyle(this.markupElemIds.state,'background-position','');
|
111
111
|
},
|
112
|
-
|
112
|
+
|
113
113
|
// Starts the repeating stepping up or down (when the mouse button or a arrow key is down)
|
114
114
|
_setRepeatInterval: function( _up ){
|
115
115
|
var _this = this,
|
@@ -122,13 +122,13 @@ HStepper = HControl.extend({
|
|
122
122
|
_options.repeatInterval
|
123
123
|
);
|
124
124
|
},
|
125
|
-
|
125
|
+
|
126
126
|
// Stops the repeating stepping up or down enabled in _setRepeatInterval
|
127
127
|
_clearRepeatInterval: function(){
|
128
128
|
this._bgStateOff();
|
129
129
|
clearInterval( this._repeatInterval );
|
130
130
|
},
|
131
|
-
|
131
|
+
|
132
132
|
/** Checks where the mouseDown happened and adjusts the stepper up/down based on that
|
133
133
|
**/
|
134
134
|
mouseDown: function( x, y ){
|
@@ -136,25 +136,25 @@ HStepper = HControl.extend({
|
|
136
136
|
this._setRepeatInterval( ( y - this.pageY() ) <= 11 );
|
137
137
|
return true;
|
138
138
|
},
|
139
|
-
|
139
|
+
|
140
140
|
/** Stops the repeating stepping, when the mouse button goes up
|
141
141
|
**/
|
142
142
|
mouseUp: function(){
|
143
143
|
this._clearRepeatInterval();
|
144
144
|
return true;
|
145
145
|
},
|
146
|
-
|
146
|
+
|
147
147
|
click: function(){
|
148
148
|
this.mouseUp();
|
149
149
|
return true;
|
150
150
|
},
|
151
|
-
|
151
|
+
|
152
152
|
/** Stops the repeating stepping, when the control becomes inactive
|
153
153
|
**/
|
154
154
|
blur: function(){
|
155
155
|
this._clearRepeatInterval();
|
156
156
|
},
|
157
|
-
|
157
|
+
|
158
158
|
/** adjusts stepping up/down based on the arrow key pressed.
|
159
159
|
* up and right arrow keys steps the value up, down and left steps the value down
|
160
160
|
**/
|
@@ -183,20 +183,20 @@ HStepper = HControl.extend({
|
|
183
183
|
}
|
184
184
|
return true;
|
185
185
|
},
|
186
|
-
|
186
|
+
|
187
187
|
/** stops the repeating when a key goes up
|
188
188
|
**/
|
189
189
|
keyUp: function(){
|
190
190
|
this._clearRepeatInterval();
|
191
191
|
return true;
|
192
192
|
},
|
193
|
-
|
193
|
+
|
194
194
|
/** steps the value up/down based on the mouse scroll wheel
|
195
195
|
**/
|
196
196
|
mouseWheel: function(_delta) {
|
197
197
|
(_delta>0)?this.stepUp():this.stepDown();
|
198
198
|
return true;
|
199
199
|
}
|
200
|
-
|
201
|
-
|
200
|
+
|
201
|
+
|
202
202
|
});
|
@@ -1,10 +1,10 @@
|
|
1
1
|
|
2
2
|
/*** = Description
|
3
|
-
** HStringView is a view component that represents a non-editable line of text.
|
4
|
-
** Commonly, stringview is used as a label to control elements
|
5
|
-
** that do not have implicit labels (text fields, checkboxes and radio buttons, and menus).
|
6
|
-
** Some form controls automatically have labels associated with them (press buttons)
|
7
|
-
** while most do not have (text fields, checkboxes and radio buttons, and sliders etc.).
|
3
|
+
** HStringView is a view component that represents a non-editable line of text.
|
4
|
+
** Commonly, stringview is used as a label to control elements
|
5
|
+
** that do not have implicit labels (text fields, checkboxes and radio buttons, and menus).
|
6
|
+
** Some form controls automatically have labels associated with them (press buttons)
|
7
|
+
** while most do not have (text fields, checkboxes and radio buttons, and sliders etc.).
|
8
8
|
**
|
9
9
|
** = Instance variables
|
10
10
|
** +type+:: '[HStringView]'
|
@@ -16,10 +16,12 @@ var HStringView, HLabel;
|
|
16
16
|
var _HStringViewInterface = {
|
17
17
|
|
18
18
|
componentName: "stringview",
|
19
|
-
|
19
|
+
|
20
20
|
// allows text selection
|
21
21
|
textSelectable: true,
|
22
22
|
|
23
|
+
optimizeWidthOnRefresh: true,
|
24
|
+
|
23
25
|
/** = Description
|
24
26
|
* The setStyle method of HStringView applies only to the value
|
25
27
|
* element (not the whole component).
|
@@ -32,7 +34,7 @@ var HStringView, HLabel;
|
|
32
34
|
this.setStyleOfPart( 'value', _name, _value, _cacheOverride);
|
33
35
|
return this;
|
34
36
|
},
|
35
|
-
|
37
|
+
|
36
38
|
/** = Description
|
37
39
|
* The refreshLabel of HStringView sets a tool tip.
|
38
40
|
* Applied by the setLabel method and the label attribute of options.
|
@@ -47,6 +49,16 @@ var HStringView, HLabel;
|
|
47
49
|
this.setMarkupOfPart( 'value', this.label );
|
48
50
|
}
|
49
51
|
}
|
52
|
+
},
|
53
|
+
|
54
|
+
labelPadding: 0,
|
55
|
+
optimizeWidth: function(){
|
56
|
+
var _labelWidth = this.stringWidth((this.value || this.label),null,this.markupElemIds.value);
|
57
|
+
_labelWidth += this.labelPadding;
|
58
|
+
if( this.rect.width !== _labelWidth ){
|
59
|
+
this.rect.setWidth(_labelWidth);
|
60
|
+
this.drawRect();
|
61
|
+
}
|
50
62
|
}
|
51
63
|
};
|
52
64
|
|
@@ -55,7 +67,7 @@ var HStringView, HLabel;
|
|
55
67
|
defaultEvents: {
|
56
68
|
contextMenu: true
|
57
69
|
},
|
58
|
-
|
70
|
+
|
59
71
|
/** = Description
|
60
72
|
* HStringView allows the default contextMenu action.
|
61
73
|
*
|
@@ -35,17 +35,12 @@ HTab = HControl.extend({
|
|
35
35
|
refreshOnValueChange: true,
|
36
36
|
refreshOnLabelChange: false,
|
37
37
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
_ctrl.tabLabels = [];
|
45
|
-
_ctrl.tabLabelBounds = [];
|
46
|
-
_ctrl.tabLabelStrings = [];
|
47
|
-
}
|
48
|
-
})),
|
38
|
+
customOptions: function(_options){
|
39
|
+
this.tabs = [];
|
40
|
+
this.tabLabels = [];
|
41
|
+
this.tabLabelBounds = [];
|
42
|
+
this.tabLabelStrings = [];
|
43
|
+
},
|
49
44
|
|
50
45
|
rightmostPx: 0,
|
51
46
|
selectIdx: -1,
|
@@ -60,7 +55,10 @@ HTab = HControl.extend({
|
|
60
55
|
tabLabelRightEdge: 4,
|
61
56
|
|
62
57
|
// overridden in the template
|
63
|
-
fontStyle:
|
58
|
+
fontStyle: {
|
59
|
+
fontFamily: 'Helvetica, Arial, sans-serif',
|
60
|
+
fontSize: '13px'
|
61
|
+
},
|
64
62
|
|
65
63
|
tabLabelHTMLPrefix1: '<div class="edge_left"></div><div class="tablabel" style="width:',
|
66
64
|
tabLabelHTMLPrefix2: 'px">',
|
@@ -69,7 +67,7 @@ HTab = HControl.extend({
|
|
69
67
|
tabLabelElementTagName: 'div',
|
70
68
|
tabLabelAlign: 'left',
|
71
69
|
tabLabelFillBg: false,
|
72
|
-
tabTriggerLink:
|
70
|
+
tabTriggerLink: false,
|
73
71
|
tabLabelNoHTMLPrefix: false,
|
74
72
|
|
75
73
|
/** = Description
|
@@ -77,14 +75,14 @@ HTab = HControl.extend({
|
|
77
75
|
*
|
78
76
|
**/
|
79
77
|
refreshValue: function(){
|
80
|
-
var
|
78
|
+
var _this = this;
|
81
79
|
if(typeof _value === 'number'){
|
82
|
-
|
83
|
-
|
84
|
-
if(_index!==
|
85
|
-
|
80
|
+
this.pushTask( function(){
|
81
|
+
var _index = parseInt(_this.value,10);
|
82
|
+
if( _index < _this.tabs.length && _index !== _this.selectIdx){
|
83
|
+
_this.selectTab(_index);
|
86
84
|
}
|
87
|
-
}
|
85
|
+
});
|
88
86
|
}
|
89
87
|
},
|
90
88
|
|
@@ -138,55 +136,51 @@ HTab = HControl.extend({
|
|
138
136
|
**/
|
139
137
|
addTab: function(_tabLabel,_doSelect,_viewClass,_viewClassOptions){
|
140
138
|
var
|
141
|
-
|
139
|
+
_this = this,
|
140
|
+
_tabIdx = _this.tabs.length,
|
142
141
|
_tabLabelHTML = '',
|
143
|
-
_labelTextWidth =
|
144
|
-
_labelWidth = _labelTextWidth+
|
145
|
-
_tabLabelElemId = ELEM.make(
|
142
|
+
_labelTextWidth = _this.stringWidth( _tabLabel, null, 0, _this.fontStyle ),
|
143
|
+
_labelWidth = _labelTextWidth+_this.tabLabelLeftEdge+_this.tabLabelRightEdge,
|
144
|
+
_tabLabelElemId = ELEM.make(_this.markupElemIds[_this.tabLabelParentElem],_this.tabLabelElementTagName),
|
146
145
|
_tab;
|
147
146
|
if( _viewClass === undefined ){
|
148
|
-
_tab = HTabView.nu( [0,
|
147
|
+
_tab = HTabView.nu( [0,_this.tabLabelHeight,null,null,0,0], _this);
|
149
148
|
}
|
150
149
|
else {
|
151
|
-
_tab = _viewClass.nu( [0,
|
150
|
+
_tab = _viewClass.nu( [0,_this.tabLabelHeight,null,null,0,0], _this, _viewClassOptions );
|
152
151
|
}
|
153
|
-
_tabIdx =
|
154
|
-
if(
|
152
|
+
_tabIdx = _this.tabs.length;
|
153
|
+
if(_this.tabLabelNoHTMLPrefix){
|
155
154
|
_tabLabelHTML = _tabLabel;
|
156
155
|
}
|
157
156
|
else {
|
158
|
-
_tabLabelHTML =
|
157
|
+
_tabLabelHTML = _this.tabLabelHTMLPrefix1+_labelTextWidth+_this.tabLabelHTMLPrefix2+_tabLabel+_this.tabLabelHTMLSuffix;
|
159
158
|
}
|
160
159
|
_tab.hide();
|
161
160
|
ELEM.addClassName(_tabLabelElemId,'item_bg');
|
162
161
|
ELEM.setStyle(_tabLabelElemId,'width',_labelWidth+'px');
|
163
|
-
ELEM.setStyle(_tabLabelElemId,
|
162
|
+
ELEM.setStyle(_tabLabelElemId,_this.tabLabelAlign,_this.rightmostPx+'px');
|
164
163
|
ELEM.setHTML(_tabLabelElemId,_tabLabelHTML);
|
165
|
-
|
166
|
-
if(
|
167
|
-
|
168
|
-
}
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
}
|
182
|
-
else if (this.tabLabelFillBg) {
|
183
|
-
ELEM.setStyle(this.markupElemIds.state,'left',this.rightmostPx+'px');
|
184
|
-
}
|
185
|
-
this.tabs.push(_tab.viewId);
|
186
|
-
this.tabLabels.push(_tabLabelElemId);
|
164
|
+
_this.tabLabelStrings.push(_tabLabel);
|
165
|
+
if(_this.tabTriggerLink && !_this.isProduction){
|
166
|
+
console.log('HTab.options.tabTriggerLink is no longer supported')
|
167
|
+
}
|
168
|
+
_this.tabTriggerLink = false;
|
169
|
+
_this.setClick(true);
|
170
|
+
_this.tabLabelBounds.push([_this.rightmostPx,_this.rightmostPx+_labelWidth]);
|
171
|
+
_this.rightmostPx+=_labelWidth;
|
172
|
+
if(_this.tabLabelAlign === 'right'){
|
173
|
+
ELEM.setStyle(_this.markupElemIds[_this.tabLabelParentElem],'width',_this.rightmostPx+'px');
|
174
|
+
}
|
175
|
+
else if (_this.tabLabelFillBg) {
|
176
|
+
ELEM.setStyle(_this.markupElemIds.state,'left',_this.rightmostPx+'px');
|
177
|
+
}
|
178
|
+
_this.tabs.push(_tab.viewId);
|
179
|
+
_this.tabLabels.push(_tabLabelElemId);
|
187
180
|
_tab.tabIndex = _tabIdx;
|
188
|
-
|
189
|
-
|
181
|
+
|
182
|
+
if(_doSelect || (_this.value === _tabIdx)){
|
183
|
+
_this.selectTab(_tabIdx);
|
190
184
|
}
|
191
185
|
return _tab;
|
192
186
|
},
|
@@ -195,26 +189,26 @@ HTab = HControl.extend({
|
|
195
189
|
* click function
|
196
190
|
*
|
197
191
|
* = Parameters
|
198
|
-
* +
|
199
|
-
* +
|
192
|
+
* +x+::
|
193
|
+
* +y+::
|
200
194
|
*
|
201
195
|
**/
|
202
|
-
click: function(
|
196
|
+
click: function(x,y){
|
203
197
|
if(this.tabTriggerLink){
|
204
198
|
this.setClickable(false);
|
205
199
|
return;
|
206
200
|
}
|
207
|
-
|
208
|
-
|
209
|
-
if(
|
201
|
+
x -= this.pageX();
|
202
|
+
y -= this.pageY();
|
203
|
+
if(y<=this.tabLabelHeight){
|
210
204
|
if (this.tabLabelAlign === 'right') {
|
211
|
-
|
205
|
+
x = this.rect.width - x;
|
212
206
|
}
|
213
|
-
if(
|
207
|
+
if(x<=this.rightmostPx){
|
214
208
|
var i=0,_labelBounds;
|
215
209
|
for(i;i<this.tabLabelBounds.length;i++){
|
216
210
|
_labelBounds = this.tabLabelBounds[i];
|
217
|
-
if(
|
211
|
+
if(x<_labelBounds[1] && x>=_labelBounds[0]){
|
218
212
|
this.selectTab(i);
|
219
213
|
return;
|
220
214
|
}
|
@@ -296,7 +290,7 @@ HTabItem = {
|
|
296
290
|
_parent = _rect;
|
297
291
|
}
|
298
292
|
else {
|
299
|
-
console.warn
|
293
|
+
console.warn( "Warning: the rect constructor argument of HTabItem is deprecated." );
|
300
294
|
}
|
301
295
|
return _parent.addTab( _options.label, _options.select );
|
302
296
|
},
|
@@ -8,6 +8,9 @@ ${#!coffee
|
|
8
8
|
@tabLabelLeftEdge = ( @options.tabLabelLeftEdge or 12 )
|
9
9
|
@tabLabelRightEdge = ( @options.tabLabelRightEdge or 9 )
|
10
10
|
@tabLabelHeight = ( @options.tabLabelHeight or 24 )
|
11
|
-
@fontStyle =
|
11
|
+
@fontStyle =
|
12
|
+
fontFamily: 'Helvetica, Arial, sans-serif'
|
13
|
+
fontSize: '12px'
|
14
|
+
fontWeight: 'bold'
|
12
15
|
@tabLabelFillBg = true
|
13
16
|
}
|
@@ -25,7 +25,8 @@ HTextControl = HControl.extend
|
|
25
25
|
textIndent: 0
|
26
26
|
fontSize: '10px'
|
27
27
|
color: '#666'
|
28
|
-
|
28
|
+
labelWidth: 'auto'
|
29
|
+
refreshAfter: 0.0 # amount of milliseconds to wait for a refresh from the input field
|
29
30
|
refreshOnBlur: true
|
30
31
|
refreshOnInput: true
|
31
32
|
refreshOnIdle: true
|
@@ -56,7 +57,10 @@ HTextControl = HControl.extend
|
|
56
57
|
label: @label
|
57
58
|
style: @options.labelStyle
|
58
59
|
)
|
59
|
-
|
60
|
+
if @options.labelWidth == 'auto'
|
61
|
+
_labelWidth = @_labelView.stringWidth( @label, null, @_labelView.markupElemIds.value )+4
|
62
|
+
else
|
63
|
+
_labelWidth = @options.labelWidth
|
60
64
|
@_labelView.rect.setWidth( _labelWidth )
|
61
65
|
@_labelView.drawRect()
|
62
66
|
if @componentName == 'textarea'
|
@@ -286,10 +290,16 @@ HTextControl = HControl.extend
|
|
286
290
|
else if _inputElement.selectionStart
|
287
291
|
_inputElement.setSelectionRange( _selectionStart, _selectionEnd )
|
288
292
|
|
293
|
+
defaultKey: ->
|
294
|
+
@refreshAfter()
|
295
|
+
null
|
296
|
+
|
289
297
|
### = Description
|
290
298
|
## Receives the +textEnter+ event to update the value
|
291
299
|
## based on what's (potentially) entered in the text input field.
|
292
300
|
###
|
293
301
|
textEnter: ->
|
294
302
|
@refreshAfter() if @options.refreshOnInput
|
295
|
-
|
303
|
+
false
|
304
|
+
|
305
|
+
HTextField = HTextControl
|
@@ -2,10 +2,10 @@
|
|
2
2
|
var//RSence.Controls
|
3
3
|
HValidatorView = HControl.extend({
|
4
4
|
|
5
|
-
controlDefaults:
|
5
|
+
controlDefaults: HControlDefaults.extend({
|
6
6
|
value: false,
|
7
7
|
valueField: false
|
8
|
-
})
|
8
|
+
}),
|
9
9
|
|
10
10
|
setRect: function(_rect) {
|
11
11
|
var _options = this.options;
|
@@ -19,7 +19,7 @@ HValidatorView = HControl.extend({
|
|
19
19
|
}
|
20
20
|
this.base(_rect);
|
21
21
|
},
|
22
|
-
|
22
|
+
|
23
23
|
/** = Description
|
24
24
|
* Ensures the value set is a Boolean.
|
25
25
|
*
|
@@ -51,5 +51,5 @@ HValidatorView = HControl.extend({
|
|
51
51
|
ELEM.setStyle(_elemId,'background-position',_x+'px '+_y+'px');
|
52
52
|
}
|
53
53
|
|
54
|
-
|
54
|
+
|
55
55
|
});
|