Merge from Appchan X: src/General/UI.coffee
(The UI.checkbox changes were merged in previous commit e1b63d4a9965aaa5d63e15fd84788921a53def72.)
This commit is contained in:
parent
ce1b7301e8
commit
f2a498a5dd
@ -65,8 +65,7 @@ UI = do ->
|
|||||||
|
|
||||||
$.addClass lastToggledButton, 'active'
|
$.addClass lastToggledButton, 'active'
|
||||||
|
|
||||||
$.on d, 'click', @close
|
$.one d, 'click scroll CloseMenu', @close
|
||||||
$.on d, 'CloseMenu', @close
|
|
||||||
$.add button, menu
|
$.add button, menu
|
||||||
|
|
||||||
# Position
|
# Position
|
||||||
@ -121,7 +120,6 @@ UI = do ->
|
|||||||
$.rmClass lastToggledButton, 'active'
|
$.rmClass lastToggledButton, 'active'
|
||||||
currentMenu = null
|
currentMenu = null
|
||||||
lastToggledButton = null
|
lastToggledButton = null
|
||||||
$.off d, 'click CloseMenu', @close
|
|
||||||
|
|
||||||
findNextEntry: (entry, direction) ->
|
findNextEntry: (entry, direction) ->
|
||||||
entries = [entry.parentNode.children...]
|
entries = [entry.parentNode.children...]
|
||||||
@ -162,6 +160,7 @@ UI = do ->
|
|||||||
onFocus: (e) =>
|
onFocus: (e) =>
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
@focus e.target
|
@focus e.target
|
||||||
|
|
||||||
focus: (entry) ->
|
focus: (entry) ->
|
||||||
while focused = $.x 'parent::*/child::*[contains(@class,"focused")]', entry
|
while focused = $.x 'parent::*/child::*[contains(@class,"focused")]', entry
|
||||||
$.rmClass focused, 'focused'
|
$.rmClass focused, 'focused'
|
||||||
@ -376,7 +375,6 @@ UI = do ->
|
|||||||
$.add label, [input, $.tn " #{text}"]
|
$.add label, [input, $.tn " #{text}"]
|
||||||
label
|
label
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
dialog: dialog
|
dialog: dialog
|
||||||
Menu: Menu
|
Menu: Menu
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user