Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery ui Grails使用资源插件将参数传递给模块_Jquery Ui_Plugins_Grails_Resources_Arguments - Fatal编程技术网

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

Jquery ui Grails使用资源插件将参数传递给模块,jquery-ui,plugins,grails,resources,arguments,Jquery Ui,Plugins,Grails,Resources,Arguments,我使用的是Grails1.3.7,我想同时使用resources插件和jQueryUI,当我想切换到不同的jQueryUI主题时,问题就来了。我不能给出主题论点 我使用这个标签: <r:use module="jquery" /> <r:use module="jquery-ui" theme="smoothness" /> 但不起作用,也尝试了使用themeCSS属性,但没有效果 谢谢。我不知道为什么这个插件这么难,但是无论如何,如果你想更改主题,你需要指定(在h

我使用的是Grails1.3.7,我想同时使用resources插件和jQueryUI,当我想切换到不同的jQueryUI主题时,问题就来了。我不能给出主题论点

我使用这个标签:

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

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


谢谢。

我不知道为什么这个插件这么难,但是无论如何,如果你想更改主题,你需要指定(在head标签内):



然后,您需要将模板文件(css文件和图像文件夹)放入应用程序css文件夹(web app/css)。这应该可以工作

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

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主题,并将根据您覆盖的定义来拉取它

<r:require module="jquery-ui" />