Changeset 585127
- Timestamp:
- 08/14/2012 12:43:36 AM (14 years ago)
- Location:
- auto-thickbox-plus/trunk
- Files:
-
- 12 edited
-
auto-thickbox-options.php (modified) (1 diff)
-
auto-thickbox.php (modified) (1 diff)
-
languages/auto-thickbox-es_ES.po (modified) (2 diffs)
-
languages/auto-thickbox-fa_IR.po (modified) (2 diffs)
-
languages/auto-thickbox-fr_FR.po (modified) (2 diffs)
-
languages/auto-thickbox-it_IT.po (modified) (2 diffs)
-
languages/auto-thickbox-ja.mo (modified) (previous)
-
languages/auto-thickbox-ja.po (modified) (3 diffs)
-
languages/auto-thickbox-nl_NL.po (modified) (2 diffs)
-
languages/auto-thickbox.pot (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
-
thickbox.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
auto-thickbox-plus/trunk/auto-thickbox-options.php
r584708 r585127 158 158 <label class="item"><input type="radio" name="auto-thickbox-plus[click_img]" value="download"<?php $this->util->checked($this->options['click_img'], 'download'); ?> onclick="disableClickOption(this)" /> 159 159 <?php $this->util->_e('Download'); ?> (<?php $this->util->_e('beta'); ?>)</label> 160 <label class="item"><input type="radio" name="auto-thickbox-plus[click_img]" value="expand_shrink"<?php $this->util->checked($this->options['click_img'], 'expand_shrink'); ?> onclick="disableClickOption(this)" /> 161 <?php $this->util->_e('Expand'); ?> / <?php $this->util->_e('Shrink'); ?></label> 160 162 </td> 161 163 </tr> -
auto-thickbox-plus/trunk/auto-thickbox.php
r584708 r585127 154 154 case 'open': $l10n['open'] = $this->texts['open']; break; 155 155 case 'download': $l10n['download'] = $this->util->__('Download'); break; 156 case 'expand_shrink': 157 $l10n['actual'] = $this->util->_s('Actual Size', 'Original Size'); 158 $l10n['fit'] = $this->util->__('Fit to Window'); 159 break; 156 160 } 157 161 wp_localize_script('thickbox', 'thickboxL10n', $l10n); -
auto-thickbox-plus/trunk/languages/auto-thickbox-es_ES.po
r584708 r585127 89 89 90 90 #: auto-thickbox-options.php:161 91 msgid "Expand" 92 msgstr "" 93 94 #: auto-thickbox-options.php:161 95 msgid "Shrink" 96 msgstr "" 97 98 #: auto-thickbox-options.php:161 91 99 msgid "Clickable Range" 92 100 msgstr "Área de click" … … 320 328 msgstr "" 321 329 330 #: auto-thickbox.php:157 331 msgid "Actual Size" 332 msgstr "" 333 334 #: auto-thickbox.php:158 335 msgid "Fit to Window" 336 msgstr "" 337 322 338 ## Extra Translations ## 323 339 -
auto-thickbox-plus/trunk/languages/auto-thickbox-fa_IR.po
r584708 r585127 89 89 90 90 #: auto-thickbox-options.php:161 91 msgid "Expand" 92 msgstr "" 93 94 #: auto-thickbox-options.php:161 95 msgid "Shrink" 96 msgstr "" 97 98 #: auto-thickbox-options.php:161 91 99 msgid "Clickable Range" 92 100 msgstr "محدوده قابل کلیک" … … 318 326 #: auto-thickbox-options.php:93 319 327 msgid "Disabled" 328 msgstr "" 329 330 #: auto-thickbox.php:157 331 msgid "Actual Size" 332 msgstr "" 333 334 #: auto-thickbox.php:158 335 msgid "Fit to Window" 320 336 msgstr "" 321 337 -
auto-thickbox-plus/trunk/languages/auto-thickbox-fr_FR.po
r584708 r585127 92 92 msgstr "" 93 93 94 #: auto-thickbox-options.php:161 95 msgid "Expand" 96 msgstr "" 97 98 #: auto-thickbox-options.php:161 99 msgid "Shrink" 100 msgstr "" 101 94 102 #: auto-thickbox-options.php:170 95 103 msgid "Clickable Range" … … 324 332 msgstr "" 325 333 334 #: auto-thickbox.php:157 335 msgid "Actual Size" 336 msgstr "" 337 338 #: auto-thickbox.php:158 339 msgid "Fit to Window" 340 msgstr "" 341 326 342 ## Extra Translations ## 327 343 -
auto-thickbox-plus/trunk/languages/auto-thickbox-it_IT.po
r584708 r585127 136 136 msgstr "" 137 137 138 #: auto-thickbox-options.php:161 139 msgid "Expand" 140 msgstr "" 141 142 #: auto-thickbox-options.php:161 143 msgid "Shrink" 144 msgstr "" 145 138 146 #: auto-thickbox-options.php:167 139 147 msgid "Loop" … … 476 484 msgstr "" 477 485 486 #: auto-thickbox.php:157 487 msgid "Actual Size" 488 msgstr "" 489 490 #: auto-thickbox.php:158 491 msgid "Fit to Window" 492 msgstr "" 493 478 494 #: auto-thickbox.php:497 479 495 msgid "Settings" -
auto-thickbox-plus/trunk/languages/auto-thickbox-ja.po
r584708 r585127 9 9 "Report-Msgid-Bugs-To: http://wordpress.org/tags/auto-thickbox-plus\n" 10 10 "POT-Creation-Date: 2012-06-06 13:24+0900\n" 11 "PO-Revision-Date: 2012-08-1 2 09:50+0900\n"11 "PO-Revision-Date: 2012-08-14 09:42+0900\n" 12 12 "Last-Translator: attosoft <contact@attosoft.info>\n" 13 13 "Language-Team: attosoft <http://attosoft.info/en/>\n" … … 90 90 msgstr "ダウンロード" 91 91 92 #: auto-thickbox-options.php:161 93 msgid "Expand" 94 msgstr "拡大" 95 96 #: auto-thickbox-options.php:161 97 msgid "Shrink" 98 msgstr "縮小" 99 92 100 #: auto-thickbox-options.php:170 93 101 msgid "Clickable Range" … … 322 330 msgstr "無効" 323 331 332 #: auto-thickbox.php:157 333 msgid "Actual Size" 334 msgstr "原寸大" 335 336 #: auto-thickbox.php:158 337 msgid "Fit to Window" 338 msgstr "ウィンドウに合わせる" 339 324 340 ## Extra Translations ## 325 341 #: auto-thickbox.php:592 -
auto-thickbox-plus/trunk/languages/auto-thickbox-nl_NL.po
r584708 r585127 91 91 msgstr "" 92 92 93 #: auto-thickbox-options.php:161 94 msgid "Expand" 95 msgstr "" 96 97 #: auto-thickbox-options.php:161 98 msgid "Shrink" 99 msgstr "" 100 93 101 #: auto-thickbox-options.php:137 94 102 msgid "Clickable Range" … … 317 325 msgstr "" 318 326 327 #: auto-thickbox.php:157 328 msgid "Actual Size" 329 msgstr "" 330 331 #: auto-thickbox.php:158 332 msgid "Fit to Window" 333 msgstr "" 334 319 335 ## Extra Translations ## 320 336 -
auto-thickbox-plus/trunk/languages/auto-thickbox.pot
r584708 r585127 89 89 90 90 #: auto-thickbox-options.php:161 91 msgid "Expand" 92 msgstr "" 93 94 #: auto-thickbox-options.php:161 95 msgid "Shrink" 96 msgstr "" 97 98 #: auto-thickbox-options.php:161 91 99 msgid "Clickable Range" 92 100 msgstr "" … … 320 328 msgstr "" 321 329 330 #: auto-thickbox.php:157 331 msgid "Actual Size" 332 msgstr "" 333 334 #: auto-thickbox.php:158 335 msgid "Fit to Window" 336 msgstr "" 337 -
auto-thickbox-plus/trunk/readme.txt
r584708 r585127 277 277 * NEW: "Action - Mouse Click - Image - Open" option. You can click an image to open it in new tab/window. 278 278 * NEW: "Action - Mouse Click - Image - Download (beta)" option. You can click an image to download it. This is experimental feature so I'm not sure whether it works on all server environments. 279 * NEW: "Action - Mouse Click - Image - Expand / Shrink" option. You can expand an image to actual size then shrink it to fit window, and vice versa. 279 280 * NEW: "View - Size - Window (Content) - Width/Height" option. You can change the default size of ThickBox window with non-image, and it can be overridden with `width`/`height` parameters in URL. 280 281 * CHANGED: Uses spinner controls (input:number) instead of text fields (input:text) in options for entering numerical values. input:number is introduced in HTML5 so now it works only at Google Chrome, Opera and Safari. -
auto-thickbox-plus/trunk/thickbox.js
r584708 r585127 191 191 var imageWidth = params['width'] ? Math.min(params['width']*1, imgPreloader.width) : imgPreloader.width; 192 192 var imageHeight = params['height'] ? Math.min(params['height']*1, imgPreloader.height) : imgPreloader.height; 193 if (tb_options.auto_resize) { 194 if (imageWidth > x) { 195 imageHeight = imageHeight * (x / imageWidth); 196 imageWidth = x; 197 if (imageHeight > y) { 198 imageWidth = imageWidth * (y / imageHeight); 199 imageHeight = y; 200 } 201 } else if (imageHeight > y) { 202 imageWidth = imageWidth * (y / imageHeight); 203 imageHeight = y; 204 if (imageWidth > x) { 205 imageHeight = imageHeight * (x / imageWidth); 206 imageWidth = x; 207 } 208 } 193 tb_fitWidth = x; 194 tb_fitHeight = imageHeight * (x / imageWidth); 195 if (tb_fitHeight > y) { 196 tb_fitWidth = tb_fitWidth * (y / tb_fitHeight); 197 tb_fitHeight = y; 198 } 199 tb_fitToWindow = tb_options.auto_resize && (imageWidth > x || imageHeight > y); 200 if (tb_fitToWindow) { 201 imageWidth = tb_fitWidth; 202 imageHeight = tb_fitHeight; 209 203 } 210 204 // End Resizing … … 218 212 else if (tb_options.click_img == "download") 219 213 TB_Image = "<a href='"+url+"' class='download' title='"+thickboxL10n.download+"'>" + TB_Image + "</a>"; 214 else if (tb_options.click_img == "expand_shrink") 215 TB_Image = "<a href='' class='resizable' title='"+(tb_fitToWindow ? thickboxL10n.actual : thickboxL10n.fit)+"'>" + TB_Image + "</a>"; 220 216 TB_Caption = "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='"+thickboxL10n.close+"'><img src='" + tb_closeImage + "' /></a></div>"; 221 217 if (tb_options.effect_cap != 'none') … … 359 355 return false; 360 356 }); 357 } else if (tb_options.click_img == "expand_shrink") { 358 jQuery("#TB_window a.resizable").click(function() { 359 if (tb_fitToWindow) 360 setImageSize(imgPreloader.width, imgPreloader.height, thickboxL10n.fit); 361 else 362 setImageSize(tb_fitWidth, tb_fitHeight, thickboxL10n.actual); 363 tb_fitToWindow = !tb_fitToWindow; 364 return false; 365 }); 366 } 367 368 function setImageSize(width, height, title) { 369 var diffWidth = width - jQuery("#TB_Image").width(); 370 var diffHeight = height - jQuery("#TB_Image").height(); 371 jQuery("#TB_window").css({ 372 marginLeft: parseInt(jQuery("#TB_window").css("marginLeft")) - (diffWidth / 2), 373 marginTop: parseInt(jQuery("#TB_window").css("marginTop")) - (diffHeight / 2) 374 }); 375 jQuery("#TB_window").width(jQuery("#TB_window").width() + diffWidth); 376 jQuery("#TB_Image").width(width).height(height); 377 jQuery("#TB_window a.resizable").attr("title", title); 361 378 } 362 379
Note: See TracChangeset
for help on using the changeset viewer.