标签: extjs3

按钮工具提示extjs

我通过调用向中心区域的选项卡面板添加了一个按钮

var add = tabSelection.addButton({
  id            : 'add',
  text          : 'Add',
  hidden        : true,
  tooltip       : 'Please highlight the correct value and click Add to create new contact',
  handler       : addContact
});
Run Code Online (Sandbox Code Playgroud)

西部地区有两个带有手风琴布局的单选按钮,标有"内部"和"外部".我希望通过捕获单选按钮单击动态更改工具提示.

我可以捕获单选按钮单击,当我相应地设置按钮的工具提示时, add.setToolTip('Please highlight the correct value and click Add to create new internalcontact');如果单击内部客户端. add.setToolTip('Please highlight the correct value and click Add to create new external contact');当点击外部时.

extjs button tooltip extjs3

5
推荐指数
1
解决办法
2万
查看次数

ExtJS日期和时区

我有一个Ext Date类的问题,似乎为解析日期返回错误的时区.使用下面的代码我创建一个日期对象为1966年5月24日15:46 BST:

date = "1966-05-24T15:46:01+0100";
var pDate = Date.parseDate(date, "Y-m-d\\TH:i:sO", false);
Run Code Online (Sandbox Code Playgroud)

然后我称之为:

console.log(pDate.getGMTOffset());
Run Code Online (Sandbox Code Playgroud)

我希望得到与orignal日期相关的偏移量(GMT + 1),但我得到的是浏览器的本地时区.如果浏览器设置为远远超过GMT的时区,则日期的日期部分也将被翻转(因此日期现在将显示为1966年5月25日).

有谁知道如何绕过这个并让Ext识别解析日期的正确时区而不是本地浏览器时区?

如果这是不可能的,可以强制Ext使用GMT而不是试图解释时区吗?

javascript timezone extjs date extjs3

5
推荐指数
1
解决办法
2万
查看次数

使用RequireJS,LABjs(或类似)进行ExtJs依赖关系管理

我试图找到如何将ExtJs和ExtJs模块包装起来用于javascript依赖框架(如RequireJS或LAB)的示例.

我正在使用一个基于ExtJs的大型项目,并且有许多单独的模块文件,这些文件只是大量包含在各处,它有点失控.

有没有人使用现有的ExtJs依赖管理框架?(我知道ExtJs 4可能包含类似的东西,但我修复了使用ExtJs 3)

extjs dependency-management requirejs labjs extjs3

5
推荐指数
1
解决办法
3473
查看次数

EXTJS:过滤器存储不会出现第一次单击组合

我想在从组合中选择值时过滤商店.当我选择第一个值时它不会过滤它但是在选择任何其他值时第二次它运行良好我的商店有autoLoad = true这里是我的代码

