Welcome Guest, Not a member yet? Register   Sign In
Dojo with CI Help needed
#1

[eluser]Mistry007[/eluser]
Hi everyone, I am trying to implement dojo with CI, I have implemented it. Now i want to do something like add new tab and on that tab i have to attach the view files. following are my code for tab generation
Code:
<!DOCTYPE HTML>
&lt;html lang="en"&gt;
&lt;head&gt;
&lt;meta charset="utf-8"&gt;
&lt;title&gt;Demo: Layout with StackContainer&lt;/title&gt;
&lt;style&gt;
html,body {
height: 100%;
margin: 0;
overflow: hidden;
padding: 0;
}

#appLayout {
height: 100%;
}

#leftCol {
width: 28em; # formattingTable { border : 0;
border-spacing: 0;
}

#contentContainer {
padding: 2em;
}

#navMenu { /* make the sidebar menu blend in with the whole sidebar */
border: none;
}
&lt;/style&gt;

&lt;link rel="stylesheet" type="text/css"
href="&lt;?php echo base_url() ?&gt;theme/library/dojo_v171/dijit/themes/claro/document.css" /&gt;

&lt;link rel="stylesheet" type="text/css"
href="&lt;?php echo base_url() ?&gt;theme/library/dojo_v171/dijit/themes/claro/claro.css" /&gt;
&lt;!-- load dojo and provide config via data attribute --&gt;


[removed][removed]

[removed][removed]
[removed][removed]
[removed]
  
   dojo.require("dojo.parser");
   dojo.require("dijit.layout.BorderContainer");
   dojo.require("dijit.layout.StackContainer");
   dojo.require("dijit.layout.StackController");
   dojo.require("dijit.layout.ContentPane");
   dojo.require("dijit.layout.TabContainer");

   dojo.require("dijit.dijit"); // optimize: load dijit layer

   dojo.require("dijit.Menu");
   dojo.require("dijit.MenuItem");
   dojo.require("dijit.PopupMenuItem");
   dojo.require("dijit.CheckedMenuItem");
   dojo.require("dijit.MenuSeparator");

   dojo.require("dijit.MenuBar");
   dojo.require("dijit.MenuBarItem");
   dojo.require("dijit.PopupMenuBarItem");

   dojo.require("dijit.layout.AccordionContainer");
  [removed]
[removed]
   function hiren()
   {
    targetUrl = sitepath +"dojocontroller/hiren/";
    [removed].href = targetUrl;
   }

   function changetab()
   {
    var tab = dojo.byId("hello"),
    contentStack1 = dojo.byId("hello1");
    dojo.place(hello1,hello,"");
   }

   function destroyAll(){
       dojo.empty("contentStack");
   }

   function addTab(name) {
    var pane = new dijit.layout.ContentPane({
      title: name,
      closable :true,
      content:'<div>Dharmik</div>'
      
      
    });
    dijit.byId("contentTab").addChild(pane);
   }

   dojo.ready(function(){

   });  

  function home()
  {
   targetUrl = sitepath +"home/jignesh/";
   [removed].href = targetUrl;
  
  }
  function redirect()
  {
   targetUrl = sitepath +"login/logout/";
   [removed].href = targetUrl;
  }
     [removed]
&lt;/head&gt;
&lt;body class="claro"&gt;
<div id="appLayout" class="demoLayout"
  data-dojo-type="dijit.layout.BorderContainer"
  data-dojo-props="liveSplitters:false, design: 'sidebar'">
  &lt;!--  Header Start here --&gt;
  &lt;?php $this->load->view('header');?&gt;
  &lt;!--  Header End herer --&gt;
  &lt;!-- Center start here--&gt;
  &lt;?php $this->load->view($files);?&gt;
  &lt;!--  Center End here --&gt;
  &lt;!-- Left Start here --&gt;
  &lt;?php $this->load->view('left');?&gt;
  &lt;!--  Left end here --&gt;
</div>
&lt;/body&gt;
&lt;/html&gt;
Now the problem is tab is generated but i have to load the view folder file on new tab generation . or i can say that i want to display some button and html element on the newly generated tab . can any one tell me how to do that.
any help will be appriciated.


Messages In This Thread
Dojo with CI Help needed - by El Forum - 01-30-2012, 05:05 AM
Dojo with CI Help needed - by El Forum - 01-30-2012, 05:44 AM
Dojo with CI Help needed - by El Forum - 01-30-2012, 06:08 AM
Dojo with CI Help needed - by El Forum - 01-30-2012, 11:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB