Announcement

Collapse
No announcement yet.

custom view detail meeting / document not same behaviour

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • custom view detail meeting / document not same behaviour

    Hi,
    I have custom detail.js for meeting and document with same logic :

    PHP Code:
    if (!~['Basic'].indexOf(this.model.get('type'))) {

                    if (
    this.getAcl().checkModel(this.model'edit')) {
                        
    this.menu.buttons.push({
                                
    'label''journal',
                                
    'action''getJournal',
                                
    'style''default',
                                
    'iconHtml''',
                                
    'acl''edit',
                       });

                        
    this.menu.buttons.push({
                                
    'label''xlsx',
                                
    'action''getXlsx',
                                
    'style''default',
                                
    'iconHtml''',
                                
    'acl''edit',
                       });
                    }

                    
    this.listenTo(this.model'sync', function () {
                            if (~[
    'Basic'].indexOf(this.model.get('type'))) {
                                
    this.$el.find('[data-action="getJournal"]').remove();
                                
    this.$el.find('[data-action="getXlsx"]').remove();
                            }

                    }, 
    this);
                } 
    For Meeting, that's work perfectly, for Document, I need to refresh page or navigate next/previous record.
    I have juste to precise I have documentFolder and each document is on the appropriate folder. I suspect this.
    Another constatation, ".remove()" don't work on document, I have change it to .addClass('disable')

    Juste another question : why I have loose the default "Send Invitations" button ? I do something wrong ?
    PHP Code:
    Espo.define('custom:views/meeting/detail', ['crm:views/meeting/detail'], function (Dep) {

    return 
    Dep.extend({
        
    setup: function () {
            
    Dep.prototype.setup.call(this); 
    Thanks in advance



Working...
X