xtype: 'combo'
,fieldLabel: 'Online Type'
,name:'OnlineType'
,id:'cmbOnlineType'
,store: common.getStore(accounts20.dataForms.onlinePayments._storeOnlineType, accounts20.dataForms.onlinePayments)
,displayField:'OnlineType'
,valueField:'OnlineType'
,mode:'local' // important property when using store
,typeAhead: true
,triggerAction: 'all'
,selectOnFocus:true
,allowBlank:false
,forceSelection:true
,editable:true
,tabIndex:4
,width : 188
,listeners:{
    select:function(){
        if(Ext.getCmp('onlinePay-hdnMode').value!="E")
        {
            Ext.getCmp('onlinePay-cmbChequeNo').clearValue();
            Ext.getCmp('onlinePay-cmbChequeNo').getStore().removeAll();
            Ext.getCmp('onlinePay-cmbCrAccount').clearValue();
        }
        var store = Ext.getCmp('onlinePay-cmbCrAccount').getStore();
        if(this.getValue()=="Cheque" || this.getValue()=="Internet/Mobile")
        {   
            Ext.getCmp('onlinePay-chkIncCharges').setValue(false);
            if(this.getValue()=="Internet/Mobile")
            {
                Ext.getCmp('onlinePay-cmbChequeNo').disable();
                Ext.getCmp('onlinePay-chkIncCharges').disable();
            }else{
                Ext.getCmp('onlinePay-cmbChequeNo').enable();
                Ext.getCmp('onlinePay-chkIncCharges').enable();
            }
            //Filter store on bank accounts
            store.filter([
                {
                    property     : 'AccountTypeId',
                    value        : 'B',//Bank Accounts
                    anyMatch     : true, //optional, defaults to true …
Run Code Online (Sandbox Code Playgroud)

extjs extjs3

4
推荐指数
1
解决办法
4617
查看次数

EXTjs面板折叠和扩展方法

在EXT.Panel中,有两种方法可以折叠/展开Panel.

collapse(Boolean animate)
Run Code Online (Sandbox Code Playgroud)

expand (Boolean animate)

打电话collapse(true)expand(true)给了我想要的结果.但我希望expand(true)通过调用collapse(false)来实现结果.但collapse(false)什么都不做.为什么是这样?

extjs3

4
推荐指数
1
解决办法
2万
查看次数

如何在ExtJs中选择组合框值?

我试图在将其加载到商店后简单地在下拉列表中选择一个项目.这不起作用:

Ext.getCmp('ddlModel').setValue(aircraftStore.getAt(0).data.ModelTypeCode);
Run Code Online (Sandbox Code Playgroud)

这引发了一个异常:

Ext.getCmp('ddlModel').selectByValue(aircraftStore.getAt(0).data.ModelTypeCode);
Run Code Online (Sandbox Code Playgroud)

以下是例外:'this.view'为null或不是对象

任何人都知道如何在ExtJs中做到这一点?

extjs extjs3

4
推荐指数
1
解决办法
3万
查看次数

如何以编程方式隐藏 TabPanel 中的选项卡 (ExtJS 3)

这是我的 TabPanel 代码:

在代码内部,TabPanel (tabs_panel) 中有两个选项卡(tab1 和 tab2)

MyTabPanelUi = Ext.extend(Ext.TabPanel, {
    activeTab: 0,
    height: 210,
    resizeTabs: true,
    tabWidth: 266,
    id: 'tabs_panel',
    initComponent: function () {
        this.items = [{
            xtype: 'panel',
            title: 'Project',
            padding: 20,
            height: 150,
            id: 'tab1'
        }, {
            xtype: 'panel',
            title: 'Service',
            height: 150,
            padding: 20,
            id: 'tab2'
        }]
    }
});
Run Code Online (Sandbox Code Playgroud)

我正在尝试使用以下代码隐藏 tab2 但以下代码

var tabPanel = Ext.getCmp('tabs_panel');
var tabToHide = Ext.getCmp('tab2');
tabPanel.hideTabStripItem(tabToHide);
Run Code Online (Sandbox Code Playgroud)

但不知何故,上面的代码对我不起作用。我该如何解决这个问题?

javascript extjs extjs3

4
推荐指数
1
解决办法
8896
查看次数

创建 ExtJs 扩展类

我尝试像 sencha示例中那样扩展 Button 。
我确实摆弄
并得到错误:TypeError: this.addEvents is not a function : 'statesave'
怎么了?

javascript extjs extjs3

4
推荐指数
1
解决办法
6691
查看次数

可编辑网格ExtJS,如何在网格上编辑行后更新数据库中的行

首先,抱歉我的英语不是很好!

我需要制作下一个东西:ExtJS 3.4可编辑网格(示例),它将使用json格式.输入源采用json格式.我做到了,一切正常,就像在例子中.

我做了:

  1. 数据从数据库下载到php中的数组
  2. 数组被编码为json格式
  3. 可编辑的网格源是一个带有json消息的页面,现在一切正常.

现在我需要这样做:我需要更新网格中单元格更新的数据库中的数据.

我怎样才能做到这一点?在网上找不到任何东西.
也许在delphi7中有一些类似'OnCellEditting'的方法?

我的js代码:

Ext.onReady(function () {
    function formatDate(value) {
        return value ? value.dateFormat('M d, Y') : '';
    }

    // shorthand alias
    var fm = Ext.form;

    // the column model has information about grid columns
    // dataIndex maps the column to the specific data field in
    // the data store (created below)
    var cm = new Ext.grid.ColumnModel({
        // specify any defaults for each column
        defaults: {
            sortable: false // columns are …
Run Code Online (Sandbox Code Playgroud)

javascript extjs extjs3 extjs-grid

4
推荐指数
1
解决办法
5706
查看次数

extjs网格面板单元格中的多行文本

我有一个网格.我想在一些网格单元格中显示多行.以下是我生成的div,它有两行文本.但这并没有呈现第二行,即"测试新线".

<div class="x-grid3-cell-inner x-grid3-col-event x-unselectable" style="height:134px;line-height:134px;" unselectable="on">
  <div>
      <a href="some link">XYZ funding round: Series C</a> (Funding Round)
      <br>
      test new line
  </div>
</div>
Run Code Online (Sandbox Code Playgroud)

这是一个extjs 3.4网格.

知道为什么这不会渲染两行吗?

html html5 css3 extjs3

4
推荐指数
1
解决办法
7441
查看次数