Warning: session_start(): open(/var/lib/php/sessions/sess_7efr91020i2dqvo4gvalai15j7, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
concept Grouping { S text, grouped; }
cmodule Groupings > DynCRUD {
start { dbIndexingCI(Grouping, +text); }
afterVisualize {
replaceComponent(crud.tableSearcher.tfInput, func(JComponent c) -> JComponent {
centerAndEastWithMargin(c, jbutton("Group...", rThread { define(searchTerm()) }))
});
onEnter(crud.tableSearcher.tfInput, rThread { define(searchTerm()) });
}
void define(fS text) enter {
final JTextField tfText = jtextfield(or2(text, dm_topInput())), tfGrouped = jtextfield();
showFormTitled("Add Grouping",
"Text:", tfText,
"Grouped:", tfGrouped,
rThread {
S text = gtt(tfText), grouped = gtt(tfGrouped);
if (empty(text)) text = tok_dropCurlyBrackets(grouped);
uniq_sync(Grouping, +text, +grouped);
});
focus(nempty(text) ? tfGrouped : tfText);
}
// API
void addGroupingInput(S text) {
if (nempty(text = trim(text)))
uniqCI_sync Grouping(+text);
}
}