Changeset 608 for trunk/plugins


Ignore:
Timestamp:
11/17/06 14:27:00 (13 years ago)
Author:
ray
Message:

Ticket #881 EFM: return to the directory last open

Location:
trunk/plugins/ExtendedFileManager
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/ExtendedFileManager/Classes/ExtendedFileManager.php

    r604 r608  
    22/** 
    33 * ExtendedFileManager, list images, directories, and thumbnails. 
    4  * Authors: Wei Zhuo, Afru, Krzysztof Kotowicz 
     4 * Authors: Wei Zhuo, Afru, Krzysztof Kotowicz, Raimund Meyer 
    55 * Version: Updated on 08-01-2005 by Afru 
    66 * Version: Updated on 04-07-2006 by Krzysztof Kotowicz 
    7  * Package: ExtendedFileManager (EFM 1.1.2) 
     7 * Version: Updated on 29-10-2006 by Raimund Meyer 
     8 * Package: ExtendedFileManager (EFM 1.1.3) 
    89 * http://www.afrusoft.com/htmlarea 
    910 */ 
  • trunk/plugins/ExtendedFileManager/assets/images.js

    r604 r608  
    11/** 
    22 * Functions for the image listing, used by images.php only 
    3  * Authors: Wei Zhuo, Afru, Krzysztof Kotowicz 
     3 * Authors: Wei Zhuo, Afru, Krzysztof Kotowicz, Raimund Meyer 
    44 * Version: Updated on 08-01-2005 by Afru 
    55 * Version: Updated on 04-07-2006 by Krzysztof Kotowicz 
    6  * Package: ExtendedFileManager (EFM 1.1.2) 
     6 * Version: Updated on 17-11-2006 by Raimund Meyer 
     7 * Package: ExtendedFileManager (EFM 1.1.3) 
    78 * http://www.afrusoft.com/htmlarea 
    89 */ 
     
    1920    var viewtype = selection.options[selection.selectedIndex].value; 
    2021    location.href = _backend_url + "__function=images&mode="+mode+"&dir="+newDir+"&viewtype="+viewtype; 
     22        document.cookie = "EFMStartDir" + mode + "="+newDir; 
    2123} 
    2224 
     
    8789function updateDir(newDir) 
    8890{ 
    89     var selection = window.top.document.getElementById('dirPath'); 
     91        var mode = window.top.document.getElementById('manager_mode').value; 
     92        document.cookie = "EFMStartDir" + mode + "="+newDir; 
     93     
     94        var selection = window.top.document.getElementById('dirPath'); 
    9095    if(selection) 
    9196    { 
  • trunk/plugins/ExtendedFileManager/assets/manager.js

    r604 r608  
    11/** 
    22 * Functions for the ExtendedFileManager, used by manager.php only 
    3  * Authors: Wei Zhuo, Afru, Krzysztof Kotowicz 
     3 * Authors: Wei Zhuo, Afru, Krzysztof Kotowicz, Raimund Meyer 
    44 * Version: Updated on 08-01-2005 by Afru 
    55 * Version: Updated on 20-06-2006 by Krzysztof Kotowicz 
    6  * Package: ExtendedFileManager (EFM 1.1.1) 
     6 * Version: Updated on 17-11-2006 by Raimund Meyer 
     7 * Package: ExtendedFileManager (EFM 1.1.3) 
    78 * http://www.afrusoft.com/htmlarea 
    89 */ 
     
    155156 
    156157        // Locate to the correct directory 
     158        var startDir; 
    157159        var dreg = new RegExp('^(.*/)([^/]+)$'); 
    158160        if (dreg.test(param['f_href'])) 
    159161        { 
    160           changeDir(RegExp.$1); 
     162                startDir = RegExp.$1; 
     163        } 
     164        else 
     165        { 
     166                startDir = document.cookie.match(/EFMStartDirlink=(.*?)(;|$)/); 
     167                if (startDir) startDir = startDir[1]; 
     168        } 
     169         
     170        if (startDir) 
     171        { 
     172          changeDir(startDir); 
    161173          var dirPath = document.getElementById('dirPath'); 
    162174          for(var i = 0; i < dirPath.options.length; i++) 
     
    204216        target_select.onchange = onTargetChanged; 
    205217        document.getElementById("f_href").focus(); 
     218    } 
     219    else if (!param) 
     220    { 
     221        var startDir = document.cookie.match(new RegExp ("EFMStartDir" + manager_mode + "=(.*?)(;|$)")); 
     222        if (startDir) 
     223        { 
     224                startDir = startDir[1]; 
     225                changeDir(startDir); 
     226                var dirPath = document.getElementById('dirPath'); 
     227                for(var i = 0; i < dirPath.options.length; i++) 
     228                { 
     229                  if(dirPath.options[i].value == encodeURIComponent(startDir)) 
     230                  { 
     231                    dirPath.options[i].selected = true; 
     232                    break; 
     233                  } 
     234                } 
     235        } 
    206236    } 
    207237} 
  • trunk/plugins/ExtendedFileManager/images.php

    r604 r608  
    22/** 
    33 * ExtendedFileManager images.php file. Shows folders and files. 
    4  * Authors: Wei Zhuo, Afru, Krzysztof Kotowicz 
     4 * Authors: Wei Zhuo, Afru, Krzysztof Kotowicz, Raimund Meyer 
    55 * Version: Updated on 08-01-2005 by Afru 
    66 * Version: Updated on 04-07-2006 by Krzysztof Kotowicz 
    7  * Package: ExtendedFileManager (EFM 1.1.2) 
     7 * Version: Updated on 29-10-2006 by Raimund Meyer 
     8 * Package: ExtendedFileManager (EFM 1.1.3) 
    89 * http://www.afrusoft.com/htmlarea 
    910 */ 
  • trunk/plugins/ExtendedFileManager/manager.php

    r604 r608  
    22/** 
    33 * The main GUI for the ExtendedFileManager. 
    4  * Authors: Wei Zhuo, Afru, Krzysztof Kotowicz 
     4 * Authors: Wei Zhuo, Afru, Krzysztof Kotowicz, Raimund Meyer 
    55 * Version: Updated on 08-01-2005 by Afru 
    66 * Version: Updated on 04-07-2006 by Krzysztof Kotowicz 
    7  * Package: ExtendedFileManager (EFM 1.1.2) 
     7 * Version: Updated on 29-10-2006 by Raimund Meyer 
     8 * Package: ExtendedFileManager (EFM 1.1.3) 
    89 * http://www.afrusoft.com/htmlarea 
    910 */ 
Note: See TracChangeset for help on using the changeset viewer.