FYI - Change in usage of JPane

For Joomla! 1.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
Locked
User avatar
tcp
Joomla! Ace
Joomla! Ace
Posts: 1548
Joined: Wed Sep 21, 2005 9:25 am
Location: Thailand
Contact:

FYI - Change in usage of JPane

Post by tcp » Sun Jan 28, 2007 5:44 am

Just wanted to let people know that there is a change in usage re: JPane.  One must now explicitly print the results of the various methods.

Previous

Code: Select all

$pane	= JPane::getInstance('sliders');
$pane->startPane("content-pane");
		
// Render a param pane
$pane->startPanel( $title, 'params_'.$type );
// Something
$pane->endPanel();		

$pane->endPane();
Current

Code: Select all

$pane	= JPane::getInstance('sliders');
echo $pane->startPane("content-pane");
		
// Render a param pane
echo $pane->startPanel( $title, 'params_'.$type );
// Something
echo $pane->endPanel();		

echo $pane->endPane();
I hope that this helps someone.

tcp
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com

divivo
Joomla! Intern
Joomla! Intern
Posts: 70
Joined: Thu Jan 05, 2006 3:53 pm

Re: FYI - Change in usage of JPane

Post by divivo » Sun Jan 28, 2007 1:10 pm

That is really good , it gives so much more flexibility to our designs.
It would be great if it worked the same for the button menu.

User avatar
webamoeba
Joomla! Explorer
Joomla! Explorer
Posts: 433
Joined: Fri Sep 16, 2005 9:13 am
Contact:

Re: FYI - Change in usage of JPane

Post by webamoeba » Tue Jan 30, 2007 5:01 pm

Thanks for the tip!!!

User avatar
LeeWang
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Tue Nov 07, 2006 4:40 pm

Re: FYI - Change in usage of JPane

Post by LeeWang » Wed Jan 31, 2007 2:14 pm

Thank you  :)
By L.E.H.C.

User avatar
.::ErKs::.
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Mon May 15, 2006 5:04 pm

Re: FYI - Change in usage of JPane

Post by .::ErKs::. » Wed Aug 08, 2007 12:00 am

Thanks! How I do tabs like J 1.0?  ???

User avatar
webamoeba
Joomla! Explorer
Joomla! Explorer
Posts: 433
Joined: Fri Sep 16, 2005 9:13 am
Contact:

Re: FYI - Change in usage of JPane

Post by webamoeba » Wed Aug 08, 2007 11:19 am

Instead of:

[php]$pane = JPane::getInstance('sliders');[/php]

use:

[php]$pane = JPane::getInstance('tabs');[/php]

User avatar
.::ErKs::.
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Mon May 15, 2006 5:04 pm

Re: FYI - Change in usage of JPane

Post by .::ErKs::. » Wed Aug 08, 2007 2:39 pm

Thank you webamoeba!! ;D

User avatar
e-motiv
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 168
Joined: Sun May 06, 2007 12:33 pm
Contact:

Re: FYI - Change in usage of JPane

Post by e-motiv » Wed Jun 25, 2008 4:07 pm

Thanks tcp!!
Been looking for this for an hour, since the api doc doesn't state those echo's!!
I was stopped just in time to start another topic!

