Loading ...
Sorry, an error occurred while loading the content.

Treeview with ContextMenu and Calender

Expand Messages
  • Caxton
    Hello, I want to create a treeview, and each of node have its own calender. I add ContextMenu to the treeview, user push the menu button and the specific
    Message 1 of 1 , Oct 30, 2008
    • 0 Attachment
      Hello,

      I want to create a treeview, and each of node have its own calender.
      I add ContextMenu to the treeview, user push the menu button and the
      specific calender will show up.
      However, there is a big problem that if I close the calender, the
      calender can not show up again.
      This mean that my code is work if user do not close the calender but
      failed after user close the calender.

      Please give me a hand, thanks.


      The fellowing is a part of my sample code:
      <code>
      YAHOO.namespace("calendar");
      YAHOO.calendar.init = function(node_name, menu_name) {
      YAHOO.calendar.node_name = new
      YAHOO.widget.Calendar(node_name,"calContainer", { title:"This is " +
      node_name + " calender:", close:true } );
      YAHOO.calendar.node_name.render();
      //YAHOO.util.Event.addListener(menu_name, "click",
      YAHOO.example.calendar.node_name.show,
      YAHOO.example.calendar.node_name, true);
      }
      function showCalender() {
      var node_name = oCurrentTextNode.getLabelEl().innerHTML;
      var menu_name = oContextMenu.itemData[1].text;
      YAHOO.calendar.init(node_name, menu_name);
      }
      var oContextMenu = new YAHOO.widget.ContextMenu("mytreecontextmenu", {
      trigger: "mywork_treeview",
      lazyload: true,
      itemdata: [
      { text: "Show Calender", onclick: { fn: showCalender } }
      ] });

      oContextMenu.subscribe("triggerContextMenu", onTriggerContextMenu);
      </code>
    Your message has been successfully submitted and would be delivered to recipients shortly.