Changeset 8083
- Timestamp:
- 06/14/2008 04:38:08 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/gears-manifest.php
r8066 r8083 88 88 { 89 89 "betaManifestVersion" : 1, 90 "version" : "<?php echo $man_version; ?>_200806 06",90 "version" : "<?php echo $man_version; ?>_20080613", 91 91 "entries" : [ 92 92 <?php echo $defaults; ?> … … 178 178 { "url" : "../wp-includes/js/tinymce/plugins/paste/css/blank.css?ver=3091" }, 179 179 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=3091" }, 180 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css?ver=3091" }, 180 181 { "url" : "../wp-includes/js/tinymce/wordpress.css?ver=3091" }, 181 182 -
trunk/wp-includes/js/thickbox/thickbox.css
r7961 r8083 117 117 position: fixed; 118 118 display:none; 119 height:13px;120 width:208px;121 119 z-index:103; 122 120 top: 50%; 123 121 left: 50%; 124 margin: -6px 0 0 -104px; /* -height/2 0 0 -width/2 */ 122 background-color: #E8E8E8; 123 border: 4px solid #525252; 124 margin: -45px 0pt 0pt -125px; 125 padding: 40px 15px 15px; 125 126 } 126 127 -
trunk/wp-includes/js/tinymce/langs/wp-langs.php
r7380 r8083 398 398 wp_page_alt:"' . mce_escape( __('Next page...') ) . '" 399 399 }); 400 401 tinyMCE.addI18n("' . $language . '.wpeditimage",{ 402 edit_img:"' . mce_escape( __('Edit Image') ) . '", 403 adv_settings:"' . mce_escape( __('Advanced Settings') ) . '", 404 none:"' . mce_escape( __('None') ) . '", 405 size:"' . mce_escape( __('Size') ) . '", 406 thumbnail:"' . mce_escape( __('Thumbnail') ) . '", 407 medium:"' . mce_escape( __('Medium') ) . '", 408 full_size:"' . mce_escape( __('Full Size') ) . '", 409 alt_help:"' . js_escape( __('Alternate text, e.g. "The Mona Lisa"') ) . '", 410 current_link:"' . mce_escape( __('Current Link') ) . '", 411 link_to_img:"' . mce_escape( __('Link to Image') ) . '", 412 link_help:"' . mce_escape( __('Enter a link URL or click above for presets.') ) . '", 413 adv_img_settings:"' . mce_escape( __('Advanced Image Settings') ) . '", 414 source:"' . mce_escape( __('Source') ) . '", 415 width:"' . mce_escape( __('Width') ) . '", 416 height:"' . mce_escape( __('Height') ) . '", 417 orig_size:"' . mce_escape( __('Original Size') ) . '", 418 css:"' . mce_escape( __('CSS Class') ) . '", 419 adv_link_settings:"' . mce_escape( __('Advanced Link Settings') ) . '", 420 link_rel:"' . mce_escape( __('Link Rel') ) . '", 421 height:"' . mce_escape( __('Height') ) . '", 422 orig_size:"' . mce_escape( __('Original Size') ) . '", 423 css:"' . mce_escape( __('CSS Class') ) . '", 424 caption:"' . mce_escape( __('Caption') ) . '" 425 }); 400 426 '; 401 427 ?> -
trunk/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css
r8066 r8083 39 39 } 40 40 41 img.alignright, 41 42 .alignright { 42 43 float: right; 43 44 } 44 45 46 img.alignleft, 45 47 .alignleft { 46 48 float: left; 47 49 } 48 50 49 .aligncenter {51 img.aligncenter { 50 52 display: block; 51 53 margin-left: auto; … … 62 64 63 65 .show-align { 64 padding: 8px;65 66 height: 200px; 67 width: 480px; 68 float: right; 66 69 background-color: #f1f1f1; 67 70 cursor: default; … … 74 77 border: 1px solid #c0c0c0; 75 78 width: 623px; 76 margin: 20px autoauto;79 margin: 15px auto; 77 80 } 78 81 … … 91 94 92 95 #img_demo { 93 padding: 0 5px 4px;96 padding: 0; 94 97 } 95 98 … … 138 141 139 142 #media-upload h3 { 140 clear: both;141 padding: 0pt 0pt 3px;142 border-bottom-style: solid;143 border-bottom-width: 1px;144 font-family: Georgia,"Times New Roman",Times,serif;145 font-size: 20px;146 font-weight: normal;147 line-height: normal;148 margin: 20px 0 15px -4px;149 padding: 0 0 3px 0;150 border-bottom-color: #DADADA;151 color: #5A5A5A;143 clear: both; 144 padding: 0pt 0pt 3px; 145 border-bottom-style: solid; 146 border-bottom-width: 1px; 147 font-family: Georgia,"Times New Roman",Times,serif; 148 font-size: 20px; 149 font-weight: normal; 150 line-height: normal; 151 margin: 0 0 10px -4px; 152 padding: 15px 0 3px; 153 border-bottom-color: #DADADA; 154 color: #5A5A5A; 152 155 } 153 156 154 157 #img_dim #width, 155 #img_dim #height { 156 width:40px; 158 #img_dim #height, 159 #img_prop #border, 160 #img_prop #vspace, 161 #img_prop #hspace { 162 width: 36px; 157 163 } 158 164 … … 161 167 } 162 168 163 #basic .align .field label { 164 margin: 0 10px 0 0; 165 padding: 0 0 0 25px; 169 #show_align_sp { 170 width: 115px; 166 171 } 167 172 173 #img_dim input, 174 #img_prop input { 175 margin-right: 10px; 176 } 177 -
trunk/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html
r8066 r8083 1 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr"lang="en-US">2 <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> 3 3 <head> 4 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> … … 10 10 <link rel="stylesheet" href="css/editimage.css?ver=3091" type="text/css" media="all" /> 11 11 <link rel="stylesheet" href="../../../../../wp-admin/css/media.css?ver=2.6-bleeding2" type="text/css" media="all" /> 12 <script type="text/javascript"> 13 if ( 'rtl' == tinyMCEPopup.editor.getParam('directionality','') ) 14 document.write('<link rel="stylesheet" href="css/editimage-rtl.css?ver=3091" type="text/css" media="all" />'); 15 </script> 12 16 <base target="_self" /> 13 17 </head> … … 16 20 <div id="media-upload-header"> 17 21 <ul id="sidemenu"> 18 <li><a href="javascript:;" id="tab_basic" class="current" onclick="wpImage.setTabs(this);">Edit image</a></li> 19 <li><a href="javascript:;" id="tab_advanced" onclick="wpImage.setTabs(this);">Advanced settings</a></li> 20 <li><a href="javascript:;" id="tab_attachment" style="display:none" target="_blanc" onclick="tinyMCEPopup.close();">Edit Attachment</a></li> 22 <li><a href="javascript:;" id="tab_basic" class="current" onclick="wpImage.setTabs(this);">{#wpeditimage.edit_img}</a></li> 23 <li><a href="javascript:;" id="tab_advanced" onclick="wpImage.setTabs(this);">{#wpeditimage.adv_settings}</a></li> 21 24 </ul> 22 25 </div> 23 26 24 27 <div id="img-edit"> 25 <form class="media-upload-form" action="" onsubmit="wpImage.update();"> 26 <div id="div_basic"> 27 28 <div class="show-align"> 28 <form class="media-upload-form" action="" onsubmit="wpImage.update();"> 29 30 <label for="show_align"> 31 <span id="show_align_sp" class="alignleft">{#preview.preview_desc}</span> 32 </label> 33 <div class="show-align" id="show_align"> 29 34 <img id="img_demo" src="img/image.png" alt="" /> 30 35 <span id="img_demo_txt"> … … 32 37 Ut lorem In penatibus libero id ipsum sagittis nec elit Sed. Condimentum eget Vivamus vel consectetuer lorem molestie turpis amet tellus id. Condimentum vel ridiculus Fusce sed pede Nam nunc sodales eros tempor. Sit lacus magna dictumst Curabitur fringilla auctor id vitae wisi facilisi. Fermentum eget turpis felis velit leo Nunc Proin orci molestie Praesent. Curabitur tellus scelerisque suscipit ut sem amet cursus mi Morbi eu. Donec libero Vestibulum augue et mollis accumsan ornare condimentum In enim. Leo eget ac consectetuer quis condimentum malesuada. 33 38 Condimentum commodo et Lorem fringilla malesuada libero volutpat sem tellus enim. Tincidunt sed at Aenean nec nonummy porttitor Nam Sed Nulla ut. Auctor leo In aliquet Curabitur eros et velit Quisque justo morbi. Et vel mauris sit nulla semper vitae et quis at dui. Id at elit laoreet justo eu mauris Quisque et interdum pharetra. Nullam accumsan interdum Maecenas condimentum quis quis Fusce a sollicitudin Sed. Non Quisque Vivamus congue porttitor non semper ipsum porttitor quis vel. Donec eros lacus volutpat et tincidunt sem convallis id venenatis sit. Consectetuer odio. 34 Semper faucibus Morbi nulla convallis orci Aliquam Sed porttitor et Pellentesque. Venenatis laoreet lorem id a a Morbi augue turpis id semper. Arcu volutpat ac mauris Vestibulum fringilla Aenean condimentum nibh sed id. Sagittis eu lacus orci urna tellus tellus pretium Curabitur dui nunc. Et nibh eu eu nibh adipiscing at lorem Vestibulum adipiscing augue. Magna convallis Phasellus dolor malesuada Curabitur ornare adipiscing tellus Aliquam tempus. Id Aliquam Integer augue Nulla consectetuer ac Donec Curabitur tincidunt et. Id vel Nunc amet lacus dui magna ridiculus penatibus laoreet Duis. Enim sagittis nibh quis Nulla nec laoreet vel Maecenas mattis vel. Nullam velit est Curabitur gravida Vestibulum justo.39 Semper faucibus Morbi nulla convallis orci Aliquam Sed porttitor et Pellentesque. Venenatis laoreet lorem id a a Morbi augue turpis id semper. Arcu volutpat ac mauris Vestibulum fringilla Aenean condimentum nibh sed id. Sagittis eu lacus orci urna tellus tellus pretium Curabitur dui nunc. Et nibh eu eu nibh adipiscing at lorem Vestibulum adipiscing augue. Magna convallis Phasellus dolor malesuada Curabitur ornare adipiscing tellus Aliquam tempus. Id Aliquam Integer augue Nulla consectetuer ac Donec Curabitur tincidunt et. Id vel Nunc amet lacus dui magna ridiculus penatibus laoreet Duis. Enim sagittis nibh quis Nulla nec laoreet vel Maecenas mattis vel. 35 40 </span> 36 41 </div> 37 42 38 <table id="basic" class="describe"> 43 <div id="div_basic"> 44 <table id="basic" class="describe"> 39 45 <tbody> 40 <tr class="">41 <th valign="top" scope="row" class="label">42 <label for="img_title">43 <span class="alignleft">Title</span>44 <span class="alignright"><abbr title="required" class="required">*</abbr></span>45 </label>46 </th>47 <td class="field">48 <input type="text" id="img_title" name="img_title" value="" aria-required="true" size="60" />49 </td>50 </tr>51 52 <tr class="post_excerpt">53 <th valign="top" scope="row" class="label">54 <label for="img_alt">55 <span class="alignleft">Caption</span>56 </label>57 </th>58 <td class="field">59 <input type="text" id="img_alt" name="img_alt" value="" size="60" />60 <p class="help">Alternate text, e.g. "The Mona Lisa"</p>61 </td>62 </tr>63 64 <tr class="url">65 <th valign="top" scope="row" class="label">66 <label for="link_href">67 <span class="alignleft" id="lb_link_href">Link URL</span>68 </label>69 </th>70 <td class="field">71 <input type="text" id="link_href" name="link_href" value="" /><br />72 <input type="button" class="button" onclick="wpImage.I('link_href').value='';" value="None" />73 <input type="button" class="button" id="img_url_current" onclick="wpImage.img_seturl('current')" value="Current Link" />74 <input type="button" class="button" id="img_url_img" onclick="wpImage.img_seturl('link')" value="Link to Image" />75 <p class="help">Enter a link URL or click above for presets.</p>76 </td>77 </tr>78 46 79 47 <tr class="align"> 80 48 <th valign="top" scope="row" class="label"> 81 49 <label for="img_align_td"> 82 <span class="alignleft">{# advanced_dlg.image_align}</span>50 <span class="alignleft">{#contextmenu.align}</span> 83 51 </label> 84 52 </th> 85 53 <td class="field" id="img_align_td"> 86 54 <input type="radio" onclick="wpImage.imgAlignCls('alignnone')" name="img_align" id="alignnone" value="alignnone" /> 87 <label for="alignnone" class="align image-align-none-label"> None</label>55 <label for="alignnone" class="align image-align-none-label">{#wpeditimage.none}</label> 88 56 89 57 <input type="radio" onclick="wpImage.imgAlignCls('alignleft')" name="img_align" id="alignleft" value="alignleft" /> 90 <label for="alignleft" class="align image-align-left-label">{# advanced_dlg.image_align_left}</label>58 <label for="alignleft" class="align image-align-left-label">{#contextmenu.left}</label> 91 59 92 60 <input type="radio" onclick="wpImage.imgAlignCls('aligncenter')" name="img_align" id="aligncenter" value="aligncenter" /> 93 <label for="aligncenter" class="align image-align-center-label"> Center</label>61 <label for="aligncenter" class="align image-align-center-label">{#contextmenu.center}</label> 94 62 95 63 <input type="radio" onclick="wpImage.imgAlignCls('alignright')" name="img_align" id="alignright" value="alignright" /> 96 <label for="alignright" class="align image-align-right-label">{# advanced_dlg.image_align_right}</label>64 <label for="alignright" class="align image-align-right-label">{#contextmenu.right}</label> 97 65 </td> 98 66 </tr> … … 101 69 <th valign="top" scope="row" class="label"> 102 70 <label for="img_size"> 103 <span class="alignleft"> Size</span>71 <span class="alignleft">{#wpeditimage.size}</span> 104 72 </label> 105 73 </th> 106 74 <td class="field" id="img_size"> 107 75 <input onclick="wpImage.imgEditSize('thumbnail')" type="radio" name="img_size" id="thumbnail" value="thumbnail" /> 108 <label for="thumbnail" id="lb_sizethumb"> Thumbnail</label>76 <label for="thumbnail" id="lb_sizethumb">{#wpeditimage.thumbnail}</label> 109 77 110 78 <input onclick="wpImage.imgEditSize('medium')" type="radio" name="img_size" id="medium" value="medium" /> 111 <label for="medium" id="lb_sizemedium"> Medium</label>79 <label for="medium" id="lb_sizemedium">{#wpeditimage.medium}</label> 112 80 113 81 <input onclick="wpImage.imgEditSize('full')" type="radio" name="img_size" id="full" value="full" /> 114 <label for="full" id="lb_sizefull">Full_size</label> 82 <label for="full" id="lb_sizefull">{#wpeditimage.full_size}</label> 83 </td> 84 </tr> 85 86 <tr class=""> 87 <th valign="top" scope="row" class="label"> 88 <label for="img_title"> 89 <span class="alignleft">{#advanced_dlg.link_titlefield}</span> 90 <span class="alignright"><abbr title="required" class="required">*</abbr></span> 91 </label> 92 </th> 93 <td class="field"> 94 <input type="text" id="img_title" name="img_title" value="" aria-required="true" size="60" /> 95 </td> 96 </tr> 97 98 <tr class="post_excerpt"> 99 <th valign="top" scope="row" class="label"> 100 <label for="img_alt"> 101 <span class="alignleft">{#wpeditimage.caption}</span> 102 </label> 103 </th> 104 <td class="field"> 105 <input type="text" id="img_alt" name="img_alt" value="" size="60" /> 106 <p class="help">{#wpeditimage.alt_help}</p> 107 </td> 108 </tr> 109 110 <tr class="url"> 111 <th valign="top" scope="row" class="label"> 112 <label for="link_href"> 113 <span class="alignleft" id="lb_link_href">{#advanced_dlg.link_url}</span> 114 </label> 115 </th> 116 <td class="field"> 117 <input type="text" id="link_href" name="link_href" value="" /><br /> 118 <input type="button" class="button" onclick="wpImage.I('link_href').value='';" value="{#wpeditimage.none}" /> 119 <input type="button" class="button" id="img_url_current" onclick="wpImage.img_seturl('current')" value="{#wpeditimage.current_link}" /> 120 <input type="button" class="button" id="img_url_img" onclick="wpImage.img_seturl('link')" value="{#wpeditimage.link_to_img}" /> 121 <p class="help">{#wpeditimage.link_help}</p> 115 122 </td> 116 123 </tr> … … 119 126 120 127 <div id="div_advanced" style="display:none;"> 121 <h3> Advanced Image Settings</h3>122 <table id="adv_settings_img" class="describe"> 128 <h3>{#wpeditimage.adv_img_settings}</h3> 129 <table id="adv_settings_img" class="describe"> 123 130 <tbody> 124 131 <tr> 125 132 <th valign="top" scope="row" class="label"> 126 133 <label for="img_src"> 127 <span class="alignleft"> Source</span>134 <span class="alignleft">{#wpeditimage.source}</span> 128 135 <span class="alignright"><abbr title="required" class="required">*</abbr></span> 129 136 </label> 130 137 </th> 131 138 <td class="field"> 132 <input type="text" id="img_src" name="img_src" value="" onblur="wpImage.checkVal(this)" size="60" /> 133 </td> 134 </tr> 135 136 <tr> 137 <th valign="top" scope="row" class="label"> 138 <label for="img_dim"> 139 <span class="alignleft">Size</span> 140 <span class="alignright"></span> 141 </label> 142 </th> 143 <td class="field" id="img_dim"> 144 <label for="width">Width</label> 145 <input type="text" id="width" name="width" value="" /> 146 147 <label for="height">Height</label> 148 <input type="text" id="height" name="height" value="" /> 149 <input type="button" class="button" id="orig_size" name="orig_size" value="Original Size" onclick="wpImage.origSize();" /> 150 139 <input type="text" id="img_src" name="img_src" value="" onblur="wpImage.checkVal(this)" aria-required="true" size="60" /> 140 </td> 141 </tr> 142 143 <tr id="img_dim"> 144 <th valign="top" scope="row" class="label"> 145 <label> 146 <span class="alignleft">{#wpeditimage.size}</span> 147 </label> 148 </th> 149 <td class="field"> 150 <label for="width">{#wpeditimage.width}</label> 151 <input type="text" maxlength="5" id="width" name="width" value="" /> 152 153 <label for="height">{#wpeditimage.height}</label> 154 <input type="text" maxlength="5" id="height" name="height" value="" /> 155 156 <input type="button" class="button" id="orig_size" name="orig_size" value="{#wpeditimage.orig_size}" onclick="wpImage.origSize();" /> 151 157 </td> 152 158 </tr> … … 155 161 <th valign="top" scope="row" class="label"> 156 162 <label for="img_classes"> 157 <span class="alignleft"> CSS Class</span>163 <span class="alignleft">{#wpeditimage.css}</span> 158 164 </label> 159 165 </th> … … 166 172 <th valign="top" scope="row" class="label"> 167 173 <label for="img_style"> 168 <span class="alignleft">Style</span> 169 </label> 170 </th> 171 <td class="field"> 172 <input type="text" id="img_style" name="img_style" value="" size="60" /> 174 <span class="alignleft">{#advanced.style_select}</span> 175 </label> 176 </th> 177 <td class="field"> 178 <input type="text" id="img_style" name="img_style" value="" size="60" onblur="wpImage.demoSetStyle();" /> 179 </td> 180 </tr> 181 182 <tr id="img_prop"> 183 <th valign="top" scope="row" class="label"> 184 <label for="img_prop"> 185 <span class="alignleft">{#advanced.image_props_desc}</span> 186 </label> 187 </th> 188 <td class="field"> 189 <label for="border">{#advanced_dlg.image_border}</label> 190 <input type="text" maxlength="5" id="border" name="border" value="" onblur="wpImage.updateStyle('border')" /> 191 192 <label for="vspace">{#advanced_dlg.image_vspace}</label> 193 <input type="text" maxlength="5" id="vspace" name="vspace" value="" onblur="wpImage.updateStyle('vspace')" /> 194 195 <label for="hspace">{#advanced_dlg.image_hspace}</label> 196 <input type="text" maxlength="5" id="hspace" name="hspace" value="" onblur="wpImage.updateStyle('hspace')" /> 173 197 </td> 174 198 </tr> … … 176 200 </table> 177 201 178 <h3> Advanced Link Settings</h3>179 <table id="adv_settings_ img" class="describe">202 <h3>{#wpeditimage.adv_link_settings}</h3> 203 <table id="adv_settings_link" class="describe"> 180 204 <tbody> 181 205 <tr> 182 206 <th valign="top" scope="row" class="label"> 183 207 <label for="link_title"> 184 <span class="alignleft"> Link Title</span>208 <span class="alignleft">{#advanced_dlg.link_titlefield}</span> 185 209 </label> 186 210 </th> … … 193 217 <th valign="top" scope="row" class="label"> 194 218 <label for="link_rel"> 195 <span class="alignleft"> Link Rel</span>219 <span class="alignleft">{#wpeditimage.link_rel}</span> 196 220 </label> 197 221 </th> … … 203 227 <tr> 204 228 <th valign="top" scope="row" class="label"> 205 <label for="link_rev">206 <span class="alignleft">Link Rev</span>207 </label>208 </th>209 <td class="field">210 <input type="text" id="link_rev" name="link_rev" value="" size="60" />211 </td>212 </tr>213 214 <tr>215 <th valign="top" scope="row" class="label">216 229 <label for="link_classes"> 217 <span class="alignleft"> CSS Class</span>230 <span class="alignleft">{#wpeditimage.css}</span> 218 231 </label> 219 232 </th> … … 226 239 <th valign="top" scope="row" class="label"> 227 240 <label for="link_style"> 228 <span class="alignleft"> Style</span>241 <span class="alignleft">{#advanced.style_select}</span> 229 242 </label> 230 243 </th> … … 236 249 <tr> 237 250 <th valign="top" scope="row" class="label"> 251 <label> 252 <span class="alignleft">{#advanced_dlg.link_target}</span> 253 </label> 254 </th> 255 <td class="field"> 238 256 <label for="link_target"> 239 <span class="alignleft">Target</span> 240 </label> 241 </th> 242 <td class="field"> 243 <input type="text" id="link_target" name="link_target" value="" size="60" /> 257 {#advanced_dlg.link_target_blank} 258 </label> 259 <input type="checkbox" id="link_target" name="link_target" value="_blank" /> 244 260 </td> 245 261 </tr> … … 248 264 249 265 <div id="saveeditimg"> 250 <input type="hidden" id="border" name="border" value="" />251 <input type="hidden" id="hspace" name="hspace" value="" />252 <input type="hidden" id="vspace" name="vspace" value="" />253 266 <input type="hidden" id="align" name="align" value="" /> 254 267 -
trunk/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js
r8066 r8083 95 95 link : '', 96 96 link_rel : '', 97 target_value : '', 97 98 98 99 setTabs : function(tab) { … … 180 181 m = Math.min(W, m); 181 182 f.width.value = m; 182 f.height.value = Math. floor((m / W) * H);183 f.height.value = Math.round((m / W) * H); 183 184 } else { 184 185 m = Math.min(H, m); 185 186 f.height.value = m; 186 f.width.value = Math. floor((m / H) * W);187 f.width.value = Math.round((m / H) * W); 187 188 } 188 189 … … 196 197 var demo = this.I('img_demo'), f = document.forms[0]; 197 198 198 demo.style.width = f.width.value ? Math.floor(f.width.value * 0.6) + 'px' : ''; 199 demo.style.height = f.height.value ? Math.floor(f.height.value * 0.6) + 'px' : '60%'; 199 demo.width = f.width.value ? Math.floor(f.width.value * 0.5) : ''; 200 demo.height = f.height.value ? Math.floor(f.height.value * 0.5) : ''; 201 }, 202 203 demoSetStyle : function() { 204 var f = document.forms[0], demo = this.I('img_demo'); 205 206 if (demo) 207 tinyMCEPopup.editor.dom.setAttrib(demo, 'style', f.img_style.value); 200 208 }, 201 209 … … 218 226 h = h.replace(/ (value|title|alt)=([^"][^\s>]+)/gi, ' $1="$2"') 219 227 220 document.dir = ed.getParam('directionality','');221 228 document.body.innerHTML = ed.translate(h); 222 229 window.setTimeout( function(){wpImage.setup();}, 100 ); … … 224 231 225 232 setup : function() { 226 var t = this, h, c, el, id, link, fname, f = document.forms[0], ed = tinyMCEPopup.editor, d = t.I('img_demo'), tr = ed.translate;227 233 var t = this, h, c, el, id, link, fname, f = document.forms[0], ed = tinyMCEPopup.editor, d = t.I('img_demo'), dom = tinyMCEPopup.dom; 234 document.dir = tinyMCEPopup.editor.getParam('directionality',''); 228 235 tinyMCEPopup.restoreSelection(); 229 236 el = ed.selection.getNode(); … … 242 249 f.img_classes.value = c = ed.dom.getAttrib(el, 'class'); 243 250 f.img_style.value = ed.dom.getAttrib(el, 'style'); 244 this.updateStyle(); 251 252 // Move attribs to styles 253 if (dom.getAttrib(el, 'align')) 254 t.updateStyle('align'); 255 256 if (dom.getAttrib(el, 'hspace')) 257 t.updateStyle('hspace'); 258 259 if (dom.getAttrib(el, 'border')) 260 t.updateStyle('border'); 261 262 if (dom.getAttrib(el, 'vspace')) 263 t.updateStyle('vspace'); 245 264 246 265 if (pa = ed.dom.getParent(el, 'A')) { … … 248 267 f.link_title.value = ed.dom.getAttrib(pa, 'title'); 249 268 f.link_rel.value = t.link_rel = ed.dom.getAttrib(pa, 'rel'); 250 f.link_rev.value = ed.dom.getAttrib(pa, 'rev');251 269 f.link_style.value = ed.dom.getAttrib(pa, 'style'); 252 f.link_target.value = ed.dom.getAttrib(pa, 'target');270 t.target_value = ed.dom.getAttrib(pa, 'target'); 253 271 f.link_classes.value = ed.dom.getAttrib(pa, 'class'); 254 272 } 255 273 274 f.link_target.checked = ( t.target_value && t.target_value == '_blank' ) ? 'checked' : ''; 275 256 276 fname = link.substring( link.lastIndexOf('/') ); 257 277 fname = fname.replace(/-[0-9]{2,4}x[0-9]{2,4}/, '' ); … … 281 301 document.body.style.display = ''; 282 302 t.getImageData(); 283 284 if ( (id = c.match( /wp-image-([0-9]{1,6})/ )) && id[1] ) { 285 t.I('tab_attachment').href = tinymce.documentBaseURL + 'media.php?action=edit&attachment_id=' + id[1]; 286 t.I('tab_attachment').style.display = 'inline'; 287 } 303 t.demoSetStyle(); 304 305 // Test if is attachment 306 // if ( (id = c.match( /wp-image-([0-9]{1,6})/ )) && id[1] ) { 307 // t.I('tab_attachment').href = tinymce.documentBaseURL + 'media.php?action=edit&attachment_id=' + id[1]; 308 // t.I('tab_attachment').style.display = 'inline'; 309 // } 288 310 }, 289 311 … … 351 373 title : f.link_title.value, 352 374 rel : f.link_rel.value, 353 rev : f.link_rev.value, 354 target : f.link_target.value, 375 target : (f.link_target.checked == true) ? '_blank' : '', 355 376 'class' : f.link_classes.value, 356 377 style : f.link_style.value … … 363 384 title : f.link_title.value, 364 385 rel : f.link_rel.value, 365 rev : f.link_rev.value, 366 target : f.link_target.value, 386 target : (f.link_target.checked == true) ? '_blank' : '', 367 387 'class' : f.link_classes.value, 368 388 style : f.link_style.value … … 373 393 tinyMCEPopup.close(); 374 394 }, 375 376 updateStyle : function( ) {377 var dom = tinyMCEPopup.dom, st, v, f = document.forms[0] ;395 396 updateStyle : function(ty) { 397 var dom = tinyMCEPopup.dom, st, v, f = document.forms[0], img = dom.create('img', {style : f.img_style.value}); 378 398 379 399 if (tinyMCEPopup.editor.settings.inline_styles) { 380 st = tinyMCEPopup.dom.parseStyle(f.img_style.value);381 382 400 // Handle align 383 v = f.align.value; 384 if (v) { 385 if (v == 'left' || v == 'right') { 386 st['float'] = v; 387 delete st['vertical-align']; 388 } else { 389 st['vertical-align'] = v; 390 delete st['float']; 401 if (ty == 'align') { 402 dom.setStyle(img, 'float', ''); 403 dom.setStyle(img, 'vertical-align', ''); 404 405 v = f.align.value; 406 if (v) { 407 if (v == 'left' || v == 'right') 408 dom.setStyle(img, 'float', v); 409 else 410 img.style.verticalAlign = v; 391 411 } 392 } else {393 delete st['float'];394 delete st['vertical-align'];395 412 } 396 413 397 414 // Handle border 398 v = f.border.value; 399 if (v || v == '0') { 400 if (v == '0') 401 st['border'] = '0'; 402 else 403 st['border'] = v + 'px solid black'; 404 } else 405 delete st['border']; 415 if (ty == 'border') { 416 dom.setStyle(img, 'border', ''); 417 418 v = f.border.value; 419 if (v || v == '0') { 420 if (v == '0') 421 img.style.border = '0'; 422 else 423 img.style.border = v + 'px solid black'; 424 } 425 } 406 426 407 427 // Handle hspace 408 v = f.hspace.value; 409 if (v) { 410 delete st['margin']; 411 st['margin-left'] = v + 'px'; 412 st['margin-right'] = v + 'px'; 413 } else { 414 delete st['margin-left']; 415 delete st['margin-right']; 428 if (ty == 'hspace') { 429 dom.setStyle(img, 'marginLeft', ''); 430 dom.setStyle(img, 'marginRight', ''); 431 432 v = f.hspace.value; 433 if (v) { 434 img.style.marginLeft = v + 'px'; 435 img.style.marginRight = v + 'px'; 436 } 416 437 } 417 438 418 439 // Handle vspace 419 v = f.vspace.value; 420 if (v) { 421 delete st['margin']; 422 st['margin-top'] = v + 'px'; 423 st['margin-bottom'] = v + 'px'; 424 } else { 425 delete st['margin-top']; 426 delete st['margin-bottom']; 440 if (ty == 'vspace') { 441 dom.setStyle(img, 'marginTop', ''); 442 dom.setStyle(img, 'marginBottom', ''); 443 444 v = f.vspace.value; 445 if (v) { 446 img.style.marginTop = v + 'px'; 447 img.style.marginBottom = v + 'px'; 448 } 427 449 } 428 450 429 451 // Merge 430 st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st));431 f.img_style.value = dom.serializeStyle(st);452 f.img_style.value = dom.serializeStyle(dom.parseStyle(img.style.cssText)); 453 this.demoSetStyle(); 432 454 } 433 455 }, … … 445 467 var f = document.forms[0]; 446 468 447 f.width.value = f.height.value = "";469 f.width.value = f.height.value = ''; 448 470 }, 449 471 -
trunk/wp-includes/js/tinymce/tiny_mce_config.php
r8066 r8083 227 227 if ( $disk_cache ) { 228 228 229 $cacheKey = apply_filters('tiny_mce_version', '200806 06');229 $cacheKey = apply_filters('tiny_mce_version', '20080613'); 230 230 231 231 foreach ( $initArray as $v ) -
trunk/wp-includes/script-loader.php
r8066 r8083 36 36 37 37 // Modify this version when tinyMCE plugins are changed. 38 $mce_version = apply_filters('tiny_mce_version', '200806 06');38 $mce_version = apply_filters('tiny_mce_version', '20080613'); 39 39 $scripts->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version ); 40 40 … … 227 227 $styles->add( 'theme-editor', '/wp-admin/css/theme-editor.css' ); 228 228 $styles->add( 'press-this', '/wp-admin/css/press-this.css' ); 229 $styles->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.css' );229 $styles->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.css', array(), '20080613' ); 230 230 $styles->add( 'login', '/wp-admin/css/login.css' ); 231 231
Note: See TracChangeset
for help on using the changeset viewer.