mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-29 18:10:09 +00:00
experimentiong with selection...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
99f1de520f
commit
4796ba6753
@ -259,8 +259,9 @@ editor .outline .block:focus {
|
||||
content: "●";
|
||||
}
|
||||
|
||||
/* select... */
|
||||
/* XXX are we selecting subtrees or blocks??? */
|
||||
.editor .outline [selected] {
|
||||
.editor .outline [selected]>.text {
|
||||
background: silver;
|
||||
}
|
||||
|
||||
|
||||
@ -1645,7 +1645,6 @@ var Outline = {
|
||||
} else {
|
||||
evt.preventDefault()
|
||||
this.focus('focused', 1) } },
|
||||
|
||||
// horizontal navigation / collapse...
|
||||
ArrowLeft: function(evt){
|
||||
var edited = this.get('edited')
|
||||
@ -1862,6 +1861,28 @@ var Outline = {
|
||||
evt.preventDefault()
|
||||
tasks.toggleDone(this) },
|
||||
|
||||
// selection...
|
||||
// XXX need more work...
|
||||
// - should we select the .block or .text???
|
||||
// - we should remember the first state and apply it (a-la FAR)
|
||||
// and not simply toggle on/off per node...
|
||||
s_ArrowUp: function(evt){
|
||||
if(this.get('edited')){
|
||||
return }
|
||||
var elem = this.get()
|
||||
elem.hasAttribute('selected') ?
|
||||
elem.removeAttribute('selected')
|
||||
: elem.setAttribute('selected', '')
|
||||
this.keyboard.ArrowUp.call(this, evt) },
|
||||
s_ArrowDown: function(evt){
|
||||
if(this.get('edited')){
|
||||
return }
|
||||
var elem = this.get()
|
||||
elem.hasAttribute('selected') ?
|
||||
elem.removeAttribute('selected')
|
||||
: elem.setAttribute('selected', '')
|
||||
this.keyboard.ArrowDown.call(this, evt) },
|
||||
|
||||
// toggle checkbox...
|
||||
' ': function(evt){
|
||||
if(this.get('edited') != null){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user