Add command+click as an alternative to ctrl+click on OS X (#162).
This commit is contained in:
parent
5a6ac68548
commit
747c76e08a
@ -71,7 +71,7 @@ Config =
|
|||||||
]
|
]
|
||||||
'Custom Board Titles': [
|
'Custom Board Titles': [
|
||||||
true
|
true
|
||||||
'Allow editing of the board title and subtitle by ctrl+clicking them'
|
'Allow editing of the board title and subtitle by ctrl/\u2318+clicking them.'
|
||||||
]
|
]
|
||||||
'Persistent Custom Board Titles': [
|
'Persistent Custom Board Titles': [
|
||||||
false
|
false
|
||||||
|
|||||||
@ -21,7 +21,7 @@ Banner =
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
if Conf['Custom Board Titles']
|
if Conf['Custom Board Titles']
|
||||||
Banner.custom(child).title = "Ctrl+click to edit board #{if i is 3
|
Banner.custom(child).title = "Ctrl/\u2318+click to edit board #{if i is 3
|
||||||
'sub'
|
'sub'
|
||||||
else
|
else
|
||||||
''}title"
|
''}title"
|
||||||
@ -45,7 +45,7 @@ Banner =
|
|||||||
$('img', @parentNode).src = "//s.4cdn.org/image/title/#{banner}"
|
$('img', @parentNode).src = "//s.4cdn.org/image/title/#{banner}"
|
||||||
|
|
||||||
click: (e) ->
|
click: (e) ->
|
||||||
if e.ctrlKey
|
if e.ctrlKey or e.metaKey
|
||||||
@contentEditable = true
|
@contentEditable = true
|
||||||
@focus()
|
@focus()
|
||||||
|
|
||||||
|
|||||||
@ -384,7 +384,7 @@ QR =
|
|||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
if e.shiftKey and e.type is 'click'
|
if e.shiftKey and e.type is 'click'
|
||||||
return QR.selected.rmFile()
|
return QR.selected.rmFile()
|
||||||
if e.ctrlKey and e.type is 'click'
|
if (e.ctrlKey or e.metaKey) and e.type is 'click'
|
||||||
$.addClass QR.nodes.filename, 'edit'
|
$.addClass QR.nodes.filename, 'edit'
|
||||||
QR.nodes.filename.focus()
|
QR.nodes.filename.focus()
|
||||||
return $.on QR.nodes.filename, 'blur', -> $.rmClass QR.nodes.filename, 'edit'
|
return $.on QR.nodes.filename, 'blur', -> $.rmClass QR.nodes.filename, 'edit'
|
||||||
|
|||||||
@ -216,7 +216,7 @@ QR.post = class
|
|||||||
URL.revokeObjectURL @URL
|
URL.revokeObjectURL @URL
|
||||||
|
|
||||||
updateFilename: ->
|
updateFilename: ->
|
||||||
long = "#{@filename} (#{@filesize})\nCtrl+click to edit filename. Shift+click to clear."
|
long = "#{@filename} (#{@filesize})\nCtrl/\u2318+click to edit filename. Shift+click to clear."
|
||||||
@nodes.el.title = long
|
@nodes.el.title = long
|
||||||
return unless @ is QR.selected
|
return unless @ is QR.selected
|
||||||
QR.nodes.fileContainer.title = long
|
QR.nodes.fileContainer.title = long
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user