Project

General

Profile

Bug #18807 » 8446_ob_menu.diff

Administrator Admin, 2008-05-17 16:53

View differences:

typo3/sysext/tstemplate/ts/index.php (working copy)
$this->doc->inDocStylesArray[] = '
TABLE#typo3-objectBrowser A { text-decoration: none; }
TABLE#typo3-objectBrowser .comment { color: maroon; font-weight: bold; }
.tsob-menu label, .tsob-menu-row2 label, .tsob-conditions label {padding: 0 5px; vertical-align: text-top;}
.tsob-menu-row2 {margin-top: 10px;}
.tsob-conditions {padding: 1px 2px;}
';
typo3/sysext/tstemplate_objbrowser/class.tx_tstemplateobjbrowser.php (working copy)
$theOutput.=$this->pObj->doc->spacer(5);
$theOutput.=$this->pObj->doc->section('Object tree:','',0,1);
// func menu
$menu = '<div class="tsob-menu"><label>Browse:</label>';
$menu .= t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[ts_browser_type]', $bType, $this->pObj->MOD_MENU['ts_browser_type']);
$menu .= '<label for="ts_browser_toplevel_' . $bType . '">OL:</label>';
$menu .= t3lib_BEfunc::getFuncMenu($this->pObj->id,'SET[ts_browser_toplevel_' . $bType . ']', $this->pObj->MOD_SETTINGS['ts_browser_toplevel_' . $bType], $this->pObj->MOD_MENU['ts_browser_toplevel_' . $bType]);
//search
$menu .= '<label for="search_field">Search:</label>';
$menu .= '<input type="Text" name="search_field" id="search_field" value="' .htmlspecialchars($POST['search_field']) . '"' . $GLOBALS['TBE_TEMPLATE']->formWidth(20) . '>';
$menu .= '<input type="Submit" name="search" value="Search">';
$menu .= '<label for="checkTs_browser_regexsearch">Case sensitive:</label>';
$menu .= t3lib_BEfunc::getFuncCheck($this->pObj->id,'SET[ts_browser_regexsearch]', $this->pObj->MOD_SETTINGS['ts_browser_regexsearch'], '', '', 'id="checkTs_browser_regexsearch"');
$menu .= '</div>';
$theOutput.=$this->pObj->doc->section('','<NOBR>'.$menu.'</NOBR>');
$menu = 'Browse: '.t3lib_BEfunc::getFuncMenu($this->pObj->id,'SET[ts_browser_type]',$bType,$this->pObj->MOD_MENU['ts_browser_type']);
$menu.= '&nbsp;&nbsp;OL: '.t3lib_BEfunc::getFuncMenu($this->pObj->id,'SET[ts_browser_toplevel_'.$bType.']',$this->pObj->MOD_SETTINGS['ts_browser_toplevel_'.$bType],$this->pObj->MOD_MENU['ts_browser_toplevel_'.$bType]);
// second row options
$menu = '<div class="tsob-menu-row2"><label for="checkTs_browser_fixedLgd">Crop lines:</label>';
$menu .= t3lib_BEfunc::getFuncCheck($this->pObj->id, 'SET[ts_browser_fixedLgd]', $this->pObj->MOD_SETTINGS["ts_browser_fixedLgd"], '', '', 'id="checkTs_browser_fixedLgd"');
$menu .= '<label for="checkTs_browser_showComments">Display comments:</label>';
$menu .= t3lib_BEfunc::getFuncCheck($this->pObj->id, 'SET[ts_browser_showComments]', $this->pObj->MOD_SETTINGS['ts_browser_showComments'], '', '', 'id="checkTs_browser_showComments"');
$menu .= '<label for="checkTs_browser_alphaSort">Sort alphabetically:</label>';
$menu .= t3lib_BEfunc::getFuncCheck($this->pObj->id, 'SET[ts_browser_alphaSort]', $this->pObj->MOD_SETTINGS['ts_browser_alphaSort'], '', '', 'id="checkTs_browser_alphaSort"');
if ($bType == 'setup' && !$this->pObj->MOD_SETTINGS['ts_browser_fixedLgd']) {
$menu .= '<label>Constants display:</label>';
$menu .= t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[ts_browser_const]', $this->pObj->MOD_SETTINGS['ts_browser_const'], $this->pObj->MOD_MENU['ts_browser_const']);
}
$menu .= '</div>';
$theOutput.=$this->pObj->doc->section('','<NOBR>'.$menu.'</NOBR>');
$theKey=$this->pObj->MOD_SETTINGS["ts_browser_toplevel_".$bType];
if (!$theKey || !str_replace("-","",$theKey)) {$theKey="";}
list($theSetup,$theSetupValue) = $tmpl->ext_getSetup($theSetup, ($this->pObj->MOD_SETTINGS['ts_browser_toplevel_'.$bType]?$this->pObj->MOD_SETTINGS['ts_browser_toplevel_'.$bType]:''));
......
// Conditions:
if (is_array($tmpl->sections)) {
$theOutput.=$this->pObj->doc->divider(15);
$theOutput.=$this->pObj->doc->section('Conditions:','',0,1);
$out="";
reset($tmpl->sections);
while(list($key,$val)=each($tmpl->sections)) {
$out.='<tr><td><input type="Checkbox" name="conditions['.$key.']" id="check'.$key.'" value="'.htmlspecialchars($val).'"'.($this->pObj->MOD_SETTINGS["tsbrowser_conditions"][$key]?" checked":"").'></td><td nowrap><label for="check'.$key.'">'.$tmpl->substituteCMarkers(htmlspecialchars($val)).'</label>&nbsp;&nbsp;</td></tr>';
$out .= '<tr><td nowrap class="tsob-conditions"><input type="Checkbox" name="conditions[' . $key . ']" id="check' . $key . '" value="' . htmlspecialchars($val) . '"' . ($this->pObj->MOD_SETTINGS['tsbrowser_conditions'][$key] ? " checked" : "") . '>';
$out .= '<label for="check' .$key . '">' . $tmpl->substituteCMarkers(htmlspecialchars($val)) . '</label></td></tr>';
}
$theOutput.='
<table border=0 cellpadding=1 cellspacing=0>
<table border=0 cellpadding=0 cellspacing=0 class="bgColor4">' . $out . '
<tr>
<td><img src=clear.gif width=4 height=1></td>
<td class="bgColor2">
<table border=0 cellpadding=0 cellspacing=0 class="bgColor4">'.$out.'
<tr>
<td>&nbsp;</td>
<td><img src=clear.gif height=10 width=240><BR><input type="Submit" name="Submit" value="Set conditions"><BR></td>
</tr>
</table>
</td>
<td><br /><input type="Submit" name="Submit" value="Set conditions"></td>
</tr>
</table>
';
}
// Search:
$theOutput.='<br>
<table border=0 cellpadding=1 cellspacing=0>
<tr>
<td><img src=clear.gif width=4 height=1></td>
<td class="bgColor2">
<table border=0 cellpadding=0 cellspacing=0 class="bgColor4">
<tr>
<td>&nbsp;Enter search phrase:&nbsp;&nbsp;<input type="Text" name="search_field" value="'.htmlspecialchars($POST["search_field"]).'"'.$GLOBALS["TBE_TEMPLATE"]->formWidth(20).'></td>
<td><input type="Submit" name="search" value="Search"></td>
</tr>
<tr>
<td>&nbsp;<label for="checkTs_browser_regexsearch">Use ereg(), not stristr():</label>&nbsp;&nbsp;'.t3lib_BEfunc::getFuncCheck($this->pObj->id,"SET[ts_browser_regexsearch]",$this->pObj->MOD_SETTINGS["ts_browser_regexsearch"],'','','id="checkTs_browser_regexsearch"').'</td>
<td>&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
';
// Menu in the bottom:
$menu = '<label for="checkTs_browser_fixedLgd">Crop lines:</label> '.t3lib_BEfunc::getFuncCheck($this->pObj->id,"SET[ts_browser_fixedLgd]",$this->pObj->MOD_SETTINGS["ts_browser_fixedLgd"],'','','id="checkTs_browser_fixedLgd"');
$menu .= '<br /><label for="checkTs_browser_showComments">Display comments:</label> '.t3lib_BEfunc::getFuncCheck($this->pObj->id,'SET[ts_browser_showComments]',$this->pObj->MOD_SETTINGS['ts_browser_showComments']);
$menu .= '<br /><label for="checkTs_browser_alphaSort">Sort alphabetically:</label> '.t3lib_BEfunc::getFuncCheck($this->pObj->id,'SET[ts_browser_alphaSort]',$this->pObj->MOD_SETTINGS['ts_browser_alphaSort'],'','','id="checkTs_browser_alphaSort"');
if ($bType=="setup" && !$this->pObj->MOD_SETTINGS["ts_browser_fixedLgd"]) {
$menu.= "<br />Constants display: ".t3lib_BEfunc::getFuncMenu($this->pObj->id,"SET[ts_browser_const]",$this->pObj->MOD_SETTINGS["ts_browser_const"],$this->pObj->MOD_MENU["ts_browser_const"]);
}
$theOutput.=$this->pObj->doc->section("",'<NOBR>'.$menu.'</NOBR>');
// Ending section:
$theOutput.=$this->pObj->doc->sectionEnd();
}
(3-3/4)