PluginProbe ʕ •ᴥ•ʔ
Image Widget / 3.0.3
Image Widget v3.0.3
trunk 1.0 2.0 2.1 2.2 2.2.1 2.2.2 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.2 3.2.1 3.2.10 3.2.11 3.2.2 3.2.3 3.2.4 3.2.5 3.2.7 3.2.8 3.2.9 3.3 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 4.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.0.7 4.0.8 4.0.9 4.1 4.1.1 4.1.2 4.2 4.2.1 4.2.2 4.3 4.3.1 4.4 4.4.1 4.4.11 4.4.12 4.4.2 4.4.3 4.4.4 4.4.5 4.4.6 4.4.7 4.4.8 4.4.9
image-widget / image-widget.js
image-widget Last commit date
image-widget.js 16 years ago image-widget.php 16 years ago readme.txt 16 years ago screenshot-1.png 16 years ago
image-widget.js
31 lines
1 function set_active_widget(imageId,widthId,heightId) {
2 // establish which widget is being updated
3 currentImageId = imageId;
4 currentWidthId = widthId;
5 currentHeightId = heightId;
6 }
7
8 function send_to_editor(h) {
9 vars = eval(h);
10
11 // store attachment id in hidden field
12 jQuery( '#'+currentImageId ).val( vars[0] );
13
14 // display attachment preview
15 jQuery( '#display-'+currentImageId ).html( vars[1] );
16 jQuery( '#display-'+currentImageId+' > img' ).css({
17 'max-width':jQuery( '#'+currentWidthId ).val()+'px',
18 'max-height':jQuery( '#'+currentHeightId ).val()+'px'
19 });
20
21 // close thickbox
22 tb_remove();
23 }
24
25 jQuery(document).ready(function() {
26 jQuery("body").click(function(event) {
27 if (jQuery(event.target).is('a.thickbox-image-widget')) {
28 tb_show("Add an Image", event.target.href, false);
29 }
30 });
31 });