Diff of /mambo/branches/4.6/includes/mamboHTML.php
Parent Directory
|
Revision Log
|
Patch
| revision 137, Mon Jan 16 10:25:52 2006 UTC | revision 138, Mon Jan 16 11:12:43 2006 UTC | |
|---|---|---|
| # | Line 667 | Line 667 |
| 667 | } | } |
| 668 | } | } |
| 669 | ||
| 670 | /** | |
| 671 | * Tab Creation handler | |
| 672 | * @package Mambo | |
| 673 | * @author Phil Taylor | |
| 674 | */ | |
| 675 | class mosTabs { | |
| 676 | /** @var int Use cookies */ | |
| 677 | var $useCookies = 0; | |
| 678 | ||
| 679 | /** | |
| 680 | * Constructor | |
| 681 | * Includes files needed for displaying tabs and sets cookie options | |
| 682 | * @param int useCookies, if set to 1 cookie will hold last used tab between page refreshes | |
| 683 | */ | |
| 684 | function mosTabs($useCookies) { | |
| 685 | global $mosConfig_live_site; | |
| 686 | echo "<link id=\"luna-tab-style-sheet\" type=\"text/css\" rel=\"stylesheet\" href=\"" . $mosConfig_live_site. "/includes/js/tabs/tabpane.css\" />"; | |
| 687 | echo "<script type=\"text/javascript\" src=\"". $mosConfig_live_site . "/includes/js/tabs/tabpane.js\"></script>"; | |
| 688 | $this->useCookies = $useCookies; | |
| 689 | } | |
| 690 | ||
| 691 | /** | |
| 692 | * creates a tab pane and creates JS obj | |
| 693 | * @param string The Tab Pane Name | |
| 694 | */ | |
| 695 | function startPane($id){ | |
| 696 | echo "<div class=\"tab-page\" id=\"".$id."\">"; | |
| 697 | echo "<script type=\"text/javascript\">\n"; | |
| 698 | echo " var tabPane1 = new WebFXTabPane( document.getElementById( \"".$id."\" ), ".$this->useCookies." )\n"; | |
| 699 | echo "</script>\n"; | |
| 700 | } | |
| 701 | ||
| 702 | /** | |
| 703 | * Ends Tab Pane | |
| 704 | */ | |
| 705 | function endPane() { | |
| 706 | echo "</div>"; | |
| 707 | } | |
| 708 | ||
| 709 | /* | |
| 710 | * Creates a tab with title text and starts that tabs page | |
| 711 | * @param tabText - This is what is displayed on the tab | |
| 712 | * @param paneid - This is the parent pane to build this tab on | |
| 713 | */ | |
| 714 | function startTab( $tabText, $paneid ) { | |
| 715 | echo "<div class=\"tab-page\" id=\"".$paneid."\">"; | |
| 716 | echo "<h2 class=\"tab\">".$tabText."</h2>"; | |
| 717 | echo "<script type=\"text/javascript\">\n"; | |
| 718 | echo " tabPane1.addTabPage( document.getElementById( \"".$paneid."\" ) );"; | |
| 719 | echo "</script>"; | |
| 720 | } | |
| 721 | ||
| 722 | /* | |
| 723 | * Ends a tab page | |
| 724 | */ | |
| 725 | function endTab() { | |
| 726 | echo "</div>"; | |
| 727 | } | |
| 728 | } | |
| 729 | ||
| 730 | ?> | ?> |
|
||||||||
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

