留言板

aui-tabs

amani kh,修改在11 年前。

aui-tabs

Junior Member 帖子: 43 加入日期: 12-11-17 最近的帖子
hi all,
I've created 3 tabs in the first 1 of them I wanna put a Form (a box with some content)

this is javascript code for the tabs:

AUI().ready('aui-tabs', function(A) {
var tabs = new A.TabView(
{
boundingBox: '#demo', items:
[
{
content: 'This my content 1' , label: 'Tab 1' },

{ content: 'This my content 2', label: 'Tab 2' },

{ content: 'This my content 3', label: 'Tab 3' }

] } ) .render(); });

now instead of 'This my content 1' I wanna put a box with some content (Form), here is the javascript code for that form

AUI().ready('aui-form-base', function(A) { var form = new A.Form( { contentBox: '#myForm' } ) .render(); });

now how can I integrate the code of the Form in the code of the tabs to get that Form inside of the first Tab. I am using liferay 6.1
thanks for ur help.
thumbnail
Amit Doshi,修改在11 年前。

RE: aui-tabs

Liferay Master 帖子: 550 加入日期: 10-12-29 最近的帖子
amani kh:
hi all,
I've created 3 tabs in the first 1 of them I wanna put a Form (a box with some content)

this is javascript code for the tabs:

AUI().ready('aui-tabs', function(A) {
var tabs = new A.TabView(
{
boundingBox: '#demo', items:
[
{
content: 'This my content 1' , label: 'Tab 1' },

{ content: 'This my content 2', label: 'Tab 2' },

{ content: 'This my content 3', label: 'Tab 3' }

] } ) .render(); });

now instead of 'This my content 1' I wanna put a box with some content (Form), here is the javascript code for that form

AUI().ready('aui-form-base', function(A) { var form = new A.Form( { contentBox: '#myForm' } ) .render(); });

now how can I integrate the code of the Form in the code of the tabs to get that Form inside of the first Tab. I am using liferay 6.1
thanks for ur help.


Please check this link.

Here it was mentioned how to create the Tabs with different sections but using liferay-ui:tabs.

Thanks & Regards,
Amit Doshi
amani kh,修改在11 年前。

RE: aui-tabs

Junior Member 帖子: 43 加入日期: 12-11-17 最近的帖子
thanks Amit Doshi, I ll check it !
thumbnail
Rajeeva Lochana .B.R,修改在11 年前。

RE: aui-tabs

Junior Member 帖子: 67 加入日期: 10-1-4 最近的帖子
Hi Amith and Archana,

Check the below sample code i hope this will help you to achieve your requirement.




		<h2>From markup</h2>
		
		<div id="markupTabs">
			<ul class="aui-tabview-list aui-widget-hd" id="test">
				<li class="aui-tab"><a class="aui-tab-label" href="javascript:;">Hello A</a></li>
				<li class="aui-tab"><a class="aui-tab-label" href="javascript:;">Hello B</a></li>
				<li class="aui-tab"><a class="aui-tab-label" href="javascript:;">Hello C</a></li>
			</ul>

			<div class="aui-tabview-content aui-widget-bd" id="testContent">
				<div class="aui-tabview-content-item">
					<h3>1. New tab content</h3><br>
					Tab 1 body content 
				</div>
				<div class="aui-tabview-content-item">
					<h3>2. New tab content</h3><br>
					Tab 2 body content 
				</div>
				<div class="aui-tabview-content-item">
					<h3>3. New tab content</h3><br>
					Tab 3 body content 
				</div>
			</div>
		</div>

		
	

<script type="text/javascript" charset="utf-8">

AUI().ready(
	'aui-tabs', 'substitute',
	function(A) {
		var tabs1 = new A.TabView(
			{
				boundingBox: '#markupTabs',
				listNode: '#test',
				contentNode: '#testContent'
			}
		);
		tabs1.render();		
	}
);

</script>


thumbnail
Kushal Jayswal,修改在10 年前。

RE: aui-tabs

New Member 帖子: 18 加入日期: 12-11-19 最近的帖子
Thanks Rajeeva for the code snippet.
archana kale,修改在11 年前。

RE: aui-tabs

New Member 帖子: 2 加入日期: 13-1-17 最近的帖子
RE: aui-tabs I think the AUI tabs demo is probably the easiest way to re-produce / view the issue. Has anyone else found this or come across a solution
amani kh,修改在11 年前。

RE: aui-tabs

Junior Member 帖子: 43 加入日期: 12-11-17 最近的帖子
hi archana kale, maybe this old post could be helpful

http://www.liferay.com/community/forums/-/message_boards/message/13200942