Jewelry Box Theme Closes Left Panel on Startup

2003
11
Jump to solution
10-13-2016 10:51 AM
LesiMai3
Occasional Contributor

Hi,

I was wondering what codes I need to change in the jewelry box theme so that the left panel hides when the app first starts up. 

Thank you,

Lesi

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

Lesi,

   In the themes\JewelryBoxTheme\panels\LDockablePanel\Panel.js make this change:

      onOpen: function(){
        this._setPostionWidthAndLeft();
        html.setStyle(this.domNode, {
          width: this.position.width + 'px'
        });
        this.panelManager.minimizePanel(this);
        // if(this.position.width === 0){
        //   this.panelManager.minimizePanel(this);
        // }else{
        //   this.panelManager.maximizePanel(this);
        // }
      },

View solution in original post

11 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Lesi,

   In the themes\JewelryBoxTheme\panels\LDockablePanel\Panel.js make this change:

      onOpen: function(){
        this._setPostionWidthAndLeft();
        html.setStyle(this.domNode, {
          width: this.position.width + 'px'
        });
        this.panelManager.minimizePanel(this);
        // if(this.position.width === 0){
        //   this.panelManager.minimizePanel(this);
        // }else{
        //   this.panelManager.maximizePanel(this);
        // }
      },
JacquesBrodard
New Contributor III

Hi Robert,

This little change works well, thank's

Is it possible to make a difference if it is a mobile device.

Ideally, I would like the panel to be minimized only on a mobile device ?

Jacques

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Jacques,

   Sure just check if the app is mobile using window.isMobileUa

JacquesBrodard
New Contributor III

perfect, thank you Robert

0 Kudos
JenniferSherry
New Contributor III

Hi Robert and Jacques-

Wondering if you can direct me on where to add the code to "check if the app is using window.isMobileUa"?  I too am interested in having the Jewelry Box theme panel minimized only when our app is viewed on a mobile device and visible otherwise, but I'm just not sure where/how to add in that logic for mobile size. 

Thanks!

Jennifer

0 Kudos
CarbonCounty_Utah
New Contributor III

When I try using your code above it works and closes on startup, but I cannot see the image to open it after startup when we need it. Any ideas?

CarbonCounty_Utah_0-1638985450183.png

 

0 Kudos
aishvaryvardhan
New Contributor III

Hi,
I am customizing the Ldockable panel.
I dont want any widget there I am writing customize code there..
But as I am not adding any widget , when I am launching the app the panel open/close button is not coming

on the other hand front end customizing panel , there I can see the customized code added by me

How Can I view the Ldockable panel on app launch

what code need to be customized 

any help on this will be highly appreciated

thanks

ash

0 Kudos
James_001
Occasional Contributor II

Hi Robert,

I hope you are doing great! The above code for (LDockablePanel Closes at startup) is working fine on desktop but in mobile it still open at left on startup.

Also, is it possible can we make LDockable Panel open at bottom(like other widgets opening at bottom) in mobile view instead of left since it covers all map space when it open.

Thanks,

Irfan

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Irfan,

Strange in my testing it still minimizes on mobile. As far as the moving to the bottom. No that would take a complete rewrite of the left dockable panel.

0 Kudos