NetTalk Central

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

michelis

  • Hero Member
  • *****
  • Posts: 1192
    • 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

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 483
    • 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 »
NetTalk 10.15
String Theory 2.70
X-Files 2.95
Clarion 10.12799
Insight 2  2.27
Draw 4.15
Cryptonite 1.87
File Explorer 5.61
WinEvent  5.15
FM3   5.32
GPF Reporter 2.35
Hyperactive 2.13
jFiles 1.57
MessageBox  2.39
Windows 10 64bit
Browser:  Firefox 57.0.4

bshields

  • Sr. Member
  • ****
  • Posts: 272
    • 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

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 483
    • 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
NetTalk 10.15
String Theory 2.70
X-Files 2.95
Clarion 10.12799
Insight 2  2.27
Draw 4.15
Cryptonite 1.87
File Explorer 5.61
WinEvent  5.15
FM3   5.32
GPF Reporter 2.35
Hyperactive 2.13
jFiles 1.57
MessageBox  2.39
Windows 10 64bit
Browser:  Firefox 57.0.4

michelis

  • Hero Member
  • *****
  • Posts: 1192
    • 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