| Joomla! http://forum.joomla.org/ |
|
| TabPane hack http://forum.joomla.org/viewtopic.php?f=178&t=41310 |
Page 1 of 1 |
| Author: | setanta [ Sun Feb 26, 2006 9:32 pm ] |
| Post subject: | TabPane hack |
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. |
|
| Author: | Sicarii [ Wed Mar 01, 2006 5:30 am ] |
| Post subject: | Re: TabPane hack |
Quote: My left mouse button hasn't got lonely yet, but it does feel less abused. lol ![]() And thanks for the hack.
|
|
| Author: | eGulp [ Mon Mar 06, 2006 10:46 am ] |
| Post subject: | Re: TabPane hack |
I don't understood, Can be this a help on this request :http://forum.joomla.org/index.php/topic ... #msg236713 Thanks |
|
| Author: | Sicarii [ Mon Mar 06, 2006 11:57 am ] |
| Post subject: | Re: TabPane hack |
No, different sort of thing. ![]() 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. 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. |
|
| Author: | Waseem Sadiq [ Tue Mar 07, 2006 5:15 pm ] |
| Post subject: | Re: TabPane hack |
Excellent hack setanta ![]() Thanks for this one |
|
| Author: | eGulp [ Tue Mar 07, 2006 6:08 pm ] |
| Post subject: | Re: TabPane hack |
Please, What are differents from these solutions http://forum.joomla.org/index.php/topic,42938.0.html
|
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|