Changeset 12696 for extensions/GThumb
- Timestamp:
- Dec 5, 2011, 7:13:13 PM (12 years ago)
- Location:
- extensions/GThumb
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GThumb/admin.php
r12691 r12696 13 13 if (isset($_GET['deletecache'])) 14 14 { 15 check_pwg_token(); 15 check_pwg_token(); 16 16 gtdeltree(GTHUMB_CACHE_DIR); 17 17 redirect('admin.php?page=plugin-GThumb'); … … 77 77 $template->assign( 78 78 array( 79 'NB_ELEMENTS' => l10n_dec('%d photo', '%d photos', $data['nb_files']),79 'NB_ELEMENTS' => l10n_dec('%d file', '%d files', $data['nb_files']), 80 80 'ELEMENTS_SIZE' => $data['size'], 81 81 'PWG_TOKEN' => get_pwg_token(), -
extensions/GThumb/js/gthumb.js
r12691 r12696 13 13 queue: true, 14 14 cacheResponse: false, 15 maxRequests: 2,15 maxRequests: 3, 16 16 preventDoubleRequests: false 17 17 }), … … 24 24 width = parseInt(jQuery(this).attr('width')); 25 25 height = parseInt(jQuery(this).attr('height')); 26 GThumb.t.push({id:id,width:width,height:height}); 26 th = {id:id,width:width,height:height,real_width:width,real_height:height}; 27 if (height < GThumb.max_height) { 28 th.width = Math.round(GThumb.max_height * width / height); 29 th.height = GThumb.max_height; 30 } 31 GThumb.t.push(th); 27 32 28 33 if (jQuery(this).attr('src') == '') { … … 164 169 new_width = Math.round(new_width); 165 170 } 166 this.resize(jQuery('#gt'+thumb_process[j].id), thumb_process[j]. width, thumb_process[j].height, new_width, new_height, false);171 this.resize(jQuery('#gt'+thumb_process[j].id), thumb_process[j].real_width, thumb_process[j].real_height, new_width, new_height, false); 167 172 168 173 width_count += new_width + this.margin; … … 177 182 // Last line does not need to be cropped 178 183 for (j=0;j<thumb_process.length;j++) { 179 this.resize(jQuery('#gt'+thumb_process[j].id), thumb_process[j]. width, thumb_process[j].height, thumb_process[j].width, max_height, false);184 this.resize(jQuery('#gt'+thumb_process[j].id), thumb_process[j].real_width, thumb_process[j].real_height, thumb_process[j].width, max_height, false); 180 185 } 181 186 … … 187 192 resize: function(thumb, width, height, new_width, new_height, is_big) { 188 193 189 if (this.method == 'resize' ) {190 real_width = Math.min(new_width, width);191 real_height = Math.min(new_height, height);194 if (this.method == 'resize' || height < new_height || width < new_width) { 195 real_width = new_width; 196 real_height = new_height; 192 197 width_crop = 0; 193 198 height_crop = 0; -
extensions/GThumb/language/en_UK/plugin.lang.php
r12691 r12696 8 8 $lang['Cache Informations'] = 'Cache Informations'; 9 9 $lang['Clear the cache'] = 'Clear the cache'; 10 $lang['%d file'] = '%d file'; 11 $lang['%d files'] = '%d files'; 10 12 11 13 ?> -
extensions/GThumb/language/fr_FR/plugin.lang.php
r12691 r12696 8 8 $lang['Cache Informations'] = 'Informations du cache'; 9 9 $lang['Clear the cache'] = 'Effacer le cache'; 10 $lang['%d file'] = '%d fichier'; 11 $lang['%d files'] = '%d fichiers'; 10 12 11 13 ?> -
extensions/GThumb/template/gthumb.tpl
r12691 r12696 18 18 GThumb.margin = {$GThumb.margin}; 19 19 GThumb.method = '{$GThumb.method}'; 20 21 {if isset($big_thumb)} 20 22 GThumb.small_thumb = {ldelim}id:{$small_thumb.id},src:'{$small_thumb.src}',width:{$small_thumb.width},height:{$small_thumb.height}{rdelim}; 21 {if isset($big_thumb)}22 23 GThumb.big_thumb = {ldelim}id:{$big_thumb.id},src:'{$big_thumb.src}',width:{$big_thumb.width},height:{$big_thumb.height}{rdelim}; 23 24 {/if}
Note: See TracChangeset
for help on using the changeset viewer.