silly question. I'm trying to improve the UI for setting the config parameters for

silly question. I’m trying to improve the UI for setting the config parameters for grbl. what is the best way to load external jqueryUI widgets and related css (unrelated to any cp widget)?

thanks.

You just pull them in via the require.js stuff at the top of your code. For CSS you place it in your HTML file.

If you look at the serial port console widget, as an example, it loads a few jqueryui elements. You could mimic this.

// Load additional files via Chilipeppr’s require.js
requirejs.config({
paths: {
jqueryui: ‘//http://i2dcui.appspot.com/js/jquery-ui-1.10.4/ui/jquery.ui.core’,
jqueryuiWidget: ‘//http://i2dcui.appspot.com/js/jquery-ui-1.10.4/ui/jquery.ui.widget’,
jqueryuiMouse: ‘//http://i2dcui.appspot.com/js/jquery-ui-1.10.4/ui/jquery.ui.mouse’,
jqueryuiResizeable: ‘//http://i2dcui.appspot.com/js/jquery-ui-1.10.4/ui/jquery.ui.resizable’,
},
shim: {
jqueryuiWidget: [‘jqueryui’],
jqueryuiMouse: [‘jqueryuiWidget’],
jqueryuiResizeable: [‘jqueryuiMouse’]
}
});

And then make sure you define it as a dependency in the cpdefine()

cpdefine(“inline:com-chilipeppr-widget-spconsole”, [“chilipeppr_ready”, “jquerycookie”, ‘jqueryuiResizeable’], function() {

Brilliant. I was about to go learn the http://require.js interface. I use a home rolled resource queueing system for my sites.