Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/405.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/69.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
Javascript extjs在chrome中正常工作,但是';不要在firefox或ie中显示任何内容_Javascript_Html_Firefox_Google Chrome_Extjs - Fatal编程技术网

Javascript extjs在chrome中正常工作,但是';不要在firefox或ie中显示任何内容

Javascript extjs在chrome中正常工作,但是';不要在firefox或ie中显示任何内容,javascript,html,firefox,google-chrome,extjs,Javascript,Html,Firefox,Google Chrome,Extjs,我已经在Chrome中正确地运行了这段代码,但在Firefox中我看不到任何更改,只有空白页面。在控制台中没有错误。所有文件都已加载。 我不是前端开发人员,我用python、ruby和java编写,也许我做错了什么? 但是 到底怎么回事?!这让我大吃一惊 在它的MVC应用程序中,我有许多级别的嵌套文件(带有组件) 模板 视口 CenterBase 我找到了答案。 需要从此控制器中删除 'items.ItemWorkers' ,'items.ItemOrganization' ,

我已经在Chrome中正确地运行了这段代码,但在Firefox中我看不到任何更改,只有空白页面。在控制台中没有错误。所有文件都已加载。 我不是前端开发人员,我用python、ruby和java编写,也许我做错了什么? 但是 到底怎么回事?!这让我大吃一惊

在它的MVC应用程序中,我有许多级别的嵌套文件(带有组件)

模板

视口

CenterBase

我找到了答案。 需要从此控制器中删除

  'items.ItemWorkers'
  ,'items.ItemOrganization'
  ,'items.ItemServices'

我不知道为什么ext不能处理子文件夹,如果代码太多的话。不要问任何事情,但这是你在FireFox中看到的DOM?您是否曾经访问过application launch()代码?
Ext.Loader.setConfig({
    enabled: true,
    disableCaching: false,
    paths: {C300App: '/static/c300app', Ext: '/static/extjs/src'}
});
Ext.require([
]);

Ext.application({
    name: 'C300',
    appFolder:'/static/c300app',
    autoCreateViewport: true,
    controllers: ['Base'],
    models: [],
    views: [
            'Viewport'
            ,'Left'
            ,'CenterBase'
            ,'Header'
            ,'Footer'
    ],
    launch: function() {
    }
});
Ext.define('C300.view.Viewport', {
    extend: 'Ext.container.Viewport',
    layout: 'border',
    requires:[
        'C300.view.Header'
        ,'C300.view.Footer'
        ,'C300.view.Left'
        ,'C300.view.CenterBase'
    ],
    initComponent: function() {
        var me = this;
        Ext.applyIf(me, {
            border:true,
            items: [
                Ext.create('C300.view.Header',{
                    region: 'north'
                }),
                Ext.create('C300.view.Left',{
                    region: 'west'
                }),
                Ext.create('C300.view.CenterBase', {
                    region: 'center'
                }),
                Ext.create('C300.view.Footer',{
                    region: 'south'
                })
            ]
        });
        this.callParent();
    }
});
Ext.define('C300.view.CenterBase', {
    extend: 'Ext.tab.Panel',
    alias: 'widget.centerBase',
    itemId: 'centerBase',

    initComponent: function() {
        Ext.applyIf(this, {
            stateId: 'center-panel',
            collapsible: false,
            animCollapse: true,
            layoutConfig: {
                titleCollapse: false,
                animate: true,
                activeOnTop: true
            },
            deferredRender: false,
            activeTab: 0,
            items: [{
                title: 'Информация'
                ,closable: true
                ,autoScroll: true
                ,html: '</br><p style="margin-left:10px;">Welcome!</p>'
            }]

        });
        this.callParent(arguments);
    }
});
Ext.define('C300.controller.Base', {
    extend: 'Ext.app.Controller',
    views: [
        'Viewport'
        ,'Left'
        ,'CenterBase'
        ,'items.ItemWorkers'
        ,'items.ItemOrganization'
        ,'items.ItemServices'
    ],
    refs: [
        {
            ref: 'itemWorkers',
            selector: '#itemWorkers'
        },{
            ref: 'itemOrganization',
            selector: '#itemOrganization'
        },{
            ref: 'itemServices',
            selector: '#itemServices'
        },{
            ref: 'centerBase',
            selector: '#centerBase'
        }
    ],

    init: function() {
        console.log('Testing log');
        this.control({
            'button': {
                click: function() {console.log('Tab click')}
            },
            '#itemWorkers':{
                itemclick:function(view,rec,item,index,eventObj){
                    this.onElementClick(rec.data.id, rec.data.text)
                }
            },
            '#itemOrganization':{
                itemclick:function(view,rec,item,index,eventObj){
                    this.onElementClick(rec.data.id, rec.data.text)
                }
            },
            '#itemServices':{
                itemclick:function(view,rec,item,index,eventObj){
                    this.onElementClick(rec.data.id, rec.data.text)
                }
            }
        });
    },

    onContentChange: function onload() {
        console.log('FFFFFF');
    },

    onElementClick: function(id, title) {
        console.log('tab is:'+title);
        var t = this.getCenterBase();
        var g = t.items.findIndex('title', title);

        if (g >= 0){
            console.log(g);
            t.setActiveTab(g);
        } else {
            t.add({
                title : title,
                html : 'i am tab ',
                closable : true
            });
            var current = t.items.findIndex('title', title);
            t.setActiveTab(current);
        }

    }
});
  'items.ItemWorkers'
  ,'items.ItemOrganization'
  ,'items.ItemServices'