Control.Modal 2.0 RC1 Online
The help text to more granular AJAX with the new modal 2.0RC1 has not changed, however it does not work correctly anymore. For some reason, that I dont fully get, the 2.0RC1 binds the AJAX.Request.onComplete to the class Control.Modal, this not exhibiting the update method.
Since I could not figure out a way to access update on the bound "this" I had to work around it, very very ugly:
var articleModal = new Control.Modal(false, { position: 'absolute', contents: function(){ new Ajax.Request('/sumtin/find?ref='+$('ref_lookup').value,{ onComplete: function(request){Control.Modal.current.update(request.responseText);}.bind(this)}); return "Loading..."; }});
Help?
Posted June 12th, 2007 at 10:16pm by martinpub
Not sure I understand fully, can you paste in your exact code that works in the old version so I can duplicate and understand?
Posted June 13th, 2007 at 1:07am by ryan
Great ! What about Prototype 1.5.1 compatibility ?
Posted June 13th, 2007 at 5:07am by sucr
Works for me with both 1.5.0 and 1.5.1...
Posted June 13th, 2007 at 9:25am by ryan
2.0RC1 does not work for me, but it works with 1.5.0
I use :
init_cat();
$A(document.getElementsByClassName('linkmodal')).each(function(link){
new Control.Modal(link,{opacity: 0, position: 'relative', width: 600,height: 300});
});
and have a buncf of links like :
Tested with Safari and Firefox.
Posted June 13th, 2007 at 10:59am by sucr
Sorry for the html mess up... :)
Posted June 13th, 2007 at 11:02am by sucr
Could you point to any urls or email me a zip file?
Posted June 13th, 2007 at 10:57pm by ryan
Control.Modal 2.0 RC1 is officially up now with full documentation. Biggest changes are:
Posted June 12th, 2007 at 8:19pm by ryan