mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +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:
|
// XXX Things not to forget:
|
||||||
//
|
// * sort modes
|
||||||
// +---------------------------------------------------+
|
// * sort actions
|
||||||
// +- <mode> ----------------------------- ^ v - edit -+
|
// * action editor dialog
|
||||||
// | <action-code> <key> / <key> ^ v - edit |
|
// * mode editor dialog
|
||||||
// | <action-code> <key> / <key> ^ v - edit |
|
// * add ability to disable key (???)
|
||||||
// | ... |
|
|
||||||
// | [+] |
|
|
||||||
// +- <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 do not hide modes on search...
|
// XXX do not hide modes on search...
|
||||||
browseKeyboardBindings: ['Interface/Keyboard bindings editor (EXPERIMENTAL)...',
|
browseKeyboardBindings: ['Interface/Keyboard bindings editor (EXPERIMENTAL)...',
|
||||||
widgets.makeUIDialog(function(path){
|
widgets.makeUIDialog(function(path){
|
||||||
@ -664,7 +650,9 @@ var KeyboardActions = actions.Actions({
|
|||||||
.addClass('doc')
|
.addClass('doc')
|
||||||
.html(keys[mode].doc))
|
.html(keys[mode].doc))
|
||||||
: mode)
|
: mode)
|
||||||
.addClass('mode')
|
// XXX should sections be searchable???
|
||||||
|
//.addClass('mode not-searchable')
|
||||||
|
.addClass('mode not-filterd-out')
|
||||||
|
|
||||||
// bindings...
|
// bindings...
|
||||||
Object.keys(keys[mode])
|
Object.keys(keys[mode])
|
||||||
@ -712,6 +700,12 @@ var KeyboardActions = actions.Actions({
|
|||||||
|
|
||||||
return dialog
|
return dialog
|
||||||
})],
|
})],
|
||||||
|
|
||||||
|
// XXX
|
||||||
|
resetKeyBindings: ['Interface/Restore default key bindings',
|
||||||
|
function(){
|
||||||
|
// XXX
|
||||||
|
}]
|
||||||
})
|
})
|
||||||
|
|
||||||
var Keyboard =
|
var Keyboard =
|
||||||
|
|||||||
@ -1310,6 +1310,12 @@ var BrowserPrototype = {
|
|||||||
// disabled elements. If <ignore_disabled> is false then disabled
|
// disabled elements. If <ignore_disabled> is false then disabled
|
||||||
// elements will be searched too.
|
// 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.
|
// NOTE: this will filter every item loaded regardless of visibility.
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
@ -1345,7 +1351,7 @@ var BrowserPrototype = {
|
|||||||
var that = this
|
var that = this
|
||||||
var browser = this.dom
|
var browser = this.dom
|
||||||
|
|
||||||
var elems = browser.find('.list>div'
|
var elems = browser.find('.list>div:not(.not-searchable)'
|
||||||
+ (this.options.elementSeparatorClass ?
|
+ (this.options.elementSeparatorClass ?
|
||||||
':not('+ this.options.elementSeparatorClass +')'
|
':not('+ this.options.elementSeparatorClass +')'
|
||||||
: '')
|
: '')
|
||||||
@ -1446,6 +1452,9 @@ var BrowserPrototype = {
|
|||||||
//
|
//
|
||||||
// Use .filterList('*') to clear filter and show all elements.
|
// 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: see .filter(..) for docs on actual filtering.
|
||||||
// NOTE: this does not affect any UI modes, for list filtering mode
|
// NOTE: this does not affect any UI modes, for list filtering mode
|
||||||
// see: .toggleFilter(..)...
|
// see: .toggleFilter(..)...
|
||||||
@ -1480,9 +1489,9 @@ var BrowserPrototype = {
|
|||||||
this.filter(pattern,
|
this.filter(pattern,
|
||||||
// rejected...
|
// rejected...
|
||||||
function(i, e){
|
function(i, e){
|
||||||
e
|
!e.hasClass('not-filterd-out')
|
||||||
.addClass('filtered-out')
|
&& e.addClass('filtered-out')
|
||||||
.removeClass('selected')
|
e.removeClass('selected')
|
||||||
},
|
},
|
||||||
// NOTE: setting this to true will not remove disabled
|
// NOTE: setting this to true will not remove disabled
|
||||||
// elements from view as they will neither get
|
// elements from view as they will neither get
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user