mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-27 10:25:59 +02:00
improved DND on table
This commit is contained in:
parent
91676683db
commit
359ef99f85
@ -125,6 +125,9 @@ public:
|
|||||||
/// Adds a javascript callback to inform the WebServer that the client has pressed a mouse button
|
/// Adds a javascript callback to inform the WebServer that the client has pressed a mouse button
|
||||||
/// Method signature is ( Ext.EventObject e)
|
/// Method signature is ( Ext.EventObject e)
|
||||||
|
|
||||||
|
static std::string createDnDGroupName(const Table* pTable);
|
||||||
|
/// Creates a DND name for the table
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static void renderProperties(const Table* pTable, const RenderContext& context, std::ostream& ostr);
|
static void renderProperties(const Table* pTable, const RenderContext& context, std::ostream& ostr);
|
||||||
/// Renders Table properties
|
/// Renders Table properties
|
||||||
|
@ -329,7 +329,7 @@ void TableRenderer::renderProperties(const Table* pTable, const RenderContext& c
|
|||||||
// sorting is allowed though, i.e row matching is active
|
// sorting is allowed though, i.e row matching is active
|
||||||
ostr << ",clicksToEdit:1,stripeRows:true,enableColumnHide:false,enableColumnMove:false,loadMask:true";
|
ostr << ",clicksToEdit:1,stripeRows:true,enableColumnHide:false,enableColumnMove:false,loadMask:true";
|
||||||
if (pTable->getDragAndDrop())
|
if (pTable->getDragAndDrop())
|
||||||
ostr << ",enableDragDrop:true";
|
ostr << ",enableDragDrop:true,ddGroup:'" << createDnDGroupName(pTable) << "'";
|
||||||
|
|
||||||
if (pTable->getSelectionModel() != Table::SM_CELL)
|
if (pTable->getSelectionModel() != Table::SM_CELL)
|
||||||
{
|
{
|
||||||
@ -407,6 +407,13 @@ void TableRenderer::renderProperties(const Table* pTable, const RenderContext& c
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::string TableRenderer::createDnDGroupName(const Table* pTable)
|
||||||
|
{
|
||||||
|
poco_check_ptr (pTable);
|
||||||
|
return "ddgrid" + Poco::NumberFormatter::format(pTable->id());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void TableRenderer::renderColumns(const Table* pTable, const RenderContext& context, std::ostream& ostr)
|
void TableRenderer::renderColumns(const Table* pTable, const RenderContext& context, std::ostream& ostr)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user