Expand Column

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • item
    replied
    this must be "out-of-box" .. pull-request
    for list - list small

    Thanks for this.

    Leave a comment:


  • yuri
    replied
    When you hover the mouse over the cell it should show its value. Can be helpful when the cell is overflowed.
    Last edited by yuri; 07-13-2019, 06:57 AM.

    Leave a comment:


  • telecastg
    replied
    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();
            }
    
        });
    
    });
    modify the clientDefs for all entities where you want to have the resizable column facility and write inside them:
    Code:
        "recordViews": {
            "list": "custom:views/record/resizable-columns-list"
        }
    By the way, if you want to always have this functionality, not just in developer mode, add this to the `custom\Espo\Custom\Resources\metadata\app\client. json` file:
    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:


  • diyoyo
    replied
    Thanks, that's a great start already.

    Leave a comment:


  • blueprint
    replied
    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"
        ]
    }
    4. Ensure that `isDeveloperMode` => true in config.php
    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();
    6. Rebuild via Admin interface and refresh a page with a list in it.

    Although the borders between column headers aren't visible, you should see the cursor change. You should be able to resize now

    Leave a comment:


  • diyoyo
    started a topic Expand Column

    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.
Working...