Simple Image Sizes - Version 2.0

Version Description

Download this release

Release Info

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

Code changes from version 1.0.6 to 2.0

Files changed (37) hide show
  1. css/Aristo/images/bg_fallback.png +0 -0
  2. css/Aristo/images/icon_sprite.png +0 -0
  3. css/Aristo/images/progress_bar.gif +0 -0
  4. css/Aristo/images/slider_handles.png +0 -0
  5. css/{images/ui-icons_469bdd_256x240.png → Aristo/images/ui-icons_222222_256x240.png} +0 -0
  6. css/{images/ui-icons_6da8d5_256x240.png → Aristo/images/ui-icons_454545_256x240.png} +0 -0
  7. css/Aristo/jquery-ui-1.8.7.custom.css +740 -0
  8. css/images/progress-background.png +0 -0
  9. css/images/progress-bubble.png +0 -0
  10. css/images/progress-stripe.png +0 -0
  11. css/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  12. css/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
  13. css/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
  14. css/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
  15. css/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  16. css/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
  17. css/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
  18. css/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
  19. css/images/ui-icons_217bc0_256x240.png +0 -0
  20. css/images/ui-icons_2e83ff_256x240.png +0 -0
  21. css/images/ui-icons_cd0a0a_256x240.png +0 -0
  22. css/images/ui-icons_d8e7f3_256x240.png +0 -0
  23. css/images/ui-icons_f9bd01_256x240.png +0 -0
  24. css/jquery-ui-1.8.10.progressbar.css +0 -305
  25. css/sis-style.css +57 -58
  26. inc/class.admin.php +679 -610
  27. js/{jquery-ui-1.8.10.progressbar.min.js → jquery-ui-1.8.12.custom.min.js} +30 -5
  28. js/sis.js +437 -150
  29. js/sis.min.js +10 -14
  30. languages/sis-fr_FR.mo +0 -0
  31. languages/sis-fr_FR.po +43 -63
  32. languages/sis.pot +96 -56
  33. readme.txt +74 -55
  34. screenshot-1.png +0 -0
  35. screenshot-2.png +0 -0
  36. screenshot-3.png +0 -0
  37. simple_image_sizes.php +48 -46
