Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
Description
It would be nice if you could support loading resources from a CDN. Google hosts everything
at theirs for example.
def resources = { attrs ->
def theme = attrs.theme ?: 'ui-lightness'
def plugin = pluginManager.getGrailsPlugin('jquery-ui')
def jqver = plugin.instance.JQUERYUI_VERSION
// If a plugin is using THIS plugin, if they change theme they need to be able
// to specify their plugin name so we can load the theme!
def plug = attrs.theme ? attrs.plugin : 'jqueryUi'
if(attrs?.useGoogleCDN.equals("true")) {
out << """<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/$
out << """<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/${jqver}
/jquery-ui.min.js"></script>"""
} else
}