Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • xmonader/gambas
  • gambas/gambas
  • gbWilly/gambas
  • dtardon/gambas
  • Davidmue/gambas
  • mmu_man/gambas
  • jguardon/gambas
  • tstueker/gambas
  • timsoft/gambas
  • yann64/gambas
  • Matthew-Collins/gambas
  • microhobby/gambas
  • ercoupeflyer/gambas
  • pebauer68/gambas
  • ptmarstech/gambas
  • christhal/gambas
  • tboege/gambas
  • christopherwoo/gambas
  • yusronarif/gambas
  • gen.braga/gambas
  • MelvinG24/gambas
  • Krischel/gambas
  • liang-wei/gambas
  • brucebruen/gambas
  • LibreDWG/gambas
  • SkyN9ne/gambas
  • zxMarce/gambas
  • lordheavy/gambas
  • ddabrahams76/gambas
  • GianluigiOr/gambas
  • rfc1394/gambas
  • wekan/gambas
  • bsteers4/gambas
  • fweimer-rh/gambas
  • CDCDCDCDCDCD/gambas
  • geekdu42/gambas
  • belmotek/gambas
  • jfrank1500/gambas
  • mfischerq/gambas
  • shiny0110/gambas
  • kk667788/gambas
  • bandali/gambas
  • 64sys/gambas
  • justlostintime/gambas
  • aleasto/gambas
  • bgermann/gambas
  • linusky/gambas
