its a shame that the system can't iterate through all supported types etc and generate the icons automatically or have it included in the JSON, seems a lot of duplicated work to set them up again in SmartUI
If icons were shared between Classic UI and Smart UI, a common icon registry would be feasible. However, Smart UI includes different icons by design. And their count and assignments may not match the count of icons in Classic UI. You need to create two icons and register each of them separately only as long as you need to support both Classic UI and Smart UI.
Adding a new icon means modifying four files in a Smart UI project generated by generator-csui-extension. (Adding N icons means modifying N + 3 files.) N x SVG, CSS, JS and JSON. I attached examples how to add an icon for a new document type (MIME type) and for a new node type (subtype).
Pasting text to this forum breaks line breaks and styling and the upload file button does not work...
@Ferdinand Prantl tried your snippets, and the ones from the PPT with the SDK and keep getting the same error - "Uncaught ReferenceError: define is not defined" about the icons.js file :(
@Greg Griffiths, the snippets were meant to be inserted to files in a Smart UI project. You need to build the Smart UI project and deploy the built output to CS. Not to copy the source files to /support.
The error means that you called a "define" function, but there is no "define" available in the browser. When you build a Smart UI project, the output bundles will contain calls to "csui.define", which is provided by Smart UI core.
I added them to the sample smartui widget that you can install, no other changes made (CS and SmartUI SDK 16.2.11)
The SDK does not contain anything ready to install on CS. If you generate a sample project with the Hello widget, you will need to build it and deploy the result.
Before deploying on the CS, Smart UI projects are supposed to be developed and tested in the development environment, which is the Smart UI project root. When the widget or the customisation works there, it is time to build the release output and deploy it on the server for a final test. Constant building and deploying on CS to test each bugfix would waste too much time.
I had tested the Sample widget in the dev environment and it worked, my plan was to include the support for the Contact Folder subtype into the project so that it could be picked up by the system.
Update, if I add a mapping in bundles\greet-all.js the JS error disappears in the console - still not working as its complaining about a missing icon.map.js from WebReports still, so will look at that next.
Patched up to date on the CS side and it now works :)