Ignore:
Timestamp:
01/13/06 13:53:36 (14 years ago)
Author:
gogo
Message:

Enhancements to allow using the manager in a List/Details? mode rather than "thumbs". Set $IMConfigViewMode? = 'details'; in the
configuration to try it out. Defaults to thumbs to avoid surprising people :-)

ticket:649

Location:
trunk/plugins/ImageManager/assets
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/ImageManager/assets/imagelist.css

    r256 r447  
    4141  border:none; 
    4242} 
     43.listview { width:100% } 
     44.listview td, .listview th { text-align:left; font-size:small; } 
     45.listview td.actions { text-align:right; } 
     46.listview td.actions img { border:0px; } 
  • trunk/plugins/ImageManager/assets/images.js

    r419 r447  
    5656                var obj = topDoc.getElementById('orginal_width'); obj.value = width; 
    5757                var obj = topDoc.getElementById('orginal_height'); obj.value = height;           
     58    // Set preview for the selected 
     59    topDoc.getElementById('f_preview').src = window.parent._backend_url + '__function=thumbs&img=' + filename; 
     60     
    5861    update_selected(); 
    5962        } 
  • trunk/plugins/ImageManager/assets/manager.js

    r419 r447  
    5656                if (param)  
    5757                { 
    58       var image_src = param.f_url; 
    5958      var image_regex = new RegExp( '(https?://[^/]*)?' + base_url.replace(/\/$/, '') ); 
    6059      param.f_url = param.f_url.replace( image_regex, "" ); 
    6160 
     61      // The image URL may reference one of the automatically resized images  
     62      // (when the user alters the dimensions in the picker), clean that up 
     63      // so it looks right and we get back to a normal f_url 
     64      var rd = _resized_dir.replace(HTMLArea.RE_Specials, '\\$1'); 
     65      var rp = _resized_prefix.replace(HTMLArea.RE_Specials, '\\$1'); 
     66      var dreg = new RegExp('^(.*/)' + rd + '/' + rp + '_([0-9]+)x([0-9]+)_([^/]+)$'); 
     67   
     68      if(dreg.test(param.f_url)) 
     69      { 
     70        param.f_url    = RegExp.$1 + RegExp.$4; 
     71        param.f_width  = RegExp.$2; 
     72        param.f_height = RegExp.$3; 
     73      } 
     74       
    6275      for (var id in param) 
    6376      { 
     
    7689 
    7790      // Locate to the correct directory 
    78       var rd = _resized_dir.replace(HTMLArea.RE_Specials, '\\$1'); 
    79       var rp = _resized_prefix.replace(HTMLArea.RE_Specials, '\\$1'); 
    80       var dreg = new RegExp('^(.*/)(?:'+rd+')?(?:'+rp+'_[0-9]+x[0-9]+_)?([^/]+)$'); 
    81  
     91      var dreg = new RegExp('^(.*/)([^/]+)$'); 
    8292      if(dreg.test(param['f_url'])) 
    8393      { 
     
    93103        } 
    94104      } 
     105      document.getElementById('f_preview').src = _backend_url + '__function=thumbs&img=' + param.f_url;       
    95106                } 
    96107 
     
    98109 
    99110    // For some reason dialog is not shrinkwrapping correctly in IE so we have to explicitly size it for now. 
    100     if(HTMLArea.is_ie) window.resizeTo(600, 460); 
     111    // if(HTMLArea.is_ie) window.resizeTo(600, 460); 
    101112        }; 
    102113 
Note: See TracChangeset for help on using the changeset viewer.