WordPress.org

Plugin Directory

Changeset 629638


Ignore:
Timestamp:
11/25/12 12:45:57 (17 months ago)
Author:
eskapism
Message:

bug fixes with adding pages

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

Legend:

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

    r628260 r629638  
    525525    cms_tpv_print_childs(0, $cms_tpv_view, $jstree_open, $post_type); 
    526526    $json_data = ob_get_clean(); 
     527    if (! $json_data) $json_data = '{}'; 
    527528    ?> 
    528529    <script type="text/javascript"> 
     
    12401241                "ID" => $post_node->ID, 
    12411242                "menu_order" => 0, 
    1242                 "post_parent" => $post_ref_node->ID 
     1243                "post_parent" => $post_ref_node->ID, 
     1244                "post_type" => $post_ref_node->post_type 
    12431245            ); 
    12441246            wp_update_post( $post_to_save ); 
     
    12611263                "ID" => $post_node->ID, 
    12621264                "menu_order" => $post_ref_node->menu_order, 
    1263                 "post_parent" => $post_ref_node->post_parent 
     1265                "post_parent" => $post_ref_node->post_parent, 
     1266                "post_type" => $post_ref_node->post_type 
    12641267            ); 
    12651268            wp_update_post( $post_to_save ); 
     
    12811284                "ID" => $post_node->ID, 
    12821285                "menu_order" => $post_ref_node->menu_order+1, 
    1283                 "post_parent" => $post_ref_node->post_parent 
     1286                "post_parent" => $post_ref_node->post_parent, 
     1287                "post_type" => $post_ref_node->post_type 
    12841288            ); 
    12851289            wp_update_post( $post_to_save ); 
  • cms-tree-page-view/trunk/index.php

    r627924 r629638  
    44Plugin URI: http://eskapism.se/code-playground/cms-tree-page-view/ 
    55Description: Adds a CMS-like tree view of all your pages, like the view often found in a page-focused CMS. Use the tree view to edit, view, add pages and search pages (very useful if you have many pages). And with drag and drop you can rearrange the order of your pages. Page management won't get any easier than this! 
    6 Version: 0.10.1 
     6Version: 1.0 
    77Author: Pär Thernström 
    88Author URI: http://eskapism.se/ 
     
    2828#require("functions.php"); 
    2929 
    30 define( "CMS_TPV_VERSION", "0.10.1"); 
     30define( "CMS_TPV_VERSION", "1.0"); 
    3131define( "CMS_TPV_NAME", "CMS Tree Page View"); 
    3232 
  • cms-tree-page-view/trunk/readme.txt

    r628260 r629638  
    8989== Changelog == 
    9090 
    91 = 0.10.x = 
    92 - New: create multiple pages at once! Add multiple pages faster than ever before! 
     91= 1.0 = 
     92- New: create multiple pages at once! Add multiple pages faster than ever before! You can ever select if the new pages should be drafts or published. And ever drag and drop the pages to get the correct order even before adding them. I know - it's awesome! 
    9393- Fixed: adds new pages with the correct and selected WPML-language 
     94- Added: you can now change the type of a post by draging the post between different trees on the dashboard. So if you have one custom post type called "Cars" and another called "Bicycles" you can now drag a page from the cars tree to the bicicyles tree and the post will converted to that post type. Pretty powerful feature that you used to need a separately plugin to be able to do. 
    9495- Misc fixes 
     96- I decided to call this version 1. I've been using this plugin for so long time now and I use it in almost every WordPress project I participate in (all projects with lots of pages), so with this new add-mulitple-page-feature it feels like it's time to go to version 1. Hope you'll agree! :) 
    9597 
    9698= 0.10.1 = 
  • cms-tree-page-view/trunk/scripts/cms_tree_page_view.js

    r628260 r629638  
    5151        // When something has been written in one of the page titles: show another row 
    5252        // Also: if more than one row are empty at the end, remove all but the last 
    53         $(document).on("keyup", "ul.cms_tpv_action_add_doit_pages li:last-of-type input", function(e) { 
    54  
     53        $(document).on("keyup", "ul.cms_tpv_action_add_doit_pages li:last-child input", function(e) { 
     54            my.log(123); 
    5555            var $t = $(this); 
    5656            var $li = $t.closest("li"); 
     
    5858            if ($.trim($t.val()) !== "") { 
    5959             
    60                 var $new_li = $li.clone(); 
     60                var $new_li = $li.clone().hide(); 
    6161                $new_li.find("input").val(""); 
    6262                $li.after( $new_li ); 
     63                $new_li.slideDown(); 
    6364             
    6465            } 
     
    138139        jQuery(document).on("submit", "div.cms_tpv_action_add_doit form", function(e) { 
    139140 
    140             e.preventDefault(); 
     141            //e.preventDefault(); 
     142 
    141143            var $form = $(this); 
    142144            $form.find("input[type='submit']").val( cmstpv_l10n.Adding ).attr("disabled", true); 
Note: See TracChangeset for help on using the changeset viewer.