css/Aristo/images/bg_fallback.png ADDED
Binary file
css/Aristo/images/icon_sprite.png ADDED
Binary file
css/Aristo/images/progress_bar.gif ADDED
Binary file
css/Aristo/images/slider_handles.png ADDED
Binary file
css/{images/ui-icons_469bdd_256x240.png → Aristo/images/ui-icons_222222_256x240.png} RENAMED
Binary file
css/{images/ui-icons_6da8d5_256x240.png → Aristo/images/ui-icons_454545_256x240.png} RENAMED
Binary file
css/Aristo/jquery-ui-1.8.7.custom.css ADDED
@@ -0,0 +1,740 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery UI CSS Framework 1.8.7
3
+ *
4
+ * Copyright 2010, 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.7
46
+ *
47
+ * Copyright 2010, 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/?ctl=themeroller
54
+ */
55
+
56
+
57
+ /* Component containers
58
+ ----------------------------------*/
59
+ .ui-widget { font-family: Helvetica,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: Helvetica,Arial,sans-serif; font-size: 1em; }
62
+ .ui-widget-content { border: 1px solid #B6B6B6; background: #ffffff; color: #4F4F4F; }
63
+ .ui-widget-content a { color: #4F4F4F; }
64
+ .ui-widget-header { border: 1px solid #B6B6B6; color: #4F4F4F; font-weight: bold; }
65
+ .ui-widget-header {
66
+ background: url(images/bg_fallback.png) 0 0 repeat-x;
67
+ background: -webkit-gradient(
68
+ linear,
69
+ left bottom,
70
+ left top,
71
+ color-stop(1, rgb(237,237,237)),
72
+ color-stop(0, rgb(196,196,196))
73
+ );
74
+ background: -moz-linear-gradient(
75
+ center top,
76
+ rgb(237,237,237),
77
+ rgb(196,196,196)
78
+ );
79
+ }
80
+ .ui-widget-header a { color: #4F4F4F; }
81
+
82
+ /* Interaction states
83
+ ----------------------------------*/
84
+ .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #B6B6B6; font-weight: normal; color: #4F4F4F; }
85
+ .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
86
+ background: url(images/bg_fallback.png) 0 0 repeat-x;
87
+ background: -webkit-gradient(
88
+ linear,
89
+ left bottom,
90
+ left top,
91
+ color-stop(1, rgb(237,237,237)),
92
+ color-stop(0, rgb(196,196,196))
93
+ );
94
+ background: -moz-linear-gradient(
95
+ center top,
96
+ rgb(237,237,237),
97
+ rgb(196,196,196)
98
+ );
99
+ -webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
100
+ -moz-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
101
+ }
102
+ .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #4F4F4F; text-decoration: none; }
103
+ .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 #9D9D9D; font-weight: normal; color: #313131; }
104
+ .ui-state-hover a, .ui-state-hover a:hover { color: #313131; text-decoration: none; }
105
+ .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {
106
+ outline: none;
107
+ color: #1c4257; border: 1px solid #7096ab;
108
+ background: url(images/bg_fallback.png) 0 -50px repeat-x;
109
+ background: -webkit-gradient(
110
+ linear,
111
+ left bottom,
112
+ left top,
113
+ color-stop(1, rgb(185,224,245)),
114
+ color-stop(0, rgb(146,189,214))
115
+ );
116
+ background: -moz-linear-gradient(
117
+ center top,
118
+ rgb(185,224,245),
119
+ rgb(146,189,214)
120
+ );
121
+ -webkit-box-shadow: none;
122
+ -moz-box-shadow: none;
123
+ }
124
+ .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #313131; text-decoration: none; }
125
+ .ui-widget :active { outline: none; }
126
+
127
+ /* Interaction Cues
128
+ ----------------------------------*/
129
+ .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight { border: 1px solid #d2dbf4; background: #f4f8fd; color: #0d2054; -moz-border-radius: 0 !important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
130
+ .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
131
+ .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error { border: 1px solid #e2d0d0; background: #fcf0f0; color: #280b0b; -moz-border-radius: 0 !important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
132
+ .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
133
+ .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
134
+ .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
135
+ .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
136
+ .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
137
+
138
+ /* Icons
139
+ ----------------------------------*/
140
+
141
+ /* states and images */
142
+ .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
143
+ .ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
144
+ .ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
145
+ .ui-state-default .ui-icon { background-image: url(images/ui-icons_454545_256x240.png); }
146
+ .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
147
+ .ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
148
+ .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
149
+ .ui-state-error .ui-icon, .ui-state-error-text .ui-icon { background: url(images/icon_sprite.png) -16px 0 no-repeat !important; }
150
+ .ui-state-highlight .ui-icon, .ui-state-error .ui-icon { margin-top: -1px; }
151
+
152
+ /* positioning */
153
+ .ui-icon-carat-1-n { background-position: 0 0; }
154
+ .ui-icon-carat-1-ne { background-position: -16px 0; }
155
+ .ui-icon-carat-1-e { background-position: -32px 0; }
156
+ .ui-icon-carat-1-se { background-position: -48px 0; }
157
+ .ui-icon-carat-1-s { background-position: -64px 0; }
158
+ .ui-icon-carat-1-sw { background-position: -80px 0; }
159
+ .ui-icon-carat-1-w { background-position: -96px 0; }
160
+ .ui-icon-carat-1-nw { background-position: -112px 0; }
161
+ .ui-icon-carat-2-n-s { background-position: -128px 0; }
162
+ .ui-icon-carat-2-e-w { background-position: -144px 0; }
163
+ .ui-icon-triangle-1-n { background-position: 0 -16px; }
164
+ .ui-icon-triangle-1-ne { background-position: -16px -16px; }
165
+ .ui-icon-triangle-1-e { background-position: -32px -16px; }
166
+ .ui-icon-triangle-1-se { background-position: -48px -16px; }
167
+ .ui-icon-triangle-1-s { background-position: -64px -16px; }
168
+ .ui-icon-triangle-1-sw { background-position: -80px -16px; }
169
+ .ui-icon-triangle-1-w { background-position: -96px -16px; }
170
+ .ui-icon-triangle-1-nw { background-position: -112px -16px; }
171
+ .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
172
+ .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
173
+ .ui-icon-arrow-1-n { background-position: 0 -32px; }
174
+ .ui-icon-arrow-1-ne { background-position: -16px -32px; }
175
+ .ui-icon-arrow-1-e { background-position: -32px -32px; }
176
+ .ui-icon-arrow-1-se { background-position: -48px -32px; }
177
+ .ui-icon-arrow-1-s { background-position: -64px -32px; }
178
+ .ui-icon-arrow-1-sw { background-position: -80px -32px; }
179
+ .ui-icon-arrow-1-w { background-position: -96px -32px; }
180
+ .ui-icon-arrow-1-nw { background-position: -112px -32px; }
181
+ .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
182
+ .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
183
+ .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
184
+ .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
185
+ .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
186
+ .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
187
+ .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
188
+ .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
189
+ .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
190
+ .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
191
+ .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
192
+ .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
193
+ .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
194
+ .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
195
+ .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
196
+ .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
197
+ .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
198
+ .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
199
+ .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
200
+ .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
201
+ .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
202
+ .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
203
+ .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
204
+ .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
205
+ .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
206
+ .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
207
+ .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
208
+ .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
209
+ .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
210
+ .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
211
+ .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
212
+ .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
213
+ .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
214
+ .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
215
+ .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
216
+ .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
217
+ .ui-icon-arrow-4 { background-position: 0 -80px; }
218
+ .ui-icon-arrow-4-diag { background-position: -16px -80px; }
219
+ .ui-icon-extlink { background-position: -32px -80px; }
220
+ .ui-icon-newwin { background-position: -48px -80px; }
221
+ .ui-icon-refresh { background-position: -64px -80px; }
222
+ .ui-icon-shuffle { background-position: -80px -80px; }
223
+ .ui-icon-transfer-e-w { background-position: -96px -80px; }
224
+ .ui-icon-transferthick-e-w { background-position: -112px -80px; }
225
+ .ui-icon-folder-collapsed { background-position: 0 -96px; }
226
+ .ui-icon-folder-open { background-position: -16px -96px; }
227
+ .ui-icon-document { background-position: -32px -96px; }
228
+ .ui-icon-document-b { background-position: -48px -96px; }
229
+ .ui-icon-note { background-position: -64px -96px; }
230
+ .ui-icon-mail-closed { background-position: -80px -96px; }
231
+ .ui-icon-mail-open { background-position: -96px -96px; }
232
+ .ui-icon-suitcase { background-position: -112px -96px; }
233
+ .ui-icon-comment { background-position: -128px -96px; }
234
+ .ui-icon-person { background-position: -144px -96px; }
235
+ .ui-icon-print { background-position: -160px -96px; }
236
+ .ui-icon-trash { background-position: -176px -96px; }
237
+ .ui-icon-locked { background-position: -192px -96px; }
238
+ .ui-icon-unlocked { background-position: -208px -96px; }
239
+ .ui-icon-bookmark { background-position: -224px -96px; }
240
+ .ui-icon-tag { background-position: -240px -96px; }
241
+ .ui-icon-home { background-position: 0 -112px; }
242
+ .ui-icon-flag { background-position: -16px -112px; }
243
+ .ui-icon-calendar { background-position: -32px -112px; }
244
+ .ui-icon-cart { background-position: -48px -112px; }
245
+ .ui-icon-pencil { background-position: -64px -112px; }
246
+ .ui-icon-clock { background-position: -80px -112px; }
247
+ .ui-icon-disk { background-position: -96px -112px; }
248
+ .ui-icon-calculator { background-position: -112px -112px; }
249
+ .ui-icon-zoomin { background-position: -128px -112px; }
250
+ .ui-icon-zoomout { background-position: -144px -112px; }
251
+ .ui-icon-search { background-position: -160px -112px; }
252
+ .ui-icon-wrench { background-position: -176px -112px; }
253
+ .ui-icon-gear { background-position: -192px -112px; }
254
+ .ui-icon-heart { background-position: -208px -112px; }
255
+ .ui-icon-star { background-position: -224px -112px; }
256
+ .ui-icon-link { background-position: -240px -112px; }
257
+ .ui-icon-cancel { background-position: 0 -128px; }
258
+ .ui-icon-plus { background-position: -16px -128px; }
259
+ .ui-icon-plusthick { background-position: -32px -128px; }
260
+ .ui-icon-minus { background-position: -48px -128px; }
261
+ .ui-icon-minusthick { background-position: -64px -128px; }
262
+ .ui-icon-close { background-position: -80px -128px; }
263
+ .ui-icon-closethick { background-position: -96px -128px; }
264
+ .ui-icon-key { background-position: -112px -128px; }
265
+ .ui-icon-lightbulb { background-position: -128px -128px; }
266
+ .ui-icon-scissors { background-position: -144px -128px; }
267
+ .ui-icon-clipboard { background-position: -160px -128px; }
268
+ .ui-icon-copy { background-position: -176px -128px; }
269
+ .ui-icon-contact { background-position: -192px -128px; }
270
+ .ui-icon-image { background-position: -208px -128px; }
271
+ .ui-icon-video { background-position: -224px -128px; }
272
+ .ui-icon-script { background-position: -240px -128px; }
273
+ .ui-icon-alert { background-position: 0 -144px; }
274
+ .ui-icon-info { background: url(images/icon_sprite.png) 0 0 no-repeat !important; }
275
+ .ui-icon-notice { background-position: -32px -144px; }
276
+ .ui-icon-help { background-position: -48px -144px; }
277
+ .ui-icon-check { background-position: -64px -144px; }
278
+ .ui-icon-bullet { background-position: -80px -144px; }
279
+ .ui-icon-radio-off { background-position: -96px -144px; }
280
+ .ui-icon-radio-on { background-position: -112px -144px; }
281
+ .ui-icon-pin-w { background-position: -128px -144px; }
282
+ .ui-icon-pin-s { background-position: -144px -144px; }
283
+ .ui-icon-play { background-position: 0 -160px; }
284
+ .ui-icon-pause { background-position: -16px -160px; }
285
+ .ui-icon-seek-next { background-position: -32px -160px; }
286
+ .ui-icon-seek-prev { background-position: -48px -160px; }
287
+ .ui-icon-seek-end { background-position: -64px -160px; }
288
+ .ui-icon-seek-start { background-position: -80px -160px; }
289
+ /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
290
+ .ui-icon-seek-first { background-position: -80px -160px; }
291
+ .ui-icon-stop { background-position: -96px -160px; }
292
+ .ui-icon-eject { background-position: -112px -160px; }
293
+ .ui-icon-volume-off { background-position: -128px -160px; }
294
+ .ui-icon-volume-on { background-position: -144px -160px; }
295
+ .ui-icon-power { background-position: 0 -176px; }
296
+ .ui-icon-signal-diag { background-position: -16px -176px; }
297
+ .ui-icon-signal { background-position: -32px -176px; }
298
+ .ui-icon-battery-0 { background-position: -48px -176px; }
299
+ .ui-icon-battery-1 { background-position: -64px -176px; }
300
+ .ui-icon-battery-2 { background-position: -80px -176px; }
301
+ .ui-icon-battery-3 { background-position: -96px -176px; }
302
+ .ui-icon-circle-plus { background-position: 0 -192px; }
303
+ .ui-icon-circle-minus { background-position: -16px -192px; }
304
+ .ui-icon-circle-close { background-position: -32px -192px; }
305
+ .ui-icon-circle-triangle-e { background-position: -48px -192px; }
306
+ .ui-icon-circle-triangle-s { background-position: -64px -192px; }
307
+ .ui-icon-circle-triangle-w { background-position: -80px -192px; }
308
+ .ui-icon-circle-triangle-n { background-position: -96px -192px; }
309
+ .ui-icon-circle-arrow-e { background-position: -112px -192px; }
310
+ .ui-icon-circle-arrow-s { background-position: -128px -192px; }
311
+ .ui-icon-circle-arrow-w { background-position: -144px -192px; }
312
+ .ui-icon-circle-arrow-n { background-position: -160px -192px; }
313
+ .ui-icon-circle-zoomin { background-position: -176px -192px; }
314
+ .ui-icon-circle-zoomout { background-position: -192px -192px; }
315
+ .ui-icon-circle-check { background-position: -208px -192px; }
316
+ .ui-icon-circlesmall-plus { background-position: 0 -208px; }
317
+ .ui-icon-circlesmall-minus { background-position: -16px -208px; }
318
+ .ui-icon-circlesmall-close { background-position: -32px -208px; }
319
+ .ui-icon-squaresmall-plus { background-position: -48px -208px; }
320
+ .ui-icon-squaresmall-minus { background-position: -64px -208px; }
321
+ .ui-icon-squaresmall-close { background-position: -80px -208px; }
322
+ .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
323
+ .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
324
+ .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
325
+ .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
326
+ .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
327
+ .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
328
+
329
+
330
+ /* Misc visuals
331
+ ----------------------------------*/
332
+
333
+ /* Corner radius */
334
+ .ui-corner-tl { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; }
335
+ .ui-corner-tr { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
336
+ .ui-corner-bl { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
337
+ .ui-corner-br { -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
338
+ .ui-corner-top { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
339
+ .ui-corner-bottom { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
340
+ .ui-corner-right { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
341
+ .ui-corner-left { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
342
+ .ui-corner-all { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; }
343
+
344
+ /* Overlays */
345
+ .ui-widget-overlay { background: #262b33; opacity: .70;filter:Alpha(Opacity=70); }
346
+ .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #000000; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
347
+ * jQuery UI Resizable 1.8.7
348
+ *
349
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
350
+ * Dual licensed under the MIT or GPL Version 2 licenses.
351
+ * http://jquery.org/license
352
+ *
353
+ * http://docs.jquery.com/UI/Resizable#theming
354
+ */
355
+ .ui-resizable { position: relative;}
356
+ .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
357
+ .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
358
+ .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
359
+ .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
360
+ .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
361
+ .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
362
+ .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
363
+ .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
364
+ .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
365
+ .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
366
+ * jQuery UI Selectable 1.8.7
367
+ *
368
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
369
+ * Dual licensed under the MIT or GPL Version 2 licenses.
370
+ * http://jquery.org/license
371
+ *
372
+ * http://docs.jquery.com/UI/Selectable#theming
373
+ */
374
+ .ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
375
+ /*
376
+ * jQuery UI Accordion 1.8.7
377
+ *
378
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
379
+ * Dual licensed under the MIT or GPL Version 2 licenses.
380
+ * http://jquery.org/license
381
+ *
382
+ * http://docs.jquery.com/UI/Accordion#theming
383
+ */
384
+ /* IE/Win - Fix animation bug - #4615 */
385
+ .ui-accordion { width: 100%; }
386
+ .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
387
+ .ui-accordion .ui-accordion-header, .ui-accordion .ui-accordion-content { -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; }
388
+ .ui-accordion .ui-accordion-li-fix { display: inline; }
389
+ .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
390
+ .ui-accordion .ui-accordion-header a { display: block; font-size: 12px; font-weight: bold; padding: .5em .5em .5em .7em; }
391
+ .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
392
+ .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
393
+ .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
394
+ .ui-accordion .ui-accordion-content-active { display: block; }/*
395
+ * jQuery UI Autocomplete 1.8.7
396
+ *
397
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
398
+ * Dual licensed under the MIT or GPL Version 2 licenses.
399
+ * http://jquery.org/license
400
+ *
401
+ * http://docs.jquery.com/UI/Autocomplete#theming
402
+ */
403
+ .ui-autocomplete {
404
+ position: absolute; cursor: default; z-index: 3 !important;
405
+ -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
406
+ -moz-box-shadow: 0 1px 5px rgba(0,0,0,0.3);
407
+ -webkit-box-shadow: 0 1px 5px rgba(0,0,0,0.3);
408
+ }
409
+
410
+ /* workarounds */
411
+ * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
412
+
413
+ /*
414
+ * jQuery UI Menu 1.8.7
415
+ *
416
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
417
+ * Dual licensed under the MIT or GPL Version 2 licenses.
418
+ * http://jquery.org/license
419
+ *
420
+ * http://docs.jquery.com/UI/Menu#theming
421
+ */
422
+ .ui-menu {
423
+ list-style:none;
424
+ padding: 2px;
425
+ margin: 0;
426
+ display:block;
427
+ float: left;
428
+ }
429
+ .ui-menu .ui-menu {
430
+ margin-top: -3px;
431
+ }
432
+ .ui-menu .ui-menu-item {
433
+ margin:0;
434
+ padding: 0;
435
+ zoom: 1;
436
+ float: left;
437
+ clear: left;
438
+ width: 100%;
439
+ }
440
+ .ui-menu .ui-menu-item a {
441
+ text-decoration:none;
442
+ display:block;
443
+ padding:.2em .4em;
444
+ line-height:1.5;
445
+ zoom:1;
446
+ }
447
+ .ui-menu .ui-menu-item a.ui-state-hover,
448
+ .ui-menu .ui-menu-item a.ui-state-active {
449
+ font-weight: normal;
450
+ margin: -1px;
451
+ background: #5f83b9;
452
+ color: #FFFFFF;
453
+ text-shadow: 0px 1px 1px #234386;
454
+ border-color: #466086;
455
+ -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
456
+ }
457
+ /*
458
+ * jQuery UI Button 1.8.7
459
+ *
460
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
461
+ * Dual licensed under the MIT or GPL Version 2 licenses.
462
+ * http://jquery.org/license
463
+ *
464
+ * http://docs.jquery.com/UI/Button#theming
465
+ */
466
+ .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; -webkit-user-select: none; -moz-user-select: none; user-select: none; } /* the overflow property removes extra width in IE */
467
+ .ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
468
+ button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
469
+ .ui-button-icons-only { width: 3.4em; }
470
+ button.ui-button-icons-only { width: 3.7em; }
471
+
472
+ /* button animation properties */
473
+ .ui-button {
474
+ -webkit-transition: all 0.25s ease-in-out;
475
+ -moz-transition: all 0.25s ease-in-out;
476
+ -o-transition: all 0.25s ease-in-out;
477
+ }
478
+
479
+ /*states*/
480
+ .ui-button.ui-state-hover {
481
+ -moz-box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
482
+ -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
483
+ }
484
+ .ui-button.ui-state-focus {
485
+ outline: none;
486
+ color: #1c4257; border-color: #7096ab;
487
+ background-image: -webkit-gradient(
488
+ linear,
489
+ left bottom,
490
+ left top,
491
+ color-stop(1, rgb(185,224,245)),
492
+ color-stop(0, rgb(146,189,214))
493
+ );
494
+ background-image: -moz-linear-gradient(
495
+ center top,
496
+ rgb(185,224,245),
497
+ rgb(146,189,214)
498
+ );
499
+ -webkit-box-shadow: none;
500
+ -moz-box-shadow: none;
501
+ }
502
+
503
+ /*button text element */
504
+ .ui-button .ui-button-text { display: block; line-height: 1.4; font-weight: bold; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); }
505
+ .ui-button-text-only .ui-button-text { padding: .4em 1em .3em }
506
+ .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
507
+ .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
508
+ .ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
509
+ .ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
510
+ /* no icon support for input elements, provide padding by default */
511
+ input.ui-button { padding: .4em 1em; }
512
+
513
+ /*button icon element(s) */
514
+ .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
515
+ .ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
516
+ .ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
517
+ .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
518
+ .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
519
+
520
+ /*button sets*/
521
+ .ui-buttonset { margin-right: 7px; }
522
+ .ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
523
+ .ui-buttonset .ui-button.ui-state-active { color: #1c4257; border-color: #7096ab; }
524
+ .ui-buttonset .ui-button.ui-state-active {
525
+ background-image: -webkit-gradient(
526
+ linear,
527
+ left bottom,
528
+ left top,
529
+ color-stop(1, rgb(185,224,245)),
530
+ color-stop(0, rgb(146,189,214))
531
+ );
532
+ background-image: -moz-linear-gradient(
533
+ center top,
534
+ rgb(185,224,245),
535
+ rgb(146,189,214)
536
+ );
537
+ -webkit-box-shadow: none;
538
+ -moz-box-shadow: none;
539
+ }
540
+
541
+ /* workarounds */
542
+ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
543
+ /*
544
+ * jQuery UI Dialog 1.8.7
545
+ *
546
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
547
+ * Dual licensed under the MIT or GPL Version 2 licenses.
548
+ * http://jquery.org/license
549
+ *
550
+ * http://docs.jquery.com/UI/Dialog#theming
551
+ */
552
+ .ui-dialog { position: absolute; padding: 0; width: 300px; overflow: hidden; }
553
+ .ui-dialog {
554
+ -webkit-box-shadow: 0 2px 12px rgba(0,0,0,0.6);
555
+ -moz-box-shadow: 0 2px 12px rgba(0,0,0,0.6);
556
+ }
557
+ .ui-dialog .ui-dialog-titlebar { padding: 0.7em 1em 0.6em 1em; position: relative; border: none; border-bottom: 1px solid #979797; -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; }
558
+ .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; font-size: 14px; text-shadow: 0 1px 0 rgba(255,255,255,0.5); }
559
+ .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .8em; top: 55%; width: 16px; margin: -10px 0 0 0; padding: 0; height: 16px; }
560
+ .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; background: url(images/icon_sprite.png) 0 -16px no-repeat; }
561
+ .ui-dialog .ui-dialog-titlebar-close:hover span { background-position: -16px -16px; }
562
+ .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; border: 0; }
563
+ .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
564
+ .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
565
+ .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
566
+ .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
567
+ .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
568
+ .ui-draggable .ui-dialog-titlebar { cursor: move; }
569
+ /*
570
+ * jQuery UI Slider 1.8.7
571
+ *
572
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
573
+ * Dual licensed under the MIT or GPL Version 2 licenses.
574
+ * http://jquery.org/license
575
+ *
576
+ * http://docs.jquery.com/UI/Slider#theming
577
+ */
578
+ .ui-slider { position: relative; text-align: left; background: #d7d7d7; }
579
+ .ui-slider { -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.5) inset; -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.5) inset; }
580
+ .ui-slider .ui-slider-handle { background: url(images/slider_handles.png) 0px -23px no-repeat; position: absolute; z-index: 2; width: 23px; height: 23px; cursor: default; border: none; outline: none; -moz-box-shadow: none; -webkit-box-shadow: none; }
581
+ .ui-slider .ui-state-hover, .ui-slider .ui-state-active { background-position: 0 0; }
582
+ .ui-slider .ui-slider-range { background: #a3cae0; position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
583
+ .ui-slider .ui-slider-range { -moz-box-shadow: 0 1px 2px rgba(17,35,45,0.6) inset; -webkit-box-shadow: 0 1px 2px rgba(17,35,45,0.6) inset; }
584
+
585
+
586
+ .ui-slider-horizontal { height: 5px; }
587
+ .ui-slider-horizontal .ui-slider-handle { top: -8px; margin-left: -13px; }
588
+ .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
589
+ .ui-slider-horizontal .ui-slider-range-min { left: 0; }
590
+ .ui-slider-horizontal .ui-slider-range-max { right: 0; }
591
+
592
+ .ui-slider-vertical { width: 5px; height: 100px; }
593
+ .ui-slider-vertical .ui-slider-handle { left: -8px; margin-left: 0; margin-bottom: -13px; }
594
+ .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
595
+ .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
596
+ .ui-slider-vertical .ui-slider-range-max { top: 0; }/*
597
+ * jQuery UI Tabs 1.8.7
598
+ *
599
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
600
+ * Dual licensed under the MIT or GPL Version 2 licenses.
601
+ * http://jquery.org/license
602
+ *
603
+ * http://docs.jquery.com/UI/Tabs#theming
604
+ */
605
+ .ui-tabs { position: relative; zoom: 1; border: 0; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
606
+ .ui-tabs .ui-tabs-nav { margin: 0; padding: 0; background: transparent; border-width: 0 0 1px 0; }
607
+ .ui-tabs .ui-tabs-nav {
608
+ -moz-border-radius: 0;
609
+ -webkit-border-radius: 0;
610
+ border-radius: 0;
611
+ }
612
+ .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
613
+ .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; font-size: 12px; font-weight: bold; text-shadow: 0 1px 0 rgba(255,255,255,0.5); }
614
+ .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; background: #fff; border-color: #B6B6B6; }
615
+ .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; outline: none; }
616
+ .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
617
+ .ui-tabs .ui-tabs-panel { display: block; border-width: 0 1px 1px 1px; padding: 1em 1.4em; background: none; }
618
+ .ui-tabs .ui-tabs-panel {
619
+ -moz-border-radius: 0;
620
+ -webkit-border-radius: 0;
621
+ border-radius: 0;
622
+ }
623
+ .ui-tabs .ui-tabs-hide { display: none !important; }
624
+ /*
625
+ * jQuery UI Datepicker 1.8.7
626
+ *
627
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
628
+ * Dual licensed under the MIT or GPL Version 2 licenses.
629
+ * http://jquery.org/license
630
+ *
631
+ * http://docs.jquery.com/UI/Datepicker#theming
632
+ */
633
+ .ui-datepicker { width: 17em; padding: 0; display: none; border-color: #DDDDDD; }
634
+ .ui-datepicker {
635
+ -moz-box-shadow: 0 4px 8px rgba(0,0,0,0.5);
636
+ -webkit-box-shadow: 0 4px 8px rgba(0,0,0,0.5);
637
+ box-shadow: 0 4px 8px rgba(0,0,0,0.5);
638
+ }
639
+ .ui-datepicker .ui-datepicker-header { position:relative; padding:.35em 0; border: none; border-bottom: 1px solid #B6B6B6; -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; }
640
+ .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 6px; width: 1.8em; height: 1.8em; }
641
+ .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { border: 1px none; }
642
+ .ui-datepicker .ui-datepicker-prev { left:2px; }
643
+ .ui-datepicker .ui-datepicker-next { right:2px; }
644
+ .ui-datepicker .ui-datepicker-prev span { background-position: 0px -32px !important; }
645
+ .ui-datepicker .ui-datepicker-next span { background-position: -16px -32px !important; }
646
+ .ui-datepicker .ui-datepicker-prev-hover span { background-position: 0px -48px !important; }
647
+ .ui-datepicker .ui-datepicker-next-hover span { background-position: -16px -48px !important; }
648
+ .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; background: url(images/icon_sprite.png) no-repeat; }
649
+ .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; font-size: 12px; text-shadow: 0 1px 0 rgba(255,255,255,0.6); }
650
+ .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
651
+ .ui-datepicker select.ui-datepicker-month-year {width: 100%;}
652
+ .ui-datepicker select.ui-datepicker-month,
653
+ .ui-datepicker select.ui-datepicker-year { width: 49%;}
654
+ .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
655
+ .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
656
+ .ui-datepicker td { border: 0; padding: 1px; }
657
+ .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
658
+ .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
659
+ .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
660
+ .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
661
+ .ui-datepicker .ui-state-default { background: transparent; border-color: #FFF; }
662
+ .ui-datepicker .ui-state-active { background: #5F83B9; border-color: #5F83B9; color: #FFF; font-weight: bold; text-shadow: 0 1px 1px #234386; }
663
+
664
+ /* with multiple calendars */
665
+ .ui-datepicker.ui-datepicker-multi { width:auto; }
666
+ .ui-datepicker-multi .ui-datepicker-group { float:left; }
667
+ .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
668
+ .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
669
+ .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
670
+ .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
671
+ .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
672
+ .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
673
+ .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
674
+ .ui-datepicker-row-break { clear:both; width:100%; }
675
+
676
+ /* RTL support */
677
+ .ui-datepicker-rtl { direction: rtl; }
678
+ .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
679
+ .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
680
+ .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
681
+ .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
682
+ .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
683
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
684
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
685
+ .ui-datepicker-rtl .ui-datepicker-group { float:right; }
686
+ .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
687
+ .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
688
+
689
+ /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
690
+ .ui-datepicker-cover {
691
+ display: none; /*sorry for IE5*/
692
+ display/**/: block; /*sorry for IE5*/
693
+ position: absolute; /*must have*/
694
+ z-index: -1; /*must have*/
695
+ filter: mask(); /*must have*/
696
+ top: -4px; /*must have*/
697
+ left: -4px; /*must have*/
698
+ width: 200px; /*must have*/
699
+ height: 200px; /*must have*/
700
+ }/*
701
+ * jQuery UI Progressbar 1.8.7
702
+ *
703
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
704
+ * Dual licensed under the MIT or GPL Version 2 licenses.
705
+ * http://jquery.org/license
706
+ *
707
+ * http://docs.jquery.com/UI/Progressbar#theming
708
+ */
709
+ .ui-progressbar { height: 12px; text-align: left; background: #FFF url(images/progress_bar.gif) 0 -14px repeat-x; }
710
+ .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; background: url(images/progress_bar.gif) 0 0 repeat-x; }
711
+
712
+ /* Extra Input Field Styling */
713
+ /*
714
+ textarea, input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
715
+ padding: 3px;
716
+ -webkit-border-radius: 2px;
717
+ -moz-border-radius: 2px;
718
+ border-radius: 2px;
719
+ border: 1px solid #cecece;
720
+ outline: none;
721
+ -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.1) inset, 0 1px 0 rgba(255,255,255,0.2);
722
+ -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.1) inset, 0 1px 0 rgba(255,255,255,0.2);
723
+ box-shadow: 0 1px 3px rgba(0,0,0,0.1) inset, 0 1px 0 rgba(255,255,255,0.2);
724
+ -webkit-transition: all 0.25s ease-in-out;
725
+ -moz-transition: all 0.25 ease-in-out;
726
+ -o-transition: all 0.25s ease-in-out;
727
+ }
728
+ textarea:hover, input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover {
729
+ border: 1px solid #bdbdbd;
730
+ -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.2) inset, 0 1px 0 rgba(255,255,255,0.2);
731
+ -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.2) inset, 0 1px 0 rgba(255,255,255,0.2);
732
+ box-shadow: 0 1px 3px rgba(0,0,0,0.2) inset, 0 1px 0 rgba(255,255,255,0.2);
733
+ }
734
+ textarea:focus, input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus {
735
+ border: 1px solid #95bdd4;
736
+ -webkit-box-shadow: 0 2px 3px rgba(161,202,226,0.5) inset, 0 1px 0 rgba(255,255,255,0.2);
737
+ -moz-box-shadow: 0 2px 3px rgba(161,202,226,0.5) inset, 0 1px 0 rgba(255,255,255,0.2);
738
+ box-shadow: 0 2px 3px rgba(161,202,226,0.5) inset, 0 1px 0 rgba(255,255,255,0.2);
739
+ }
740
+ */
css/images/progress-background.png DELETED
Binary file
css/images/progress-bubble.png DELETED
Binary file
css/images/progress-stripe.png DELETED
Binary file
css/images/ui-bg_flat_0_aaaaaa_40x100.png DELETED
Binary file
css/images/ui-bg_flat_55_fbec88_40x100.png DELETED
Binary file
css/images/ui-bg_glass_75_d0e5f5_1x400.png DELETED
Binary file
css/images/ui-bg_glass_85_dfeffc_1x400.png DELETED
Binary file
css/images/ui-bg_glass_95_fef1ec_1x400.png DELETED
Binary file
css/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png DELETED
Binary file
css/images/ui-bg_inset-hard_100_f5f8f9_1x100.png DELETED
Binary file
css/images/ui-bg_inset-hard_100_fcfdfd_1x100.png DELETED
Binary file
css/images/ui-icons_217bc0_256x240.png DELETED
Binary file
css/images/ui-icons_2e83ff_256x240.png DELETED
Binary file
css/images/ui-icons_cd0a0a_256x240.png DELETED
Binary file
css/images/ui-icons_d8e7f3_256x240.png DELETED
Binary file
css/images/ui-icons_f9bd01_256x240.png DELETED
Binary file
css/jquery-ui-1.8.10.progressbar.css DELETED
@@ -1,305 +0,0 @@
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%; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/sis-style.css CHANGED
@@ -1,59 +1,58 @@
1
- .delete_size {
2
- width: 90px;
3
- padding: 0px;
4
- display:inline-block;
5
- position:relative;
6
- text-indent:16px;
7
- margin-right:5px;
8
- text-align:center
9
- }
10
-
11
- .delete_size_icon {
12
- float: right;
13
- top: 2px;
14
- position:absolute;
15
- left: 0px;
16
- }
17
-
18
- .progress {
19
- position:relative;
20
- height:13px;
21
- margin-bottom: 43px;
22
- margin-top: 60px;
23
- color:#FFFFFF;
24
- display:none;
25
- }
26
-
27
- .progress .progress-percent {
28
- position: absolute;
29
- left: 0%;
30
- top: -50px;
31
- width: 82px;
32
- height: 49px;
33
- margin-top: -9px;
34
- font-weight: bold;
35
- background-image: url('./images/progress-bubble.png');
36
- line-height: 39px;
37
- text-align: center;
38
- }
39
-
40
- .progress.ui-widget-content { border: 1px solid #343434; background: #fcfdfd url(./images/progress-background.png) 50% bottom repeat-x; }
41
- .progress .ui-widget-header { border: 1px solid #343434; background: #5c9ccc url(./images/progress-stripe.png) 50% 50% repeat-x; }
42
-
43
- .wrapper {
44
- display: inline-block;
45
- float: left;
46
- width: 45%;
47
- }
48
-
49
- #regenerate_message {
50
- display:none;
51
- }
52
-
53
- #thumb {
54
- display:none;
55
- }
56
-
57
- #ajax_thumbnail_rebuild {
58
- margin-top:40px;
59
  }
1
+ .progress {
2
+ position:relative;
3
+ height:13px;
4
+ margin-bottom: 43px;
5
+ margin-top: 60px;
6
+ color:#FFFFFF;
7
+ display:none;
8
+ }
9
+
10
+ .progress .progress-percent {
11
+ position: absolute;
12
+ left: 0%;
13
+ top: -63px;
14
+ width: 82px;
15
+ height: 49px;
16
+ margin-top: -9px;
17
+ font-weight: bold;
18
+ line-height: 39px;
19
+ text-align: center;
20
+ }
21
+ tr{
22
+ -webkit-transition: all .5s ease-in-out;
23
+ -moz-transition: all .5s ease-in-out;
24
+ -o-transition: all .5s ease-in-out;
25
+ transition: all .5s ease-in-out;
26
+ }
27
+ tr:nth-child(even){
28
+ background-color:#F9F9F9 ;
29
+ }
30
+ tr.addPending{
31
+ background-color:#6CA1D7;
32
+ }
33
+ tr.successAdding{
34
+ background-color:#89D76A;
35
+ }
36
+ tr.errorAdding {
37
+ background-color:#C45858;
38
+ }
39
+ tr.notChangedAdding {
40
+ background-color:#F2A13A;
41
+ }
42
+ .wrapper {
43
+ display: inline-block;
44
+ float: left;
45
+ width: 45%;
46
+ }
47
+
48
+ #regenerate_message {
49
+ display:none;
50
+ }
51
+
52
+ #thumb {
53
+ display:none;
54
+ }
55
+
56
+ #ajax_thumbnail_rebuild {
57
+ margin-top:40px;
 
58
  }
inc/class.admin.php CHANGED
@@ -1,611 +1,680 @@
1
- <?php
2
- Class SISAdmin{
3
-
4
- // Original sizes
5
- public $original = array( 'thumbnail', 'medium', 'large' );
6
-
7
- public function __construct(){
8
- // Init
9
- add_action ( 'admin_menu', array( &$this, 'init' ) );
10
- add_action ( 'admin_enqueue_scripts', array( &$this, 'registerScripts' ), 11 );
11
-
12
- // Add ajax action
13
- add_action('wp_ajax_ajax_thumbnail_rebuild', array( &$this, 'ajaxThumbnailRebuildAjax' ) );
14
- add_action('wp_ajax_get_sizes', array( &$this, 'ajaxGetSizes' ) );
15
-
16
- // Add image sizes in the form
17
- add_filter( 'attachment_fields_to_edit', array( &$this, 'sizesInForm' ), 11, 2 ); // Add our sizes to media forms
18
-
19
- // Add link in plugins list
20
- add_filter('plugin_action_links', array( &$this,'addSettingsLink'), 10, 2 );
21
- }
22
-
23
- /**
24
- * Register javascripts and css.
25
- *
26
- * @access public
27
- * @return void
28
- * @author Nicolas Juen
29
- */
30
- public function registerScripts($hook_suffix = '' ) {
31
- if( isset( $hook_suffix ) && $hook_suffix == 'options-media.php' ) {
32
- // Add javascript
33
- wp_enqueue_script( 'sis_js', SIS_URL.'js/sis.min.js', array('jquery'), '1.5' );
34
- wp_enqueue_script( 'jquery-ui-progressbar', SIS_URL.'js/jquery-ui-1.8.10.progressbar.min.js', array(), '1.8.10' );
35
-
36
- // Add javascript translation
37
- wp_localize_script( 'sis_js', 'sis', $this->localizeVars() );
38
-
39
- // Add CSS
40
- wp_enqueue_style( 'jquery-ui-sis', SIS_URL.'css/jquery-ui-1.8.10.progressbar.css', array(), '1.8.10' );
41
- wp_enqueue_style( 'sis_css', SIS_URL.'css/sis-style.css', array(), '1.5' );
42
- }
43
- }
44
-
45
- /**
46
- * Localize the var for javascript
47
- *
48
- * @access public
49
- * @return void
50
- * @author Nicolas Juen
51
- */
52
- public function localizeVars() {
53
- return array(
54
- 'ajaxUrl' => admin_url( '/admin-ajax.php' ),
55
- 'reading' => __( 'Reading attachments...', 'sis' ),
56
- 'maximumWidth' => __( 'Maximum width', 'sis' ),
57
- 'maximumHeight' => __( 'Maximum height', 'sis' ),
58
- 'crop' => __( 'Crop ?', 'sis' ),
59
- 'of' => __( ' of ', 'sis' ),
60
- 'deleteImage' => __( 'Delete', 'sis' ),
61
- 'noMedia' => __( 'No media in your site to regenerate !', 'sis' ),
62
- 'regenerating' => __( 'Regenerating ', 'sis'),
63
- 'validate' => __( 'Validate image size name', 'sis' ),
64
- 'done' => __( 'Done.', 'sis' ),
65
- 'size' => __( 'Size', 'sis' ),
66
- 'notOriginal' => __( 'Don\'t use the basic Wordpress thumbnail size name, use the form above to edit them', 'sis' ),
67
- );
68
- }
69
-
70
- /**
71
- * Add a link to the setting option page
72
- *
73
- * @access public
74
- * @param array $links
75
- * @param string $file
76
- * @return void
77
- * @author Nicolas Juen
78
- */
79
- public function addSettingsLink( $links, $file ) {
80
-
81
- if( $file != 'simple-image-sizes/simple_image_sizes.php' )
82
- return $links;
83
-
84
- $settings_link = '<a href="'.admin_url('options-media.php').'"> '.__( 'Settings', 'sis' ).' </a>';
85
- array_unshift($links, $settings_link);
86
-
87
- return $links;
88
- }
89
-
90
- /**
91
- * Init for the option page
92
- *
93
- * @access public
94
- * @return void
95
- * @author Nicolas Juen
96
- */
97
- function init() {
98
-
99
- // Check if admin
100
- if( !is_admin() )
101
- return false;
102
-
103
- // Get the image sizes
104
- global $_wp_additional_image_sizes;
105
-
106
- // Get the sizes and add the settings
107
- foreach ( get_intermediate_image_sizes() as $s ) {
108
-
109
- // Don't make the original sizes
110
- if( in_array( $s, $this->original ) )
111
- continue;
112
-
113
- // Set width
114
- if ( isset( $_wp_additional_image_sizes[$s]['width'] ) ) // For theme-added sizes
115
- $width = intval( $_wp_additional_image_sizes[$s]['width'] );
116
- else // For default sizes set in options
117
- $width = get_option( "{$s}_size_w" );
118
-
119
- // Set height
120
- if ( isset( $_wp_additional_image_sizes[$s]['height'] ) ) // For theme-added sizes
121
- $height = intval( $_wp_additional_image_sizes[$s]['height'] );
122
- else // For default sizes set in options
123
- $height = get_option( "{$s}_size_h" );
124
-
125
- //Set crop
126
- if ( isset( $_wp_additional_image_sizes[$s]['crop'] ) ) // For theme-added sizes
127
- $crop = intval( $_wp_additional_image_sizes[$s]['crop'] );
128
- else // For default sizes set in options
129
- $crop = get_option( "{$s}_crop" );
130
-
131
- // Add the setting field for this size
132
- add_settings_field( 'image_size_'.$s.'', __( 'Size ', 'sis' ).$s, array( &$this, 'imageSizes' ), 'media' , 'default', array( 'name' => $s , 'width' => $width , 'height' => $height ) );
133
-
134
- }
135
-
136
- // Register the setting for media option page
137
- register_setting( 'media', 'custom_image_sizes' );
138
-
139
- // Add the button
140
- add_settings_field( 'add_size', __( 'Add a new size', 'sis' ), array( &$this, 'addSize' ), 'media' );
141
-
142
- // Add legend
143
- add_settings_field( 'add_legend', __( 'Legend of the sizes', 'sis' ), array( &$this, 'addLegend' ), 'media' );
144
-
145
- // Add size button
146
- add_settings_field( 'get_php', __( 'Get php for theme', 'sis' ), array( &$this, 'getPhp' ), 'media' );
147
-
148
- // Add section for the thumbnail regeneration
149
- add_settings_section( 'thumbnail_regenerate', __( 'Thumbnail regeneration', 'sis' ), array( &$this, 'thumbnailRegenerate' ), 'media' );
150
- }
151
-
152
- /**
153
- * Display the row of the image size
154
- *
155
- * @access public
156
- * @param mixed $args
157
- * @return void
158
- * @author Nicolas Juen
159
- */
160
- public function imageSizes( $args ) {
161
- // Get the options
162
- $sizes = (array)get_option( 'custom_image_sizes' );
163
-
164
- $height = isset( $sizes[$args['name']]['h'] )? $sizes[$args['name']]['h'] : $args['height'] ;
165
- $width = isset( $sizes[$args['name']]['w'] )? $sizes[$args['name']]['w'] : $args['width'] ;
166
- $crop = isset( $sizes[$args['name']]['c'] ) && !empty( $sizes[$args['name']]['c'] )? '1' : '0' ;
167
- $custom = ( isset( $sizes[$args['name']]['custom'] ) && !empty( $sizes[$args['name']]['custom'] ) )? '1' : '0' ;
168
- ?>
169
- <?php if( $custom ): ?>
170
- <span class="custom_size"> <?php _e( 'Custom size', 'sis'); ?> : </span>
171
- <input name="<?php echo 'custom_image_sizes['.$args['name'].'][custom]' ?>" type="hidden" id="<?php echo 'custom_image_sizes['.$args['name'].'][custom]' ?>" value="1" />
172
- <?php else: ?>
173
- <span class="theme_size"> <?php _e( 'Theme size', 'sis'); ?> : </span>
174
- <input name="<?php echo 'custom_image_sizes['.$args['name'].'][theme]' ?>" type="hidden" id="<?php echo 'custom_image_sizes['.$args['name'].'][theme]' ?>" value="1" />
175
- <?php endif; ?>
176
- <label for="<?php echo 'custom_image_sizes['.$args['name'].'][w]' ?>">
177
- <?php _e( 'Maximum width', 'sis'); ?>
178
- <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" />
179
- </label>
180
-
181
- <label for="<?php echo 'custom_image_sizes['.$args['name'].'][h]' ?>">
182
- <?php _e( 'Maximum height', 'sis'); ?>
183
- <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" />
184
- </label>
185
-
186
-
187
- <label class="crop">
188
- <?php _e( 'Crop ?', 'sis'); ?>
189
- <input type='checkbox' <?php checked( $crop, 1 ) ?> name="<?php echo 'custom_image_sizes['.$args['name'].'][c]' ?>" value="1" />
190
- </label>
191
- <label class="ui-state-default ui-corner-all delete_size">
192
- <?php _e( 'Delete', 'sis'); ?>
193
- <div class="ui-icon ui-icon-circle-close delete_size_icon">
194
- </div>
195
- </label>
196
- <?php }
197
-
198
- /**
199
- * Add the button to add a size
200
- *
201
- * @access public
202
- * @return void
203
- * @author Nicolas Juen
204
- */
205
- public function addSize() { ?>
206
- <input type="button" class="button-secondary action" id="add_size" value="<?php _e( 'Add a new size of thumbnail', 'sis'); ?>" />
207
- <?php
208
- }
209
-
210
- /**
211
- * Add the button to get the php for th sizes
212
- *
213
- * @access public
214
- * @return void
215
- * @author Nicolas Juen
216
- */
217
- public function getPhp() { ?>
218
- <input type="button" class="button-secondary action" id="get_php" value="<?php _e( 'Get the PHP for the theme', 'sis'); ?>" />
219
- <p> <?php _e( 'Copy and paste the code below into your Wordpress theme function file if you wanted to save them and deactivate the plugin.', 'sis'); ?> </p>
220
- <code></code>
221
- <?php
222
- }
223
-
224
- /**
225
- * Add the legend fo the colors
226
- *
227
- * @access public
228
- * @return void
229
- * @author Nicolas Juen
230
- */
231
- public function addLegend() { ?>
232
- <?php _e('The images created on your theme are <span style="color:orange">orange</span> and your custom size are <span style="color:green"> green </span>.', 'sis'); ?>
233
- <?php
234
- }
235
-
236
- /**
237
- * Display the Table of sizes and post types for regenerating
238
- *
239
- * @access public
240
- * @return void
241
- * @author Nicolas Juen
242
- */
243
- public function thumbnailRegenerate() {
244
- // Get the sizes
245
- global $_wp_additional_image_sizes;
246
- ?>
247
- <div id="sis-regen">
248
- <div class="wrapper" style="">
249
- <h4> <?php _e( 'Select which thumbnails you want to rebuild:', 'sis'); ?> </h4>
250
- <table cellspacing="0" class="widefat page fixed">
251
- <thead>
252
- <tr>
253
- <th class="manage-column column-date" scope="col"><?php _e( 'Resize ?', 'sis'); ?></th>
254
- <th class="manage-column column-author" scope="col"><?php _e( 'Size name', 'sis'); ?></th>
255
- <th class="manage-column column-author" scope="col"><?php _e( 'Width', 'sis'); ?></th>
256
- <th class="manage-column column-author" scope="col"><?php _e( 'Height', 'sis'); ?></th>
257
- <th class="manage-column column-author" scope="col"><?php _e( 'Crop ?', 'sis'); ?></th>
258
- </tr>
259
- </thead>
260
- <tboby>
261
- <?php
262
- // Display the sizes in the array
263
- foreach ( get_intermediate_image_sizes() as $s ):
264
-
265
- if ( isset( $_wp_additional_image_sizes[$s]['width'] ) ) // For theme-added sizes
266
- $width = intval( $_wp_additional_image_sizes[$s]['width'] );
267
- else // For default sizes set in options
268
- $width = get_option( "{$s}_size_w" );
269
-
270
- if ( isset( $_wp_additional_image_sizes[$s]['height'] ) ) // For theme-added sizes
271
- $height = intval( $_wp_additional_image_sizes[$s]['height'] );
272
- else // For default sizes set in options
273
- $height = get_option( "{$s}_size_h" );
274
-
275
- if ( isset( $_wp_additional_image_sizes[$s]['crop'] ) ) // For theme-added sizes
276
- $crop = intval( $_wp_additional_image_sizes[$s]['crop'] );
277
- else // For default sizes set in options
278
- $crop = get_option( "{$s}_crop" );
279
- ?>
280
- <tr>
281
- <td>
282
- <input type="checkbox" class="thumbnails" id="<?php echo $s ?>" name="thumbnails[]" checked="checked" value="<?php echo $s ?>" />
283
- </td>
284
-
285
- <td>
286
- <label for="<?php echo $s ?>">
287
- <?php echo $s; ?>
288
- </label>
289
- </td>
290
-
291
- <td>
292
- <label for="<?php echo $s ?>">
293
- <?php echo $width;?> px
294
- </label>
295
- </td>
296
-
297
- <td>
298
- <label for="<?php echo $s ?>">
299
- <?php echo $height; ?> px
300
- </label>
301
- </td>
302
-
303
- <td>
304
- <label for="<?php echo $s ?>">
305
- <?php echo ( $crop == 1 )? 'yes':'no'; ?>
306
- </label>
307
- </td>
308
- </tr>
309
- <?php endforeach;?>
310
- </tbody>
311
- <tfoot>
312
- <th class="manage-column column-date" scope="col"><?php _e( 'Resize ?', 'sis'); ?></th>
313
- <th class="manage-column column-author" scope="col"><?php _e( 'Size name', 'sis'); ?></th>
314
- <th class="manage-column column-author" scope="col"><?php _e( 'Width', 'sis'); ?></th>
315
- <th class="manage-column column-author" scope="col"><?php _e( 'Height', 'sis'); ?></th>
316
- <th class="manage-column column-author" scope="col"><?php _e( 'Crop ?', 'sis'); ?></th>
317
- </tfoot>
318
- </table>
319
- </div>
320
- <div style="display: inline-block;width: 25%;margin-left: 15px;">
321
- <h4><?php _e( 'Select which post type source thumbnails you want to rebuild:', 'sis'); ?></h4>
322
- <table cellspacing="0" class="widefat page fixed">
323
- <thead>
324
- <tr>
325
- <th class="manage-column column-date" scope="col"><?php _e( 'Resize ?', 'sis'); ?></th>
326
- <th class="manage-column column-author" scope="col"><?php _e( 'Post type', 'sis'); ?></th>
327
- </tr>
328
- </thead>
329
- <tbody>
330
- <?php
331
- // Diplay the post types table
332
- foreach ( get_post_types( array( 'public' => true ), 'objects' ) as $ptype ):
333
- ?>
334
- <tr>
335
- <td>
336
- <label for="<?php echo $ptype->name; ?>">
337
- <input type="checkbox" class="post_types" name="post_types[]" checked="checked" id="<?php echo $ptype->name; ?>" value="<?php echo $ptype->name; ?>" />
338
- </label>
339
- </td>
340
- <td>
341
- <label for="<?php echo $ptype->name; ?>">
342
- <em><?php echo $ptype->labels->name; ?></em>
343
- </label>
344
- </td>
345
- </tr>
346
- <?php endforeach;?>
347
- </tbody>
348
- <tfoot>
349
- <tr>
350
- <th class="manage-column column-date" scope="col"><?php _e( 'Resize ?', 'sis'); ?></th>
351
- <th class="manage-column column-author" scope="col"><?php _e( 'Post type', 'sis'); ?></th>
352
- </tr>
353
- </tfoot>
354
- </table>
355
- </div>
356
- </div>
357
-
358
- <div style="clear:both;padding-top:15px">
359
- <div id="regenerate_message"></div>
360
- <div class="progress">
361
- <div class="progress-percent" ></div>
362
- </div>
363
- <div id="thumb"><h4><?php _e( 'Last image:', 'sis'); ?></h4><img id="thumb-img" /></div>
364
- <input type="button" onClick="javascript:regenerate();" class="button" name="ajax_thumbnail_rebuild" id="ajax_thumbnail_rebuild" value="<?php _e( 'Regenerate Thumbnails', 'sis' ) ?>" />
365
- </div>
366
- <?php
367
- }
368
-
369
- /**
370
- * Display the add_image_size for the registered sizes
371
- *
372
- * @access public
373
- * @return void
374
- */
375
- public function ajaxGetSizes() {
376
- global $_wp_additional_image_sizes;
377
-
378
- foreach ( get_intermediate_image_sizes() as $s ):
379
-
380
- // Don't make the original sizes
381
- if( in_array( $s, $this->original ) )
382
- continue;
383
-
384
- if ( isset( $_wp_additional_image_sizes[$s]['width'] ) ) // For theme-added sizes
385
- $width = intval( $_wp_additional_image_sizes[$s]['width'] );
386
- else // For default sizes set in options
387
- $width = get_option( "{$s}_size_w" );
388
-
389
- if ( isset( $_wp_additional_image_sizes[$s]['height'] ) ) // For theme-added sizes
390
- $height = intval( $_wp_additional_image_sizes[$s]['height'] );
391
- else // For default sizes set in options
392
- $height = get_option( "{$s}_size_h" );
393
-
394
- if ( isset( $_wp_additional_image_sizes[$s]['crop'] ) ) // For theme-added sizes
395
- $crop = intval( $_wp_additional_image_sizes[$s]['crop'] );
396
- else // For default sizes set in options
397
- $crop = get_option( "{$s}_crop" );
398
-
399
- $crop = ( $crop == 0 )? 'false' : 'true' ;
400
- ?>
401
- add_image_size( '<?php echo $s; ?>', '<?php echo $width; ?>', '<?php echo $height; ?>', '<?php echo $crop ?>' );<br />
402
- <?php endforeach;
403
-
404
- die();
405
- }
406
-
407
- /**
408
- * Rebuild the image
409
- *
410
- * @access public
411
- * @return void
412
- * @author Nicolas Juen
413
- */
414
- public function ajaxThumbnailRebuildAjax() {
415
- global $wpdb;
416
-
417
- // Get the action
418
- $action = $_POST["do"];
419
-
420
- // Get the thumbnails
421
- $thumbnails = isset( $_POST['thumbnails'] )? $_POST['thumbnails'] : NULL;
422
-
423
- if ( $action == "getlist" ) {
424
- if ( isset( $_POST['post_types'] ) && !empty( $_POST['post_types'] ) ) {
425
-
426
- // Get image medias
427
- $whichmimetype = wp_post_mime_type_where( 'image', $wpdb->posts );
428
-
429
- // Get all parent from post type
430
- $attachments = $wpdb->get_results( "SELECT *
431
- FROM $wpdb->posts
432
- WHERE 1 = 1
433
- AND post_type = 'attachment'
434
- $whichmimetype
435
- AND post_parent IN (
436
- SELECT DISTINCT ID
437
- FROM $wpdb->posts
438
- WHERE post_type IN ('".implode( "', '", $_POST['post_types'] )."')
439
- )" );
440
-
441
- } else {
442
- $attachments =& get_children( array(
443
- 'post_type' => 'attachment',
444
- 'post_mime_type' => 'image',
445
- 'numberposts' => -1,
446
- 'post_status' => null,
447
- 'post_parent' => null, // any parent
448
- 'output' => 'object',
449
- ) );
450
- }
451
-
452
- // Get the attachments
453
- foreach ( $attachments as $attachment ) {
454
- $res[] = array('id' => $attachment->ID, 'title' => $attachment->post_title);
455
- }
456
- // Return the Id's and Title of medias
457
- die( json_encode( $res ) );
458
- } else if ( $action == "regen" ) {
459
- // Get the id
460
- $id = $_POST["id"];
461
-
462
- // Check Id
463
- if( (int)$id == 0 ) {
464
- die( Null );
465
- }
466
-
467
- // Get the path
468
- $fullsizepath = get_attached_file( $id );
469
-
470
- // Regen the attachment
471
- if ( FALSE !== $fullsizepath && @file_exists( $fullsizepath ) ) {
472
- set_time_limit( 30 );
473
- wp_update_attachment_metadata( $id, $this->wp_generate_attachment_metadata_custom( $id, $fullsizepath, $thumbnails ) );
474
- }
475
-
476
- // Display the attachment url for feedback
477
- die( wp_get_attachment_thumb_url( $id ) );
478
- }
479
- }
480
-
481
- /**
482
- * Generate post thumbnail attachment meta data.
483
- *
484
- * @since 2.1.0
485
- *
486
- * @param int $attachment_id Attachment Id to process.
487
- * @param string $file Filepath of the Attached image.
488
- * @return mixed Metadata for attachment.
489
- */
490
- public function wp_generate_attachment_metadata_custom( $attachment_id, $file, $thumbnails = NULL ) {
491
- $attachment = get_post( $attachment_id );
492
-
493
- $metadata = array();
494
- if ( preg_match('!^image/!', get_post_mime_type( $attachment )) && file_is_displayable_image($file) ) {
495
- $imagesize = getimagesize( $file );
496
- $metadata['width'] = $imagesize[0];
497
- $metadata['height'] = $imagesize[1];
498
- list($uwidth, $uheight) = wp_constrain_dimensions($metadata['width'], $metadata['height'], 128, 96);
499
- $metadata['hwstring_small'] = "height='$uheight' width='$uwidth'";
500
-
501
- // Make the file path relative to the upload dir
502
- $metadata['file'] = _wp_relative_upload_path($file);
503
-
504
- // make thumbnails and other intermediate sizes
505
- global $_wp_additional_image_sizes;
506
-
507
- foreach ( get_intermediate_image_sizes() as $s ) {
508
- $sizes[$s] = array( 'width' => '', 'height' => '', 'crop' => FALSE );
509
- if ( isset( $_wp_additional_image_sizes[$s]['width'] ) )
510
- $sizes[$s]['width'] = intval( $_wp_additional_image_sizes[$s]['width'] ); // For theme-added sizes
511
- else
512
- $sizes[$s]['width'] = get_option( "{$s}_size_w" ); // For default sizes set in options
513
- if ( isset( $_wp_additional_image_sizes[$s]['height'] ) )
514
- $sizes[$s]['height'] = intval( $_wp_additional_image_sizes[$s]['height'] ); // For theme-added sizes
515
- else
516
- $sizes[$s]['height'] = get_option( "{$s}_size_h" ); // For default sizes set in options
517
- if ( isset( $_wp_additional_image_sizes[$s]['crop'] ) )
518
- $sizes[$s]['crop'] = intval( $_wp_additional_image_sizes[$s]['crop'] ); // For theme-added sizes
519
- else
520
- $sizes[$s]['crop'] = get_option( "{$s}_crop" ); // For default sizes set in options
521
- }
522
-
523
- $sizes = apply_filters( 'intermediate_image_sizes_advanced', $sizes );
524
-
525
- foreach ($sizes as $size => $size_data ) {
526
- if( isset( $thumbnails ) )
527
- if( !in_array( $size, $thumbnails ) )
528
- continue;
529
-
530
- $resized = image_make_intermediate_size( $file, $size_data['width'], $size_data['height'], $size_data['crop'] );
531
-
532
- if ( $resized )
533
- $metadata['sizes'][$size] = $resized;
534
- }
535
-
536
- // fetch additional metadata from exif/iptc
537
- $image_meta = wp_read_image_metadata( $file );
538
- if ( $image_meta )
539
- $metadata['image_meta'] = $image_meta;
540
-
541
- }
542
-
543
- return apply_filters( 'wp_generate_attachment_metadata', $metadata, $attachment_id );
544
- }
545
-
546
- /**
547
- * Add the custom sizes to the image sizes in article edition
548
- *
549
- * @access public
550
- * @param array $form_fields
551
- * @param object $post
552
- * @return void
553
- * @author Nicolas Juen
554
- * @author Additional Image Sizes (zui)
555
- */
556
- public function sizesInForm( $form_fields, $post ) {
557
- // Protect from being view in Media editor where there are no sizes
558
- if ( isset($form_fields['image-size']) ) {
559
- $out = NULL;
560
- $size_names = array();
561
- $sizes_custom = get_option( 'custom_image_sizes' );
562
- if (is_array($sizes_custom)) {
563
- foreach($sizes_custom as $key => $value) {
564
- $size_names[$key] = $key;
565
- }
566
- }
567
- foreach ( $size_names as $size => $label ) {
568
- $downsize = image_downsize($post->ID, $size);
569
-
570
- // is this size selectable?
571
- $enabled = ( $downsize[3] || 'full' == $size );
572
- $css_id = "image-size-{$size}-{$post->ID}";
573
-
574
- // We must do a clumsy search of the existing html to determine is something has been checked yet
575
- if ( FALSE === strpos('checked="checked"', $form_fields['image-size']['html']) ) {
576
-
577
- if ( empty($check) )
578
- $check = get_user_setting('imgsize'); // See if they checked a custom size last time
579
-
580
- $checked = '';
581
-
582
- // if this size is the default but that's not available, don't select it
583
- if ( $size == $check || str_replace(" ", "", $size) == $check ) {
584
- if ( $enabled )
585
- $checked = " checked='checked'";
586
- else
587
- $check = '';
588
- } elseif ( !$check && $enabled && 'thumbnail' != $size ) {
589
- // if $check is not enabled, default to the first available size that's bigger than a thumbnail
590
- $check = $size;
591
- $checked = " checked='checked'";
592
- }
593
- }
594
- $html = "<div class='image-size-item' style='min-height: 50px; margin-top: 18px;'><input type='radio' " . disabled( $enabled, false, false ) . "name='attachments[$post->ID][image-size]' id='{$css_id}' value='{$size}'$checked />";
595
-
596
- $html .= "<label for='{$css_id}'>$label</label>";
597
- // only show the dimensions if that choice is available
598
- if ( $enabled )
599
- $html .= " <label for='{$css_id}' class='help'>" . sprintf( "(%d&nbsp;&times;&nbsp;%d)", $downsize[1], $downsize[2] ). "</label>";
600
-
601
- $html .= '</div>';
602
-
603
- $out .= $html;
604
- }
605
- $form_fields['image-size']['html'] .= $out;
606
- } // End protect from Media editor
607
-
608
- return $form_fields;
609
- }
610
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
611
  ?>
1
+ <?php
2
+ Class SISAdmin {
3
+
4
+ // Original sizes
5
+ public $original = array( 'thumbnail', 'medium', 'large' );
6
+
7
+ public function __construct(){
8
+ // Init
9
+ add_action ( 'admin_menu', array( &$this, 'init' ) );
10
+ add_action ( 'admin_enqueue_scripts', array( &$this, 'registerScripts' ), 11 );
11
+
12
+ // Add ajax action
13
+ add_action('wp_ajax_ajax_thumbnail_rebuild', array( &$this, 'ajaxThumbnailRebuildAjax' ) );
14
+ add_action('wp_ajax_get_sizes', array( &$this, 'ajaxGetSizes' ) );
15
+ add_action('wp_ajax_add_size', array( &$this, 'ajaxAddSize' ) );
16
+ add_action('wp_ajax_remove_size', array( &$this, 'ajaxRemoveSize' ) );
17
+
18
+ // Add image sizes in the form
19
+ add_filter( 'attachment_fields_to_edit', array( &$this, 'sizesInForm' ), 11, 2 ); // Add our sizes to media forms
20
+
21
+ // Add link in plugins list
22
+ add_filter('plugin_action_links', array( &$this,'addSettingsLink'), 10, 2 );
23
+ }
24
+
25
+ /**
26
+ * Register javascripts and css.
27
+ *
28
+ * @access public
29
+ * @return void
30
+ * @author Nicolas Juen
31
+ */
32
+ public function registerScripts($hook_suffix = '' ) {
33
+ if( isset( $hook_suffix ) && $hook_suffix == 'options-media.php' ) {
34
+ // Add javascript
35
+ wp_enqueue_script( 'sis-jquery-ui-sis', SIS_URL.'js/jquery-ui-1.8.12.custom.min.js', array('jquery'), '1.8.12' );
36
+ wp_enqueue_script( 'sis_js', SIS_URL.'js/sis.min.js', array('jquery','sis-jquery-ui-sis'), SIS_VERSION );
37
+
38
+ // Add javascript translation
39
+ wp_localize_script( 'sis_js', 'sis', $this->localizeVars() );
40
+
41
+ // Add CSS
42
+ wp_enqueue_style( 'jquery-ui-sis', SIS_URL.'css/Aristo/jquery-ui-1.8.7.custom.css', array(), '1.8.7' );
43
+ wp_enqueue_style( 'sis_css', SIS_URL.'css/sis-style.css', array(), SIS_VERSION );
44
+ }
45
+ }
46
+
47
+ /**
48
+ * Localize the var for javascript
49
+ *
50
+ * @access public
51
+ * @return void
52
+ * @author Nicolas Juen
53
+ */
54
+ public function localizeVars() {
55
+ return array(
56
+ 'ajaxUrl' => admin_url( '/admin-ajax.php' ),
57
+ 'reading' => __( 'Reading attachments...', 'sis' ),
58
+ 'maximumWidth' => __( 'Maximum width', 'sis' ),
59
+ 'maximumHeight' => __( 'Maximum height', 'sis' ),
60
+ 'crop' => __( 'Crop ?', 'sis' ),
61
+ 'of' => __( ' of ', 'sis' ),
62
+ 'deleteImage' => __( 'Delete', 'sis' ),
63
+ 'noMedia' => __( 'No media in your site to regenerate !', 'sis' ),
64
+ 'regenerating' => __( 'Regenerating ', 'sis'),
65
+ 'validate' => __( 'Validate image size name', 'sis' ),
66
+ 'done' => __( 'Done.', 'sis' ),
67
+ 'size' => __( 'Size', 'sis' ),
68
+ 'notOriginal' => __( 'Don\'t use the basic Wordpress thumbnail size name, use the form above to edit them', 'sis' ),
69
+ 'alreadyPresent' => __( 'This size is already registered, edit it instead of recreating it.', 'sis' ),
70
+ 'confirmDelete' => __( 'Do you really want to delete these size ?', 'sis' ),
71
+ 'update' => __( 'Update', 'sis' ),
72
+ 'ajaxErrorHandler' => __( 'Error requesting page', 'sis' ),
73
+ 'messageRegenerated' => __( 'images have been regenerated !', 'sis' ),
74
+ 'validateButton' => __( 'Validate', 'sis' ),
75
+ );
76
+ }
77
+
78
+ /**
79
+ * Add a link to the setting option page
80
+ *
81
+ * @access public
82
+ * @param array $links
83
+ * @param string $file
84
+ * @return void
85
+ * @author Nicolas Juen
86
+ */
87
+ public function addSettingsLink( $links, $file ) {
88
+
89
+ if( $file != 'simple-image-sizes/simple_image_sizes.php' )
90
+ return $links;
91
+
92
+ $settings_link = '<a href="'.admin_url('options-media.php').'"> '.__( 'Settings', 'sis' ).' </a>';
93
+ array_unshift($links, $settings_link);
94
+
95
+ return $links;
96
+ }
97
+
98
+ /**
99
+ * Init for the option page
100
+ *
101
+ * @access public
102
+ * @return void
103
+ * @author Nicolas Juen
104
+ */
105
+ function init() {
106
+
107
+ // Check if admin
108
+ if( !is_admin() )
109
+ return false;
110
+
111
+ // Get the image sizes
112
+ global $_wp_additional_image_sizes;
113
+
114
+ // Get the sizes and add the settings
115
+ foreach ( get_intermediate_image_sizes() as $s ) {
116
+
117
+ // Don't make the original sizes
118
+ if( in_array( $s, $this->original ) )
119
+ continue;
120
+
121
+ // Set width
122
+ if ( isset( $_wp_additional_image_sizes[$s]['width'] ) ) // For theme-added sizes
123
+ $width = intval( $_wp_additional_image_sizes[$s]['width'] );
124
+ else // For default sizes set in options
125
+ $width = get_option( "{$s}_size_w" );
126
+
127
+ // Set height
128
+ if ( isset( $_wp_additional_image_sizes[$s]['height'] ) ) // For theme-added sizes
129
+ $height = intval( $_wp_additional_image_sizes[$s]['height'] );
130
+ else // For default sizes set in options
131
+ $height = get_option( "{$s}_size_h" );
132
+
133
+ //Set crop
134
+ if ( isset( $_wp_additional_image_sizes[$s]['crop'] ) ) // For theme-added sizes
135
+ $crop = intval( $_wp_additional_image_sizes[$s]['crop'] );
136
+ else // For default sizes set in options
137
+ $crop = get_option( "{$s}_crop" );
138
+
139
+ // Add the setting field for this size
140
+ add_settings_field( 'image_size_'.$s.'', __( 'Size ', 'sis' ).$s, array( &$this, 'imageSizes' ), 'media' , 'default', array( 'name' => $s , 'width' => $width , 'height' => $height ) );
141
+
142
+ }
143
+
144
+ // Register the setting for media option page
145
+ register_setting( 'media', SIS_OPTION );
146
+
147
+ // Add the button
148
+ add_settings_field( 'add_size_button', __( 'Add a new size', 'sis' ), array( &$this, 'addSizeButton' ), 'media' );
149
+
150
+ // Add legend
151
+ add_settings_field( 'add_legend', __( 'Legend of the sizes', 'sis' ), array( &$this, 'addLegend' ), 'media' );
152
+
153
+ // Add php button
154
+ add_settings_field( 'get_php_button', __( 'Get php for theme', 'sis' ), array( &$this, 'getPhpButton' ), 'media' );
155
+
156
+ // Add section for the thumbnail regeneration
157
+ add_settings_section( 'thumbnail_regenerate', __( 'Thumbnail regeneration', 'sis' ), array( &$this, 'thumbnailRegenerate' ), 'media' );
158
+ }
159
+
160
+ /**
161
+ * Display the row of the image size
162
+ *
163
+ * @access public
164
+ * @param mixed $args
165
+ * @return void
166
+ * @author Nicolas Juen
167
+ */
168
+ public function imageSizes( $args ) {
169
+ // Get the options
170
+ $sizes = (array)get_option( SIS_OPTION );
171
+
172
+ $height = isset( $sizes[$args['name']]['h'] )? $sizes[$args['name']]['h'] : $args['height'] ;
173
+ $width = isset( $sizes[$args['name']]['w'] )? $sizes[$args['name']]['w'] : $args['width'] ;
174
+ $crop = isset( $sizes[$args['name']]['c'] ) && !empty( $sizes[$args['name']]['c'] )? '1' : '0' ;
175
+ $custom = ( isset( $sizes[$args['name']]['custom'] ) && !empty( $sizes[$args['name']]['custom'] ) )? '1' : '0' ;
176
+ ?>
177
+ <input type="hidden" value="<?php echo $args['name']; ?>" name="image_name" />
178
+ <?php if( $custom ): ?>
179
+ <span class="custom_size"> <?php _e( 'Custom size', 'sis'); ?> : </span>
180
+ <input name="<?php echo 'custom_image_sizes['.$args['name'].'][custom]' ?>" type="hidden" id="<?php echo 'custom_image_sizes['.$args['name'].'][custom]' ?>" value="1" />
181
+ <?php else: ?>
182
+ <span class="theme_size"> <?php _e( 'Theme size', 'sis'); ?> : </span>
183
+ <input name="<?php echo 'custom_image_sizes['.$args['name'].'][theme]' ?>" type="hidden" id="<?php echo 'custom_image_sizes['.$args['name'].'][theme]' ?>" value="1" />
184
+ <?php endif; ?>
185
+ <label for="<?php echo 'custom_image_sizes['.$args['name'].'][w]' ?>">
186
+ <?php _e( 'Maximum width', 'sis'); ?>
187
+ <input name="<?php echo 'custom_image_sizes['.$args['name'].'][w]' ?>" class='w' type="number" step='1' min='0' id="<?php echo 'custom_image_sizes['.$args['name'].'][w]' ?>" value="<?php echo $width ?>" />
188
+ </label>
189
+
190
+ <label for="<?php echo 'custom_image_sizes['.$args['name'].'][h]' ?>">
191
+ <?php _e( 'Maximum height', 'sis'); ?>
192
+ <input name="<?php echo 'custom_image_sizes['.$args['name'].'][h]' ?>" class='h' type="number" step='1' min='0' id="<?php echo 'custom_image_sizes['.$args['name'].'][h]' ?>" value="<?php echo $height ?>" />
193
+ </label>
194
+
195
+ <div class="crop">
196
+ <input type='checkbox' id="<?php echo 'custom_image_sizes['.$args['name'].'][c]' ?>" <?php checked( $crop, 1 ) ?> class="c" name="<?php echo 'custom_image_sizes['.$args['name'].'][c]' ?>" value="1" />
197
+ <label for="<?php echo 'custom_image_sizes['.$args['name'].'][c]' ?>"><?php _e( 'Crop ?', 'sis'); ?></label>
198
+ </div>
199
+ <div class="delete_size"><?php _e( 'Delete', 'sis'); ?></div>
200
+ <div class="add_size validate_size"><?php _e( 'Update', 'sis'); ?></div>
201
+ <?php }
202
+
203
+ /**
204
+ * Add the button to add a size
205
+ *
206
+ * @access public
207
+ * @return void
208
+ * @author Nicolas Juen
209
+ */
210
+ public function addSizeButton() { ?>
211
+ <input type="button" class="button-secondary action" id="add_size" value="<?php _e( 'Add a new size of thumbnail', 'sis'); ?>" />
212
+ <?php
213
+ }
214
+
215
+ /**
216
+ * Add the button to get the php for th sizes
217
+ *
218
+ * @access public
219
+ * @return void
220
+ * @author Nicolas Juen
221
+ */
222
+ public function getPhpButton() { ?>
223
+ <input type="button" class="button-secondary action" id="get_php" value="<?php _e( 'Get the PHP for the theme', 'sis'); ?>" />
224
+ <p> <?php _e( 'Copy and paste the code below into your Wordpress theme function file if you wanted to save them and deactivate the plugin.', 'sis'); ?> </p>
225
+ <code></code>
226
+ <?php
227
+ }
228
+
229
+ /**
230
+ * Add the legend fo the colors
231
+ *
232
+ * @access public
233
+ * @return void
234
+ * @author Nicolas Juen
235
+ */
236
+ public function addLegend() { ?>
237
+ <?php _e('The images created on your theme are <span style="color:#F2A13A">orange</span> and your custom size are <span style="color:#89D76A"> green </span>.', 'sis'); ?>
238
+ <?php
239
+ }
240
+
241
+ /**
242
+ * Display the Table of sizes and post types for regenerating
243
+ *
244
+ * @access public
245
+ * @return void
246
+ * @author Nicolas Juen
247
+ */
248
+ public function thumbnailRegenerate() {
249
+ // Get the sizes
250
+ global $_wp_additional_image_sizes;
251
+ $class= "alternate";
252
+ ?>
253
+ <div id="sis-regen">
254
+ <div class="wrapper" style="">
255
+ <h4> <?php _e( 'Select which thumbnails you want to rebuild:', 'sis'); ?> </h4>
256
+ <table cellspacing="0" class="widefat page fixed">
257
+ <thead>
258
+ <tr>
259
+ <th class="manage-column column-date" scope="col"><?php _e( 'Resize ?', 'sis'); ?></th>
260
+ <th class="manage-column column-author" scope="col"><?php _e( 'Size name', 'sis'); ?></th>
261
+ <th class="manage-column column-author" scope="col"><?php _e( 'Width', 'sis'); ?></th>
262
+ <th class="manage-column column-author" scope="col"><?php _e( 'Height', 'sis'); ?></th>
263
+ <th class="manage-column column-author" scope="col"><?php _e( 'Crop ?', 'sis'); ?></th>
264
+ </tr>
265
+ </thead>
266
+ <tbody>
267
+ <?php
268
+ // Display the sizes in the array
269
+ foreach ( get_intermediate_image_sizes() as $s ):
270
+ $class = empty($class)? 'alternate' : '' ;
271
+
272
+ if ( isset( $_wp_additional_image_sizes[$s]['width'] ) ) // For theme-added sizes
273
+ $width = intval( $_wp_additional_image_sizes[$s]['width'] );
274
+ else // For default sizes set in options
275
+ $width = get_option( "{$s}_size_w" );
276
+
277
+ if ( isset( $_wp_additional_image_sizes[$s]['height'] ) ) // For theme-added sizes
278
+ $height = intval( $_wp_additional_image_sizes[$s]['height'] );
279
+ else // For default sizes set in options
280
+ $height = get_option( "{$s}_size_h" );
281
+
282
+ if ( isset( $_wp_additional_image_sizes[$s]['crop'] ) ) // For theme-added sizes
283
+ $crop = intval( $_wp_additional_image_sizes[$s]['crop'] );
284
+ else // For default sizes set in options
285
+ $crop = get_option( "{$s}_crop" );
286
+ ?>
287
+ <tr class="<?php echo $class; ?>">
288
+ <td>
289
+ <input type="checkbox" class="thumbnails" id="<?php echo $s ?>" name="thumbnails[]" checked="checked" value="<?php echo $s ?>" />
290
+ </td>
291
+
292
+ <td>
293
+ <label for="<?php echo $s ?>">
294
+ <?php echo $s; ?>
295
+ </label>
296
+ </td>
297
+
298
+ <td>
299
+ <label for="<?php echo $s ?>">
300
+ <?php echo $width;?> px
301
+ </label>
302
+ </td>
303
+
304
+ <td>
305
+ <label for="<?php echo $s ?>">
306
+ <?php echo $height; ?> px
307
+ </label>
308
+ </td>
309
+
310
+ <td>
311
+ <label for="<?php echo $s ?>">
312
+ <?php echo ( $crop == 1 )? __( 'yes', 'no' ):__( 'no', 'sis' ); ?>
313
+ </label>
314
+ </td>
315
+ </tr>
316
+ <?php endforeach;?>
317
+ </tbody>
318
+ <tfoot>
319
+ <th class="manage-column column-date" scope="col"><?php _e( 'Resize ?', 'sis'); ?></th>
320
+ <th class="manage-column column-author" scope="col"><?php _e( 'Size name', 'sis'); ?></th>
321
+ <th class="manage-column column-author" scope="col"><?php _e( 'Width', 'sis'); ?></th>
322
+ <th class="manage-column column-author" scope="col"><?php _e( 'Height', 'sis'); ?></th>
323
+ <th class="manage-column column-author" scope="col"><?php _e( 'Crop ?', 'sis'); ?></th>
324
+ </tfoot>
325
+ </table>
326
+ </div>
327
+ <div style="display: inline-block;width: 25%;margin-left: 15px;">
328
+ <h4><?php _e( 'Select which post type source thumbnails you want to rebuild:', 'sis'); ?></h4>
329
+ <table cellspacing="0" class="widefat page fixed">
330
+ <thead>
331
+ <tr>
332
+ <th class="manage-column column-date" scope="col"><?php _e( 'Resize ?', 'sis'); ?></th>
333
+ <th class="manage-column column-author" scope="col"><?php _e( 'Post type', 'sis'); ?></th>
334
+ </tr>
335
+ </thead>
336
+ <tbody>
337
+ <?php
338
+ // Diplay the post types table
339
+ foreach ( get_post_types( array( 'public' => true ), 'objects' ) as $ptype ):
340
+ $class = empty($class)? 'alternate' : '' ;
341
+ ?>
342
+ <tr class="<?php echo $class; ?>">
343
+ <td>
344
+ <label for="<?php echo $ptype->name; ?>">
345
+ <input type="checkbox" class="post_types" name="post_types[]" checked="checked" id="<?php echo $ptype->name; ?>" value="<?php echo $ptype->name; ?>" />
346
+ </label>
347
+ </td>
348
+ <td>
349
+ <label for="<?php echo $ptype->name; ?>">
350
+ <em><?php echo $ptype->labels->name; ?></em>
351
+ </label>
352
+ </td>
353
+ </tr>
354
+ <?php endforeach;?>
355
+ </tbody>
356
+ <tfoot>
357
+ <tr>
358
+ <th class="manage-column column-date" scope="col"><?php _e( 'Resize ?', 'sis'); ?></th>
359
+ <th class="manage-column column-author" scope="col"><?php _e( 'Post type', 'sis'); ?></th>
360
+ </tr>
361
+ </tfoot>
362
+ </table>
363
+ </div>
364
+ </div>
365
+
366
+ <div style="clear:both;padding-top:15px">
367
+ <div id="regenerate_message"></div>
368
+ <div class="progress">
369
+ <div class=" progress-percent ui-widget">
370
+ <div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;">
371
+ <p>
372
+ <span class="ui-icon ui-icon-info" style="float: left; margin-right: .7em;"></span>
373
+ <span class="text">0%</span>
374
+ </p>
375
+ </div>
376
+ </div>
377
+ </div>
378
+ <div id="thumb"><h4><?php _e( 'Last image:', 'sis'); ?></h4><img id="thumb-img" /></div>
379
+ <input type="button" class="button" name="ajax_thumbnail_rebuild" id="ajax_thumbnail_rebuild" value="<?php _e( 'Regenerate Thumbnails', 'sis' ) ?>" />
380
+ </div>
381
+ <?php
382
+ }
383
+
384
+ /**
385
+ * Add a size by Ajax
386
+ *
387
+ * @access public
388
+ * @return void
389
+ * @author Nicolas Juen
390
+ */
391
+ public function ajaxAddSize() {
392
+
393
+ // Get old options
394
+ $sizes = (array)get_option( SIS_OPTION );
395
+
396
+ // Check entries
397
+ $name = isset( $_POST['name'] ) ? apply_filters( 'sanitize_title', $_POST['name'] ) : '' ;
398
+ $height = !isset( $_POST['height'] )? 0 : (int)$_POST['height'];
399
+ $width = !isset( $_POST['width'] )? 0 : (int)$_POST['width'];
400
+ $crop = !isset( $_POST['crop'] ) || ( $_POST['crop'] != 'true' && $_POST['crop'] != 'false' )? true : $_POST['crop'];
401
+
402
+ $values = array( 'custom' => 1, 'w' => $width , 'h' => $height, 'c' => $crop );
403
+
404
+ // If the size have not changed return 2
405
+ if( isset( $sizes[$name] ) && $sizes[$name] === $values ) {
406
+ echo 2;
407
+ die();
408
+ }
409
+
410
+ // Put the new values
411
+ $sizes[$name] = $values;
412
+
413
+ // display update result
414
+ echo (int)update_option( 'custom_image_sizes', $sizes );
415
+ die();
416
+ }
417
+
418
+ /**
419
+ * Remove a size by Ajax
420
+ *
421
+ * @access public
422
+ * @return void
423
+ * @author Nicolas Juen
424
+ */
425
+ public function ajaxRemoveSize() {
426
+ // Get old options
427
+ $sizes = (array)get_option( SIS_OPTION );
428
+
429
+ // Remove the size
430
+ unset( $sizes[apply_filters( 'sanitize_title', $_POST['name'] )] );
431
+ unset( $sizes[0] );
432
+
433
+ // Display the results
434
+ echo (int)update_option( 'custom_image_sizes', $sizes );
435
+ die();
436
+ }
437
+
438
+ /**
439
+ * Display the add_image_size for the registered sizes
440
+ *
441
+ * @access public
442
+ * @return void
443
+ */
444
+ public function ajaxGetSizes() {
445
+ global $_wp_additional_image_sizes;
446
+
447
+ foreach ( get_intermediate_image_sizes() as $s ):
448
+
449
+ // Don't make the original sizes
450
+ if( in_array( $s, $this->original ) )
451
+ continue;
452
+
453
+ if ( isset( $_wp_additional_image_sizes[$s]['width'] ) ) // For theme-added sizes
454
+ $width = intval( $_wp_additional_image_sizes[$s]['width'] );
455
+ else // For default sizes set in options
456
+ $width = get_option( "{$s}_size_w" );
457
+
458
+ if ( isset( $_wp_additional_image_sizes[$s]['height'] ) ) // For theme-added sizes
459
+ $height = intval( $_wp_additional_image_sizes[$s]['height'] );
460
+ else // For default sizes set in options
461
+ $height = get_option( "{$s}_size_h" );
462
+
463
+ if ( isset( $_wp_additional_image_sizes[$s]['crop'] ) ) // For theme-added sizes
464
+ $crop = intval( $_wp_additional_image_sizes[$s]['crop'] );
465
+ else // For default sizes set in options
466
+ $crop = get_option( "{$s}_crop" );
467
+
468
+ $crop = ( $crop == 0 )? 'false' : 'true' ;
469
+ ?>
470
+ add_image_size( '<?php echo $s; ?>', '<?php echo $width; ?>', '<?php echo $height; ?>', <?php echo $crop ?> );<br />
471
+ <?php endforeach;
472
+
473
+ die();
474
+ }
475
+
476
+ /**
477
+ * Rebuild the image
478
+ *
479
+ * @access public
480
+ * @return void
481
+ * @author Nicolas Juen
482
+ */
483
+ public function ajaxThumbnailRebuildAjax() {
484
+ global $wpdb;
485
+
486
+ // Get the action
487
+ $action = $_POST["do"];
488
+
489
+ // Get the thumbnails
490
+ $thumbnails = isset( $_POST['thumbnails'] )? $_POST['thumbnails'] : NULL;
491
+
492
+ if ( $action == "getlist" ) {
493
+ if ( isset( $_POST['post_types'] ) && !empty( $_POST['post_types'] ) ) {
494
+
495
+ // Get image medias
496
+ $whichmimetype = wp_post_mime_type_where( 'image', $wpdb->posts );
497
+
498
+ // Get all parent from post type
499
+ $attachments = $wpdb->get_results( "SELECT *
500
+ FROM $wpdb->posts
501
+ WHERE 1 = 1
502
+ AND post_type = 'attachment'
503
+ $whichmimetype
504
+ AND post_parent IN (
505
+ SELECT DISTINCT ID
506
+ FROM $wpdb->posts
507
+ WHERE post_type IN ('".implode( "', '", $_POST['post_types'] )."')
508
+ )" );
509
+
510
+ } else {
511
+ $attachments =& get_children( array(
512
+ 'post_type' => 'attachment',
513
+ 'post_mime_type' => 'image',
514
+ 'numberposts' => -1,
515
+ 'post_status' => null,
516
+ 'post_parent' => null, // any parent
517
+ 'output' => 'object',
518
+ ) );
519
+ }
520
+
521
+ // Get the attachments
522
+ foreach ( $attachments as $attachment ) {
523
+ $res[] = array('id' => $attachment->ID, 'title' => $attachment->post_title);
524
+ }
525
+ // Return the Id's and Title of medias
526
+ die( json_encode( $res ) );
527
+ } else if ( $action == "regen" ) {
528
+ // Get the id
529
+ $id = $_POST["id"];
530
+
531
+ // Check Id
532
+ if( (int)$id == 0 ) {
533
+ die( Null );
534
+ }
535
+
536
+ // Get the path
537
+ $fullsizepath = get_attached_file( $id );
538
+
539
+ // Regen the attachment
540
+ if ( FALSE !== $fullsizepath && @file_exists( $fullsizepath ) ) {
541
+ set_time_limit( 30 );
542
+ wp_update_attachment_metadata( $id, $this->wp_generate_attachment_metadata_custom( $id, $fullsizepath, $thumbnails ) );
543
+ }
544
+
545
+ // Display the attachment url for feedback
546
+ die( json_encode( array( array( 'src' => wp_get_attachment_thumb_url( $id ), 'title' => get_the_title( $id ) ) ) ) );
547
+ }
548
+ }
549
+
550
+ /**
551
+ * Generate post thumbnail attachment meta data.
552
+ *
553
+ * @since 2.1.0
554
+ *
555
+ * @param int $attachment_id Attachment Id to process.
556
+ * @param string $file Filepath of the Attached image.
557
+ * @return mixed Metadata for attachment.
558
+ */
559
+ public function wp_generate_attachment_metadata_custom( $attachment_id, $file, $thumbnails = NULL ) {
560
+ $attachment = get_post( $attachment_id );
561
+
562
+ $metadata = array();
563
+ if ( preg_match('!^image/!', get_post_mime_type( $attachment )) && file_is_displayable_image($file) ) {
564
+ $imagesize = getimagesize( $file );
565
+ $metadata['width'] = $imagesize[0];
566
+ $metadata['height'] = $imagesize[1];
567
+ list($uwidth, $uheight) = wp_constrain_dimensions($metadata['width'], $metadata['height'], 128, 96);
568
+ $metadata['hwstring_small'] = "height='$uheight' width='$uwidth'";
569
+
570
+ // Make the file path relative to the upload dir
571
+ $metadata['file'] = _wp_relative_upload_path($file);
572
+
573
+ // make thumbnails and other intermediate sizes
574
+ global $_wp_additional_image_sizes;
575
+
576
+ foreach ( get_intermediate_image_sizes() as $s ) {
577
+ $sizes[$s] = array( 'width' => '', 'height' => '', 'crop' => FALSE );
578
+ if ( isset( $_wp_additional_image_sizes[$s]['width'] ) )
579
+ $sizes[$s]['width'] = intval( $_wp_additional_image_sizes[$s]['width'] ); // For theme-added sizes
580
+ else
581
+ $sizes[$s]['width'] = get_option( "{$s}_size_w" ); // For default sizes set in options
582
+ if ( isset( $_wp_additional_image_sizes[$s]['height'] ) )
583
+ $sizes[$s]['height'] = intval( $_wp_additional_image_sizes[$s]['height'] ); // For theme-added sizes
584
+ else
585
+ $sizes[$s]['height'] = get_option( "{$s}_size_h" ); // For default sizes set in options
586
+ if ( isset( $_wp_additional_image_sizes[$s]['crop'] ) )
587
+ $sizes[$s]['crop'] = intval( $_wp_additional_image_sizes[$s]['crop'] ); // For theme-added sizes
588
+ else
589
+ $sizes[$s]['crop'] = get_option( "{$s}_crop" ); // For default sizes set in options
590
+ }
591
+
592
+ $sizes = apply_filters( 'intermediate_image_sizes_advanced', $sizes );
593
+
594
+ foreach ( $sizes as $size => $size_data ) {
595
+ if( isset( $thumbnails ) )
596
+ if( !in_array( $size, $thumbnails ) )
597
+ continue;
598
+
599
+ $resized = image_make_intermediate_size( $file, $size_data['width'], $size_data['height'], $size_data['crop'] );
600
+
601
+ if ( $resized )
602
+ $metadata['sizes'][$size] = $resized;
603
+ }
604
+
605
+ // fetch additional metadata from exif/iptc
606
+ $image_meta = wp_read_image_metadata( $file );
607
+ if ( $image_meta )
608
+ $metadata['image_meta'] = $image_meta;
609
+
610
+ }
611
+
612
+ return apply_filters( 'wp_generate_attachment_metadata', $metadata, $attachment_id );
613
+ }
614
+
615
+ /**
616
+ * Add the custom sizes to the image sizes in article edition
617
+ *
618
+ * @access public
619
+ * @param array $form_fields
620
+ * @param object $post
621
+ * @return void
622
+ * @author Nicolas Juen
623
+ * @author Additional Image Sizes (zui)
624
+ */
625
+ public function sizesInForm( $form_fields, $post ) {
626
+ // Protect from being view in Media editor where there are no sizes
627
+ if ( isset( $form_fields['image-size'] ) ) {
628
+ $out = NULL;
629
+ $size_names = array();
630
+ $sizes_custom = get_option( 'custom_image_sizes' );
631
+ if ( is_array( $sizes_custom ) ) {
632
+ foreach( $sizes_custom as $key => $value ) {
633
+ $size_names[$key] = $key;
634
+ }
635
+ }
636
+ foreach ( $size_names as $size => $label ) {
637
+ $downsize = image_downsize( $post->ID, $size );
638
+
639
+ // is this size selectable?
640
+ $enabled = ( $downsize[3] || 'full' == $size );
641
+ $css_id = "image-size-{$size}-{$post->ID}";
642
+
643
+ // We must do a clumsy search of the existing html to determine is something has been checked yet
644
+ if ( FALSE === strpos( 'checked="checked"', $form_fields['image-size']['html'] ) ) {
645
+
646
+ if ( empty($check) )
647
+ $check = get_user_setting( 'imgsize' ); // See if they checked a custom size last time
648
+
649
+ $checked = '';
650
+
651
+ // if this size is the default but that's not available, don't select it
652
+ if ( $size == $check || str_replace( " ", "", $size ) == $check ) {
653
+ if ( $enabled )
654
+ $checked = " checked='checked'";
655
+ else
656
+ $check = '';
657
+ } elseif ( !$check && $enabled && 'thumbnail' != $size ) {
658
+ // if $check is not enabled, default to the first available size that's bigger than a thumbnail
659
+ $check = $size;
660
+ $checked = " checked='checked'";
661
+ }
662
+ }
663
+ $html = "<div class='image-size-item' style='min-height: 50px; margin-top: 18px;'><input type='radio' " . disabled( $enabled, false, false ) . "name='attachments[$post->ID][image-size]' id='{$css_id}' value='{$size}'$checked />";
664
+
665
+ $html .= "<label for='{$css_id}'>$label</label>";
666
+ // only show the dimensions if that choice is available
667
+ if ( $enabled )
668
+ $html .= " <label for='{$css_id}' class='help'>" . sprintf( "(%d&nbsp;&times;&nbsp;%d)", $downsize[1], $downsize[2] ). "</label>";
669
+
670
+ $html .= '</div>';
671
+
672
+ $out .= $html;
673
+ }
674
+ $form_fields['image-size']['html'] .= $out;
675
+ } // End protect from Media editor
676
+
677
+ return $form_fields;
678
+ }
679
+ }
680
  ?>
js/{jquery-ui-1.8.10.progressbar.min.js → jquery-ui-1.8.12.custom.min.js} RENAMED
@@ -1,5 +1,5 @@
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.
@@ -7,7 +7,7 @@
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,
@@ -16,7 +16,7 @@ d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c
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.
@@ -31,7 +31,32 @@ this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetNa
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.
@@ -45,5 +70,5 @@ enable:function(){return this._setOption("disabled",false)},disable:function(){r
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).animate({width :c.toFixed(0)+"%"}, 500);this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.10"})})(jQuery);
49
  ;
1
  /*!
2
+ * jQuery UI 1.8.12
3
  *
4
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
  * Dual licensed under the MIT or GPL Version 2 licenses.
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.12",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,
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.12
20
  *
21
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
22
  * Dual licensed under the MIT or GPL Version 2 licenses.
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 Button 1.8.12
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/Button
41
+ *
42
+ * Depends:
43
+ * jquery.ui.core.js
44
+ * jquery.ui.widget.js
45
+ */
46
+ (function(a){var g,i=function(b){a(":ui-button",b.target.form).each(function(){var c=a(this).data("button");setTimeout(function(){c.refresh()},1)})},h=function(b){var c=b.name,d=b.form,f=a([]);if(c)f=d?a(d).find("[name='"+c+"']"):a("[name='"+c+"']",b.ownerDocument).filter(function(){return!this.form});return f};a.widget("ui.button",{options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",
47
+ i);if(typeof this.options.disabled!=="boolean")this.options.disabled=this.element.attr("disabled");this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var b=this,c=this.options,d=this.type==="checkbox"||this.type==="radio",f="ui-state-hover"+(!d?" ui-state-active":"");if(c.label===null)c.label=this.buttonElement.html();if(this.element.is(":disabled"))c.disabled=true;this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",
48
+ function(){if(!c.disabled){a(this).addClass("ui-state-hover");this===g&&a(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){c.disabled||a(this).removeClass(f)}).bind("focus.button",function(){a(this).addClass("ui-state-focus")}).bind("blur.button",function(){a(this).removeClass("ui-state-focus")});d&&this.element.bind("change.button",function(){b.refresh()});if(this.type==="checkbox")this.buttonElement.bind("click.button",function(){if(c.disabled)return false;a(this).toggleClass("ui-state-active");
49
+ b.buttonElement.attr("aria-pressed",b.element[0].checked)});else if(this.type==="radio")this.buttonElement.bind("click.button",function(){if(c.disabled)return false;a(this).addClass("ui-state-active");b.buttonElement.attr("aria-pressed",true);var e=b.element[0];h(e).not(e).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",false)});else{this.buttonElement.bind("mousedown.button",function(){if(c.disabled)return false;a(this).addClass("ui-state-active");
50
+ g=this;a(document).one("mouseup",function(){g=null})}).bind("mouseup.button",function(){if(c.disabled)return false;a(this).removeClass("ui-state-active")}).bind("keydown.button",function(e){if(c.disabled)return false;if(e.keyCode==a.ui.keyCode.SPACE||e.keyCode==a.ui.keyCode.ENTER)a(this).addClass("ui-state-active")}).bind("keyup.button",function(){a(this).removeClass("ui-state-active")});this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===a.ui.keyCode.SPACE&&a(this).click()})}this._setOption("disabled",
51
+ c.disabled)},_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?"input":"button";if(this.type==="checkbox"||this.type==="radio"){var b=this.element.parents().filter(":last"),c="label[for="+this.element.attr("id")+"]";this.buttonElement=b.find(c);if(!this.buttonElement.length){b=b.length?b.siblings():this.element.siblings();this.buttonElement=b.filter(c);if(!this.buttonElement.length)this.buttonElement=b.find(c)}this.element.addClass("ui-helper-hidden-accessible");
52
+ (b=this.element.is(":checked"))&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",b)}else this.buttonElement=this.element},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());
53
+ this.hasTitle||this.buttonElement.removeAttr("title");a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments);if(b==="disabled")c?this.element.attr("disabled",true):this.element.removeAttr("disabled");this._resetButton()},refresh:function(){var b=this.element.is(":disabled");b!==this.options.disabled&&this._setOption("disabled",b);if(this.type==="radio")h(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed",
54
+ true):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",false)});else if(this.type==="checkbox")this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed",true):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",false)},_resetButton:function(){if(this.type==="input")this.options.label&&this.element.val(this.options.label);else{var b=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),
55
+ c=a("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,f=d.primary&&d.secondary,e=[];if(d.primary||d.secondary){if(this.options.text)e.push("ui-button-text-icon"+(f?"s":d.primary?"-primary":"-secondary"));d.primary&&b.prepend("<span class='ui-button-icon-primary ui-icon "+d.primary+"'></span>");d.secondary&&b.append("<span class='ui-button-icon-secondary ui-icon "+d.secondary+"'></span>");if(!this.options.text){e.push(f?"ui-button-icons-only":
56
+ "ui-button-icon-only");this.hasTitle||b.attr("title",c)}}else e.push("ui-button-text-only");b.addClass(e.join(" "))}}});a.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(b,c){b==="disabled"&&this.buttons.button("option",b,c);a.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()},
57
+ destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");a.Widget.prototype.destroy.call(this)}})})(jQuery);
58
+ ;/*
59
+ * jQuery UI Progressbar 1.8.12
60
  *
61
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
62
  * Dual licensed under the MIT or GPL Version 2 licenses.
70
  */
71
  (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");
72
  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*
73
+ 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.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).animate({width :c.toFixed(0)+"%"}, 500);this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.12"})})(jQuery);
74
  ;
js/sis.js CHANGED
@@ -1,158 +1,445 @@
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').closest('tr').children('th').css({
7
- 'color': 'green'
8
- });
9
- jQuery('span.theme_size').closest('tr').children('th').css({
10
- 'color': 'orange'
11
- });
12
- jQuery('#get_php').click(getPhp);
13
- jQuery('#get_php').nextAll('code').hide();
14
-
15
- jQuery('.progress').hide();
16
- });
17
-
18
- function addSize() {
19
- row = '<tr valign="top" class="new_size_' + i + '">';
20
- row += '<th scope="row">';
21
- row += '<input type="text" value="thumbnail-name" id="new_size_' + i + '" />';
22
- row += '</th>';
23
- row += '<td>';
24
- row += '<input type="button" class="button-secondary action add_size_name" id="validate_' + i + '" value="' + sis.validate + '" />';
25
- row += '</td>';
26
- row += '</tr>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
- jQuery(this).parent().parent().before(row);
29
- i++;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  }
31
 
