Simple Image Sizes - Version 1.0

Version Description

Download this release

Release Info

Developer Rahe
Plugin Icon wp plugin Simple Image Sizes
Version 1.0
Comparing to
See all releases

Version 1.0

inc/class.admin.php ADDED
@@ -0,0 +1,443 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ Class SISAdmin{
3
+
4
+ // Original sizes
5
+ var $original = array( 'thumbnail', 'medium', 'large' );
6
+
7
+ function __construct(){
8
+ // Init
9
+ add_action ( 'admin_menu', array( &$this, 'init' ) );
10
+ add_action ( 'admin_init', array( &$this, 'registerJavaScript' ), 11 );
11
+
12
+ // Add ajax action
13
+ add_action('wp_ajax_ajax_thumbnail_rebuild', array( &$this, 'ajax_thumbnail_rebuild_ajax' ) );
14
+ }
15
+
16
+ /**
17
+ * Register javascripts and css.
18
+ *
19
+ * @access public
20
+ * @return void
21
+ * @author Nicolas Juen
22
+ */
23
+ function registerJavaScript() {
24
+ // Add javascript
25
+ wp_enqueue_script( 'custom_image_size', SIS_URL.'js/custom_sizes.min.js', array('jquery'), '1.0' );
26
+ wp_enqueue_script( 'jquery-ui-progressbar', SIS_URL.'js/jquery-ui-1.8.10.custom.min.js', array(), '1.8.10' );
27
+
28
+ // Ad javascript translation
29
+ wp_localize_script( 'custom_image_size', 'custom_image_size', $this->localize_vars() );
30
+
31
+ // Add CSS
32
+ wp_enqueue_style( 'jquery-ui-regenthumbs', SIS_URL.'jquery-ui/redmond/jquery-ui-1.8.10.custom.css', array(), '1.8.10' );
33
+ }
34
+
35
+ /**
36
+ * Localize the var for javascript
37
+ *
38
+ * @access public
39
+ * @return void
40
+ * @author Nicolas Juen
41
+ */
42
+ function localize_vars() {
43
+ return array(
44
+ 'ajaxUrl' => home_url( '/wp-admin/admin-ajax.php' ),
45
+ 'reading' => __( 'Reading attachments...', 'sis' ),
46
+ 'maximumWidth' => __( 'Maximum width', 'sis' ),
47
+ 'maximumHeight' => __( 'Maximum height', 'sis' ),
48
+ 'crop' => __( 'Crop ?', 'sis' ),
49
+ 'deleteImage' => __( 'Delete', 'sis' ),
50
+ 'noMedia' => __( 'No media in your site to regenerate !', 'sis' ),
51
+ 'regenerating' => __( 'Regenerating ', 'sis'),
52
+ 'validate' => __( 'Validate image size name', 'sis' ),
53
+ );
54
+ }
55
+
56
+ /**
57
+ * Init for the option page
58
+ *
59
+ * @access public
60
+ * @return void
61
+ * @author Nicolas Juen
62
+ */
63
+ function init() {
64
+
65
+ // Check if admin
66
+ if( !is_admin() )
67
+ return false;
68
+
69
+ // Get the image sizes
70
+ global $_wp_additional_image_sizes;
71
+
72
+ // Get the sizes and add the settings
73
+ foreach ( get_intermediate_image_sizes() as $s ) {
74
+
75
+ // Don't make the original sizes
76
+ if( in_array( $s, $this->original ) )
77
+ continue;
78
+
79
+ // Set width
80
+ if ( isset( $_wp_additional_image_sizes[$s]['width'] ) ) // For theme-added sizes
81
+ $width = intval( $_wp_additional_image_sizes[$s]['width'] );
82
+ else // For default sizes set in options
83
+ $width = get_option( "{$s}_size_w" );
84
+
85
+ // Set height
86
+ if ( isset( $_wp_additional_image_sizes[$s]['height'] ) ) // For theme-added sizes
87
+ $height = intval( $_wp_additional_image_sizes[$s]['height'] );
88
+ else // For default sizes set in options
89
+ $height = get_option( "{$s}_size_h" );
90
+
91
+ //Set crop
92
+ if ( isset( $_wp_additional_image_sizes[$s]['crop'] ) ) // For theme-added sizes
93
+ $crop = intval( $_wp_additional_image_sizes[$s]['crop'] );
94
+ else // For default sizes set in options
95
+ $crop = get_option( "{$s}_crop" );
96
+
97
+ // Add the setting ield for this size
98
+ add_settings_field( 'image_size_'.$s.'', __( 'Size ', 'sis' ).$s, array( &$this, 'image_sizes' ), 'media' , 'default', array( 'name' => $s , 'width' => $width , 'height' => $height ) );
99
+
100
+ }
101
+
102
+ // Register the setting for media option page
103
+ register_setting( 'media', 'custom_image_sizes' );
104
+
105
+ // Add the button
106
+ add_settings_field( 'add_size', 'Add a new size', array( &$this, 'add_size' ), 'media' );
107
+
108
+ // Add section for the thumbnail regeneration
109
+ add_settings_section( 'thumbnail_regenerate', __( 'Thumbnail regeneration', 'sis' ), array( &$this, 'thumbnail_regenerate' ), 'media' );
110
+ }
111
+
112
+ /**
113
+ * Display the row of the image size
114
+ *
115
+ * @access public
116
+ * @param mixed $args
117
+ * @return void
118
+ * @author Nicolas Juen
119
+ */
120
+ function image_sizes( $args ) {
121
+ // Get the options
122
+ $sizes = (array)get_option( 'custom_image_sizes' );
123
+
124
+ $height = isset( $sizes[$args['name']]['h'] )? $sizes[$args['name']]['h'] : $args['height'] ;
125
+ $width = isset( $sizes[$args['name']]['w'] )? $sizes[$args['name']]['w'] : $args['width'] ;
126
+ $crop = isset( $sizes[$args['name']]['c'] ) && !empty( $sizes[$args['name']]['c'] )? '1' : '0' ;
127
+ $custom = ( isset( $sizes[$args['name']]['custom'] ) && !empty( $sizes[$args['name']]['custom'] ) )? '1' : '0' ;
128
+ ?>
129
+ <?php if( $custom ): ?>
130
+ <span class="custom_size"> <?php _e( 'Custom size', 'sis'); ?> : </span>
131
+ <input name="<?php echo 'custom_image_sizes['.$args['name'].'][custom]' ?>" type="hidden" id="<?php echo 'custom_image_sizes['.$args['name'].'][custom]' ?>" value="1" />
132
+ <?php else: ?>
133
+ <span class="theme_size"> <?php _e( 'Theme size', 'sis'); ?> : </span>
134
+ <input name="<?php echo 'custom_image_sizes['.$args['name'].'][theme]' ?>" type="hidden" id="<?php echo 'custom_image_sizes['.$args['name'].'][theme]' ?>" value="1" />
135
+ <?php endif; ?>
136
+ <label for="<?php echo 'custom_image_sizes['.$args['name'].'][w]' ?>">
137
+ <?php _e( 'Maximum width', 'sis'); ?>
138
+ <input name="<?php echo 'custom_image_sizes['.$args['name'].'][w]' ?>" type="text" id="<?php echo 'custom_image_sizes['.$args['name'].'][w]' ?>" value="<?php echo $width ?>" class="small-text" />
139
+ </label>
140
+
141
+ <label for="<?php echo 'custom_image_sizes['.$args['name'].'][h]' ?>">
142
+ <?php _e( 'Maximum height', 'sis'); ?>
143
+ <input name="<?php echo 'custom_image_sizes['.$args['name'].'][h]' ?>" type="text" id="<?php echo 'custom_image_sizes['.$args['name'].'][h]' ?>" value="<?php echo $height ?>" class="small-text" />
144
+ </label>
145
+
146
+
147
+ <label class="crop">
148
+ <?php _e( 'Crop ?', 'sis'); ?>
149
+ <input type='checkbox' <?php checked( $crop, 1 ) ?> name="<?php echo 'custom_image_sizes['.$args['name'].'][c]' ?>" value="1" />
150
+ </label>
151
+ <!-- <img src="<?php echo esc_url( admin_url( 'images/no.png' ) ); ?>" alt="" class="delete_size" /> -->
152
+ <label class="ui-state-default ui-corner-all delete_size" style="width: 90px; padding: 0px; display:inline-block; position:relative; text-indent:16px;margin-right:5px;text-align:center">
153
+ <?php _e( 'Delete', 'sis'); ?>
154
+ <div class="ui-icon ui-icon-circle-close" style="float: right; top: 2px; position:absolute;left: 0px;">
155
+ </div>
156
+ </label>
157
+ <?php }
158
+
159
+ /**
160
+ * Add the button to ass a size
161
+ *
162
+ * @access public
163
+ * @return void
164
+ * @author Nicolas Juen
165
+ */
166
+ function add_size() { ?>
167
+ <input type="button" class="button-secondary action" id="add_size" value="<?php _e( 'Add a new size of thumbnail', 'sis'); ?> " />
168
+ <?php
169
+ }
170
+
171
+ /**
172
+ * Display the Table of sizes and post types for regenerating
173
+ *
174
+ * @access public
175
+ * @return void
176
+ * @author Nicolas Juen
177
+ */
178
+ function thumbnail_regenerate() {
179
+ // Get the sizes
180
+ global $_wp_additional_image_sizes;
181
+ ?>
182
+ <div>
183
+ <div style="display: inline-block;float: left;width: 45%;">
184
+ <h4> <?php _e( 'Select which thumbnails you want to rebuild:', 'sis'); ?> </h4>
185
+ <table cellspacing="0" class="widefat page fixed">
186
+ <thead>
187
+ <tr>
188
+ <th class="manage-column column-comments" scope="col"><?php _e( 'Resize ?', 'sis'); ?></th>
189
+ <th class="manage-column column-author" scope="col"><?php _e( 'Size name', 'sis'); ?></th>
190
+ <th class="manage-column column-author" scope="col"><?php _e( 'Width', 'sis'); ?></th>
191
+ <th class="manage-column column-author" scope="col"><?php _e( 'Height', 'sis'); ?></th>
192
+ <th class="manage-column column-author" scope="col"><?php _e( 'Crop ?', 'sis'); ?></th>
193
+ </tr>
194
+ </thead>
195
+ <tboby>
196
+ <?php
197
+ // Display the sizes in the array
198
+ foreach ( get_intermediate_image_sizes() as $s ):
199
+
200
+ if ( isset( $_wp_additional_image_sizes[$s]['width'] ) ) // For theme-added sizes
201
+ $width = intval( $_wp_additional_image_sizes[$s]['width'] );
202
+ else // For default sizes set in options
203
+ $width = get_option( "{$s}_size_w" );
204
+
205
+ if ( isset( $_wp_additional_image_sizes[$s]['height'] ) ) // For theme-added sizes
206
+ $height = intval( $_wp_additional_image_sizes[$s]['height'] );
207
+ else // For default sizes set in options
208
+ $height = get_option( "{$s}_size_h" );
209
+
210
+ if ( isset( $_wp_additional_image_sizes[$s]['crop'] ) ) // For theme-added sizes
211
+ $crop = intval( $_wp_additional_image_sizes[$s]['crop'] );
212
+ else // For default sizes set in options
213
+ $crop = get_option( "{$s}_crop" );
214
+ ?>
215
+ <tr>
216
+ <td>
217
+ <input type="checkbox" class="thumbnails" id="<?php echo $s ?>" name="thumbnails[]" checked="checked" value="<?php echo $s ?>" />
218
+ </td>
219
+
220
+ <td>
221
+ <label for="<?php echo $s ?>">
222
+ <?php echo $s; ?>
223
+ </label>
224
+ </td>
225
+
226
+ <td>
227
+ <label for="<?php echo $s ?>">
228
+ <?php echo $width;?> px
229
+ </label>
230
+ </td>
231
+
232
+ <td>
233
+ <label for="<?php echo $s ?>">
234
+ <?php echo $height; ?> px
235
+ </label>
236
+ </td>
237
+
238
+ <td>
239
+ <label for="<?php echo $s ?>">
240
+ <?php echo ( $crop == 1 )? 'yes':'no'; ?>
241
+ </label>
242
+ </td>
243
+ </tr>
244
+ <?php endforeach;?>
245
+ </tbody>
246
+ <tfoot>
247
+ <th class="manage-column column-comments" scope="col"><?php _e( 'Resize ?', 'sis'); ?></th>
248
+ <th class="manage-column column-author" scope="col"><?php _e( 'Size name', 'sis'); ?></th>
249
+ <th class="manage-column column-author" scope="col"><?php _e( 'Width', 'sis'); ?></th>
250
+ <th class="manage-column column-author" scope="col"><?php _e( 'Height', 'sis'); ?></th>
251
+ <th class="manage-column column-author" scope="col"><?php _e( 'Crop ?', 'sis'); ?></th>
252
+ </tfoot>
253
+ </table>
254
+ </div>
255
+ <div style="display: inline-block;width: 25%;margin-left: 15px;">
256
+ <h4><?php _e( 'Select which post type source thumbnails you want to rebuild:', 'sis'); ?></h4>
257
+ <table cellspacing="0" class="widefat page fixed">
258
+ <thead>
259
+ <tr>
260
+ <th class="manage-column column-comments" scope="col"><?php _e( 'Resize ?', 'sis'); ?></th>
261
+ <th class="manage-column column-author" scope="col"><?php _e( 'Post type', 'sis'); ?></th>
262
+ </tr>
263
+ </thead>
264
+ <tboby>
265
+ <?php
266
+ // Diplay the post types table
267
+ foreach ( get_post_types( array( 'public' => true ), 'objects' ) as $ptype ):
268
+ ?>
269
+ <tr>
270
+ <td>
271
+ <label for="<?php echo $ptype->name; ?>">
272
+ <input type="checkbox" class="post_types" name="post_types[]" checked="checked" id="<?php echo $ptype->name; ?>" value="<?php echo $ptype->name; ?>" />
273
+ </label>
274
+ </td>
275
+ <td>
276
+ <label for="<?php echo $ptype->name; ?>">
277
+ <em><?php echo $ptype->labels->name; ?></em>
278
+ </label>
279
+ </td>
280
+ </tr>
281
+ <?php endforeach;?>
282
+ </tbody>
283
+ <tfoot>
284
+ <tr>
285
+ <th class="manage-column column-comments" scope="col"><?php _e( 'Resize ?', 'sis'); ?></th>
286
+ <th class="manage-column column-author" scope="col"><?php _e( 'Post type', 'sis'); ?></th>
287
+ </tr>
288
+ </tfoot>
289
+ </table>
290
+ </div>
291
+ </div>
292
+
293
+ <div style="clear:both;padding-top:15px">
294
+ <div id="regenerate_message" style="display:none"></div>
295
+ <div class="progress" style="position:relative;height:25px;">
296
+ <div class="progress-percent" style="position:absolute;left:50%;top:50%;width:50px;margin-left:-25px;height:25px;margin-top:-9px;font-weight:bold;text-align:center;"></div>
297
+ </div>
298
+ <div id="thumb" style="display:none;"><h4><?php _e( 'Last image:', 'sis'); ?></h4><img id="thumb-img" /></div>
299
+ <input type="button" onClick="javascript:regenerate();" class="button" name="ajax_thumbnail_rebuild" id="ajax_thumbnail_rebuild" value="<?php _e( 'Regenerate Thumbnails', 'sis' ) ?>" style="margin-top:40px;" />
300
+ </div>
301
+ <?php
302
+ }
303
+
304
+ /**
305
+ * Rebuild the image
306
+ *
307
+ * @access public
308
+ * @return void
309
+ * @author Nicolas Juen
310
+ */
311
+ function ajax_thumbnail_rebuild_ajax() {
312
+ global $wpdb;
313
+
314
+ // Get the action
315
+ $action = $_POST["do"];
316
+
317
+ // Get the thumbnails
318
+ $thumbnails = isset( $_POST['thumbnails'] )? $_POST['thumbnails'] : NULL;
319
+
320
+ if ( $action == "getlist" ) {
321
+ if ( isset( $_POST['post_types'] ) && !empty( $_POST['post_types'] ) ) {
322
+
323
+ // Get image medias
324
+ $whichmimetype = wp_post_mime_type_where( 'image', $wpdb->posts );
325
+
326
+ // Get all parent from post type
327
+ $attachments = $wpdb->get_results( "SELECT *
328
+ FROM $wpdb->posts
329
+ WHERE 1 = 1
330
+ AND post_type = 'attachment'
331
+ $whichmimetype
332
+ AND post_parent IN (
333
+ SELECT DISTINCT ID
334
+ FROM $wpdb->posts
335
+ WHERE post_type IN ('".implode( "', '", $_POST['post_types'] )."')
336
+ )" );
337
+
338
+ } else {
339
+ $attachments =& get_children( array(
340
+ 'post_type' => 'attachment',
341
+ 'post_mime_type' => 'image',
342
+ 'numberposts' => -1,
343
+ 'post_status' => null,
344
+ 'post_parent' => null, // any parent
345
+ 'output' => 'object',
346
+ ) );
347
+ }
348
+
349
+ // Get the attachments
350
+ foreach ( $attachments as $attachment ) {
351
+ $res[] = array('id' => $attachment->ID, 'title' => $attachment->post_title);
352
+ }
353
+ // Return the Id's and Title of medias
354
+ die( json_encode( $res ) );
355
+ } else if ( $action == "regen" ) {
356
+ // Get the id
357
+ $id = $_POST["id"];
358
+
359
+ // Check Id
360
+ if( (int)$id == 0 ) {
361
+ die( Null );
362
+ }
363
+
364
+ // Get the path
365
+ $fullsizepath = get_attached_file( $id );
366
+
367
+ // Regen the attachment
368
+ if ( FALSE !== $fullsizepath && @file_exists( $fullsizepath ) ) {
369
+ set_time_limit( 30 );
370
+ wp_update_attachment_metadata( $id, $this->wp_generate_attachment_metadata_custom( $id, $fullsizepath, $thumbnails ) );
371
+ }
372
+
373
+ // Display the attachment url for feedback
374
+ die( wp_get_attachment_thumb_url( $id ) );
375
+ }
376
+ }
377
+
378
+ /**
379
+ * Generate post thumbnail attachment meta data.
380
+ *
381
+ * @since 2.1.0
382
+ *
383
+ * @param int $attachment_id Attachment Id to process.
384
+ * @param string $file Filepath of the Attached image.
385
+ * @return mixed Metadata for attachment.
386
+ */
387
+ function wp_generate_attachment_metadata_custom( $attachment_id, $file, $thumbnails = NULL ) {
388
+ $attachment = get_post( $attachment_id );
389
+
390
+ $metadata = array();
391
+ if ( preg_match('!^image/!', get_post_mime_type( $attachment )) && file_is_displayable_image($file) ) {
392
+ $imagesize = getimagesize( $file );
393
+ $metadata['width'] = $imagesize[0];
394
+ $metadata['height'] = $imagesize[1];
395
+ list($uwidth, $uheight) = wp_constrain_dimensions($metadata['width'], $metadata['height'], 128, 96);
396
+ $metadata['hwstring_small'] = "height='$uheight' width='$uwidth'";
397
+
398
+ // Make the file path relative to the upload dir
399
+ $metadata['file'] = _wp_relative_upload_path($file);
400
+
401
+ // make thumbnails and other intermediate sizes
402
+ global $_wp_additional_image_sizes;
403
+
404
+ foreach ( get_intermediate_image_sizes() as $s ) {
405
+ $sizes[$s] = array( 'width' => '', 'height' => '', 'crop' => FALSE );
406
+ if ( isset( $_wp_additional_image_sizes[$s]['width'] ) )
407
+ $sizes[$s]['width'] = intval( $_wp_additional_image_sizes[$s]['width'] ); // For theme-added sizes
408
+ else
409
+ $sizes[$s]['width'] = get_option( "{$s}_size_w" ); // For default sizes set in options
410
+ if ( isset( $_wp_additional_image_sizes[$s]['height'] ) )
411
+ $sizes[$s]['height'] = intval( $_wp_additional_image_sizes[$s]['height'] ); // For theme-added sizes
412
+ else
413
+ $sizes[$s]['height'] = get_option( "{$s}_size_h" ); // For default sizes set in options
414
+ if ( isset( $_wp_additional_image_sizes[$s]['crop'] ) )
415
+ $sizes[$s]['crop'] = intval( $_wp_additional_image_sizes[$s]['crop'] ); // For theme-added sizes
416
+ else
417
+ $sizes[$s]['crop'] = get_option( "{$s}_crop" ); // For default sizes set in options
418
+ }
419
+
420
+ $sizes = apply_filters( 'intermediate_image_sizes_advanced', $sizes );
421
+
422
+ foreach ($sizes as $size => $size_data ) {
423
+ if( isset( $thumbnails ) )
424
+ if( !in_array( $size, $thumbnails ) )
425
+ continue;
426
+
427
+ $resized = image_make_intermediate_size( $file, $size_data['width'], $size_data['height'], $size_data['crop'] );
428
+
429
+ if ( $resized )
430
+ $metadata['sizes'][$size] = $resized;
431
+ }
432
+
433
+ // fetch additional metadata from exif/iptc
434
+ $image_meta = wp_read_image_metadata( $file );
435
+ if ( $image_meta )
436
+ $metadata['image_meta'] = $image_meta;
437
+
438
+ }
439
+
440
+ return apply_filters( 'wp_generate_attachment_metadata', $metadata, $attachment_id );
441
+ }
442
+ }
443
+ ?>
inc/class.client.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ Class SISClient {
3
+
4
+ // Set the original
5
+ var $original = array( 'thumbnail', 'medium', 'large' );
6
+
7
+ function __construct() {
8
+ add_action ( 'init', array( &$this, 'init' ) );
9
+ }
10
+
11
+ /**
12
+ * Override the images by the plugin images
13
+ *
14
+ * @access public
15
+ * @return void
16
+ * @author Nicolas Juen
17
+ */
18
+ function init() {
19
+ // Get inital options
20
+ $sizes = get_option( 'custom_image_sizes' );
21
+
22
+ // Return flase if empty
23
+ if( empty( $sizes ) || !is_array( $sizes ) )
24
+ return false;
25
+
26
+ // Set the new sizes
27
+ foreach( $sizes as $name => $size ){
28
+ // Get cropping
29
+ $crop = ( isset( $size['c'] ) && !empty( $size['c'] ) )? $size['c'] : 0 ;
30
+
31
+ // Add the images sizes
32
+ add_image_size( $name, $size['h'], $size['w'], $crop );
33
+ }
34
+ }
35
+ }
36
+ ?>
jquery-ui/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png ADDED
Binary file
jquery-ui/redmond/images/ui-bg_flat_55_fbec88_40x100.png ADDED
Binary file
jquery-ui/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png ADDED
Binary file
jquery-ui/redmond/images/ui-bg_glass_85_dfeffc_1x400.png ADDED
Binary file
jquery-ui/redmond/images/ui-bg_glass_95_fef1ec_1x400.png ADDED
Binary file
jquery-ui/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png ADDED
Binary file
jquery-ui/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png ADDED
Binary file
jquery-ui/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png ADDED
Binary file
jquery-ui/redmond/images/ui-icons_217bc0_256x240.png ADDED
Binary file
jquery-ui/redmond/images/ui-icons_2e83ff_256x240.png ADDED
Binary file
jquery-ui/redmond/images/ui-icons_469bdd_256x240.png ADDED
Binary file
jquery-ui/redmond/images/ui-icons_6da8d5_256x240.png ADDED
Binary file
jquery-ui/redmond/images/ui-icons_cd0a0a_256x240.png ADDED
Binary file
jquery-ui/redmond/images/ui-icons_d8e7f3_256x240.png ADDED
Binary file
jquery-ui/redmond/images/ui-icons_f9bd01_256x240.png ADDED
Binary file
jquery-ui/redmond/jquery-ui-1.8.10.custom.css ADDED
@@ -0,0 +1,305 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery UI CSS Framework 1.8.10
3
+ *
4
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6
+ * http://jquery.org/license
7
+ *
8
+ * http://docs.jquery.com/UI/Theming/API
9
+ */
10
+
11
+ /* Layout helpers
12
+ ----------------------------------*/
13
+ .ui-helper-hidden { display: none; }
14
+ .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
15
+ .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
16
+ .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
17
+ .ui-helper-clearfix { display: inline-block; }
18
+ /* required comment for clearfix to work in Opera \*/
19
+ * html .ui-helper-clearfix { height:1%; }
20
+ .ui-helper-clearfix { display:block; }
21
+ /* end clearfix */
22
+ .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
23
+
24
+
25
+ /* Interaction Cues
26
+ ----------------------------------*/
27
+ .ui-state-disabled { cursor: default !important; }
28
+
29
+
30
+ /* Icons
31
+ ----------------------------------*/
32
+
33
+ /* states and images */
34
+ .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
35
+
36
+
37
+ /* Misc visuals
38
+ ----------------------------------*/
39
+
40
+ /* Overlays */
41
+ .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
42
+
43
+
44
+ /*
45
+ * jQuery UI CSS Framework 1.8.10
46
+ *
47
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
48
+ * Dual licensed under the MIT or GPL Version 2 licenses.
49
+ * http://jquery.org/license
50
+ *
51
+ * http://docs.jquery.com/UI/Theming/API
52
+ *
53
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=5px&bgColorHeader=5c9ccc&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=55&borderColorHeader=4297d7&fcHeader=ffffff&iconColorHeader=d8e7f3&bgColorContent=fcfdfd&bgTextureContent=06_inset_hard.png&bgImgOpacityContent=100&borderColorContent=a6c9e2&fcContent=222222&iconColorContent=469bdd&bgColorDefault=dfeffc&bgTextureDefault=02_glass.png&bgImgOpacityDefault=85&borderColorDefault=c5dbec&fcDefault=2e6e9e&iconColorDefault=6da8d5&bgColorHover=d0e5f5&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=79b7e7&fcHover=1d5987&iconColorHover=217bc0&bgColorActive=f5f8f9&bgTextureActive=06_inset_hard.png&bgImgOpacityActive=100&borderColorActive=79b7e7&fcActive=e17009&iconColorActive=f9bd01&bgColorHighlight=fbec88&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=fad42e&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
54
+ */
55
+
56
+
57
+ /* Component containers
58
+ ----------------------------------*/
59
+ .ui-widget { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em; }
60
+ .ui-widget .ui-widget { font-size: 1em; }
61
+ .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; }
62
+ .ui-widget-content { border: 1px solid #a6c9e2; background: #fcfdfd url(images/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x; color: #222222; }
63
+ .ui-widget-content a { color: #222222; }
64
+ .ui-widget-header { border: 1px solid #4297d7; background: #5c9ccc url(images/ui-bg_gloss-wave_55_5c9ccc_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
65
+ .ui-widget-header a { color: #ffffff; }
66
+
67
+ /* Interaction states
68
+ ----------------------------------*/
69
+ .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #c5dbec; background: #dfeffc url(images/ui-bg_glass_85_dfeffc_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #2e6e9e; }
70
+ .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #2e6e9e; text-decoration: none; }
71
+ .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #79b7e7; background: #d0e5f5 url(images/ui-bg_glass_75_d0e5f5_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1d5987; }
72
+ .ui-state-hover a, .ui-state-hover a:hover { color: #1d5987; text-decoration: none; }
73
+ .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #79b7e7; background: #f5f8f9 url(images/ui-bg_inset-hard_100_f5f8f9_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #e17009; }
74
+ .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #e17009; text-decoration: none; }
75
+ .ui-widget :active { outline: none; }
76
+
77
+ /* Interaction Cues
78
+ ----------------------------------*/
79
+ .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fad42e; background: #fbec88 url(images/ui-bg_flat_55_fbec88_40x100.png) 50% 50% repeat-x; color: #363636; }
80
+ .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
81
+ .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
82
+ .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
83
+ .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
84
+ .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
85
+ .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
86
+ .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
87
+
88
+ /* Icons
89
+ ----------------------------------*/
90
+
91
+ /* states and images */
92
+ .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_469bdd_256x240.png); }
93
+ .ui-widget-content .ui-icon {background-image: url(images/ui-icons_469bdd_256x240.png); }
94
+ .ui-widget-header .ui-icon {background-image: url(images/ui-icons_d8e7f3_256x240.png); }
95
+ .ui-state-default .ui-icon { background-image: url(images/ui-icons_6da8d5_256x240.png); }
96
+ .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_217bc0_256x240.png); }
97
+ .ui-state-active .ui-icon {background-image: url(images/ui-icons_f9bd01_256x240.png); }
98
+ .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
99
+ .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
100
+
101
+ /* positioning */
102
+ .ui-icon-carat-1-n { background-position: 0 0; }
103
+ .ui-icon-carat-1-ne { background-position: -16px 0; }
104
+ .ui-icon-carat-1-e { background-position: -32px 0; }
105
+ .ui-icon-carat-1-se { background-position: -48px 0; }
106
+ .ui-icon-carat-1-s { background-position: -64px 0; }
107
+ .ui-icon-carat-1-sw { background-position: -80px 0; }
108
+ .ui-icon-carat-1-w { background-position: -96px 0; }
109
+ .ui-icon-carat-1-nw { background-position: -112px 0; }
110
+ .ui-icon-carat-2-n-s { background-position: -128px 0; }
111
+ .ui-icon-carat-2-e-w { background-position: -144px 0; }
112
+ .ui-icon-triangle-1-n { background-position: 0 -16px; }
113
+ .ui-icon-triangle-1-ne { background-position: -16px -16px; }
114
+ .ui-icon-triangle-1-e { background-position: -32px -16px; }
115
+ .ui-icon-triangle-1-se { background-position: -48px -16px; }
116
+ .ui-icon-triangle-1-s { background-position: -64px -16px; }
117
+ .ui-icon-triangle-1-sw { background-position: -80px -16px; }
118
+ .ui-icon-triangle-1-w { background-position: -96px -16px; }
119
+ .ui-icon-triangle-1-nw { background-position: -112px -16px; }
120
+ .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
121
+ .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
122
+ .ui-icon-arrow-1-n { background-position: 0 -32px; }
123
+ .ui-icon-arrow-1-ne { background-position: -16px -32px; }
124
+ .ui-icon-arrow-1-e { background-position: -32px -32px; }
125
+ .ui-icon-arrow-1-se { background-position: -48px -32px; }
126
+ .ui-icon-arrow-1-s { background-position: -64px -32px; }
127
+ .ui-icon-arrow-1-sw { background-position: -80px -32px; }
128
+ .ui-icon-arrow-1-w { background-position: -96px -32px; }
129
+ .ui-icon-arrow-1-nw { background-position: -112px -32px; }
130
+ .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
131
+ .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
132
+ .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
133
+ .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
134
+ .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
135
+ .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
136
+ .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
137
+ .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
138
+ .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
139
+ .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
140
+ .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
141
+ .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
142
+ .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
143
+ .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
144
+ .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
145
+ .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
146
+ .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
147
+ .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
148
+ .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
149
+ .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
150
+ .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
151
+ .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
152
+ .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
153
+ .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
154
+ .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
155
+ .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
156
+ .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
157
+ .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
158
+ .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
159
+ .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
160
+ .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
161
+ .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
162
+ .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
163
+ .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
164
+ .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
165
+ .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
166
+ .ui-icon-arrow-4 { background-position: 0 -80px; }
167
+ .ui-icon-arrow-4-diag { background-position: -16px -80px; }
168
+ .ui-icon-extlink { background-position: -32px -80px; }
169
+ .ui-icon-newwin { background-position: -48px -80px; }
170
+ .ui-icon-refresh { background-position: -64px -80px; }
171
+ .ui-icon-shuffle { background-position: -80px -80px; }
172
+ .ui-icon-transfer-e-w { background-position: -96px -80px; }
173
+ .ui-icon-transferthick-e-w { background-position: -112px -80px; }
174
+ .ui-icon-folder-collapsed { background-position: 0 -96px; }
175
+ .ui-icon-folder-open { background-position: -16px -96px; }
176
+ .ui-icon-document { background-position: -32px -96px; }
177
+ .ui-icon-document-b { background-position: -48px -96px; }
178
+ .ui-icon-note { background-position: -64px -96px; }
179
+ .ui-icon-mail-closed { background-position: -80px -96px; }
180
+ .ui-icon-mail-open { background-position: -96px -96px; }
181
+ .ui-icon-suitcase { background-position: -112px -96px; }
182
+ .ui-icon-comment { background-position: -128px -96px; }
183
+ .ui-icon-person { background-position: -144px -96px; }
184
+ .ui-icon-print { background-position: -160px -96px; }
185
+ .ui-icon-trash { background-position: -176px -96px; }
186
+ .ui-icon-locked { background-position: -192px -96px; }
187
+ .ui-icon-unlocked { background-position: -208px -96px; }
188
+ .ui-icon-bookmark { background-position: -224px -96px; }
189
+ .ui-icon-tag { background-position: -240px -96px; }
190
+ .ui-icon-home { background-position: 0 -112px; }
191
+ .ui-icon-flag { background-position: -16px -112px; }
192
+ .ui-icon-calendar { background-position: -32px -112px; }
193
+ .ui-icon-cart { background-position: -48px -112px; }
194
+ .ui-icon-pencil { background-position: -64px -112px; }
195
+ .ui-icon-clock { background-position: -80px -112px; }
196
+ .ui-icon-disk { background-position: -96px -112px; }
197
+ .ui-icon-calculator { background-position: -112px -112px; }
198
+ .ui-icon-zoomin { background-position: -128px -112px; }
199
+ .ui-icon-zoomout { background-position: -144px -112px; }
200
+ .ui-icon-search { background-position: -160px -112px; }
201
+ .ui-icon-wrench { background-position: -176px -112px; }
202
+ .ui-icon-gear { background-position: -192px -112px; }
203
+ .ui-icon-heart { background-position: -208px -112px; }
204
+ .ui-icon-star { background-position: -224px -112px; }
205
+ .ui-icon-link { background-position: -240px -112px; }
206
+ .ui-icon-cancel { background-position: 0 -128px; }
207
+ .ui-icon-plus { background-position: -16px -128px; }
208
+ .ui-icon-plusthick { background-position: -32px -128px; }
209
+ .ui-icon-minus { background-position: -48px -128px; }
210
+ .ui-icon-minusthick { background-position: -64px -128px; }
211
+ .ui-icon-close { background-position: -80px -128px; }
212
+ .ui-icon-closethick { background-position: -96px -128px; }
213
+ .ui-icon-key { background-position: -112px -128px; }
214
+ .ui-icon-lightbulb { background-position: -128px -128px; }
215
+ .ui-icon-scissors { background-position: -144px -128px; }
216
+ .ui-icon-clipboard { background-position: -160px -128px; }
217
+ .ui-icon-copy { background-position: -176px -128px; }
218
+ .ui-icon-contact { background-position: -192px -128px; }
219
+ .ui-icon-image { background-position: -208px -128px; }
220
+ .ui-icon-video { background-position: -224px -128px; }
221
+ .ui-icon-script { background-position: -240px -128px; }
222
+ .ui-icon-alert { background-position: 0 -144px; }
223
+ .ui-icon-info { background-position: -16px -144px; }
224
+ .ui-icon-notice { background-position: -32px -144px; }
225
+ .ui-icon-help { background-position: -48px -144px; }
226
+ .ui-icon-check { background-position: -64px -144px; }
227
+ .ui-icon-bullet { background-position: -80px -144px; }
228
+ .ui-icon-radio-off { background-position: -96px -144px; }
229
+ .ui-icon-radio-on { background-position: -112px -144px; }
230
+ .ui-icon-pin-w { background-position: -128px -144px; }
231
+ .ui-icon-pin-s { background-position: -144px -144px; }
232
+ .ui-icon-play { background-position: 0 -160px; }
233
+ .ui-icon-pause { background-position: -16px -160px; }
234
+ .ui-icon-seek-next { background-position: -32px -160px; }
235
+ .ui-icon-seek-prev { background-position: -48px -160px; }
236
+ .ui-icon-seek-end { background-position: -64px -160px; }
237
+ .ui-icon-seek-start { background-position: -80px -160px; }
238
+ /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
239
+ .ui-icon-seek-first { background-position: -80px -160px; }
240
+ .ui-icon-stop { background-position: -96px -160px; }
241
+ .ui-icon-eject { background-position: -112px -160px; }
242
+ .ui-icon-volume-off { background-position: -128px -160px; }
243
+ .ui-icon-volume-on { background-position: -144px -160px; }
244
+ .ui-icon-power { background-position: 0 -176px; }
245
+ .ui-icon-signal-diag { background-position: -16px -176px; }
246
+ .ui-icon-signal { background-position: -32px -176px; }
247
+ .ui-icon-battery-0 { background-position: -48px -176px; }
248
+ .ui-icon-battery-1 { background-position: -64px -176px; }
249
+ .ui-icon-battery-2 { background-position: -80px -176px; }
250
+ .ui-icon-battery-3 { background-position: -96px -176px; }
251
+ .ui-icon-circle-plus { background-position: 0 -192px; }
252
+ .ui-icon-circle-minus { background-position: -16px -192px; }
253
+ .ui-icon-circle-close { background-position: -32px -192px; }
254
+ .ui-icon-circle-triangle-e { background-position: -48px -192px; }
255
+ .ui-icon-circle-triangle-s { background-position: -64px -192px; }
256
+ .ui-icon-circle-triangle-w { background-position: -80px -192px; }
257
+ .ui-icon-circle-triangle-n { background-position: -96px -192px; }
258
+ .ui-icon-circle-arrow-e { background-position: -112px -192px; }
259
+ .ui-icon-circle-arrow-s { background-position: -128px -192px; }
260
+ .ui-icon-circle-arrow-w { background-position: -144px -192px; }
261
+ .ui-icon-circle-arrow-n { background-position: -160px -192px; }
262
+ .ui-icon-circle-zoomin { background-position: -176px -192px; }
263
+ .ui-icon-circle-zoomout { background-position: -192px -192px; }
264
+ .ui-icon-circle-check { background-position: -208px -192px; }
265
+ .ui-icon-circlesmall-plus { background-position: 0 -208px; }
266
+ .ui-icon-circlesmall-minus { background-position: -16px -208px; }
267
+ .ui-icon-circlesmall-close { background-position: -32px -208px; }
268
+ .ui-icon-squaresmall-plus { background-position: -48px -208px; }
269
+ .ui-icon-squaresmall-minus { background-position: -64px -208px; }
270
+ .ui-icon-squaresmall-close { background-position: -80px -208px; }
271
+ .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
272
+ .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
273
+ .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
274
+ .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
275
+ .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
276
+ .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
277
+
278
+
279
+ /* Misc visuals
280
+ ----------------------------------*/
281
+
282
+ /* Corner radius */
283
+ .ui-corner-tl { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; }
284
+ .ui-corner-tr { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; }
285
+ .ui-corner-bl { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; }
286
+ .ui-corner-br { -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; }
287
+ .ui-corner-top { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; }
288
+ .ui-corner-bottom { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; }
289
+ .ui-corner-right { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; }
290
+ .ui-corner-left { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; }
291
+ .ui-corner-all { -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }
292
+
293
+ /* Overlays */
294
+ .ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
295
+ .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
296
+ * jQuery UI Progressbar 1.8.10
297
+ *
298
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
299
+ * Dual licensed under the MIT or GPL Version 2 licenses.
300
+ * http://jquery.org/license
301
+ *
302
+ * http://docs.jquery.com/UI/Progressbar#theming
303
+ */
304
+ .ui-progressbar { height:2em; text-align: left; }
305
+ .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
jquery-ui/ui.progressbar.js ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery UI Progressbar 1.7.2
3
+ *
4
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
6
+ * and GPL (GPL-LICENSE.txt) licenses.
7
+ *
8
+ * http://docs.jquery.com/UI/Progressbar
9
+ *
10
+ * Depends:
11
+ * ui.core.js
12
+ */
13
+ (function(a){a.widget("ui.progressbar",{_init:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this._valueMin(),"aria-valuemax":this._valueMax(),"aria-valuenow":this._value()});this.valueDiv=a('<div class="ui-progressbar-value ui-widget-header ui-corner-left"></div>').appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow").removeData("progressbar").unbind(".progressbar");this.valueDiv.remove();a.widget.prototype.destroy.apply(this,arguments)},value:function(b){if(b===undefined){return this._value()}this._setData("value",b);return this},_setData:function(b,c){switch(b){case"value":this.options.value=c;this._refreshValue();this._trigger("change",null,{});break}a.widget.prototype._setData.apply(this,arguments)},_value:function(){var b=this.options.value;if(b<this._valueMin()){b=this._valueMin()}if(b>this._valueMax()){b=this._valueMax()}return b},_valueMin:function(){var b=0;return b},_valueMax:function(){var b=100;return b},_refreshValue:function(){var b=this.value();this.valueDiv[b==this._valueMax()?"addClass":"removeClass"]("ui-corner-right");this.valueDiv.width(b+"%");this.element.attr("aria-valuenow",b)}});a.extend(a.ui.progressbar,{version:"1.7.2",defaults:{value:0}})})(jQuery);;
js/custom_sizes.js ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var i = 0 ;
2
+ jQuery(function() {
3
+ jQuery( '#add_size' ).click( addSize );
4
+ jQuery( '.add_size_name' ).live( 'click', registerSize );
5
+ jQuery( '.delete_size' ).live( 'click', deleteSize );
6
+ jQuery( 'span.custom_size' ).parent().parent().children('th').css( { 'color' : 'green' } );
7
+ jQuery( 'span.theme_size' ).parent().parent().children('th').css( { 'color' : 'orange' } );
8
+ });
9
+
10
+ function addSize() {
11
+ row = '<tr valign="top" class="new_size_'+i+'">';
12
+ row += '<th scope="row">';
13
+ row += '<input type="text" value="thumbnail-name" id="new_size_'+i+'" />';
14
+ row += '</th>';
15
+ row += '<td>';
16
+ row += '<input type="button" class="button-secondary action add_size_name" id="validate_'+i+'" value="'+custom_image_size.validate+'" />';
17
+ row += '</td>';
18
+ row += '</tr>';
19
+
20
+ jQuery( this ).parent().parent().before( row );
21
+ i++;
22
+ }
23
+
24
+ function registerSize() {
25
+ name = jQuery( this ).parent().parent().children( 'th' ).find( 'input' ).val();
26
+ id = jQuery( this ).parent().parent().children( 'th' ).find( 'input' ).attr( 'id' );
27
+
28
+ output = '<th scope="row">';
29
+ output += 'Size '+name;
30
+ output += '</th>';
31
+ output += '<td>';
32
+ output += '<input name="custom_image_sizes['+name+'][custom]" type="hidden" id="custom_image_sizes['+name+'][custom]" value="1" />';
33
+ output +='<label for="custom_image_sizes['+name+'][w]">';
34
+ output += custom_image_size.maximumWidth+' <input name="custom_image_sizes['+name+'][w] " type="text" id="custom_image_sizes['+name+'][w]" value="" class="small-text" />'
35
+ output +='</label>';
36
+
37
+ output +='<label for="custom_image_sizes['+name+'][h]">';
38
+ output += custom_image_size.maximumHeight+' <input name="custom_image_sizes['+name+'][h]" type="text" id="custom_image_sizes['+name+'][h]" value="" class="small-text" />';
39
+ output +='</label>';
40
+
41
+ output +='<label class="crop"> '
42
+ output +=custom_image_size.crop+' <input type="checkbox" name="custom_image_sizes['+name+'][c]" value="1" /> </label>';
43
+
44
+ output +='<label class="ui-state-default ui-corner-all delete_size" style="width: 90px; padding: 0px; display:inline-block; position:relative; text-indent:16px;text-align:center">';
45
+ output +=custom_image_size.deleteImage;
46
+ output +='<div class="ui-icon ui-icon-circle-close" style="float: right; top: 2px; position:absolute;left: 0px;">';
47
+ output +='</div>';
48
+ output +='</label>';
49
+ output += '</td>';
50
+
51
+ jQuery( '#'+id ).parent().parent().html( output );
52
+
53
+ }
54
+
55
+ function deleteSize() {
56
+ jQuery( this ).parent().parent().remove();
57
+ }
58
+
59
+ ////////////// Image resizing /////////////
60
+
61
+ function setMessage( msg ) {
62
+ jQuery( "#regenerate_message" ).html( msg ).addClass( 'updated' ).addClass( 'fade' ).show();
63
+ jQuery( ".progress" ).progressbar();
64
+ }
65
+
66
+ function regenerate() {
67
+ jQuery( "#ajax_thumbnail_rebuild" ).attr( "disabled", true );
68
+ setMessage( "<p>"+custom_image_size.reading+"</p>" );
69
+
70
+ inputs = jQuery( 'input.thumbnails:checked' );
71
+ var thumbnails= '';
72
+ if( inputs.length != jQuery( 'input.thumbnails[type=checkbox]' ).length ) {
73
+ inputs.each( function() {
74
+ thumbnails += '&thumbnails[]='+jQuery( this ).val();
75
+ } );
76
+ }
77
+
78
+ inputs = jQuery( 'input.post_types:checked' );
79
+ var post_types= '';
80
+ if( inputs.length != jQuery( 'input.post_types[type=checkbox]' ).length ) {
81
+ inputs.each( function() {
82
+ post_types += '&post_types[]='+jQuery( this ).val();
83
+ } );
84
+ }
85
+
86
+ jQuery.ajax({
87
+ url: custom_image_size.ajaxUrl,
88
+ type: "POST",
89
+ data: "action=ajax_thumbnail_rebuild&do=getlist"+post_types,
90
+ success: function( result ) {
91
+ var list = eval( result );
92
+ var curr = 0;
93
+
94
+ function regenItem() {
95
+ if( !list ) {
96
+ jQuery( "#ajax_thumbnail_rebuild" ).removeAttr( "disabled" );
97
+ jQuery( ".progress, #thumb" ).hide();
98
+
99
+ setMessage( custom_image_size.noMedia );
100
+ return false;
101
+ }
102
+ percent = ( curr / list.length ) * 100;
103
+ jQuery(".progress").progressbar( "value", percent );
104
+ jQuery(".progress-percent").html( Math.round( percent ) + "%" );
105
+ if (curr >= list.length) {
106
+ jQuery( "#ajax_thumbnail_rebuild" ).removeAttr( "disabled" );
107
+ jQuery( ".progress, #thumb" ).hide();
108
+
109
+ setMessage("Done.");
110
+ return;
111
+ }
112
+ setMessage( custom_image_size.regenerating + ( curr+1 ) + " of " + list.length + " (" + list[curr].title + ")...");
113
+
114
+ jQuery.ajax({
115
+ url: custom_image_size.ajaxUrl,
116
+ type: "POST",
117
+ data: "action=ajax_thumbnail_rebuild&do=regen&id=" + list[curr].id + thumbnails,
118
+ success: function( result ) {
119
+ jQuery( "#thumb" ).show();
120
+ jQuery( "#thumb-img" ).attr( "src",result );
121
+
122
+ curr = curr + 1;
123
+ regenItem();
124
+ }
125
+ });
126
+ }
127
+
128
+ regenItem();
129
+ },
130
+ error: function( request, status, error ) {
131
+ setMessage( "Error " + request.status );
132
+ }
133
+ });
134
+ }
js/custom_sizes.min.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var i=0;jQuery(function(){jQuery('#add_size').click(addSize);jQuery('.add_size_name').live('click',registerSize);jQuery('.delete_size').live('click',deleteSize);jQuery('span.custom_size').parent().parent().children('th').css({'color':'green'});jQuery('span.theme_size').parent().parent().children('th').css({'color':'orange'});});function addSize(){row='<tr valign="top" class="new_size_'+i+'">';row+='<th scope="row">';row+='<input type="text" value="thumbnail-name" id="new_size_'+i+'" />';row+='</th>';row+='<td>';row+='<input type="button" class="button-secondary action add_size_name" id="validate_'+i+'" value="'+custom_image_size.validate+'" />';row+='</td>';row+='</tr>';jQuery(this).parent().parent().before(row);i++;}
2
+ function registerSize(){name=jQuery(this).parent().parent().children('th').find('input').val();id=jQuery(this).parent().parent().children('th').find('input').attr('id');output='<th scope="row">';output+='Size '+name;output+='</th>';output+='<td>';output+='<input name="custom_image_sizes['+name+'][custom]" type="hidden" id="custom_image_sizes['+name+'][custom]" value="1" />';output+='<label for="custom_image_sizes['+name+'][w]">';output+=custom_image_size.maximumWidth+' <input name="custom_image_sizes['+name+'][w] " type="text" id="custom_image_sizes['+name+'][w]" value="" class="small-text" />'
3
+ output+='</label>';output+='<label for="custom_image_sizes['+name+'][h]">';output+=custom_image_size.maximumHeight+' <input name="custom_image_sizes['+name+'][h]" type="text" id="custom_image_sizes['+name+'][h]" value="" class="small-text" />';output+='</label>';output+='<label class="crop"> '
4
+ output+=custom_image_size.crop+' <input type="checkbox" name="custom_image_sizes['+name+'][c]" value="1" /> </label>';output+='<label class="ui-state-default ui-corner-all delete_size" style="width: 90px; padding: 0px; display:inline-block; position:relative; text-indent:16px;text-align:center">';output+=custom_image_size.deleteImage;output+='<div class="ui-icon ui-icon-circle-close" style="float: right; top: 2px; position:absolute;left: 0px;">';output+='</div>';output+='</label>';output+='</td>';jQuery('#'+id).parent().parent().html(output);}
5
+ function deleteSize(){jQuery(this).parent().parent().remove();}
6
+ function setMessage(msg){jQuery("#regenerate_message").html(msg).addClass('updated').addClass('fade').show();jQuery(".progress").progressbar();}
7
+ function regenerate(){jQuery("#ajax_thumbnail_rebuild").attr("disabled",true);setMessage("<p>"+custom_image_size.reading+"</p>");inputs=jQuery('input.thumbnails:checked');var thumbnails='';if(inputs.length!=jQuery('input.thumbnails[type=checkbox]').length){inputs.each(function(){thumbnails+='&thumbnails[]='+jQuery(this).val();});}
8
+ inputs=jQuery('input.post_types:checked');var post_types='';if(inputs.length!=jQuery('input.post_types[type=checkbox]').length){inputs.each(function(){post_types+='&post_types[]='+jQuery(this).val();});}
9
+ jQuery.ajax({url:custom_image_size.ajaxUrl,type:"POST",data:"action=ajax_thumbnail_rebuild&do=getlist"+post_types,success:function(result){var list=eval(result);var curr=0;function regenItem(){if(!list){jQuery("#ajax_thumbnail_rebuild").removeAttr("disabled");jQuery(".progress, #thumb").hide();setMessage(custom_image_size.noMedia);return false;}
10
+ percent=(curr/list.length)*100;jQuery(".progress").progressbar("value",percent);jQuery(".progress-percent").html(Math.round(percent)+"%");if(curr>=list.length){jQuery("#ajax_thumbnail_rebuild").removeAttr("disabled");jQuery(".progress, #thumb").hide();setMessage("Done.");return;}
11
+ setMessage(custom_image_size.regenerating+(curr+1)+" of "+list.length+" ("+list[curr].title+")...");jQuery.ajax({url:custom_image_size.ajaxUrl,type:"POST",data:"action=ajax_thumbnail_rebuild&do=regen&id="+list[curr].id+thumbnails,success:function(result){jQuery("#thumb").show();jQuery("#thumb-img").attr("src",result);curr=curr+1;regenItem();}});}
12
+ regenItem();},error:function(request,status,error){setMessage("Error "+request.status);}});}
js/jquery-ui-1.8.10.custom.min.js ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * jQuery UI 1.8.10
3
+ *
4
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6
+ * http://jquery.org/license
7
+ *
8
+ * http://docs.jquery.com/UI
9
+ */
10
+ (function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.10",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,
11
+ NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,
12
+ "position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");
13
+ if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f,
14
+ "border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,
15
+ d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}});
16
+ c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&
17
+ b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&c.ui.isOverAxis(b,e,i)}})}})(jQuery);
18
+ ;/*!
19
+ * jQuery UI Widget 1.8.10
20
+ *
21
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
22
+ * Dual licensed under the MIT or GPL Version 2 licenses.
23
+ * http://jquery.org/license
24
+ *
25
+ * http://docs.jquery.com/UI/Widget
26
+ */
27
+ (function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)b(d).triggerHandler("remove");k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,
28
+ a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.charAt(0)==="_")return h;
29
+ e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=b.extend(true,{},this.options,
30
+ this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},
31
+ widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},
32
+ enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);
33
+ ;/*
34
+ * jQuery UI Progressbar 1.8.10
35
+ *
36
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
37
+ * Dual licensed under the MIT or GPL Version 2 licenses.
38
+ * http://jquery.org/license
39
+ *
40
+ * http://docs.jquery.com/UI/Progressbar
41
+ *
42
+ * Depends:
43
+ * jquery.ui.core.js
44
+ * jquery.ui.widget.js
45
+ */
46
+ (function(b,d){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
47
+ this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*
48
+ this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.10"})})(jQuery);
49
+ ;
readme.txt ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Simple Image Sizes ===
2
+ Contributors: rahe
3
+ Donate link: http://www.beapi.fr/donate/
4
+ Tags: images, image, custom sizes, custom images, thumbnail regenerate, thumbnail, regenerate,
5
+ Requires at least: 3.0
6
+ Tested up to: 3.1
7
+ Stable tag: 1.0
8
+
9
+ == Description ==
10
+
11
+ This plugin allow create custom image sizes for your site. Override your theme sizes directly on the media option page.
12
+ Regenerate your sizes by size and post type too !
13
+
14
+ == Installation ==
15
+
16
+ 1. Download, unzip and upload to your WordPress plugins directory
17
+ 2. Activate the plugin within you WordPress Administration Backend
18
+ 3. Go to Settings > Medias and configure your new image sizes
19
+
20
+ == Screenshots ==
21
+
22
+ 1. Settings page
23
+ 2. Regenerating
24
+
25
+ == Changelog ==
26
+
27
+ * 1.0
28
+ * First release
29
+ * Thumbnail regenerate
30
+ * Image size generation
screenshot-1.png ADDED
Binary file
screenshot-2.png ADDED
Binary file
simple_image_sizes.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Simple Image Size
4
+ Plugin URI: http://wordpress.org/#
5
+ Description: Add an option in media setting page for images sizes
6
+ Version: 1.0
7
+ Author: Rahe
8
+ Author URI: http://www.beapi.fr
9
+ Text Domain: custom-image-size
10
+ Domain Path: /languages/
11
+ Network: false
12
+
13
+ Copyright 2010 Nicolas JUEN (njuen@beapi.fr) - Be-API
14
+
15
+ This plugin is not free to usage, not open-source, not GPL.
16
+ You can't use and modify this plugin without the permission of Be-API. (njuen@beapi.fr)
17
+ */
18
+
19
+ define( 'SIS_URL', plugins_url('/', __FILE__) );
20
+ define( 'SIS_DIR', dirname(__FILE__) );
21
+
22
+ require_once( SIS_DIR . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'class.admin.php' );
23
+ require_once( SIS_DIR . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'class.client.php' );
24
+
25
+ add_action ( 'plugins_loaded', 'initSIS' );
26
+ function initSIS() {
27
+ global $SIS;
28
+ if( is_admin() )
29
+ $SIS['admin'] = new SISAdmin();
30
+
31
+ $SIS['client'] = new SISClient();
32
+
33
+ load_plugin_textdomain ( 'sis', false, basename(rtrim(dirname(__FILE__), '/')) . '/languages' );
34
+
35
+ }
36
+ ?>