Changeset 685

Show
Ignore:
Timestamp:
10/30/09 13:22:04 (4 weeks ago)
Author:
jdecq
Message:

- repositioning of the thumb size slider in a more appropriate place
- support for resizing the thumb while uploading

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/uploadr/3.2/MacUploadr.app/Contents/Resources/application.ini

    r678 r685  
    1313Name=Flickr Uploadr 
    1414Version=3.3 
    15 BuildID=2009100502 
     15BuildID=2009102701 
    1616Copyright=Copyright (c) 2007-2009 - Yahoo!, Inc. 
    1717ID=uploadr@flickr.com 
  • branches/uploadr/3.2/MacUploadr.app/Contents/Resources/chrome/content/uploadr/conf.js

    r671 r685  
    110110        // Load are parse the application.ini file 
    111111        load_ini: function(){ 
    112 //                      window.openDialog('http://dev.flickr.com','_blank'); 
    113 //                      alert("Make sure to be logged-in into dev before going on", "Info"); 
     112//                      window.openDialog('http://backstage.flickr.com','_blank'); 
     113//                      alert("Make sure to be logged-in into backstage before going on. A window will pop-up to this effect.", "Info"); 
    114114                         
    115115                window.onresize = ui.onResizeCB; 
  • branches/uploadr/3.2/MacUploadr.app/Contents/Resources/chrome/content/uploadr/main.xul

    r671 r685  
    152152        </vbox> 
    153153      </hbox> 
     154      <hbox id="photostream_slider_tools"> 
     155        <hbox> 
     156          <vbox> 
     157            <button id="slider_button" type="repeat" image="chrome://uploadr/skin/button_minus.png" 
     158                    oncommand="document.getElementById('photo_slider').decrease();"> 
     159            </button> 
     160          </vbox> 
     161          <vbox> 
     162            <scale id="photo_slider" increment="2" pageincrement="64" min="32" max="260" value="200" width="114" 
     163                   onchange="ui.changeThumbSize(this.value);" /> 
     164          </vbox> 
     165          <vbox> 
     166            <button id="slider_button" type="repeat" class="enabled" image="chrome://uploadr/skin/button_plus.png" 
     167                      oncommand="document.getElementById('photo_slider').increase();" /> 
     168          </vbox> 
     169        </hbox> 
     170      </hbox> 
    154171      <box> 
    155172        <html:p id="free"> </html:p> 
  • branches/uploadr/3.2/MacUploadr.app/Contents/Resources/chrome/content/uploadr/photos.js

    r681 r685  
    770770                                var stack = document.createElement('stack'); 
    771771                                stack.appendChild(img); 
    772                                 var gridSize = document.getElementById('photo_slider').value; 
    773                     var horizontalRatio = p.thumb_width/gridSize; 
    774                         var verticalRatio = p.thumb_height/gridSize; 
    775                         var ratio = 1; 
    776                         if (verticalRatio>1 || horizontalRatio>1) { 
    777                             ratio = Math.max(verticalRatio, horizontalRatio); 
    778                         }  
    779                         img.setAttribute('width', p.thumb_width/ratio); 
    780                         img.setAttribute('height', p.thumb_height/ratio); 
    781                         stack.style.width = p.thumb_width/ratio + 'px'; 
    782                         stack.style.height = p.thumb_height/ratio + 'px'; 
    783                                 p.progress_bar = new ProgressBar('queue' + 
    784                                         (photos.uploading.length - 1), img.width); 
     772                                p.progress_bar = new ProgressBar('queue' +  
     773                                        (photos.uploading.length - 1), document.getElementById('photo_slider').value); 
    785774                                var bar = p.progress_bar.create(); 
    786                                 bar.style.top = (img.height - 20) + 'px'; 
    787775                                stack.appendChild(bar); 
    788776                                var li = document.createElementNS(NS_HTML, 'li'); 
    789                         li.style.width = gridSize + 'px'; 
    790                         li.style.height = gridSize + 'px'; 
     777                        li.id = 'photo_uploading' + p.id; 
    791778                                li.appendChild(stack); 
    792779                                document.getElementById('queue_list').appendChild(li); 
     780                                ui.resizeUploadThumbImg(p); 
    793781                                markVideos(img.parentNode, p.path); 
    794782                        } 
  • branches/uploadr/3.2/MacUploadr.app/Contents/Resources/chrome/content/uploadr/photos.xul

    r682 r685  
    4444              </html:p> 
    4545            </html:td> 
    46             <html:td id="photostream_slider_tools"> 
    47               <hbox> 
    48                 <vbox> 
    49                   <button id="slider_button" type="repeat" image="chrome://uploadr/skin/button_minus.png" 
    50                           oncommand="document.getElementById('photo_slider').decrease();"> 
    51                   </button> 
    52                 </vbox> 
    53                 <vbox> 
    54                   <scale id="photo_slider" increment="2" pageincrement="64" min="32" max="260" value="200" width="114" 
    55                          onchange="ui.changeThumbSize(this.value);" /> 
    56                 </vbox> 
    57                 <vbox> 
    58                   <button id="slider_button" type="repeat" class="enabled" image="chrome://uploadr/skin/button_plus.png" 
    59                             oncommand="document.getElementById('photo_slider').increase();" /> 
    60                 </vbox> 
    61               </hbox> 
    62             </html:td> 
    6346            <html:td id="photostream_tools" width="100%" > 
    6447              <vbox align="right"> 
  • branches/uploadr/3.2/MacUploadr.app/Contents/Resources/chrome/content/uploadr/ui.js

    r681 r685  
    7979        }                  
    8080            unblock_normalize(); 
     81            for each (var up in photos.uploading) { 
     82                if(up) { 
     83                    ui.resizeUploadThumbImg(up); 
     84                } 
     85            } 
    8186        }, 
    8287         
    8388        resizeThumbImg:function(id) { 
    8489            var li = document.getElementById('photo' + id); 
     90            if(!li) { 
     91                return; 
     92            } 
    8593            var img = li.getElementsByTagName('img')[0]; 
    86             if(!li || !img) { 
     94            if(!img) { 
    8795                return; 
    8896            } 
     
    102110                    } 
    103111        }     
     112        }, 
     113         
     114        resizeUploadThumbImg:function(p) { 
     115            if(!p) { 
     116                return; 
     117            } 
     118            var id = p.id; 
     119            var li = document.getElementById('photo_uploading' + id); 
     120            if(!li) { 
     121                return; 
     122            } 
     123            var stack = li.getElementsByTagName('stack')[0]; 
     124            if(!stack) { 
     125                return; 
     126            } 
     127            var img = stack.getElementsByTagName('img')[0]; 
     128            if(!img) { 
     129                return; 
     130            } 
     131             
     132                var gridSize = document.getElementById('photo_slider').value; 
     133        var horizontalRatio = p.thumb_width/gridSize; 
     134                var verticalRatio = p.thumb_height/gridSize; 
     135                var ratio = 1; 
     136                if (verticalRatio>1 || horizontalRatio>1) { 
     137                    ratio = Math.max(verticalRatio, horizontalRatio); 
     138        }  
     139        img.setAttribute('width', p.thumb_width/ratio); 
     140        img.setAttribute('height', p.thumb_height/ratio); 
     141        stack.style.width = p.thumb_width/ratio + 'px'; 
     142        stack.style.height = p.thumb_height/ratio + 'px'; 
     143        var progressbar = stack.getElementsByClassName('progress_bar')[0]; 
     144                if(progressbar) { 
     145                    progressbar.style.width = p.thumb_width/ratio + 'px'; 
     146                    progressbar.style.top = (img.height - 20) + 'px'; 
     147                } 
     148                li.style.width = gridSize + 'px'; 
     149                li.style.height = gridSize + 'px'; 
    104150        }, 
    105151