CastleSoft Posted October 11, 2016 Share Posted October 11, 2016 Hi All, What would be the best method for a custom UniGUI control which uses additional CSS and JS files ? My initial thought was: 1x UniComponentCore which is dropped onto the ServerModule (adding css/js and initialising as required) 1x UniComponent dropped into a form which requires the UniComponentCore to be work. (Maybe even a dialog box to warn if no ComponentCore is found in the ServerModule). This way any additional CSS/JS is only added once. No need to check/manage css/js. It also free's the new UniComponent to assume configuration is ok (not worrying about CSS/JS) provided the ComponentCore is in the ServerModule. Or is there a cleaner way ? There are a number of additional components I would like to write/wrap with extra css/js and would like the preferred method before I start. Thanks Andrew Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 11, 2016 Share Posted October 11, 2016 Hi, "Also, you can add your JS/CSS files in your module's initialization section.." Look at the demo: ...\FMSoft\Framework\uniGUI\Demos\Desktop\CustomControl-3 Best regards. Quote Link to comment Share on other sites More sharing options...
CastleSoft Posted October 11, 2016 Author Share Posted October 11, 2016 Thanks.. A quick question regarding behaviour of the CustomControl3 example. If I place 10x uniCustomControl3's onto a form. I'm assuming each controls initialisation will be called, resulting in calling UniAddJSLibrary 10 times ? Does the AddJSLibrary routine check if the library already exists ? And not add duplicates ? Thanks Andrew Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.