(P.S. Anyone any css tips or examples how to nicely style those <dt> elements (nextto eachother, highlight, positioning lines and shadows, etc..?)

http://www.e-motiv.net Professional web development <== e-motiv ==> Spin off web projects http://attic.e-motiv.net

User avatar
e-motiv
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 168
Joined: Sun May 06, 2007 12:33 pm
Contact:

Re: FYI - Change in usage of JPane

Post by e-motiv » Wed Jun 25, 2008 4:16 pm

Wow! Hold the horses!
Am i correct to assume that JPane DOES NOT use mootools??
What's the use of mootools if the framework doesn't use it?

http://www.e-motiv.net Professional web development <== e-motiv ==> Spin off web projects http://attic.e-motiv.net

User avatar
e-motiv
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 168
Joined: Sun May 06, 2007 12:33 pm
Contact:

Re: FYI - Change in usage of JPane

Post by e-motiv » Wed Jul 02, 2008 1:04 pm


http://www.e-motiv.net Professional web development <== e-motiv ==> Spin off web projects http://attic.e-motiv.net

User avatar
subfighter
Joomla! Intern
Joomla! Intern
Posts: 60
Joined: Wed Feb 07, 2007 7:26 pm
Location: Oceanside
Contact:

Re: FYI - Change in usage of JPane

Post by subfighter » Sat Jul 12, 2008 10:16 pm

it not saving the CURRENT TAB position that is selected?
Don't forget the echo's!! Thanks to tcp for this post: FYI - Change in usage of JPane Also notice that the useCookies in the comments in the code or on the api, do NOT seem to be implemented
its seems in the api that it shows that it should save in the cookie? but it does not. how do i fix this...

http://videos.subfighter.tv/index.php?option=com_seyret

if you goto the link above and click on either MOST VIEWED or HIGHEST RATED tab it takes you there but scroll down and click on the PAGE NUMBERS at the bottom like page [2] or [3] and it brings you BACK to LATEST videos everytime..

I asked the Developer of Seyret as in Joomla 1.0.15 there is no problem..

but in Joomla 1.5.3 this is issue.. any thought on how i can fix this.. thanks..
Rick Estrada
http://www.jomtube.com - Video Gallery Component
http://www.subfighter.tv - Mixed Martial Arts Social Network

bkarthik
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Tue Apr 01, 2008 10:43 am

Re: FYI - Change in usage of JPane

Post by bkarthik » Wed Nov 26, 2008 11:16 am

Gud Evening Every body...
I use the Following Code to add tabs ... But it didnt show any tabs. Instead of tabs it show the Tab Names one by one and after that it shows tab content

$pane =&JPane::getInstance('tabs');
echo $pane->startPane( 'panes' );
echo $pane->startPanel( 'Example Panel 1', 'panel1' );
echo "This is panel1";
echo $pane->endPanel();

echo $pane->startPanel( 'Example Panel 2', 'panel2' );
echo "This is panel2";
echo $pane->endPanel();

echo $pane->startPanel( 'Example Panel 3', 'panel3' );
echo "This is panel3";
echo $pane->endPanel();
echo $pane->endPane();

Is any Error in this code.... please tell me...

Thanks in advance....

User avatar
Dionisiy
Joomla! Intern
Joomla! Intern
Posts: 98
Joined: Thu Mar 16, 2006 11:00 am
Location: Minsk, Belarus
Contact:

Re: FYI - Change in usage of JPane

Post by Dionisiy » Wed Nov 26, 2008 2:39 pm

Add CSS of the tabs from frontend template:

Code: Select all

/* tabs */
dl.tabs {
	float: left;
	margin: 10px 0 -1px 0;
	z-index: 50;
}
dl.tabs dt {
	float: left;
	padding: 4px 10px;
	border-left: 1px solid #ccc;
	border-right: 1px solid #ccc;
	border-top: 1px solid #ccc;
	margin-left: 3px;
	background: #f0f0f0;
	color: #666;
}
dl.tabs dt.open {
	background: #F9F9F9;
	border-bottom: 1px solid #F9F9F9;
	z-index: 100;
	color: #000;
}
div.current {
	clear: both;
	border: 1px solid #ccc;
	padding: 10px 10px;
}
div.current dd {
	padding: 0;
	margin: 0;
}

bkarthik
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Tue Apr 01, 2008 10:43 am

Re: FYI - Change in usage of JPane

Post by bkarthik » Sat Nov 29, 2008 4:57 am

Denitz wrote:Add CSS of the tabs from frontend template:

Code: Select all

/* tabs */
dl.tabs {
	float: left;
	margin: 10px 0 -1px 0;
	z-index: 50;
}
dl.tabs dt {
	float: left;
	padding: 4px 10px;
	border-left: 1px solid #ccc;
	border-right: 1px solid #ccc;
	border-top: 1px solid #ccc;
	margin-left: 3px;
	background: #f0f0f0;
	color: #666;
}
dl.tabs dt.open {
	background: #F9F9F9;
	border-bottom: 1px solid #F9F9F9;
	z-index: 100;
	color: #000;
}
div.current {
	clear: both;
	border: 1px solid #ccc;
	padding: 10px 10px;
}
div.current dd {
	padding: 0;
	margin: 0;
}

I added the above css code on template_css.css. Its WOrking FIne Now....Thank You For your Intant Reply... and Thanks for Joomla Team,.

bkarthik
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Tue Apr 01, 2008 10:43 am

Re: FYI - Change in usage of JPane

Post by bkarthik » Sat Nov 29, 2008 7:51 am

Hello Friends..

I have another Issue...

shall we use Nested tabs using JPane..?

I used nested Tabs in joomla1.0 by adding following additional methods in joomla.php mosTabs class

Code: Select all

function startNestedPane($id){
		echo "<div class=\"tab-page\" id=\"".$id."\">";
		echo "<script type=\"text/javascript\">\n";
		echo " var tabPaneX = new WebFXTabPane( document.getElementById( \"".$id."\" ), ".$this->useCookies." )\n";
		echo "</script>\n";
	}

	function startNestedTab( $tabText, $paneid ) {
		echo "<div class=\"tab-page\" id=\"".$paneid."\">";
		echo "<h2 class=\"tab\">".$tabText."</h2>";
		echo "<script type=\"text/javascript\">\n";
		echo " tabPaneX.addTabPage( document.getElementById( \"".$paneid."\" ) );";
		echo "</script>";
	}

and follw the same instructions to joomla1.5.8 . I know its a foolish think, but i tried and get Error..

i wrote following methods to joomla1.5 pane.php

Code: Select all

function startNestedPane( $id )
	{
		return '<dl class="tabs" id="'.$id.'">';
	}

Code: Select all

function startNestedPanel( $text, $id )
	{
		return '<dt id="'.$id.'"><span>'.$text.'</span></dt><dd>';
	}
The Problem is in joomla1.0 the javascript itself written in the StartNestedTab Method but in joomla1.5 its called by mootols.


Please give me a solution...

Thanks in advance...


Locked

Return to “Joomla! 1.5 Coding”