mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-11-02 20:30:09 +00:00
fixed one bug, found a new one...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
b2f0dcbd52
commit
e8007c1c79
@ -79,7 +79,7 @@ function(path, make){
|
|||||||
// get the drive list on windows...
|
// get the drive list on windows...
|
||||||
if(os.type() == 'Windows_NT' && path == '/'){
|
if(os.type() == 'Windows_NT' && path == '/'){
|
||||||
return new promise(function(resolve, reject){
|
return new promise(function(resolve, reject){
|
||||||
// NOTE: this is a bit brain-dead but it does the job done
|
// NOTE: this is a bit brain-dead but it gets the job done
|
||||||
// and faster than fancy modules like drivelist...
|
// and faster than fancy modules like drivelist...
|
||||||
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
||||||
.split('')
|
.split('')
|
||||||
|
|||||||
@ -117,7 +117,7 @@ body.dark {
|
|||||||
|
|
||||||
var TREE = {
|
var TREE = {
|
||||||
dir_a: {},
|
dir_a: {},
|
||||||
dir_b: {
|
'dir b': {
|
||||||
file1: 'this is a file',
|
file1: 'this is a file',
|
||||||
file2: 'this is a file',
|
file2: 'this is a file',
|
||||||
file3: 'this is a file',
|
file3: 'this is a file',
|
||||||
|
|||||||
@ -30,6 +30,7 @@ var widget = require('./widget')
|
|||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
// Helpers...
|
// Helpers...
|
||||||
|
|
||||||
|
// XXX why do we need this???
|
||||||
var quoteWS = function(str){
|
var quoteWS = function(str){
|
||||||
return str.replace(/(\s)/g, '\\$1')
|
return str.replace(/(\s)/g, '\\$1')
|
||||||
}
|
}
|
||||||
@ -562,7 +563,8 @@ var BrowserPrototype = {
|
|||||||
/* XXX does the right thing (replaces the later .focus(..)
|
/* XXX does the right thing (replaces the later .focus(..)
|
||||||
* and .keyup(..)) but does not work in IE...
|
* and .keyup(..)) but does not work in IE...
|
||||||
.on('input', function(){
|
.on('input', function(){
|
||||||
that.filterList(quoteWS($(this).text()))
|
//that.filterList(quoteWS($(this).text()))
|
||||||
|
that.filterList($(this).text())
|
||||||
})
|
})
|
||||||
*/
|
*/
|
||||||
// only update if text changed...
|
// only update if text changed...
|
||||||
@ -607,7 +609,8 @@ var BrowserPrototype = {
|
|||||||
// handle clicks ONLY when not disabled...
|
// handle clicks ONLY when not disabled...
|
||||||
.click(function(){
|
.click(function(){
|
||||||
if(!$(this).hasClass('disabled')){
|
if(!$(this).hasClass('disabled')){
|
||||||
that.push(quoteWS($(this).text()))
|
//that.push(quoteWS($(this).text()))
|
||||||
|
that.push($(this).text())
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.text(p)
|
.text(p)
|
||||||
@ -1377,7 +1380,8 @@ var BrowserPrototype = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var path = this.path
|
var path = this.path
|
||||||
var txt = quoteWS(elem.text())
|
//var txt = quoteWS(elem.text())
|
||||||
|
var txt = elem.text()
|
||||||
path.push(elem.text())
|
path.push(elem.text())
|
||||||
|
|
||||||
// XXX should this be before or after the actual path update???
|
// XXX should this be before or after the actual path update???
|
||||||
@ -1435,7 +1439,8 @@ var BrowserPrototype = {
|
|||||||
|
|
||||||
var path = this.path
|
var path = this.path
|
||||||
|
|
||||||
path.push(quoteWS(elem.text()))
|
//path.push(quoteWS(elem.text()))
|
||||||
|
path.push(elem.text())
|
||||||
|
|
||||||
var res = this.open(path)
|
var res = this.open(path)
|
||||||
|
|
||||||
@ -1570,7 +1575,8 @@ var BrowserPrototype = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
path = this.path
|
path = this.path
|
||||||
path.push(quoteWS(elem.text()))
|
//path.push(quoteWS(elem.text()))
|
||||||
|
path.push(elem.text())
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the options method and call it if it exists...
|
// get the options method and call it if it exists...
|
||||||
|
|||||||
@ -236,6 +236,7 @@ module.GLOBAL_KEYBOARD = {
|
|||||||
alt: 'browseActions: "/Bookmark/"',
|
alt: 'browseActions: "/Bookmark/"',
|
||||||
},
|
},
|
||||||
C: 'browseActions: "/Crop/"',
|
C: 'browseActions: "/Crop/"',
|
||||||
|
O: 'pathListerTest',
|
||||||
|
|
||||||
// XXX for debug...
|
// XXX for debug...
|
||||||
G: function(){ $('.viewer').toggleClass('visible-gid') },
|
G: function(){ $('.viewer').toggleClass('visible-gid') },
|
||||||
|
|||||||
@ -2718,6 +2718,8 @@ var ActionTreeActions = actions.Actions({
|
|||||||
})
|
})
|
||||||
}],
|
}],
|
||||||
// XXX make this nw only...
|
// XXX make this nw only...
|
||||||
|
// XXX BUG: for some reason this when run from .browseActions(..) loads
|
||||||
|
// incorrectly while when called directly is OK...
|
||||||
pathListerTest: ['Interface|Test/Path lister test (floating)...',
|
pathListerTest: ['Interface|Test/Path lister test (floating)...',
|
||||||
function(path){
|
function(path){
|
||||||
var parent = this.preventClosing ? this.preventClosing() : null
|
var parent = this.preventClosing ? this.preventClosing() : null
|
||||||
@ -2727,8 +2729,7 @@ var ActionTreeActions = actions.Actions({
|
|||||||
console.log('PATH:', path.slice(1))
|
console.log('PATH:', path.slice(1))
|
||||||
|
|
||||||
// XXX use logger...
|
// XXX use logger...
|
||||||
// XXX this does not work because in the last path
|
// XXX need to strip the leading '/' in a more cross-platform way...
|
||||||
// element ' ' is replaced with a '\\ '...
|
|
||||||
this.loadPath && this.loadPath(path.slice(1))
|
this.loadPath && this.loadPath(path.slice(1))
|
||||||
|
|
||||||
return
|
return
|
||||||
@ -3180,7 +3181,7 @@ module.ImageBookmarks = ImageGridFeatures.Feature({
|
|||||||
|
|
||||||
var AppControlActions = actions.Actions({
|
var AppControlActions = actions.Actions({
|
||||||
// XXX revise these...
|
// XXX revise these...
|
||||||
close: ['File|Interface/Cloase viewer',
|
close: ['File|Interface/Close viewer',
|
||||||
function(){
|
function(){
|
||||||
// XXX should we do anything else here like auto-save???
|
// XXX should we do anything else here like auto-save???
|
||||||
window.close()
|
window.close()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user