Select to view content in your preferred language

Open 2 widget in the viewer (CartelTheme)

1080
7
06-13-2019 12:25 PM
Autoridad_Nacional_del_AguaANA
New Contributor II

I am currently using the theme of CARTEL.
The CARTEL theme only opens one widget at a time.

I want to open two or more widgets in the viewer?

Open 2 widget in the viewer (Theme CARTEL)

Atte: HDRamosMendoza

H. Daniel Ramos Mendoza

0 Kudos
7 Replies
RobertScheitlin__GISP
MVP Emeritus

I have never heard of the cartel theme?...

0 Kudos
Autoridad_Nacional_del_AguaANA
New Contributor II

0 Kudos
Autoridad_Nacional_del_AguaANA
New Contributor II

I want to keep two widget open at the same time

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

OK,   The name Cartel theme locale (Columbia) specific, it is The Billboard theme in the US. That was throwing me off. So by default the Billboard theme does not support opening two on screen widgets at the same time so you have to modify the code to make this happen.

 In the jimu\onScreenWidgetIcon.js find the switchToOpen method and comment out line 4 as shown below.

    switchToOpen: function(){
      this.state = 'opened';

      //this.panelManager.closeAllPanelsInGroup(this.widgetConfig.gid);
      array.forEach(this.widgetManager.getOnScreenOffPanelWidgets(), function(widget){
        if(widget.closeable){
          this.widgetManager.closeWidget(widget);
        }
      }, this);

      html.addClass(this.domNode, 'jimu-state-selected');
      this._showLoading();
...
GeorgeKatsambas
Occasional Contributor III

Robert Does this apply to the Foldable Theme as well? 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

It does

RobertScheitlin__GISP
MVP Emeritus

Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.

0 Kudos