-
Notifications
You must be signed in to change notification settings - Fork 0
/
CommonDialog.js
60 lines (59 loc) · 1.16 KB
/
CommonDialog.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
function CommonDialog(){
this.aa="AA";
}
/*
* <body> must contain <div id='dialog-confirm'/>
* wisaruthk.
*/
CommonDialog.showConfirm = function(_strTitle,_strMsg,fnConfirm,fnCancle){
if(_strTitle==null){
_strTitle=="";
}
if(_strMsg==null){
_strMsg=="";
}
var dConfirm = jQuery("#dialog-confirm");
dConfirm.html("<p style='font-size:12px'>"+_strMsg+"</p>");
dConfirm.dialog({
draggable:false,
zIndex:3000,
title:_strTitle,
resizable:false,
height:250,
modal:true,
autoOpen:true,
buttons:{
"confirm":function(){
jQuery(this).dialog("close");
if(fnConfirm!=null){fnConfirm();};
},
"cancel":function(){
jQuery(this).dialog("close");
if(fnCancel!=null){fnCancel();};
}
}
});
return dConfirm;
};
CommonDialog.showMessage = function(_strMsg){
if(_strMsg==null){
_strMsg=="";
}
var dDialog = jQuery("#dialog-message");
dDialog.html("<p style='font-size:12px'>"+_strMsg+"</p>");
dDialog.dialog({
draggable:false,
zIndex:3000,
title:"Information",
resizable:false,
height:250,
modal:true,
autoOpen:true,
buttons:{
"ok":function(){
jQuery(this).dialog("close");
}
}
});
return dDialog;
};