NetTalk Central

Author Topic: Browse locator feature request  (Read 6432 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Browse locator feature request
« 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.
« Last Edit: May 19, 2018, 06:09:46 AM by michelis »
-----------
Regards
Alberto

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Browse locator wish
« Reply #1 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 ','')
« Last Edit: May 18, 2018, 01:35:48 PM by DonRidley »
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Re: Browse locator wish
« Reply #2 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

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Browse locator wish
« Reply #3 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
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Browse locator feature requet
« Reply #4 on: May 19, 2018, 06:09:09 AM »
Then... Lets change wish for feature requet.
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Browse locator feature request
« Reply #5 on: May 24, 2018, 12:48:45 AM »
do you also want an unhide button to make it visible again?

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Browse locator feature request
« Reply #6 on: May 24, 2018, 02:09:49 AM »
No, it will be displayed again when the user clicks on the column header.
Thanks
-----------
Regards
Alberto

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Browse locator feature request
« Reply #7 on: June 25, 2018, 03:37:10 AM »
Hi Bruce, may you please do this?
Thanks
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Browse locator feature request
« Reply #8 on: June 26, 2018, 12:20:49 AM »
I need to get some other things done first.