Ticket #26952: 26952.13.patch
File 26952.13.patch, 13.3 KB (added by , 11 years ago) |
---|
-
src/wp-admin/css/common.css
1789 1789 } 1790 1790 1791 1791 /* Header on thickbox */ 1792 #plugin-information-header { 1793 margin: 0; 1794 padding: 0 5px; 1792 #plugin-information { 1793 background: #fcfcfc; 1794 position: fixed; 1795 top: 0; 1796 right: 0; 1797 bottom: 0; 1798 left: 0; 1799 } 1800 1801 #plugin-information-title { 1802 padding: 0 76px 0 20px; 1803 font-size: 22px; 1795 1804 font-weight: 600; 1805 line-height: 56px; 1806 top: 0; 1807 right: 0; 1808 left: 0; 1809 height: 56px; 1810 overflow: hidden; 1811 text-overflow: ellipsis; 1812 white-space: nowrap; 1813 } 1814 1815 #plugin-information-router { 1816 padding: 0 16px; 1817 position: absolute; 1818 top: 56px; 1819 right: 0; 1820 left: 0; 1821 height: 36px; 1822 z-index: 1; 1823 } 1824 1825 #plugin-information-router a { 1796 1826 position: relative; 1797 border-bottom: 1px solid #dfdfdf; 1798 height: 2.5em; 1799 background-color: #f9f9f9; 1827 float: left; 1828 padding: 8px 10px 9px; 1829 margin: 0; 1830 height: 18px; 1831 line-height: 18px; 1832 font-size: 14px; 1833 text-decoration: none; 1834 transition: none; 1800 1835 } 1801 #plugin-information ul#sidemenu { 1802 font-weight: normal; 1803 margin: 0 5px; 1836 1837 #plugin-information-router a.current { 1838 margin: -1px -1px 0; 1839 background: #fff; 1840 border: 1px solid #ddd; 1841 border-bottom: none; 1842 color: #333; 1843 } 1844 1845 #plugin-information-router a:active, 1846 #plugin-information-router a:focus { 1847 outline: none; 1848 } 1849 1850 #plugin-information-content { 1851 background: #fff; 1852 border-top: 1px solid #ddd; 1853 border-bottom: 1px solid #ddd; 1804 1854 position: absolute; 1855 top: 90px; 1856 right: 0; 1857 bottom: 61px; 1805 1858 left: 0; 1806 bottom: -1px;1807 1859 } 1808 1860 1809 /* Install sidemenu */ 1810 #plugin-information { 1811 height: auto; 1861 #section-holder { 1862 margin: 0; 1863 padding: 10px 26px; 1864 position: absolute; 1865 top: 0; 1866 right: 250px; 1867 bottom: 0; 1868 left: 0; 1869 overflow: auto; 1812 1870 } 1813 1871 1814 #plugin-information p.action-button { 1815 width: 100%; 1816 padding-bottom: 0; 1817 margin-bottom: 0; 1818 margin-top: 10px; 1819 -webkit-border-top-left-radius: 3px; 1820 border-top-left-radius: 3px; 1821 -webkit-border-bottom-left-radius: 3px; 1822 border-bottom-left-radius: 3px; 1872 #section-holder .updated { 1873 margin: 16px 0; 1823 1874 } 1824 1875 1825 #plugin-information .action-button a { 1826 background-color: #2ea2cc; 1827 color: #fff; 1828 text-align: center; 1829 font-weight: 600; 1830 text-decoration: none; 1831 display: block; 1832 line-height: 2em; 1876 .fyi { 1877 background: #f3f3f3; 1878 border-left: 1px solid #ddd; 1879 color: #666; 1880 padding: 16px; 1881 position: absolute; 1882 top: 0; 1883 right: 0; 1884 bottom: 0; 1885 width: 217px; 1886 overflow: auto; 1887 } 1888 1889 .fyi strong { 1890 color: #464646; 1833 1891 } 1834 1892 1835 #plugin-information h2 { 1836 clear: none !important; 1837 margin-right: 200px; 1893 .fyi h3 { 1894 font-weight: bold; 1895 text-transform: uppercase; 1896 font-size: 12px; 1897 color: #666; 1898 margin: 24px 0 8px; 1899 } 1900 1901 #plugin-information-footer { 1902 padding: 15px 16px; 1903 position: absolute; 1904 right: 0; 1905 bottom: 0; 1906 left: 0; 1907 height: 31px; 1908 } 1909 1910 @media screen and ( max-width: 782px ) { 1911 1912 #plugin-information-content { 1913 overflow: auto; 1914 } 1915 1916 .fyi { 1917 border: 1px solid #ddd; 1918 position: static; 1919 width: auto; 1920 margin: 26px 26px 16px; 1921 } 1922 1923 #section-holder { 1924 position: static; 1925 } 1926 1927 .fyi h3, 1928 .fyi small { 1929 display: none; 1930 } 1931 1932 #plugin-information-footer { 1933 padding: 12px 16px; 1934 height: 37px; 1935 } 1936 1838 1937 } 1839 1938 1840 #plugin-information .fyi { 1841 margin: 0 10px 50px; 1842 width: 210px; 1939 /* Install sidemenu */ 1940 #plugin-information { 1941 height: auto; 1942 padding: 0; 1843 1943 } 1844 1944 1845 1945 #plugin-information .fyi h2 { … … 1848 1948 margin-right: 0; 1849 1949 } 1850 1950 1851 #plugin-information .fyi h2.mainheader {1852 padding: 5px;1853 -webkit-border-top-left-radius: 3px;1854 border-top-left-radius: 3px;1855 background-color: #cee1ef;1856 }1857 1858 1951 #plugin-information .fyi ul { 1859 padding: 10px 5px 10px 7px;1952 padding: 0; 1860 1953 margin: 0; 1861 1954 list-style: none; 1862 -webkit-border-bottom-left-radius: 3px;1863 border-bottom-left-radius: 3px;1864 background-color: #eaf3fa;1865 1955 } 1866 1956 1867 1957 #plugin-information .fyi li { 1868 margin-right: 0; 1869 } 1870 1871 #plugin-information #section-holder { 1872 padding: 10px; 1958 margin: 0 0 10px; 1873 1959 } 1874 1960 1875 1961 #plugin-information .section ul, 1876 1962 #plugin-information .section ol { 1877 margin-left: 16px; 1878 list-style-type: square; 1879 list-style-image: none; 1963 list-style-type: disc; 1964 margin-left: 24px; 1965 } 1966 1967 .section, 1968 .section p { 1969 font-size: 14px; 1970 line-height: 1.7; 1880 1971 } 1881 1972 1882 1973 #plugin-information #section-screenshots ol { … … 1886 1977 1887 1978 #plugin-information #section-screenshots li img { 1888 1979 vertical-align: text-top; 1980 margin-top: 16px; 1889 1981 max-width: 100%; 1890 1982 width: auto; 1891 1983 height: auto; 1984 -webkit-box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.3 ); 1985 box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.3 ); 1892 1986 } 1893 1987 1894 1988 #plugin-information #section-screenshots li p { 1895 1989 font-style: italic; 1896 1990 padding-left: 20px; 1897 padding-bottom: 2em;1898 }1899 1900 #plugin-information #section-screenshots ol,1901 #plugin-information .updated,1902 #plugin-information pre {1903 margin-right: 215px;1904 1991 } 1905 1992 1906 1993 #plugin-information pre { … … 1909 1996 border: 1px solid #ccc; 1910 1997 } 1911 1998 1912 #plugin-information pre,1913 #plugin-information code {1914 background-color: #ededff;1915 }1916 1917 1999 .plugin-version-author-uri { 1918 2000 font-size: 13px; 1919 2001 } -
src/wp-admin/includes/plugin-install.php
348 348 } 349 349 350 350 iframe_header( __('Plugin Install') ); 351 echo "<div id='$tab- header'>\n";352 echo "< ul id='sidemenu'>\n";351 echo "<div id='$tab-title'>{$api->name}</div>"; 352 echo "<div id='$tab-router'>\n"; 353 353 foreach ( (array)$api->sections as $section_name => $content ) { 354 354 355 355 if ( isset( $plugins_section_titles[ $section_name ] ) ) … … 361 361 $href = add_query_arg( array('tab' => $tab, 'section' => $section_name) ); 362 362 $href = esc_url($href); 363 363 $san_section = esc_attr( $section_name ); 364 echo "\t< li><a name='$san_section' href='$href' $class>$title</a></li>\n";364 echo "\t<a name='$san_section' href='$href' $class>$title</a>\n"; 365 365 } 366 echo "</ul>\n";367 366 echo "</div>\n"; 368 367 ?> 369 <div class="alignright fyi"> 370 <?php if ( ! empty($api->download_link) && ( current_user_can('install_plugins') || current_user_can('update_plugins') ) ) : ?> 371 <p class="action-button"> 372 <?php 373 $status = install_plugin_install_status($api); 374 switch ( $status['status'] ) { 375 case 'install': 376 if ( $status['url'] ) 377 echo '<a href="' . $status['url'] . '" target="_parent">' . __('Install Now') . '</a>'; 378 break; 379 case 'update_available': 380 if ( $status['url'] ) 381 echo '<a href="' . $status['url'] . '" target="_parent">' . __('Install Update Now') .'</a>'; 382 break; 383 case 'newer_installed': 384 echo '<a>' . sprintf(__('Newer Version (%s) Installed'), $status['version']) . '</a>'; 385 break; 386 case 'latest_installed': 387 echo '<a>' . __('Latest Version Installed') . '</a>'; 388 break; 389 } 390 ?> 391 </p> 392 <?php endif; ?> 393 <h2 class="mainheader"><?php /* translators: For Your Information */ _e('FYI') ?></h2> 368 <div id="<?php echo $tab; ?>-content"> 369 <div class="fyi"> 394 370 <ul> 395 371 <?php if ( ! empty($api->version) ) : ?> 396 372 <li><strong><?php _e('Version:') ?></strong> <?php echo $api->version ?></li> … … 412 388 <?php endif; ?> 413 389 </ul> 414 390 <?php if ( ! empty($api->rating) ) : ?> 415 <h 2><?php _e('Average Rating') ?></h2>391 <h3><?php _e('Average Rating') ?></h3> 416 392 <?php wp_star_rating( array( 'rating' => $api->rating, 'type' => 'percent', 'number' => $api->num_ratings ) ); ?> 417 393 <small><?php printf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?></small> 418 394 <?php endif; ?> … … 440 416 $display = ( $section_name == $section ) ? 'block' : 'none'; 441 417 442 418 echo "\t<div id='section-{$san_section}' class='section' style='display: {$display};'>\n"; 443 echo "\t\t<h2 class='long-header'>$title</h2>";444 419 echo $content; 445 420 echo "\t</div>\n"; 446 421 } 447 422 echo "</div>\n"; 423 echo "</div>\n"; 424 echo "<div id='$tab-footer'>\n"; 425 if ( ! empty($api->download_link) && ( current_user_can('install_plugins') || current_user_can('update_plugins') ) ) { 426 $status = install_plugin_install_status($api); 427 switch ( $status['status'] ) { 428 case 'install': 429 if ( $status['url'] ) 430 echo '<a class="button button-primary right" href="' . $status['url'] . '" target="_parent">' . __('Install Now') . '</a>'; 431 break; 432 case 'update_available': 433 if ( $status['url'] ) 434 echo '<a class="button button-primary right" href="' . $status['url'] . '" target="_parent">' . __('Install Update Now') .'</a>'; 435 break; 436 case 'newer_installed': 437 echo '<a class="button button-primary right">' . sprintf(__('Newer Version (%s) Installed'), $status['version']) . '</a>'; 438 break; 439 case 'latest_installed': 440 echo '<a class="button button-primary right">' . __('Latest Version Installed') . '</a>'; 441 break; 442 } 443 } 444 echo "</div>\n"; 448 445 449 446 iframe_footer(); 450 447 exit; -
src/wp-admin/js/plugin-install.js
2 2 3 3 /* Plugin Browser Thickbox related JS*/ 4 4 var tb_position; 5 jQuery( document).ready(function($) {5 jQuery( document ).ready( function( $ ) { 6 6 tb_position = function() { 7 var tbWindow = $('#TB_window'), 8 width = $(window).width(), 9 H = $(window).height(), 10 W = ( 720 < width ) ? 720 : width, 11 adminbar_height = 0; 12 13 if ( $('#wpadminbar').length ) { 14 adminbar_height = parseInt( $('#wpadminbar').css('height'), 10 ); 15 } 7 var tbWindow = $( '#TB_window' ), 8 width = $( window ).width(), 9 H = $( window ).height() - ( ( 850 < width ) ? 60 : 20 ), 10 W = ( 850 < width ) ? 830 : width - 20; 16 11 17 12 if ( tbWindow.size() ) { 18 tbWindow.width( W - 50 ).height( H - 45 - adminbar_height ); 19 $('#TB_iframeContent').width( W - 50 ).height( H - 75 - adminbar_height ); 20 tbWindow.css({'margin-left': '-' + parseInt( ( ( W - 50 ) / 2 ), 10 ) + 'px'}); 21 if ( typeof document.body.style.maxWidth !== 'undefined' ) 22 tbWindow.css({'top': 20 + adminbar_height + 'px', 'margin-top': '0'}); 13 tbWindow.width( W ).height( H ); 14 $( '#TB_iframeContent' ).width( W ).height( H ); 15 tbWindow.css({ 16 'margin-left': '-' + parseInt( ( W / 2 ), 10 ) + 'px' 17 }); 18 if ( typeof document.body.style.maxWidth !== 'undefined' ) { 19 tbWindow.css({ 20 'top': ( ( 850 < width ) ? 30 : 10 ) + 'px', 21 'margin-top': '0' 22 }); 23 } 23 24 } 24 25 25 return $( 'a.thickbox').each( function() {26 var href = $( this).attr('href');27 if ( ! href ) 26 return $( 'a.thickbox' ).each( function() { 27 var href = $( this ).attr( 'href' ); 28 if ( ! href ) { 28 29 return; 29 href = href.replace(/&width=[0-9]+/g, ''); 30 href = href.replace(/&height=[0-9]+/g, ''); 31 $(this).attr( 'href', href + '&width=' + ( W - 80 ) + '&height=' + ( H - 85 - adminbar_height ) ); 30 } 31 href = href.replace( /&width=[0-9]+/g, '' ); 32 href = href.replace( /&height=[0-9]+/g, '' ); 33 $(this).attr( 'href', href + '&width=' + W + '&height=' + ( H ) ); 32 34 }); 33 35 }; 34 36 35 $(window).resize(function(){ tb_position(); }); 37 $( window ).resize( function() { 38 tb_position(); 39 }); 36 40 37 41 $('.plugins').on( 'click', 'a.thickbox', function() { 38 42 tb_click.call(this); … … 43 47 }); 44 48 45 49 /* Plugin install related JS*/ 46 $('#plugin-information #sidemenu a').click( function() { 47 var tab = $(this).attr('name'); 50 $( '#plugin-information-router a' ).click( function( event ) { 51 var tab = $( this ).attr( 'name' ); 52 event.preventDefault(); 48 53 //Flip the tab 49 $( '#plugin-information-header a.current').removeClass('current');50 $( this).addClass('current');54 $( '#plugin-information-router a.current' ).removeClass( 'current' ); 55 $( this ).addClass( 'current' ); 51 56 //Flip the content. 52 $('#section-holder div.section').hide(); //Hide 'em all 53 $('#section-' + tab).show(); 54 return false; 57 $( '#section-holder div.section' ).hide(); //Hide 'em all 58 $( '#section-' + tab ).show(); 55 59 }); 56 60 57 $( 'a.install-now').click( function() {61 $( 'a.install-now' ).click( function() { 58 62 return confirm( plugininstallL10n.ays ); 59 63 }); 60 64 }); -
src/wp-includes/js/thickbox/thickbox.css
58 58 overflow: hidden; 59 59 padding: 0 29px 0 10px; 60 60 text-overflow: ellipsis; 61 white-space: nowrap; 61 white-space: nowrap; 62 62 width: calc( 100% - 39px ); 63 63 } 64 64 … … 136 136 .tb-close-icon:hover { 137 137 color: #2ea2cc; 138 138 } 139 140 body.plugin-install-php #TB_window, 141 body.index-php #TB_window { 142 background: #fcfcfc url( ../../images/spinner.gif ) no-repeat center; 143 } 144 145 @media print, 146 (-o-min-device-pixel-ratio: 5/4), 147 (-webkit-min-device-pixel-ratio: 1.25), 148 (min-resolution: 120dpi) { 149 150 body.plugin-install-php #TB_window, 151 body.index-php #TB_window { 152 background: #fcfcfc url( ../../images/spinner-2x.gif ) no-repeat center; 153 } 154 155 156 } 157 158 body.plugin-install-php #TB_title, 159 body.index-php #TB_title { 160 float: left; 161 height: 1px; 162 } 163 164 body.plugin-install-php #TB_ajaxWindowTitle, 165 body.index-php #TB_ajaxWindowTitle { 166 display: none; 167 } 168 169 body.plugin-install-php .tb-close-icon, 170 body.index-php .tb-close-icon { 171 line-height: 48px; 172 width: 48px; 173 height: 48px; 174 } 175 176 body.plugin-install-php .tb-close-icon:before, 177 body.index-php .tb-close-icon:before { 178 line-height: 48px; 179 }