32
- function getPhp() {
33
- jQuery.ajax({
34
- url: sis.ajaxUrl,
35
- type: "POST",
36
- data: "action=get_sizes",
37
- success: function(result) {
38
- jQuery('#get_php').nextAll('code').html('<br />' + result).show().css( { 'display' : 'block' } );
39
- }
40
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  }
42
-
43
- function registerSize() {
44
- name = jQuery(this).closest('tr').children('th').find('input').val();
45
- id = jQuery(this).closest('tr').children('th').find('input').attr('id');
46
 
47
- if( name == 'thumbnail' || name == "medium" || name == "large" ) {
48
- alert( sis.notOriginal );
49
- return false;
50
- }
51
 
52
- output = '<th scope="row">';
53
- output += sis.size + ' ' + name;
54
- output += '</th>';
55
- output += '<td>';
56
- output += '<input name="custom_image_sizes[' + name + '][custom]" type="hidden" id="custom_image_sizes[' + name + '][custom]" value="1" />';
57
- output += '<label for="custom_image_sizes[' + name + '][w]">';
58
- output += sis.maximumWidth + ' <input name="custom_image_sizes[' + name + '][w] " type="text" id="custom_image_sizes[' + name + '][w]" value="" class="small-text" />'
59
- output += '</label>';
60
-
61
- output += '<label for="custom_image_sizes[' + name + '][h]">';
62
- output += sis.maximumHeight + ' <input name="custom_image_sizes[' + name + '][h]" type="text" id="custom_image_sizes[' + name + '][h]" value="" class="small-text" />';
63
- output += '</label>';
64
-
65
- output += '<label class="crop"> '
66
- output += sis.crop + ' <input type="checkbox" name="custom_image_sizes[' + name + '][c]" value="1" /> </label>';
67
-
68
- 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">';
69
- output += sis.deleteImage;
70
- output += '<div class="ui-icon ui-icon-circle-close" style="float: right; top: 2px; position:absolute;left: 0px;">';
71
- output += '</div>';
72
- output += '</label>';
73
- output += '</td>';
74
-
75
- jQuery('#' + id).parent().parent().html(output);
76
-
77
- }
78
-
79
- function deleteSize() {
80
- jQuery(this).parent().parent().remove();
81
- }
82
-
83
- ////////////// Image resizing /////////////
84
- function setMessage(msg) {
85
- jQuery("#regenerate_message").html(msg).addClass('updated').addClass('fade').show();
86
- jQuery(".progress").progressbar();
87
- }
88
-
89
- function regenerate() {
90
- jQuery("#ajax_thumbnail_rebuild").attr("disabled", true);
91
- setMessage("<p>" + sis.reading + "</p>");
92
-
93
- inputs = jQuery('input.thumbnails:checked');
94
- var thumbnails = '';
95
- if (inputs.length != jQuery('input.thumbnails[type=checkbox]').length) {
96
- inputs.each(function() {
97
- thumbnails += '&thumbnails[]=' + jQuery(this).val();
98
- });
99
- }
100
-
101
- inputs = jQuery('input.post_types:checked');
102
- var post_types = '';
103
- if (inputs.length != jQuery('input.post_types[type=checkbox]').length) {
104
- inputs.each(function() {
105
- post_types += '&post_types[]=' + jQuery(this).val();
106
- });
107
- }
108
-
109
- jQuery.ajax({
110
- url: sis.ajaxUrl,
111
- type: "POST",
112
- data: "action=ajax_thumbnail_rebuild&do=getlist" + post_types,
113
- success: function(result) {
114
- var list = eval(result);
115
- var curr = 0;
116
- jQuery('.progress').show();
117
-
118
- function regenItem() {
119
- if (!list) {
120
- jQuery("#ajax_thumbnail_rebuild").removeAttr("disabled");
121
- jQuery(".progress, #thumb").hide();
122
-
123
- setMessage(sis.noMedia);
124
- return false;
125
- }
126
- percent = (curr / list.length) * 100;
127
- jQuery(".progress").progressbar("value", percent);
128
- jQuery(".progress-percent").html(Math.round(percent) + "%").animate( { left: Math.round( percent )-2.5 + "%" }, 500 );
129
- if (curr >= list.length) {
130
- jQuery("#ajax_thumbnail_rebuild").removeAttr("disabled");
131
- jQuery(".progress, #thumb").hide();
132
-
133
- setMessage(sis.done);
134
- return;
135
- }
136
- setMessage(sis.regenerating + (curr + 1) + sis.of + list.length + " (" + list[curr].title + ")...");
137
-
138
- jQuery.ajax({
139
- url: sis.ajaxUrl,
140
- type: "POST",
141
- data: "action=ajax_thumbnail_rebuild&do=regen&id=" + list[curr].id + thumbnails,
142
- success: function(result) {
143
- jQuery("#thumb").show();
144
- jQuery("#thumb-img").attr("src", result);
145
-
146
- curr = curr + 1;
147
- regenItem();
148
- }
149
- });
150
- }
151
-
152
- regenItem();
153
- },
154
- error: function(request, status, error) {
155
- setMessage("Error " + request.status);
156
- }
157
  });
158
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  var i = 0;
2
+ // Functions for the regenerating of images
3
+ var regenerate = {
4
+ post_types : '',
5
+ thumbnails : '',
6
+ list : '',
7
+ cur : 0,
8
+ percent : '' ,
9
+ getThumbnails : function() {
10
+ var self = this;
11
+ var inputs = jQuery('input.thumbnails:checked');
12
+
13
+ // Get the checked thumbnails inputs
14
+ if (inputs.length != jQuery('input.thumbnails[type="checkbox"]').length) {
15
+ inputs.each(function(i) {
16
+ self.thumbnails += '&thumbnails[]=' + jQuery(this).val();
17
+ });
18
+ }
19
+ },
20
+ getPostTypes : function() {
21
+ var self = this;
22
+ var inputs = jQuery('input.post_types:checked');
23
+
24
+ // Get the checked post Types inputs
25
+ if (inputs.length != jQuery('input.post_types[type="checkbox"]').length) {
26
+ inputs.each(function() {
27
+ self.post_types += '&post_types[]=' + jQuery(this).val();
28
+ });
29
+ }
30
+ },
31
+ setMessage : function( msg ) {
32
+ // Display the message
33
+ jQuery("#regenerate_message").html(msg).addClass('updated').addClass('fade').show();
34
+ this.refreshProgressBar();
35
+ },
36
+ refreshProgressBar: function(){
37
+ // Refresh the progress Bar
38
+ jQuery(".progress").progressbar();
39
+ },
40
+ startRegenerating : function( ) {
41
+ var self = this;
42
+
43
+ // Start ajax
44
+ jQuery.ajax({
45
+ url: sis.ajaxUrl,
46
+ type: "POST",
47
+ data: "action=ajax_thumbnail_rebuild&do=getlist" + self.post_types,
48
+ beforeSend: function(){
49
+
50
+ // Disable the button
51
+ jQuery("#ajax_thumbnail_rebuild").attr("disabled", true);
52
+
53
+ // Display the message
54
+ self.setMessage("<p>" + sis.reading + "</p>");
55
+
56
+ // Get the humbnails and post types
57
+ self.getThumbnails();
58
+ self.getPostTypes();
59
+ },
60
+ success: function(r) {
61
+ // Eval the response
62
+ self.list = eval( r );
63
+
64
+ // Set the current to 0
65
+ self.curr = 0;
66
+
67
+ // Display the progress Bar
68
+ jQuery('.progress').show();
69
+
70
+ // Start Regenerating
71
+ self.regenItem();
72
+ }
73
+ });
74
+ },
75
+ regenItem : function( ) {
76
+ var self = this;
77
+
78
+ // If the list is empty display the message of emptyness and reinitialize the form
79
+ if (!this.list) {
80
+ this.reInit();
81
+ this.setMessage(sis.noMedia);
82
+ return false;
83
+ }
84
+
85
+ // If we have finished the regeneration display message and init again
86
+ if (this.curr >= this.list.length) {
87
+ this.reInit();
88
+ this.setMessage( sis.done+this.curr+' '+sis.messageRegenerated);
89
+ return;
90
+ }
91
+
92
+ // Set the message of current image regenerating
93
+ this.setMessage(sis.regenerating + (this.curr + 1) + sis.of + this.list.length + " (" + this.list[this.curr].title + ")...");
94
 
95
+ jQuery.ajax({
96
+ url: sis.ajaxUrl,
97
+ type: "POST",
98
+ data: "action=ajax_thumbnail_rebuild&do=regen&id=" + this.list[this.curr].id + this.thumbnails,
99
+ beforeSend : function() {
100
+ // Calculate the percentage of regeneration
101
+ self.percent = ( self.curr / self.list.length ) * 100;
102
+
103
+ // Change the progression
104
+ jQuery(".progress").progressbar("value", self.percent);
105
+
106
+ // Change the text of progression
107
+ jQuery(".progress-percent span.text").html(Math.round(self.percent) + "%").closest( '.progress-percent' ).animate( { left: Math.round( self.percent )-2.5 + "%" }, 500 );
108
+ },
109
+ success: function( r ) {
110
+ // Eval the result
111
+ r = eval( r );
112
+
113
+ // Display the image
114
+ jQuery("#thumb").show();
115
+
116
+ // Change his attribute
117
+ jQuery("#thumb-img").attr("src", r[0].src);
118
+
119
+ // Inscrease the counter and regene the next item
120
+ self.curr++;
121
+ self.regenItem();
122
+ }
123
+ });
124
+ },
125
+ reInit: function() {
126
+ // Re initilize the form
127
+ jQuery("#ajax_thumbnail_rebuild").removeAttr("disabled");
128
+ jQuery(".progress, #thumb").hide();
129
+ }
130
  }
131
 
132
+ var sizes = {
133
+ i: 0,
134
+ add: function(e,el) {
135
+ e.preventDefault();
136
+
137
+ // Create the template
138
+ var elTr = jQuery( '<tr />' ).attr( 'valign', 'top' ).addClass( 'new_size_' + this.i );
139
+ jQuery( '<th />' ).attr( 'scope', 'row' ).append(
140
+ jQuery( '<input />' )
141
+ .attr( {
142
+ type: 'text',
143
+ id: 'new_size_'+this.i,
144
+ }
145
+ )
146
+ .val( 'thumbnail-name' )
147
+ ).appendTo( elTr );
148
+
149
+ jQuery( '<td />' ).append( jQuery( '<input />' )
150
+ .attr( {
151
+ type: 'button',
152
+ id: 'validate_'+this.i,
153
+ }
154
+ )
155
+ .val( sis.validate )
156
+ .addClass('button-secondary action add_size_name')
157
+ ).appendTo( elTr );
158
+
159
+ // Add the form for editing
160
+ jQuery(el).closest( 'tr' ).before(elTr);
161
+
162
+ // Inscrease the identifier
163
+ this.i++;
164
+ },
165
+ register: function( e, el ) {
166
+ // Stop propagation
167
+ e.preventDefault();
168
+
169
+ // Get name and id
170
+ var name = jQuery(el).closest('tr').children('th').find('input').val();
171
+ var id = jQuery(el).closest('tr').children('th').find('input').attr('id');
172
+
173
+ // Get the number of elements with this name
174
+ var checkPresent = jQuery( el ).closest('tbody').find( 'input[value="'+name+'"]' ).length;
175
+
176
+ // Check if not basic size or already present, display message
177
+ if( name == 'thumbnail' || name == "medium" || name == "large" ) {
178
+ alert( sis.notOriginal );
179
+ return false;
180
+ } else if( checkPresent !=0 ) {
181
+ alert( sis.alreadyPresent );
182
+ return false;
183
+ }
184
+
185
+ // Create td and th elements fo the row
186
+ var thEl = jQuery( '<th />' ).attr( 'scope', 'row' ).text( sis.size + ' ' + name );
187
+ var tdEl = jQuery( '<td />' );
188
+
189
+ jQuery( '<input />' ).attr( { type: 'hidden', name: 'image_name' } ).val( name ).appendTo( tdEl ) ;
190
+ jQuery( '<input />' ).attr( { type :'hidden', name : 'custom_image_sizes[' + name + '][custom]' } ).val( "1" ).appendTo( tdEl );
191
+
192
+ jQuery( '<label />' ).attr( 'for', 'custom_image_sizes[' + name + '][w]' ).text(sis.maximumWidth).append(
193
+ jQuery( '<input />' ).attr( { type: 'number',
194
+ name: 'custom_image_sizes[' + name + '][w]',
195
+ step: 1,
196
+ min: 0,
197
+ id: 'custom_image_sizes[' + name + '][w]'
198
+ }
199
+ ).val( "0" ).addClass( "w" )
200
+ ).appendTo( tdEl );
201
+
202
+ jQuery( '<label />' ).attr( 'for', 'custom_image_sizes[' + name + '][h]' ).text(sis.maximumHeight).append(
203
+ jQuery( '<input />' ).attr( { type: 'number',
204
+ name: 'custom_image_sizes[' + name + '][h]',
205
+ step: 1,
206
+ min: 0,
207
+ id: 'custom_image_sizes[' + name + '][h]'
208
+ }
209
+ ).val( "0" ).addClass( "h" )
210
+ ).appendTo( tdEl );
211
+
212
+ jQuery( '<div />' )
213
+ .addClass( 'crop' )
214
+ .append(
215
+ jQuery( '<input />' )
216
+ .attr( {
217
+ type: 'checkbox',
218
+ name: 'custom_image_sizes[' + name + '][c]',
219
+ id: 'custom_image_sizes[' + name + '][c]'
220
+ } )
221
+ .val( "1" )
222
+ .addClass( 'c' )
223
+ )
224
+ .append(
225
+ jQuery( '<label />' )
226
+ .attr( {
227
+ 'for': 'checkbox',
228
+ id: 'custom_image_sizes[' + name + '][c]'
229
+ } )
230
+ .text( sis.crop )
231
+ ).appendTo( tdEl );
232
+
233
+ jQuery( '<div />' ).text( sis.deleteImage ).addClass('delete_size').appendTo( tdEl );
234
+ jQuery( '<div />' ).text( sis.validateButton ).addClass('add_size validate_size').appendTo( tdEl );
235
+
236
+ // Add the row to the current list
237
+ jQuery('#' + id).closest( 'tr' ).html( thEl.after( tdEl ) );
238
+
239
+ // Refresh the buttons
240
+ this.setButtons();
241
+ },
242
+ delete: function( el ) {
243
+ // Check if user want to delete or not
244
+ var confirmation = confirm( sis.confirmDelete );
245
+
246
+ // Delete if ok else not delete
247
+ if( confirmation == true ) {
248
+ // Remove from the list and the array
249
+ jQuery( el ).closest( 'tr' ).remove();
250
+ this.removeFromArray( el );
251
+ }else{
252
+ return false;
253
+ }
254
+ },
255
+ getPhp : function( e, el ) {
256
+ e.preventDefault();
257
+ // Get parent element
258
+ var parent = jQuery( el ).closest('tr');
259
+
260
+ jQuery.ajax({
261
+ url: sis.ajaxUrl,
262
+ type: "POST",
263
+ data: { action : "get_sizes" },
264
+ beforeSend: function() {
265
+ // Remove classes of status
266
+ parent.removeClass( 'addPending' );
267
+ parent.addClass( 'addPending' );
268
+ },
269
+ success: function(result) {
270
+ // Add the classes for the status
271
+ jQuery('#get_php').nextAll('code').html('<br />' + result).show().css( { 'display' : 'block' } );
272
+ parent.removeClass( 'addPending' );
273
+ }
274
+ });
275
+ },
276
+ ajaxRegister: function( e,el ) {
277
+ e.preventDefault();
278
+
279
+ // Get the vars
280
+ var self = this;
281
+ var timer;
282
+ var parent = jQuery( el ).closest('tr');
283
+ var n = parent.find('input[name=image_name]').val();
284
+ var c = parent.find( 'input.c' ).attr( 'checked' );
285
+ var w = parseInt( parent.find( 'input.w' ).val() );
286
+ var h = parseInt( parent.find( 'input.h' ).val() );
287
+
288
+ jQuery.ajax({
289
+ url: sis.ajaxUrl,
290
+ type: "POST",
291
+ data: { action : "add_size", width: w, height: h, crop: c, name: n },
292
+ beforeSend: function() {
293
+ // Remove status and set pending
294
+ parent.removeClass( 'errorAdding notChangedAdding successAdding' );
295
+ parent.addClass( 'addPending' );
296
+ },
297
+ success: function(result) {
298
+ // Set basic class and remove pending
299
+ var classTr = '';
300
+ parent.removeClass( 'addPending' );
301
+
302
+ // Check the result for the different messages
303
+ if( result == 0 ) {
304
+ classTr = 'errorAdding';
305
+ } else if( result == 2 ) {
306
+ classTr = 'notChangedAdding';
307
+
308
+ // add/update to the array with the status class
309
+ self.addToArray( n,w,h,c,classTr );
310
+ } else {
311
+ classTr = 'successAdding';
312
+
313
+ // add/update to the array with the status class
314
+ self.addToArray( n,w,h,c,classTr );
315
+ }
316
+
317
+ // Add the generated class
318
+ parent.addClass( classTr );
319
+
320
+ // Change the button text
321
+ parent.find( '.add_size .ui-button-text' ).text(sis.update) ;
322
+
323
+ clearTimeout( timer );
324
+ // Remove classes after 3 seconds
325
+ timer = setTimeout(function() {
326
+ parent.removeClass( 'errorAdding notChangedAdding successAdding' );
327
+ }, 3 * 1000 );
328
+ }
329
+ });
330
+ },
331
+ ajaxUnregister: function(e, el) {
332
+ e.preventDefault();
333
+
334
+ // Get name and self object
335
+ var self = this;
336
+ var n = jQuery( el ).closest('tr').find('input[name=image_name]').val();
337
+
338
+ // Make the ajax call
339
+ jQuery.ajax({
340
+ url: sis.ajaxUrl,
341
+ type: "POST",
342
+ data: { action : "remove_size", name: n },
343
+ success: function(result) {
344
+ // delete the row
345
+ self.delete( el );
346
+ }
347
+ });
348
+ },
349
+ addToArray: function( n,w,h,c,s ) {
350
+ // Get the row for editing or updating
351
+ var testRow = jQuery( '#sis-regen .wrapper > table > tbody input[value="'+n+'"]' );
352
+ var newRow = '';
353
+ var timer;
354
+
355
+ // Get the right newRow, updating or adding ?
356
+ if( testRow.length != 0 )
357
+ newRow = testRow.closest( 'tr' );
358
+ else
359
+ newRow = jQuery( '#sis-regen .wrapper > table > tbody > tr:first' ).clone();
360
+
361
+ // Set the datas with the given datas
362
+ newRow.find( 'td > label' ).attr( 'for', n )
363
+ .end()
364
+ .find( 'input.thumbnails' ).val( n ).attr( 'id', n ).end()
365
+ .find( 'td:nth-child(2) > label' ).text( n )
366
+ .end()
367
+ .find( 'td:nth-child(3) > label' ).text( w+'px' )
368
+ .end()
369
+ .find( 'td:nth-child(4) > label' ).text( h+'px' )
370
+ .end()
371
+ .find( 'td:nth-child(5) > label' ).text( c );
372
+
373
+ // If new then add the row
374
+ if( testRow.length == 0 )
375
+ newRow.appendTo( '#sis-regen .wrapper > table > tbody' );
376
+
377
+ // Remove the previous status classes and add the status class
378
+ newRow.removeClass( 'errorAdding notChangedAdding successAdding' ).addClass( s );
379
+
380
+ clearTimeout( timer );
381
+ // Remove the statuses classes
382
+ timer = setTimeout(function() {
383
+ newRow.removeClass( 'errorAdding notChangedAdding successAdding' );
384
+ }, 3 * 1000 );
385
+ },
386
+ removeFromArray: function( el ) {
387
+ // get the name
388
+ var n = jQuery( el ).closest( 'tr' ).find( 'input[name=image_name]' ).val();
389
+
390
+ // Remove the given name from the array
391
+ jQuery( '#sis-regen .wrapper > table > tbody input[value="'+n+'"]' ).closest( 'tr' ).remove();
392
+ },
393
+ setButtons: function() {
394
+ // UI for delete,crop and add buttons
395
+ jQuery(".delete_size").button({
396
+ icons: {
397
+ primary: 'ui-icon-circle-close'
398
+ }
399
+ });
400
+ jQuery(".add_size").button({
401
+ icons: {
402
+ primary: 'ui-icon-circle-check'
403
+ }
404
+ });
405
+ jQuery(".crop").button();
406
+ }
407
  }
408
+ jQuery(function() {
 
 
 
409
 
410
+ // Regeneration listener
411
+ jQuery( '#ajax_thumbnail_rebuild' ).click( function(){ regenerate.startRegenerating(); } );
 
 
412
 
413
+ // Add size button listener
414
+ jQuery('#add_size').click(function( e ){ sizes.add( e, this ); });
415
+
416
+ // Registering a new size listener
417
+ jQuery('.add_size_name').live( 'click',function( e ){ sizes.register( e, this ); });
418
+
419
+ // Delete and Adding buttons
420
+ jQuery('.delete_size').live('click', function( e ){ sizes.ajaxUnregister( e, this ); });
421
+ jQuery('.validate_size').live('click', function( e ){ sizes.ajaxRegister( e, this ); });
422
+
423
+ // Seup the getphp
424
+ jQuery('#get_php').click( function( e ){ sizes.getPhp( e, this ) } );
425
+ jQuery('#get_php').nextAll('code').hide();
426
+
427
+ // Colors for the theme / custom sizes
428
+ jQuery('span.custom_size').closest('tr').children('th').css({
429
+ 'color': '#89D76A'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
430
  });
431
+ jQuery('span.theme_size').closest('tr').children('th').css({
432
+ 'color': '#F2A13A'
433
+ });
434
+
435
+ // Set the buttons
436
+ sizes.setButtons();
437
+
438
+ // Error ajax handler
439
+ jQuery( '<div class="ui-widget" id="msg"><div class="ui-state-error ui-corner-all" style="padding: 0 .7em;"><p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span><strong>Alert:</strong> <ul class="msg" ></ul></p></div></div>').prependTo( "div#wpwrap" ).slideUp( 0 );
440
+
441
+ // Display the errors of ajax queries
442
+ jQuery("#msg").ajaxError(function(event, request, settings) {
443
+ jQuery(this).find( '.msg' ).append("<li>"+sis.ajaxErrorHandler+" " + settings.url + ", status "+request.status+" : "+request.statusText+"</li>").end().stop( false, false).slideDown( 200 ).delay( 5000 ).slideUp( 200 );
444
+ });
445
+ });
js/sis.min.js CHANGED
@@ -1,14 +1,10 @@
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').closest('tr').children('th').css({'color':'green'});jQuery('span.theme_size').closest('tr').children('th').css({'color':'orange'});jQuery('#get_php').click(getPhp);jQuery('#get_php').nextAll('code').hide();jQuery('.progress').hide();});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="'+sis.validate+'" />';row+='</td>';row+='</tr>';jQuery(this).parent().parent().before(row);i++;}
2
- function getPhp(){jQuery.ajax({url:sis.ajaxUrl,type:"POST",data:"action=get_sizes",success:function(result){jQuery('#get_php').nextAll('code').html('<br />'+result).show().css({'display':'block'});}});}
3
- function registerSize(){name=jQuery(this).closest('tr').children('th').find('input').val();id=jQuery(this).closest('tr').children('th').find('input').attr('id');if(name=='thumbnail'||name=="medium"||name=="large"){alert(sis.notOriginal);return false;}
4
- output='<th scope="row">';output+=sis.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+=sis.maximumWidth+' <input name="custom_image_sizes['+name+'][w] " type="text" id="custom_image_sizes['+name+'][w]" value="" class="small-text" />'
5
- output+='</label>';output+='<label for="custom_image_sizes['+name+'][h]">';output+=sis.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"> '
6
- output+=sis.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+=sis.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);}
7
- function deleteSize(){jQuery(this).parent().parent().remove();}
8
- function setMessage(msg){jQuery("#regenerate_message").html(msg).addClass('updated').addClass('fade').show();jQuery(".progress").progressbar();}
9
- function regenerate(){jQuery("#ajax_thumbnail_rebuild").attr("disabled",true);setMessage("<p>"+sis.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();});}
10
- 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();});}
11
- jQuery.ajax({url:sis.ajaxUrl,type:"POST",data:"action=ajax_thumbnail_rebuild&do=getlist"+post_types,success:function(result){var list=eval(result);var curr=0;jQuery('.progress').show();function regenItem(){if(!list){jQuery("#ajax_thumbnail_rebuild").removeAttr("disabled");jQuery(".progress, #thumb").hide();setMessage(sis.noMedia);return false;}
12
- percent=(curr/list.length)*100;jQuery(".progress").progressbar("value",percent);jQuery(".progress-percent").html(Math.round(percent)+"%").animate({left:Math.round(percent)-2.5+"%"},500);if(curr>=list.length){jQuery("#ajax_thumbnail_rebuild").removeAttr("disabled");jQuery(".progress, #thumb").hide();setMessage(sis.done);return;}
13
- setMessage(sis.regenerating+(curr+1)+sis.of+list.length+" ("+list[curr].title+")...");jQuery.ajax({url:sis.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();}});}
14
- regenItem();},error:function(request,status,error){setMessage("Error "+request.status);}});}
1
+ var regenerate={post_types:'',thumbnails:'',list:'',cur:0,percent:'',getThumbnails:function(){var self=this;var inputs=jQuery('input.thumbnails:checked');if(inputs.length!=jQuery('input.thumbnails[type="checkbox"]').length){inputs.each(function(i){self.thumbnails+='&thumbnails[]='+jQuery(this).val();});}},getPostTypes:function(){var self=this;var inputs=jQuery('input.post_types:checked');if(inputs.length!=jQuery('input.post_types[type="checkbox"]').length){inputs.each(function(){self.post_types+='&post_types[]='+jQuery(this).val();});}},setMessage:function(msg){jQuery("#regenerate_message").html(msg).addClass('updated').addClass('fade').show();this.refreshProgressBar();},refreshProgressBar:function(){jQuery(".progress").progressbar();},startRegenerating:function(){var self=this;jQuery.ajax({url:sis.ajaxUrl,type:"POST",data:"action=ajax_thumbnail_rebuild&do=getlist"+self.post_types,beforeSend:function(){jQuery("#ajax_thumbnail_rebuild").attr("disabled",true);self.setMessage("<p>"+sis.reading+"</p>");self.getThumbnails();self.getPostTypes();},success:function(r){self.list=eval(r);self.curr=0;jQuery('.progress').show();self.regenItem();}});},regenItem:function(){var self=this;if(!this.list){this.reInit();this.setMessage(sis.noMedia);return false;}
2
+ if(this.curr>=this.list.length){this.reInit();this.setMessage(sis.done+this.curr+' '+sis.messageRegenerated);return;}
3
+ this.setMessage(sis.regenerating+(this.curr+1)+sis.of+this.list.length+" ("+this.list[this.curr].title+")...");jQuery.ajax({url:sis.ajaxUrl,type:"POST",data:"action=ajax_thumbnail_rebuild&do=regen&id="+this.list[this.curr].id+this.thumbnails,beforeSend:function(){self.percent=(self.curr/self.list.length)*100;jQuery(".progress").progressbar("value",self.percent);jQuery(".progress-percent span.text").html(Math.round(self.percent)+"%").closest('.progress-percent').animate({left:Math.round(self.percent)-2.5+"%"},500);},success:function(r){r=eval(r);jQuery("#thumb").show();jQuery("#thumb-img").attr("src",r[0].src);self.curr++;self.regenItem();}});},reInit:function(){jQuery("#ajax_thumbnail_rebuild").removeAttr("disabled");jQuery(".progress, #thumb").hide();}}
4
+ var sizes={i:0,add:function(e,el){e.preventDefault();var elTr=jQuery('<tr />').attr('valign','top').addClass('new_size_'+this.i);jQuery('<th />').attr('scope','row').append(jQuery('<input />').attr({type:'text',id:'new_size_'+this.i,}).val('thumbnail-name')).appendTo(elTr);jQuery('<td />').append(jQuery('<input />').attr({type:'button',id:'validate_'+this.i,}).val(sis.validate).addClass('button-secondary action add_size_name')).appendTo(elTr);jQuery(el).closest('tr').before(elTr);this.i++;},register:function(e,el){e.preventDefault();var name=jQuery(el).closest('tr').children('th').find('input').val();var id=jQuery(el).closest('tr').children('th').find('input').attr('id');var checkPresent=jQuery(el).closest('tbody').find('input[value="'+name+'"]').length;if(name=='thumbnail'||name=="medium"||name=="large"){alert(sis.notOriginal);return false;}else if(checkPresent!=0){alert(sis.alreadyPresent);return false;}
5
+ var thEl=jQuery('<th />').attr('scope','row').text(sis.size+' '+name);var tdEl=jQuery('<td />');jQuery('<input />').attr({type:'hidden',name:'image_name'}).val(name).appendTo(tdEl);jQuery('<input />').attr({type:'hidden',name:'custom_image_sizes['+name+'][custom]'}).val("1").appendTo(tdEl);jQuery('<label />').attr('for','custom_image_sizes['+name+'][w]').text(sis.maximumWidth).append(jQuery('<input />').attr({type:'number',name:'custom_image_sizes['+name+'][w]',step:1,min:0,id:'custom_image_sizes['+name+'][w]'}).val("0").addClass("w")).appendTo(tdEl);jQuery('<label />').attr('for','custom_image_sizes['+name+'][h]').text(sis.maximumHeight).append(jQuery('<input />').attr({type:'number',name:'custom_image_sizes['+name+'][h]',step:1,min:0,id:'custom_image_sizes['+name+'][h]'}).val("0").addClass("h")).appendTo(tdEl);jQuery('<div />').addClass('crop').append(jQuery('<input />').attr({type:'checkbox',name:'custom_image_sizes['+name+'][c]',id:'custom_image_sizes['+name+'][c]'}).val("1").addClass('c')).append(jQuery('<label />').attr({'for':'checkbox',id:'custom_image_sizes['+name+'][c]'}).text(sis.crop)).appendTo(tdEl);jQuery('<div />').text(sis.deleteImage).addClass('delete_size').appendTo(tdEl);jQuery('<div />').text(sis.validateButton).addClass('add_size validate_size').appendTo(tdEl);jQuery('#'+id).closest('tr').html(thEl.after(tdEl));this.setButtons();},delete:function(el){var confirmation=confirm(sis.confirmDelete);if(confirmation==true){jQuery(el).closest('tr').remove();this.removeFromArray(el);}else{return false;}},getPhp:function(e,el){e.preventDefault();var parent=jQuery(el).closest('tr');jQuery.ajax({url:sis.ajaxUrl,type:"POST",data:{action:"get_sizes"},beforeSend:function(){parent.removeClass('addPending');parent.addClass('addPending');},success:function(result){jQuery('#get_php').nextAll('code').html('<br />'+result).show().css({'display':'block'});parent.removeClass('addPending');}});},ajaxRegister:function(e,el){e.preventDefault();var self=this;var timer;var parent=jQuery(el).closest('tr');var n=parent.find('input[name=image_name]').val();var c=parent.find('input.c').attr('checked');var w=parseInt(parent.find('input.w').val());var h=parseInt(parent.find('input.h').val());jQuery.ajax({url:sis.ajaxUrl,type:"POST",data:{action:"add_size",width:w,height:h,crop:c,name:n},beforeSend:function(){parent.removeClass('errorAdding notChangedAdding successAdding');parent.addClass('addPending');},success:function(result){var classTr='';parent.removeClass('addPending');if(result==0){classTr='errorAdding';}else if(result==2){classTr='notChangedAdding';self.addToArray(n,w,h,c,classTr);}else{classTr='successAdding';self.addToArray(n,w,h,c,classTr);}
6
+ parent.addClass(classTr);parent.find('.add_size .ui-button-text').text(sis.update);clearTimeout(timer);timer=setTimeout(function(){parent.removeClass('errorAdding notChangedAdding successAdding');},3*1000);}});},ajaxUnregister:function(e,el){e.preventDefault();var self=this;var n=jQuery(el).closest('tr').find('input[name=image_name]').val();jQuery.ajax({url:sis.ajaxUrl,type:"POST",data:{action:"remove_size",name:n},success:function(result){self.delete(el);}});},addToArray:function(n,w,h,c,s){var testRow=jQuery('#sis-regen .wrapper > table > tbody input[value="'+n+'"]');var newRow='';var timer;if(testRow.length!=0)
7
+ newRow=testRow.closest('tr');else
8
+ newRow=jQuery('#sis-regen .wrapper > table > tbody > tr:first').clone();newRow.find('td > label').attr('for',n).end().find('input.thumbnails').val(n).attr('id',n).end().find('td:nth-child(2) > label').text(n).end().find('td:nth-child(3) > label').text(w+'px').end().find('td:nth-child(4) > label').text(h+'px').end().find('td:nth-child(5) > label').text(c);if(testRow.length==0)
9
+ newRow.appendTo('#sis-regen .wrapper > table > tbody');newRow.removeClass('errorAdding notChangedAdding successAdding').addClass(s);clearTimeout(timer);timer=setTimeout(function(){newRow.removeClass('errorAdding notChangedAdding successAdding');},3*1000);},removeFromArray:function(el){var n=jQuery(el).closest('tr').find('input[name=image_name]').val();jQuery('#sis-regen .wrapper > table > tbody input[value="'+n+'"]').closest('tr').remove();},setButtons:function(){jQuery(".delete_size").button({icons:{primary:'ui-icon-circle-close'}});jQuery(".add_size").button({icons:{primary:'ui-icon-circle-check'}});jQuery(".crop").button();}}
10
+ jQuery(function(){jQuery('#ajax_thumbnail_rebuild').click(function(){regenerate.startRegenerating();});jQuery('#add_size').click(function(e){sizes.add(e,this);});jQuery('.add_size_name').live('click',function(e){sizes.register(e,this);});jQuery('.delete_size').live('click',function(e){sizes.ajaxUnregister(e,this);});jQuery('.validate_size').live('click',function(e){sizes.ajaxRegister(e,this);});jQuery('#get_php').click(function(e){sizes.getPhp(e,this)});jQuery('#get_php').nextAll('code').hide();jQuery('span.custom_size').closest('tr').children('th').css({'color':'#89D76A'});jQuery('span.theme_size').closest('tr').children('th').css({'color':'#F2A13A'});sizes.setButtons();jQuery('<div class="ui-widget" id="msg"><div class="ui-state-error ui-corner-all" style="padding: 0 .7em;"><p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span><strong>Alert:</strong> <ul class="msg" ></ul></p></div></div>').prependTo("div#wpwrap").slideUp(0);jQuery("#msg").ajaxError(function(event,request,settings){jQuery(this).find('.msg').append("<li>"+sis.ajaxErrorHandler+" "+settings.url+", status "+request.status+" : "+request.statusText+"</li>").end().stop(false,false).slideDown(200).delay(5000).slideUp(200);});});
 
 
 
 
languages/sis-fr_FR.mo CHANGED
Binary file
languages/sis-fr_FR.po CHANGED
@@ -4,8 +4,8 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: Simple image sizes\n"
6
  "Report-Msgid-Bugs-To: \n"
