zoukankan      html  css  js  c++  java
  • ext window关闭

    代码
    <ext:Button runat="server" Text="添加联系人">
    <Listeners>
    <Click Handler="buildWindowColse('ContactPersonAdd.aspx', '添加客户联系人', 900, 320);" />
    </Listeners>
    </ext:Button>
    代码
    function buildWindowColse(url, title, width, height) {
    var DisplayPanel
    = new Ext.TabPanel({
    id:
    "tab1",
    height: height,
    width,
    autoScroll:
    true,
    activeTab:
    0,
    frame:
    true,
    autoDestroy:
    false

    });
    var tan
    = DisplayPanel.add({
    id:
    "ee",
    height: height,
    width,
    autoScroll:
    true,
    closable:
    false,
    autoLoad: {
    showMask:
    true,
    url: url,
    mode:
    'iframe',
    maskMsg:
    '加载数据 ' +title+ '...'
    }
    });
    var win
    = new Ext.Window({
    id:
    "wind",
    layout:
    "fit",
    autoScroll:
    true,
    title: title,
    iconCls:
    "icon-pagewhitecode",
    width,
    height: height,
    maximizable:
    true,
    autoShow:
    true,
    plain:
    true,
    resizable:
    false,
    shadow:
    false,
    bufferResize:
    true,
    modal:
    true,
    items: [DisplayPanel],
    listeners: {
    "close": function() {
    myRefresh();
    }
    }
    });

    win.show();
    }
    弹出页面调用

    代码
    const string fn = @"function(but){if(but === 'ok'){parent.window.wind.close();}}";
    Ext.Msg.Show(
    new MessageBox.Config
    {
    Title
    = "提示",
    Message
    = "保存成功",
    Buttons
    = MessageBox.Button.OK,
    Icon
    = MessageBox.Icon.INFO,
    Fn
    = new JFunction {Fn = fn}

    });

  • 相关阅读:
    SQL获取当天0点0分0秒和23点59分59秒方法
    全球唯一标识符 System.Guid.NewGuid().ToString()
    Js获取当前日期时间及其它操作
    MySQL日期函数与日期转换格式化函数大全
    访问者模式
    享元模式
    中介者模式
    职责链模式
    命令模式
    桥接模式
  • 原文地址:https://www.cnblogs.com/hanli/p/1781955.html
Copyright © 2011-2022 走看看