47 results
Select Git revision
Show changes
Commits on Source (2)
...@@ -44,6 +44,7 @@ Private Sub Image_Write(Value As String) ...@@ -44,6 +44,7 @@ Private Sub Image_Write(Value As String)
$sImage = Value $sImage = Value
Me.Refresh Me.Refresh
If $sImage Then WebForm._AddPreload(Me._GetImageLink($sImage))
End End
...@@ -56,6 +57,7 @@ End ...@@ -56,6 +57,7 @@ End
Private Sub Shortcut_Write(Value As String) Private Sub Shortcut_Write(Value As String)
If $sShortcut = Value Then Return If $sShortcut = Value Then Return
Me._RegisterShortcut(Value, $sShortcut)
$sShortcut = Value $sShortcut = Value
Me.Refresh Me.Refresh
......
...@@ -14,20 +14,34 @@ End ...@@ -14,20 +14,34 @@ End
Public Sub SetButton(sButton1 As String, Optional sButton2 As String, sButton3 As String) Public Sub SetButton(sButton1 As String, Optional sButton2 As String, sButton3 As String)
Dim hLast As WebButton
If sButton1 Then If sButton1 Then
btnButton1.Text = sButton1 btnButton1.Text = sButton1
btnButton1.Default = True
hLast = btnButton1
Endif Endif
If sButton2 Then If sButton2 Then
btnButton2.Text = sButton2 btnButton2.Text = sButton2
btnButton2.Show btnButton2.Show
hLast = btnButton2
Endif Endif
If sButton3 Then If sButton3 Then
btnButton3.Text = sButton3 btnButton3.Text = sButton3
btnButton3.Show btnButton3.Show
hLast = btnButton3
Endif
If Not hLast Then
btnButton1.Text = ("OK")
btnButton1.Default = True
hLast = btnButton1
Endif Endif
If hLast Then hLast.Cancel = True
End End
Public Sub _new() Public Sub _new()
......
...@@ -257,8 +257,8 @@ Public Sub WebSpinBox1_Change() ...@@ -257,8 +257,8 @@ Public Sub WebSpinBox1_Change()
End End
Public Sub WebTree1_Activate() Public Sub WebMenu17_Click()
Message(WebTree1.Item.Text) Message(Last.Text)
End End
...@@ -224,7 +224,6 @@ ...@@ -224,7 +224,6 @@
} }
{ WebTimer1 WebTimer { WebTimer1 WebTimer
#MoveScaled(65,75) #MoveScaled(65,75)
Enabled = True
} }
{ WebAudio1 WebAudio { WebAudio1 WebAudio
#MoveScaled(78,77) #MoveScaled(78,77)
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
{ WebButton1 WebButton { WebButton1 WebButton
#MoveScaled(10,1,16,4) #MoveScaled(10,1,16,4)
Text = ("Cancel") Text = ("Cancel")
Cancel = True
} }
{ WebHBox2 WebHBox { WebHBox2 WebHBox
#MoveScaled(26,1,7,4) #MoveScaled(26,1,7,4)
......
' Gambas class file ' Gambas class file
Export 'Export
Static Public Sub _init() Static Public Sub _init()
WebForm.Debug = True 'WebForm.Debug = True
End End
' '
...@@ -26,10 +26,15 @@ Public Sub WebForm_KeyPress() ...@@ -26,10 +26,15 @@ Public Sub WebForm_KeyPress()
WebTextArea1.Text &= Last.Name & ": " & JSON.ToString(Key._Event) & " " & Key.Shortcut & " '" & Key.Text & "'\n" WebTextArea1.Text &= Last.Name & ": " & JSON.ToString(Key._Event) & " " & Key.Shortcut & " '" & Key.Text & "'\n"
End End
'
' Public Sub WebTextBox1_KeyPress()
' Public Sub WebTextBox1_KeyPress()
' WebTextArea1.Text &= Last.Name & ": " & JSON.ToString(Key._Event) & " " & Key.Shortcut & "\n"
' WebTextArea1.Text &= Last.Name & ": " & JSON.ToString(Key._Event) & " " & Key.Shortcut & "\n"
' End
' End
Public Sub WebForm_Open()
WebForm.Debug = True
End
...@@ -1164,9 +1164,10 @@ Private Sub PrintItem(hItem As _WebTreeItem, iLevel As Integer, bVisible As Bool ...@@ -1164,9 +1164,10 @@ Private Sub PrintItem(hItem As _WebTreeItem, iLevel As Integer, bVisible As Bool
If $iMode <> Select.Single Then Print ",event"; If $iMode <> Select.Single Then Print ",event";
Print ");\""; Print ");\"";
Endif
Print Me._GetUpdateJS("ondblclick", "%" & JS(sKeyBase64)); Print Me._GetUpdateJS("ondblclick", "%" & JS(sKeyBase64));
Endif
If Not bVisible Then Print " style=\"display:none;\""; If Not bVisible Then Print " style=\"display:none;\"";
Print ">"; Print ">";
...@@ -1297,6 +1298,7 @@ Public Sub _UpdateProperty(sProp As String, vValue As Variant) ...@@ -1297,6 +1298,7 @@ Public Sub _UpdateProperty(sProp As String, vValue As Variant)
Dim hItem As _WebTreeItem Dim hItem As _WebTreeItem
Dim sKey As String Dim sKey As String
Dim sCursor As String Dim sCursor As String
Dim bCancel As Boolean
If sProp Begins "^" Then If sProp Begins "^" Then
...@@ -1335,10 +1337,16 @@ Public Sub _UpdateProperty(sProp As String, vValue As Variant) ...@@ -1335,10 +1337,16 @@ Public Sub _UpdateProperty(sProp As String, vValue As Variant)
Else If sProp Begins "%" Then Else If sProp Begins "%" Then
If Object.CanRaise(Me, "Activate") Then
sCursor = $sCursor sCursor = $sCursor
$sCursor = FromBase64(Mid$(sProp, 2)) $sCursor = FromBase64(Mid$(sProp, 2))
Raise Activate bCancel = Raise Activate
$sCursor = sCursor $sCursor = sCursor
Endif
If Not bCancel Then
hItem = $cItem[FromBase64(Mid$(sProp, 2))]
If hItem.Children Then hItem.Expanded = Not hItem.Expanded
Endif
Else If sProp = "#scroll" Then Else If sProp = "#scroll" Then
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
Export Export
Inherits WebControl Inherits WebControl
Public Const _Properties As String = "*,Border=True,Text,Image{WebImage},Immediate,ShowArrow" Public Const _Properties As String = "*,Border=True,Text,Image{WebImage},Immediate,ShowArrow,Default,Cancel"
'Public Const _DrawWith As String '= "Button" 'Public Const _DrawWith As String '= "Button"
Public Const _DefaultEvent As String = "Click" Public Const _DefaultEvent As String = "Click"
Public Const _DefaultSize As String = "16,4" Public Const _DefaultSize As String = "16,4"
...@@ -33,6 +33,9 @@ Property Immediate As Boolean ...@@ -33,6 +33,9 @@ Property Immediate As Boolean
'' Return or set if the button displays an arrow '' Return or set if the button displays an arrow
Property ShowArrow As Boolean Property ShowArrow As Boolean
Property Default As Boolean
Property Cancel As Boolean
Private $sText As String Private $sText As String
Private $sImage As String Private $sImage As String
Private $bImmediate As Boolean Private $bImmediate As Boolean
...@@ -83,8 +86,12 @@ End ...@@ -83,8 +86,12 @@ End
Public Sub _BeforeRender() Public Sub _BeforeRender()
Dim vSave As Variant Dim vSave As Variant
Dim sClass As String
sClass = "gw-button"
If Me.Default Then sClass &= " gw-button-default"
Print "<div"; Me._GetClassId(); Print "<div"; Me._GetClassId(sClass);
If Me.Enabled Then If Me.Enabled Then
If $bImmediate Then If $bImmediate Then
Print " onclick=\""; Print " onclick=\"";
...@@ -169,3 +176,36 @@ Private Sub ShowArrow_Write(Value As Boolean) ...@@ -169,3 +176,36 @@ Private Sub ShowArrow_Write(Value As Boolean)
Me.Refresh Me.Refresh
End End
Private Function Default_Read() As Boolean
Return Me._GetTopLevel()._GetDefault() = Me.Id
End
Private Sub Default_Write(Value As Boolean)
If Value Then
Me._GetTopLevel()._SetDefault(Me)
Else If Default_Read() Then
Me._GetTopLevel()._SetDefault(Null)
Endif
End
Private Function Cancel_Read() As Boolean
Return Me._GetTopLevel()._GetCancel() = Me.Id
End
Private Sub Cancel_Write(Value As Boolean)
If Value Then
Me._GetTopLevel()._SetCancel(Me)
Else If Default_Read() Then
Me._GetTopLevel()._SetCancel(Null)
Endif
End
...@@ -87,6 +87,8 @@ Static Private $aStyleSheet As String[] ...@@ -87,6 +87,8 @@ Static Private $aStyleSheet As String[]
Static Public _NextName As String Static Public _NextName As String
Static Public _Shortcuts As New Collection
Public _Refresh As Boolean Public _Refresh As Boolean
Public _EventName As String Public _EventName As String
Public _Proxy As String Public _Proxy As String
...@@ -1181,14 +1183,56 @@ Public Sub ToHTML() As String ...@@ -1181,14 +1183,56 @@ Public Sub ToHTML() As String
End End
Public Sub _RaiseKeyPress(cEvent As Variant) Public Sub _RaiseKeyPress(cEvent As Variant) As Boolean
Dim cSave As Collection Dim cSave As Collection
Dim bCancel As Boolean
cSave = Key._Event cSave = Key._Event
Key._Event = cEvent Key._Event = cEvent
Object.Raise(Me, "KeyPress") bCancel = Raise KeyPress
Key._Event = cSave Key._Event = cSave
WebForm.Print("_RaiseKeyPress: " & Str(bCancel))
Return bCancel
End
Public Sub _RegisterShortcut(sShortcut As String, sPrevious As String)
Dim aShortcut As Integer[]
Dim iPos As Integer
If sPrevious Then
sPrevious = String.UCase(sPrevious)
aShortcut = _Shortcuts[sPrevious]
If aShortcut Then
iPos = aShortcut.Find($iId)
If iPos Then aShortcut.Remove(iPos)
Endif
Endif
If sShortcut Then
sShortcut = String.UCase(sShortcut)
aShortcut = _Shortcuts[sShortcut]
If Not aShortcut Then
aShortcut = New Integer[]
_Shortcuts[sShortcut] = aShortcut
Endif
aShortcut.Add($iId)
Endif
End End
Public Sub _GetTopLevel() As WebForm
Dim hForm As WebForm
Dim hParent As WebContainer
hForm = Me.Form
Do
hParent = hForm.Parent
If Not hParent Or If hForm._Window Then Return hForm
hForm = hForm.Form
Loop
End
...@@ -63,6 +63,7 @@ Static Public _DisableRefresh As Integer ...@@ -63,6 +63,7 @@ Static Public _DisableRefresh As Integer
Static Public _HasRefresh As Boolean Static Public _HasRefresh As Boolean
Static Public _InMessage As Integer Static Public _InMessage As Integer
Static Public _CurrentPopup As WebForm Static Public _CurrentPopup As WebForm
Static Public _CurrentModal As WebForm
Static Private _Current As WebForm Static Private _Current As WebForm
...@@ -79,6 +80,7 @@ Static Private $iEventLoopLevel As Integer ...@@ -79,6 +80,7 @@ Static Private $iEventLoopLevel As Integer
Static Private $aJavascript As New String[] Static Private $aJavascript As New String[]
Static Private $aJavascriptBefore As New String[] Static Private $aJavascriptBefore As New String[]
Static Private $cPreload As New Collection
Public _Loaded As Boolean Public _Loaded As Boolean
Public _Window As Integer Public _Window As Integer
...@@ -103,6 +105,8 @@ Private $aJavascriptExternFiles As String[] ...@@ -103,6 +105,8 @@ Private $aJavascriptExternFiles As String[]
Private $aHeaders As String[] Private $aHeaders As String[]
Private $aShortcuts As String[] Private $aShortcuts As String[]
Private $iDefault As Integer
Private $iCancel As Integer
'Private $bOpened As Boolean 'Private $bOpened As Boolean
...@@ -747,7 +751,8 @@ Public Sub _BeforeRender() ...@@ -747,7 +751,8 @@ Public Sub _BeforeRender()
If Me.Class Then Print " "; Me.Class; If Me.Class Then Print " "; Me.Class;
Print "\" id=\""; Me.Name; "\""; Print "\" id=\""; Me.Name; "\"";
Me._RenderStyleSheet() Me._RenderStyleSheet()
Print Me._GetKeyPressHandler(); 'Print Me._GetKeyPressHandler();
If Object.CanRaise(Me, "KeyPress") Or If $iDefault Or If $iCancel Then Print " onkeydown=\"gw.onkeydown(" & JS(Me.Name) & ", event)\"";
Print ">" Print ">"
DisableShortcuts() DisableShortcuts()
...@@ -757,6 +762,7 @@ End ...@@ -757,6 +762,7 @@ End
Public Sub Render() Public Sub Render()
Dim sImage As String Dim sImage As String
Dim aPreload As String[]
Response.Buffered = True Response.Buffered = True
Response.Begin Response.Begin
...@@ -770,11 +776,20 @@ Public Sub Render() ...@@ -770,11 +776,20 @@ Public Sub Render()
Print "<body"; Me._GetEventJS("onload", "open"); ">" Print "<body"; Me._GetEventJS("onload", "open"); ">"
Print "<div id=\"gw-preload\" style=\"display:none;\">";
For Each sImage In ["error.png", "info.png", "question.png", "warning.png"] For Each sImage In ["error.png", "info.png", "question.png", "warning.png"]
Print "<img src=\""; Application.Root &/ "message" &/ sImage; "\">"; _AddPreload(Application.Root &/ "message" &/ sImage)
Next Next
Print "</div>"
For Each sImage In ["gw-arrow-down.png", "gw-arrow-left.png", "gw-arrow-right.png", "gw-arrow-up.png", "gw-close.png"]
_AddPreload(Application.Root &/ sImage)
Next
aPreload = New String[]
For Each $cPreload
aPreload.Add($cPreload.Key)
Next
$aJavascript.Add("gw.image.preload(" & JS(aPreload) & ")")
Print "<div id=\"gw-modal\" onclick=\"gw.window.onDownModal();\" onmouseover=\"gw.window.onDownModal(true);\"></div>" Print "<div id=\"gw-modal\" onclick=\"gw.window.onDownModal();\" onmouseover=\"gw.window.onDownModal(true);\"></div>"
Print "<div id=\"gw-lock\">" Print "<div id=\"gw-lock\">"
...@@ -887,6 +902,23 @@ Private Sub Resizable_Write(Value As Boolean) ...@@ -887,6 +902,23 @@ Private Sub Resizable_Write(Value As Boolean)
End End
Private Sub HandleKeyPress(sName As String, vEvent As Variant)
Dim hCtrl As WebControl
Dim hForm As WebForm
If sName Then
hCtrl = WebControl.FromName(sName)
If hCtrl Then hCtrl._RaiseKeyPress(vEvent)
Else
hForm = _CurrentPopup
If Not hForm Then hForm = _CurrentModal
If Not hForm Then hForm = Me
hForm._RaiseKeyPress(vEvent)
Endif
End
Public Sub _HandleMessage() Public Sub _HandleMessage()
Dim hCtrl As WebControl Dim hCtrl As WebControl
...@@ -937,11 +969,7 @@ Public Sub _HandleMessage() ...@@ -937,11 +969,7 @@ Public Sub _HandleMessage()
Case "keypress" Case "keypress"
If aCmd[1] Then HandleKeyPress(aCmd[1], aCmd[2])
hCtrl = WebControl.FromName(aCmd[1])
If hCtrl Then hCtrl._RaiseKeyPress(aCmd[2])
Endif
Me._RaiseKeyPress(aCmd[2])
Case "finish" Case "finish"
...@@ -1167,6 +1195,7 @@ Public Sub ShowModal(Optional Parent As WebControl) As Variant ...@@ -1167,6 +1195,7 @@ Public Sub ShowModal(Optional Parent As WebControl) As Variant
Dim hWindow As WebWindow Dim hWindow As WebWindow
Dim vReturn As Variant Dim vReturn As Variant
Dim hPrevious As WebForm
If Me.Parent Then Error.Raise("Form is embedded") If Me.Parent Then Error.Raise("Form is embedded")
If _Window = 0 Then DoShow() If _Window = 0 Then DoShow()
...@@ -1178,8 +1207,13 @@ Public Sub ShowModal(Optional Parent As WebControl) As Variant ...@@ -1178,8 +1207,13 @@ Public Sub ShowModal(Optional Parent As WebControl) As Variant
If Parent Then hWindow.ParentControl = Parent.Name If Parent Then hWindow.ParentControl = Parent.Name
Endif Endif
hPrevious = _CurrentModal
_CurrentModal = Me
RunEventLoop RunEventLoop
_CurrentModal = hPRevious
vReturn = $vEventLoopReturn vReturn = $vEventLoopReturn
$vEventLoopReturn = Null $vEventLoopReturn = Null
Return vReturn Return vReturn
...@@ -1411,12 +1445,13 @@ End ...@@ -1411,12 +1445,13 @@ End
Private Sub DisableShortcuts() Private Sub DisableShortcuts()
Dim cShortcut As Collection Dim cShortcut As New Collection
Dim sShortcut As String Dim sShortcut As String
cShortcut = New Collection For Each WebControl._Shortcuts
sShortcut = WebControl._Shortcuts.Key
FindShortcut($hMenuBar, cShortcut) cShortcut[sShortcut] = True
Next
If $aShortcuts Then If $aShortcuts Then
For Each sShortcut In $aShortcuts For Each sShortcut In $aShortcuts
...@@ -1432,39 +1467,54 @@ Private Sub DisableShortcuts() ...@@ -1432,39 +1467,54 @@ Private Sub DisableShortcuts()
End End
Private Sub TriggerShortcut(hParent As WebContainer, sShortcut As String) As Boolean Private Sub TriggerShortcut(sShortcut As String) As Boolean
Dim hChild As WebControl Dim aShortcut As Integer[]
Dim hMenu As WebMenu Dim iId As Integer
Dim hCtrl As WebControl
Dim hButton As WebButton
sShortcut = String.UCase(sShortcut)
aShortcut = WebControl._Shortcuts[sShortcut]
If aShortcut Then
For Each iId In aShortcut
hCtrl = WebControl.FromId(iId)
If hCtrl.IsHidden() Then Continue
If Not hCtrl.Enabled Then Continue
If hCtrl Is WebMenu Then
Object.Raise(hCtrl, "Click")
Return True
Endif
Next
Endif
For Each hChild In hParent.Children WebForm.Print("TriggerShortcut: " & Me.Name & ": " & sShortcut & " / " & $iDefault & " / " & $iCancel)
hMenu = hChild
If Not hMenu.Enabled Then Continue If $iDefault And If sShortcut = "ENTER" Then
If String.UCase(hMenu.Shortcut) = sShortcut Then hButton = WebControl.FromId($iDefault)
Object.Raise(hChild, "Click") hButton.Click()
Return True Return True
Else If hMenu.HasChildren() And If TriggerShortcut(hChild, sShortcut) Then Else If $iCancel And If sShortcut = "ESCAPE" Then
hButton = WebControl.FromId($iCancel)
hButton.Click()
Return True Return True
Endif Endif
Next
End End
Public Sub _RaiseKeyPress(cEvent As Variant) Public Sub _RaiseKeyPress(cEvent As Variant) As Boolean
Dim cSave As Collection Dim cSave As Collection
Dim sShortcut As String Dim sShortcut As String
Super._RaiseKeyPress(cEvent) If Super._RaiseKeyPress(cEvent) Then Return True
If Not $hMenuBar.HasChildren() Then Return
cSave = Key._Event cSave = Key._Event
Key._Event = cEvent Key._Event = cEvent
sShortcut = Key.Shortcut sShortcut = Key.Shortcut
Key._Event = cSave Key._Event = cSave
TriggerShortcut($hMenuBar, String.UCase(sShortcut)) Return TriggerShortcut(sShortcut)
End End
...@@ -1480,3 +1530,41 @@ Private Sub Shortcuts_Write(Value As String[]) ...@@ -1480,3 +1530,41 @@ Private Sub Shortcuts_Write(Value As String[])
$aShortcuts = Value $aShortcuts = Value
End End
Public Sub _GetDefault() As Integer
Return $iDefault
End
Public Sub _SetDefault(hCtrl As WebControl)
If hCtrl Then
$iDefault = hCtrl.Id
Else
$iDefault = 0
Endif
End
Public Sub _GetCancel() As Integer
Return $iCancel
End
Public Sub _SetCancel(hCtrl As WebControl)
If hCtrl Then
$iCancel = hCtrl.Id
Else
$iCancel = 0
Endif
End
Static Public Sub _AddPreload(sLink As String)
$cPreload[sLink] = True
End
...@@ -776,6 +776,7 @@ gw = { ...@@ -776,6 +776,7 @@ gw = {
$(gw.windows[i]).style.zIndex = 11 + i * 2; $(gw.windows[i]).style.zIndex = 11 + i * 2;
gw.window.updateTitleBars(); gw.window.updateTitleBars();
$(id).focus();
if (send) if (send)
gw.update('', '#windows', gw.windows); gw.update('', '#windows', gw.windows);
...@@ -1581,6 +1582,21 @@ gw = { ...@@ -1581,6 +1582,21 @@ gw = {
} }
}, },
image:
{
preload: function(images)
{
var image;
var i;
for (i = 0; i < images.length; i++)
{
image = new Image();
image.src = images[i];
}
}
},
sound: sound:
{ {
pause: function(id) pause: function(id)
...@@ -1617,14 +1633,25 @@ gw = { ...@@ -1617,14 +1633,25 @@ gw = {
return shortcut; return shortcut;
}, },
onkeydown: function(event) sendKeyPress: function(event, id)
{
gw.send(['keypress', id,
{
'altKey': event.altKey,
'ctrlKey': event.ctrlKey,
'key': event.key,
'metaKey': event.meta,
'shiftKey': event.shiftKey
}],
null);
},
onkeydown: function(id, event)
{ {
if (!event.bubbles) if (!event.bubbles)
return; return;
var elt = document.activeElement; var elt = $(id);
var id = '';
while (elt) while (elt)
{ {
id = elt.id; id = elt.id;
...@@ -1634,24 +1661,22 @@ gw = { ...@@ -1634,24 +1661,22 @@ gw = {
id = ''; id = '';
} }
gw.send(['keypress', id, gw.sendKeyPress(event, id);
{ },
'altKey': event.altKey,
'ctrlKey': event.ctrlKey,
'key': event.key,
'metaKey': event.meta,
'shiftKey': event.shiftKey
}],
null);
if (gw.shortcuts) onshortcut: function(event)
{
if (event.bubbles && gw.shortcuts)
{ {
gw.sendKeyPress(event, '');
var shortcut = gw.makeShortcut(event); var shortcut = gw.makeShortcut(event);
gw.log('shortcut -> ' + shortcut);
if (gw.shortcuts[shortcut]) if (gw.shortcuts[shortcut])
{
gw.log('shortcut -> ' + shortcut);
event.preventDefault(); event.preventDefault();
} }
} }
},
} }
document.onkeydown = gw.onkeydown; document.onkeydown = gw.onshortcut;
...@@ -69,6 +69,10 @@ P:first-child,UL:first-child,OL:first-child { ...@@ -69,6 +69,10 @@ P:first-child,UL:first-child,OL:first-child {
user-select: none; user-select: none;
} }
.gw-button-default {
border-width: 2px;
}
.gw-button:active { .gw-button:active {
background-color: #E0E0E0; background-color: #E0E0E0;
} }
......