7
- "POT-Creation-Date: 2011-04-14 01:15+0100\n"
8
- "PO-Revision-Date: 2011-04-14 01:15+0100\n"
9
  "Last-Translator: Nicolas JUEN <njuen@beapi.fr>\n"
10
  "Language-Team: Beapi <njuen@beapi.fr>\n"
11
  "MIME-Version: 1.0\n"
@@ -18,148 +18,128 @@ msgstr ""
18
  "X-Poedit-Basepath: ../\n"
19
  "X-Poedit-SearchPath-0: .\n"
20
 
21
- #: inc/class.admin.php:55
22
  msgid "Reading attachments..."
23
  msgstr "Chargement des médias..."
24
 
25
- #: inc/class.admin.php:56
26
- #: inc/class.admin.php:177
27
  msgid "Maximum width"
28
  msgstr "Largeur maximum"
29
 
30
- #: inc/class.admin.php:57
31
- #: inc/class.admin.php:182
32
  msgid "Maximum height"
33
  msgstr "Hauteur maximum"
34
 
35
- #: inc/class.admin.php:58
36
- #: inc/class.admin.php:188
37
- #: inc/class.admin.php:257
38
- #: inc/class.admin.php:316
39
  msgid "Crop ?"
40
  msgstr "Rogner ?"
