various fixes

This commit is contained in:
Peter Schojer
2008-08-27 12:55:57 +00:00
parent 8dddbfb147
commit cdab287496
15 changed files with 146 additions and 27 deletions

View File

@@ -114,17 +114,9 @@ void ButtonCellRenderer::renderProperties(const ButtonCell* pButtonCell, const s
{
ostr << ",listeners:{";
Utility::writeJSEvent(ostr, EV_CLICK, pOwner->buttonClicked, &ButtonCellRenderer::createClickServerCallback, pOwner);
/*
if (pOwner->buttonClicked.willDoServerCallback())
Utility::writeJSEvent(ostr, EV_CLICK, pOwner->buttonClicked.jsDelegates(),
createClickServerCallback(pOwner), pOwner->buttonClicked.getServerCallbackPos());
else
Utility::writeJSEvent(ostr, EV_CLICK, pOwner->buttonClicked.jsDelegates());*/
ostr << "}";
}
}
std::string toolTip(pButtonCell->getToolTip());
if (!toolTip.empty())

View File

@@ -63,7 +63,7 @@ void FormRenderer::renderHead(const Renderable* pRenderable, const RenderContext
ostr << "new Ext.FormPanel({id:'" << pForm->id() << "',";
ostr << "onSubmit:Ext.emptyFn,submit:function(){this.getEl().dom.submit();},";
//ostr << "onSubmit:Ext.emptyFn,submit:function(){this.getEl().dom.submit();},";
if (pForm->getMethod() == Form::METHOD_POST)
ostr << "method:'POST',";
ostr << "title:'" << pForm->getName() << "',autoHeight:true,autoWidth:true,url:'" << pForm->getURI().toString() << "',frame:true,items:[";

View File

@@ -87,7 +87,7 @@ void ImageButtonCellRenderer::writeHTML(const ImageButtonCell* pButtonCell, bool
const Poco::WebWidgets::ImageButton* pOwner = static_cast<const Poco::WebWidgets::ImageButton*>(pButtonCell->getOwner());
poco_check_ptr (pOwner);
ostr << "'<div>";
ostr << "<div>";
ostr << "<div><center>";
ostr << "<input src=\"" << Utility::safe(ptrImg->getURI().toString()) << "\"";
if (!pOwner->getName().empty())
ostr << " name=\"" << pOwner->getName() << "\"";
@@ -107,7 +107,7 @@ void ImageButtonCellRenderer::writeHTML(const ImageButtonCell* pButtonCell, bool
ostr << "\"";
}
ostr << " type=\"image\"/>";
ostr << "</div>";
ostr << "</center></div>";
std::string txt(pOwner->getText());
if (showTxt && !txt.empty())
ostr << "<div><center>" << Utility::safe(pButtonCell->getOwner()->getText()) << "</center></div>";

View File

@@ -115,8 +115,6 @@ void LayoutRenderer::renderParameters(const Layout* pLayout, const RenderContext
void LayoutRenderer::visitChildren(const Layout* pLayout, int cols, int horPad, int vertPad, const RenderContext& context, std::ostream& ostr)
{
ContainerView::ConstIterator it = pLayout->begin();
int cnt(0);
std::string padHor;
if (horPad > 0)
@@ -133,10 +131,11 @@ void LayoutRenderer::visitChildren(const Layout* pLayout, int cols, int horPad,
pad << "<p style=\"margin-top:" << vertPad << "px\"></p>";
padVert = pad.str();
}
ContainerView::ConstIterator it = pLayout->begin();
int cnt(0);
for (; it != pLayout->end(); ++it, ++cnt)
{
if (it != pLayout->begin())
if (cnt > 0)
{
ostr << ",";
if (cnt < cols && !padHor.empty())

View File

@@ -94,7 +94,7 @@ void TimeFieldCellRenderer::writeCellProperties(const TimeFieldCell* pCell, std:
else if (fmt == TimeField::FMT_AMPM_WITHSECONDS)
ostr << ",format:" << fmtAmPms;
else
; // this is the default
; // this is the default
}