1
0
Fork 0

fgcommand.js: add wrappers for dialog-[show|close]

This commit is contained in:
Torsten Dreyer 2014-11-10 10:52:10 +01:00
parent fc85e049c9
commit 6b33ee4719

View file

@ -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));
},
};