WordPress.org

Plugin Directory

Changeset 630338


Ignore:
Timestamp:
11/26/12 20:42:52 (17 months ago)
Author:
eskapism
Message:

fixes

Location:
cms-tree-page-view/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cms-tree-page-view/trunk/functions.php

    r629831 r630338  
    245245    if (cms_tpv_is_one_of_our_pages()) { 
    246246 
    247         wp_enqueue_script( "jquery-cookie", CMS_TPV_URL . "scripts/jquery.biscuit.js", array("jquery")); // renamed from cookie to fix problems with mod_security 
     247        // renamed from cookie to fix problems with mod_security 
     248        wp_enqueue_script( "jquery-cookie", CMS_TPV_URL . "scripts/jquery.biscuit.js", array("jquery")); 
     249        wp_enqueue_script( "jquery-ui-sortable"); 
    248250        wp_enqueue_script( "jquery-jstree", CMS_TPV_URL . "scripts/jquery.jstree.js", false, CMS_TPV_VERSION); 
    249251        wp_enqueue_script( "jquery-alerts", CMS_TPV_URL . "scripts/jquery.alerts.js", false, CMS_TPV_VERSION); 
     
    563565        $wpml_post_counts = cms_tpv_get_wpml_post_counts($post_type); 
    564566         
    565         $post_count_all = $wpml_post_counts["publish"][$wpml_current_lang] + $wpml_post_counts["draft"][$wpml_current_lang]; 
    566         $post_count_publish = $wpml_post_counts["publish"][$wpml_current_lang]; 
    567         $post_count_trash   = $wpml_post_counts["trash"][$wpml_current_lang]; 
     567        $post_count_all = @$wpml_post_counts["publish"][$wpml_current_lang] + @$wpml_post_counts["draft"][$wpml_current_lang]; 
     568        $post_count_publish = @$wpml_post_counts["publish"][$wpml_current_lang]; 
     569        $post_count_trash   = @$wpml_post_counts["trash"][$wpml_current_lang]; 
    568570     
    569571        foreach ($wpml_post_counts["publish"] as $one_wpml_lang => $one_wpml_lang_count) { 
     
    626628                    } 
    627629 
    628                     $lang_count = $wpml_post_counts["publish"][$one_lang["language_code"]] + $wpml_post_counts["draft"][$one_lang["language_code"]]; 
     630                    $lang_count = @$wpml_post_counts["publish"][$one_lang["language_code"]] + @$wpml_post_counts["draft"][$one_lang["language_code"]]; 
    629631 
    630632                    $lang_out .= " 
     
    643645 
    644646        if (empty($pages)) { 
     647         
    645648            echo '<div class="updated fade below-h2"><p>' . __("No posts found.", 'cms-tree-page-view') . '</p></div>'; 
    646         } else { 
     649         
     650        } 
     651 
     652        if (true) { 
    647653 
    648654            // start the party! 
    649655 
    650656            ?> 
    651             <ul class="cms-tpv-subsubsub"> 
     657            <ul class="cms-tpv-subsubsub hidden"> 
    652658                <li> 
    653659                    <a class="cms_tvp_view_all <?php echo ($cms_tpv_view=="all") ? "current" : "" ?>" href="#" <?php echo $status_data_attributes["all"] ?>> 
  • cms-tree-page-view/trunk/readme.txt

    r629831 r630338  
    9595- Added "Add new"-link next to headline, to better match the regular post overview page + it makes it possible to add new pages/posts when there are no pages/posts added (previously there needed to be at least one post added to be able to add new posts) 
    9696- Added post count in parenthesis after each post status. Also makes the page match the regular post overview page a it more. Works for both built in post types and custom post types + if WPML is installed it will show post count for each language too. 
     97- Fixed a bug with sortables (well, I kinda forgot to load that script at all!) that made the plugin only work on the dashboard. 
    9798 
    9899= 1.0 = 
  • cms-tree-page-view/trunk/scripts/cms_tree_page_view.js

    r629638 r630338  
    5252        // Also: if more than one row are empty at the end, remove all but the last 
    5353        $(document).on("keyup", "ul.cms_tpv_action_add_doit_pages li:last-child input", function(e) { 
    54             my.log(123); 
     54 
    5555            var $t = $(this); 
    5656            var $li = $t.closest("li"); 
     
    332332            }, 500, e); 
    333333 
    334             console.log("timer added"); 
     334            //console.log("timer added"); 
    335335 
    336336            $container.data("cmstpv_global_link_timer", timeoutID); 
    337337 
    338338        } else { 
    339             console.log("timer not added because doit visible"); 
     339            //console.log("timer not added because doit visible"); 
    340340        } 
    341341 
     
    775775} 
    776776 
     777/** 
     778 * Sets the view; load pages for the current lang + post type + status 
     779 */ 
    777780function cms_tvp_set_view(view, elm) { 
    778781 
Note: See TracChangeset for help on using the changeset viewer.