mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-29 01:50:07 +00:00
cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
94ef144c0f
commit
66c29d3f21
@ -57,5 +57,5 @@
|
||||
}
|
||||
.editor div:focus>span,
|
||||
.editor div:focus>textarea {
|
||||
background: silver;
|
||||
background: rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
@ -31,8 +31,8 @@ var Outline = {
|
||||
|
||||
// config...
|
||||
//
|
||||
left_key_expands: false,
|
||||
right_key_collapses: true,
|
||||
left_key_collapses: true,
|
||||
right_key_expands: true,
|
||||
|
||||
|
||||
// XXX revise name...
|
||||
@ -289,18 +289,17 @@ var Outline = {
|
||||
if(this.dom.querySelector('.editor textarea:focus')){
|
||||
// XXX if at end of element move to next...
|
||||
return }
|
||||
if(this.left_key_expands){
|
||||
this.toggleCollapse(true)
|
||||
this.get('parent')?.focus()
|
||||
} else {
|
||||
evt.shiftKey ?
|
||||
this.toggleCollapse(true)
|
||||
: this.get('parent')?.focus() } },
|
||||
;((this.left_key_collapses
|
||||
|| evt.shiftKey)
|
||||
&& this.get().getAttribute('collapsed') == null
|
||||
&& this.get('children').length > 0) ?
|
||||
this.toggleCollapse(true)
|
||||
: this.get('parent')?.focus() },
|
||||
ArrowRight: function(evt){
|
||||
if(this.dom.querySelector('.editor textarea:focus')){
|
||||
// XXX if at end of element move to next...
|
||||
return }
|
||||
if(this.right_key_collapses){
|
||||
if(this.right_key_expands){
|
||||
this.toggleCollapse(false)
|
||||
var child = this.get('children')[0]
|
||||
child?.focus()
|
||||
|
||||
@ -63,7 +63,7 @@ TODO:
|
||||
- shifting nodes up/down
|
||||
- multiple node selection
|
||||
- <s>serialize</s>/deserialize
|
||||
- add optional styling to nodes
|
||||
- <s>add optional text styling to nodes</s>
|
||||
|
||||
Controls:
|
||||
up - focus node above
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user