Add different CardSets for rendering of preferences.
authorJens Frank <jeluf@users.mediawiki.org>
Mon, 17 May 2004 23:18:37 +0000 (23:18 +0000)
committerJens Frank <jeluf@users.mediawiki.org>
Mon, 17 May 2004 23:18:37 +0000 (23:18 +0000)
Make SkinPHPTal use the JavaScript based tabbed version, while others stay with the old fieldsets.

includes/CardSet.php [new file with mode: 0644]
includes/OutputPage.php
includes/Skin.php
includes/SkinPHPTal.php
includes/SpecialPreferences.php
includes/TabbedCardSet.php [new file with mode: 0644]
languages/LanguageDe.php
stylesheets/monobook/main.css
templates/xhtml_slim.pt

diff --git a/includes/CardSet.php b/includes/CardSet.php
new file mode 100644 (file)
index 0000000..956a18e
--- /dev/null
@@ -0,0 +1,48 @@
+<?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 e859ed2..00ec47f 100644 (file)
@@ -7,8 +7,9 @@ class OutputPage {
        var $mHeaders, $mCookies, $mMetatags, $mKeywords;
        var $mLinktags, $mPagetitle, $mBodytext, $mDebugtext;
        var $mHTMLtitle, $mRobotpolicy, $mIsarticle, $mPrintable;
-       var $mSubtitle, $mRedirect, $mHeadtext;
+       var $mSubtitle, $mRedirect;
        var $mLastModified, $mCategoryLinks;
+       var $mScripts;
 
        var $mSuppressQuickbar;
        var $mOnloadHandler;
@@ -35,6 +36,7 @@ class OutputPage {
                $this->mContainsOldMagic = $this->mContainsNewMagic = 0;
                $this->mParserOptions = ParserOptions::newFromUser( $temp = NULL );
                $this->mSquidMaxage = 0;
+               $this->mScripts = "";
        }
 
        function addHeader( $name, $val ) { array_push( $this->mHeaders, "$name: $val" ) ; }
@@ -44,6 +46,8 @@ class OutputPage {
        # To add an http-equiv meta tag, precede the name with "http:"
        function addMeta( $name, $val ) { array_push( $this->mMetatags, array( $name, $val ) ); }
        function addKeyword( $text ) { array_push( $this->mKeywords, $text ); }
+       function addScript( $script ) { $this->mScripts .= $script; }
+       function getScript() { return $this->mScripts; }
        
        function addLink( $linkarr ) {
                # $linkarr should be an associative array of attributes. We'll escape on output.
@@ -186,7 +190,6 @@ class OutputPage {
        function isQuickbarSuppressed() { return $this->mSuppressQuickbar; }
 
        function addHTML( $text ) { $this->mBodytext .= $text; }
-       function addHeadtext( $text ) { $this->mHeadtext .= $text; }
        function debug( $text ) { $this->mDebugtext .= $text; }
 
        function setParserOptions( $options )
@@ -664,6 +667,7 @@ class OutputPage {
 
                $sk = $wgUser->getSkin();
                $ret .= $sk->getHeadScripts();
+               $ret .= $this->mScripts;
                $ret .= $sk->getUserStyles();
 
                $ret .= "</head>\n";
index 4e9eff9..4f45e4f 100644 (file)
@@ -2,6 +2,7 @@
 
 require_once( "Feed.php" );
 require_once( "Image.php" );
+require_once( "CardSet.php" );
 
 # See skin.doc
 
@@ -2695,6 +2696,13 @@ class Skin {
                $toolbar.="/*]]>*/\n</script>";
                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" );
index bf39da2..cd0cd29 100644 (file)
@@ -29,6 +29,8 @@
        require_once "GlobalFunctions.php";
        require_once $IP."/PHPTAL-NP-0.7.0/libs/PHPTAL.php";
 
+       require_once "TabbedCardSet.php";
+
        class MediaWiki_I18N extends PHPTAL_I18N
        {
                var $_context = array();
                        $tpl->setRef( 'mimetype', &$wgMimeType );
                        $tpl->setRef( 'charset', &$wgOutputEncoding );
                        $tpl->set( 'headlinks', $out->getHeadLinks() );
+                       $tpl->set( 'customscript', $out->getScript() ); 
                        $tpl->setRef( 'skinname', &$this->skinname );
                        $tpl->setRef( "loggedin", &$this->loggedin );
                        /* XXX currently unused, might get useful later
                        } else {
                                $tpl->set('body-ondblclick', false);
                        }
+                       $tpl->set( 'body-onload',$wgOut->getOnloadHandler() );
                        $tpl->set( "nav_urls", $this->buildNavUrls() );
 
                        // execute template
                                        return wfMsg('nstab-main');
                        }
                }
+
                /* private */ function setupUserCssJs () {
                        global $wgRequest, $wgTitle;
                        $action = $wgRequest->getText('action');
                                $this->userjs = $this->makeUrl($this->userpage.'/'.$this->skinname.'.js', 'action=raw&ctype=text/javascript');
                        }
                }
+
+               // Overload the Skin::newCardSet function to replace 
+               // the default CardSet widget
+               function newCardSet( $title = "")
+               {
+                       return new TabbedCardSet( $title );
+               }
+
        }
 
        class SkinDaVinci extends SkinPHPTal {
index ba649ea..775a745 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+require_once( "CardSet.php" );
+require_once( "TabbedCardSet.php" );
 
 function wfSpecialPreferences()
 {
@@ -263,9 +265,13 @@ class PreferencesForm {
                  . "id=\"$tname\" name=\"wpOp$tname\"$checked /><label for=\"$tname\">$ttext</label></div>\n";
        }
 
+
        /* private */ function mainPrefsForm( $err )
        {
                global $wgUser, $wgOut, $wgLang, $wgUseDynamicDates, $wgValidSkinNames;
+               
+               $skin = $wgUser->getSkin();
+               $cardset = $skin->newCardSet( wfMsg( "preferences" ) );
 
                $wgOut->setPageTitle( wfMsg( "preferences" ) );
                $wgOut->setArticleRelated( false );
@@ -288,17 +294,12 @@ class PreferencesForm {
                $titleObj = Title::makeTitle( NS_SPECIAL, "Preferences" );
                $action = $titleObj->escapeLocalURL();
 
-               $qb = wfMsg( "qbsettings" );
                $cp = wfMsg( "changepassword" );
-               $sk = wfMsg( "skin" );
-               $math = wfMsg( "math" );
-               $dateFormat = wfMsg("dateformat");
                $opw = wfMsg( "oldpassword" );
                $npw = wfMsg( "newpassword" );
                $rpw = wfMsg( "retypenew" );
                $svp = wfMsg( "saveprefs" );
                $rsp = wfMsg( "resetprefs" );
-               $tbs = wfMsg( "textboxsize" );
                $tbr = wfMsg( "rows" );
                $tbc = wfMsg( "columns" );
                $ltz = wfMsg( "localtime" );
@@ -311,16 +312,15 @@ class PreferencesForm {
                $emf = wfMsg( "emailflag" );
                $ynn = wfMsg( "yournick" );
                $stt = wfMsg ( "stubthreshold" ) ;
-               $srh = wfMsg( "searchresultshead" );
                $rpp = wfMsg( "resultsperpage" );
                $scl = wfMsg( "contextlines" );
                $scc = wfMsg( "contextchars" );
                $rcc = wfMsg( "recentchangescount" );
-               $dsn = wfMsg( "defaultns" );
 
                $wgOut->addHTML( "<form id=\"preferences\" name=\"preferences\" action=\"$action\"
        method=\"post\">" );
        
+               ######################################################################
                # First section: identity
                # Email, etc.
                #
@@ -330,139 +330,125 @@ class PreferencesForm {
                if ( $this->mEmailFlag ) { $emfc = 'checked="checked"'; }
                else { $emfc = ""; }
 
-               $ps = $this->namespacesCheckboxes();
-
-               $wgOut->addHTML( "<fieldset>
-               <legend>Idento</legend>
-               <div><label>$yrn: <input type='text' name=\"wpRealName\" value=\"{$this->mRealName}\" size='20' /></label></div>
-               <div><label>$yem: <input type='text' name=\"wpUserEmail\" value=\"{$this->mUserEmail}\" size='20' /></label></div>
-               <div><label><input type='checkbox' $emfc value=\"1\" name=\"wpEmailFlag\" /> $emf</label></div>
-               <div><label>$ynn: <input type='text' name=\"wpNick\" value=\"{$this->mNick}\" size='12' /></label></div>\n" );
-       
                # Fields for changing password
                #
                $this->mOldpass = wfEscapeHTML( $this->mOldpass );
                $this->mNewpass = wfEscapeHTML( $this->mNewpass );
                $this->mRetypePass = wfEscapeHTML( $this->mRetypePass );
 
-               $wgOut->addHTML( "<fieldset>
+               $cardset->addCard( "Idento", "<div><label>$yrn: <input type='text' name=\"wpRealName\" value=\"{$this->mRealName}\" size='20' /></label></div>
+               <div><label>$yem: <input type='text' name=\"wpUserEmail\" value=\"{$this->mUserEmail}\" size='20' /></label></div>
+               <div><label><input type='checkbox' $emfc value=\"1\" name=\"wpEmailFlag\" /> $emf</label></div>
+               <div><label>$ynn: <input type='text' name=\"wpNick\" value=\"{$this->mNick}\" size='12' /></label></div> 
+       <fieldset>
        <legend>$cp:</legend>
        <div><label>$opw: <input type='password' name=\"wpOldpass\" value=\"{$this->mOldpass}\" size='20' /></label></div>
        <div><label>$npw: <input type='password' name=\"wpNewpass\" value=\"{$this->mNewpass}\" size='20' /></label></div>
        <div><label>$rpw: <input type='password' name=\"wpRetypePass\" value=\"{$this->mRetypePass}\" size='20' /></label></div>
        " . $this->getToggle( "rememberpassword" ) . "
-       </fieldset>\n</fieldset>\n" );
+       </fieldset>");
 
        
+               ######################################################################
                # Quickbar setting
                #
-               $wgOut->addHtml( "<fieldset>\n<legend>$qb:</legend>\n" );
+               $s="";
                for ( $i = 0; $i < count( $qbs ); ++$i ) {
                        if ( $i == $this->mQuickbar ) { $checked = ' checked="checked"'; }
                        else { $checked = ""; }
-                       $wgOut->addHTML( "<div><label><input type='radio' name=\"wpQuickbar\"
-       value=\"$i\"$checked /> {$qbs[$i]}</label></div>\n" );
+                       $s .= "<div><label><input type='radio' name=\"wpQuickbar\" value=\"$i\"$checked /> {$qbs[$i]}</label></div>\n";
                }
-               $wgOut->addHtml( "</fieldset>\n\n" );
+               $cardset->addCard( wfMsg( "qbsettings" ), $s );
 
+
+               ######################################################################
                # Skin setting
                #
-               $wgOut->addHTML( "<fieldset>\n<legend>$sk:</legend>\n" );
                # Only show members of $wgValidSkinNames rather than
                # $skinNames (skins is all skin names from Language.php)
+               $s="";
                foreach ($wgValidSkinNames as $skinkey => $skinname ) {
                        if ( $skinkey == $this->mSkin ) { 
                                $checked = ' checked="checked"'; 
                        } else { 
                                $checked = ""; 
                        }
-                       $wgOut->addHTML( "<div><label><input type='radio' name=\"wpSkin\"
-       value=\"$skinkey\"$checked /> {$skinNames[$skinkey]}</label></div>\n" );
+                       $s .= "<div><label><input type='radio' name=\"wpSkin\" value=\"$skinkey\"$checked /> {$skinNames[$skinkey]}</label></div>\n";
                }
-               $wgOut->addHTML( "</fieldset>\n\n" );
+               $cardset->addCard( wfMsg( "skin" ), $s );
 
+               ######################################################################
                # Math setting
                #
-               $wgOut->addHTML( "<fieldset>\n<legend>$math:</legend>\n" );
+               $s="";
                for ( $i = 0; $i < count( $mathopts ); ++$i ) {
                        if ( $i == $this->mMath ) { $checked = ' checked="checked"'; }
                        else { $checked = ""; }
-                       $wgOut->addHTML( "<div><label><input type='radio' name=\"wpMath\"
-       value=\"$i\"$checked /> {$mathopts[$i]}</label></div>\n" );
+                       $s .= "<div><label><input type='radio' name=\"wpMath\" value=\"$i\"$checked /> {$mathopts[$i]}</label></div>\n";
                }
-               $wgOut->addHTML( "</fieldset>\n\n" );
+               $cardset->addCard( wfMsg( "math" ), $s );
                
+               ######################################################################
                # Date format
                #
                if ( $wgUseDynamicDates ) {
-                       $wgOut->addHTML( "<fieldset>\n<legend>$dateFormat:</legend>\n" );
+                       $s="";
                        for ( $i = 0; $i < count( $dateopts ); ++$i) {
                                if ( $i == $this->mDate ) {
                                        $checked = ' checked="checked"';
                                } else {
                                        $checked = "";
                                }
-                               $wgOut->addHTML( "<div><label><input type='radio' name=\"wpDate\" ".
-                                       "value=\"$i\"$checked /> {$dateopts[$i]}</label></div>\n" );
+                               $s .= "<div><label><input type='radio' name=\"wpDate\" value=\"$i\"$checked /> {$dateopts[$i]}</label></div>\n" ;
                        }
-                       $wgOut->addHTML( "</fieldset>\n\n");
+                       $cardset->addCard( wfMsg("dateformat"), $s );
                }
                
+               ######################################################################
                # Textbox rows, cols
                #
                $nowlocal = $wgLang->time( $now = wfTimestampNow(), true );
                $nowserver = $wgLang->time( $now, false );
-               $wgOut->addHTML( "<fieldset>
-       <legend>$tbs:</legend>\n
-               <div>
+               $cardset->addCard( wfMsg( "textboxsize" ), "<div>
                        <label>$tbr: <input type='text' name=\"wpRows\" value=\"{$this->mRows}\" size='6' /></label>
                        <label>$tbc: <input type='text' name=\"wpCols\" value=\"{$this->mCols}\" size='6' /></label>
-               </div> " .
-               $this->getToggle( "editwidth" ) .
-               $this->getToggle( "showtoolbar" ) .
-               $this->getToggle( "previewontop" ) .
-               $this->getToggle( "watchdefault" ) .
-               $this->getToggle( "minordefault" ) . "
-       </fieldset>
-       
-       <fieldset>
-               <legend>$dateFormat:</legend>
-               <div><b>$tzServerTime:</b> $nowserver</div>
-               <div><b>$ltz:</b> $nowlocal</div>
-               <div><label>$tzo*: <input type='text' name=\"wpHourDiff\" value=\"{$this->mHourDiff}\" size='6' /></label></div>
-               <div><input type=\"button\" value=\"$tzGuess\" onClick=\"javascript:guessTimezone()\" /></div>
-       </fieldset>\n\n" );
+                       </div> " .
+                       $this->getToggle( "editwidth" ) .
+                       $this->getToggle( "showtoolbar" ) .
+                       $this->getToggle( "previewontop" ) .
+                       $this->getToggle( "watchdefault" ) .
+                       $this->getToggle( "minordefault" ) );
+
+               $cardset->addCard( wfMsg( "dateformat" ), "<div><b>$tzServerTime:</b> $nowserver</div>
+                       <div><b>$ltz:</b> $nowlocal</div>
+                       <div><label>$tzo*: <input type='text' name=\"wpHourDiff\" value=\"{$this->mHourDiff}\" size='6' /></label></div>
+                       <div><input type=\"button\" value=\"$tzGuess\" onClick=\"javascript:guessTimezone()\" /></div>" );
+
+               $cardset->addCard( wfMsg( "recentchangescount" ),
+                       "<div><label>$rcc: <input type='text' name=\"wpRecent\" value=\"$this->mRecent\" size='6' /></label></div>
+                       " . $this->getToggle( "hideminor" ) .
+                       $this->getToggle( "usenewrc" ) . "
+                       <div><label>$stt: <input type='text' name=\"wpStubs\" value=\"$this->mStubs\" size='6' /></label></div>" );
+
+               $cardset->addCard( wfMsg( "searchresultshead" ), "
+                       <div><label>$rpp: <input type='text' name=\"wpSearch\" value=\"$this->mSearch\" size='6' /></label></div>
+                       <div><label>$scl: <input type='text' name=\"wpSearchLines\" value=\"$this->mSearchLines\" size='6' /></label></div>
+                       <div><label>$scc: <input type='text' name=\"wpSearchChars\" value=\"$this->mSearchChars\" size='6' /></label></div>
+                       <div><fieldset><legend>" . wfMsg( "defaultns" ) . "</legend>\n" . $this->namespacesCheckboxes() . "</fieldset></div>" );
 
-               $wgOut->addHTML( "
-       <fieldset>
-               <div><label>$rcc: <input type='text' name=\"wpRecent\" value=\"$this->mRecent\" size='6' /></label></div>
-               " . $this->getToggle( "hideminor" ) .
-               $this->getToggle( "usenewrc" ) . "
-               <div><label>$stt: <input type='text' name=\"wpStubs\" value=\"$this->mStubs\" size='6' /></label></div>
-       </fieldset>
-       
-       <fieldset>
-               <legend>$srh</legend>
-               <div><label>$rpp: <input type='text' name=\"wpSearch\" value=\"$this->mSearch\" size='6' /></label></div>
-               <div><label>$scl: <input type='text' name=\"wpSearchLines\" value=\"$this->mSearchLines\" size='6' /></label></div>
-               <div><label>$scc: <input type='text' name=\"wpSearchChars\" value=\"$this->mSearchChars\" size='6' /></label></div>
-
-               <fieldset>
-                       <legend>$dsn</legend>
-                       $ps
-               </fieldset>
-       </fieldset>
-               " );
        
+               ######################################################################
                # Various checkbox options
                #
-               $wgOut->addHTML("<fieldset>");
+               $s="";
                foreach ( $togs as $tname => $ttext ) {
                        if( !array_key_exists( $tname, $this->mUsedToggles ) ) {
-                               $wgOut->addHTML( $this->getToggle( $tname ) );
+                               $s .= $this->getToggle( $tname ) ;
                        }
                }
-               $wgOut->addHTML( "</fieldset>\n\n" );
+               $cardset->addCard( wfMsg("misc"), $s );
+
+               $cardset->renderToOutpage( $wgOut );
 
                $wgOut->addHTML( "
        <div>
diff --git a/includes/TabbedCardSet.php b/includes/TabbedCardSet.php
new file mode 100644 (file)
index 0000000..e9a10b1
--- /dev/null
@@ -0,0 +1,74 @@
+<?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 name=\"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
+
+?>
index 0c930e9..1562a4e 100644 (file)
@@ -38,9 +38,9 @@ if($wgMetaNamespace === FALSE)
 );
 
 /* private */ $wgMathNamesDe = array(
-       "Immer als PNG",
-       "Einfaches TeX als HTML, sonst PNG",
-       "HTML wenn möglich, sonst PNG",
+       "Immer als PNG darstellen",
+       "Einfaches TeX als HTML darstellen, sonst PNG",
+       "Wenn möglich als HTML darstellen, sonst PNG",
        "Als TeX belassen (für Textbrowser)",
        "Empfehlenswert für moderne Browser"
 );
@@ -507,7 +507,7 @@ Ihre interne ID-Nummer ist $2.",
 "qbsettings"   => "Seitenleiste", 
 "changepassword" => "Passwort ändern",
 "skin"                 => "Skin",
-"math"                 => "TeX darstellen",
+"math"                 => "TeX",
 "dateformat" => "Datumsformat",
 "math_failure"         => "Parser-Fehler",
 "math_unknown_error"   => "Unbekannter Fehler",
index 83c7290..0bfe935 100644 (file)
@@ -686,6 +686,8 @@ li#pt-login {
     list-style: none;
     font-size: 95%;
 }
+
+
 #p-cactions .hiddenStructure { display: none; }
 #p-cactions ul {
     list-style: none;
@@ -714,6 +716,10 @@ li#pt-login {
     z-index: 0;
     margin: 0;
 }
+#bar #p-cactions {
+    top: 8.0em;
+    left: 5em;
+}
 #p-cactions .selected a { z-index: 3; }
 #p-cactions .new a { color:#ba0000; }
 #p-cactions li a:hover {
@@ -731,6 +737,9 @@ li#pt-login {
 li#ca-talk { margin-right: 1.6em; }
 li#ca-watch { margin-left: 1.6em; }
 
+form #content {
+   left: -8em;
+}
 
 /*
 ** the remaining portlets
index f255a4d..fb53223 100644 (file)
     <style tal:condition="usercss" type="text/css">/*<![CDATA[*/ ${usercss} /*]]>*/</style>
     <script tal:condition="userjs" type="text/javascript" tal:attributes="src userjs"></script><script 
       tal:condition="userjsprev" type="text/javascript">/*<![CDATA[*/${userjsprev}/*]]>*/</script>
+    ${customscript}
   </head>
 
-  <body tal:attributes="ondblclick body-ondblclick|default">
+  <body tal:attributes="onload body-onload; ondblclick body-ondblclick|default">
     <div id="globalWrapper">
       <div id="column-content">
        <div id="content">