Feature Requests item #789038, was opened at 2003-08-15 03:59
Message generated for change (Settings changed) made by bs_php
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355757&aid=789038&group_id=5757

Category: Other
Group: None
>Status: Closed
Resolution: None
Priority: 5
Submitted By: Sam Blum (bs_php)
Assigned to: Nobody/Anonymous (nobody)
Summary: A get string function of generateBlueprint() 

Initial Comment:
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,sta
tus=no,toolbar=no');
        var f=win.document.forms['frm'];
        f.txtout.value=DynLayer.getBlueprint(type);
};


Thanks

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355757&aid=789038&group_id=5757


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/[EMAIL PROTECTED]/

Reply via email to