I have created a simple "plugin" for NeDio14 allowing to choose column order on listings.
Now you can select which columns will appear on report and their order on listing too.
Pluginīs dialog is fired up when a new "Order" button, located near to selected fields, is pressed (another event could be used - listbox doubleclick, ...).
Pluginīs dialog contains a typical set of controls for this function:
- A listbox containing all available fields on listing
- A selected fields listbox
- Buttons to rearrange fields order on second listbox : top, bottom, up, down.
Fields can be moved from one listbox to another one using double-click.
Multiple field selection can be used to move options between listbox and to rearrange order on selected fields listbox.
Adding fields on second listbox is made after last selected field on that listbox (or at the end if no one is selected) allowing to insert elements in the middle of listbox.
Attached are the following files:
- inc/zChooseOrder.css : Stylesheet (sorry is very poor)
- Nodes-List2.php : NEDIO14īs Node-List program modified to use plugin
- NodeList-ColumnOrder.png : Choose Column Order dialog in action
Code modifications on Node-List2.php are delimited by HTML comments:
- Block 1 : Construction of selected fields listbox and button to start plugin. It could be moved to a function on libmisc.php for better organization.
- Block 2 : The selected fields' loop.
- Block 3 : Special columns outside the loop (deleted elementīs log).
I hope it will be interesting for anyone else.