fixed how kb sections are setup...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-01-25 18:17:04 +03:00
parent 7f91b64360
commit 711497d0cd
3 changed files with 25 additions and 30 deletions

View File

@ -335,15 +335,18 @@ body {
.browse-widget.key-bindings .list>.mode span:first-child {
margin-left: -0.5em;
}
.browse-widget.key-bindings .list>.mode .doc {
margin-left: 1em;
/* doc */
.not-traversable.not-filtered-out.mode[doc]:after {
display: block;
content: attr(doc);
color: white;
font-weight: normal;
whitespace: pre;
font-size: small;
font-style: italic;
opacity: 0.8;
margin-top: 2em;
opacity: 0.5;
}
.browse-widget.key-bindings .list>.mode.selected {
color: white;

View File

@ -668,7 +668,8 @@ var FileSystemLoaderActions = actions.Actions({
})
}],
//
// Load images to new ribbon...
//
// .loadImagesAsRibbon(path[, logger])
// -> promise
//
@ -676,11 +677,12 @@ var FileSystemLoaderActions = actions.Actions({
// .loadImagesAsRibbon(path, 'below'[, logger])
// -> promise
//
// NOTE: this does not touch .location
// NOTE: this will clear .location
//
// XXX EXPERIMENTAL...
// XXX should this be usable only in crops???
// ....also would be a good idea to add things like .removeRibbon(..)...
// XXX should this be a crop???
loadImagesAsRibbon: ['- File/Load images into ribbon',
function(path, direction, logger){
var that = this

View File

@ -826,9 +826,6 @@ var KeyboardUIActions = actions.Actions({
//'ui-confirm-timeout': 2000,
},
// XXX BUG sections with doc do not show up in title...
// XXX BUG: for some reason modes are not clickable and not selected
// via .select(..) with pattern...
// XXX sub-group by path (???)
browseKeyboardBindings: ['Help/Keyboard bindings...',
core.doc`Keyboard bindings viewer...
@ -922,25 +919,18 @@ var KeyboardUIActions = actions.Actions({
var dropped = keybindings[mode].drop || []
var bound_ignored = []
var attrs = {mode: mode}
keybindings[mode].doc
&& (attrs['doc'] = keybindings[mode].doc)
// section heading (mode)...
make(keybindings[mode].doc ?
$('<span>')
// NOTE: at this time adding a br
// is faster and simpler than
// doing this in CSS...
// XXX revise...
.html(mode + '<br>')
.append($('<span>')
.addClass('doc')
.html(keybindings[mode].doc))
: mode,
{
not_filtered_out: true,
// XXX should sections be searchable???
not_searchable: true,
buttons: options.mode_buttons,
})
.attr('mode', mode)
make(mode, {
not_filtered_out: true,
// XXX should sections be searchable???
//not_searchable: true,
buttons: options.mode_buttons,
})
.attr(attrs)
.addClass('mode')
// bindings...
@ -1086,7 +1076,7 @@ var KeyboardUIActions = actions.Actions({
})],
// XXX do we need a bindings to add new keys to current mode from the
// keyboard???
// XXX focus updated/new items to editable field...
// XXX focus updated/new items to editable field + make it more reliable...
editKeyboardBindings: ['Interface/Keyboard bindings editor...',
core.doc`Similar to .browseKeyboardBindings(..) but adds editing functionality...
@ -1215,7 +1205,7 @@ var KeyboardUIActions = actions.Actions({
})
return dialog
})],
// XXX add action completion...
// XXX add action completion... (???)
editKeyBinding: ['- Interface/Key mapping...',
widgets.makeUIDialog(function(mode, code, callback){
var that = this