Ticket #27423: 27423.9.patch
File 27423.9.patch, 21.1 KB (added by , 11 years ago) |
---|
-
src/wp-includes/css/media-views.css
89 89 display: none; 90 90 } 91 91 92 body.in-modal { 93 overflow: hidden; 94 } 95 92 96 /* Enable draggable on IE10 touch events until it's rolled into jQuery UI core */ 93 97 .ui-sortable, 94 98 .ui-draggable { … … 529 533 z-index: 150; 530 534 } 531 535 536 .media-frame .media-frame-menu-toggle { 537 position: absolute; 538 top: 0; 539 left: 0; 540 z-index: 200; 541 display: none; 542 text-decoration: none; 543 font-size: 16px; 544 padding: 16px; 545 } 546 547 .media-frame .media-frame-menu-toggle:hover { 548 position: absolute; 549 } 550 532 551 .media-frame-title { 533 552 position: absolute; 534 553 top: 0; … … 683 702 */ 684 703 .attachments { 685 704 margin: 0; 686 padding -right: 16px;705 padding: 8px; 687 706 -webkit-overflow-scrolling: touch; 688 707 } 689 708 … … 705 724 } 706 725 707 726 .attachment:focus { 727 outline: none; 728 } 729 730 .attachment:focus .attachment-preview { 708 731 -webkit-box-shadow: 709 732 0 0 0 1px #5b9dd9, 710 733 0 0 2px 2px #5b9dd9; … … 711 734 box-shadow: 712 735 0 0 0 1px #5b9dd9, 713 736 0 0 2px 2px #5b9dd9; 714 outline: none;715 737 } 716 738 717 .selected.attachment {739 .selected.attachment .attachment-preview { 718 740 -webkit-box-shadow: 719 741 0 0 0 1px #fff, 720 742 0 0 0 3px #ccc; … … 725 747 726 748 .attachment-preview { 727 749 position: relative; 728 width: 199px;729 height: 199px;730 750 -webkit-box-shadow: 731 751 inset 0 0 15px rgba( 0, 0, 0, 0.1 ), 732 752 inset 0 0 0 1px rgba( 0, 0, 0, 0.05 ); … … 904 924 display: block; 905 925 } 906 926 907 .attachment.details ,927 .attachment.details .attachment-preview, 908 928 .media-grid-view .selected.attachment { 909 929 -webkit-box-shadow: 0 0 0 1px #fff, 910 930 0 0 0 5px #1e8cbe; … … 1456 1476 .media-selection .attachments { 1457 1477 display: inline-block; 1458 1478 height: 48px; 1459 margin-top: 5px;1460 1479 overflow: hidden; 1461 1480 vertical-align: top; 1462 1481 } … … 1525 1544 margin-top: 14px; 1526 1545 } 1527 1546 1528 /** 1529 * Attachment Details 1530 */ 1531 .attachment-details { 1532 position: relative; 1533 overflow: auto; 1534 } 1535 1536 .attachment-details .settings-save-status { 1547 .media-sidebar .settings-save-status { 1548 background: #f5f5f5; 1537 1549 float: right; 1538 1550 text-transform: none; 1539 1551 z-index: 10; 1540 1552 } 1541 1553 1542 . attachment-details.settings-save-status .spinner {1554 .media-sidebar .settings-save-status .spinner { 1543 1555 margin: 0 5px 0; 1544 1556 } 1545 1557 1546 . attachment-details.settings-save-status .saved {1558 .media-sidebar .settings-save-status .saved { 1547 1559 float: right; 1548 1560 display: none; 1549 1561 } 1550 1562 1551 . attachment-details.save-waiting .settings-save-status .spinner,1552 . attachment-details.save-complete .settings-save-status .saved {1563 .media-sidebar .save-waiting .settings-save-status .spinner, 1564 .media-sidebar .save-complete .settings-save-status .saved { 1553 1565 display: block; 1554 1566 } 1555 1567 1568 /** 1569 * Attachment Details 1570 */ 1571 .attachment-details { 1572 position: relative; 1573 overflow: auto; 1574 } 1575 1556 1576 .attachment-info { 1557 1577 overflow: hidden; 1558 1578 min-height: 60px; … … 1644 1664 display: block; 1645 1665 } 1646 1666 1647 . media-modal.delete-attachment,1648 . media-modal.trash-attachment {1667 .attachment-info .delete-attachment, 1668 .attachment-info .trash-attachment { 1649 1669 color: #bc0b0b; 1650 1670 } 1651 1671 1652 . media-modal.delete-attachment:hover,1653 . media-modal.trash-attachment:hover {1672 .attachment-info .delete-attachment:hover, 1673 .attachment-info .trash-attachment:hover { 1654 1674 color: red; 1655 1675 } 1656 1676 … … 2309 2329 @media only screen and (max-width: 640px), screen and (max-height: 400px) { 2310 2330 2311 2331 /* Media tabs on the top */ 2312 .media-frame-content .media-toolbar .instructions { 2332 .media-frame-content .media-toolbar .instructions, 2333 .media-frame-router { 2313 2334 display: none; 2314 2335 } 2315 2336 2316 2337 .media-frame-menu { 2317 width: auto; 2318 bottom: auto; 2319 right: 0; 2320 height: 60px; 2338 top: 30px; 2339 left: 0; 2340 z-index: inherit; 2321 2341 } 2322 2342 2343 .media-frame .media-frame-menu-toggle { 2344 display: block; 2345 font-size: 22px; 2346 font-weight: 600; 2347 color: #444; 2348 padding: 12px 16px; 2349 transition: color .1s ease-in; 2350 } 2351 2352 .media-frame .media-frame-menu-toggle:after { 2353 display: inline-block; 2354 width: 20px; 2355 height: 20px; 2356 font: normal 20px/1 dashicons; 2357 content: "\f140"; 2358 -webkit-font-smoothing: antialiased; 2359 -moz-osx-font-smoothing: grayscale; 2360 } 2361 2362 .media-frame .media-frame-menu-toggle:hover, 2363 .media-frame .media-frame-menu-toggle:focus { 2364 color: #2ea2cc; 2365 } 2366 2323 2367 .media-menu { 2324 border-right: none; 2368 z-index: inherit; 2369 width: 200px; 2325 2370 position: relative; 2326 border-bottom: 1px solid #dddddd;2327 overflow: hidden;2328 2371 padding: 10px 0 10px 10px; 2372 display: none; 2373 border: 1px solid #ccc; 2329 2374 } 2330 2375 2331 .media-menu a { 2332 float: left; 2333 width: 42%; 2334 white-space: nowrap; 2335 text-overflow: ellipsis; 2336 overflow: hidden; 2376 .media-menu.visible { 2377 z-index: 2000; 2378 display: block; 2379 position: fixed; 2380 top: 0; 2381 bottom: 0; 2382 left: 0; 2383 right: 0; 2384 width: auto; 2385 border: none; 2386 padding: 10px 0; 2337 2387 } 2338 2388 2389 .media-menu > a { 2390 padding: 20px; 2391 width: auto !important; 2392 text-align: center; 2393 font-size: 20px; 2394 } 2395 2339 2396 .media-frame-title { 2340 2397 display: none; 2341 2398 } … … 2346 2403 font-size: 14px; 2347 2404 } 2348 2405 2406 .image-details .media-frame-menu-toggle { 2407 display: none; 2408 } 2409 2349 2410 .media-frame-toolbar { 2350 2411 position: absolute; 2351 2412 bottom: 0px; 2352 2413 left: 0; 2353 2414 right: 0; 2354 background: #FFF; 2355 border-top: 1px solid #DEDEDE; 2415 background: #fff; 2356 2416 } 2357 2417 2358 2418 .media-toolbar { … … 2359 2419 position: relative; 2360 2420 } 2361 2421 2422 .media-toolbar .spinner { 2423 margin-right: 6px; 2424 } 2425 2362 2426 .media-frame { 2363 2427 overflow: hidden; 2364 2428 } 2365 2429 2366 . attachments-browser .attachments{2367 top: 42px;2430 .media-frame .attachments-browser { 2431 overflow: auto; 2368 2432 } 2369 2433 2370 .attachment-details h3 { 2371 margin-top: 45px; 2434 .attachments-browser .attachments { 2435 top: 0; 2436 right: 0; 2372 2437 } 2373 2438 2374 2439 /* Shorten right-side links so they don't overlap the close button */ … … 2381 2446 display: none; 2382 2447 } 2383 2448 2384 .media-frame-title { 2449 .attachment-details { 2450 padding: 0 20px; 2451 } 2452 2453 .attachment-display-settings { 2454 padding: 0 20px 20px 20px; 2455 width: -webkit-calc(100% - 40px); 2456 width: calc(100% - 40px); 2457 } 2458 2459 .attachment-info .thumbnail img { 2460 max-width: 100%; /* Display the image bigger, since the screen's smaller. */ 2461 max-height: 50%; 2462 } 2463 2464 .image-details .media-frame-title { 2385 2465 top: 72px; 2386 left: auto;2387 height: auto;2388 2466 } 2389 2467 2390 2468 .media-frame-title h1 { … … 2393 2471 } 2394 2472 2395 2473 .media-frame-router { 2396 top: 84px;2397 2474 left: 0; 2398 2475 } 2399 2476 2400 2477 .media-frame-content { 2401 2478 left: 0; 2402 top: 118px;2479 top: 48px; 2403 2480 } 2404 2481 2405 2482 .image-details .media-frame.hide-router .media-frame-content { … … 2406 2483 top: 40px; 2407 2484 } 2408 2485 2409 .media-frame .attachments-browser { 2410 padding-bottom: 300px; 2486 .media-sidebar { 2487 position: fixed; 2488 top: 0; 2489 right: -100%; 2490 width: 100%; 2491 padding: 0; 2492 margin: 0 0 62px 0; 2493 z-index: 201; 2494 transition: .18s right ease-in-out; 2411 2495 } 2412 2496 2413 .media-sidebar {2414 border-bottom: 1px solid #dddddd;2497 .media-sidebar.active { 2498 right: 0; 2415 2499 } 2416 2500 2417 2501 .media-modal { … … 2418 2502 width: auto; 2419 2503 } 2420 2504 2421 .media-toolbar-primary, .media-toolbar-secondary { 2505 .media-toolbar-primary, 2506 .media-toolbar-secondary { 2422 2507 height: auto; 2423 2508 } 2424 2509 2510 .attachments-browser .media-toolbar-primary, 2511 .attachments-browser .media-toolbar-secondary { 2512 width: 50%; 2513 } 2514 2515 .media-frame .media-frame-content .media-toolbar .search, 2516 .media-frame .media-frame-content .media-toolbar .attachment-filters { 2517 max-width: 200px; 2518 width: -webkit-calc(100% - 32px); 2519 width: calc(100% - 32px); 2520 margin: 11px 0 0 0; 2521 height: 28px; 2522 } 2523 2425 2524 .uploader-inline h3 { 2426 2525 margin: 0 0 .8em 0; 2427 2526 } … … 2434 2533 margin: 0; 2435 2534 } 2436 2535 2437 .attachments-browser .attachments, .attachments-browser .uploader-inline { 2536 .attachments-browser .attachments, 2537 .attachments-browser .uploader-inline { 2438 2538 position: relative; 2439 margin-right: 180px;2539 margin-right: 0; 2440 2540 } 2441 2541 2442 2542 /* Full-bleed modal */ … … 2458 2558 max-width: 100%; 2459 2559 } 2460 2560 2461 .attachments-browser .media-toolbar-primary input.search {2462 max-width: 150px;2463 }2464 2465 2561 .uploader-inline-content { 2466 2562 position: relative; 2467 2563 } … … 2564 2660 2565 2661 .media-frame .spinner { 2566 2662 background-image: url(../images/spinner-2x.gif); 2567 2663 } 2568 2664 } 2569 2665 2666 .attachments-browser .attachment { 2667 position: relative; 2668 width: 20%; 2669 margin: 0; 2670 } 2570 2671 2672 .attachments-browser .attachment:before { 2673 content: ''; 2674 display: block; 2675 padding-top: 100%; 2676 } 2677 2678 .attachments-browser .attachment .attachment-preview { 2679 position: absolute; 2680 top: 8px; 2681 right: 8px; 2682 bottom: 8px; 2683 left: 8px; 2684 } 2685 2686 .attachments-browser .portrait img { 2687 max-width: 100%; 2688 } 2689 2690 .attachments-browser .landscape img { 2691 max-height: 100%; 2692 } 2693 2694 /**/ 2695 2696 .media-selection .attachments { 2697 padding: 5px; 2698 } 2699 2700 .media-selection .attachment { 2701 margin: 5px; 2702 width: 40px; 2703 } 2704 2705 .media-selection .attachment-preview, 2706 .media-selection .attachment-preview .thumbnail { 2707 width: 40px; 2708 height: 40px; 2709 } 2710 2711 .media-selection .portrait .thumbnail img { 2712 max-width: 40px; 2713 height: auto; 2714 } 2715 2716 .media-selection .landscape .thumbnail img { 2717 width: auto; 2718 max-height: 40px; 2719 } 2720 2721 @media only screen and ( max-width: 400px ) { 2722 .attachments-browser .attachment { 2723 width: 50%; 2724 } 2725 } 2726 2727 @media only screen and ( min-width: 400px ) { 2728 .attachments-browser .attachment { 2729 width: 33.3%; 2730 } 2731 } 2732 2733 @media only screen and ( min-width: 520px ) { 2734 .attachments-browser .attachment { 2735 width: 25%; 2736 } 2737 } 2738 2739 @media only screen and ( min-width: 640px ) { 2740 .attachments-browser .attachment { 2741 width: 33.3%; 2742 } 2743 } 2744 2745 @media only screen and ( min-width: 960px ) { 2746 .attachments-browser .attachment { 2747 width: 25%; 2748 } 2749 } 2750 2751 @media only screen and ( min-width: 1200px ) { 2752 .attachments-browser .attachment { 2753 width: 20%; 2754 } 2755 } 2756 2571 2757 /** 2572 2758 * Media Grid 2573 2759 */ … … 2669 2855 * 2670 2856 * This should be OOCSS'd so both use a shared selector. 2671 2857 */ 2672 .edit-attachment-frame .edit-media-header {2673 overflow: hidden;2674 }2675 2676 .upload-php .media-modal-close .media-modal-icon:before {2677 content: '\f335';2678 font-size: 30px;2679 }2680 2681 .upload-php .media-modal-close:hover .media-modal-icon:before,2682 .upload-php .media-modal-close:focus .media-modal-icon:before {2683 color: #fff;2684 }2685 2686 .upload-php .media-modal-close .media-modal-icon {2687 margin-top: 13px;2688 width: 30px;2689 height: 30px;2690 }2691 2692 .upload-php .media-modal-close,2693 2858 .edit-attachment-frame .edit-media-header .left, 2694 2859 .edit-attachment-frame .edit-media-header .right { 2695 2860 cursor: pointer; 2696 2861 color: #777; 2697 2862 background-color: transparent; 2698 height: 56px; 2699 width: 56px; 2700 padding: 0; 2701 position: absolute; 2863 height: 48px; 2864 width: 54px; 2865 float: left; 2702 2866 text-align: center; 2703 2867 border: 0; 2704 border- left: 1px solid #ddd;2868 border-right: 1px solid #ddd; 2705 2869 } 2706 2870 2707 .upload-php .media-modal-close {2708 top: 0;2709 right: 0;2710 }2711 2712 .edit-attachment-frame .edit-media-header .left {2713 right: 112px;2714 }2715 2716 .edit-attachment-frame .edit-media-header .right {2717 right: 56px;2718 }2719 2720 .edit-attachment-frame .media-frame-title {2721 left: 0;2722 right: 170px; /* leave space for prev/next/close */2723 }2724 2725 2871 .edit-attachment-frame .edit-media-header .right:before, 2726 2872 .edit-attachment-frame .edit-media-header .left:before { 2727 2873 font: normal 20px/50px 'dashicons' !important; … … 2750 2896 cursor: inherit; 2751 2897 } 2752 2898 2753 . upload-php .media-modal-close:hover,2899 .edit-attachment-frame .edit-media-header .close:hover, 2754 2900 .edit-attachment-frame .edit-media-header .right:hover, 2755 2901 .edit-attachment-frame .edit-media-header .left:hover, 2756 . upload-php .media-modal-close:focus,2902 .edit-attachment-frame .edit-media-header .close:focus, 2757 2903 .edit-attachment-frame .edit-media-header .right:focus, 2758 2904 .edit-attachment-frame .edit-media-header .left:focus { 2759 2905 background: #0074a2; … … 2768 2914 .edit-attachment-frame .media-frame-content { 2769 2915 border-bottom: none; 2770 2916 bottom: 0; 2771 top: 56px;2772 2917 } 2773 2918 2774 2919 /* Hiding this for the moment instead of removing it from the template. */ … … 2783 2928 bottom: 0; 2784 2929 right: 0; 2785 2930 left: 0; 2786 -webkit-box-shadow: inset 0px 4px 4px -4px rgba(0, 0, 0, 0.1);2787 box-shadow: inset 0px 4px 4px -4px rgba(0, 0, 0, 0.1);2788 2931 } 2789 .edit-attachment-frame .attachment-media-view { 2790 float: left; 2791 width: 65%; 2792 height: 100%; 2932 2933 .edit-attachment-frame .attachment-info { 2934 border-bottom: 0; 2935 border-right: 1px solid #ddd; 2936 bottom: 0; 2937 position: absolute; 2938 top: 0; 2939 left: 0; 2940 right: 50%; 2941 margin-bottom: 0; 2942 padding: 2% 4% 0; 2943 height: 98%; /* 100% - padding percentage above */ 2793 2944 } 2794 2945 2795 .edit-attachment-frame .attachment-media-view .thumbnail { 2796 -webkit-box-sizing: border-box; 2797 -moz-box-sizing: border-box; 2798 box-sizing: border-box; 2799 padding: 16px; 2800 height: 100%; 2946 .edit-attachment-frame .attachment-info .thumbnail { 2947 float: none; 2948 max-width: none; 2949 max-height: 70%; 2950 margin-right: 0; 2801 2951 } 2802 2952 2803 .edit-attachment-frame .attachment-media-view img { 2804 display: block; 2805 margin-bottom: 16px; 2953 .edit-attachment-frame .attachment-info .thumbnail-image img { 2954 margin: 0; 2955 } 2956 2957 .edit-attachment-frame .attachment-info .thumbnail-image:after { 2958 -webkit-box-shadow: none; 2959 box-shadow: none; 2960 } 2961 2962 .edit-attachment-frame .attachment-info .thumbnail img { 2806 2963 max-width: 100%; 2807 max-height: -webkit-calc( 100% - 42px ); 2808 max-height: calc( 100% - 42px ); /* leave space for actions underneath */ 2964 max-height: 100%; 2809 2965 } 2810 2966 2811 .edit-attachment-frame .delete-attachment { 2812 float: right; 2813 margin-top: 7px; 2967 .edit-attachment-frame .attachment-info .details { 2968 float: none; 2814 2969 } 2815 2970 2816 2971 .edit-attachment-frame .wp-media-wrapper { … … 2817 2972 margin-bottom: 12px; 2818 2973 } 2819 2974 2820 .edit-attachment-frame .attachment-info { 2821 overflow: auto; 2822 -webkit-box-sizing: border-box; 2823 -moz-box-sizing: border-box; 2824 box-sizing: border-box; 2825 margin-bottom: 0; 2826 padding: 12px 16px 0; 2827 width: 35%; 2828 height: 100%; 2829 -webkit-box-shadow: inset 0px 4px 4px -4px rgba(0, 0, 0, 0.1); 2830 box-shadow: inset 0px 4px 4px -4px rgba(0, 0, 0, 0.1); 2831 border-bottom: 0; 2832 border-left: 1px solid #ddd; 2833 background: #f3f3f3; 2975 .edit-attachment-frame .attachment-fields { 2976 bottom: 0; 2977 padding: 2% 4%; 2978 position: absolute; 2979 top: 0; 2980 left: 50%; 2981 right: 0; 2834 2982 } 2835 2983 2836 .edit-attachment-frame .attachment-info .details, 2837 .edit-attachment-frame .attachment-info .settings { 2838 overflow: hidden; 2839 float: none; 2840 margin-bottom: 15px; 2841 padding-bottom: 15px; 2842 border-bottom: 1px solid #ddd; 2843 } 2844 2845 .edit-attachment-frame .attachment-info .setting { 2984 .edit-attachment-frame .attachment-fields .setting { 2846 2985 display: block; 2847 2986 float: left; 2848 2987 width: 100%; … … 2849 2988 margin: 1px 0; 2850 2989 } 2851 2990 2852 .edit-attachment-frame .attachment- info.setting label {2991 .edit-attachment-frame .attachment-fields .setting label { 2853 2992 display: block; 2854 2993 } 2855 2994 2856 .edit-attachment-frame .attachment- info.setting .link-to-custom {2995 .edit-attachment-frame .attachment-fields .setting .link-to-custom { 2857 2996 margin: 3px 0; 2858 2997 } 2859 2998 2860 .edit-attachment-frame .attachment- info.setting .name {2999 .edit-attachment-frame .attachment-fields .setting .name { 2861 3000 min-width: 30%; 2862 3001 margin-right: 4%; 2863 3002 font-size: 12px; … … 2864 3003 text-align: right; 2865 3004 } 2866 3005 2867 .edit-attachment-frame .attachment- info.setting select {3006 .edit-attachment-frame .attachment-fields .setting select { 2868 3007 max-width: 65%; 2869 3008 } 2870 3009 2871 .edit-attachment-frame .attachment- info.setting input[type="checkbox"],2872 .edit-attachment-frame .attachment- info.field input[type="checkbox"] {3010 .edit-attachment-frame .attachment-fields .setting input[type="checkbox"], 3011 .edit-attachment-frame .attachment-fields .field input[type="checkbox"] { 2873 3012 width: 16px; 2874 3013 float: none; 2875 3014 margin: 8px 3px 0; … … 2876 3015 padding: 0; 2877 3016 } 2878 3017 2879 .edit-attachment-frame .attachment- info.setting span {3018 .edit-attachment-frame .attachment-fields .setting span { 2880 3019 float: left; 2881 3020 min-height: 22px; 2882 3021 padding-top: 8px; … … 2885 3024 color: #666; 2886 3025 } 2887 3026 2888 .edit-attachment-frame .attachment- info.setting input[type="text"],2889 .edit-attachment-frame .attachment- info.setting input[type="password"],2890 .edit-attachment-frame .attachment- info.setting input[type="number"],2891 .edit-attachment-frame .attachment- info.setting input[type="search"],2892 .edit-attachment-frame .attachment- info.setting input[type="email"],2893 .edit-attachment-frame .attachment- info.setting input[type="url"],2894 .edit-attachment-frame .attachment- info.setting textarea,2895 .edit-attachment-frame .attachment- info.setting .value {3027 .edit-attachment-frame .attachment-fields .setting input[type="text"], 3028 .edit-attachment-frame .attachment-fields .setting input[type="password"], 3029 .edit-attachment-frame .attachment-fields .setting input[type="number"], 3030 .edit-attachment-frame .attachment-fields .setting input[type="search"], 3031 .edit-attachment-frame .attachment-fields .setting input[type="email"], 3032 .edit-attachment-frame .attachment-fields .setting input[type="url"], 3033 .edit-attachment-frame .attachment-fields .setting textarea, 3034 .edit-attachment-frame .attachment-fields .setting .value { 2896 3035 margin: 1px; 2897 3036 width: 65%; 2898 3037 float: right; … … 2902 3041 box-sizing: border-box; 2903 3042 } 2904 3043 2905 .edit-attachment-frame .attachment- info.setting textarea {3044 .edit-attachment-frame .attachment-fields .setting textarea { 2906 3045 height: 62px; 2907 3046 resize: vertical; 2908 3047 } 2909 3048 2910 .edit-attachment-frame .attachment- infoselect {3049 .edit-attachment-frame .attachment-fields select { 2911 3050 margin-top: 3px; 2912 3051 } 2913 3052 -
src/wp-includes/js/media-views.js
1747 1747 template: media.template('media-frame'), 1748 1748 regions: ['menu','title','content','toolbar','router'], 1749 1749 1750 events: { 1751 'click a.media-frame-menu-toggle': 'toggleMenu' 1752 }, 1753 1750 1754 /** 1751 1755 * @global wp.Uploader 1752 1756 */ … … 1840 1844 controller: this 1841 1845 }); 1842 1846 }, 1847 1848 toggleMenu: function( event ) { 1849 console.log( 'clicked' ); 1850 event.preventDefault(); 1851 this.$el.find( '.media-menu' ).toggleClass( 'visible' ); 1852 1853 }, 1843 1854 /** 1844 1855 * @param {Object} toolbar 1845 1856 * @this wp.media.controller.Region … … 3221 3232 }; 3222 3233 } 3223 3234 3235 $( 'body' ).addClass( 'in-modal' ); 3224 3236 $el.show().focus(); 3225 3237 return this.propagate('open'); 3226 3238 }, … … 3236 3248 return this; 3237 3249 } 3238 3250 3251 $( 'body' ).removeClass( 'in-modal' ); 3252 3239 3253 // Hide modal and remove restricted media modal tab focus once it's closed 3240 3254 this.$el.hide().undelegate( 'keydown' ); 3241 3255 … … 4429 4443 }); 4430 4444 4431 4445 /** 4432 4433 4434 4435 4436 4437 4438 4439 4446 * wp.media.view.Menu 4447 * 4448 * @constructor 4449 * @augments wp.media.view.PriorityList 4450 * @augments wp.media.View 4451 * @augments wp.Backbone.View 4452 * @augments Backbone.View 4453 */ 4440 4454 media.view.Menu = media.view.PriorityList.extend({ 4441 4455 tagName: 'div', 4442 4456 className: 'media-menu', … … 4443 4457 property: 'state', 4444 4458 ItemView: media.view.MenuItem, 4445 4459 region: 'menu', 4460 4461 initialize: function( options ) { 4462 media.view.PriorityList.prototype.initialize.apply( this, arguments ); 4463 this.controller = options.controller; 4464 this.listenTo( this.controller, 'deactivate', function() { 4465 this.$el.removeClass( 'visible' ); 4466 } ); 4467 }, 4468 4446 4469 /** 4447 4470 * @param {Object} options 4448 4471 * @param {string} id … … 4606 4629 tagName: 'li', 4607 4630 className: 'attachment', 4608 4631 template: media.template('attachment'), 4632 isTouch: false, 4609 4633 4610 4634 attributes: { 4611 4635 tabIndex: 0, … … 4614 4638 4615 4639 events: { 4616 4640 'click .js--select-attachment': 'toggleSelectionHandler', 4641 'touchend .attachment-preview': 'setTouch', 4617 4642 'change [data-setting]': 'updateSetting', 4618 4643 'change [data-setting] input': 'updateSetting', 4619 4644 'change [data-setting] select': 'updateSetting', … … 4730 4755 this.$bar.width( this.model.get('percent') + '%' ); 4731 4756 } 4732 4757 }, 4758 4759 setTouch: function() { 4760 this.isTouch = true; 4761 }, 4762 4733 4763 /** 4734 4764 * @param {Object} event 4735 4765 */ … … 4752 4782 method = 'toggle'; 4753 4783 } 4754 4784 4785 if ( this.isTouch ) { 4786 this.isTouch = false; 4787 method = 'add'; 4788 } 4789 4755 4790 this.toggleSelection({ 4756 4791 method: method 4757 4792 }); … … 4800 4835 selection[ this.selected() ? 'remove' : 'add' ]( model ); 4801 4836 selection.single( model ); 4802 4837 return; 4838 } else if ( 'add' === method ) { 4839 selection.add( model ); 4840 selection.single( model ); 4841 return; 4842 4803 4843 } 4804 4844 4805 4845 // Fixes bug that loses focus when selecting a featured image … … 5149 5189 5150 5190 this.initSortable(); 5151 5191 5152 _.bindAll( this, 'css' );5192 /*_.bindAll( this, 'css' ); 5153 5193 this.model.on( 'change:edge change:gutter', this.css, this ); 5154 5194 this._resizeCss = _.debounce( _.bind( this.css, this ), this.refreshSensitivity ); 5155 5195 if ( this.options.resize ) { … … 5158 5198 5159 5199 // Call this.css() after this view has been rendered in the DOM so 5160 5200 // attachments get proper width applied. 5161 _.defer( this.css, this ); 5201 _.defer( this.css, this );*/ 5162 5202 }, 5163 5203 5164 5204 dispose: function() { -
src/wp-includes/media-template.php
130 130 </style> 131 131 <![endif]--> 132 132 <script type="text/html" id="tmpl-media-frame"> 133 <a class="media-frame-menu-toggle" href="#">Insert Media<!-- Change this dynamically. --></a> 133 134 <div class="media-frame-menu"></div> 134 135 <div class="media-frame-title"></div> 135 136 <div class="media-frame-router"></div>