From 711497d0cd89e16fa80526ea4182cee17e5353a9 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 25 Jan 2017 18:17:04 +0300 Subject: [PATCH] fixed how kb sections are setup... Signed-off-by: Alex A. Naanou --- ui (gen4)/css/experimenting.css | 13 +++++++----- ui (gen4)/features/filesystem.js | 6 ++++-- ui (gen4)/features/keyboard.js | 36 ++++++++++++-------------------- 3 files changed, 25 insertions(+), 30 deletions(-) diff --git a/ui (gen4)/css/experimenting.css b/ui (gen4)/css/experimenting.css index 59883843..f24d8533 100755 --- a/ui (gen4)/css/experimenting.css +++ b/ui (gen4)/css/experimenting.css @@ -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; diff --git a/ui (gen4)/features/filesystem.js b/ui (gen4)/features/filesystem.js index d512252e..c651789f 100755 --- a/ui (gen4)/features/filesystem.js +++ b/ui (gen4)/features/filesystem.js @@ -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 diff --git a/ui (gen4)/features/keyboard.js b/ui (gen4)/features/keyboard.js index b8b3893b..11d4649a 100755 --- a/ui (gen4)/features/keyboard.js +++ b/ui (gen4)/features/keyboard.js @@ -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 ? - $('') - // NOTE: at this time adding a br - // is faster and simpler than - // doing this in CSS... - // XXX revise... - .html(mode + '
') - .append($('') - .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