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