Popup Widget - Disable Export Tools

143
7
Jump to solution
11-14-2017 04:06 AM
RodWoodford
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 Esteemed Contributor

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 Esteemed Contributor

Rod,

   Are you talking about the Popup Panel Widget?

0 Kudos
RodWoodford
Occasional Contributor III

yep

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

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

RodWoodford
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 Esteemed Contributor

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

RobertScheitlin__GISP
MVP Esteemed Contributor

Version 2.6 release with this enhancement.

RodWoodford
Occasional Contributor III

Thank you very much for the prompt service Robert.

cheers

Rod

0 Kudos