robinhodemorais Posted February 12, 2020 Share Posted February 12, 2020 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...') }); } Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 12, 2020 Share Posted February 12, 2020 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? Quote Link to comment Share on other sites More sharing options...
robinhodemorais Posted February 12, 2020 Author Share Posted February 12, 2020 I managed to do it using this command Quote UniSession.AddJS ('document.getElementById ("back-to-top"). Style.visibility = "hidden";'); UniSession.AddJS ('document.getElementById ("prox-to-top"). Style.visibility = "hidden";'); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.