41
 
42
- #: inc/class.admin.php:59
43
  msgid " of "
44
  msgstr " de "
45
 
46
- #: inc/class.admin.php:60
47
- #: inc/class.admin.php:192
48
  msgid "Delete"
49
  msgstr "Supprimer"
50
 
51
- #: inc/class.admin.php:61
52
  msgid "No media in your site to regenerate !"
53
  msgstr "Pas de médias à regénérer !"
54
 
55
- #: inc/class.admin.php:62
56
  msgid "Regenerating "
57
  msgstr "Regénération "
58
 
59
- #: inc/class.admin.php:63
60
  msgid "Validate image size name"
61
  msgstr "Valider le nom de la taille d'image"
62
 
63
- #: inc/class.admin.php:64
64
  msgid "Done."
65
  msgstr "Fini."
66
 
67
- #: inc/class.admin.php:65
68
  msgid "Size"
69
  msgstr "Taille "
70
 
71
- #: inc/class.admin.php:66
72
- msgid "Don't use the basic Wordpress thumbnail size name, use the form above to edit them"
73
- msgstr "N'utilisez pas les noms de base de Wordpress pour vos tailles, utilisez le formulaire ci-dessus pour les éditer. "
74
-
75
- #: inc/class.admin.php:84
76
- msgid "Settings"
77
- msgstr "Paramètres"
78
-
79
- #: inc/class.admin.php:132
80
  msgid "Size "
