Grails jQuery图标没有出现

时间:2015-06-03 01:44:26

标签: jquery grails

application.css

*= require main
*= require mobile
*= require_self
*= require bootstrap
*= require themes/ui-lightness/jquery-ui-1.10.4.custom
*= require_tree .

的application.js

//= require jquery
//= require js/jquery-ui-1.10.4.custom
//= require_tree .
//= require_self
//= require bootstrap

if (typeof jQuery !== 'undefined') {
    (function($) {
        $('#spinner').ajaxStart(function() {
            $(this).fadeIn();
        }).ajaxStop(function() {
            $(this).fadeOut();
        });
    })(jQuery);
}

BuildConfig.groovy

// plugins for the compile step
compile ":scaffolding:2.1.2"
compile ':cache:1.1.8'
compile ":asset-pipeline:1.9.9"
compile ":spring-security-core:2.0-RC4"
compile ":spring-security-ui:1.0-RC2"
compile ":mail:1.0.7"
compile ":jquery-ui:1.10.4"
compile ":famfamfam:1.0.1"


// plugins needed at runtime but not for compilation
runtime ":hibernate4:4.3.6.1" // or ":hibernate:3.6.10.18"
runtime ":database-migration:1.4.0"
runtime ":jquery:1.11.1"
runtime ':twitter-bootstrap:3.3.1'

在gsp中

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="layout" content="main" />
<title>Appointments </title>
<g:javascript>
    $(function() {
        $("#dialog").dialog({
            autoOpen: true,
            modal: true,
            draggable: false,
            resizable: false,
            hide: "puff",
            show: "slide",
            height: 200,
            width: 425,
            buttons: {
                OK: function() {$(this).dialog("close");}
            },
            position: {
                my: "center",
                at: "center"
            }
        });
    });            
</g:javascript>
<style>
    .ui-widget-header, .ui-state-default, ui-button {
        background: #FFE6E6;
        border: 1px solid #FFFFFF;
        color: #000000;
        font-weight:bold;
    }
</style>

以及.gsp

<g:if test="${flash.message}">
    <div id="dialog" title="&nbsp;&nbsp;&nbsp;Success!!!&nbsp;&nbsp;&nbsp;">
        <p>${flash.message}</p>
    </div>     
</g:if>

图标是&#34; x&#34;不会出现右上角对话框关闭按钮中的内容。

1 个答案:

答案 0 :(得分:0)

所以我想出了我必须添加到我的gsp&#39; s弹出对话框的标签

<jqui: resources />

我现在正在获取图标。