Extending master.js

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jeff11
    Junior Member
    • May 2023
    • 12

    Extending master.js

    Hi!

    I would like to extend/override master.js

    So I added

    custom/Espo/Custom/Resources/metadata/clientDefs/App.json
    Code:
    {
    "masterView" : "custom:views/site/master"
    }​
    and

    client/custom/src/views/site/master.js
    Code:
    define('custom:views/site/master', 'views/site/master', function (Dep) {
    return Dep.extend({
    afterRender: function () {
    debugger;
    },
    })
    });​
    but my debugger is not being executed.

    Thank you for your help!
  • Kharg
    Senior Member
    • Jun 2021
    • 410

    #2
    Master.js can’t be extended.

    Comment

    • jeff11
      Junior Member
      • May 2023
      • 12

      #3
      Thank you for your answer. Are you sure about that and would you have alternative ideas on how to override adjustContent function specifically?

      Comment

      • Kharg
        Senior Member
        • Jun 2021
        • 410

        #4
        Yes, there are alternatives but they are difficult and not always upgrade safe.

        Take a look at one of my extensions to see how it's done.

        Comment

        Working...