this must be "out-of-box" .. pull-request
for list - list small
Thanks for this.
Expand Column
Collapse
X
-
Excellent contribution blueprint here's how I would make it "upgrade proof":
create a generic base record list view that inherits the functionality of the 'views/record/list' script :
'client/custom/src/views/record/resizable-columns-list.js'
Code:Espo.define('custom:views/record/resizable-columns-list', 'views/record/list', function (Dep) { return Dep.extend({ afterRender: function () { if (this.allResultIsChecked) { this.selectAllResult(); } else { if (this.checkedList.length) { this.checkedList.forEach(function (id) { this.checkRecord(id); }, this); } } // make the table element re-sizable $("table").resizableColumns(); } }); });
Code:"recordViews": { "list": "custom:views/record/resizable-columns-list" }
Code:"scriptList": [ "__APPEND__", "client/custom/lib/jquery.resizableColumns/jquery.resizableColumns.js" ], "cssList": [ "__APPEND__", "client/custom/lib/jquery.resizableColumns/jquery.resizableColumns.css" ]
Last edited by telecastg; 07-12-2019, 08:36 PM.Leave a comment:
-
This method isn't upgrade proof (I'm sure someone can suggest a method which is) but if you do the following:
1. Download jquery.resizableColumns from here: https://github.com/dobtco/jquery-resizable-columns
2. Put the files from the `dist` folder into a `client/custom/lib/jquery.resizableColumns` folder
3. Create a `custom\Espo\Custom\Resources\metadata\app\client. json` file and add the following:
Code:{ "developerModeScriptList": [ "__APPEND__", "client/custom/lib/jquery.resizableColumns/jquery.resizableColumns.js" ], "developerModeCssList": [ "__APPEND__", "client/custom/lib/jquery.resizableColumns/jquery.resizableColumns.css" ] }
5. Edit `client/src/views/record/list.js` adding the following code to the end of the `afterRender` function (circa line 1088, this is the non-upgrade proof bit):
Code:$("table").resizableColumns();
Although the borders between column headers aren't visible, you should see the cursor change. You should be able to resize nowLeave a comment:
-
Expand Column
Hi,
it would be nice to be able to resize/expand columns in List mode. I know we can set the percentage for each columns, but sometimes it is too restrictive. Either some "Drag and stretch" feature, or a "3-dot" link which expands locally truncated content.
Thanks.
Cheers,
Yohan.Tags: None
Leave a comment: