Ticket #6812: img_captions6.patch
File img_captions6.patch, 11.4 KB (added by , 16 years ago) |
---|
-
wp-admin/gears-manifest.php
64 64 ?> 65 65 { 66 66 "betaManifestVersion" : 1, 67 "version" : "<?php echo $man_version; ?>_200807 09",67 "version" : "<?php echo $man_version; ?>_20080710", 68 68 "entries" : [ 69 69 <?php echo $defaults; ?> 70 70 … … 131 131 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/link.js?ver=311" }, 132 132 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/source_editor.js?ver=311" }, 133 133 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/anchor.js?ver=311" }, 134 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js?ver=311 " },134 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js?ver=311c" }, 135 135 { "url" : "../wp-includes/js/tinymce/tiny_mce.js?ver=311" }, 136 136 { "url" : "../wp-includes/js/tinymce/themes/advanced/editor_template.js?ver=311" }, 137 137 { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js?ver=311" }, … … 148 148 { "url" : "../wp-includes/js/tinymce/plugins/paste/pastetext.htm?ver=311" }, 149 149 { "url" : "../wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm?ver=311" }, 150 150 { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/template.htm?ver=311" }, 151 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=311 b" },151 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=311c" }, 152 152 { "url" : "../wp-includes/js/tinymce/wp-mce-help.php?ver=311" }, 153 153 154 154 { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css?ver=311" }, … … 161 161 { "url" : "../wp-includes/js/tinymce/plugins/media/css/media.css?ver=311" }, 162 162 { "url" : "../wp-includes/js/tinymce/plugins/paste/css/pasteword.css?ver=311" }, 163 163 { "url" : "../wp-includes/js/tinymce/plugins/paste/css/blank.css?ver=311" }, 164 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=311 b" },164 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=311c" }, 165 165 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css?ver=311" }, 166 166 { "url" : "../wp-includes/js/tinymce/wordpress.css?ver=311" }, 167 167 -
wp-includes/js/tinymce/langs/wp-langs.php
411 411 thumbnail:"' . mce_escape( __('Thumbnail') ) . '", 412 412 medium:"' . mce_escape( __('Medium') ) . '", 413 413 full_size:"' . mce_escape( __('Full Size') ) . '", 414 alt_help:"' . js_escape( __('Alternate text, e.g. "The Mona Lisa"') ) . '",415 414 current_link:"' . mce_escape( __('Current Link') ) . '", 416 415 link_to_img:"' . mce_escape( __('Link to Image') ) . '", 417 416 link_help:"' . mce_escape( __('Enter a link URL or click above for presets.') ) . '", … … 435 434 s120:"' . mce_escape( __('120%') ) . '", 436 435 s130:"' . mce_escape( __('130%') ) . '", 437 436 img_title:"' . mce_escape( __('Edit Image Title') ) . '", 438 caption:"' . mce_escape( __('Edit Image Caption') ) . '" 437 caption:"' . mce_escape( __('Edit Image Caption') ) . '", 438 alt:"' . mce_escape( __('Edit Alternate Text') ) . '" 439 439 }); 440 440 '; 441 441 ?> 442 No newline at end of file -
wp-includes/js/tinymce/plugins/wpeditimage/editimage.html
4 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 5 5 <title></title> 6 6 7 <script type="text/javascript" src="js/editimage.js?ver=311 "></script>7 <script type="text/javascript" src="js/editimage.js?ver=311c"></script> 8 8 <script type="text/javascript" src="../../utils/form_utils.js?ver=311"></script> 9 9 10 <link rel="stylesheet" href="css/editimage.css?ver=311 b" type="text/css" media="all" />11 <link rel="stylesheet" href="../../../../../wp-admin/css/media.css?ver=2.6-beta 1" type="text/css" media="all" />10 <link rel="stylesheet" href="css/editimage.css?ver=311c" type="text/css" media="all" /> 11 <link rel="stylesheet" href="../../../../../wp-admin/css/media.css?ver=2.6-beta3" type="text/css" media="all" /> 12 12 <script type="text/javascript"> 13 13 if ( 'rtl' == tinyMCEPopup.editor.getParam('directionality','') ) 14 14 document.write('<link rel="stylesheet" href="css/editimage-rtl.css?ver=311" type="text/css" media="all" />'); … … 74 74 </td> 75 75 </tr> 76 76 77 <tr class="">77 <tr> 78 78 <th valign="top" scope="row" class="label"> 79 79 <label for="img_title"> 80 80 <span class="alignleft">{#wpeditimage.img_title}</span> … … 85 85 </td> 86 86 </tr> 87 87 88 <tr class="post_excerpt">88 <tr> 89 89 <th valign="top" scope="row" class="label"> 90 <label for="img_ alt">90 <label for="img_cap"> 91 91 <span class="alignleft">{#wpeditimage.caption}</span> 92 92 </label> 93 93 </th> 94 94 <td class="field"> 95 <input type="text" id="img_alt" name="img_alt" value="" size="60" /> 96 <p class="help">{#wpeditimage.alt_help}</p> 95 <input type="text" id="img_cap" name="img_cap" value="" size="60" /> 97 96 </td> 98 97 </tr> 99 98 100 <tr class="url">99 <tr> 101 100 <th valign="top" scope="row" class="label"> 102 101 <label for="link_href"> 103 102 <span class="alignleft" id="lb_link_href">{#advanced_dlg.link_url}</span> … … 129 128 <input type="text" id="img_src" name="img_src" value="" onblur="wpImage.checkVal(this)" aria-required="true" size="60" /> 130 129 </td> 131 130 </tr> 131 132 <tr> 133 <th valign="top" scope="row" class="label"> 134 <label for="img_alt"> 135 <span class="alignleft">{#wpeditimage.alt}</span> 136 </label> 137 </th> 138 <td class="field"> 139 <input type="text" id="img_alt" name="img_alt" value="" size="60" /> 140 </td> 141 </tr> 132 142 133 143 <tr id="img_dim"> 134 144 <th valign="top" scope="row" class="label"> -
wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js
15 15 if ( ed.dom.getAttrib(el, 'class').indexOf('mceItem') != -1 || el.nodeName != 'IMG' ) 16 16 return; 17 17 18 tb_show('', url + '/editimage.html?ver=311 b&TB_iframe=true');18 tb_show('', url + '/editimage.html?ver=311c&TB_iframe=true'); 19 19 tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' ); 20 20 }); 21 21 … … 34 34 }); 35 35 36 36 ed.onMouseUp.add(function(ed, e) { 37 if ( ! tinymce.isOpera ) return; 38 if ( e.target.nodeName == 'IMG' ) 39 ed.plugins.wpeditimage.showButtons(e.target); 37 if ( tinymce.isOpera ) { 38 if ( e.target.nodeName == 'IMG' ) 39 ed.plugins.wpeditimage.showButtons(e.target); 40 } else if ( ! tinymce.isWebKit ) { 41 var n = ed.selection.getNode(), DL; 42 43 if ( n.nodeName == 'IMG' && (DL = ed.dom.getParent(n, 'DL')) ) { 44 window.setTimeout(function(){ 45 var ed = tinyMCE.activeEditor, n = ed.selection.getNode(), DL = ed.dom.getParent(n, 'DL'); 46 47 if ( n.width != (parseInt(ed.dom.getStyle(DL, 'width')) - 10) ) { 48 ed.dom.setStyle(DL, 'width', parseInt(n.width)+10); 49 ed.execCommand('mceRepaint'); 50 } 51 }, 100); 52 } 53 } 40 54 }); 41 55 42 56 ed.onMouseDown.add(function(ed, e) { -
wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js
245 245 }, 246 246 247 247 setup : function() { 248 var t = this, h, c, el, id, link, fname, f = document.forms[0], ed = tinyMCEPopup.editor, d = t.I('img_demo'), dom = tinyMCEPopup.dom, DL, caption ;248 var t = this, h, c, el, id, link, fname, f = document.forms[0], ed = tinyMCEPopup.editor, d = t.I('img_demo'), dom = tinyMCEPopup.dom, DL, caption = null; 249 249 document.dir = tinyMCEPopup.editor.getParam('directionality',''); 250 250 tinyMCEPopup.restoreSelection(); 251 251 el = ed.selection.getNode(); … … 255 255 ed.dom.setStyle(el, 'float', ''); 256 256 t.getImageData(); 257 257 c = ed.dom.getAttrib(el, 'class'); 258 caption = t.img_alt = ed.dom.getAttrib(el, 'alt');259 258 260 259 if ( DL = dom.getParent(el, 'dl') ) { 261 260 var dlc = ed.dom.getAttrib(DL, 'class'); 262 261 dlc = dlc.match(/align[^ "']+/i); 263 if ( dlc && ! dom.hasClass(el, dlc) ) 262 if ( dlc && ! dom.hasClass(el, dlc) ) { 264 263 c += ' '+dlc; 264 tinymce.trim(c); 265 } 265 266 266 267 tinymce.each(DL.childNodes, function(e) { 267 268 if ( e.nodeName == 'DD' && dom.hasClass(e, 'wp_caption_dd') ) { … … 271 272 }); 272 273 } 273 274 275 f.img_cap.value = caption; 274 276 f.img_title.value = ed.dom.getAttrib(el, 'title'); 275 f.img_alt.value = caption;277 f.img_alt.value = ed.dom.getAttrib(el, 'alt'); 276 278 f.border.value = ed.dom.getAttrib(el, 'border'); 277 279 f.vspace.value = ed.dom.getAttrib(el, 'vspace'); 278 280 f.hspace.value = ed.dom.getAttrib(el, 'hspace'); … … 355 357 return; 356 358 } 357 359 358 if ( f.img_ alt.value != '' && f.width.value != '' ) {360 if ( f.img_cap.value != '' && f.width.value != '' ) { 359 361 do_caption = 1; 360 362 img_class = img_class.replace( /align[^ "']+\s?/gi, '' ); 361 363 } … … 370 372 ed.dom.setAttribs(el, { 371 373 src : f.img_src.value, 372 374 title : f.img_title.value, 373 alt : t.img_alt,375 alt : f.img_alt.value, 374 376 width : f.width.value, 375 377 height : f.height.value, 376 378 style : f.img_style.value, … … 429 431 ed.dom.setAttrib(DIV, 'class', div_cls); 430 432 431 433 if ( (DT = ed.dom.getParent(el, 'dt')) && (DD = DT.nextSibling) && ed.dom.hasClass(DD, 'wp_caption_dd') ) 432 ed.dom.setHTML(DD, f.img_ alt.value);434 ed.dom.setHTML(DD, f.img_cap.value); 433 435 434 436 } else { 435 437 var lnk = '', pa; … … 447 449 } else html = ed.dom.getOuterHTML(el); 448 450 449 451 html = '<dl id="'+cap_id+'" class="wp_caption '+t.align+'" style="width: '+cap_width+ 450 'px"><dt class="wp_caption_dt">'+html+'</dt><dd class="wp_caption_dd">'+f.img_ alt.value+'</dd></dl>';452 'px"><dt class="wp_caption_dt">'+html+'</dt><dd class="wp_caption_dd">'+f.img_cap.value+'</dd></dl>'; 451 453 452 454 cap = ed.dom.create('div', {'class': div_cls}, html); 453 455 -
wp-includes/js/tinymce/tiny_mce_config.php
222 222 // Setup cache info 223 223 if ( $disk_cache ) { 224 224 225 $cacheKey = apply_filters('tiny_mce_version', '2008070 8');225 $cacheKey = apply_filters('tiny_mce_version', '20080709'); 226 226 227 227 foreach ( $initArray as $v ) 228 228 $cacheKey .= $v; -
wp-includes/script-loader.php
37 37 $scripts->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080706' ); 38 38 39 39 // Modify this version when tinyMCE plugins are changed. 40 $mce_version = apply_filters('tiny_mce_version', '2008070 8');40 $mce_version = apply_filters('tiny_mce_version', '20080709'); 41 41 $scripts->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version ); 42 42 43 43 $scripts->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6');