LDockable panel

2337
12
Jump to solution
10-03-2016 01:34 PM
DouglasLecker
New Contributor II

Hello all,

   I am trying to use the LDockable panel functionality from the Jewelry box theme to my custom theme, but I can't figure out where to put my widget for it to register it in the config.json that one is present. The panel only shows up in the Jewelry box if you put a widget in in when you create the map. Has anyone tried to use this panel in their theme's?

Thanks for the help.

    Doug

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DanielStoelb
Occasional Contributor III

Do you have the JewelryBoxTheme copied in the themes folder of your app?

View solution in original post

0 Kudos
12 Replies
DanielStoelb
Occasional Contributor III

Doug,

I don't know if this is what you're after, but I added the left dockable panel after the zoom slider in my config JSON.  Here's an example of the code that I have displaying the legend widget within that panel:

"groups": [
      {
        "visible": false,
        "panel": {
          "uri": "themes/JewelryBoxTheme/panels/LDockablePanel/Panel",
          "position": {
            "left": 0,
            "top": 40,
            "bottom": 0,
            "width": 360,
            "relativeTo": "browser"
          }
        },
        "maxWidgets": 1,
        "id": "_19",
        "widgets": [
          {
            "name": "Legend",
            "label": "Legend",
            "version": "2.1",
            "uri": "widgets/Legend/Widget",
            "config": "configs/Legend/config_Legend.json",
            "id": "widgets_Legend_Widget"
          }
        ],
        "label": "Group_0"
      }
    ],

0 Kudos
DouglasLecker
New Contributor II

Hello Daniel,

   Yes, that is what I did, but for some reason, I keep getting an error saying I have "an unexpected character at line 1 column 1 of the JSON data". I don't see anything wrong with the config.json in my theme, so it has to be something somewhere else. Any ideas?

Thanks,

Douglas

0 Kudos
DanielStoelb
Occasional Contributor III

Sounds like it might be a missing comma, semicolon, or something else.  Can you post your code or PM me the code?

0 Kudos
DouglasLecker
New Contributor II

    Turned out that I did not have the config folder for that widget in the configs folder. That got rid of the error, but the panel still won't show up.

0 Kudos
DanielStoelb
Occasional Contributor III

Do you have the JewelryBoxTheme copied in the themes folder of your app?

0 Kudos
DouglasLecker
New Contributor II

No I don't. Why do I have to?

0 Kudos
DanielStoelb
Occasional Contributor III

Because if you don't have that directory, you wouldn't have the panels folder that houses the LDockablePanel widget files.

0 Kudos
DouglasLecker
New Contributor II

I did that and remapped the panel to the Jewelryboxtheme and the panel is showing up now. Why did that work?

0 Kudos
DanielStoelb
Occasional Contributor III

I am thinking that it was looking for the location of the widget javascript for the left dockable panel and couldn't find it.

0 Kudos