[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>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Demo: Layout with StackContainer</title>
<style>
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;
}
</style>
<link rel="stylesheet" type="text/css"
href="<?php echo base_url() ?>theme/library/dojo_v171/dijit/themes/claro/document.css" />
<link rel="stylesheet" type="text/css"
href="<?php echo base_url() ?>theme/library/dojo_v171/dijit/themes/claro/claro.css" />
<!-- load dojo and provide config via data attribute -->
[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]
</head>
<body class="claro">
<div id="appLayout" class="demoLayout"
data-dojo-type="dijit.layout.BorderContainer"
data-dojo-props="liveSplitters:false, design: 'sidebar'">
<!-- Header Start here -->
<?php $this->load->view('header');?>
<!-- Header End herer -->
<!-- Center start here-->
<?php $this->load->view($files);?>
<!-- Center End here -->
<!-- Left Start here -->
<?php $this->load->view('left');?>
<!-- Left end here -->
</div>
</body>
</html>
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.