Changeset 9894
- Timestamp:
- 11/26/2008 02:27:37 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 deleted
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/css/colors-fresh.css
r9882 r9894 964 964 } 965 965 966 .wp-admin .clearlooks2 .mceFocus .mceTop .mceCenter {967 background: #444444;968 border-bottom: 1px solid #999;969 border-top: 1px solid #999;970 }971 972 966 .wp-admin .clearlooks2 .mceFocus .mceTop .mceRight { 973 967 background: #444444; … … 1013 1007 1014 1008 .wp-admin .clearlooks2 .mceFocus .mceTop span { 1015 color: # fff;1009 color: #e5e5e5; 1016 1010 } 1017 1011 /* end TinyMCE */ -
trunk/wp-admin/css/media.css
r9842 r9894 44 44 45 45 .media-upload-form label.form-help, td.help { 46 font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif;46 font-family: "Lucida Grande", "Bitstream Vera Sans", Verdana, Arial, sans-serif; 47 47 font-style: italic; 48 48 font-weight: normal; … … 285 285 padding-top: .5em; 286 286 text-align: left; 287 min-width: 120px; 287 288 } 288 289 … … 355 356 z-index: -1; 356 357 } 358 359 #gallery-settings th.label { 360 width: 160px; 361 } 362 363 #gallery-settings #basic th.label { 364 padding: 5px 5px 5px 0; 365 } 366 367 #gallery-settings .title { 368 clear: both; 369 padding: 0 0 3px; 370 border-bottom-style: solid; 371 border-bottom-width: 1px; 372 font-family: Georgia,"Times New Roman",Times,serif; 373 font-size: 1.6em; 374 border-bottom-color: #DADADA; 375 color: #5A5A5A; 376 } 377 378 .media-blank h3 { 379 color: #5A5A5A; 380 font-family: Georgia,"Times New Roman",Times,serif; 381 font-size: 1.6em; 382 font-weight: normal; 383 } 384 385 #gallery-settings .describe td { 386 vertical-align: middle; 387 height: 3.5em; 388 } 389 390 #gallery-settings .describe th.label { 391 padding-top: .5em; 392 text-align: left; 393 } 394 395 #gallery-settings .describe { 396 padding: 5px; 397 width: 615px; 398 clear: both; 399 cursor: default; 400 } 401 402 #gallery-settings .describe select { 403 width: 15em; 404 border: 1px solid #dfdfdf; 405 } 406 407 #gallery-settings label, 408 #gallery-settings legend { 409 font-size: 13px; 410 color: #464646; 411 margin-right: 15px; 412 } 413 414 #gallery-settings .align .field label { 415 margin: 0 1.5em 0 0; 416 } 417 418 #gallery-settings p.ml-submit { 419 border-top: 1px solid #dfdfdf; 420 } 421 422 #gallery-settings select#columns { 423 width: 6em; 424 } -
trunk/wp-admin/includes/media.php
r9746 r9894 16 16 function media_upload_tabs() { 17 17 $_default_tabs = array( 18 'type' => __('Choose File'), // handler action suffix => tab text 18 'type' => __('From Computer'), // handler action suffix => tab text 19 'type_url' => __('From URL'), 19 20 'gallery' => __('Gallery'), 20 'library' => __('Media Library') ,21 'library' => __('Media Library') 21 22 ); 22 23 … … 330 331 $context = apply_filters('media_buttons_context', __('Upload %s')); 331 332 $media_upload_iframe_src = "media-upload.php?post_id=$uploading_iframe_ID"; 332 $media_title = __(' Upload Media');333 $media_title = __('Add Media'); 333 334 $image_upload_iframe_src = apply_filters('image_upload_iframe_src', "$media_upload_iframe_src&type=image"); 334 $image_title = __(' Upload an Image');335 $image_title = __('Add an Image'); 335 336 $video_upload_iframe_src = apply_filters('video_upload_iframe_src', "$media_upload_iframe_src&type=video"); 336 $video_title = __(' Upload Video');337 $video_title = __('Add Video'); 337 338 $audio_upload_iframe_src = apply_filters('audio_upload_iframe_src', "$media_upload_iframe_src&type=audio"); 338 $audio_title = __(' Upload Audio');339 $audio_title = __('Add Audio'); 339 340 $out = <<<EOF 340 341 … … 386 387 } 387 388 388 if ( isset($_POST['insert-gallery']) ) 389 return media_send_to_editor('[gallery]'); 389 if ( isset($_POST['insert-gallery']) || isset($_POST['update-gallery']) ) { ?> 390 <script type="text/javascript"> 391 /* <![CDATA[ */ 392 var win = window.dialogArguments || opener || parent || top; 393 win.tb_remove(); 394 /* ]]> */ 395 </script> 396 <?php 397 exit; 398 } 390 399 391 400 if ( isset($_POST['send']) ) { … … 454 463 return media_upload_gallery(); 455 464 } 465 466 if ( isset($_GET['tab']) && $_GET['tab'] == 'type_url' ) 467 return wp_iframe( 'media_upload_type_url_form', 'image', $errors, $id ); 456 468 457 469 return wp_iframe( 'media_upload_type_form', 'image', $errors, $id ); … … 543 555 } 544 556 557 if ( isset($_GET['tab']) && $_GET['tab'] == 'type_url' ) 558 return wp_iframe( 'media_upload_type_url_form', 'audio', $errors, $id ); 559 545 560 return wp_iframe( 'media_upload_type_form', 'audio', $errors, $id ); 546 561 } … … 593 608 } 594 609 610 if ( isset($_GET['tab']) && $_GET['tab'] == 'type_url' ) 611 return wp_iframe( 'media_upload_type_url_form', 'video', $errors, $id ); 612 595 613 return wp_iframe( 'media_upload_type_form', 'video', $errors, $id ); 596 614 } … … 643 661 } 644 662 663 if ( isset($_GET['tab']) && $_GET['tab'] == 'type_url' ) 664 return wp_iframe( 'media_upload_type_url_form', 'file', $errors, $id ); 665 645 666 return wp_iframe( 'media_upload_type_form', 'file', $errors, $id ); 646 667 } … … 1301 1322 $form_action_url = admin_url("media-upload.php?type=$type&tab=type&post_id=$post_id"); 1302 1323 $form_action_url = apply_filters('media_upload_form_url', $form_action_url, $type); 1303 1304 $callback = "type_form_$type";1305 1324 ?> 1306 1325 … … 1308 1327 <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" /> 1309 1328 <?php wp_nonce_field('media-form'); ?> 1310 <h3><?php _e('From Computer'); ?></h3> 1329 1330 <div class="media-blank"> 1331 <h3><?php _e('Add media files from your computer'); ?></h3> 1332 </div> 1333 1311 1334 <?php media_upload_form( $errors ); ?> 1312 1335 … … 1322 1345 --> 1323 1346 </script> 1324 <?php if ( $id && !is_wp_error($id) ) :?>1347 <?php if ( $id && !is_wp_error($id) ) { ?> 1325 1348 <div id="media-items"> 1326 1349 <?php echo get_media_items( $id, $errors ); ?> 1327 1350 </div> 1328 1351 <input type="submit" class="button savebutton" name="save" value="<?php echo attribute_escape( __( 'Save all changes' ) ); ?>" /> 1329 1330 <?php elseif ( is_callable($callback) ) : ?> 1352 <?php 1353 } elseif ( is_wp_error($id) ) { 1354 echo '<div id="media-upload-error">'.wp_specialchars($id->get_error_message()).'</div>'; 1355 exit; 1356 } 1357 } 1358 1359 /** 1360 * {@internal Missing Short Description}} 1361 * 1362 * @since unknown 1363 * 1364 * @param unknown_type $type 1365 * @param unknown_type $errors 1366 * @param unknown_type $id 1367 */ 1368 function media_upload_type_url_form($type = 'file', $errors = null, $id = null) { 1369 media_upload_header(); 1370 1371 $post_id = intval($_REQUEST['post_id']); 1372 1373 $form_action_url = admin_url("media-upload.php?type=$type&tab=type&post_id=$post_id"); 1374 $form_action_url = apply_filters('media_upload_form_url', $form_action_url, $type); 1375 1376 $callback = "type_url_form_$type"; 1377 ?> 1378 1379 <form enctype="multipart/form-data" method="post" action="<?php echo attribute_escape($form_action_url); ?>" class="media-upload-form type-form validate" id="<?php echo $type; ?>-form"> 1380 <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" /> 1381 <?php wp_nonce_field('media-form'); ?> 1382 1383 <?php if ( is_callable($callback) ) { ?> 1331 1384 1332 1385 <div class="media-blank"> 1333 <p style="text-align:center"><?php _e('— OR —'); ?></p> 1334 <h3><?php _e('From URL'); ?></h3> 1386 <h3><?php _e('Add media file from URL'); ?></h3> 1335 1387 </div> 1336 1388 … … 1415 1467 </div> 1416 1468 </div> 1417 <input type="submit" class="button savebutton" name="save" value="<?php echo attribute_escape( __( 'Save all changes' ) ); ?>" />1418 1469 </form> 1419 1470 <?php 1420 endif; 1471 } else { 1472 wp_die( __('Unknown action.') ); 1473 } 1421 1474 } 1422 1475 … … 1462 1515 <?php echo get_media_items($post_id, $errors); ?> 1463 1516 </div> 1517 1464 1518 <p class="ml-submit"> 1465 <input type="submit" class="button savebutton" name="save" value="<?php echo attribute_escape( __( 'Save all changes' ) ); ?>" /> 1466 <input type="submit" class="button insert-gallery" name="insert-gallery" value="<?php echo attribute_escape( __( 'Insert gallery into post' ) ); ?>" /> 1519 <input type="submit" class="button savebutton" style="display:none;" name="save" id="save-all" value="<?php echo attribute_escape( __( 'Save all changes' ) ); ?>" /> 1467 1520 <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" /> 1468 1521 <input type="hidden" name="type" value="<?php echo attribute_escape( $GLOBALS['type'] ); ?>" /> 1469 1522 <input type="hidden" name="tab" value="<?php echo attribute_escape( $GLOBALS['tab'] ); ?>" /> 1470 1523 </p> 1524 1525 <div id="gallery-settings" style="display:none;"> 1526 <div class="title"><?php _e('Gallery Settings'); ?></div> 1527 <table id="basic" class="describe"><tbody> 1528 <tr> 1529 <th scope="row" class="label"> 1530 <label> 1531 <span class="alignleft"><?php _e('Link thumbnails to:'); ?></span> 1532 </label> 1533 </th> 1534 <td class="field"> 1535 <input type="radio" name="linkto" id="linkto-file" value="file" /> 1536 <label for="linkto-file" class="radio"><?php _e('Image File'); ?></label> 1537 1538 <input type="radio" checked="checked" name="linkto" id="linkto-post" value="post" /> 1539 <label for="linkto-post" class="radio"><?php _e('Attachment Page'); ?></label> 1540 </td> 1541 </tr> 1542 1543 <tr> 1544 <th scope="row" class="label"> 1545 <label> 1546 <span class="alignleft"><?php _e('Order images by:'); ?></span> 1547 </label> 1548 </th> 1549 <td class="field"> 1550 <select id="orderby" name="orderby"> 1551 <option value="menu_order" selected="selected"><?php _e('Menu order'); ?></option> 1552 <option value="post_name"><?php _e('Name'); ?></option> 1553 <option value="ID"><?php _e('Date/Time'); ?></option> 1554 </select> 1555 </td> 1556 </tr> 1557 1558 <tr> 1559 <th scope="row" class="label"> 1560 <label> 1561 <span class="alignleft"><?php _e('Order:'); ?></span> 1562 </label> 1563 </th> 1564 <td class="field"> 1565 <input type="radio" checked="checked" name="order" id="order-asc" value="asc" /> 1566 <label for="order-asc" class="radio"><?php _e('Ascending'); ?></label> 1567 1568 <input type="radio" name="order" id="order-desc" value="desc" /> 1569 <label for="order-desc" class="radio"><?php _e('Descending'); ?></label> 1570 </td> 1571 </tr> 1572 1573 <tr> 1574 <th scope="row" class="label"> 1575 <label> 1576 <span class="alignleft"><?php _e('Gallery columns:'); ?></span> 1577 </label> 1578 </th> 1579 <td class="field"> 1580 <select id="columns" name="columns"> 1581 <option value="2"><?php _e('2'); ?></option> 1582 <option value="3" selected="selected"><?php _e('3'); ?></option> 1583 <option value="4"><?php _e('4'); ?></option> 1584 <option value="5"><?php _e('5'); ?></option> 1585 <option value="6"><?php _e('6'); ?></option> 1586 <option value="7"><?php _e('7'); ?></option> 1587 <option value="8"><?php _e('8'); ?></option> 1588 <option value="9"><?php _e('9'); ?></option> 1589 </select> 1590 </td> 1591 </tr> 1592 </tbody></table> 1593 1594 <p class="ml-submit"> 1595 <input type="button" class="button" style="display:none;" onmousedown="wpgallery.update();" name="insert-gallery" id="insert-gallery" value="<?php echo attribute_escape( __( 'Insert gallery' ) ); ?>" /> 1596 <input type="button" class="button" style="display:none;" onmousedown="wpgallery.update();" name="update-gallery" id="update-gallery" value="<?php echo attribute_escape( __( 'Update gallery settings' ) ); ?>" /> 1597 </p> 1598 </div> 1471 1599 </form> 1472 1600 <?php … … 1635 1763 * @return unknown 1636 1764 */ 1637 function type_ form_image() {1765 function type_url_form_image() { 1638 1766 1639 1767 if ( apply_filters( 'disable_captions', '' ) ) { … … 1718 1846 * @return unknown 1719 1847 */ 1720 function type_ form_audio() {1848 function type_url_form_audio() { 1721 1849 return ' 1722 1850 <table class="describe"><tbody> … … 1753 1881 * @return unknown 1754 1882 */ 1755 function type_ form_video() {1883 function type_url_form_video() { 1756 1884 return ' 1757 1885 <table class="describe"><tbody> … … 1788 1916 * @return unknown 1789 1917 */ 1790 function type_ form_file() {1918 function type_url_form_file() { 1791 1919 return ' 1792 1920 <table class="describe"><tbody> -
trunk/wp-admin/js/gallery.js
r8304 r9894 26 26 if ( this.value == '0' ) this.value = ''; 27 27 }); 28 29 if ( $('#media-items>*').length > 1 ) { 30 var w = wpgallery.getWin(); 31 32 $('#save-all, #gallery-settings').show(); 33 if ( typeof w.tinyMCE != 'undefined' && w.tinyMCE.activeEditor && ! w.tinyMCE.activeEditor.isHidden() ) { 34 wpgallery.mcemode = true; 35 wpgallery.init(); 36 } else { 37 $('#insert-gallery').show(); 38 } 39 } 28 40 }); 41 42 jQuery(window).unload( function () { tinymce = tinyMCE = wpgallery = null; } ); // Cleanup 43 44 /* gallery settings */ 45 var tinymce = null, tinyMCE; 46 47 var wpgallery = { 48 mcemode : false, 49 editor : {}, 50 dom : {}, 51 is_update : false, 52 el : {}, 53 54 I : function(e) { 55 return document.getElementById(e); 56 }, 57 58 init: function() { 59 var t = this, li, q, i, it, w = t.getWin(); 60 61 if ( ! t.mcemode ) return; 62 63 li = ('' + document.location.search).replace(/^\?/, '').split('&'); 64 q = {}; 65 for (i=0; i<li.length; i++) { 66 it = li[i].split('='); 67 q[unescape(it[0])] = unescape(it[1]); 68 } 69 70 if (q.mce_rdomain) 71 document.domain = q.mce_rdomain; 72 73 // Find window & API 74 tinymce = w.tinymce; 75 tinyMCE = w.tinyMCE; 76 t.editor = tinymce.EditorManager.activeEditor; 77 78 t.setup(); 79 }, 80 81 getWin : function() { 82 return window.dialogArguments || opener || parent || top; 83 }, 84 85 restoreSelection : function() { 86 var t = this; 87 88 if (tinymce.isIE) 89 t.editor.selection.moveToBookmark(t.editor.windowManager.bookmark); 90 }, 91 92 setup : function() { 93 var t = this, a, f = document.forms[0], ed = t.editor, el, g; 94 if ( ! t.mcemode ) return; 95 96 t.restoreSelection(); 97 t.el = ed.selection.getNode(); 98 99 if ( t.el.nodeName != 'IMG' || ! ed.dom.hasClass(t.el, 'wpGallery') ) { 100 if ( (g = ed.dom.select('img.wpGallery')) && g[0] ) { 101 t.el = g[0]; 102 } else { 103 if ( getUserSetting('galfile') == '1' ) t.I('linkto-file').checked = "checked"; 104 if ( getUserSetting('galdesc') == '1' ) t.I('order-desc').checked = "checked"; 105 if ( getUserSetting('galcols') ) t.I('columns').value = getUserSetting('galcols'); 106 if ( getUserSetting('galord') ) t.I('orderby').value = getUserSetting('galord'); 107 jQuery('#insert-gallery').show(); 108 return; 109 } 110 } 111 112 a = ed.dom.getAttrib(t.el, 'title'); 113 a = ed.dom.decode(a); 114 115 if ( a ) { 116 jQuery('#update-gallery').show(); 117 t.is_update = true; 118 119 var columns = a.match(/columns=['"]([0-9]+)['"]/), link = a.match(/link=['"]([^'"]+)['"]/i); 120 var order = a.match(/order=['"]([^'"]+)['"]/i), orderby = a.match(/orderby=['"]([^'"]+)['"]/i), all = ''; 121 122 if ( link && link[1] ) t.I('linkto-file').checked = "checked"; 123 if ( order && order[1] ) t.I('order-desc').checked = "checked"; 124 if ( columns && columns[1] ) t.I('columns').value = ''+columns[1]; 125 if ( orderby && orderby[1] ) t.I('orderby').value = orderby[1]; 126 } else { 127 jQuery('#insert-gallery').show(); 128 } 129 }, 130 131 update : function() { 132 var t = this, ed = t.editor, el, all = ''; 133 134 if ( ! t.mcemode || ! t.is_update ) { 135 var s = '[gallery'+t.getSettings()+']'; 136 t.getWin().send_to_editor(s); 137 return; 138 } 139 140 if (t.el.nodeName != 'IMG') return; 141 142 all = ed.dom.decode(ed.dom.getAttrib(t.el, 'title')); 143 all = all.substr(0, all.lastIndexOf(']')); 144 all = all.replace(/\s*(order|link|columns|orderby)=['"]([^'"]+)['"]/gi, ''); 145 all += t.getSettings(); 146 all += ']'; 147 148 ed.dom.setAttrib(t.el, 'title', all); 149 t.getWin().tb_remove(); 150 }, 151 152 getSettings : function() { 153 var I = this.I, s = ''; 154 155 if ( I('linkto-file').checked ) { 156 s += ' link="file"'; 157 setUserSetting('galfile', '1'); 158 } 159 160 if ( I('order-desc').checked ) { 161 s += ' order="DESC"'; 162 setUserSetting('galdesc', '1'); 163 } 164 165 if ( I('columns').value != 3 ) { 166 s += ' columns="'+I('columns').value+'"'; 167 setUserSetting('galcols', I('columns').value); 168 } 169 170 if ( I('orderby').value != 'menu_order' ) { 171 s += ' orderby="'+I('orderby').value+'"'; 172 setUserSetting('galord', I('orderby').value); 173 } 174 175 return s; 176 } 177 }; -
trunk/wp-admin/js/media-upload.js
r9219 r9894 6 6 ed.selection.moveToBookmark(tinymce.EditorManager.activeEditor.windowManager.bookmark); 7 7 8 if ( h.indexOf('[caption') != -1 ) 9 h = ed.plugins.wpeditimage._do_shcode(h); 8 if ( h.indexOf('[caption') === 0 ) { 9 if ( ed.plugins.wpeditimage ) 10 h = ed.plugins.wpeditimage._do_shcode(h); 11 } else if ( h.indexOf('[gallery') === 0 ) { 12 if ( ed.plugins.wpgallery ) 13 h = ed.plugins.wpgallery._do_gallery(h); 14 } 10 15 11 16 ed.execCommand('mceInsertContent', false, h); 12 } else if ( jQuery.isFunction( 'edInsertContent' ) ) { 17 18 } else if ( typeof edInsertContent == 'function' ) { 13 19 edInsertContent(edCanvas, h); 14 20 } else { -
trunk/wp-admin/media-upload.php
r9458 r9894 103 103 104 104 // let the action code decide how to handle the request 105 if ( $tab == 'type' )105 if ( $tab == 'type' || $tab == 'type_url' ) 106 106 do_action("media_upload_$type"); 107 107 else -
trunk/wp-admin/wp-admin.css
r9852 r9894 1541 1541 font-style: italic; 1542 1542 display: block; 1543 font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif;1543 font-family: "Lucida Grande", "Bitstream Vera Sans", "Lucida Sans", Verdana, Arial, sans-serif; 1544 1544 } 1545 1545 … … 3056 3056 3057 3057 .swfupload { 3058 margin: 010px;3058 margin: 5px 10px; 3059 3059 vertical-align: middle; 3060 3060 } -
trunk/wp-includes/js/swfupload/handlers.js
r9654 r9894 57 57 58 58 // Also bind toggle to the links 59 jQuery('#media-item-' + fileObj.id + ' a.toggle').bind('click', function(){jQuery(this).siblings('.slidetoggle').slideToggle(150, function(){ window.scrollTo(0,this.parentNode.offsetTop);});jQuery(this).parent().eq(0).children('.toggle').toggle();jQuery(this).siblings('a.toggle').focus();return false;});59 jQuery('#media-item-' + fileObj.id + ' a.toggle').bind('click', function(){jQuery(this).siblings('.slidetoggle').slideToggle(150, function(){var o=jQuery(this).offset();window.scrollTo(0,o.top-36);});jQuery(this).parent().eq(0).children('.toggle').toggle();jQuery(this).siblings('a.toggle').focus();return false;}); 60 60 61 61 // Bind AJAX to the new Delete button -
trunk/wp-includes/js/tinymce/langs/wp-langs-en.js
r9847 r9894 428 428 alt:"Edit Alternate Text" 429 429 }); 430 431 tinyMCE.addI18n("en.gallery",{432 settings:"Gallery Settings",433 linkto:"Link thumbnails to:",434 linktofile:"Image File",435 linktopost:"Attachment Page",436 orderby:"Order images by:",437 menu_order:"Menu order",438 byname:"Name",439 bydate:"Date/Time",440 random:"Random",441 order:"Order:",442 orderasc:"Ascending",443 orderdesc:"Descending",444 cols:"Gallery columns:",445 two:"two",446 three:"three",447 four:"four",448 five:"five",449 six:"six",450 seven:"seven",451 eight:"eight",452 nine:"nine",453 imgwidth:"Limit the thumbnails width:",454 imgwidthhelp:"Overrides the thumbnail images width. The default can be changed from the Media Settings page."455 }); -
trunk/wp-includes/js/tinymce/langs/wp-langs.php
r9847 r9894 451 451 alt:"' . mce_escape( __('Edit Alternate Text') ) . '" 452 452 }); 453 454 tinyMCE.addI18n("' . $language . '.gallery",{455 settings:"' . mce_escape( __('Gallery Settings') ) . '",456 linkto:"' . mce_escape( __('Link thumbnails to:') ) . '",457 linktofile:"' . mce_escape( __('Image File') ) . '",458 linktopost:"' . mce_escape( __('Attachment Page') ) . '",459 orderby:"' . mce_escape( __('Order images by:') ) . '",460 menu_order:"' . mce_escape( __('Menu order') ) . '",461 byname:"' . mce_escape( __('Name') ) . '",462 bydate:"' . mce_escape( __('Date/Time') ) . '",463 random:"' . mce_escape( __('Random') ) . '",464 order:"' . mce_escape( __('Order:') ) . '",465 orderasc:"' . mce_escape( __('Ascending') ) . '",466 orderdesc:"' . mce_escape( __('Descending') ) . '",467 cols:"' . mce_escape( __('Gallery columns:') ) . '",468 two:"' . mce_escape( __('two') ) . '",469 three:"' . mce_escape( __('three') ) . '",470 four:"' . mce_escape( __('four') ) . '",471 five:"' . mce_escape( __('five') ) . '",472 six:"' . mce_escape( __('six') ) . '",473 seven:"' . mce_escape( __('seven') ) . '",474 eight:"' . mce_escape( __('eight') ) . '",475 nine:"' . mce_escape( __('nine') ) . '",476 imgwidth:"' . mce_escape( __('Limit the thumbnails width:') ) . '",477 imgwidthhelp:"' . mce_escape( __('Overrides the thumbnail images width. The default can be changed from the Media Settings page.') ) . '"478 });479 453 '; -
trunk/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.js
r9849 r9894 16 16 if ( ed.dom.getAttrib(el, 'class').indexOf('wpGallery') == -1 ) return; 17 17 18 tb_show('', url + '/gallery.html?ver=321&TB_iframe=true'); 18 var post_id = tinymce.DOM.get('post_ID').value; 19 tb_show('', tinymce.documentBaseURL + '/media-upload.php?post_id='+post_id+'&tab=gallery&TB_iframe=true'); 20 /* 19 21 tinymce.DOM.setStyles('TB_window', { 20 22 'width':( W - 50 )+'px', … … 34 36 'height':'400px' 35 37 }); 38 */ 36 39 tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' ); 37 40 }); … … 96 99 return '<p>'+getAttr(im, 'title')+'</p>'; 97 100 98 return im;101 return a; 99 102 }); 100 103 }, … … 165 168 var ed = tinyMCE.activeEditor, el = ed.selection.getNode(); 166 169 167 if ( el.nodeName == 'IMG' && ed.dom.getAttrib(el, 'class').indexOf(' mceItemWPgallery') != -1 ) {170 if ( el.nodeName == 'IMG' && ed.dom.getAttrib(el, 'class').indexOf('wpGallery') != -1 ) { 168 171 ed.dom.remove(el); 169 172 -
trunk/wp-includes/media.php
r9847 r9894 523 523 * @param string $size Optional, default is 'thumbnail'. 524 524 * @param bool $icon Optional, default is false. Whether it is an icon. 525 * @param int $imgwidth Override image width.526 525 * @return string HTML img element or empty string on failure. 527 526 */ 528 function wp_get_attachment_image($attachment_id, $size = 'thumbnail', $icon = false , $imgwidth = false) {527 function wp_get_attachment_image($attachment_id, $size = 'thumbnail', $icon = false) { 529 528 530 529 $html = ''; … … 532 531 if ( $image ) { 533 532 list($src, $width, $height) = $image; 534 $hwstring = $imgwidth ? image_hwstring($imgwidth, '') :image_hwstring($width, $height);533 $hwstring = image_hwstring($width, $height); 535 534 if ( is_array($size) ) 536 535 $size = join('x', $size); … … 619 618 'captiontag' => 'dd', 620 619 'columns' => 3, 621 'size' => 'thumbnail', 622 'imgwidth' => '' 620 'size' => 'thumbnail' 623 621 ), $attr)); 624 622 … … 640 638 $columns = intval($columns); 641 639 $itemwidth = $columns > 0 ? floor(100/$columns) : 100; 642 $imgwidth = isset($imgwidth) && (int) $imgwidth ? $imgwidth : false;643 640 644 641 $output = apply_filters('gallery_style', " … … 664 661 $i = 0; 665 662 foreach ( $attachments as $id => $attachment ) { 666 $link = isset($attr['link']) && 'file' == $attr['link'] ? wp_get_attachment_link($id, $size, false, false , $imgwidth) : wp_get_attachment_link($id, $size, true, false, $imgwidth);663 $link = isset($attr['link']) && 'file' == $attr['link'] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false); 667 664 668 665 $output .= "<{$itemtag} class='gallery-item'>"; -
trunk/wp-includes/post-template.php
r9847 r9894 758 758 * @return string HTML content. 759 759 */ 760 function wp_get_attachment_link($id = 0, $size = 'thumbnail', $permalink = false, $icon = false , $imgwidth = false) {760 function wp_get_attachment_link($id = 0, $size = 'thumbnail', $permalink = false, $icon = false) { 761 761 $id = intval($id); 762 762 $_post = & get_post( $id ); … … 770 770 $post_title = attribute_escape($_post->post_title); 771 771 772 $link_text = wp_get_attachment_image($id, $size, $icon , $imgwidth);772 $link_text = wp_get_attachment_image($id, $size, $icon); 773 773 if ( !$link_text ) 774 774 $link_text = $_post->post_title; -
trunk/wp-includes/script-loader.php
r9872 r9894 62 62 // Modify this version when tinyMCE plugins are changed. 63 63 function mce_version() { 64 return '2008112 2';64 return '20081125'; 65 65 } 66 66 add_filter( 'tiny_mce_version', 'mce_version' ); … … 226 226 'submittedOn' => __('Submitted on:') 227 227 ) ); 228 $scripts->add( 'admin-gallery', '/wp-admin/js/gallery.js', array( 'jquery-ui-sortable' ), '2008 0709' );229 $scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20081 031' );228 $scripts->add( 'admin-gallery', '/wp-admin/js/gallery.js', array( 'jquery-ui-sortable' ), '20081125' ); 229 $scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20081125' ); 230 230 231 231 $scripts->add( 'admin-widgets', '/wp-admin/js/widgets.js', array( 'interface' ), '20081120' );
Note: See TracChangeset
for help on using the changeset viewer.