Changeset 132

Show
Ignore:
Timestamp:
09/14/08 21:50:45 (4 months ago)
Author:
bi..@lilyapp.org
Message:

some more border fixes, mostly for iframe related externs

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lily/lily/chrome/content/components/iframe.js

    r125 r132  
    7878         
    7979        //pass the calling context a ref to the view 
    80         parent.ui=new LilyObjectView(parent,'<iframe src="'+src+'" scrolling="'+ scroll +'" id="'+parent.createElID("iframe")+'" style="height:100%;width:100%;margin:0px;border:0px;padding:0px;visibility:hidden"></iframe>'); 
     80        parent.ui=new LilyObjectView(parent,'<div style="height:100%" id="'+parent.createElID("iframe_wrapper")+'"><iframe src="'+src+'" scrolling="'+ scroll +'" id="'+parent.createElID("iframe")+'" style="height:100%;width:100%;margin:0px;border:0px;padding:0px;visibility:hidden"></iframe></div>'); 
    8181        parent.ui.draw(); 
    8282                                 
     
    109109                } else { 
    110110                        frameCover.style.visibility="visible"; 
    111 //                     frameCover.style.backgroundColor='red';                                 
     111                       //frameCover.style.backgroundColor='red';                               
    112112                        //frameCover.style.zIndex=9999; 
    113113                        frameCover.style.zIndex=parent.zIndex+1; 
     
    179179        frameCover.style.zIndex=parent.zIndex+1; //this is a problem- needs to be tied to the zindex of the object 
    180180         
     181        this.wrapper = parent.ui.getElByID(parent.createElID("iframe_wrapper")); 
     182         
    181183        //try to set this 
    182184        parent["frameCover"]=frameCover; 
  • trunk/lily/lily/chrome/content/externals/googledotmap.js

    r128 r132  
    3434{ 
    3535        var thisPtr=this; 
     36 
     37        this.allowFont=false; //don't allow font changes 
     38        this.allowBorder=false; //no custom border       
    3639        this.ui={};      
    3740         
  • trunk/lily/lily/chrome/content/externals/iframe.js

    r125 r132  
    136136         
    137137        iframe.objFrame.addEventListener("load",frameLoad,false);        
    138         this.controller.setNoBorders(this.noBorders);    
     138        this.controller.setNoBorders(this.noBorders); 
     139        this.displayElement = iframe.wrapper; 
    139140         
    140141        return this; 
  • trunk/lily/lily/chrome/content/externals/jquerydotcolorpicker.js

    r128 r132  
    3535        this.ui={};      
    3636        this.outlet1 = new this.outletClass("outlet1",this,"color hex string"); 
    37         this.resize=false;               
     37        this.resize=false; 
     38        this.allowFont=false; //don't allow font changes 
     39        this.allowBorder=false; //no custom border                       
    3840         
    3941        function initColorPicker() { 
  • trunk/lily/lily/chrome/content/externals/subpatch.js

    r87 r132  
    188188                var sizeArr=LilyUtils.extractPatchSize(data); //get the patch size w/o having to eval the json. 
    189189                var parentDir=(file.parent.isDirectory())?file.parent:null; //patch's parent dir. 
    190                 thisPatch.obj = new LilyPatch(pid,Lily,sizeArr[0],sizeArr[1],false,{type:"iframe",win:thisPtr.displayElement,parent:thisPtr.parent.patchView.xulWin}); //call the patch constructor 
     190                thisPatch.obj = new LilyPatch(pid,Lily,sizeArr[0],sizeArr[1],false,{type:"iframe",win:thisPtr.resizeElement,parent:thisPtr.parent.patchView.xulWin}); //call the patch constructor 
    191191 
    192192                thisPatch.obj.callback=function(){ 
     
    263263        //create the new patch using the iframe 
    264264        function frameLoad() { 
    265                 thisPtr.displayElement.removeEventListener("load",frameLoad,true); //remove this so we don't loop 
     265                thisPtr.resizeElement.removeEventListener("load",frameLoad,true); //remove this so we don't loop 
    266266                if(thisPtr.fPath&&thisPatch.json&&thisPatch.file) {  
    267267                        openPatch(thisPatch.json,thisPatch.file);                        
     
    276276        var iframe=new LilyComponents._iframe(this,null,200,200,"no",frameLoad);        //no scrolling 
    277277         
    278         this.displayElement=this.resizeElement=iframe.objFrame; // 
     278        this.resizeElement=iframe.objFrame; // 
     279        this.displayElement=iframe.wrapper;      
    279280//      this.displayElement.addEventListener("load",frameLoad,false); //we'll use this once for init only        
    280281        this.controller.setNoBorders(true); 
  • trunk/lily/lily/chrome/content/externals/xuldottree.js

    r128 r132  
    319319         
    320320        var iframe=new LilyComponents._iframe(this,"chrome://lily/content/lib/base.xul",200,200,"no",frameInit); 
     321        this.displayElement = iframe.wrapper;    
    321322         
    322323        function frameInit() { 
  • trunk/lily/lily/chrome/content/externals/yuidotcalendar.js

    r131 r132  
    3737        this.inlet1=new this.inletClass("inlet1",this, "date string"); 
    3838        this.ui={};      
    39         this.resize=false; 
    40         this.allowFont=false; //don't allow font changes         
     39        this.resize=false; //no resizing 
     40        this.allowFont=false; //don't allow font changes 
     41        this.allowBorder=false; //no custom border       
    4142         
    4243        this.today = new Date();  
  • trunk/lily/lily/chrome/content/object/base.js

    r131 r132  
    5959        this.resetSize=true; //should we reset the object size and reflow on font size changes, etc 
    6060        this.allowFont=true; //allow the font family/size/color changes 
    61         this.allowColor=true; //allow color changes                      
     61        this.allowColor=true; //allow color changes 
     62        this.allowBorder=true; //no custom border                        
    6263        this.resize=true; //should the object be resizable 
    6364        this.displayArgs=true; //should we see objects arguments (for non-UI objects only) 
    6465        this.loadsSubPatchByName = false; //true when a subpatch is invoked by name 
    6566        this.hasBeenResized=false; //true when an extern has resized by hand. 
    66         this.isPaste=false; //true if we're creating this as a paste 
     67        this.isPaste=false; //true if we're creating this as a paste            
    6768         
    6869        this.ui=null; //to filled in when view instantiates 
     
    140141        this.setBorderColor=function(bcolor,perm) { 
    141142                 
    142                 if(bcolor) { 
     143                if(bcolor && this.allowBorder) { 
    143144                        var ui=this.controller.objView.getInputWrapper(); 
    144145 
     
    157158        this.setBorderStyle=function(bstyle,perm) { 
    158159                                 
    159                 if(bstyle) { 
     160                if(bstyle && this.allowBorder) { 
    160161                        var ui=this.controller.objView.getInputWrapper(); 
    161162                         
     
    187188        this.setBorderSize=function(bsize,perm) { 
    188189                 
    189                 if(bsize) { 
     190                if(bsize && this.allowBorder) { 
    190191                        var ui=this.controller.objView.getInputWrapper(); 
    191192