Jump to content

Custom Component / ServerModule (css/js)


CastleSoft

Recommended Posts

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

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...