mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-12-17 08:41:40 +00:00
some bugs hacked away...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
d0f42e388a
commit
ca96b6a36c
@ -91,7 +91,17 @@
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
.browse .path .dir.cur:empty:not([contenteditable]) {
|
.browse .path .dir.cur:empty:not([contenteditable]) {
|
||||||
display: none;
|
position: relative;
|
||||||
|
width: 50px;
|
||||||
|
height: 12px;
|
||||||
|
background: transparent;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
.browse .path .dir.cur:empty:hover:not([contenteditable]) {
|
||||||
|
opacity: 0.3;
|
||||||
|
}
|
||||||
|
.browse .path .dir.cur:empty:hover:not([contenteditable]):after {
|
||||||
|
content: "filter";
|
||||||
}
|
}
|
||||||
/* XXX need to make this resizable up but only to a certain size (~80vh) */
|
/* XXX need to make this resizable up but only to a certain size (~80vh) */
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -82,6 +82,7 @@ var BrowserPrototype = {
|
|||||||
'Right',
|
'Right',
|
||||||
'Enter',
|
'Enter',
|
||||||
'Esc',
|
'Esc',
|
||||||
|
'/',
|
||||||
],
|
],
|
||||||
|
|
||||||
Enter: 'action!',
|
Enter: 'action!',
|
||||||
@ -124,8 +125,6 @@ var BrowserPrototype = {
|
|||||||
// - build the element list
|
// - build the element list
|
||||||
//
|
//
|
||||||
// XXX trigger an "update" event...
|
// XXX trigger an "update" event...
|
||||||
// XXX current path click shoud make it editable and start a live
|
|
||||||
// search/filter...
|
|
||||||
update: function(path){
|
update: function(path){
|
||||||
path = path || this.path
|
path = path || this.path
|
||||||
var browser = this.dom
|
var browser = this.dom
|
||||||
@ -152,10 +151,27 @@ var BrowserPrototype = {
|
|||||||
// add current selction indicator...
|
// add current selction indicator...
|
||||||
p.append($('<div>')
|
p.append($('<div>')
|
||||||
.addClass('dir cur')
|
.addClass('dir cur')
|
||||||
// XXX add a filter mode...
|
|
||||||
.click(function(){
|
.click(function(){
|
||||||
that.startFilter()
|
that.startFilter()
|
||||||
//that.update(path.concat($(this).text()))
|
//that.update(path.concat($(this).text()))
|
||||||
|
|
||||||
|
// XXX HACK: prevents the field from bluring when clicked...
|
||||||
|
// ...need to find a better way...
|
||||||
|
that._hold_blur = true
|
||||||
|
setTimeout(function(){ delete that._hold_blur }, 20)
|
||||||
|
})
|
||||||
|
// XXX for some reason this gets triggered when clicking ano
|
||||||
|
// is not triggered when entering via '/'
|
||||||
|
.on('blur', function(){
|
||||||
|
// XXX HACK: prevents the field from bluring when clicked...
|
||||||
|
// ...need to find a better way...
|
||||||
|
if(!that._hold_blur){
|
||||||
|
that.stopFilter()
|
||||||
|
}
|
||||||
|
//that.stopFilter()
|
||||||
|
})
|
||||||
|
.keyup(function(){
|
||||||
|
that.filter($(this).text())
|
||||||
}))
|
}))
|
||||||
|
|
||||||
// fill the children list...
|
// fill the children list...
|
||||||
@ -184,6 +200,8 @@ var BrowserPrototype = {
|
|||||||
// XXX sort:
|
// XXX sort:
|
||||||
// - as-is
|
// - as-is
|
||||||
// - best match
|
// - best match
|
||||||
|
// XXX add deep-mode filtering...
|
||||||
|
// if '/' is in the pattern then we list down and combine paths...
|
||||||
filter: function(pattern, non_matched, sort){
|
filter: function(pattern, non_matched, sort){
|
||||||
var that = this
|
var that = this
|
||||||
var browser = this.dom
|
var browser = this.dom
|
||||||
@ -236,9 +254,6 @@ var BrowserPrototype = {
|
|||||||
var e = this.dom.find('.path .dir.cur')
|
var e = this.dom.find('.path .dir.cur')
|
||||||
.text('')
|
.text('')
|
||||||
.attr('contenteditable', true)
|
.attr('contenteditable', true)
|
||||||
.keyup(function(){
|
|
||||||
that.filter($(this).text())
|
|
||||||
})
|
|
||||||
.focus()
|
.focus()
|
||||||
|
|
||||||
// place the cursor...
|
// place the cursor...
|
||||||
@ -323,6 +338,7 @@ var BrowserPrototype = {
|
|||||||
// XXX revise return values...
|
// XXX revise return values...
|
||||||
// XXX Q: should this trigger a "select" event???
|
// XXX Q: should this trigger a "select" event???
|
||||||
// XXX on string/regexp mismatch this will select the first, is this correct???
|
// XXX on string/regexp mismatch this will select the first, is this correct???
|
||||||
|
// XXX handle scrollTop to show the selected element...
|
||||||
select: function(elem, filtering){
|
select: function(elem, filtering){
|
||||||
var pattern = '.list div:not(.disabled):not(.filtered-out)'
|
var pattern = '.list div:not(.disabled):not(.filtered-out)'
|
||||||
var browser = this.dom
|
var browser = this.dom
|
||||||
@ -397,7 +413,6 @@ var BrowserPrototype = {
|
|||||||
this.select(null, filtering)
|
this.select(null, filtering)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
this.select('none', filtering)
|
this.select('none', filtering)
|
||||||
if(!filtering){
|
if(!filtering){
|
||||||
browser.find('.path .dir.cur').text(elem.text())
|
browser.find('.path .dir.cur').text(elem.text())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user