zTreeObj.cancelEditName.html 1.2 KB

123456789101112131415161718192021222324252627282930
  1. <div class="apiDetail">
  2. <div>
  3. <h2><span>Function(newName)</span><span class="path">zTreeObj.</span>cancelEditName</h2>
  4. <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
  5. <div class="desc">
  6. <p></p>
  7. <div class="longdesc">
  8. <p>Cancel the edit name status. Can restore the original name, and can also force assigned to a new name.</p>
  9. <p class="highlight_red">Please use zTree object to executing the method.</p>
  10. </div>
  11. </div>
  12. <h3>Function Parameter Descriptions</h3>
  13. <div class="desc">
  14. <h4><b>newName</b><span>String</span></h4>
  15. <p>Re given a new name</p>
  16. <p class="highlight_red">If this parameter is omitted, then restore the original name.</p>
  17. <h4 class="topLine"><b>Return </b><span>none</span></h4>
  18. <p>no return value</p>
  19. </div>
  20. <h3>Examples of function</h3>
  21. <h4>1. Cancel edit name, and restore the original name.</h4>
  22. <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
  23. treeObj.cancelEditName();
  24. </code></pre>
  25. <h4>2. Cancel edit name , and set the new name.</h4>
  26. <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
  27. treeObj.cancelEditName("test_new_name");
  28. </code></pre>
  29. </div>
  30. </div>