[GeoNetwork-devel] [GeoNetwork opensource Developer website] #1041: Pressing <Enter> key instead [Search] button sends only Simple Search request.

#1041: Pressing <Enter> key instead [Search] button sends only Simple Search
request.
----------------------------------------------------------------------+-----
Reporter: vsinceac | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: minor | Milestone: v2.9.0
Component: User interface (web) | Version: v2.8.0RC0
Keywords: search button, enter key, simple search, advanced search |
----------------------------------------------------------------------+-----
Hi,

When in Advanced Search mode (with more parameters than available in
Simple Search), pressing the <Enter> key instead the [Search] button sends
a Simple Search request.

Example: In Advanced Search mode, the [Search] button generates the
correct request:

http://localhost:8080/geonetwork/srv/eng/main.search.embedded?or=&phrase=&all=&without=&title=&abstract=&themekey=synop&similarity=.2&northBL=38.4720&westBL=60.5042&eastBL=74.9157&southBL=29.4061&relation=overlaps&region=2&radfrom=&dateFrom=&dateTo=&extFrom=&extTo=&sortBy=relevance&sortOrder=&hitsPerPage=10&output=full&siteId=&group=&template=n&category=&_status=

while the <Enter> key generates a Simple Search request:

http://localhost:8080/geonetwork/srv/eng/main.search.embedded?any=synop&dummyfield=&northBL=38.4720&westBL=60.5042&eastBL=74.9157&southBL=29.4061&relation=overlaps&region_simple=2&sortBy=relevance&sortOrder=&hitsPerPage=10&output=full

The problem is that the user, after using the <Enter> key for an Advanced
Search request, may have results, but cannot know that the request was in
Simple Search mode...

I found this in GN 2.6.4 but also in 2.9

Thanks, Victor

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1041&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#1041: Pressing <Enter> key instead [Search] button sends only Simple Search
request.
----------------------------------------------------------------------+-----
Reporter: vsinceac | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0 RC1
Component: User interface (web) | Version: v2.8.0RC0
Keywords: search button, enter key, simple search, advanced search |
----------------------------------------------------------------------+-----
Changes (by vsinceac):

  * priority: minor => major
  * milestone: v2.9.0 => v2.8.0 RC1

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1041#comment:1&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#1041: Pressing <Enter> key instead [Search] button sends only Simple Search
request.
----------------------------------------------------------------------+-----
Reporter: vsinceac | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0 RC2
Component: User interface (web) | Version: v2.8.0RC0
Keywords: search button, enter key, simple search, advanced search |
----------------------------------------------------------------------+-----
Changes (by ianwallen):

  * milestone: v2.8.0 RC1 => v2.8.0 RC2

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1041#comment:2&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#1041: Pressing <Enter> key instead [Search] button sends only Simple Search
request.
----------------------------------------------------------------------+-----
Reporter: vsinceac | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0
Component: User interface (web) | Version: v2.8.0RC0
Keywords: search button, enter key, simple search, advanced search |
----------------------------------------------------------------------+-----
Changes (by ianwallen):

  * milestone: v2.8.0 RC2 => v2.8.0

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1041#comment:3&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

I have the same problem.
Tested with Geonetwork 2.8.0. (old GUI) on Jetty. My server and client
machine is the same: Windows 8 64bit. Tested with 3 browsers: Chrome
28.0.1500.72 m, Firefox 21.0 and IE10.

I see that it has been solved in Geonetwork 2.10 by not doing the search at
all when pressing the Enter key in advanced search. It would fit me also.
I tried to find out how it was done in 2.10, but could not find the fix.
I tried:
- comparing the diffs of 2.8 vs 2.10,
- searching the GN users&dev lists and trac
- and looking at the commit histories of most probable files where this fix
should hide itself:
      - web/src/main/webapp/scripts/gn_search.js,
      - web/src/main/webapp/xsl/main-page.xsl,
      - web/src/main/webapp/xsl/searchform_advanced.xsl

It is hard to find since I probably do not know which file contains the
change I need. I also tried to search 'Ext.EventObject.ENTER' from every
project file since GN is using ExtJS and maybe this was the way it was done.

Can anyone help in finding this change in 2.10? Or recommend its own fix?

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoNetwork-opensource-Developer-website-1041-Pressing-Enter-key-instead-Search-button-sends-only-Sim-tp5000720p5070026.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

I found that the enter key seems to be handled in
web/src/main/webapp/xsl/header.xsl, but the code is the same in 2.8 and
2.10.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoNetwork-opensource-Developer-website-1041-Pressing-Enter-key-instead-Search-button-sends-only-Sim-tp5000720p5070036.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

Fixed the problem. Just changed how the cookie value is read in the JS code
that is in the web/src/main/webapp/xsl/header.xsl file.

Ill try to do a pull request in the near future.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoNetwork-opensource-Developer-website-1041-Pressing-Enter-key-instead-Search-button-sends-only-Sim-tp5000720p5070052.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

https://github.com/geonetwork/core-geonetwork/pull/227

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoNetwork-opensource-Developer-website-1041-Pressing-Enter-key-instead-Search-button-sends-only-Sim-tp5000720p5072267.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

#1041: Pressing <Enter> key instead [Search] button sends only Simple Search
request.
-----------------------------------+----------------------------------------
  Reporter: vsinceac | Owner: geonetwork-devel@…
      Type: defect | Status: closed
  Priority: major | Milestone: v2.8.0
Component: User interface (web) | Version: v2.8.0RC0
Resolution: fixed | Keywords: search button, enter key, simple search, advanced search
-----------------------------------+----------------------------------------
Changes (by kristjanr):

  * status: new => closed
  * resolution: => fixed

Comment:

https://github.com/geonetwork/core-geonetwork/pull/227

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1041#comment:4&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.