Ignore:
Timestamp:
05/22/08 12:55:21 (12 years ago)
Author:
ray
Message:

merging new-dialogs and trunk via intermediate branch

Location:
branches/new-dialogs-merge/plugins/Linker
Files:
23 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/new-dialogs-merge/plugins/Linker/linker.js

    r999 r1007  
    182182           values.p_options.push('height=' + values.p_height); 
    183183         } 
    184          atr.onclick = 'if(window.top && window.top.Xinha){return false}window.open(this.href, \'' + (values.p_name.replace(/[^a-z0-9_]/i, '_')) + '\', \'' + values.p_options.join(',') + '\');return false;'; 
     184         atr.onclick = 'if(window.parent && window.parent.Xinha){return false}window.open(this.href, \'' + (values.p_name.replace(/[^a-z0-9_]/i, '_')) + '\', \'' + values.p_options.join(',') + '\');return false;'; 
    185185       } 
    186186     } 
     
    327327  if(typeof dTree == 'undefined') 
    328328  { 
     329    this.linker.editor.setLoadingMessage('Loading Tree script'); 
    329330    Xinha._loadback(Xinha.getPluginDir("Linker") + '/dTree/dtree.js', 
    330331                       function() {lDialog._prepareDialog(); } 
     
    337338    if(linker.lConfig.backend) 
    338339    { 
    339       //get files from backend 
    340       Xinha._postback(linker.lConfig.backend, 
    341                       linker.lConfig.backend_data,  
     340        //get files from backend 
     341        this.linker.editor.setLoadingMessage('Loading files from backend'); 
     342        Xinha._postback(linker.lConfig.backend, 
     343                          linker.lConfig.backend_data, 
    342344                          function(txt) { 
    343345                            try { 
     
    366368 
    367369  // Now we have everything we need, so we can build the dialog. 
    368   var dialog = this.dialog = new Xinha.Dialog(linker.editor, this.html, 'Linker'); 
     370  var dialog = this.dialog = new Xinha.Dialog(linker.editor, this.html, 'Linker',{width:600,height:400}); 
    369371  var dTreeName = Xinha.uniq('dTree_'); 
    370372 
     
    379381  //ddTree.innerHTML = this.dTree.toString(); 
    380382  ddTree.innerHTML = ''; 
    381   ddTree.style.position = 'absolute'; 
    382   ddTree.style.left = 1 + 'px'; 
    383   ddTree.style.top =  0 + 'px'; 
     383//  ddTree.style.position = 'absolute'; 
     384//  ddTree.style.left = 1 + 'px'; 
     385 // ddTree.style.top =  0 + 'px'; 
    384386  ddTree.style.overflow = 'auto'; 
     387  ddTree.style.height = '300px'; 
     388  if ( Xinha.is_ie ) 
     389  { 
     390    ddTree.style.styleFloat = "left"; 
     391  } 
     392  else 
     393  { 
     394    ddTree.style.cssFloat = "left"; 
     395  } 
    385396  ddTree.style.backgroundColor = 'white'; 
    386397  this.ddTree = ddTree; 
     398   
    387399  this.dTree._linker_premade = this.dTree.toString(); 
    388400 
    389401  var options = this.dialog.getElementById('options'); 
    390   options.style.position = 'absolute'; 
    391   options.style.top      = 0   + 'px'; 
    392   options.style.right    = 0   + 'px'; 
     402  //options.style.position = 'absolute'; 
     403  //options.style.top      = 0   + 'px'; 
     404  //options.style.right    = 0   + 'px'; 
    393405  options.style.width    = 320 + 'px'; 
    394406  options.style.overflow = 'auto'; 
    395407 
    396408  // Hookup the resizer 
     409  this.dialog.rootElem.style.paddingBottom ="0"; 
    397410  this.dialog.onresize = function() 
    398411    { 
    399412      var h = parseInt(dialog.height) - dialog.getElementById('h1').offsetHeight; 
    400       var w = parseInt(dialog.width)  - 322 ; 
     413      var w = parseInt(dialog.width)  - 330 ; 
     414 
    401415      // An error is thrown with IE when trying to set a negative width or a negative height 
    402416      // But perhaps a width / height of 0 is not the minimum required we need to set 
    403417      if (w<0) w = 0; 
    404418      if (h<0) h = 0; 
    405       options.style.height = ddTree.style.height = h + 'px'; 
    406       ddTree.style.width  = w + 'px'; 
    407     } 
    408  
     419      //options.style.height = 
     420      lDialog.ddTree.style.height = h + 'px'; 
     421      lDialog.ddTree.style.width  = w + 'px'; 
     422    } 
    409423  this.ready = true; 
     424  ddTree = null; 
     425  Xinha.freeLater(lDialog, 'ddTree'); 
     426  options = null; 
    410427}; 
    411428 
Note: See TracChangeset for help on using the changeset viewer.