del default buttons

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sab0tajue
    Senior Member
    • Jul 2019
    • 315

    del default buttons

    please tell me how to remove the “Finish” menu item in the “Tasks” section? And in “Meetings” remove the “Send invitation” button? I do this through my buttons
  • Sab0tajue
    Senior Member
    • Jul 2019
    • 315

    #2
    upd pls

    Comment

    • Kharg
      Senior Member
      • Jun 2021
      • 410

      #3
      A custom view will do the trick

      PHP Code:
      define('custom:views/task/detail', 'views/detail', function (Dep) {
          return Dep.extend({
        
              setup: function() {
                  Dep.prototype.setup.call(this);
                  this.removeMenuItem('setCompletedMain');
                  },
      });
      });

      Comment

      • Sab0tajue
        Senior Member
        • Jul 2019
        • 315

        #4
        Originally posted by Kharg
        A custom view will do the trick

        PHP Code:
        define('custom:views/task/detail', 'views/detail', function (Dep) {
        return Dep.extend({
        
        setup: function() {
        Dep.prototype.setup.call(this);
        this.removeMenuItem('setCompletedMain');
        },
        });
        });

        I ask you to tell me exactly where in the files to correct and what to correct. I'm a beginner programmer. I've been poking around for 4 days now and can't find a solution. Many people say that these are system buttons and they cannot be removed​

        Comment

        • Kharg
          Senior Member
          • Jun 2021
          • 410

          #5
          Create the view in your espo folder:
          espofolder/client/custom/src/views/task
          detail.js
          PHP Code:
          define('custom:views/task/detail', 'views/detail', function (Dep) {
          return Dep.extend({
          
          setup: function() {
          Dep.prototype.setup.call(this);
          this.removeMenuItem('setCompletedMain');
          },
          });
          });
          Next go to
          espofolder/custom/Espo/Custom/Resources/metadata/clientDefs

          and create or edit Task.json

          PHP Code:
          {
          "views": {
                  "detail": "custom:views/task/detail"
              }
          } 
          
          Save, rebuild and refresh the page.

          Of course for Meetings it will be different

          Comment

          Working...