Plugin Directory

Changeset 2885551


Ignore:
Timestamp:
03/23/2023 10:29:02 AM (3 years ago)
Author:
followalter
Message:

Now works on all pages with a submit element + fix for low width devices

Location:
admin-sticky-sidebar
Files:
6 added
4 edited

Legend:

Unmodified
Added
Removed
  • admin-sticky-sidebar/trunk/admin-sticky-sidebar.css

    r2723427 r2885551  
    22#post-body-content {
    33  float: none;
    4 
    54  margin-bottom: 40px;
    65}
     
    87#postbox-container-1 {
    98  position: sticky;
    10   z-index: 1;
    119  top: 50px; /* overwritten in js */
    1210  right: 20px;
     11  z-index: 1;
     12
     13  margin-top: -92px; /* overwritten in js */
     14  margin-left: auto;
    1315
    1416  height: 0;
    15   margin-top: -92px; /* overwritten in js */
    16   margin-left: auto;
    1717
    1818  transition: top 0.2s;
     
    2929}
    3030
     31@media (max-width: 1200px) {
     32  .post-type-attachment #postbox-container-1 {
     33    margin-top: 0 !important;
     34
     35    height: auto;
     36  }
     37}
     38
    3139@media (max-width: 850px) {
    3240  #postbox-container-1 {
     41    margin-top: 0 !important;
     42
    3343    height: auto;
    34     margin-top: 0;
    3544  }
    3645
  • admin-sticky-sidebar/trunk/admin-sticky-sidebar.js

    r2653194 r2885551  
    22function assResizeHandler() {
    33  // console.log('assResizeHandler');
     4
     5  var submitEl = document.getElementById('submitdiv');
     6  if (submitEl === null) return;
    47
    58  // elements available?
     
    2730  // also set margin top in case of weird elements oreder
    2831  var postBody = document.getElementById('post-body-content');
    29   if (postBody !== null) {
     32  if (postBody === null) {
     33    sidePosEl.style['margin-top'] = '0';
     34  } else {
    3035    sidePosEl.style['margin-top'] = -postBody.offsetHeight - 20 + 'px';
    3136  }
  • admin-sticky-sidebar/trunk/admin-sticky-sidebar.php

    r2736991 r2885551  
    1212function admin_sticky_sidebar_css($hook) {
    1313  // only add to the post.php admin page.
    14   if ('post.php' !== $hook) return;
    1514  wp_enqueue_style( 'admin-sticky-sidebar-style',  plugins_url( 'admin-sticky-sidebar.css?v=1.4.2' , __FILE__ ));
    1615}
     
    2221function admin_sticky_sidebar_js($hook) {
    2322  // only add to the post.php admin page.
    24   if ('post.php' !== $hook) return;
    2523  wp_enqueue_script('admin-sticky-sidebar-script', plugins_url( 'admin-sticky-sidebar.js?v=1.4.2' , __FILE__ ));
    2624}
  • admin-sticky-sidebar/trunk/readme.txt

    r2736991 r2885551  
    55Requires at least: 5.0
    66Tested up to: 6.0
    7 Stable tag: 1.4.2
     7Stable tag: 1.5
    88Requires PHP: 5.6
    99License: GPLv2 or later
     
    5858= 1.4.2 =
    5959* 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.