Main Page | Directories | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages | Examples

SC_alt_palette Class Reference

List of all members.

Public Member Functions

 init ()
 Constructor for the class.
 main ()
 Main function, rendering the palette form.
 printContent ()
 Outputting the accumulated content to screen.

Public Attributes

 $content
 $backRef
 $formRef
 $doc
 $formName
 $GPbackref
 $inData
 $prependFormFieldNames
 $rec

Member Function Documentation

SC_alt_palette::init  ) 
 

Constructor for the class.

Returns:
void

Definition at line 247 of file alt_palette.php.

00247                      {
00248 
00249          // Setting GPvars, etc.
00250       $this->formName = t3lib_div::_GP('formName');
00251       $this->GPbackref = t3lib_div::_GP('backRef');
00252       $this->inData = t3lib_div::_GP('inData');
00253       $this->prependFormFieldNames = t3lib_div::_GP('prependFormFieldNames');
00254       $this->rec = t3lib_div::_GP('rec');
00255 
00256          // Making references:
00257       $this->backRef = $this->GPbackref ? $this->GPbackref : 'window.opener';
00258 #     $this->backRef = 'top.content.list_frame.view_frame';
00259 
00260       $this->formRef = $this->backRef.'.document.'.$this->formName;
00261 
00262          // Start template object:
00263       $this->doc = t3lib_div::makeInstance('template');
00264       $this->doc->bodyTagMargins['x']=0;
00265       $this->doc->bodyTagMargins['y']=0;
00266       $this->doc->form='<form action="#" method="post" name="'.htmlspecialchars($this->formName).'" onsubmit="return false;">';
00267       $this->doc->docType = 'xhtml_trans';
00268       $this->doc->backPath = '';
00269 
00270          // In case the palette is opened in a SEPARATE window (as the case is with frontend editing) then another body-tag id should be used (so we don't get the background image for the palette shown!)
00271       if (!$this->GPbackref)  $this->doc->bodyTagId.= '-vert';
00272 
00273          // Setting JavaScript functions for the header:
00274       $this->doc->JScode = $this->doc->wrapScriptTags('
00275          var serialNumber = "";
00276          function timeout_func() {  //
00277             if ('.$this->backRef.' && '.$this->backRef.'.document && '.$this->formRef.')  {
00278                if ('.$this->formRef.'["_serialNumber"])  {
00279                   if (serialNumber) {
00280                      if ('.$this->formRef.'["_serialNumber"].value != serialNumber) {closePal(); return false;}
00281                   } else {
00282                      serialNumber = '.$this->formRef.'["_serialNumber"].value;
00283                   }
00284                }
00285                window.setTimeout("timeout_func();",1*1000);
00286             } else closePal();
00287          }
00288          function closePal()  {  //
00289             '.($this->GPbackref?'document.location="alt_topmenu_dummy.php";':'close();').'
00290          }
00291          timeout_func();
00292          onBlur="alert();";
00293       ');
00294    }

SC_alt_palette::main  ) 
 

Main function, rendering the palette form.

Returns:
void

Definition at line 301 of file alt_palette.php.

References table().

00301                      {
00302 
00303       $this->content='';
00304       $this->content.=$this->doc->startPage('TYPO3 Edit Palette');
00305 
00306       $inData = explode(':',$this->inData);
00307 
00308          // Begin edit:
00309       if (is_array($inData) && count($inData)==3)  {
00310 
00311             // Create the TCEforms object:
00312          $tceforms = $this->GPbackref ? new formRender() : new formRender_vert();
00313          $tceforms->initDefaultBEMode();
00314          $tceforms->palFieldTemplate='###FIELD_PALETTE###';
00315          $tceforms->palettesCollapsed=0;
00316          $tceforms->isPalettedoc=$this->backRef;
00317 
00318          $tceforms->formName = $this->formName;
00319          $tceforms->prependFormFieldNames = $this->prependFormFieldNames;
00320 
00321             // Initialize other data:
00322          $table=$inData[0];
00323          $theUid=$inData[1];
00324          $thePalNum = $inData[2];
00325          $this->rec['uid']=$theUid;
00326 
00327             // Getting the palette fields rendered:
00328          $panel.=$tceforms->getPaletteFields($table,$this->rec,$thePalNum,'',implode(',',array_keys($this->rec)));
00329          $formContent=$panel;
00330 
00331             // Add all the content, including JavaScript as needed.
00332          $this->content.=$tceforms->printNeededJSFunctions_top().$formContent.$tceforms->printNeededJSFunctions();
00333       }
00334    }

SC_alt_palette::printContent  ) 
 

Outputting the accumulated content to screen.

Returns:
void

Definition at line 341 of file alt_palette.php.

00341                            {
00342       echo $this->content.$this->doc->endPage();
00343    }


Member Data Documentation

SC_alt_palette::$backRef
 

Definition at line 227 of file alt_palette.php.

SC_alt_palette::$content
 

Definition at line 226 of file alt_palette.php.

SC_alt_palette::$doc
 

Definition at line 229 of file alt_palette.php.

SC_alt_palette::$formName
 

Definition at line 232 of file alt_palette.php.

SC_alt_palette::$formRef
 

Definition at line 228 of file alt_palette.php.

SC_alt_palette::$GPbackref
 

Definition at line 233 of file alt_palette.php.

SC_alt_palette::$inData
 

Definition at line 234 of file alt_palette.php.

SC_alt_palette::$prependFormFieldNames
 

Definition at line 235 of file alt_palette.php.

SC_alt_palette::$rec
 

Definition at line 236 of file alt_palette.php.


The documentation for this class was generated from the following file:
Generated on Sun Oct 3 01:06:28 2004 for TYPO3core 3.7.0 dev by  doxygen 1.3.8-20040913