2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 10:46:53 +00:00

fhemweb.js: textedit-long: add dialog-close function

git-svn-id: https://svn.fhem.de/fhem/trunk@8291 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2015-03-26 15:26:45 +00:00
parent ce3d863c26
commit 03df8c5a28

View File

@ -631,19 +631,21 @@ FW_createTextField(elName, devName, vArr, currVal, set, params, cmd)
$('#editdlg').dialog( $('#editdlg').dialog(
{ modal:true, closeOnEscape:true, width:$(window).width()*3/4, { modal:true, closeOnEscape:true, width:$(window).width()*3/4,
maxHeight:$(window).height()*3/4, maxHeight:$(window).height()*3/4,
close:function(){ $('#editdlg').remove(); },
buttons:[ buttons:[
{ text:"Cancel", click:function(){ { text:"Cancel", click:function(){
$('#editdlg').remove(); $(this).dialog('close');
addBlur(); addBlur();
}}, }},
{ text:"OK", click:function(){ { text:"OK", click:function(){
if(cm) if(cm)
$("#td_longText").val(cm.getValue()); $("#td_longText").val(cm.getValue());
var res=$("#td_longText").val(); var res=$("#td_longText").val();
$('#editdlg').remove(); $(this).dialog('close');
$(inp).val(res); $(inp).val(res);
addBlur(); addBlur();
}}]}); }}]
});
}; };
if( is_long ) if( is_long )