0

好的,所以我花了几个小时梳理这段代码,但仍然找不到这个错误是从哪里产生的。Firefox 控制台向我显示的错误是在第 5 列的第 7 行找到了这个丢失的冒号。有人可以帮帮一个女孩吗?先感谢您。

Ext.Loader.setConfig({
enabled: true
});

Ext.application( {
controllers: [ "Links" ],
    Ext.ux.grid.RowExpander: function() {
        var expanderVariableScopes = new Ext.ux.grid.RowExpander({
                tpl: new Ext.XTemplate(
'<p><span class="boldText" style="text-decoration: underline;">Form Scope</span><ul style="padding:0 0 0 5px;">',
'<tpl for="form_scope"><li><span class="boldText">{key}:</span> {value}</li></tpl>',
'</ul></p><br />',
'<p><span class="boldText" style="text-decoration: underline;">URL Scope</span><ul style="padding:0 0 0 5px;">',
'<tpl for="url_scope"><li><span class="boldText">{key}:</span> {value}</li></tpl>',
'</ul></p>'
                )
 }),
paginator: new YAHOO.widget.Paginator({
     containers: [ 'sessionPaginator' ],
     initialPage: $('#session-initial-page').val(),
     rowsPerPage: $('#session-rows-per-page').val(),
     totalRecords: $('#session-total-records').val()
});
storeAccessLog: new Ext.data.Store({
    baseParams: { limit: 25, method: 'account_session_access_log' },
    proxy: new Ext.data.HttpProxy({
        disableCaching: true,
        method: "GET",
        url: "ajax/account.cfc"
    }),
    reader: new Ext.data.JsonReader({
        root: "DATA",
        totalProperty: "META.totalRecords",
        fields: [ 'log_id', 'cdate', 'session_id', 'request_type', 'filename', 'user_agent', 'form_scope', 'url_scope', 'account_id', 'accountholder' ]
    }),
    remoteSort: true,
    sortInfo: {
        field: 'cdate',
        direction: 'DESC'
    }
}),
storeAuditEntries: new Ext.data.Store({
    baseParams: { method: 'session_audit_entries' },
    proxy: new Ext.data.HttpProxy({
        disableCaching: true,
        method: "GET",
        url: "ajax/account.cfc"
    }),
    reader: new Ext.data.JsonReader({
        root: "DATA",
        totalProperty: "META.totalRecords",
        fields: [ 'AUDIT_TEXT', 'AUDIT_DATETIME' ]
    })
}),

$(window).resize(function() {
oWindow.center();   
});

 paginator.subscribe("changeRequest", function (newState) {
            window.location.href = "accounts-view-activity.cfm?#request.qString#&sort=#url.sort#&dir=#url.dir#&initialPage=" + newState.page;
        });

paginator.render();

$('.detailslink')
.button({
    icons: { primary: 'ui-icon-plusthick' },
    text: false
 })
.click(function (e) {
    var $this = $(this);

    storeAccessLog.extraParams("session_id", $this.val());
    storeAccessLog.load({ params: { start: 0 } });

    storeAuditEntries.extraParams("session_id", $this.val());
    storeAuditEntries.load();

    oWindow.show()
});

$('#accountForm').submit(function(e) {
    e.preventDefault();
});
name: "SPOT"
}); 
4

1 回答 1

0

问题是您=在应该使用运算符的地方使用:运算符。

当您按照上面的方式定义对象时,预期的语法是:

var obj = {
    prop1: value1,
    prop2: value2
    ...
};

在你的情况下,

Ext.ux.grid.RowExpander = function() {应该改为Ext.ux.grid.RowExpander: function() {

paginator = new YAHOO.widget.Paginator({应该改为paginator: new YAHOO.widget.Paginator({

等等..

于 2013-04-24T15:12:42.017 回答