mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
added .not-searchable and .not-filterd-out classes to browse items + now sections of kb binding editor will not get hidden on searches...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
f8c2a9615e
commit
9e5f6cc1d0
@ -602,26 +602,12 @@ var KeyboardActions = actions.Actions({
|
||||
})],
|
||||
|
||||
|
||||
// XXX build a dialog like this:
|
||||
//
|
||||
// +---------------------------------------------------+
|
||||
// +- <mode> ----------------------------- ^ v - edit -+
|
||||
// | <action-code> <key> / <key> ^ v - edit |
|
||||
// | <action-code> <key> / <key> ^ v - edit |
|
||||
// | ... |
|
||||
// | [+] |
|
||||
// +- <mode> ----------------------------- ^ v - edit -+
|
||||
// | <action-code> <key> / <key> ^ v - edit |
|
||||
// | ... |
|
||||
// | [+] |
|
||||
// +---------------------------------------------------+
|
||||
//
|
||||
// * will need to sort modes
|
||||
// * will need to sort actions
|
||||
// * might be good to do an action editor dialog
|
||||
// * add ability to disable key without deleting
|
||||
// * use the same mechanics to show the keys as in .browseActions(..)
|
||||
//
|
||||
// XXX Things not to forget:
|
||||
// * sort modes
|
||||
// * sort actions
|
||||
// * action editor dialog
|
||||
// * mode editor dialog
|
||||
// * add ability to disable key (???)
|
||||
// XXX do not hide modes on search...
|
||||
browseKeyboardBindings: ['Interface/Keyboard bindings editor (EXPERIMENTAL)...',
|
||||
widgets.makeUIDialog(function(path){
|
||||
@ -664,7 +650,9 @@ var KeyboardActions = actions.Actions({
|
||||
.addClass('doc')
|
||||
.html(keys[mode].doc))
|
||||
: mode)
|
||||
.addClass('mode')
|
||||
// XXX should sections be searchable???
|
||||
//.addClass('mode not-searchable')
|
||||
.addClass('mode not-filterd-out')
|
||||
|
||||
// bindings...
|
||||
Object.keys(keys[mode])
|
||||
@ -712,6 +700,12 @@ var KeyboardActions = actions.Actions({
|
||||
|
||||
return dialog
|
||||
})],
|
||||
|
||||
// XXX
|
||||
resetKeyBindings: ['Interface/Restore default key bindings',
|
||||
function(){
|
||||
// XXX
|
||||
}]
|
||||
})
|
||||
|
||||
var Keyboard =
|
||||
|
||||
@ -1310,6 +1310,12 @@ var BrowserPrototype = {
|
||||
// disabled elements. If <ignore_disabled> is false then disabled
|
||||
// elements will be searched too.
|
||||
//
|
||||
// If an item has .not-searchable class set, then it will neither be
|
||||
// searched nor filtered out.
|
||||
//
|
||||
// If an item has .not-filtered-out class set, then it will not be
|
||||
// hidden on filtering (see: .filterList(..)).
|
||||
//
|
||||
// NOTE: this will filter every item loaded regardless of visibility.
|
||||
//
|
||||
//
|
||||
@ -1345,7 +1351,7 @@ var BrowserPrototype = {
|
||||
var that = this
|
||||
var browser = this.dom
|
||||
|
||||
var elems = browser.find('.list>div'
|
||||
var elems = browser.find('.list>div:not(.not-searchable)'
|
||||
+ (this.options.elementSeparatorClass ?
|
||||
':not('+ this.options.elementSeparatorClass +')'
|
||||
: '')
|
||||
@ -1446,6 +1452,9 @@ var BrowserPrototype = {
|
||||
//
|
||||
// Use .filterList('*') to clear filter and show all elements.
|
||||
//
|
||||
// If an item has .not-filtered-out class set, then it will not be
|
||||
// hidden on filtering.
|
||||
//
|
||||
// NOTE: see .filter(..) for docs on actual filtering.
|
||||
// NOTE: this does not affect any UI modes, for list filtering mode
|
||||
// see: .toggleFilter(..)...
|
||||
@ -1480,9 +1489,9 @@ var BrowserPrototype = {
|
||||
this.filter(pattern,
|
||||
// rejected...
|
||||
function(i, e){
|
||||
e
|
||||
.addClass('filtered-out')
|
||||
.removeClass('selected')
|
||||
!e.hasClass('not-filterd-out')
|
||||
&& e.addClass('filtered-out')
|
||||
e.removeClass('selected')
|
||||
},
|
||||
// NOTE: setting this to true will not remove disabled
|
||||
// elements from view as they will neither get
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user