notes and some testing, still buggy...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-01-25 03:21:45 +03:00
parent fc88967873
commit 6419a83617

View File

@ -1227,10 +1227,9 @@ function(title, options){
: 'off' } }))) }
// XXX should we patch the close callback not to get called twice???
// XXX BUG: if user passes a new spec each time this will not work...
// ...can we clear the old callkback??
// XXX investigate using the update event for unbinding and rebinding the close event...
// XXX still needs work...
browse.items.batch =
function(spec, callback){
var that = this
@ -1255,6 +1254,9 @@ function(spec, callback){
var cb
callback
&& this.dialog
// XXX STUB this get's us around the close event getting triggered
// multiple times...
// ...change to .close(..) when fixed...
.one('close', cb = function(mode){
// XXX get the field data and pass it to the callback...
callback(
@ -1277,6 +1279,10 @@ function(spec, callback){
// reset the callback on update...
// XXX this does not work yet...
.one('update', function(){
// XXX for some reason this does not work...
// ...I'd expect to see cb(..) not getting called
// at all (as .update(..) is called on first draw) but
// it does not get unbound...
// XXX BUG: this.off(..) will not work with non-standard events...
this.dom.off('close', cb) })
return this }