Options button: toggle the options window visibility
This commit is contained in:
parent
67d3f6650e
commit
7d62973d18
1 changed files with 15 additions and 1 deletions
|
|
@ -86,6 +86,20 @@ function openPopup(dialogname, content) {
|
||||||
dialog.show();
|
dialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function closePopup(dialogname) {
|
||||||
|
var dialog = $(dialogname);
|
||||||
|
dialog.hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
function togglePopup(dialogname, content) {
|
||||||
|
var dialog = $(dialogname);
|
||||||
|
if (dialog.css('display') == 'none') {
|
||||||
|
openPopup(dialogname, content);
|
||||||
|
} else {
|
||||||
|
closePopup(dialogname);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// GUI Event Handlers
|
// GUI Event Handlers
|
||||||
//
|
//
|
||||||
|
|
@ -130,7 +144,7 @@ function doOpenOptions() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
openPopup("#optionsdialog");
|
togglePopup("#optionsdialog");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Closes the currently open dialog
|
// Closes the currently open dialog
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue