Ignore:
Timestamp:
01/07/07 03:02:43 (13 years ago)
Author:
ray
Message:

EFM update:

  • make the files display area scale with the window
  • prevent insertion an empty img when no image is selected, remove the selected img when url field is cleared
  • prevent insertion of border styles in IE when no border is selected
  • heading of popup changed from "File Manager" to "Insert Image" and "Insert File Link" respectively

htmlarea.js: new function HTMLArea.viewportSize()

full-screen.js: use above function to detect viewport size

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/ExtendedFileManager/assets/manager.js

    r608 r631  
    4747 
    4848//initialise the form 
     49 
     50if (manager_mode == "link") 
     51{ 
     52    var offsetForInputs = (HTMLArea.is_ie) ? 155 : 140; 
     53} 
     54else 
     55{ 
     56    var offsetForInputs = (HTMLArea.is_ie) ? 220 : 200; 
     57}     
    4958init = function () 
    5059{ 
    51     if (manager_mode == "link") 
    52       __dlg_init(null,  {width:650,height:500}); 
    53     else 
    54       __dlg_init(null,  {width:650,height:560}); 
     60    var h =  100 // space above files  
     61           + 250 // files iframe 
     62           + offsetForInputs; 
     63     
     64    __dlg_init(null,  {width:650,height:h}); 
    5565 
    5666    __dlg_translate('ExtendedFileManager'); 
     
    294304            var id = fields[i]; 
    295305            var el = document.getElementById(id); 
    296             if(id == "f_url" && el.value.indexOf('://') < 0 ) 
     306            if(id == "f_url" && el.value.indexOf('://') < 0 && el.value ) 
    297307                param[id] = makeURL(base_url,el.value); 
    298308            else 
     
    320330          } 
    321331        } 
    322  
    323332        __dlg_close(param); 
    324333        return false; 
     
    517526} 
    518527 
     528 
     529function resize() 
     530{ 
     531        var win = HTMLArea.viewportSize(window); 
     532        document.getElementById('imgManager').style.height = win.y - 150 - offsetForInputs + 'px'; 
     533         
     534        return true; 
     535} 
    519536addEvent(window, 'load', init); 
     537addEvent(window, 'resize', resize); 
Note: See TracChangeset for help on using the changeset viewer.