mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-17 11:05:03 +02:00
various extensions
This commit is contained in:
@@ -79,7 +79,9 @@ public:
|
||||
/// Renders button properties
|
||||
|
||||
static Poco::WebWidgets::JSDelegate createSelectionChangedServerCallback(const ListBox* pList);
|
||||
/// JS signature: function(dataView, selArray){
|
||||
/// JS signature: function(multiselectObj, dataView, selArray, idxArray)
|
||||
/// selArray contains the selected elements (selArray[i].viewIndex contains the index
|
||||
/// idxArray is a compact string of all selected indizes (ie "3", "1,3,4"
|
||||
|
||||
static void onBeforeLoad(void* pSender, std::pair<ListBoxCell*, Poco::Net::HTTPServerResponse*>& ld);
|
||||
|
||||
|
@@ -109,6 +109,8 @@ void FrameRenderer::writeProperties(const Frame* pFrame, std::ostream& ostr)
|
||||
ostr << ",x:" << pFrame->getPosition().posX << ",y:" << pFrame->getPosition().posY;
|
||||
if (pFrame->hasClass())
|
||||
ostr << ",cls:'" << pFrame->getClass() << "'";
|
||||
if (!pFrame->showBorder())
|
||||
ostr << ",border:false,bodyBorder:false";
|
||||
}
|
||||
|
||||
|
||||
|
@@ -95,10 +95,13 @@ void ListBoxCellRenderer::renderProperties(const ListBoxCell* pListBoxCell, std:
|
||||
|
||||
if (pOwner->hasPosition())
|
||||
ostr << ",x:" << pOwner->getPosition().posX << ",y:" << pOwner->getPosition().posY;
|
||||
|
||||
if (!pListBoxCell->autoScroll())
|
||||
ostr << ",autoScroll:false";
|
||||
|
||||
if (pList)
|
||||
{
|
||||
bool hasListeners = pList->selectionChanged.hasJavaScriptCode();
|
||||
bool hasListeners = pList->selectionChanged.hasJavaScriptCode() || !pList->rowSelected.empty() || !pList->rowDeselected.empty();
|
||||
if (hasListeners)
|
||||
{
|
||||
ostr << ",listeners:{";
|
||||
@@ -157,9 +160,9 @@ void ListBoxCellRenderer::renderProperties(const ListBoxCell* pListBoxCell, std:
|
||||
Poco::WebWidgets::JSDelegate ListBoxCellRenderer::createSelectionChangedServerCallback(const ListBox* pList)
|
||||
{
|
||||
// selectionchange : ( dataView, selArray )
|
||||
static const std::string signature("function(view, sel)");
|
||||
static const std::string signature("function(ms, v, s, idx)");
|
||||
std::map<std::string, std::string> addParams;
|
||||
addParams.insert(std::make_pair(ListBoxCell::ARG_ROW, "+sel.toString()"));
|
||||
addParams.insert(std::make_pair(ListBoxCell::ARG_ROW, "+idx"));
|
||||
addParams.insert(std::make_pair(RequestHandler::KEY_EVID, ListBoxCell::EV_SELECTIONCHANGED));
|
||||
return Utility::createServerCallback(signature, addParams, pList->id(), pList->selectionChanged.getOnSuccess(), pList->selectionChanged.getOnFailure());
|
||||
}
|
||||
|
@@ -155,6 +155,8 @@ void PanelRenderer::renderHeadWithoutChildren(const Panel* pPanel, const RenderC
|
||||
|
||||
if (!pPanel->enabled())
|
||||
ostr << ",disabled:true";
|
||||
if (!pPanel->showBorder())
|
||||
ostr << ",border:false,bodyBorder:false";
|
||||
|
||||
ostr << "})";
|
||||
}
|
||||
|
Reference in New Issue
Block a user