|
From: Raymond I. <xw...@ya...> - 2003-08-15 14:20:50
|
Hi,
I think it should work as it won't break anything.
--
Raymond Irving
--- bs...@in... wrote:
> Hi
>
> This is a mail basicly for Raymond Irving as you
> have implementet the Blueprint
> model in dynLayer.inline.js.
>
> I would like to get string of generateBlueprint()
> *without* opening a
> window. This would give me the possability to send
> the blueprint
> directly to the server without the overhead of
> manualy coping the text
> from the popup window that is currently created now.
>
> Question:
> Could you add following modification to
> dynLayer.inline.js
> - replacing the generateBlueprint-function.
> - adding getBlueprint-function
>
>
> NEW: (untested, but actually only refactoring)
> ----------------------------------------------------
> DynElement.prototype.getBlueprint = function(type) {
> var i,c,ht,str =[];
> var ch=this.children;
> for(i=0;i<ch.length;i++) {
> c = ch[i];
> DynElement._flagPreCreate(c);
> ht=c.getOuterHTML();
> if(!type || type=='css') str[i]=ht;
> else {
> ht=ht.replace(/\'/g,'\\\'');
> ht=ht.replace(/\r/g,'\\r');
> ht=ht.replace(/\n/g,'\\n');
> str[str.length]='_bw(\''+ht+'\');';
> }
> }
> if(!type || type=='css') str=str.join('');
> else str=str.join('\n');
> if(type=='css') { // generate style sheet from
> blueprints
> var ar=str.split('<div');
> for(i=0;i<ar.length;i++){
> ar[i]=ar[i].replace(/(.+)id="(.+)"
> style="(.+)"(.+)/g,'#$2 {$3}');
> }
> str=ar.join('');
> }
> return str;
> }
>
> DynElement.prototype.generateBlueprint =
> function(type) {
> var url=dynapi.library.path+'ext/blueprint.html';
> var
>
win=window.open(url,'blueprint','width=500,height=350,scrollbars=no,status=no,toolbar=no');
> var f=win.document.forms['frm'];
> f.txtout.value=DynLayer.getBlueprint(type);
> };
>
>
> Thanks
> --
> S. Blum <bs...@in...>
>
>
>
>
>
-------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built
> ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are
> available now.
> Download today and enter to win an XBOX or Visual
> Studio .NET.
>
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> _______________________________________________
> Dynapi-Dev mailing list
> Dyn...@li...
>
http://www.mail-archive.com/dyn...@li.../
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
|