Changeset 685
- Timestamp:
- 10/30/09 13:22:04 (4 weeks ago)
- Files:
-
- branches/uploadr/3.2/MacUploadr.app/Contents/Resources/application.ini (modified) (1 diff)
- branches/uploadr/3.2/MacUploadr.app/Contents/Resources/chrome/content/uploadr/conf.js (modified) (1 diff)
- branches/uploadr/3.2/MacUploadr.app/Contents/Resources/chrome/content/uploadr/main.xul (modified) (1 diff)
- branches/uploadr/3.2/MacUploadr.app/Contents/Resources/chrome/content/uploadr/photos.js (modified) (1 diff)
- branches/uploadr/3.2/MacUploadr.app/Contents/Resources/chrome/content/uploadr/photos.xul (modified) (1 diff)
- branches/uploadr/3.2/MacUploadr.app/Contents/Resources/chrome/content/uploadr/ui.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/uploadr/3.2/MacUploadr.app/Contents/Resources/application.ini
r678 r685 13 13 Name=Flickr Uploadr 14 14 Version=3.3 15 BuildID=200910 050215 BuildID=2009102701 16 16 Copyright=Copyright (c) 2007-2009 - Yahoo!, Inc. 17 17 ID=uploadr@flickr.com branches/uploadr/3.2/MacUploadr.app/Contents/Resources/chrome/content/uploadr/conf.js
r671 r685 110 110 // Load are parse the application.ini file 111 111 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"); 114 114 115 115 window.onresize = ui.onResizeCB; branches/uploadr/3.2/MacUploadr.app/Contents/Resources/chrome/content/uploadr/main.xul
r671 r685 152 152 </vbox> 153 153 </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> 154 171 <box> 155 172 <html:p id="free"> </html:p> branches/uploadr/3.2/MacUploadr.app/Contents/Resources/chrome/content/uploadr/photos.js
r681 r685 770 770 var stack = document.createElement('stack'); 771 771 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); 785 774 var bar = p.progress_bar.create(); 786 bar.style.top = (img.height - 20) + 'px';787 775 stack.appendChild(bar); 788 776 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; 791 778 li.appendChild(stack); 792 779 document.getElementById('queue_list').appendChild(li); 780 ui.resizeUploadThumbImg(p); 793 781 markVideos(img.parentNode, p.path); 794 782 } branches/uploadr/3.2/MacUploadr.app/Contents/Resources/chrome/content/uploadr/photos.xul
r682 r685 44 44 </html:p> 45 45 </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>63 46 <html:td id="photostream_tools" width="100%" > 64 47 <vbox align="right"> branches/uploadr/3.2/MacUploadr.app/Contents/Resources/chrome/content/uploadr/ui.js
r681 r685 79 79 } 80 80 unblock_normalize(); 81 for each (var up in photos.uploading) { 82 if(up) { 83 ui.resizeUploadThumbImg(up); 84 } 85 } 81 86 }, 82 87 83 88 resizeThumbImg:function(id) { 84 89 var li = document.getElementById('photo' + id); 90 if(!li) { 91 return; 92 } 85 93 var img = li.getElementsByTagName('img')[0]; 86 if(! li || !img) {94 if(!img) { 87 95 return; 88 96 } … … 102 110 } 103 111 } 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'; 104 150 }, 105 151