mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-30 19:00:09 +00:00
minor refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
f3dc8e1e30
commit
092827760d
@ -262,7 +262,8 @@ var BrowserPrototype = {
|
|||||||
// array, adding a '' at the end seems both obvious and
|
// array, adding a '' at the end seems both obvious and
|
||||||
// artificial...
|
// artificial...
|
||||||
// XXX is this the correct name???
|
// XXX is this the correct name???
|
||||||
path2lst: function(path){
|
// ...should this be .normalizePath(..)???
|
||||||
|
path2list: function(path){
|
||||||
var splitter = /[\\\/]/
|
var splitter = /[\\\/]/
|
||||||
|
|
||||||
if(typeof(path) == typeof('str')){
|
if(typeof(path) == typeof('str')){
|
||||||
@ -508,11 +509,11 @@ var BrowserPrototype = {
|
|||||||
|
|
||||||
// string path and terminated with '/' -- no selection...
|
// string path and terminated with '/' -- no selection...
|
||||||
if(typeof(path) == typeof('str') && !/[\\\/]/.test(path.trim().slice(-1))){
|
if(typeof(path) == typeof('str') && !/[\\\/]/.test(path.trim().slice(-1))){
|
||||||
path = this.path2lst(path)
|
path = this.path2list(path)
|
||||||
var selection = path.pop()
|
var selection = path.pop()
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
path = this.path2lst(path)
|
path = this.path2list(path)
|
||||||
var selection = null
|
var selection = null
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1369,7 +1370,7 @@ var BrowserPrototype = {
|
|||||||
// normalize and load path...
|
// normalize and load path...
|
||||||
//} else {
|
//} else {
|
||||||
} else if(path.constructor == Array || /[\\\/]/.test(path)) {
|
} else if(path.constructor == Array || /[\\\/]/.test(path)) {
|
||||||
path = this.path2lst(path)
|
path = this.path2list(path)
|
||||||
var elem = path.slice(-1)[0]
|
var elem = path.slice(-1)[0]
|
||||||
this.path = path.slice(0, -1)
|
this.path = path.slice(0, -1)
|
||||||
elem = this.select(elem)
|
elem = this.select(elem)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user