Ticket #43058: 43058-3.patch
File 43058-3.patch, 3.8 KB (added by , 6 years ago) |
---|
-
wp-admin/css/common-rtl.css
3045 3045 box-sizing: border-box; 3046 3046 } 3047 3047 3048 #plugin-files-search, 3049 #theme-files-search { 3050 width: 100%; 3051 } 3052 3048 3053 #templateside > h2 { 3049 3054 padding-top: 6px; 3050 3055 padding-bottom: 7px; -
wp-admin/css/common.css
3045 3045 box-sizing: border-box; 3046 3046 } 3047 3047 3048 #plugin-files-search, 3049 #theme-files-search { 3050 width: 100%; 3051 } 3052 3048 3053 #templateside > h2 { 3049 3054 padding-top: 6px; 3050 3055 padding-bottom: 7px; -
wp-admin/js/theme-plugin-editor.js
73 73 } 74 74 return undefined; 75 75 } ); 76 77 var inputEvent; 78 79 /* 80 * Use feature detection to determine whether inputs should use 81 * the `keyup` or `input` event. Input is preferred but lacks support 82 * in legacy browsers. See changeset 34078, see also ticket #26600#comment:59 83 */ 84 if ( 'oninput' in document.createElement( 'input' ) ) { 85 inputEvent = 'input'; 86 } else { 87 inputEvent = 'keyup'; 88 } 89 90 $( document ).on( inputEvent, '#plugin-files-search, #theme-files-search', component._searchFile); 76 91 }; 77 92 78 93 /** 94 * Search file. 95 * 96 * @since 4.9.2 97 * @returns {void} 98 */ 99 component._searchFile = function() { 100 var parent = $('#templateside'), 101 directories = parent.find('ul ul li'), 102 files = parent.find('ul ul li a'), 103 search_term = $(this).val(); 104 105 if( search_term.length ) { 106 107 // Expand all directories for search file. 108 // Hide Directories. Because, Below we show those directories 109 // which have search term in the file name. 110 directories.attr('aria-expanded', true).hide(); 111 112 // Search file and ONLY show these directories which "contain" the file name. 113 var rex = new RegExp( search_term, 'i'); 114 files.filter(function () { 115 var file_name = $.trim( $(this).text() ) || ''; 116 return rex.test( file_name ); 117 }).parents('li').show(); 118 119 } else { 120 121 // Collapse & show all directories. 122 directories.attr('aria-expanded', false).show(); 123 } 124 }; 125 126 /** 79 127 * Set up and display the warning modal. 80 128 * 81 129 * @since 4.9.0 -
wp-admin/plugin-editor.php
239 239 240 240 <div id="templateside"> 241 241 <h2 id="plugin-files-label"><?php _e( 'Plugin Files' ); ?></h2> 242 <label for="plugin-files-search" class="screen-reader-text"><?php esc_html_e( 'Search file..' ); ?></label> 243 <input id="plugin-files-search" name="plugin-files-search" type="search" placeholder="<?php esc_html_e( 'Search file..' ); ?>"> 242 244 243 245 <?php 244 246 $plugin_editable_files = array(); -
wp-admin/theme-editor.php
243 243 ?> 244 244 <div id="templateside"> 245 245 <h2 id="theme-files-label"><?php _e( 'Theme Files' ); ?></h2> 246 <label for="theme-files-search" class="screen-reader-text"><?php esc_html_e( 'Search file..' ); ?></label> 247 <input id="theme-files-search" name="theme-files-search" type="search" placeholder="<?php esc_html_e( 'Search file..' ); ?>"> 248 246 249 <ul role="tree" aria-labelledby="theme-files-label"> 247 250 <?php if ( ( $has_templates || $theme->parent() ) && $theme->parent() ) : ?> 248 251 <li class="howto">