mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
fixed several defaults bugs...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
0336afda01
commit
b43d425ebc
@ -453,10 +453,12 @@ module.AppControl = core.ImageGridFeatures.Feature({
|
|||||||
.replace('${VERSION}', this.version || 'gen4')
|
.replace('${VERSION}', this.version || 'gen4')
|
||||||
.replace('${FILENAME}',
|
.replace('${FILENAME}',
|
||||||
img ?
|
img ?
|
||||||
(img.name || img.path.replace(/\.[\\\/]/, ''))
|
(img.name
|
||||||
|
|| (img.path && img.path.replace(/\.[\\\/]/, ''))
|
||||||
|
|| '')
|
||||||
: '')
|
: '')
|
||||||
.replace('${PATH}',
|
.replace('${PATH}',
|
||||||
img ?
|
(img && img.path) ?
|
||||||
(img.base_path || '.')
|
(img.base_path || '.')
|
||||||
+'/'+ img.path.replace(/\.[\\\/]/, '')
|
+'/'+ img.path.replace(/\.[\\\/]/, '')
|
||||||
: '')
|
: '')
|
||||||
|
|||||||
@ -466,7 +466,7 @@ module.ImagesPrototype = {
|
|||||||
|
|
||||||
return (img.base_path || path) ?
|
return (img.base_path || path) ?
|
||||||
[img.base_path || path, img.path].join('/')
|
[img.base_path || path, img.path].join('/')
|
||||||
: util.path2url(img.path)
|
: util.path2url(img.path || IMAGE_DATA.path)
|
||||||
},
|
},
|
||||||
// NOTE: actual URL decoding and encoding is not done here to keep
|
// NOTE: actual URL decoding and encoding is not done here to keep
|
||||||
// things consistent, rather it is done the the latest possible
|
// things consistent, rather it is done the the latest possible
|
||||||
@ -483,7 +483,8 @@ module.ImagesPrototype = {
|
|||||||
img_data = img_data == null ? this[gid] : img_data
|
img_data = img_data == null ? this[gid] : img_data
|
||||||
|
|
||||||
// if no usable images are available use STUB data...
|
// if no usable images are available use STUB data...
|
||||||
if((img_data.preview == null
|
if(!img_data
|
||||||
|
|| (img_data.preview == null
|
||||||
|| Object.keys(img_data.preview).length == 0)
|
|| Object.keys(img_data.preview).length == 0)
|
||||||
&& img_data.path == null){
|
&& img_data.path == null){
|
||||||
img_data = IMAGE_DATA
|
img_data = IMAGE_DATA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user