mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-20 05:49:04 +02:00
rendering fixes
This commit is contained in:
@@ -130,6 +130,7 @@ void PageRenderer::renderHead(const Renderable* pRenderable, const RenderContext
|
|||||||
ostr << "Ext.onReady(function() {";
|
ostr << "Ext.onReady(function() {";
|
||||||
ostr << "var " << VAR_LOCALTMP << ";"; // tmp variable needed for table renderer
|
ostr << "var " << VAR_LOCALTMP << ";"; // tmp variable needed for table renderer
|
||||||
ostr << "Ext.QuickTips.init();";
|
ostr << "Ext.QuickTips.init();";
|
||||||
|
ostr << "Ext.Ajax.timeout=60000;"; // increase the timeout to 60 secs
|
||||||
ostr << "Ext.Ajax.on({'requestexception':function(conn, resp, obj){";
|
ostr << "Ext.Ajax.on({'requestexception':function(conn, resp, obj){";
|
||||||
ostr << "Ext.Msg.show({";
|
ostr << "Ext.Msg.show({";
|
||||||
ostr << "title:'Server Error',";
|
ostr << "title:'Server Error',";
|
||||||
|
@@ -63,7 +63,7 @@ void PanelRenderer::renderHead(const Renderable* pRenderable, const RenderContex
|
|||||||
ostr << "new Ext.Window({";
|
ostr << "new Ext.Window({";
|
||||||
|
|
||||||
Utility::writeRenderableProperties(pRenderable, ostr);
|
Utility::writeRenderableProperties(pRenderable, ostr);
|
||||||
if (!pPanel->getName().empty())
|
if (!pPanel->getName().empty() && pPanel->showHeader())
|
||||||
ostr << ",title:'" << pPanel->getTitle() << "'";
|
ostr << ",title:'" << pPanel->getTitle() << "'";
|
||||||
if (pPanel->getWidth() > 0)
|
if (pPanel->getWidth() > 0)
|
||||||
ostr << ",width:" << pPanel->getWidth();
|
ostr << ",width:" << pPanel->getWidth();
|
||||||
@@ -82,7 +82,11 @@ void PanelRenderer::renderHead(const Renderable* pRenderable, const RenderContex
|
|||||||
|
|
||||||
// minimizable set to true only fires a minimize event, without an event handler attached
|
// minimizable set to true only fires a minimize event, without an event handler attached
|
||||||
// it is pretty useless, instead use collapsible
|
// it is pretty useless, instead use collapsible
|
||||||
ostr << ",header:true,maximizable:true,collapsible:true";
|
if (pPanel->showHeader())
|
||||||
|
ostr << ",header:true,maximizable:true,collapsible:true";
|
||||||
|
else
|
||||||
|
ostr << ",header:false";
|
||||||
|
|
||||||
// a panel has exactly one child
|
// a panel has exactly one child
|
||||||
// if this child is a layout we are fine otherwise we have to generate the items array
|
// if this child is a layout we are fine otherwise we have to generate the items array
|
||||||
View::Ptr pChild = pPanel->getChild();
|
View::Ptr pChild = pPanel->getChild();
|
||||||
|
@@ -82,6 +82,8 @@ void TextFieldCellRenderer::renderBody(const Renderable* pRenderable, const Rend
|
|||||||
void TextFieldCellRenderer::writeCellProperties(const TextFieldCell* pCell, std::ostream& ostr, bool writeValue, bool writeListeners)
|
void TextFieldCellRenderer::writeCellProperties(const TextFieldCell* pCell, std::ostream& ostr, bool writeValue, bool writeListeners)
|
||||||
{
|
{
|
||||||
Utility::writeCellProperties(pCell, ostr);
|
Utility::writeCellProperties(pCell, ostr);
|
||||||
|
|
||||||
|
ostr << ",selectOnFocus:true";
|
||||||
|
|
||||||
if (writeValue&& !pCell->getValue().empty())
|
if (writeValue&& !pCell->getValue().empty())
|
||||||
{
|
{
|
||||||
|
@@ -60,6 +60,7 @@
|
|||||||
#include "Poco/WebWidgets/ExtJS/TabViewRenderer.h"
|
#include "Poco/WebWidgets/ExtJS/TabViewRenderer.h"
|
||||||
#include "Poco/WebWidgets/ExtJS/ListBoxCellRenderer.h"
|
#include "Poco/WebWidgets/ExtJS/ListBoxCellRenderer.h"
|
||||||
#include "Poco/WebWidgets/ExtJS/TableRenderer.h"
|
#include "Poco/WebWidgets/ExtJS/TableRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ProgressIndicatorRenderer.h"
|
||||||
|
|
||||||
#include "Poco/WebWidgets/Label.h"
|
#include "Poco/WebWidgets/Label.h"
|
||||||
#include "Poco/WebWidgets/Page.h"
|
#include "Poco/WebWidgets/Page.h"
|
||||||
@@ -90,6 +91,7 @@
|
|||||||
#include "Poco/WebWidgets/Table.h"
|
#include "Poco/WebWidgets/Table.h"
|
||||||
#include "Poco/WebWidgets/WebApplication.h"
|
#include "Poco/WebWidgets/WebApplication.h"
|
||||||
#include "Poco/WebWidgets/RequestHandler.h"
|
#include "Poco/WebWidgets/RequestHandler.h"
|
||||||
|
#include "Poco/WebWidgets/ProgressIndicator.h"
|
||||||
|
|
||||||
#include "Poco/String.h"
|
#include "Poco/String.h"
|
||||||
#include "Poco/StringTokenizer.h"
|
#include "Poco/StringTokenizer.h"
|
||||||
@@ -131,6 +133,7 @@ void Utility::initialize(LookAndFeel::Ptr ptr)
|
|||||||
ptr->registerRenderer(typeid(Image), new ImageRenderer());
|
ptr->registerRenderer(typeid(Image), new ImageRenderer());
|
||||||
ptr->registerRenderer(typeid(TabView), new TabViewRenderer());
|
ptr->registerRenderer(typeid(TabView), new TabViewRenderer());
|
||||||
ptr->registerRenderer(typeid(Table), new TableRenderer());
|
ptr->registerRenderer(typeid(Table), new TableRenderer());
|
||||||
|
ptr->registerRenderer(typeid(ProgressIndicator), new ProgressIndicatorRenderer());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -105,6 +105,12 @@ public:
|
|||||||
const std::string& getTitle() const;
|
const std::string& getTitle() const;
|
||||||
/// Returns the title of this View.
|
/// Returns the title of this View.
|
||||||
|
|
||||||
|
void showHeader(bool show);
|
||||||
|
/// Shows the header of the Panel
|
||||||
|
|
||||||
|
bool showHeader() const;
|
||||||
|
/// Returns if the header of the Panel is shown
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
~Panel();
|
~Panel();
|
||||||
@@ -115,6 +121,7 @@ private:
|
|||||||
std::string _title;
|
std::string _title;
|
||||||
bool _modal;
|
bool _modal;
|
||||||
bool _showCloseIcon;
|
bool _showCloseIcon;
|
||||||
|
bool _showHeader;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -176,6 +183,18 @@ inline const std::string& Panel::getTitle() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline void Panel::showHeader(bool show)
|
||||||
|
{
|
||||||
|
_showHeader = show;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool Panel::showHeader() const
|
||||||
|
{
|
||||||
|
return _showHeader;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} } // namespace Poco::WebWidgets
|
} } // namespace Poco::WebWidgets
|
||||||
|
|
||||||
|
|
||||||
|
@@ -46,7 +46,8 @@ Panel::Panel():
|
|||||||
_pChild(),
|
_pChild(),
|
||||||
_title(),
|
_title(),
|
||||||
_modal(false),
|
_modal(false),
|
||||||
_showCloseIcon(true)
|
_showCloseIcon(true),
|
||||||
|
_showHeader(true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,7 +57,8 @@ Panel::Panel(const std::string& name):
|
|||||||
_pChild(),
|
_pChild(),
|
||||||
_title(),
|
_title(),
|
||||||
_modal(false),
|
_modal(false),
|
||||||
_showCloseIcon(true)
|
_showCloseIcon(true),
|
||||||
|
_showHeader(true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,7 +68,8 @@ Panel::Panel(const std::string& name, const std::string& title):
|
|||||||
_pChild(),
|
_pChild(),
|
||||||
_title(title),
|
_title(title),
|
||||||
_modal(false),
|
_modal(false),
|
||||||
_showCloseIcon(true)
|
_showCloseIcon(true),
|
||||||
|
_showHeader(true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,7 +79,8 @@ Panel::Panel(View::Ptr pChild):
|
|||||||
_pChild(),
|
_pChild(),
|
||||||
_title(),
|
_title(),
|
||||||
_modal(false),
|
_modal(false),
|
||||||
_showCloseIcon(true)
|
_showCloseIcon(true),
|
||||||
|
_showHeader(true)
|
||||||
{
|
{
|
||||||
setChild(pChild);
|
setChild(pChild);
|
||||||
}
|
}
|
||||||
@@ -87,7 +91,8 @@ Panel::Panel(const std::string& name, View::Ptr pChild):
|
|||||||
_pChild(),
|
_pChild(),
|
||||||
_title(),
|
_title(),
|
||||||
_modal(false),
|
_modal(false),
|
||||||
_showCloseIcon(true)
|
_showCloseIcon(true),
|
||||||
|
_showHeader(true)
|
||||||
{
|
{
|
||||||
setChild(pChild);
|
setChild(pChild);
|
||||||
}
|
}
|
||||||
@@ -98,7 +103,8 @@ Panel::Panel(const std::string& name, const std::string& title, View::Ptr pChild
|
|||||||
_pChild(),
|
_pChild(),
|
||||||
_title(title),
|
_title(title),
|
||||||
_modal(false),
|
_modal(false),
|
||||||
_showCloseIcon(true)
|
_showCloseIcon(true),
|
||||||
|
_showHeader(true)
|
||||||
{
|
{
|
||||||
setChild(pChild);
|
setChild(pChild);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user