NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on May 18, 2018, 06:18:54 AM

Title: Browse locator feature request
Post by: Alberto on May 18, 2018, 06:18:54 AM
Any way to add a HIDE button to the locator for the user to gain more space if it is not used?
See image.
Title: Re: Browse locator wish
Post by: DonRidley on May 18, 2018, 01:33:50 PM
You could play around with p_web.site.Style.BrowseLocator

Also, a specific class exists for the locator:  nt-locator

You could use:

nt-locator {
  display: none;
}

to hide the locator.

You could use a custom class and hide the image with a condition.  Look under the browse's "CSS Classes" tab, "Locator Div."

Maybe

CHOOSE(loc:hide = true,' hideclass ','')
Title: Re: Browse locator wish
Post by: bshields on May 18, 2018, 08:53:33 PM
Hi,

You can add a button (but you'll have trouble getting it next to the other locator buttons, without  some serious hacking around).

But once you have the button this will hide the locator:

p_web.Script('document.getElementById("locatorclassid").style.display = "none";')

This will display the locator:

p_web.Script('document.getElementById("locatorclassid").style.display = "block";')

where:

locatorclassid looks like this (but you can confirm by inspecting the elements on your page and finding the div that wraps the locator and its buttons:

yourbrowse_locator_b_div

if you place your browsers in memory forms

yourbrowse_yourmemoryform_locator_b_div

swap the _b_ for _a_ to swap between the before and after locators.

You'll need to add a button (somewhere, i'd put it in a memoryform that is a parent of the browse, but its not going to be next to the other buttons). Plus you'd need to match Bruce's logic when he hides and shows the locator.

Bruce also has his own code that hides and shows locators:

p_web.ntBrowse(loc:divname,'hideLocator')

and

p_web.ntBrowse(loc:divname,'unhideLocator',loc:LocatorPosition)

Which you could also use.

So in short, its possible, but probably not worth the effort and could be very hacky. Better to ask Bruce for a feature request.



Regards
Bill
Title: Re: Browse locator wish
Post by: DonRidley on May 19, 2018, 04:18:28 AM
Bill brings up a good point with button.  It could be a pain in the...well you know.

How about this idea, just make the locator buttons smaller?  There is an existing NT class that do just that- nt-button-small.

I ran into the same issue as far as available space on a mobile device.  I simply selected Hide Locator Prompt in the Browse template.  That freed up enough room to display the search entry field and the buttons.

Don
Title: Re: Browse locator feature requet
Post by: Alberto on May 19, 2018, 06:09:09 AM
Then... Lets change wish for feature requet.
Title: Re: Browse locator feature request
Post by: Bruce on May 24, 2018, 12:48:45 AM
do you also want an unhide button to make it visible again?
Title: Re: Browse locator feature request
Post by: Alberto on May 24, 2018, 02:09:49 AM
No, it will be displayed again when the user clicks on the column header.
Thanks
Title: Re: Browse locator feature request
Post by: Alberto on June 25, 2018, 03:37:10 AM
Hi Bruce, may you please do this?
Thanks
Title: Re: Browse locator feature request
Post by: Bruce on June 26, 2018, 12:20:49 AM
I need to get some other things done first.