81
  msgstr "Taille "
82
 
83
- #: inc/class.admin.php:140
84
  msgid "Add a new size"
85
  msgstr "Ajouter une nouvelle taille"
86
 
87
- #: inc/class.admin.php:143
88
  msgid "Legend of the sizes"
89
  msgstr "Légende des tailles"
90
 
91
- #: inc/class.admin.php:146
92
- msgid "Get php for theme"
93
- msgstr "Code PHP pour le thème"
94
-
95
- #: inc/class.admin.php:149
96
  msgid "Thumbnail regeneration"
97
  msgstr "Régénération des vignettes"
98
 
99
- #: inc/class.admin.php:170
100
  msgid "Custom size"
101
  msgstr "Taille personnelle"
102
 
103
- #: inc/class.admin.php:173
104
  msgid "Theme size"
105
  msgstr "Taille de thème"
106
 
107
- #: inc/class.admin.php:206
108
  msgid "Add a new size of thumbnail"
109
  msgstr "Ajouter une nouvelle taille de vignette"
110
 
111
- #: inc/class.admin.php:218
112
- msgid "Get the PHP for the theme"
113
- msgstr "Récupérer le code PHP pour le thème"
114
-
115
- #: inc/class.admin.php:219
116
- msgid "Copy and paste the code below into your Wordpress theme function file if you wanted to save them and deactivate the plugin."
117
- msgstr "Copiez et collez dans votre fichier de fonction de votre thème Wordpress si vous voulez les conserver et désactiver le plugin."
118
-
119
- #: inc/class.admin.php:232
120
  msgid "The images created on your theme are <span style=\"color:orange\">orange</span> and your custom size are <span style=\"color:green\"> green </span>."
