rsence-pre 3.0.0.9 → 3.0.0.10
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/ext/Rakefile +18 -0
- data/client/js/controls/button/themes/default/button.html +1 -1
- data/client/js/controls/checkbox/checkbox.js +9 -4
- data/client/js/controls/checkbox/themes/default/checkbox.css +19 -29
- data/client/js/controls/checkbox/themes/default/checkbox.html +8 -6
- data/client/js/controls/dialogs/sheet/themes/default/sheet.css +25 -30
- data/client/js/controls/dialogs/sheet/themes/default/sheet.html +10 -10
- data/client/js/controls/numerictextcontrol/numerictextcontrol.coffee +7 -14
- data/client/js/controls/passwordcontrol/passwordcontrol.js +1 -5
- data/client/js/controls/radiobutton/themes/default/radiobutton.css +21 -31
- data/client/js/controls/radiobutton/themes/default/radiobutton.html +8 -6
- data/client/js/controls/searchfield/themes/default/searchfield.css +1 -1
- data/client/js/controls/sliders/slider/themes/default/slider.css +3 -3
- data/client/js/controls/sliders/vslider/themes/default/vslider.css +3 -3
- data/client/js/controls/stepper/themes/default/stepper.css +1 -1
- data/client/js/controls/stringview/stringview.js +9 -16
- data/client/js/controls/stringview/themes/default/stringview.css +10 -2
- data/client/js/controls/tab/themes/default/tab.css +3 -3
- data/client/js/controls/textarea/textarea.js +1 -3
- data/client/js/controls/textcontrol/textcontrol.coffee +173 -36
- data/client/js/controls/textcontrol/themes/default/textcontrol.css +64 -100
- data/client/js/controls/textcontrol/themes/default/textcontrol.html +14 -19
- data/client/js/controls/uploader/themes/default/uploader.css +1 -1
- data/client/js/controls/window/themes/default/window.css +8 -8
- data/client/js/core/elem/elem.coffee +6 -4
- data/client/js/core/event/event.js +6 -0
- data/client/js/datetime/datepicker/datepicker.coffee +7 -3
- data/client/js/foundation/eventmanager/eventmanager.coffee +9 -4
- data/client/js/foundation/thememanager/thememanager.coffee +8 -1
- data/client/js/foundation/view/view.js +19 -4
- data/client/js/menus/combobox/combobox.coffee +2 -2
- data/client/js/menus/menuitem/themes/default/menuitem.css +15 -27
- data/client/js/menus/menuitem/themes/default/menuitem.html +2 -4
- data/client/js/menus/minimenu/minimenu.js +11 -3
- data/client/js/menus/minimenu/themes/default/minimenu.css +23 -18
- data/client/js/menus/minimenu/themes/default/minimenu.html +6 -8
- data/client/js/menus/minimenuitem/minimenuitem.js +1 -1
- data/client/js/menus/minimenuitem/themes/default/minimenuitem.css +15 -27
- data/client/js/menus/minimenuitem/themes/default/minimenuitem.html +2 -4
- data/client/js/menus/popupmenu/themes/default/popupmenu.css +27 -19
- data/client/js/menus/popupmenu/themes/default/popupmenu.html +6 -8
- data/plugins/client_pkg/lib/client_pkg_build.rb +33 -4
- metadata +3 -7
- data/client/js/controls/passwordcontrol/themes/default/passwordcontrol.css +0 -0
- data/client/js/controls/passwordcontrol/themes/default/passwordcontrol.html +0 -18
- data/client/js/controls/stringview/themes/default/stringview.html +0 -1
- data/client/js/controls/textarea/themes/default/textarea.css +0 -36
- data/client/js/controls/textarea/themes/default/textarea.html +0 -20
@@ -20,17 +20,21 @@ HTextControl = HControl.extend
|
|
20
20
|
click: true
|
21
21
|
contextMenu: true
|
22
22
|
|
23
|
+
multiline: false
|
23
24
|
controlDefaults: HControlDefaults.extend
|
25
|
+
labelPadding: 2
|
24
26
|
labelStyle:
|
25
27
|
textIndent: 0
|
26
28
|
fontSize: '10px'
|
29
|
+
lineHeight: '14px'
|
27
30
|
color: '#666'
|
28
|
-
labelWidth:
|
31
|
+
labelWidth: 'auto'
|
29
32
|
refreshAfter: 0.0 # amount of milliseconds to wait for a refresh from the input field
|
30
33
|
refreshOnBlur: true
|
31
34
|
refreshOnInput: true
|
32
|
-
refreshOnIdle:
|
35
|
+
refreshOnIdle: false
|
33
36
|
focusOnCreate: false
|
37
|
+
unit: false # unit suffix
|
34
38
|
|
35
39
|
## This flag is true, when the text input field has focus.
|
36
40
|
hasTextFocus: false
|
@@ -40,16 +44,17 @@ HTextControl = HControl.extend
|
|
40
44
|
###
|
41
45
|
contextMenu: -> true
|
42
46
|
|
47
|
+
markupElemNames: ['value','invalid','label','subview','bg']
|
48
|
+
|
43
49
|
### = Description
|
44
50
|
## The refreshLabel method sets the title property of the text
|
45
51
|
## field, essentially creating a tooltip using the label.
|
46
52
|
###
|
53
|
+
labelPadding: 2
|
47
54
|
refreshLabel: ->
|
48
55
|
return unless @label
|
49
|
-
|
50
|
-
|
51
|
-
else
|
52
|
-
return
|
56
|
+
return unless @markupElemIds? and @markupElemIds.label?
|
57
|
+
@setAttrOfPart( 'label', 'title', @label )
|
53
58
|
if @_labelView?
|
54
59
|
@_labelView.setLabel( @label )
|
55
60
|
else
|
@@ -58,25 +63,94 @@ HTextControl = HControl.extend
|
|
58
63
|
style: @options.labelStyle
|
59
64
|
)
|
60
65
|
if @options.labelWidth == 'auto'
|
61
|
-
|
66
|
+
ELEM.flushElem([@_labelView.elemId])
|
67
|
+
_labelWidth = @_labelView.stringWidth( @label )
|
62
68
|
else
|
63
69
|
_labelWidth = @options.labelWidth
|
70
|
+
_labelWidth += @options.labelPadding || @labelPadding
|
64
71
|
@_labelView.rect.setWidth( _labelWidth )
|
65
72
|
@_labelView.drawRect()
|
66
|
-
if @
|
73
|
+
if @multiline
|
67
74
|
@setStyleOfPart('value','textIndent',_labelWidth+'px')
|
68
75
|
else
|
69
76
|
@setStyleOfPart('label','left',_labelWidth+'px')
|
70
77
|
|
71
|
-
|
72
|
-
|
78
|
+
_clearFocusBlurEvent: ->
|
79
|
+
_elemId = @markupElemIds.value
|
80
|
+
Event.stopObserving(_elemId,'focus',=>@textFocus())
|
81
|
+
Event.stopObserving(_elemId,'blur',=>@textBlur())
|
82
|
+
|
83
|
+
_invalidChar: '〰'
|
84
|
+
_setInvalidMarker: ->
|
85
|
+
_str = @getInputElement().value
|
86
|
+
_strLen = _str.length
|
87
|
+
if @fieldType == 'password'
|
88
|
+
_str = ''
|
89
|
+
for i in [1.._strLen]
|
90
|
+
_str += '•'
|
91
|
+
w = @stringWidth(_str,null,@markupElemIds.label,{
|
92
|
+
fontFamily: @styleOfPart('value','fontFamily')
|
93
|
+
fontSize: @styleOfPart('value','fontSize')
|
94
|
+
fontWeight: @styleOfPart('value','fontWeight')
|
95
|
+
whiteSpace: 'pre'
|
96
|
+
})
|
97
|
+
_invaCount = Math.ceil(w/@_invalidCharWidth)+1
|
98
|
+
_istr = ''
|
99
|
+
_align = @styleOfPart('value','textAlign')
|
100
|
+
@setStyleOfPart('invalid','textAlign',_align)
|
101
|
+
[ _left, _right ] = [
|
102
|
+
parseInt( @styleOfPart('value','left'), 10 ),
|
103
|
+
parseInt( @styleOfPart('value','right'), 10 )
|
104
|
+
]
|
105
|
+
[ _pLeft, _pRight ] = [
|
106
|
+
parseInt( @styleOfPart('value','paddingLeft'), 10 ),
|
107
|
+
parseInt( @styleOfPart('value','paddingRight'), 10 )
|
108
|
+
]
|
109
|
+
[ _mLeft, _mRight ] = [
|
110
|
+
parseInt( @styleOfPart('value','marginLeft'), 10 ),
|
111
|
+
parseInt( @styleOfPart('value','marginRight'), 10 )
|
112
|
+
]
|
113
|
+
if _align == 'right'
|
114
|
+
@setStyleOfPart('invalid','left','auto')
|
115
|
+
@setStyleOfPart('invalid','right',(_right+_pRight)+'px')
|
116
|
+
else
|
117
|
+
@setStyleOfPart('invalid','right','auto')
|
118
|
+
@setStyleOfPart('invalid','left',(_left+_pLeft+_mLeft)+'px')
|
119
|
+
@setStyleOfPart('invalid','width',w+'px')
|
120
|
+
@setStyleOfPart('invalid','visibility','inherit')
|
121
|
+
_istr += @_invalidChar for [0.._invaCount]
|
122
|
+
@setMarkupOfPart('invalid',_istr)
|
123
|
+
_unsetInvalidMarker: ->
|
124
|
+
@setMarkupOfPart('invalid','')
|
125
|
+
@setStyleOfPart('invalid','visibility','hidden')
|
126
|
+
|
127
|
+
setValid: (_state)-> # true == valid, false == invalid
|
128
|
+
@_isValid = _state
|
129
|
+
if _state
|
130
|
+
@_unsetInvalidMarker()
|
131
|
+
else
|
132
|
+
@_setInvalidMarker()
|
133
|
+
|
134
|
+
fieldType: 'text'
|
135
|
+
drawMarkup: ->
|
73
136
|
@base()
|
137
|
+
@_invalidCharWidth = @stringWidth(@_invalidChar,null,@markupElemIds.invalid)
|
138
|
+
_parentId = @markupElemIds.label
|
139
|
+
if @multiline
|
140
|
+
_elemId = ELEM.make(_parentId,'textarea')
|
141
|
+
else
|
142
|
+
_elemId = ELEM.make(_parentId,'input',{attr:{type:@fieldType,value:@value}})
|
143
|
+
@markupElemIds.value = _elemId
|
144
|
+
@setCSSClass('value','input')
|
145
|
+
Event.observe(_elemId,'focus',=>@textFocus())
|
146
|
+
Event.observe(_elemId,'blur',=>@textBlur())
|
74
147
|
if @options.focusOnCreate
|
75
148
|
@getInputElement().focus()
|
76
149
|
@setSelectionRange( @value.length, @value.length ) if @typeChr(@value) == 's'
|
77
150
|
|
78
|
-
lostActiveStatus: ->
|
79
|
-
|
151
|
+
lostActiveStatus: (_prevActive)->
|
152
|
+
@base(_prevActive)
|
153
|
+
if @markupElemIds? and @markupElemIds.value? and _prevActive != @
|
80
154
|
ELEM.get( @markupElemIds.value ).blur()
|
81
155
|
@textBlur()
|
82
156
|
|
@@ -86,12 +160,14 @@ HTextControl = HControl.extend
|
|
86
160
|
@setStyleOfPart('value', _name, _value, _cacheOverride)
|
87
161
|
|
88
162
|
click: ->
|
89
|
-
@getInputElement().focus()
|
163
|
+
@getInputElement().focus() unless @hasTextFocus
|
90
164
|
|
91
165
|
setEnabled: (_flag)->
|
92
166
|
@base(_flag)
|
93
167
|
if @markupElemIds? and @markupElemIds.value?
|
94
168
|
ELEM.get(@markupElemIds.value).disabled = !@enabled
|
169
|
+
else
|
170
|
+
@pushTask => @setEnabled(_flag)
|
95
171
|
|
96
172
|
_clipboardEventTimer: null
|
97
173
|
_getChangeEventFn: ->
|
@@ -130,6 +206,7 @@ HTextControl = HControl.extend
|
|
130
206
|
##
|
131
207
|
###
|
132
208
|
textFocus: ->
|
209
|
+
return if @hasTextFocus
|
133
210
|
EVENT.changeActiveControl( @ )
|
134
211
|
@hasTextFocus = true
|
135
212
|
@_setChangeEventFn()
|
@@ -140,6 +217,7 @@ HTextControl = HControl.extend
|
|
140
217
|
## Called when the input field loses focus.
|
141
218
|
###
|
142
219
|
textBlur: ->
|
220
|
+
return unless @hasTextFocus
|
143
221
|
@hasTextFocus = false
|
144
222
|
@_clearChangeEventFn()
|
145
223
|
if @options.refreshOnBlur
|
@@ -147,8 +225,8 @@ HTextControl = HControl.extend
|
|
147
225
|
@refreshValue()
|
148
226
|
true
|
149
227
|
|
150
|
-
idle: ->
|
151
|
-
|
228
|
+
# idle: ->
|
229
|
+
# @refreshAfter() if @hasTextFocus and @options.refreshOnIdle and @options.refreshOnInput
|
152
230
|
|
153
231
|
refreshValue: ->
|
154
232
|
@setTextFieldValue( @value )
|
@@ -157,8 +235,7 @@ HTextControl = HControl.extend
|
|
157
235
|
## Placeholder method for validation of the value.
|
158
236
|
##
|
159
237
|
###
|
160
|
-
validateText: (_value)->
|
161
|
-
@fieldToValue(_value)
|
238
|
+
validateText: (_value)-> @fieldToValue(_value)
|
162
239
|
|
163
240
|
### = Description
|
164
241
|
## Returns the input element or null, if no input element created (yet).
|
@@ -172,10 +249,8 @@ HTextControl = HControl.extend
|
|
172
249
|
###
|
173
250
|
getTextFieldValue: ->
|
174
251
|
_inputElement = @getInputElement()
|
175
|
-
if _inputElement?
|
176
|
-
|
177
|
-
else
|
178
|
-
return ''
|
252
|
+
return _inputElement.value if _inputElement?
|
253
|
+
''
|
179
254
|
|
180
255
|
valueToField: (_value)-> _value
|
181
256
|
fieldToValue: (_value)-> _value
|
@@ -191,8 +266,11 @@ HTextControl = HControl.extend
|
|
191
266
|
return unless _inputElement?
|
192
267
|
[ _selectionStart, _selectionEnd ] = @getSelectionRange()
|
193
268
|
_value = @valueToField(_value)
|
194
|
-
|
195
|
-
@
|
269
|
+
@_lastFieldValue = _value
|
270
|
+
unless @hasTextFocus
|
271
|
+
_inputElement.value = _value if _inputElement.value != _value.toString()
|
272
|
+
@setSelectionRange( _selectionStart, _selectionEnd )
|
273
|
+
@setValid(true) if _inputElement.value == _value
|
196
274
|
|
197
275
|
# returns a random number prefixed and suffixed with '---'
|
198
276
|
_randomMarker: -> '---'+Math.round((1+Math.random())*10000)+'---'
|
@@ -202,13 +280,14 @@ HTextControl = HControl.extend
|
|
202
280
|
clearTimeout(@_refreshTimer) if @_refreshTimer
|
203
281
|
@_refreshTimer = null
|
204
282
|
@_clearChangeEventFn()
|
283
|
+
@_clearFocusBlurEvent()
|
205
284
|
@base()
|
206
285
|
|
207
286
|
### = Description
|
208
287
|
## Returns the selection (or text cursor position) of the input element
|
209
288
|
## as an +Array+ like +[ startOffset, endOffset ]+.
|
210
289
|
###
|
211
|
-
|
290
|
+
_getLeftAlignedSelectionRange: ->
|
212
291
|
_inputElement = @getInputElement()
|
213
292
|
if _inputElement == null or @hasTextFocus == false
|
214
293
|
_rangeArr = [ 0, 0 ]
|
@@ -239,25 +318,52 @@ HTextControl = HControl.extend
|
|
239
318
|
else
|
240
319
|
_rangeArr = [ 0, 0 ]
|
241
320
|
return _rangeArr
|
242
|
-
|
321
|
+
_getRightAlignedSelectionRange: ->
|
322
|
+
_inputElement = @getInputElement()
|
323
|
+
_inputValue = _inputElement.value
|
324
|
+
_valueLength = _inputValue.length
|
325
|
+
if _inputElement == null or @hasTextFocus == false
|
326
|
+
_rangeArr = [ 0, 0 ]
|
327
|
+
## Other browsers
|
328
|
+
else if _inputElement.selectionStart
|
329
|
+
_rangeArr = [ _valueLength-_inputElement.selectionStart, _valueLength-_inputElement.selectionEnd ]
|
330
|
+
## Internet Explorer:
|
331
|
+
else if document.selection
|
332
|
+
# create a range object
|
333
|
+
_range = document.selection.createRange()
|
334
|
+
# original range text
|
335
|
+
_rangeText = _range.text
|
336
|
+
_rangeLength = _rangeText.length
|
337
|
+
# make a copy of the text and replace \r\n with \n
|
338
|
+
_origValue = _inputElement.value.replace(/\r\n/g, "\n")
|
339
|
+
# create random marker to replace the text with
|
340
|
+
_marker = @_randomMarker()
|
341
|
+
# re-generate marker if it's found in the text.
|
342
|
+
_marker = @_randomMarker() while ~_origValue.indexOf( _marker )
|
343
|
+
_markerLength = _marker.length
|
344
|
+
# temporarily set the text of the selection to the unique marker
|
345
|
+
_range.text = _marker
|
346
|
+
_markerValue = _inputElement.value.replace(/\r\n/g, "\n")
|
347
|
+
_range.text = _rangeText
|
348
|
+
_markerIndex = _markerValue.indexOf( _marker )
|
349
|
+
_rangeArr = [ _valueLength-_markerIndex, _valueLength-_markerIndex + _rangeLength ]
|
350
|
+
## No support:
|
351
|
+
else
|
352
|
+
_rangeArr = [ 0, 0 ]
|
353
|
+
return _rangeArr
|
354
|
+
getSelectionRange: ->
|
355
|
+
return @_getRightAlignedSelectionRange() if @styleOfPart('value','textAlign') == 'right'
|
356
|
+
@_getLeftAlignedSelectionRange()
|
243
357
|
_refreshTimer: null
|
244
358
|
_lastFieldValue: null
|
245
359
|
refreshAfter: ->
|
246
360
|
_fieldValue = @getTextFieldValue()
|
247
|
-
if @_lastFieldValue
|
361
|
+
if not @_lastFieldValue? or _fieldValue != @_lastFieldValue
|
248
362
|
@_lastFieldValue = _fieldValue
|
249
363
|
if @_refreshTimer
|
250
364
|
clearTimeout( @_refreshTimer )
|
251
365
|
@_refreshTimer = null
|
252
|
-
|
253
|
-
_this = @
|
254
|
-
@_refreshTimer = setTimeout( (->
|
255
|
-
_this._updateValueFromField()
|
256
|
-
), @options.refreshAfter*1000 )
|
257
|
-
else
|
258
|
-
@_updateValueFromField()
|
259
|
-
# @setValue( @validateText( @getTextFieldValue() ) )
|
260
|
-
# @refreshValue()
|
366
|
+
@pushTask => @_updateValueFromField()
|
261
367
|
|
262
368
|
### = Description
|
263
369
|
## Sets the selection (or text cursor position) of the input element.
|
@@ -281,6 +387,10 @@ HTextControl = HControl.extend
|
|
281
387
|
_selectionEnd = _selectionStart
|
282
388
|
_inputElement = @getInputElement()
|
283
389
|
return if _inputElement == null or @hasTextFocus == false
|
390
|
+
if @styleOfPart('value','textAlign') == 'right'
|
391
|
+
_len = _inputElement.value.length
|
392
|
+
_selectionStart = _len - _selectionStart
|
393
|
+
_selectionEnd = _len - _selectionEnd
|
284
394
|
# Internet Explorer
|
285
395
|
if _inputElement.createTextRange
|
286
396
|
_range = _inputElement.createTextRange()
|
@@ -300,6 +410,33 @@ HTextControl = HControl.extend
|
|
300
410
|
###
|
301
411
|
textEnter: ->
|
302
412
|
@refreshAfter() if @options.refreshOnInput
|
303
|
-
|
413
|
+
true
|
414
|
+
|
415
|
+
drawSubviews: ->
|
416
|
+
@drawUnit()
|
417
|
+
|
418
|
+
_extraLabelRight: 0
|
419
|
+
drawUnit: ->
|
420
|
+
if @options.unit
|
421
|
+
_style =
|
422
|
+
fontSize: @styleOfPart('value','fontSize')
|
423
|
+
fontFamily: @styleOfPart('value','fontFamily')
|
424
|
+
fontWeight: @styleOfPart('value','fontWeight')
|
425
|
+
color: @styleOfPart('value','color')
|
426
|
+
whiteSpace: 'pre'
|
427
|
+
textAlign: 'right'
|
428
|
+
verticalAlign: 'middle'
|
429
|
+
lineHeight: '100%'
|
430
|
+
ELEM.flush()
|
431
|
+
[ w, h ] = @stringSize(@options.unit,null,@markupElemIds.label,true,_style)
|
432
|
+
h = ELEM.getSize(@markupElemIds.label)[1]
|
433
|
+
_style.lineHeight = h+'px'
|
434
|
+
_unitRect = [null,1,w+4,h-2,4,1]
|
435
|
+
@unitSuffix = HLabel.new(_unitRect,@,
|
436
|
+
label: @options.unit
|
437
|
+
style: _style
|
438
|
+
)
|
439
|
+
@_extraLabelRight += @unitSuffix.rect.width
|
440
|
+
@setStyleOfPart('label','right',this._extraLabelRight+'px')
|
304
441
|
|
305
442
|
HTextField = HTextControl
|
@@ -1,137 +1,101 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
.default.textcontrol {
|
2
|
+
overflow: visible;
|
3
|
+
}
|
4
|
+
.default.textcontrol > .input_parent {
|
5
|
+
position: absolute; z-index: 2;
|
6
|
+
left: 1px; top: 1px; right: 1px; bottom: 1px;
|
7
|
+
}
|
8
|
+
.default.textcontrol > .input_parent > .input {
|
9
|
+
position: absolute; display: block;
|
5
10
|
font-family: Helvetica, Arial, sans-serif;
|
6
|
-
font-size: 13px;
|
7
|
-
color: #000;
|
11
|
+
font-size: 13px; color: #000; resize: none;
|
8
12
|
background-color: transparent;
|
9
13
|
vertical-align: middle;
|
10
|
-
border: 0;
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
)}
|
14
|
+
border: 0; left: 0; top: 0;
|
15
|
+
right: 0; bottom: 0;
|
16
|
+
width: 100%; height: 100%;
|
17
|
+
-moz-box-sizing: border-box;
|
18
|
+
-webkit-box-sizing: border-box;
|
19
|
+
box-sizing: border-box;
|
17
20
|
}
|
18
|
-
|
19
|
-
|
20
|
-
outline-color: transparent;
|
21
|
-
outline-style: none;
|
21
|
+
.default.textcontrol > .input_parent > .input::-ms-clear {
|
22
|
+
display: none;
|
22
23
|
}
|
23
|
-
|
24
|
-
.default .
|
25
|
-
color:
|
24
|
+
.default.textcontrol.disabled > .input_parent > .input { color: #333; }
|
25
|
+
.default.textcontrol > .input_parent > .input:focus {
|
26
|
+
outline-color: transparent; outline-style: none;
|
27
|
+
}
|
28
|
+
.default.textcontrol > .input_parent > .input_invalid {
|
29
|
+
position: absolute; white-space: nowrap; overflow: hidden;
|
30
|
+
vertical-align: bottom; visibility: hidden;
|
31
|
+
bottom: 1px; font-size: 10px; line-height: 6px;
|
32
|
+
color: #c00; z-index: 0; font-weight: bold;
|
26
33
|
}
|
27
34
|
|
28
|
-
|
35
|
+
|
36
|
+
|
37
|
+
.default.textcontrol > .subview {
|
29
38
|
position: absolute;
|
30
39
|
left: 0; top: 0; right: 0; bottom: 0;
|
31
40
|
z-index: 1;
|
32
41
|
}
|
42
|
+
.default.textcontrol.active > .subview { display: none; }
|
33
43
|
|
34
|
-
.default .active>.textcontrol_subview {
|
35
|
-
display: none;
|
36
|
-
}
|
37
44
|
|
38
|
-
.default .textcontrol_input_parent {
|
39
|
-
position: absolute;
|
40
|
-
z-index: 2;
|
41
|
-
#{(
|
42
|
-
((BROWSER_TYPE.chrome && BROWSER_TYPE.mac)||BROWSER_TYPE.firefox||BROWSER_TYPE.ie7||BROWSER_TYPE.ie8||BROWSER_TYPE.ie9||BROWSER_TYPE.ie10||BROWSER_TYPE.opera)?
|
43
|
-
'left:0;padding-left:1px;top:0;right:4px;bottom:0;':
|
44
|
-
'left:-2px;top:-2px;right:-2px;bottom:-2px;'
|
45
|
-
)}
|
46
|
-
#{(BROWSER_TYPE.chrome && BROWSER_TYPE.mac)?'top:1px;':''}
|
47
|
-
}
|
48
45
|
|
49
|
-
.default .
|
46
|
+
.default.textcontrol > .bg > .c {
|
50
47
|
position: absolute;
|
51
48
|
left: 2px; top: 2px; right: 2px; bottom: 2px;
|
52
49
|
background-color: #fff;
|
53
50
|
}
|
54
|
-
|
55
|
-
.default .active>.textcontrol_bg {
|
51
|
+
.default.textcontrol.active > .bg > .c {
|
56
52
|
left: 0; top: 0; right: 0; bottom: 0;
|
57
53
|
-webkit-box-shadow: 0 0 3px #333;
|
58
54
|
box-shadow: 0 0 3px #333;
|
59
55
|
}
|
56
|
+
.default.textcontrol.disabled > .bg > .c { background-color: #eee; }
|
60
57
|
|
61
|
-
.default .
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
.default .textcontrol_ne,
|
67
|
-
.default .textcontrol_nw,
|
68
|
-
.default .textcontrol_se,
|
69
|
-
.default .textcontrol_sw {
|
70
|
-
position: absolute;
|
71
|
-
width: 7px; height: 7px;
|
58
|
+
.default.textcontrol > .bg > .ne,
|
59
|
+
.default.textcontrol > .bg > .nw,
|
60
|
+
.default.textcontrol > .bg > .se,
|
61
|
+
.default.textcontrol > .bg > .sw {
|
62
|
+
position: absolute; width: 7px; height: 7px;
|
72
63
|
background-repeat: no-repeat;
|
73
|
-
background-image: #
|
64
|
+
background-image: #url(textcontrol_parts1.png);
|
74
65
|
}
|
75
|
-
|
76
|
-
|
77
|
-
left: 0; top: 0;
|
78
|
-
background-position: 0 0;
|
66
|
+
.default.textcontrol > .bg > .nw {
|
67
|
+
left: 0; top: 0; background-position: 0 0;
|
79
68
|
}
|
80
|
-
|
81
|
-
|
82
|
-
right: 0; top: 0;
|
83
|
-
background-position: -7px 0;
|
69
|
+
.default.textcontrol > .bg > .ne {
|
70
|
+
right: 0; top: 0; background-position: -7px 0;
|
84
71
|
}
|
85
|
-
|
86
|
-
|
87
|
-
left: 0; bottom: 0;
|
88
|
-
background-position: 0 -7px;
|
72
|
+
.default.textcontrol > .bg > .sw {
|
73
|
+
left: 0; bottom: 0; background-position: 0 -7px;
|
89
74
|
}
|
90
|
-
|
91
|
-
|
92
|
-
right: 0; bottom: 0;
|
93
|
-
background-position: -7px -7px;
|
75
|
+
.default.textcontrol > .bg > .se {
|
76
|
+
right: 0; bottom: 0; background-position: -7px -7px;
|
94
77
|
}
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
.default .textcontrol_w,
|
99
|
-
.default .textcontrol_e {
|
100
|
-
position: absolute;
|
101
|
-
width: 7px; top: 7px; bottom: 7px;
|
78
|
+
.default.textcontrol > .bg > .w,
|
79
|
+
.default.textcontrol > .bg > .e {
|
80
|
+
position: absolute; width: 7px; top: 7px; bottom: 7px;
|
102
81
|
background-repeat: repeat-y;
|
103
|
-
background-image: #
|
82
|
+
background-image: #url(textcontrol_parts3.png);
|
104
83
|
}
|
105
|
-
|
106
|
-
|
107
|
-
left: 0;
|
108
|
-
background-position: 0 0;
|
84
|
+
.default.textcontrol > .bg > .w {
|
85
|
+
left: 0; background-position: 0 0;
|
109
86
|
}
|
110
|
-
|
111
|
-
|
112
|
-
right: 0;
|
113
|
-
background-position: -7px 0;
|
87
|
+
.default.textcontrol > .bg > .e {
|
88
|
+
right: 0; background-position: -7px 0;
|
114
89
|
}
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
.default .textcontrol_n,
|
119
|
-
.default .textcontrol_s {
|
120
|
-
position: absolute;
|
121
|
-
height: 7px; left: 7px; right: 7px;
|
90
|
+
.default.textcontrol > .bg > .n,
|
91
|
+
.default.textcontrol > .bg > .s {
|
92
|
+
position: absolute; height: 7px; left: 7px; right: 7px;
|
122
93
|
background-repeat: repeat-x;
|
123
|
-
background-image: #
|
94
|
+
background-image: #url(textcontrol_parts2.png);
|
124
95
|
}
|
125
|
-
|
126
|
-
|
127
|
-
top: 0;
|
128
|
-
background-position: 0 0;
|
96
|
+
.default.textcontrol > .bg > .n {
|
97
|
+
top: 0; background-position: 0 0;
|
129
98
|
}
|
130
|
-
|
131
|
-
|
132
|
-
bottom: 0;
|
133
|
-
background-position: 0 -7px;
|
99
|
+
.default.textcontrol > .bg > .s {
|
100
|
+
bottom: 0; background-position: 0 -7px;
|
134
101
|
}
|
135
|
-
|
136
|
-
|
137
|
-
|
@@ -1,20 +1,15 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
<div class="
|
4
|
-
<div class="
|
5
|
-
<div class="
|
6
|
-
<div class="
|
7
|
-
|
8
|
-
<div class="
|
9
|
-
<div class="
|
10
|
-
<div class="
|
11
|
-
|
12
|
-
|
13
|
-
<div id="
|
14
|
-
|
15
|
-
<div id="label]I[" title="#{this.label}" class="textcontrol_input_parent">
|
16
|
-
<input type="text" class="textcontrol_input" #{this.enabled?'':'disabled'}
|
17
|
-
onfocus="HSystem.views[#{this.viewId}].textFocus();"
|
18
|
-
onblur="HSystem.views[#{this.viewId}].textBlur();"
|
19
|
-
id="value]I[" value="#{this.value}" />
|
1
|
+
<div class="bg" id="bg]I[">
|
2
|
+
<div class="n"></div>
|
3
|
+
<div class="s"></div>
|
4
|
+
<div class="w"></div>
|
5
|
+
<div class="e"></div>
|
6
|
+
<div class="c"></div>
|
7
|
+
<div class="nw"></div>
|
8
|
+
<div class="ne"></div>
|
9
|
+
<div class="se"></div>
|
10
|
+
<div class="sw"></div>
|
11
|
+
</div>
|
12
|
+
<div id="subview]I[" class="subview"></div>
|
13
|
+
<div id="label]I[" title="#{this.label}" class="input_parent">
|
14
|
+
<div class="input_invalid" id="invalid]I["></div>
|
20
15
|
</div>
|
@@ -54,7 +54,7 @@
|
|
54
54
|
}
|
55
55
|
|
56
56
|
.window_titlebar * {
|
57
|
-
background-image: #
|
57
|
+
background-image: #url(window_parts1.png);
|
58
58
|
}
|
59
59
|
|
60
60
|
.window_titlebar_edge_left {
|
@@ -80,7 +80,7 @@
|
|
80
80
|
left: 24px; top: 0; right: 24px; height: 24px;
|
81
81
|
background-position: 0 0;
|
82
82
|
background-repeat: repeat-x;
|
83
|
-
background-image: #
|
83
|
+
background-image: #url(window_parts2.png);
|
84
84
|
}
|
85
85
|
|
86
86
|
.inactive > .window_titlebar > .window_titlebar_center {
|
@@ -90,11 +90,11 @@
|
|
90
90
|
.window_bg {
|
91
91
|
left: 24px; top: 24px; right: 24px; bottom: 24px;
|
92
92
|
background-repeat: repeat;
|
93
|
-
background-image: #
|
93
|
+
background-image: #url(window_bg_active.png);
|
94
94
|
}
|
95
95
|
|
96
96
|
.inactive > .window_bg {
|
97
|
-
background-image: #
|
97
|
+
background-image: #url(window_bg_inactive.png);
|
98
98
|
}
|
99
99
|
|
100
100
|
.window_body {
|
@@ -102,7 +102,7 @@
|
|
102
102
|
}
|
103
103
|
|
104
104
|
.window_body * {
|
105
|
-
background-image: #
|
105
|
+
background-image: #url(window_parts1.png);
|
106
106
|
}
|
107
107
|
|
108
108
|
.window_body_edge_left {
|
@@ -146,7 +146,7 @@
|
|
146
146
|
left: 24px; bottom: 0; right: 24px; height: 24px;
|
147
147
|
background-repeat: repeat-x;
|
148
148
|
background-position: 0 -24px;
|
149
|
-
background-image: #
|
149
|
+
background-image: #url(window_parts2.png);
|
150
150
|
}
|
151
151
|
|
152
152
|
.inactive > .window_body > .window_body_edge_bottom {
|
@@ -183,7 +183,7 @@
|
|
183
183
|
z-index: 10000;
|
184
184
|
background-position: -59px -35px;
|
185
185
|
font-size: 0;
|
186
|
-
background-image: #
|
186
|
+
background-image: #url(window_parts1.png)
|
187
187
|
}
|
188
188
|
|
189
189
|
.inactive > .window_resize_se {
|
@@ -194,7 +194,7 @@
|
|
194
194
|
.window_controls_collapse,
|
195
195
|
.window_controls_zoom {
|
196
196
|
top: 6px; width: 15px; height: 15px;
|
197
|
-
background-image: #
|
197
|
+
background-image: #url(window_buttons.png)
|
198
198
|
}
|
199
199
|
|
200
200
|
.window_controls_close {
|
@@ -677,12 +677,14 @@ ELEM = HClass.extend
|
|
677
677
|
_id = @_add( _elem )
|
678
678
|
@_initCache( _id )
|
679
679
|
if _options?
|
680
|
-
if _options.attrs?
|
681
|
-
|
682
|
-
|
680
|
+
_attrs = _options.attrs if _options.attrs?
|
681
|
+
_attrs = _options.attr if _options.attr? and not _attr?
|
682
|
+
if _attrs?
|
683
|
+
if _attrs instanceof Array
|
684
|
+
for _attr in _attrs
|
683
685
|
@setAttr( _id, _attr[0], _attr[1], true )
|
684
686
|
else
|
685
|
-
for _attrName, _attrValue of
|
687
|
+
for _attrName, _attrValue of _attrs
|
686
688
|
@setAttr( _id, _attrName, _attrValue, true )
|
687
689
|
if _options.styles
|
688
690
|
@setStyles( _id, _options.styles )
|