Popup Widget - Disable Export Tools

559
7
Jump to solution
11-14-2017 04:06 AM
RodWoodfordOld
Occasional Contributor III

Hi Robert,

Is there functionality within the popup widget to disable the exporting of results? I'm using v2.5. Any info would be great.

cheers

Rod

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Rod,

  In the Widget.js make this change to the _initPopupMenu (lines 3-5 added):

      _initPopupMenu: function(){
        this.featureActionManager.getSupportedActions(this.selectedFeature).then(lang.hitch(this, function(actions){
          actions = array.filter(actions, function(action) {
            return action.name.indexOf('Export') !== 0 && action.name !== 'SaveToMyContent';
          });

          var popupActions = actions.filter(lang.hitch(this, function(action){
            return ['ZoomTo', 'ShowPopup', 'Flash'].indexOf(action.name) < 0 ;
          }));

View solution in original post

7 Replies
RobertScheitlin__GISP
MVP Emeritus

Rod,

   Are you talking about the Popup Panel Widget?

0 Kudos
RodWoodfordOld
Occasional Contributor III

yep

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Rod,

  In the Widget.js make this change to the _initPopupMenu (lines 3-5 added):

      _initPopupMenu: function(){
        this.featureActionManager.getSupportedActions(this.selectedFeature).then(lang.hitch(this, function(actions){
          actions = array.filter(actions, function(action) {
            return action.name.indexOf('Export') !== 0 && action.name !== 'SaveToMyContent';
          });

          var popupActions = actions.filter(lang.hitch(this, function(action){
            return ['ZoomTo', 'ShowPopup', 'Flash'].indexOf(action.name) < 0 ;
          }));
RodWoodfordOld
Occasional Contributor III

Thanks Robert, that works really well. Would it be possbile for you to include this functionality into the next release. My reasoning is, we have some datasets that can be viewed but not exported into other formats due to licensing issues.

cheers

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Absolutely I have already made a configuration setting in the widget for 2.6 version.

RobertScheitlin__GISP
MVP Emeritus

Version 2.6 release with this enhancement.

RodWoodfordOld
Occasional Contributor III

Thank you very much for the prompt service Robert.

cheers

Rod

0 Kudos