Removed CardSet, not needed with Gabriel's solution
authorJens Frank <jeluf@users.mediawiki.org>
Thu, 20 May 2004 10:44:47 +0000 (10:44 +0000)
committerJens Frank <jeluf@users.mediawiki.org>
Thu, 20 May 2004 10:44:47 +0000 (10:44 +0000)
includes/CardSet.php [deleted file]
includes/Skin.php
includes/TabbedCardSet.php [deleted file]

diff --git a/includes/CardSet.php b/includes/CardSet.php
deleted file mode 100644 (file)
index 956a18e..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-// CardSet is a widget for displaying a stack of cards, e.g. for
-// user preferences. It is skinnable by overloading.
-// Default CardSet uses fieldsets for the cards,
-// the derived class TabbedCardSet uses JavaScript-based tabs
-//
-// Usage:
-// First, create a CardSet using the constructor
-// Then, add cards to it
-// Finally Render to get the HTML
-
-class CardSet {
-
-       /* private */ var $mLabels,     // Array of card labels
-                         $mBodies,     // Array of card bodies
-                         $mTitle;      // Title of this stack
-
-       // Initialize an empty CardSet.
-       function CardSet( $title )
-       {
-               $this->mLabels = array();
-               $this->mBodies = array();
-               $this->mTitle  = $title;
-       }
-
-       // Add a card to the set. The body of the card is expected to be
-       // HTML, not wikitext.
-       function addCard( $label, $body )
-       {
-               $this->mLabels[] = $label;
-               $this->mBodies[] = $body;
-       }
-
-       // Return the HTML of this CardSet
-       function renderToOutpage( &$out )
-       {
-               for ( $i=0; $i<count( $this->mLabels ); $i++ )
-               {
-                       $s .= "<fieldset>\n<legend>" . $this->mLabels[$i] . "</legend>\n"
-                               . $this->mBodies[$i] . "</fieldset>\n";
-               }
-
-               $out->addHTML( $s );
-       }
-
-} // end of: class CardSet
-
-?>
index 8ccb6f2..336a868 100644 (file)
@@ -2,7 +2,6 @@
 
 require_once( "Feed.php" );
 require_once( "Image.php" );
-require_once( "CardSet.php" );
 
 # See skin.doc
 
@@ -2698,12 +2697,6 @@ class Skin {
                return $toolbar;
        }
 
-       // Return a new cardset.
-       // By overloading this function, Skins can alter the appearance of e.g. the preferences
-       function newCardSet( $title = "")
-       {
-               return new CardSet( $title );
-       }
 }
 
 require_once( "SkinStandard.php" );
diff --git a/includes/TabbedCardSet.php b/includes/TabbedCardSet.php
deleted file mode 100644 (file)
index 59b7fe4..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-// CardSet is a widget for displaying a stack of cards, e.g. for
-// user preferences. It is skinnable by overloading.
-// Default CardSet uses fieldsets for the cards,
-// the derived class TabbedCardSet uses JavaScript-based tabs
-//
-// Usage:
-// First, create a CardSet using the constructor
-// Then, add cards to it
-// Finally Render to get the HTML
-
-class TabbedCardSet extends CardSet {
-
-       // Return the HTML of this CardSet
-       function renderToOutpage( &$out )
-       {
-               $s = "<div id=\"column-content\"><div id=\"content\">\n";
-
-               for ( $i=0; $i<count( $this->mLabels ); $i++ )
-               {
-                       $s .= "<div class=\"usage\" id=\"area{$i}\"><div id=\"subheading{$i}\"><h2><a id=\"card{$i}\"></a>".
-                               $this->mLabels[$i] . "</h2></div>" . $this->mBodies[$i] . "</div>\n\n";
-               }
-               $s .= "</div></div>\n\n<div id=\"bar\"><div id=\"p-cactions\" class=\"portlet\">\n<ul>\n";
-
-               for ( $i=0; $i<count( $this->mLabels ); $i++ )
-               {
-                       $selected = ($i==0 ? "class=\"selected\"" : "");
-                       $s .= "<li id=\"tab{$i}\" {$selected} onclick=\"chgArea({$i},this);\"
-                           onmouseover=\"hilight({$i});\" onmouseout=\"if(prev!={$i}){hilight(this,-1);}\"><a href=\"#card{$i}\">".
-                           $this->mLabels[$i] . "</a></li>";
-               }
-
-               $s .= "</ul></div></div>\n\n";
-
-               $out->addScript("
-                       <script>
-                       var elements=". count( $this->mLabels ) .";
-                       var prev=-1;
-                       
-                       function hideall(){
-                               for(i=0; i<elements; i++){document.getElementById('area'+i).style.display='none';}
-                               document.getElementById('bar').style.display='inline';
-                       }
-                       
-                       function chgArea(n,obj){
-                               if(prev>=0){
-                                       hilight( document.getElementById('tab'+prev) , -1);
-                                       document.getElementById('area'+prev).style.display='none';
-                               }
-                               hilight(obj,n);
-                       
-                               document.getElementById('area'+n).style.display='inline';
-                               prev=n ;
-                       }
-                       
-                       function hilight(obj,n){
-                               if (n<0) { obj.className=\"\"; }
-                               else  { obj.className=\"selected\"; }
-                       }
-                       function inittabs(){
-                               hideall();
-                               chgArea(0,document.getElementById('tab0'));
-                       }
-                       </script>
-               " );
-                       
-               $out->setOnloadHandler( $out->getOnloadHandler() . "inittabs();" );
-               $out->addHTML( $s );
-       }
-
-} // end of: class CardSet
-
-?>