Jump to content

Display floating button only in the result tab


robinhodemorais

Recommended Posts

I am creating a floating button in a TUnimForm, but I would like it to show results only ... so apply the code without the tabpanel extension, when you focus on showing, but showing yourself on another one ... how to do to adjust this?

I used this example found here on the forum to create a button

1. UniServerModule -> CustomCSS:

#back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 9999;
    width: 32px;
    height: 32px;
    text-align: center;
    line-height: 30px;
    background: #f5f5f5;
    color: #444;
    cursor: pointer;
    border: 0;
    border-radius: 2px;
    text-decoration: none;
    transition: opacity 0.2s ease-out;
    opacity: 0;
}
#back-to-top:hover {
    background: #af286d;
    color: white;
}
#back-to-top.show {
    opacity: 1;
}

2. MainmForm -> ClientEvents -> ExtEvents -> window.painted fn:

function window.painted(sender, eOpts)
{
    var me = this;
    var aTopEl = new Ext.Element(document.createElement('a'));
    aTopEl.setId("back-to-top");
    aTopEl.setHtml("+");
    aTopEl.dom.title = "Back to top";
    document.body.appendChild(aTopEl.dom);
    $('#back-to-top').addClass('show');
    $('#back-to-top').show();

    $('#back-to-top').on('click', function(e) {
        e.preventDefault();
        //ajaxRequest(me, ...)
        alert('Your custom logic...')
    });
}
Link to comment
Share on other sites

48 minutes ago, robinhodemorais said:

I am creating a floating button in a TUnimForm, but I would like it to show results only ... so apply the code without the tabpanel extension, when you focus on showing, but showing yourself on another one ... how to do to adjust this?

I used this example found here on the forum to create a button

Sorry, can you please explain in more detail what you wanted?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...