fgcommand.js: add wrappers for dialog-[show|close]
This commit is contained in:
parent
fc85e049c9
commit
6b33ee4719
1 changed files with 18 additions and 1 deletions
|
@ -2,6 +2,16 @@
|
|||
*
|
||||
*/
|
||||
var fgCommand = {
|
||||
oneArg : function(t1, p1) {
|
||||
return {
|
||||
name : '',
|
||||
children : [ {
|
||||
name : t1,
|
||||
index : 0,
|
||||
value : p1
|
||||
} ]
|
||||
};
|
||||
},
|
||||
twoArgs : function(t1, p1, t2, p2) {
|
||||
return {
|
||||
name : '',
|
||||
|
@ -43,6 +53,13 @@ var fgCommand = {
|
|||
|
||||
pause : function() {
|
||||
$.post("/run.cgi?value=pause");
|
||||
}
|
||||
},
|
||||
|
||||
dialogShow: function(dlg) {
|
||||
this.sendCommand("dialog-show", this.oneArg("dialog-name",dlg));
|
||||
},
|
||||
dialogClose: function(dlg) {
|
||||
this.sendCommand("dialog-close", this.oneArg("dialog-name",dlg));
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue