mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
cleanup and twaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
25c927342a
commit
639d3c9edc
@ -471,8 +471,6 @@ var FileSystemLoaderUIActions = actions.Actions({
|
||||
},
|
||||
},
|
||||
|
||||
// XXX for some reason the path list blinks (.update()???) when sub
|
||||
// menu is shown...
|
||||
// XXX should the loader list be nested or open in overlay (as-is now)???
|
||||
browsePath: ['File/Browse file system...',
|
||||
widgets.makeUIDialog(function(base, callback){
|
||||
@ -554,6 +552,9 @@ var FileSystemLoaderUIActions = actions.Actions({
|
||||
// XXX add dialog to list sub-indexes...
|
||||
// XXX
|
||||
|
||||
// NOTE: for multiple indexes this will show the combined history
|
||||
// and selecting a postion will load all the participating
|
||||
// indexes to that date.
|
||||
// NOTE: this will show nothing if .location.method is not loadIndex..
|
||||
//
|
||||
// XXX handle named saves...
|
||||
@ -610,12 +611,11 @@ var FileSystemLoaderUIActions = actions.Actions({
|
||||
that.loadIndex(that.location.path, d)
|
||||
})
|
||||
// mark the current loaded position...
|
||||
.addClass(txt == from ? 'selected' : '')
|
||||
.addClass(txt == from ? 'selected highlighted' : '')
|
||||
})
|
||||
|
||||
// loading may take a some time so we'll need to
|
||||
// update selection our selves...
|
||||
//
|
||||
make.done()
|
||||
|
||||
// NOTE: here we will select 'Latest' if nothing
|
||||
// was selected...
|
||||
o.select()
|
||||
@ -1533,6 +1533,8 @@ var FileSystemWriterUIActions = actions.Actions({
|
||||
dialog.parent.close()
|
||||
})
|
||||
.addClass('selected')
|
||||
|
||||
make.done()
|
||||
})
|
||||
|
||||
o.dom.addClass('metadata-view tail-action')
|
||||
|
||||
@ -530,6 +530,7 @@ var DialogsActions = actions.Actions({
|
||||
})
|
||||
})
|
||||
|
||||
make.done()
|
||||
})
|
||||
})],
|
||||
})
|
||||
@ -822,8 +823,14 @@ var WidgetTestActions = actions.Actions({
|
||||
that.parent.close()
|
||||
})
|
||||
|
||||
// XXX the parent is not yet set at this point...
|
||||
//console.log('>>>', that.parent)
|
||||
// NOTE: the dialog's .parent is not yet set at this point...
|
||||
|
||||
// This will finalize the dialog...
|
||||
//
|
||||
// NOTE: this is not needed here as the dialog is drawn
|
||||
// on sync, but for async dialogs this will align
|
||||
// the selected field correctly.
|
||||
make.done()
|
||||
})
|
||||
// NOTE: this is not a dialog event, it is defined by the
|
||||
// container to notify us that we are closing...
|
||||
|
||||
@ -166,9 +166,12 @@ function makeConstructor(name, a, b){
|
||||
return obj
|
||||
}
|
||||
|
||||
/* XXX for some reason this works for the _constructor but all
|
||||
* instances get the wrong name resolved...
|
||||
Object.defineProperty(_constructor, 'name', {
|
||||
value: name,
|
||||
})
|
||||
*/
|
||||
|
||||
// just in case the browser refuses to change the name, we'll make it
|
||||
// a different offer ;)
|
||||
|
||||
@ -765,6 +765,12 @@ var BrowserPrototype = {
|
||||
// .itemButtons
|
||||
//
|
||||
//
|
||||
// Finalize the dialog (optional)...
|
||||
// - Call make.done() can optionally be called after all the itmes
|
||||
// are created. This will update the dialog to align the
|
||||
// selected position.
|
||||
// This is useful for dialogs with async loading items.
|
||||
//
|
||||
//
|
||||
// XXX need a way to handle path errors in the extension API...
|
||||
// ...for example, if .list(..) can't list or lists a different
|
||||
@ -1043,6 +1049,12 @@ var BrowserPrototype = {
|
||||
return res
|
||||
}
|
||||
|
||||
// align the dialog...
|
||||
make.done = function(){
|
||||
var s = l.find('.selected')
|
||||
s.length > 0 && that.select(s)
|
||||
}
|
||||
|
||||
// build the list...
|
||||
var res = list.call(this, path, make)
|
||||
|
||||
@ -2170,7 +2182,9 @@ var BrowserPrototype = {
|
||||
parent.append(dom)
|
||||
}
|
||||
|
||||
// XXX is this the right way to go???
|
||||
// Select the default path...
|
||||
//
|
||||
// NOTE: this may not work when the dialog is loaded async...
|
||||
setTimeout(function(){
|
||||
// load the initial state...
|
||||
that.update(options.path || that.path || '/')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user