Changeset 2885551
- Timestamp:
- 03/23/2023 10:29:02 AM (3 years ago)
- Location:
- admin-sticky-sidebar
- Files:
-
- 6 added
- 4 edited
-
tags/1.5 (added)
-
tags/1.5/LICENSE (added)
-
tags/1.5/admin-sticky-sidebar.css (added)
-
tags/1.5/admin-sticky-sidebar.js (added)
-
tags/1.5/admin-sticky-sidebar.php (added)
-
tags/1.5/readme.txt (added)
-
trunk/admin-sticky-sidebar.css (modified) (3 diffs)
-
trunk/admin-sticky-sidebar.js (modified) (2 diffs)
-
trunk/admin-sticky-sidebar.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
admin-sticky-sidebar/trunk/admin-sticky-sidebar.css
r2723427 r2885551 2 2 #post-body-content { 3 3 float: none; 4 5 4 margin-bottom: 40px; 6 5 } … … 8 7 #postbox-container-1 { 9 8 position: sticky; 10 z-index: 1;11 9 top: 50px; /* overwritten in js */ 12 10 right: 20px; 11 z-index: 1; 12 13 margin-top: -92px; /* overwritten in js */ 14 margin-left: auto; 13 15 14 16 height: 0; 15 margin-top: -92px; /* overwritten in js */16 margin-left: auto;17 17 18 18 transition: top 0.2s; … … 29 29 } 30 30 31 @media (max-width: 1200px) { 32 .post-type-attachment #postbox-container-1 { 33 margin-top: 0 !important; 34 35 height: auto; 36 } 37 } 38 31 39 @media (max-width: 850px) { 32 40 #postbox-container-1 { 41 margin-top: 0 !important; 42 33 43 height: auto; 34 margin-top: 0;35 44 } 36 45 -
admin-sticky-sidebar/trunk/admin-sticky-sidebar.js
r2653194 r2885551 2 2 function assResizeHandler() { 3 3 // console.log('assResizeHandler'); 4 5 var submitEl = document.getElementById('submitdiv'); 6 if (submitEl === null) return; 4 7 5 8 // elements available? … … 27 30 // also set margin top in case of weird elements oreder 28 31 var postBody = document.getElementById('post-body-content'); 29 if (postBody !== null) { 32 if (postBody === null) { 33 sidePosEl.style['margin-top'] = '0'; 34 } else { 30 35 sidePosEl.style['margin-top'] = -postBody.offsetHeight - 20 + 'px'; 31 36 } -
admin-sticky-sidebar/trunk/admin-sticky-sidebar.php
r2736991 r2885551 12 12 function admin_sticky_sidebar_css($hook) { 13 13 // only add to the post.php admin page. 14 if ('post.php' !== $hook) return;15 14 wp_enqueue_style( 'admin-sticky-sidebar-style', plugins_url( 'admin-sticky-sidebar.css?v=1.4.2' , __FILE__ )); 16 15 } … … 22 21 function admin_sticky_sidebar_js($hook) { 23 22 // only add to the post.php admin page. 24 if ('post.php' !== $hook) return;25 23 wp_enqueue_script('admin-sticky-sidebar-script', plugins_url( 'admin-sticky-sidebar.js?v=1.4.2' , __FILE__ )); 26 24 } -
admin-sticky-sidebar/trunk/readme.txt
r2736991 r2885551 5 5 Requires at least: 5.0 6 6 Tested up to: 6.0 7 Stable tag: 1. 4.27 Stable tag: 1.5 8 8 Requires PHP: 5.6 9 9 License: GPLv2 or later … … 58 58 = 1.4.2 = 59 59 * Tested with Wordpress 6.0 60 61 = 1.5 = 62 * Now works on all pages with a submit element + fix for low width devices
Note: See TracChangeset
for help on using the changeset viewer.