[GB.WEB.FORM]

* NEW: WebCheckBox: Default event is "Click".
* NEW: WebRadioButton: Default event is "Click".
* NEW: WebControl: Add as specific class for disabled controls.
* NEW: WebControl.Enabled now return FALSE as soon as a parent is disabled.
* NEW: Disabled look for WebRadioButton and WebCheckBox.
* BUG: WebSpinBox minimum height is the same as WebTextBox.


git-svn-id: svn://localhost/gambas/trunk@7799 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2016-06-11 14:20:20 +00:00
parent 853862d756
commit b6becf78b8
5 changed files with 27 additions and 1 deletions

View file

@ -219,6 +219,10 @@ _Similar
C
s
"WebButton"
_DefaultEvent
C
s
"Click"
:Click
:
@ -1332,6 +1336,10 @@ _Similar
C
s
"WebButton"
_DefaultEvent
C
s
"Click"
:Click
:

View file

@ -7,6 +7,7 @@ Public Const _Properties As String = "*,Text,Value"
Public Const _DrawWith As String = "CheckBox"
Public Const _DefaultSize As String = "24,4"
Public Const _Similar As String = "WebButton"
Public Const _DefaultEvent As String = "Click"
Event Click

View file

@ -253,6 +253,7 @@ Public Sub _GetClassId(Optional sClass As String) As String
If Not sClass Then sClass = "gw-" & LCase(Mid$(Object.Type(Me), 4))
If $bNoBorder Then sClass &= " gw-noborder"
If Not Me.Enabled Then sClass &= " gw-disabled"
If $sClass Then sClass &= " " & $sClass
sResult = " class=\"" & sClass & "\" id=\"" & $sName & "\""
If $sTooltip Then sResult &= " title=\"" & Replace($sTooltip, Chr$(34), """) & "\""
@ -630,7 +631,9 @@ End
Private Function Enabled_Read() As Boolean
Return Not $bDisabled
If $bDisabled Then Return
If $iParentId = 0 Then Return True
Return Parent_Read().Enabled
End

View file

@ -7,6 +7,7 @@ Public Const _Properties As String = "*,Text,Value"
Public Const _DrawWith As String = "RadioButton"
Public Const _DefaultSize As String = "24,4"
Public Const _Similar As String = "WebButton"
Public Const _DefaultEvent As String = "Click"
Event Click

View file

@ -122,6 +122,14 @@ P:first-child,UL:first-child,OL:first-child {
vertical-align: middle;
}
.gw-checkbox.gw-disabled > .gw-checkbox-label {
opacity: 0.5;
}
.gw-radiobutton.gw-disabled > .gw-checkbox-label {
opacity: 0.5;
}
.gw-checkbox-toggle,.gw-radiobutton-toggle {
vertical-align: middle;
margin: 0;
@ -273,6 +281,10 @@ P:first-child,UL:first-child,OL:first-child {
text-overflow: ellipsis;
}
.gw-label.gw-disabled {
opacity: 0.5;
}
#gw-modal {
display: none;
position: fixed;
@ -453,6 +465,7 @@ P:first-child,UL:first-child,OL:first-child {
}
.gw-spinbox {
min-height: 2rem;
padding: 0 0.25em;
}