Joomla! Discussion Forums



It is currently Sun Nov 08, 2009 8:59 am (All times are UTC )

 




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: TabPane hack
Posted: Sun Feb 26, 2006 9:32 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Sat Feb 11, 2006 3:46 pm
Posts: 3
What I wanted to achieve was to be able to hover over a tab and have it display that tabs content, rather than clicking the tab to select it. This proved to be rather simple (although I can't be sure if everything cleans up nicely - maybe the TabPane experts can verify this). First of all, I changed joomla.php to call tabpane.js and not tabpane-mini.js, purely and simply so I wouldn't have to muddle through the compacted code in tabpane-mini.js (from what I can see, it's just a compacted form of tabpane.js). I made a one line code change in tabjane.js at line 191, which is within function WebFXTabPage. Here's the before and after with surrounding lines.

Before:
188 // hook up events, using DOM0
189 var oThis = this;
190 this.tab.onclick = function () { oThis.select(); };
191 this.tab.onmouseover = function () { WebFXTabPage.tabOver( oThis ); };
192 this.tab.onmouseout = function () { WebFXTabPage.tabOut( oThis ); };

After:
188 // hook up events, using DOM0
189 var oThis = this;
190 this.tab.onclick = function () { oThis.select(); };
191 this.tab.onmouseover = function () { oThis.select(); };
192 this.tab.onmouseout = function () { WebFXTabPage.tabOut( oThis ); };

"onclick" and "onmouseover" now do the same thing, which is fine by me. Now when I mouseover a tab, it displays that tabs content and I can move into the tab pane and perform any actions available in there.

My left mouse button hasn't got lonely yet, but it does feel less abused.


Top
   
 
 Post subject: Re: TabPane hack
Posted: Wed Mar 01, 2006 5:30 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Fri Aug 19, 2005 6:11 am
Posts: 173
Location: Oamaru,New Zealand
Quote:
My left mouse button hasn't got lonely yet, but it does feel less abused.

lol :laugh:
And thanks for the hack. ;)


Top
  E-mail  
 
 Post subject: Re: TabPane hack
Posted: Mon Mar 06, 2006 10:46 am 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Sat Aug 20, 2005 8:53 am
Posts: 803
Location: Italy
I don't understood,

Can be this a help on this request  ??? :
http://forum.joomla.org/index.php/topic ... #msg236713

Thanks


Top
  E-mail  
 
 Post subject: Re: TabPane hack
Posted: Mon Mar 06, 2006 11:57 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Fri Aug 19, 2005 6:11 am
Posts: 173
Location: Oamaru,New Zealand
No, different sort of thing. :D
Tabs used in the frontend in the main content like the example you gave area are achieved the same way as it's done in the admin backend.

Like for example, in the backend of the component, the file admin..html.php

Code:
$tabs = new mosTabs(1);
      $tabs->startPane("configPane");
                $tabs->startTab("Pictures","stats-page"); // Tab called 'Pictures'

                 ...some html output for first tab eg. components config options

                $tabs->endTab();
                $tabs->startTab("Browse page","site-page"); Tab called 'Browse page'

                ....some html output for the second tab. More config options

      $tabs->endTab();
      $tabs->endPane();


And if I remember right, you have to include overlib_mini.js (includes/js/)

The code posted by setanta opens the tab *without* clicking on it, like you normally have to. It has nothing
to do with displaying the actual tabs.


Top
  E-mail  
 
 Post subject: Re: TabPane hack
Posted: Tue Mar 07, 2006 5:15 pm 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Mon Sep 12, 2005 7:41 pm
Posts: 1374
Location: Glasgow - Scotland
Excellent hack setanta :)

Thanks for this one

_________________
http://www.bulletprooftemplates.com/ - New Joomla 1.5 templates from an old Joomla head
If you don't know the answer don't be afraid to ask someone who does


Top
  E-mail  
 
 Post subject: Re: TabPane hack
Posted: Tue Mar 07, 2006 6:08 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Sat Aug 20, 2005 8:53 am
Posts: 803
Location: Italy
Please, What are differents from these solutions
http://forum.joomla.org/index.php/topic,42938.0.html

???  ???  ???


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group