Changeset 1303


Ignore:
Timestamp:
04/01/11 15:00:51 (8 years ago)
Author:
gogo
Message:

Make preview images work with our POST type propagateData.
See also

https://github.com/sleemanj/mootools-filemanager/commit/b08f652f527a193c89233ac17a8b65d980f5dab2

Location:
branches/MootoolsFileManager-Update/plugins/MootoolsFileManager/mootools-filemanager
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/MootoolsFileManager-Update/plugins/MootoolsFileManager/mootools-filemanager/.git/COMMIT_EDITMSG

    r1302 r1303  
    1 Initial ability to *optionally* POST the propagateData instead of GET'ing it, thumbnails are supported in the list view but not yet in the preview/details, probably need to have onDetails actually generate the thumb(s), this would be fine since if you're calling onDetails one assumes you will be rather shortly hitting up the image anyway. 
     1Make preview image (250 thumb) work with POST type propagateData.  There are 2 ways I could have done this, either just used getThumb() to obtain the thumb250, or hijack onThumbnail() to do the work.  I chose the latter because it more closely aligns with the previous logic even if it is a larger diff to do it. 
    22 
    33# Please enter the commit message for your changes. Lines starting 
    44# with '#' will be ignored, and an empty message aborts the commit. 
    55# On branch master 
     6# Your branch is ahead of 'origin/master' by 1 commit. 
     7# 
    68# Changes to be committed: 
    79#   (use "git reset HEAD <file>..." to unstage) 
    810# 
    911#       modified:   Assets/Connector/FileManager.php 
    10 #       modified:   Source/FileManager.js 
    1112# 
    1213# Untracked files: 
  • branches/MootoolsFileManager-Update/plugins/MootoolsFileManager/mootools-filemanager/.git/logs/HEAD

    r1302 r1303  
    229a926918afdcddb1a7555ef685e7acb6523a7192 4032882436175bde9c335b9ad75f81a208c7c98e James Sleeman <james@gogo.co.nz> 1301648133 +1300     pull : Fast-forward 
    334032882436175bde9c335b9ad75f81a208c7c98e 794418a4483a3bc4dcc6fd4d631dafb328c518c3 James Sleeman <james@gogo.co.nz> 1301666698 +1300     commit: Initial ability to *optionally* POST the propagateData instead of GET'ing it, thumbnails are supported in the list view but not yet in the preview/details, probably need to have onDetails actually generate the thumb(s), this would be fine since if you're calling onDetails one assumes you will be rather shortly hitting up the image anyway. 
     4794418a4483a3bc4dcc6fd4d631dafb328c518c3 b08f652f527a193c89233ac17a8b65d980f5dab2 James Sleeman <james@gogo.co.nz> 1301669667 +1300     commit: Make preview image (250 thumb) work with POST type propagateData. There are 2 ways I could have done this, either just used getThumb() to obtain the thumb250, or hijack onThumbnail() to do the work. I chose the latter because it more closely aligns with the previous logic even if it is a larger diff to do it. 
  • branches/MootoolsFileManager-Update/plugins/MootoolsFileManager/mootools-filemanager/.git/logs/refs/heads/master

    r1302 r1303  
    229a926918afdcddb1a7555ef685e7acb6523a7192 4032882436175bde9c335b9ad75f81a208c7c98e James Sleeman <james@gogo.co.nz> 1301648133 +1300     pull : Fast-forward 
    334032882436175bde9c335b9ad75f81a208c7c98e 794418a4483a3bc4dcc6fd4d631dafb328c518c3 James Sleeman <james@gogo.co.nz> 1301666698 +1300     commit: Initial ability to *optionally* POST the propagateData instead of GET'ing it, thumbnails are supported in the list view but not yet in the preview/details, probably need to have onDetails actually generate the thumb(s), this would be fine since if you're calling onDetails one assumes you will be rather shortly hitting up the image anyway. 
     4794418a4483a3bc4dcc6fd4d631dafb328c518c3 b08f652f527a193c89233ac17a8b65d980f5dab2 James Sleeman <james@gogo.co.nz> 1301669667 +1300     commit: Make preview image (250 thumb) work with POST type propagateData. There are 2 ways I could have done this, either just used getThumb() to obtain the thumb250, or hijack onThumbnail() to do the work. I chose the latter because it more closely aligns with the previous logic even if it is a larger diff to do it. 
  • branches/MootoolsFileManager-Update/plugins/MootoolsFileManager/mootools-filemanager/.git/refs/heads/master

    r1302 r1303  
    1 794418a4483a3bc4dcc6fd4d631dafb328c518c3 
     1b08f652f527a193c89233ac17a8b65d980f5dab2 
  • branches/MootoolsFileManager-Update/plugins/MootoolsFileManager/mootools-filemanager/Assets/Connector/FileManager.php

    r1302 r1303  
    11741174         * JSON output. 
    11751175         */ 
    1176         protected function onThumbnail() 
     1176        protected function onThumbnail($GET = NULL) 
    11771177        { 
    11781178                // try to produce the view; if it b0rks, retry with the parent, until we've arrived at the basedir: 
     
    11861186                try 
    11871187                { 
    1188                         $reqd_size = intval($this->getGETparam('size')); 
     1188                        $reqd_size = isset($GET) ? @$GET['size'] : intval($this->getGETparam('size')); 
    11891189                        if (empty($reqd_size)) 
    11901190                                throw new FileManagerException('disabled'); 
     
    11931193                                throw new FileManagerException('disabled'); 
    11941194 
    1195                         $file_arg = $this->getGETparam('file'); 
     1195                        $file_arg = isset($GET) ? @$GET['file'] :$this->getGETparam('file'); 
    11961196                        if (empty($file_arg)) 
    11971197                                throw new FileManagerException('nofile'); 
    11981198 
    1199                         $dir_arg = $this->getGETparam('directory'); 
     1199                        $dir_arg = isset($GET) ? @$GET['directory'] :$this->getGETparam('directory'); 
    12001200                        $legal_url = $this->rel2abs_legal_url_path($dir_arg); 
    12011201                        $legal_url = self::enforceTrailingSlash($legal_url); 
     
    12091209                                throw new FileManagerException('nofile'); 
    12101210 
    1211                         $mime_filter = $this->getGETparam('filter', $this->options['filter']); 
     1211                        $mime_filter = isset($GET) ? (isset($GET['filter']) ? $GET['filter'] : $this->options['filter']) :$this->getGETparam('filter', $this->options['filter']); 
    12121212                        $mime_filters = $this->getAllowedMimeTypes($mime_filter); 
    12131213                        $mime = $this->getMimeType($file); 
     
    12771277                                $img_filepath = $this->getIconForError($emsg, $filename, $reqd_size <= 16); 
    12781278                        } 
    1279  
     1279       
     1280      if(isset($GET)) 
     1281      { 
     1282        return $img_filepath; 
     1283      } 
     1284       
    12801285      if($this->getGETParam('asJson', 0)) 
    12811286      { 
     
    21612166                                        'filter' => $mime_filter 
    21622167                                )); 
    2163                         $thumb250 = $this->mkEventHandlerURL(array( 
     2168                        $thumb250 = $this->onThumbnail(array( 
    21642169                                        'event' => 'thumbnail', 
    21652170                                        // directory and filename of the ORIGINAL image should follow next: 
     
    22392244                        try 
    22402245                        { 
    2241                                 $thumbfile = $this->getThumb($legal_url, $file, 250, 250); 
     2246        $thumbfile = $thumb250; 
     2247                                 
     2248                                // sleemanj (gogo @ Xinha): the below makes not a lot of sense I can think of, 
     2249                                //    if you are creating the thumbnail anyway then what is the logic 
     2250                                //    in requiring a round trip through the backend to display it? 
     2251                                //    Anyway, doesn't matter now because we created it "through" the backend 
     2252                                //    as thumb250 above. 
     2253                                 
     2254                                // $thumbfile = $this->getThumb($legal_url, $file, 250, 250);                            
    22422255                                /* 
    22432256                                 * the thumbnail may be produced now, but we want to stay in control when the thumbnail is 
Note: See TracChangeset for help on using the changeset viewer.