WordPress.org

Support

Support » Plugins and Hacks » Loading gif always visible

Loading gif always visible

Viewing 4 replies - 1 through 4 (of 4 total)
  • KimTasker
    Member

    @kimtasker

    I had the same issue, but fixed it. Actually, the plugin meta-box isn’t structured as it should be, some of the code needs to be changed.
    If you open cpt-in-navmenu.php in the plugin folder, towards the end of the file you’ll find :

    echo '<div id="cpt-archive" class="posttypediv">';
    echo '<div id="tabs-panel-cpt-archive" class="tabs-panel tabs-panel-active">';
    echo '<ul id="ctp-archive-checklist" class="categorychecklist form-no-clear">';
    echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $post_types), 0, (object) array( 'walker' => $walker) );
    echo '</ul>';
    echo '</div><!-- /.tabs-panel -->';
    echo '</div>';
    echo '<p class="button-controls">';
    echo '<span class="add-to-menu">';
    echo '<img class="waiting" src="' . esc_url( admin_url( 'images/wpspin_light.gif' ) ) . '" alt="" />';
    echo '<input type="submit"' . disabled( $nav_menu_selected_id, 0 ) . ' class="button-secondary submit-add-to-menu" value="' . __('Add to Menu', 'andromedamedia') . '" name="add-ctp-archive-menu-item" id="submit-cpt-archive" />';
    echo '</span>';
    echo '</p>';

    If you replace it with the following (only some minor changes) :

    echo '<div id="cpt-archive" class="posttypediv">';
    echo '<div id="tabs-panel-cpt-archive" class="tabs-panel tabs-panel-active">';
    echo '<ul id="ctp-archive-checklist" class="categorychecklist form-no-clear">';
    echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $post_types), 0, (object) array( 'walker' => $walker) );
    echo '</ul>';
    echo '</div><!-- /.tabs-panel -->';
    echo '<p class="button-controls">';
    echo '<span class="add-to-menu">';
    echo '<input type="submit"' . disabled( $nav_menu_selected_id, 0 ) . ' class="button-secondary submit-add-to-menu right" value="' . __('Add to Menu', 'andromedamedia') . '" name="add-ctp-archive-menu-item" id="submit-cpt-archive" />';
    echo '<span class="spinner"></span>';
    echo '</span>';
    echo '</p>';
    echo '</div>';
      added “right” to the submit button class
      deleted the <img /> of the ajax gif
      added <span class=”spinner”> after the submit button
      the <div id=”cpt-archive”> must include all the box so the closing </div> goes at the end

    that’s it

    helgatheviking
    Participant

    @helgatheviking

    Thanks for sharing your solution!

    Works like a charm! Thanks @kimtasker

    Marco Panichi
    Member

    @marcopanichi

    Yeah it works!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Loading gif always visible’ is closed to new replies.