- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 ExtJS 3.2(必须在这个版本的 ExtJS 中)。当我显示一个带有表单面板的面板时,一切看起来都很好,但是当我使用右上角的 [X] 按钮关闭面板并再次打开时,每个字段标 checkout 现两次,文本字段消失。如果我使用“取消”按钮,则显示正确。
我的代码:
function crearDoc(idControl) {
f = new Ext.FormPanel({
frame: true,
id: 'formFicheroCrear',
layout: 'fit',
defaults: {minWidth: 500},
items: [{
xtype : 'hidden',
id : 'idFichero'
},
{
xtype: 'panel',
layout: 'form',
id: 'formReal',
width: '100%',
items: [{xtype: 'datefield',
disabled: true,
allowBlank : false,
fieldLabel: 'Fecha',
value : new Date(),
format: 'd/m/Y',
width: '100%',
id: 'fechaDoc',
allowBlank: false},
{xtype: 'textfield',
fieldLabel: 'Titulo',
allowBlank : false,
width: '100%',
id: 'nombreDoc'},
{xtype: 'textfield',
fieldLabel: 'Descripcion',
allowBlank : false,
width: '100%',
id: 'descripcionDoc'}]
},{xtype: 'panel',
layout : 'fit',
items: [{xtype: 'htmleditor',
id: 'editorHTML',
allowBlank : false,
name: 'documentoTexto'}]
}],
buttons: [{
//Guardar documento SGSI
text: '<bean:message key="label.boton.guardarySubir"/>',
minWidth: 100,
cls : 'x-btn-text-icon',
iconCls : 'yes-icon',
listeners:{
'close':function(win){
console.info('bye');
},
'hide':function(win){
console.info('just hidden');
}
},
handler: function() {
// Comprobamos que el formulario esté OK
if (f.getForm().isValid()) {
var nombreDoc = Ext.getCmp("nombreDoc").getValue();
var descripcionDoc = Ext.getCmp("descripcionDoc").getValue();
var editorHTML = Ext.getCmp("editorHTML").getValue();
Ext.Ajax.request(
{
url: '/<bean:message key="global.application.context.name"/>/SGSI.do',
params: {"method": "crearDocumento",
"docTitulo": nombreDoc,
"docDescripcion" : descripcionDoc,
"docCuerpo" : editorHTML,
"idProyecto" : Ext.getCmp('idProyecto').getValue(),
"idControl" : idControl}
})
ventanaCrearDocumento.close()
storeDocumentos.loadData(json);
Ext.getCmp('formFichero').getForm().reset()
} else {
Ext.Msg.alert('<bean:message key="label.sincronizador.atencion"/>',
'<bean:message key="label.error.campos.rojo"/>');
}
}},
{ text : '<bean:message key="label.boton.cancelar"/>',
cls : 'x-btn-text-icon',
iconCls : 'no-icon',
minWidth: 100,
handler: function() {ventanaCrearDocumento.close()}}]
});
f.load({
url : '/<bean:message key="global.application.context.name"/>/SGSI.do',
params : {
"method" : 'dameControlPorId',
"idControl" : idControl,
"idProyecto" : Ext.getCmp('idProyecto').getValue()
},
method : 'POST'
});
var ventanaCrearDocumento = new Ext.Window({
height: 460,
width: 700,
closable: true,
closeAction : 'hide',
modal: true,
title: 'Redacción de Documento',
layout: 'fit',
items: f
});
ventanaCrearDocumento.show();
}
最佳答案
您已指定 closeAction : 'hide',
这就是它不会自动销毁的原因。将该属性指定为 close
将解决问题。
关于javascript - Ext.formPanel 使用关闭按钮复制内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44807218/
我想要一个没有标题栏的 qtip2 工具提示,但在角落里有一个关闭图标。有没有办法指定它,或者我是否必须使用创建它的代码?我正在考虑将按钮向左或向右 float 的东西,允许其余内容填充工具提示 di
我有一个 Jframe 窗口,里面有一个按钮。通过单击该按钮,它会打开一个新的 JFrame 窗口。但是当我关闭这个窗口时,它会自动关闭第一个带有按钮的 Jframe 窗口。当我关闭第二个 Jfram
我有一个关闭按钮。如何使关闭按钮在向下滚动页面时悬停?现在它位于顶部。当我们向下移动页面时,我希望它使其向右浮动(将内容悬停)。 最佳答案 使用 position 属性和 bottom、right 属
我正在使用 jtabbedpane,我正在尝试为选项卡设置一个关闭按钮,但不要丢失它所具有的标题! 注释: “GestorJanelas”是我的 JTabbedPane 字符串“titulo”是选项卡
是否有非 JSNI 方法可以向对话框的标题栏区域添加关闭按钮? 最佳答案 我们从项目一开始就使用了 GWT-ext。这是一个坏主意。他们有很多很酷的小部件,但它们不是 GWT 小部件,而且与 GWT
我正在尝试为以下机制找到解决方案: 我有一个底部播放器,它显示在所有页面上,角落里有一个“x”关闭按钮。每当我单击“X”时,播放器就会关闭,但如果我刷新页面,它会再次显示,我需要再次单击“X”才能隐藏
您好,我有一个 jFrame,我想问问用户他是否确定在单击关闭按钮时关闭 jframe: this.addWindowListener(new java.awt.event.WindowAda
我制作了一个 float 在屏幕中间的表单 为此我设计了一个关闭按钮 但我想在屏幕上的任何地方用鼠标点击关闭表单 我的代码 $(".offer-close").click(function ()
我正在尝试编写一个可以在同一行中多次放置的响应式按钮,并始终在包含该按钮的行下方显示其内容。 代码片段中有一个工作代码,但它有一个小缺陷:由于使用了伪类 focus,一旦按钮打开,点击屏幕上的任意位置
我正在开发一个适用于 OS X 的应用程序,在该应用程序中,我使用了一个自定义窗口,该窗口将图像绘制为背景,包括标题栏。我一直在修改this code绘制窗口,然后调用 [NSWindow stand
我正在使用 wxWidgets(C++ 版本)开发记事本应用程序,并且我正在努力实现多文件支持。使用 wxNotebook 类,我似乎找不到任何有关向页面添加关闭按钮的文档,因此我可以轻松关闭单个文件
我做了以下弹出窗口: https://jsfiddle.net/ca4h0a0q/ Click x This is your div content Javascript: $(
如何删除标记信息窗口中的“X”按钮? [ “美人鱼奥布里卡(原名:奥布里·亚历克西斯)”, 36.8618,-76.203, 5、 “迈克·欧文/乔治亚·梅森”, “USAVE汽车租赁”, “弗吉尼亚
我知道已经有问题问同样的问题,但是,我仍然没有运气在表单模态视图的角落实现“X”按钮。 在屏幕截图 HERE 中可以看到我正在尝试实现的一个完美示例。 . (如果 >= 10 代表的人可以通过在此处发
我正在尝试设置 WPF 窗口。 窗口应始终处于最大化状态 窗口不能移动或调整大小 它应该包含最小化和关闭按钮但不包含最大化按钮 我尝试了以下 XAML 代码 xaml 的输出是一个处于最大化状态的
当 fancybox 触发弹出窗口时,我想禁用关闭按钮,并在 x 秒后启用它。 有什么解决办法吗? 提前致谢。 最佳答案 这个很有趣。 如果您想隐藏关闭按钮以防止至少在 10 秒内关闭,您可能还想禁用
我正在 WPF 中创建一个基本的数据库应用程序,并且我已经开始使用 MVVM 模式。 我有一个对话框,要求用户从 ListBox 中选择一个项目,然后单击“确定”。之后,我将用户从 View 模型中的
如果“允许窗口管理器装饰窗口”已打开。wine 源中知道用户单击此 X 按钮并向应用程序发送 WM_CLOSE 的函数名称是什么?谢谢 最佳答案 窗口管理器发送类型为 WM_PROTOCOLS 且协议
在研究问题时,似乎大多数人都想做相反的事情(即删除最小化/关闭按钮)。我没有成功使用 reoccurrent setUndecorated 和 setDefaultCloseOperation 这是我
我正在使用 jqueryui 对话框,我想隐藏顶部的 X 按钮。 我试过下面的代码,但没有用。 $( '.ui-dialog-titlebar-close').remove(); 我的JS: $(f
我是一名优秀的程序员,十分优秀!