Ticket #2296: 2296.diff
| File 2296.diff, 4.6 KB (added by , 9 years ago) |
|---|
-
wp-content/plugins/plugin-directory/readme/class-parser.php
359 359 if ( $this->faq ) { 360 360 $this->sections['faq'] .= "\n<dl>\n"; 361 361 foreach ( $this->faq as $question => $answer ) { 362 $this->sections['faq'] .= "<dt> {$question}</dt>\n<dd>{$answer}</dd>\n";362 $this->sections['faq'] .= "<dt><button class=\"button-link\" aria-expanded=\"false\">{$question}</button></dt>\n<dd>{$answer}</dd>\n"; 363 363 } 364 364 $this->sections['faq'] .= "\n</dl>\n"; 365 365 } -
wp-content/themes/pub/wporg-plugins/client/components/plugin/sections/faq/style.scss
16 16 border-bottom: 1px solid $color__border; 17 17 } 18 18 19 dt{19 .button-link { 20 20 border-top: 1px solid $color__border; 21 21 cursor: pointer; 22 22 font-size: ms( 0 ); 23 23 font-weight: 600; 24 margin-bottom: 1px; 24 25 padding: 1rem 0; 26 text-align: left; 27 width: 100%; 25 28 26 29 &:before { 27 30 content: "\f347"; … … 30 33 margin: 0 1rem; 31 34 } 32 35 36 &:focus { 37 border: 0; 38 border-top: 1px solid $color__border; 39 box-shadow: none; 40 outline: none; 41 } 42 33 43 &.open:before { 34 44 content: "\f343"; 35 45 } -
wp-content/themes/pub/wporg-plugins/css/style-rtl.css
2276 2276 border-bottom: 1px solid #eee; 2277 2277 } 2278 2278 2279 #faq dt{2279 #faq .button-link { 2280 2280 border-top: 1px solid #eee; 2281 2281 cursor: pointer; 2282 2282 font-size: 16px; 2283 2283 font-size: 1rem; 2284 2284 font-weight: 600; 2285 margin-bottom: 1px; 2285 2286 padding: 16px 0; 2286 2287 padding: 1rem 0; 2288 text-align: right; 2289 width: 100%; 2287 2290 } 2288 2291 2289 #faq dt:before {2292 #faq .button-link:before { 2290 2293 content: "\f347"; 2291 2294 float: left; 2292 2295 font-family: dashicons; … … 2294 2297 margin: 0 1rem; 2295 2298 } 2296 2299 2297 #faq dt.open:before { 2300 #faq .button-link:focus { 2301 border: 0; 2302 border-top: 1px solid #eee; 2303 -webkit-box-shadow: none; 2304 box-shadow: none; 2305 outline: none; 2306 } 2307 2308 #faq .button-link.open:before { 2298 2309 content: "\f343"; 2299 2310 } 2300 2311 … … 3403 3414 .plugin-support .counter-count { 3404 3415 top: 5px; 3405 3416 } 3406 } 3417 } 3418 No newline at end of file -
wp-content/themes/pub/wporg-plugins/css/style.css
2276 2276 border-bottom: 1px solid #eee; 2277 2277 } 2278 2278 2279 #faq dt{2279 #faq .button-link { 2280 2280 border-top: 1px solid #eee; 2281 2281 cursor: pointer; 2282 2282 font-size: 16px; 2283 2283 font-size: 1rem; 2284 2284 font-weight: 600; 2285 margin-bottom: 1px; 2285 2286 padding: 16px 0; 2286 2287 padding: 1rem 0; 2288 text-align: left; 2289 width: 100%; 2287 2290 } 2288 2291 2289 #faq dt:before {2292 #faq .button-link:before { 2290 2293 content: "\f347"; 2291 2294 float: right; 2292 2295 font-family: dashicons; … … 2294 2297 margin: 0 1rem; 2295 2298 } 2296 2299 2297 #faq dt.open:before { 2300 #faq .button-link:focus { 2301 border: 0; 2302 border-top: 1px solid #eee; 2303 -webkit-box-shadow: none; 2304 box-shadow: none; 2305 outline: none; 2306 } 2307 2308 #faq .button-link.open:before { 2298 2309 content: "\f343"; 2299 2310 } 2300 2311 … … 3404 3415 top: 5px; 3405 3416 } 3406 3417 } 3418 /*# sourceMappingURL=style.css.map */ 3419 No newline at end of file -
wp-content/themes/pub/wporg-plugins/js/section-faq.js
1 1 ( function( $ ) { 2 $( '#faq' ).on( 'click', ' dt', function( event ) {2 $( '#faq' ).on( 'click', '.button-link', function( event ) { 3 3 var $question = $( event.target ); 4 4 5 5 if ( ! $question.is( '.open' ) ) { 6 $question.siblings( '.open' ).toggleClass( 'open' ).attr( 'aria-expanded', false ). next( 'dd' ).slideToggle( 200 );6 $question.siblings( '.open' ).toggleClass( 'open' ).attr( 'aria-expanded', false ).parent().next( 'dd' ).slideToggle( 200 ); 7 7 } 8 8 9 9 $question.toggleClass( 'open' ).attr( 'aria-expanded', function( index, attribute ) { 10 10 return 'true' !== attribute; 11 } ). next( 'dd' ).slideToggle( 200 );11 } ).parent().next( 'dd' ).slideToggle( 200 ); 12 12 }); 13 13 } )( jQuery );