fieldset的collapse和expand事件

本文详细介绍了如何在系统中配置邮件告警功能,包括发送开关、邮件间隔、邮件数量限制及告警频率调整等关键设置步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

id: 'emailalertform',
            xtype:'form',
            defaults: {
                width: '50%'
            },
            autoWidth: true,
            //frame: true,
            border: false,
            bodyStyle: 'padding:5px 5px 0',
            labelStyle: 'text-align: left',
            labelAlign: 'left',
            items:[{
                xtype: 'hidden',
                name: 'enable_email_hacklog_send',
                value: 0
            }, {
                id:'check_email_hacklog_send',
                xtype: 'fieldset',
                height:'auto',
                layout:'form',
                checkboxToggle: true,
                //checkboxName: 'enable_email_hacklog_send',
                title: EmailAlertMsg.enable_email_hacklog_send_box + EmailAlertMsg.emailHackLogRemark,
                collapsed: true,
                disabled:true,
                collapsedCls:'emailhacklogcss',
                listeners:{// 没有check事件,也没有value
                    'collapse':function(){
                        var form = Ext.getCmp('emailalertform'),
                            basicForm = form.getForm(),
                            ctrl = basicForm.findField('enable_email_hacklog_send'),
                            enabled = ctrl.getValue(),
                            fieldSetCtrl = form.getComponent(1);


                        if (enabled == 1) {
                            Ext.MessageBox.confirm(MainMsg.hintTitle,MainMsg.confirmCloseEmailSend,function(btn){
                                if (btn == 'yes'){
                                    Ext.Ajax.request({
                                        url: me.baseUrl2+'/edit',//数据操作是set_config
                                        method: 'POST',
                                        params: {
                                            "enable_email_hacklog_send": 0
                                        },
                                        success: function($) {
                                            var  resposeMsg = Ext.decode($.responseText);
                                            if(resposeMsg.success){//applySuccess
                                                //Ext.MessageBox.alert(MainMsg.okButton, MainMsg.applySuccess);
                                                ctrl.setValue(0);
                                            } else {
                                                Ext.MessageBox.alert(MainMsg.failTitle, resposeMsg.msg);
                                                fieldSetCtrl.expand();
                                            }
                                        },
                                        failure: function($) {
                                            Ext.MessageBox.alert(MainMsg.cancelButton, MainMsg.requestFail);
                                            fieldSetCtrl.expand();
                                        },
                                        scope: this
                                    });
                                }else{
                                    fieldSetCtrl.expand();
                                }
                            });
                        }
                    },
                    'expand':function(){
                        var form = Ext.getCmp('emailalertform'),
                            basicForm = form.getForm(),
                            ctrl = basicForm.findField('enable_email_hacklog_send'),
                            //enabled = ctrl.getValue(),
                            fieldSetCtrl = form.getComponent(1);
                        Ext.MessageBox.confirm(MainMsg.hintTitle,MainMsg.confirmOpenEmailSend,function(btn){
                            if (btn == 'yes'){
                                Ext.Ajax.request({
                                    url: me.baseUrl2+'/edit',//数据操作是set_config
                                    method: 'POST',
                                    params: {
                                        "enable_email_hacklog_send": 1
                                    },
                                    success: function($) {
                                        var  resposeMsg = Ext.decode($.responseText);
                                        if(resposeMsg.success){//applySuccess
                                            //Ext.MessageBox.alert(MainMsg.okButton, MainMsg.applySuccess);
                                            ctrl.setValue(1);
                                        } else {
                                            Ext.MessageBox.alert(MainMsg.failTitle, resposeMsg.msg);
                                            fieldSetCtrl.collapse();
                                        }
                                    },
                                    failure: function($) {
                                        Ext.MessageBox.alert(MainMsg.cancelButton, MainMsg.requestFail);
                                        fieldSetCtrl.collapse();
                                    },
                                    scope: this
                                });
                            }else{
                                fieldSetCtrl.collapse();
                            }
                        });


                    }
                },
                //hiddenName:combobox,
                //hidden:true,
                items:[{
                    xtype: 'checkbox',
                    name: 'enable_email_urgent_hacklog',
                    inputValue: 1,
                    id:'enable_email_urgent_hacklog',
                    labelStyle: 'padding:0 0 3px 0;',
                    fieldLabel: EmailAlertMsg.enable_email_urgent_hacklog_field,
                    boxLabel: EmailAlertMsg.enable_email_urgent_hacklog_box


                },{
                    xtype: 'numberfield',
                    name: 'email_hacklog_interval',
                    width: 125,
                    fieldLabel: EmailAlertMsg.email_hacklog_interval_field,
                    id: "email_hacklog_interval",
                    listeners : {
                        render : function(obj) {
                            var font = document.createElement("font");
                            font.setAttribute("color","black");
                            var redStar = document.createTextNode("\u00A0\u00A0"+EmailAlertMsg.email_hacklog_interval_desc);
                            font.appendChild(redStar);
                            obj.el.dom.parentNode.appendChild(font);
                        }
                    }
                },{
                    xtype: 'numberfield',
                    name: 'email_hacklog_count',
                    width: 125,
                    fieldLabel: EmailAlertMsg.email_hacklog_count_field,
                    id: "email_hacklog_count",
                    //hiddenName: "ddos_ack_attack_param",
                    //emptyText:EmailAlertMsg.email_hacklog_count_desc,
                    minValue: 1,
                    maxValue: 5000,
                    listeners : {
                        render : function(obj) {
                            var font = document.createElement("font");
                            font.setAttribute("color","black");
                            var redStar = document.createTextNode("\u00A0\u00A0"+EmailAlertMsg.email_hacklog_count_desc);
                            font.appendChild(redStar);
                            obj.el.dom.parentNode.appendChild(font);
                        }
                    }
                },{
                    xtype: 'combo',
                    store: me.schedulestore,
                    emptyText: EmailAlertMsg.selectTimeMgr,
                    width: 125,
                    fieldLabel: EmailAlertMsg.email_hacklog_schedule_field,
                    id: 'emailalert_schedule_id',
                    hiddenName: 'email_hacklog_schedule',
                    mode: 'local',
                    triggerAction: 'all',
                    valueField: 'value',
                    displayField: 'text',
                    editable:false,
                    listeners:{
                        expand:function(){
                            me.schedulestore.reload();
                        },
                        render : function(obj) {
                            var font = document.createElement("font");
                            font.setAttribute("color","black");
                            font.setAttribute("style","padding-left: 17px");
                            var redStar = document.createTextNode("\u00A0\u00A0"+EmailAlertMsg.email_hacklog_schedule_desc);
                            font.appendChild(redStar);
                            obj.el.dom.parentNode.appendChild(font);
                        }
                    }
                },{
                    layout: 'form',
                    buttonAlign: "center",
                    hidden: this.btn_hidden,
                    buttons: [{
                        text: MainMsg.saveButton,
                        handler: function() {
                            this.saveTest(0,2);
                        },
                        iconCls: 'save',
                        scope: this
                    }, {
                        text: MainMsg.applyButton,
                        handler: function() {
                            this.saveTest(1,2);
                        },
                        iconCls: 'apply',
                        scope: this
                    }]
                }]
            }]
