Ignore:
Timestamp:
01/28/07 03:11:53 (13 years ago)
Author:
ray
Message:

one more amendmend to [700] + [701]

File:
1 edited

Legend:

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

    r698 r702  
    5858init = function () 
    5959{ 
    60     var h =  100 // space above files  
     60     
     61        var h =  100 // space above files  
    6162           + 250 // files iframe 
    6263           + offsetForInputs; 
     
    6869    var uploadForm = document.getElementById('uploadForm'); 
    6970    if(uploadForm) uploadForm.target = 'imgManager'; 
    70  
     71     
     72    var editor = window.dialogArguments.editor; 
    7173    if (manager_mode == 'image' && typeof colorPicker != "undefined" && document.getElementById('bgCol_pick')) { 
    7274        // Hookup color pickers 
     75        var pickerConfig = { 
     76            cellsize:editor.config.colorPickerCellSize, 
     77            granularity:editor.config.colorPickerGranularity, 
     78            websafe:editor.config.colorPickerWebSafe, 
     79            savecolors:editor.config.colorPickerSaveColors 
     80        }; 
     81 
    7382        var bgCol_pick = document.getElementById('bgCol_pick'); 
    7483        var f_backgroundColor = document.getElementById('f_backgroundColor'); 
    75         var bgColPicker = new colorPicker({cellsize:'5px',callback:function(color){f_backgroundColor.value=color;}}); 
     84        pickerConfig.callback = function(color){f_backgroundColor.value=color;}; 
     85        var bgColPicker = new colorPicker(pickerConfig); 
    7686        bgCol_pick.onclick = function() { bgColPicker.open('top,right', f_backgroundColor ); } 
    7787 
    7888        var bdCol_pick = document.getElementById('bdCol_pick'); 
    7989        var f_borderColor = document.getElementById('f_borderColor'); 
    80         var bdColPicker = new colorPicker({cellsize:'5px',callback:function(color){f_borderColor.value=color;}}); 
     90        pickerConfig.callback = function(color){f_borderColor.value=color;}; 
     91        var bgColPicker = new colorPicker(pickerConfig); 
    8192        bdCol_pick.onclick = function() { bdColPicker.open('top,right', f_borderColor ); } 
    8293    } 
    8394 
    84     var param = window.dialogArguments; 
     95    var param = window.dialogArguments.param; 
    8596 
    8697    if(manager_mode=="image" && param) 
     
    100111        // (when the user alters the dimensions in the picker), clean that up 
    101112        // so it looks right and we get back to a normal f_url 
    102         var rd = _resized_dir.replace(Xinha.RE_Specials, '\\$1'); 
     113        var rd = (_resized_dir) ? _resized_dir.replace(Xinha.RE_Specials, '\\$1') + '/' : ''; 
    103114        var rp = _resized_prefix.replace(Xinha.RE_Specials, '\\$1'); 
    104         var dreg = new RegExp('^(.*/)' + rd + '/' + rp + '_([0-9]+)x([0-9]+)_([^/]+)$'); 
     115        var dreg = new RegExp('^(.*/)' + rd + rp + '_([0-9]+)x([0-9]+)_([^/]+)$'); 
     116 
     117        var match = param.f_url.match(dreg); 
    105118 
    106119        if(dreg.test(param.f_url)) 
Note: See TracChangeset for help on using the changeset viewer.