mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-30 10:50:08 +00:00
fixed a bug with List.options.data contaminated when toggling showDisabled...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
f819acfa94
commit
9d632201e4
@ -225,12 +225,9 @@ var MetadataUIActions = actions.Actions({
|
|||||||
|
|
||||||
// XXX should we replace 'mode' with nested set of metadata???
|
// XXX should we replace 'mode' with nested set of metadata???
|
||||||
// XXX make this support multiple images...
|
// XXX make this support multiple images...
|
||||||
// XXX BUG: with mode 'disabled' key D enables elements but does not
|
|
||||||
// hide them...
|
|
||||||
showMetadata: ['Image/Show metadata',
|
showMetadata: ['Image/Show metadata',
|
||||||
function(image, mode){
|
function(image, mode){
|
||||||
image = this.data.getImage(image)
|
image = this.data.getImage(image)
|
||||||
//mode = mode || 'short'
|
|
||||||
mode = mode || 'disabled'
|
mode = mode || 'disabled'
|
||||||
|
|
||||||
var field_order = this.config['metadata-field-order'] || []
|
var field_order = this.config['metadata-field-order'] || []
|
||||||
@ -276,7 +273,10 @@ var MetadataUIActions = actions.Actions({
|
|||||||
var o = overlay.Overlay(this.ribbons.viewer,
|
var o = overlay.Overlay(this.ribbons.viewer,
|
||||||
browse.makeList(
|
browse.makeList(
|
||||||
null,
|
null,
|
||||||
fields)
|
fields,
|
||||||
|
{
|
||||||
|
showDisabled: false,
|
||||||
|
})
|
||||||
// path selected...
|
// path selected...
|
||||||
.open(function(evt, path){
|
.open(function(evt, path){
|
||||||
// edit field...
|
// edit field...
|
||||||
@ -288,6 +288,7 @@ var MetadataUIActions = actions.Actions({
|
|||||||
*/
|
*/
|
||||||
}))
|
}))
|
||||||
.close(function(){
|
.close(function(){
|
||||||
|
// XXX
|
||||||
})
|
})
|
||||||
o.client.dom.addClass('metadata-view')
|
o.client.dom.addClass('metadata-view')
|
||||||
|
|
||||||
|
|||||||
@ -348,8 +348,7 @@ var URLHistoryUIActions = actions.Actions({
|
|||||||
// - [ 'open', 'close' ] - explicitly select event
|
// - [ 'open', 'close' ] - explicitly select event
|
||||||
'url-history-list-clear': ['open', 'close'],
|
'url-history-list-clear': ['open', 'close'],
|
||||||
},
|
},
|
||||||
// XXX BUG: when running from action menu this breaks...
|
// XXX make availabilyty checking live (now on open dialog)...
|
||||||
// ...possibly connected with restoring after .preventClosing(..)
|
|
||||||
// XXX need to check items...
|
// XXX need to check items...
|
||||||
// XXX use svg icons for buttons...
|
// XXX use svg icons for buttons...
|
||||||
listURLHistory: ['History|File/Show history',
|
listURLHistory: ['History|File/Show history',
|
||||||
@ -375,7 +374,15 @@ var URLHistoryUIActions = actions.Actions({
|
|||||||
var o = overlay.Overlay(this.ribbons.viewer,
|
var o = overlay.Overlay(this.ribbons.viewer,
|
||||||
browse.makeList(
|
browse.makeList(
|
||||||
null,
|
null,
|
||||||
Object.keys(this.url_history).reverse(),
|
Object.keys(this.url_history)
|
||||||
|
.reverse()
|
||||||
|
// NOTE: this might get a little slow for
|
||||||
|
// very large sets...
|
||||||
|
.map(function(p){
|
||||||
|
return !that.checkURLFromHistory(p) ?
|
||||||
|
'- ' + p
|
||||||
|
: p
|
||||||
|
}),
|
||||||
{
|
{
|
||||||
// add item buttons...
|
// add item buttons...
|
||||||
itemButtons: [
|
itemButtons: [
|
||||||
@ -433,9 +440,11 @@ var URLHistoryUIActions = actions.Actions({
|
|||||||
|
|
||||||
var list = o.client
|
var list = o.client
|
||||||
|
|
||||||
|
/*
|
||||||
Object.keys(this.url_history).reverse().forEach(function(p){
|
Object.keys(this.url_history).reverse().forEach(function(p){
|
||||||
that.checkURLFromHistory(p) || list.filter(p).addClass('disabled')
|
that.checkURLFromHistory(p) || list.filter(p).addClass('disabled')
|
||||||
})
|
})
|
||||||
|
*/
|
||||||
|
|
||||||
// select and highlight current path...
|
// select and highlight current path...
|
||||||
cur && list
|
cur && list
|
||||||
|
|||||||
@ -2107,7 +2107,11 @@ ListPrototype.options = {
|
|||||||
|
|
||||||
if(typeof(k) == typeof('str')){
|
if(typeof(k) == typeof('str')){
|
||||||
n = tt
|
n = tt
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
// NOTE: here we want to avoid .data contamination
|
||||||
|
// so we'll make a copy...
|
||||||
|
n = n.slice()
|
||||||
n[0] = tt
|
n[0] = tt
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user