gpt4 book ai didi

jquery-ui - Grails 使用资源插件将参数传递给模块

转载 作者:行者123 更新时间:2023-12-02 14:37:54 24 4
gpt4 key购买 nike

我正在使用 Grails 1.3.7,我想同时使用资源插件和 jquery ui,当我想切换到不同的 jquery ui 主题时,问题就来了。我不能给出主题论点。

我使用这个标签:

<r:use module="jquery" />
<r:use module="jquery-ui" theme="smoothness" />

但不起作用,也尝试了 themeCSS 属性但没有效果。

谢谢。

最佳答案

您可以在自己的本地资源定义中覆盖默认的 jquery-theme 资源(如/conf/AppResources.groovy)。为此,请添加覆盖部分,例如:

modules = {
...
overrides {
// this overrides the default ui-lightness theme from jquery-ui plugin
'jquery-theme' {
resource id:'theme', url:'/css/themes/my-theme/jquery-ui.custom.css', attrs: [media: 'screen, projection']
}
}
...
}

相应地调整 url 以指向从 ThemeRoller 下载的主题 css。然后只需使用
<r:require module="jquery-ui" />

jquery-ui 模块依赖于 jquery-theme 并将根据您的覆盖定义拉取它。

关于jquery-ui - Grails 使用资源插件将参数传递给模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6214616/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com