Select to view content in your preferred language

Popup Widget - Disable Export Tools

852
7
Jump to solution
11-14-2017 04:06 AM
RodWoodfordOld
Frequent Contributor

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

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

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

Thank you very much for the prompt service Robert.

cheers

Rod

0 Kudos