Announcement

Collapse
No announcement yet.

custom views detail document

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

  • custom views detail document

    Dear,
    I have a custom views details for document entity. I have too two Document folder.
    I have custom button, for each type of document. I push button (right) with
    this.menu.buttons.push({

    1) I click document .. and I see 2 document folder
    2) I click one document folder and see list view of document
    3) when I click one document, I see detail view of document
    But I don't see my button, I must "refresh" the page in navigator to view the button.

    I have try the other way.., I push all button.. and then in
    afterRender: function () {
    I hide the button..
    And same behaviour.. I must "refresh" the page in navigator to hide the button.

    Is there a function I can call ? and not manually refresh the page in navigator ?

    Regards

  • #2
    Hi,
    you must refresh the page once after the modification or each time?
    Job Offers and Requests

    Find Developer
    Find Customer

    Comment


    • #3
      view.rerender() may helps sometimes
      Eymen Elkum - Ebla Soft
      ==========================
      wtsapp | 905366891649
      skype | 905366891649
      email | eymen@ebla-soft.com

      Comment


      • #4
        Hi,
        thanks for the reply,
        I must refresh the page on navigator for see my button. All time.. when I change "folder document".
        When we change document folder and then click on a document, we need to refesh page for see the button.
        Is like, the header where button are not "refresh" ..

        I have try view.rerender() or this.view.rerender(). ... but not available.
        In attachment, you can see ... first time no button, refresh on navigator and the button appears.

        HTML Code:
            setup: function () {
                Dep.prototype.setup.call(this);
                    if (this.model.get('type') == 'SepaXml' ){
                        this.addMenuItem('buttons', {
                            name: 'getSepaXml',
                            label: 'getSepaXml',
                            style: 'default',
                            action: 'getSepaXml'
                        }, true); 
                    }
                    if (this.model.get('type') == 'ContactOffice' ){
                        this.addMenuItem('buttons', {
                            name: 'getContactOfficePushResult',
                            label: 'getContactOfficePushResult',
                            style: 'default',
                            action: 'getContactOfficePushResult'
                        }, true);  
                    }
                },
            afterRender: function () {
              Dep.prototype.afterRender.call(this);
        
                    if (this.model.get('type') == 'SepaXml' ){
                        Espo.Ui.notify("SepaXml", 'info', 2000); 
                        this.$el.find('a[data-name="getContactOfficePushResult"]').addClass('disabled');
                    }
                    if (this.model.get('type') == 'ContactOffice' ){
                        Espo.Ui.notify("Contact Office", 'info', 2000); 
                        this.$el.find('a[data-name="getSepaXml"]').addClass('disabled');
                    }
                    // this.getView('header');
                    //console.log(this.getView('header').getItems());
                    //console.log(this);
                   // this.view.rerender();
            },

        Regards
        Last edited by item; 01-04-2019, 10:08 PM.

        Comment

        Working...
        X