121
  msgstr "Les tailles d'images crées par votre thème sont en <span style=\"color:orange\">orange</span> et vos tailles personnalisés sont en <span style=\"color:green\"> vert </span>."
122
 
123
- #: inc/class.admin.php:249
124
  msgid "Select which thumbnails you want to rebuild:"
125
  msgstr "Sélectionnez les tailles de vignettes à régénérer"
126
 
127
- #: inc/class.admin.php:253
128
- #: inc/class.admin.php:312
129
- #: inc/class.admin.php:325
130
- #: inc/class.admin.php:350
131
  msgid "Resize ?"
132
  msgstr "Regénérer ?"
133
 
134
- #: inc/class.admin.php:254
135
- #: inc/class.admin.php:313
136
  msgid "Size name"
137
  msgstr "Nom de la taille"
138
 
139
- #: inc/class.admin.php:255
140
- #: inc/class.admin.php:314
141
  msgid "Width"
142
  msgstr "Largeur"
143
 
144
- #: inc/class.admin.php:256
145
- #: inc/class.admin.php:315
146
  msgid "Height"
147
  msgstr "Hauteur"
148
 
149
- #: inc/class.admin.php:321
150
  msgid "Select which post type source thumbnails you want to rebuild:"
151
  msgstr "Sélectionnez quelles vignettes de quel type de contenu vous souhaitez régénérer : "
152
 
153
- #: inc/class.admin.php:326
154
- #: inc/class.admin.php:351
155
  msgid "Post type"
156
  msgstr "Type de contenu"
157
 
158
- #: inc/class.admin.php:363
159
  msgid "Last image:"
160
  msgstr "Dernière image :"
161
 
162
- #: inc/class.admin.php:364
163
  msgid "Regenerate Thumbnails"
164
  msgstr "Régénérer les vignettes"
165
 
4
  msgstr ""
5
  "Project-Id-Version: Simple image sizes\n"
6
  "Report-Msgid-Bugs-To: \n"
7
+ "POT-Creation-Date: 2011-03-16 23:32+0100\n"
8
+ "PO-Revision-Date: 2011-03-16 23:32+0100\n"
9
  "Last-Translator: Nicolas JUEN <njuen@beapi.fr>\n"
10
  "Language-Team: Beapi <njuen@beapi.fr>\n"
11
  "MIME-Version: 1.0\n"
18
  "X-Poedit-Basepath: ../\n"
19
  "X-Poedit-SearchPath-0: .\n"
20
 
21
+ #: inc/class.admin.php:50
22
  msgid "Reading attachments..."
23
  msgstr "Chargement des médias..."
24
 
25
+ #: inc/class.admin.php:51
26
+ #: inc/class.admin.php:148
27
  msgid "Maximum width"
28
  msgstr "Largeur maximum"
29
 
30
+ #: inc/class.admin.php:52
31
+ #: inc/class.admin.php:153
32
  msgid "Maximum height"
33
  msgstr "Hauteur maximum"
34
 
35
+ #: inc/class.admin.php:53
36
+ #: inc/class.admin.php:159
37
+ #: inc/class.admin.php:214
38
+ #: inc/class.admin.php:273
39
  msgid "Crop ?"
40
  msgstr "Rogner ?"
41
 
42
+ #: inc/class.admin.php:54
43
  msgid " of "
44
  msgstr " de "
45
 
46
+ #: inc/class.admin.php:55
47
+ #: inc/class.admin.php:163
48
  msgid "Delete"
49
  msgstr "Supprimer"
50
 
51
+ #: inc/class.admin.php:56
52
  msgid "No media in your site to regenerate !"
53
  msgstr "Pas de médias à regénérer !"
54
 
55
+ #: inc/class.admin.php:57
56
  msgid "Regenerating "
57
  msgstr "Regénération "
58
 
59
+ #: inc/class.admin.php:58
60
  msgid "Validate image size name"
61
  msgstr "Valider le nom de la taille d'image"
62
 
63
+ #: inc/class.admin.php:59
64
  msgid "Done."
65
  msgstr "Fini."
66
 
67
+ #: inc/class.admin.php:60
68
  msgid "Size"
69
  msgstr "Taille "
70
 
71
+ #: inc/class.admin.php:106
 
 
 
 
 
 
 
 
72
  msgid "Size "
73
  msgstr "Taille "
74
 
75
+ #: inc/class.admin.php:114
76
  msgid "Add a new size"
77
  msgstr "Ajouter une nouvelle taille"
78
 
79
+ #: inc/class.admin.php:117
80
  msgid "Legend of the sizes"