你是顶级ui设计大师,请使用bootstrap5帮我重新设计这个页面。 <!DOCTYPE html> <html><head> <!-- IEバージョン設定 --> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE11"> <title>他社移管入出庫 メニュー画面</title> <!-- CSS設定 --> <link rel="stylesheet" type="text/css" href="./TSOCMS/resources/css/tsocms.css"> </head> <body> <br><br> <br><br> <br><br> <div align="center"> <div class="menuDaiTitle">他社移管入出庫システム メインメニュー (Ver.2.0.3)</div> <div align="center" class="menuDiv"> <fieldset class="fieldMenu"> <legend align="left" class="menuTitle">他社移管入出庫システム</legend> <div class="logininfo"> testjmtでログインしています <button type="button" name="logoutButton" value="logoutButton" class="logoutButton" onclick="location.href='/TSOCMS/login/dologout'">ログアウト</button> </div> <table class="menuTable"> <tbody> <tr align="center"> <td> <button type="button" name="menuButton1" value="menuButton1" class="menuButton1" onclick="location.href='/TSOCMS/capture'">CSV取込</button> </td> </tr> <tr align="center"> <td> <button type="button" name="menuButton2" value="menuButton2" class="menuButton2" onclick="location.href='/TSOCMS/search'">検索・照合</button> </td> </tr> <tr align="center"> <td> <button type="button" name="menuButton3" value="menuButton3" class="menuButton1" onclick="location.href='/TSOCMS/reportmail'">報告メール</button> </td> </tr> <tr align="center"> <td> <button type="button" name="menuButton4" value="menuButton4" class="menuButton2" onclick="location.href='/TSOCMS/master'">マスタ管理</button> </td> </tr> <tr align="center"> <td> <button type="button" name="menuButton7" value="menuButton7" class="menuButton1" onclick="location.href='/TSOCMS/changepass'">パスワード変更</button> </td> </tr> <tr align="center"> <td> <button type="button" name="menuButton8" value="menuButton8" class="menuButton2" onclick="location.href='/TSOCMS/usermasterlist'">ユーザ管理</button> </td> </tr> </tbody> </table> </fieldset> </div> </div> </body> </html> 你是顶级ui设计大师,请使用bootstrap5帮我重新设计这个页面。 <!DOCTYPE html> <html><head> <!-- IEバージョン設定 --> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE11"> <title>他社移管入出庫 メニュー画面</title> <!-- CSS設定 --> <link rel="stylesheet" type="text/css" href="./TSOCMS/resources/css/tsocms.css"> </head> <body> <br><br> <br><br> <br><br> <div align="center"> <div class="menuDaiTitle">他社移管入出庫システム メインメニュー (Ver.2.0.3)</div> <div align="center" class="menuDiv"> <fieldset class="fieldMenu"> <legend align="left" class="menuTitle">他社移管入出庫システム</legend> <div class="logininfo"> testjmtでログインしています <button type="button" name="logoutButton" value="logoutButton" class="logoutButton" onclick="location.href='/TSOCMS/login/dologout'">ログアウト</button> </div> <table class="menuTable"> <tbody> <tr align="center"> <td> <button type="button" name="menuButton1" value="menuButton1" class="menuButton1" onclick="location.href='/TSOCMS/capture'">CSV取込</button> </td> </tr> <tr align="center"> <td> <button type="button" name="menuButton2" value="menuButton2" class="menuButton2" onclick="location.href='/TSOCMS/search'">検索・照合</button> </td> </tr> <tr align="center"> <td> <button type="button" name="menuButton3" value="menuButton3" class="menuButton1" onclick="location.href='/TSOCMS/reportmail'">報告メール</button> </td> </tr> <tr align="center"> <td> <button type="button" name="menuButton4" value="menuButton4" class="menuButton2" onclick="location.href='/TSOCMS/master'">マスタ管理</button> </td> </tr> <tr align="center"> <td> <button type="button" name="menuButton7" value="menuButton7" class="menuButton1" onclick="location.href='/TSOCMS/changepass'">パスワード変更</button> </td> </tr> <tr align="center"> <td> <button type="button" name="menuButton8" value="menuButton8" class="menuButton2" onclick="location.href='/TSOCMS/usermasterlist'">ユーザ管理</button> </td> </tr> </tbody> </table> </fieldset> </div> </div> </body> </html>
最新发布
07-11
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值