UIXv1 Dashboards - Can I seperate the js and css from the dashboard html file?

Hello,

the subject is the full question. Can I seperate the js and css from the html file? If so, how?

I've been trying to do this in UIXv1 for some time now. I've read that UIXv2 supports this and you should be able to have css and js seperately, but for UIXv1, no matter what I do, it just refuses to see the files. Do I need to specify something in the appdef.xml file? Maybe it's impossible to do in v1?

Thanks.
Dominik

Parents Reply Children
  • Hello, thank you for the good idea. I tried to put my app on classic web, but I stumbled upon some weird issue where when I had the application in sysapps folder, it worked "fine" (meaning the application does not work, like I described above in this post), but then after installing it on server it did not work at all. It was a white page - the dashboard got opened via shellui, but no HTML was displayed. I updated the appdef.xml with <platform>Web</platform>, so not sure what I did wrong. Didn't have much time to search for some solution either.

    Also when I wanted to solve this problem I described now, I didn't really know where to look in the F12 on MFiles web, since there are so many things happening there with metadata and other things that I was confused as to what was for my application and what was some other data.

  • You need to remove / rename the sysapps folder when working with the web client otherwise later desktop client will be confused to find two instances of the same app GUID.

    If your HTML is displayed as dashboard that's already great.

    If your CSS seem to have no effect: double check that your CSS file is correctly included in the mfappx file (including path). Then also check CSS itself for correctness.

    In the browser devtools you should look at the Elements tab. A listing dashboard will run in an IFRAME. You can click on elements on the actual page and then have them highlighted and also see applied CSS styles/rules in the Styles sub-tab of the Elements tab. That's a great tool to debug CSS issues. You should get familiar with the devtools otherwise you'll have a difficult time developing a web app.