81
  msgstr "Légende des tailles"
82
 
83
+ #: inc/class.admin.php:120
 
 
 
 
84
  msgid "Thumbnail regeneration"
85
  msgstr "Régénération des vignettes"
86
 
87
+ #: inc/class.admin.php:141
88
  msgid "Custom size"
89
  msgstr "Taille personnelle"
90
 
91
+ #: inc/class.admin.php:144
92
  msgid "Theme size"
93
  msgstr "Taille de thème"
94
 
95
+ #: inc/class.admin.php:177
96
  msgid "Add a new size of thumbnail"
97
  msgstr "Ajouter une nouvelle taille de vignette"
98
 
99
+ #: inc/class.admin.php:189
 
 
 
 
 
 
 
 
100
  msgid "The images created on your theme are <span style=\"color:orange\">orange</span> and your custom size are <span style=\"color:green\"> green </span>."
101
  msgstr "Les tailles d'images crées par votre thème sont en <span style=\"color:orange\">orange</span> et vos tailles personnalisés sont en <span style=\"color:green\"> vert </span>."
102
 
103
+ #: inc/class.admin.php:206
104
  msgid "Select which thumbnails you want to rebuild:"
105
  msgstr "Sélectionnez les tailles de vignettes à régénérer"
106
 
107
+ #: inc/class.admin.php:210
108
+ #: inc/class.admin.php:269
109
+ #: inc/class.admin.php:282
110
+ #: inc/class.admin.php:307
111
  msgid "Resize ?"
112
  msgstr "Regénérer ?"
113
 
114
+ #: inc/class.admin.php:211
115
+ #: inc/class.admin.php:270
116
  msgid "Size name"
117
  msgstr "Nom de la taille"
118
 
119
+ #: inc/class.admin.php:212
120
+ #: inc/class.admin.php:271
121
  msgid "Width"
122
  msgstr "Largeur"
123
 
124
+ #: inc/class.admin.php:213
125
+ #: inc/class.admin.php:272
126
  msgid "Height"
127
  msgstr "Hauteur"
128
 
129
+ #: inc/class.admin.php:278
130
  msgid "Select which post type source thumbnails you want to rebuild:"
131
  msgstr "Sélectionnez quelles vignettes de quel type de contenu vous souhaitez régénérer : "
132
 
133
+ #: inc/class.admin.php:283
134
+ #: inc/class.admin.php:308
135
  msgid "Post type"
136
  msgstr "Type de contenu"
137
 
138
+ #: inc/class.admin.php:320
139
  msgid "Last image:"
140
  msgstr "Dernière image :"
141
 
142
+ #: inc/class.admin.php:321
143
  msgid "Regenerate Thumbnails"
144
  msgstr "Régénérer les vignettes"
145
 
languages/sis.pot CHANGED
@@ -2,144 +2,184 @@
2
  # This file is distributed under the same license as the package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Simple image sizes\n"
6
- "Report-Msgid-Bugs-To: \n"
7
- "POT-Creation-Date: 2011-03-16 23:32+0100\n"
8
- "PO-Revision-Date: 2011-03-16 23:46+0100\n"
9
- "Last-Translator: Nicolas JUEN <njuen@beapi.fr>\n"
10
- "Language-Team: Beapi <njuen@beapi.fr>\n"
11
  "MIME-Version: 1.0\n"
12
  "Content-Type: text/plain; charset=UTF-8\n"
13
  "Content-Transfer-Encoding: 8bit\n"
14
- "X-Poedit-Language: French\n"
15
- "X-Poedit-Country: FRANCE\n"
16
- "X-Poedit-SourceCharset: utf-8\n"
17
- "X-Poedit-KeywordsList: __;_e;__\n"
18
- "X-Poedit-Basepath: ../\n"
19
- "X-Poedit-SearchPath-0: .\n"
20
-
21
- #: inc/class.admin.php:50
22
  msgid "Reading attachments..."
23
  msgstr ""
24
 
25
- #: inc/class.admin.php:51
26
- #: inc/class.admin.php:148
27
  msgid "Maximum width"
28
  msgstr ""
29
 
30
- #: inc/class.admin.php:52
31
- #: inc/class.admin.php:153
32
  msgid "Maximum height"
33
  msgstr ""
34
 
35
- #: inc/class.admin.php:53
36
- #: inc/class.admin.php:159
37
- #: inc/class.admin.php:214
38
- #: inc/class.admin.php:273
39
  msgid "Crop ?"
40
  msgstr ""
41
 
42
- #: inc/class.admin.php:54
43
  msgid " of "
44
  msgstr ""
45
 
46
- #: inc/class.admin.php:55
47
- #: inc/class.admin.php:163
48
  msgid "Delete"
49
  msgstr ""
50
 
51
- #: inc/class.admin.php:56
52
  msgid "No media in your site to regenerate !"
53
  msgstr ""
54
 
55
- #: inc/class.admin.php:57
56
  msgid "Regenerating "
57
  msgstr ""
58
 
59
- #: inc/class.admin.php:58
60
  msgid "Validate image size name"
61
  msgstr ""
62
 
63
- #: inc/class.admin.php:59
64
  msgid "Done."
65
  msgstr ""
66
 
67
- #: inc/class.admin.php:60
68
  msgid "Size"
69
  msgstr ""
70
 
71
- #: inc/class.admin.php:106
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  msgid "Size "
73
  msgstr ""
74
 
75
- #: inc/class.admin.php:114
76
  msgid "Add a new size"
77
  msgstr ""
78
 
79
- #: inc/class.admin.php:117
80
  msgid "Legend of the sizes"
81
  msgstr ""
82
 
83
- #: inc/class.admin.php:120
 
 
 
 
84
  msgid "Thumbnail regeneration"
85
  msgstr ""
86
 
87
- #: inc/class.admin.php:141
88
  msgid "Custom size"
89
  msgstr ""
90
 
91
- #: inc/class.admin.php:144
92
  msgid "Theme size"
93
  msgstr ""
94
 
95
- #: inc/class.admin.php:177
96
  msgid "Add a new size of thumbnail"
97
  msgstr ""
98
 
99
- #: inc/class.admin.php:189
100
- msgid "The images created on your theme are <span style=\"color:orange\">orange</span> and your custom size are <span style=\"color:green\"> green </span>."
 
 
 
 
 
 
 
 
 
 
 
 
101
  msgstr ""
102
 
103
- #: inc/class.admin.php:206
104
  msgid "Select which thumbnails you want to rebuild:"
105
  msgstr ""
106
 
107
- #: inc/class.admin.php:210
108
- #: inc/class.admin.php:269
109
- #: inc/class.admin.php:282
110
- #: inc/class.admin.php:307
111
  msgid "Resize ?"
112
  msgstr ""
113
 
114
- #: inc/class.admin.php:211
115
- #: inc/class.admin.php:270
116
  msgid "Size name"
117
  msgstr ""
118
 
119
- #: inc/class.admin.php:212
120
- #: inc/class.admin.php:271
121
  msgid "Width"
122
  msgstr ""
123
 
124
- #: inc/class.admin.php:213
125
- #: inc/class.admin.php:272
126
  msgid "Height"
127
  msgstr ""
128
 
129
- #: inc/class.admin.php:278
 
 
 
 
 
 
 
 
130
  msgid "Select which post type source thumbnails you want to rebuild:"
131
  msgstr ""
132
 
133
- #: inc/class.admin.php:283
134
- #: inc/class.admin.php:308
135
  msgid "Post type"
136
  msgstr ""
137
 
138
- #: inc/class.admin.php:320
139
  msgid "Last image:"
140
  msgstr ""
141
 
142
- #: inc/class.admin.php:321
143
  msgid "Regenerate Thumbnails"
144
  msgstr ""
145
-
2
  # This file is distributed under the same license as the package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: \n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/simple-image-sizes\n"
7
+ "POT-Creation-Date: 2011-05-13 14:10:07+00:00\n"
 
 
 
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
+
15
+ #: inc/class.admin.php:57
 
 
 
16
  msgid "Reading attachments..."
17
  msgstr ""
18
 
19
+ #: inc/class.admin.php:58 inc/class.admin.php:186
 
20
  msgid "Maximum width"
21
  msgstr ""
22
 
23
+ #: inc/class.admin.php:59 inc/class.admin.php:191
 
24
  msgid "Maximum height"
25
  msgstr ""
26
 
27
+ #: inc/class.admin.php:60 inc/class.admin.php:197 inc/class.admin.php:263
28
+ #: inc/class.admin.php:323
 
 
29
  msgid "Crop ?"
30
  msgstr ""
31
 
32
+ #: inc/class.admin.php:61
33
  msgid " of "
34
  msgstr ""
35
 
36
+ #: inc/class.admin.php:62 inc/class.admin.php:199
 
37
  msgid "Delete"
38
  msgstr ""
39
 
40
+ #: inc/class.admin.php:63
41
  msgid "No media in your site to regenerate !"
42
  msgstr ""
43
 
44
+ #: inc/class.admin.php:64
45
  msgid "Regenerating "
46
  msgstr ""
47
 
48
+ #: inc/class.admin.php:65
49
  msgid "Validate image size name"
50
  msgstr ""
51
 
52
+ #: inc/class.admin.php:66
53
  msgid "Done."
54
  msgstr ""
55
 
56
+ #: inc/class.admin.php:67
57
  msgid "Size"
58
  msgstr ""
59
 
60
+ #: inc/class.admin.php:68
61
+ msgid ""
62
+ "Don't use the basic Wordpress thumbnail size name, use the form above to "
63
+ "edit them"
64
+ msgstr ""
65
+
66
+ #: inc/class.admin.php:69
67
+ msgid "This size is already registered, edit it instead of recreating it."
68
+ msgstr ""
69
+
70
+ #: inc/class.admin.php:70
71
+ msgid "Do you really want to delete these size ?"
72
+ msgstr ""
73
+
74
+ #: inc/class.admin.php:71 inc/class.admin.php:200
75
+ msgid "Update"
76
+ msgstr ""
77
+
78
+ #: inc/class.admin.php:72
79
+ msgid "Error requesting page"
80
+ msgstr ""
81
+
82
+ #: inc/class.admin.php:73
83
+ msgid "images have been regenerated !"
84
+ msgstr ""
85
+
86
+ #: inc/class.admin.php:74
87
+ msgid "Validate"
88
+ msgstr ""
89
+
90
+ #: inc/class.admin.php:92
91
+ msgid "Settings"
92
+ msgstr ""
93
+
94
+ #: inc/class.admin.php:140
95
  msgid "Size "
96
  msgstr ""
97
 
98
+ #: inc/class.admin.php:148
99
  msgid "Add a new size"
100
  msgstr ""
101
 
102
+ #: inc/class.admin.php:151
103
  msgid "Legend of the sizes"
104
  msgstr ""
105
 
106
+ #: inc/class.admin.php:154
107
+ msgid "Get php for theme"
108
+ msgstr ""
109
+
110
+ #: inc/class.admin.php:157
111
  msgid "Thumbnail regeneration"
112
  msgstr ""
113
 
114
+ #: inc/class.admin.php:179
115
  msgid "Custom size"
116
  msgstr ""
117
 
118
+ #: inc/class.admin.php:182
119
  msgid "Theme size"
120
  msgstr ""
121
 
122
+ #: inc/class.admin.php:211
123
  msgid "Add a new size of thumbnail"
124
  msgstr ""
125
 
126
+ #: inc/class.admin.php:223
127
+ msgid "Get the PHP for the theme"
128
+ msgstr ""
129
+
130
+ #: inc/class.admin.php:224
131
+ msgid ""
132
+ "Copy and paste the code below into your Wordpress theme function file if you "
133
+ "wanted to save them and deactivate the plugin."
134
+ msgstr ""
135
+
136
+ #: inc/class.admin.php:237
137
+ msgid ""
138
+ "The images created on your theme are <span style=\"color:#F2A13A\">orange</"
139
+ "span> and your custom size are <span style=\"color:#89D76A\"> green </span>."
140
  msgstr ""
141
 
142
+ #: inc/class.admin.php:255
143
  msgid "Select which thumbnails you want to rebuild:"
144
  msgstr ""
145
 
146
+ #: inc/class.admin.php:259 inc/class.admin.php:319 inc/class.admin.php:332
147
+ #: inc/class.admin.php:358
 
 
148
  msgid "Resize ?"
149
  msgstr ""
150
 
151
+ #: inc/class.admin.php:260 inc/class.admin.php:320
 
152
  msgid "Size name"
153
  msgstr ""
154
 
155
+ #: inc/class.admin.php:261 inc/class.admin.php:321
 
156
  msgid "Width"
157
  msgstr ""
158
 
159
+ #: inc/class.admin.php:262 inc/class.admin.php:322
 
160
  msgid "Height"
161
  msgstr ""
162
 
163
+ #: inc/class.admin.php:312
164
+ msgid "yes"
165
+ msgstr ""
166
+
167
+ #: inc/class.admin.php:312
168
+ msgid "no"
169
+ msgstr ""
170
+
171
+ #: inc/class.admin.php:328
172
  msgid "Select which post type source thumbnails you want to rebuild:"
173
  msgstr ""
174
 
175
+ #: inc/class.admin.php:333 inc/class.admin.php:359
 
176
  msgid "Post type"
177
  msgstr ""
178
 
179
+ #: inc/class.admin.php:378
180
  msgid "Last image:"
181
  msgstr ""
182
 
183
+ #: inc/class.admin.php:379
184
  msgid "Regenerate Thumbnails"
185
  msgstr ""
 
readme.txt CHANGED
@@ -1,56 +1,75 @@
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.1
7
- Stable tag: 1.0.6
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
- You can regenerate all the sizes you have just created and choose which one you wanted to regenerate.
13
- You can now get all the code to copy and paste to your function theme file.
14
-
15
- == Installation ==
16
-
17
- 1. Download, unzip and upload to your WordPress plugins directory
18
- 2. Activate the plugin within you WordPress Administration Backend
19
- 3. Go to Settings > Medias
20
- 4. Configure your new image sizes and regenerate the thumbnails !
21
-
22
- == Screenshots ==
23
-
24
- 1. Settings page
25
- 2. Regenerating
26
-
27
- == Changelog ==
28
- * 1.0.6
29
- * Minify javascript names
30
- * Change progressbar style
31
- * Add animations on progressbar
32
- * 1.0.5
33
- * Only add css and js script in the media page to avoid any javascript error in other pages
34
- * Rectify css
35
- * Add function to get the code for the function.php file of the theme
36
- * Don't redefine the Wordpress basic size names
37
- * 1.0.4
38
- * Fix the add_image_size issue ( height and width reversed )
39
- * 1.0.3
40
- * Fix the plugin language
41
- * Add some translations
42
- * Externalise some css
43
- * Add sizes in the image adding to an article
44
- * Add setting link in the plugins list
45
- * Use admin_url instead of home_url
46
- * Add legend for colors
47
- * Some code refactoring
48
- * 1.0.2
49
- * Fix the plugin license
50
- * 1.0.1
51
- * Add POT file
52
- * Add french translation
53
- * 1.0
54
- * First release
55
- * Thumbnail regenerate
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  * Image size generation
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.2
7
+ Stable tag: 2.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
+ You can regenerate all the sizes you have just created and choose which one you wanted to regenerate.
13
+ You can now get all the code to copy and paste to your function theme file.
14
+ Now you can use the generated sizes directly into your posts and insert images at the right size !
15
+
16
+ == Installation ==
17
+
18
+ 1. Download, unzip and upload to your WordPress plugins directory
19
+ 2. Activate the plugin within you WordPress Administration Backend
20
+ 3. Go to Settings > Medias
21
+ 4. Configure your new image sizes and regenerate the thumbnails !
22
+
23
+ == Screenshots ==
24
+
25
+ 1. Settings page
26
+ 2. Regenerating
27
+ 3. In posts thumbnails
28
+
29
+ == Changelog ==
30
+ * 2.0
31
+ * Code refactoring
32
+ * Update translations
33
+ * Ajaxification of the process
34
+ * Deleting by Ajax
35
+ * Updating by Ajax
36
+ * Adding by Ajax
37
+ * Change UI
38
+ * Change theme
39
+ * Handle ajax errors
40
+ * Handle not modified sizes, cropped
41
+ * Handle same names
42
+ * Sanitize the names
43
+ * Customize jQuery ui
44
+ * Customize jQuery ui theme
45
+ * HTML5 Elements
46
+ * CSS3 Animations
47
+ * 1.0.6
48
+ * Minify javascript names
49
+ * Change progressbar style
50
+ * Add animations on progressbar
51
+ * 1.0.5
52
+ * Only add css and js script in the media page to avoid any javascript error in other pages
53
+ * Rectify css
54
+ * Add function to get the code for the function.php file of the theme
55
+ * Don't redefine the Wordpress basic size names
56
+ * 1.0.4
57
+ * Fix the add_image_size issue ( height and width reversed )
58
+ * 1.0.3
59
+ * Fix the plugin language
60
+ * Add some translations
61
+ * Externalise some css
62
+ * Add sizes in the image adding to an article
63
+ * Add setting link in the plugins list
64
+ * Use admin_url instead of home_url
65
+ * Add legend for colors
66
+ * Some code refactoring
67
+ * 1.0.2
68
+ * Fix the plugin license
69
+ * 1.0.1
70
+ * Add POT file
71
+ * Add french translation
72
+ * 1.0
73
+ * First release
74
+ * Thumbnail regenerate
75
  * Image size generation
screenshot-1.png CHANGED
Binary file
screenshot-2.png CHANGED
Binary file
screenshot-3.png ADDED
Binary file
simple_image_sizes.php CHANGED
@@ -1,47 +1,49 @@
1
- <?php
2
- /*
3
- Plugin Name: Simple Image Size
4
- Plugin URI: http://wordpress.org/extend/plugins/simple-image-sizes/
5
- Description: Add options in media setting page for images sizes
6
- Version: 1.0.6
7
- Author: Rahe
8
- Author URI: http://www.beapi.fr
9
- Text Domain: sis
10
- Domain Path: /languages/
11
- Network: false
12
-
13
- Copyright 2011 Nicolas JUEN (njuen@beapi.fr) - Be-API
14
-
15
- This program is free software; you can redistribute it and/or modify
16
- it under the terms of the GNU General Public License as published by
17
- the Free Software Foundation; either version 2 of the License, or
18
- (at your option) any later version.
19
-
20
- This program is distributed in the hope that it will be useful,
21
- but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
- GNU General Public License for more details.
24
-
25
- You should have received a copy of the GNU General Public License
26
- along with this program; if not, write to the Free Software
27
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28
- */
29
-
30
- define( 'SIS_URL', plugins_url('/', __FILE__) );
31
- define( 'SIS_DIR', dirname(__FILE__) );
32
-
33
- require_once( SIS_DIR . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'class.admin.php' );
34
- require_once( SIS_DIR . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'class.client.php' );
35
-
36
- add_action ( 'plugins_loaded', 'initSIS' );
37
- function initSIS() {
38
- global $SIS;
39
- if( is_admin() )
40
- $SIS['admin'] = new SISAdmin();
41
-
42
- $SIS['client'] = new SISClient();
43
-
44
- load_plugin_textdomain ( 'sis', false, basename(rtrim(dirname(__FILE__), '/')) . '/languages' );
45
-
46
- }
 
 
47
  ?>
1
+ <?php
2
+ /*
3
+ Plugin Name: Simple Image Size
4
+ Plugin URI: http://wordpress.org/extend/plugins/simple-image-sizes/
5
+ Description: Add options in media setting page for images sizes
6
+ Version: 2.0
7
+ Author: Rahe
8
+ Author URI: http://www.beapi.fr
9
+ Text Domain: sis
10
+ Domain Path: /languages/
11
+ Network: false
12
+
13
+ Copyright 2011 Nicolas JUEN (njuen@beapi.fr) - Be-API
14
+
15
+ This program is free software; you can redistribute it and/or modify
16
+ it under the terms of the GNU General Public License as published by
17
+ the Free Software Foundation; either version 2 of the License, or
18
+ (at your option) any later version.
19
+
20
+ This program is distributed in the hope that it will be useful,
21
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
22
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
+ GNU General Public License for more details.
24
+
25
+ You should have received a copy of the GNU General Public License
26
+ along with this program; if not, write to the Free Software
27
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28
+ */
29
+
30
+ define( 'SIS_URL', plugins_url('/', __FILE__) );
31
+ define( 'SIS_DIR', dirname(__FILE__) );
32
+ define( 'SIS_VERSION', '2.0' );
33
+ define( 'SIS_OPTION', 'custom_image_sizes' );
34
+
35
+ require_once( SIS_DIR . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'class.admin.php' );
36
+ require_once( SIS_DIR . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'class.client.php' );
37
+
38
+ add_action ( 'plugins_loaded', 'initSIS' );
39
+ function initSIS() {
40
+ global $SIS;
41
+ if( is_admin() )
42
+ $SIS['admin'] = new SISAdmin();
43
+
44
+ $SIS['client'] = new SISClient();
45
+
46
+ load_plugin_textdomain ( 'sis', false, basename(rtrim(dirname(__FILE__), '/')) . '/languages' );
47
+
48
+ }
49
  ?>