NAV TechDays keeps getting better and better and better every year. So this year, my bro and I had to prepare a few special surprises in stock for you. And following all the buzz this has generated on Twitter and in the conference app was just amazing, and now we have to think of what can we do the next year to top this one. But let’s keep the next year to the next year, let me do something that a lot of you asked about: The Muppet Show “theme” for Microsoft Dynamics NAV 2018. In short, this thing: First of all – just a little disclaimer: I do not absolutely endorse doing what I did in any of the customer scenarios. If you ever choose to use this or anything similar, don’t come back to me and my blog asking for help.
Well, not that anything can go seriously wrong, but you should generally not be doing the exact trick I did in anything but the safety of your local VM (or Docker container, just to keep Waldo happy). Anyway, what did I do? To be quite honest with you, I cheated. The stuff that you saw yesterday is not something you can fully achieve with a control add-in.
Okay, it’s not that bad either, you can achieve most of this using a control add-in. Let’s put it that way, if I wanted to start the demo from the screen that you see in the screenshot above, it would have all looked exactly as you saw it, and it can be done fully and without exceptions without any cheating at all. The only problem with the no-cheat approach is twofold: you wouldn’t get the splash screen (and I absolutely wanted that splash screen!) and you would first see the standard NAV “theme” which would then suddenly flash-change into the muppet-“inspired” one (and I absolutely didn’t want that either, at least not for the demo). That said, I must also put one big fat disclaimer here and say that what I did is something that I wouldn’t normally be blogging about, because it’s a very cheap piece of trickery.
Submit a font Tools. Custom preview. Size Muppets € by blasph. In Fancy > Cartoon 20,853. Muppets € by blasph. In Fancy > Cartoon 20,853 downloads (10 yesterday) 3 comments Free for personal use. First seen on DaFont: September 12, 2016. Submit a font Tools. Custom preview. Muppets € by blasph. In Fancy > Cartoon 20,853 downloads (10 yesterday) 3 comments Free for personal use. First seen on DaFont: September 12, 2016.
But since you all were so excited and wanted to know how I did it, and obviously want to try the same madness at your own premises, I decided to release this as-is. Keep in mind that I, in my right mind, and in my full professional responsibility, I would never ever do something like this for real – this was just for fun. That’s also why I am not putting this on my Github account – I don’t want to put something like this as publicly as Github goes, it’s simply a piece of disgrace that had one purpose alone: to make you all go “wow” and to transition from a somewhat dry architectural session intro into the topic of JavaScript by showing you something effective, some smoke-and-mirrors special effects designed to impress you and nothing all. That said, how the heck did I do it (I still hear the question). The NAV web client is an ASP.NET application, and the files that the UI is built from are available in plain text in your IIS installation. It only takes a little sniffing around the web client folder, a little knowledge of ASP.NET Razor, and then all of the CSS/JavaScript trickery to actually own the UI. So, step 1 for me was to find the place where to inject my stuff.
It was simple, and for that I only had to “hack” one single file: _CommonHeaders.cshtml in the Views/Shared subfolder. I didn’t do much to it, I injected a Google font that I found crazy enough but still legible, a simple script that I’ll explain, and a small stylesheet block that hijacks the splash screen, colors, fonts, and adds some minor visual effects. Obviously, I also had to add a few images to the resources folder, to supplant (not replace – nothing of what I did is actually destructive in any way!) the original icons and graphics. I also made very minor changes to nine stylesheets, but again nothing destructive, it’s all easy to get out of it.
The most important part is the JavaScript file I injected through the _CommonHeaders.cshtml. That file inserts a mutation observer that detects the changes in DOM and then replaces whatever Microsoft believed belonged in the UI with the stuff I believed should be there instead.
Program pelacak no handphone karyawan. Again, it’s not destructive, it’s mostly just adding some styles. One more disclaimer – it’s not optimized at all.