[GeoNetwork-devel] Changing editor window view mode behaviour at record creation - GN v2.10.2 HTML5UI

Hi,

When creating a new metadata record via the new metadata link on the Admin
page the Editor window opens in the view mode of the last viewed metadata
record.

I would like to change this behaviour to default the view mode to, for
example, the defaultEditMode.

Note editing an existing record works fine i.e. window opens in the
defaultEditMode.

Any help or tips would be much appreciated.

Kind regards

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Changing-editor-window-view-mode-behaviour-at-record-creation-GN-v2-10-2-HTML5UI-tp5143028.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

Hi Shireeb

I have done this for a project, but required some Java changes. It uses the default view configured in the System Settings:

See the commit in the repository: https://github.com/MichaelOstling/geonetwork-MG/commit/7f5d2ae4a504f719549672cf549725db6825d39f

Regards,
Jose García

···

On Thu, May 29, 2014 at 4:36 AM, shireeb <s.brockie@anonymised.com> wrote:

Hi,

When creating a new metadata record via the new metadata link on the Admin
page the Editor window opens in the view mode of the last viewed metadata
record.

I would like to change this behaviour to default the view mode to, for
example, the defaultEditMode.

Note editing an existing record works fine i.e. window opens in the
defaultEditMode.

Any help or tips would be much appreciated.

Kind regards


View this message in context: http://osgeo-org.1560.x6.nabble.com/Changing-editor-window-view-mode-behaviour-at-record-creation-GN-v2-10-2-HTML5UI-tp5143028.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.


Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet


GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork


GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on GeoServer and GeoNetwork. Visit http://geocat.net for details.


Jose García
GeoCat bv
Veenderweg 13
6721 WD Bennekom
The Netherlands
http://GeoCat.net

Thanks Jose.

Unfortunately I couldn't access the link to view the commit.

I dug around and found the below, is it the change you mean?

https://github.com/geonetwork/core-geonetwork/commit/0e747eb814f5519bff120810b8cbac66c2de9e36
<https://github.com/geonetwork/core-geonetwork/commit/0e747eb814f5519bff120810b8cbac66c2de9e36&gt;

Kind regards

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Changing-editor-window-view-mode-behaviour-at-record-creation-GN-v2-10-2-HTML5UI-tp5143028p5143172.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

Hi

Apologies I miss it’s a private repository,

The change is the highlighted text in the file web/src/main/java/org/fao/geonet/services/metadata/Create.java

Element response = new Element(Jeeves.Elem.RESPONSE);

response.addContent(new Element(Geonet.Elem.JUSTCREATED).setText(“true”));

// Change the metadata editor to the default view

response.addContent(

new Element(Params.CURRTAB).setText(gc.getSettingManager().getValue(“system/metadata/defaultView”)));

response.addContent(new Element(Geonet.Elem.ID).setText(newId));

return response;

Regards,
Jose García

···

On Fri, May 30, 2014 at 2:52 AM, shireeb <s.brockie@anonymised.com> wrote:

Thanks Jose.

Unfortunately I couldn’t access the link to view the commit.

I dug around and found the below, is it the change you mean?

https://github.com/geonetwork/core-geonetwork/commit/0e747eb814f5519bff120810b8cbac66c2de9e36
<https://github.com/geonetwork/core-geonetwork/commit/0e747eb814f5519bff120810b8cbac66c2de9e36>

Kind regards


View this message in context: http://osgeo-org.1560.x6.nabble.com/Changing-editor-window-view-mode-behaviour-at-record-creation-GN-v2-10-2-HTML5UI-tp5143028p5143172.html

Sent from the GeoNetwork developer mailing list archive at Nabble.com.


Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet


GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork


GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on GeoServer and GeoNetwork. Visit http://geocat.net for details.


Jose García
GeoCat bv
Veenderweg 13
6721 WD Bennekom
The Netherlands
http://GeoCat.net