[GeoNetwork-devel] [GeoNetwork opensource Developer website] #1203: Widget - Customised OtherAction menu and Metadata menu

#1203: Widget - Customised OtherAction menu and Metadata menu
---------------------+------------------------------------------------------
Reporter: fgravin | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.9.0
Component: General | Version: v2.8.0RC2
Keywords: |
---------------------+------------------------------------------------------
Give possibility to add customised actions in otherAction menu
(MetadataResultsToolbar) and MetadataMenu (MetadataResultsView).

* otherActionMenu

Pass customOtherActions attribute to the GeoNetwork.MetadataResultsToolbar
as a Menu.Item type (array of actions, action, etc..)

Exemple :

{{{
         var extractAction = new Ext.Action({
             text: 'Extract Data',
             handler: extractMetadata
         });

         var visuAction = new Ext.Action({
             text: 'Visualize data',
             handler: extractMetadata
         });

         tBar = new GeoNetwork.MetadataResultsToolbar({
             catalogue: catalogue,
             searchFormCmp: Ext.getCmp('searchForm'),
             sortByCmp: Ext.getCmp('E_sortBy'),
             metadataResultsView: metadataResultsView,
             permalinkProvider: permalinkProvider,
             customOtherActions: [extractAction,visuAction]
         });
}}}

* MetadataMenu

   * Add custom Action

Pass addCustomAction parameter as a function to the
GeoNetwork.MetadataResultsView. This function will be called on
MetadataMenu init method.

Exemple :

{{{
             addCustomAction: function() {
                 var id = this.record.get('id');

                 var extractAction = new Ext.Action({
                     text: 'Extract Data',
                     handler: function() {
                         extractMetadata(id);
                     }
                 });
                 var visuAction = new Ext.Action({
                     text: 'Visualize data',
                     handler: function() {
                         extractMetadata(id);
                     }
                 });
                 this.insert(0,visuAction);
                 this.insert(0,extractAction);
             }
}}}

   * Completly change configuration

If you want to completly change the MetadaMenu configuration (remove
component, change order, add submenus etc..), you can override
composeMenu() method of GeoNetwork.MetadataMenu

{{{
             this.contextMenu = new GeoNetwork.MetadataMenu({
                 floating: true,
                 catalogue: catalogue,
                 record: record,
                 resultsView: dv,
                 composeMenu: function(){
                     this.add(this.editAction);
                     this.add(this.deleteAction);
                     this.add(this.duplicateAction);
                     this.add(this.adminAction);
                     this.add(this.categoryAction);
                     this.add(this.createChildAction);
                     this.add(this.statusAction);
                     this.add(this.versioningAction);

                 }
             });
}}}

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1203&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.

#1203: Widget - Customised OtherAction menu and Metadata menu
--------------------------+-------------------------------------------------
  Reporter: fgravin | Owner: geonetwork-devel@…
      Type: enhancement | Status: closed
  Priority: major | Milestone: v2.9.0
Component: General | Version: v2.8.0RC2
Resolution: fixed | Keywords:
--------------------------+-------------------------------------------------
Changes (by fgravin):

  * status: new => closed
  * type: defect => enhancement
  * resolution: => fixed

Comment:

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

merged

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1203#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.

#1203: Widget - Customised OtherAction menu and Metadata menu
--------------------------+-------------------------------------------------
  Reporter: fgravin | Owner: geonetwork-devel@…
      Type: enhancement | Status: closed
  Priority: major | Milestone: v2.9.0
Component: General | Version: v2.8.0RC2
Resolution: fixed | Keywords:
--------------------------+-------------------------------------------------

Comment(by ianwallen):

Fixed in master commit commit 616039ee8bb50b646a663b7841d905621dc98df7

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1203#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.