mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-13 18:45:10 +01: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
|
||||
/// Method signature is ( Ext.EventObject e)
|
||||
|
||||
static std::string createDnDGroupName(const Table* pTable);
|
||||
/// Creates a DND name for the table
|
||||
|
||||
protected:
|
||||
static void renderProperties(const Table* pTable, const RenderContext& context, std::ostream& ostr);
|
||||
/// 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
|
||||
ostr << ",clicksToEdit:1,stripeRows:true,enableColumnHide:false,enableColumnMove:false,loadMask:true";
|
||||
if (pTable->getDragAndDrop())
|
||||
ostr << ",enableDragDrop:true";
|
||||
ostr << ",enableDragDrop:true,ddGroup:'" << createDnDGroupName(pTable) << "'";
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user