mirror of
https://github.com/rn10950/RetroZilla.git
synced 2024-11-12 19:00:11 +01:00
51 lines
1.2 KiB
JavaScript
51 lines
1.2 KiB
JavaScript
|
/***************************************************************
|
||
|
* JunkImgsDialog -------------------------------------------------
|
||
|
* Controller for dialog.
|
||
|
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||
|
* REQUIRED IMPORTS:
|
||
|
****************************************************************/
|
||
|
|
||
|
//////////// global variables /////////////////////
|
||
|
|
||
|
var dialog;
|
||
|
|
||
|
//////////////////////////////////////////////////
|
||
|
|
||
|
window.addEventListener("load", JunkImgsDialog_initialize, false);
|
||
|
|
||
|
function JunkImgsDialog_initialize()
|
||
|
{
|
||
|
dialog = new JunkImgsDialog();
|
||
|
doSetOKCancel(gDoOKFunc);
|
||
|
}
|
||
|
|
||
|
////////////////////////////////////////////////////////////////////////////
|
||
|
//// class JunkImgsDialog
|
||
|
|
||
|
function JunkImgsDialog()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
JunkImgsDialog.prototype =
|
||
|
{
|
||
|
browse: function()
|
||
|
{
|
||
|
var txf = document.getElementById("txfSearchPath");
|
||
|
var defaultPath = txf.getAttribute("value");
|
||
|
var file = FilePickerUtils.pickDir("Select Search Path", defaultPath);
|
||
|
if (file)
|
||
|
txf.setAttribute("value", file.path);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
////////////////////////////////////////////////////////////////////////////
|
||
|
//// dialogOverlay stuff
|
||
|
|
||
|
function gDoOKFunc() {
|
||
|
window.close();
|
||
|
window.arguments[0].processDialog(window);
|
||
|
|
||
|
return true;
|
||
|
}
|
||
|
|