2019-07-12 12:45:46 +00:00
<!DOCTYPE html>
< html lang = "en" >
< head >
< meta charset = "UTF-8" >
< meta http-equiv = "X-Frame-Options" value = "sameorigin" >
< title > DAPP Loading...< / title >
< link rel = "shortcut icon" href = "./tera.ico" type = "image/vnd.microsoft.icon" >
< script type = "text/javascript" src = "./JS/crypto-client.js" > < / script >
< script type = "text/javascript" src = "./JS/coinlib.js" > < / script >
< script type = "text/javascript" src = "./JS/client.js" > < / script >
< script type = "text/javascript" src = "./JS/terahashlib.js" > < / script >
< script >
InitWalletKeyName();
window.Storage=window.localStorage;
var DapNumber="#template-number#";
var glSmart=parseInt(DapNumber);
var CONFIG_DATA={};
var NumDappGet=0;
var NumDappInfo=0;
2019-08-26 06:20:28 +00:00
var DAPPPREFIX="DAPP-";
2019-09-03 01:01:40 +00:00
var MAX_DELTA_IGNORE_BUFFER=10;
2019-07-12 12:45:46 +00:00
//DAPP TRANSFER
function SendMessage(Data)
{
var win = window.frames.dapp;
if(!win)
{
console.log("Error window.frames.dapp");
//try latter
setTimeout(function ()
{
win.postMessage(Data, "*");
},200);
return;
}
//console.log("To dapp: "+JSON.stringify(Data))
win.postMessage(Data, "*");
}
var glProgramSetHash;
function listener(event)
{
var Data=event.data;
if(!Data || typeof Data!=="object")
return;
switch (Data.cmd)
{
case "pay":
{
AddToInvoiceList(Data);
break;
}
case "setstorage":
{
2019-08-26 06:20:28 +00:00
Storage.setItem(DAPPPREFIX+DapNumber+"-"+Data.Key,JSON.stringify(Data.Value));
2019-07-12 12:45:46 +00:00
break;
}
case "getstorage":
{
2019-08-26 06:20:28 +00:00
Data.Value=Storage.getItem(DAPPPREFIX+DapNumber+"-"+Data.Key);
2019-09-03 01:01:40 +00:00
if(Data.Value & & Data.Value!=="undefined")
try {Data.Value=JSON.parse(Data.Value);}catch (e){};
2019-07-12 12:45:46 +00:00
SendMessage(Data);
break;
}
case "setcommon":
{
2019-08-26 06:20:28 +00:00
Storage.setItem(DAPPPREFIX+Data.Key,JSON.stringify(Data.Value));
2019-07-12 12:45:46 +00:00
break;
}
case "getcommon":
{
2019-08-26 06:20:28 +00:00
Data.Value=Storage.getItem(DAPPPREFIX+Data.Key);
2019-09-03 01:01:40 +00:00
if(Data.Value & & Data.Value!=="undefined")
try {Data.Value=JSON.parse(Data.Value);}catch (e){};
2019-07-12 12:45:46 +00:00
SendMessage(Data);
break;
}
case "DappCall":
{
if(!Data.Account)
Data.Account=BASE_ACCOUNT.Num;
GetData("DappStaticCall",{Account:Data.Account,MethodName:Data.MethodName,Params:Data.Params}, function (SetData)
{
if(SetData)
{
Data.Err=!SetData.result;
Data.RetValue=SetData.RetValue;
}
else
{
Data.Err=1;
}
SendMessage(Data);
});
break;
}
case "DappSendCall":
{
if(!Data.Account)
Data.Account=BASE_ACCOUNT.Num;
if(!Data.FromNum)
Data.FromNum=0;
SendCallMethod(Data.Account,Data.MethodName,Data.Params,Data.FromNum,glSmart);
break;
}
case "DappInfo":
{
//called every 1 sec from dapp-inner.js
var AllData=0;
if(Data.AllData || !NumDappGet || NumDappGet%60===0)
AllData=1;
NumDappGet++;
var Key=GetPubKey();
GetData("DappInfo",{Smart:glSmart,Key:Key,Session:glSession,NumDappInfo:NumDappInfo,AllData:AllData,AllAccounts:Data.AllAccounts}, function (SetData)
{
if(SetData)
{
2019-09-03 01:01:40 +00:00
//ToLog("glSession="+glSession+" RES:"+SetData.result+" SetData.cache="+SetData.cache+" CurBlockNum="+SetData.CurBlockNum);
2019-07-12 12:45:46 +00:00
Data.Err=!SetData.result;
if(SetData.result)
{
2019-09-03 01:01:40 +00:00
if(SetData.cache)
{
for(var key in SetData)
CONFIG_DATA[key]=SetData[key];
SetData=CONFIG_DATA;
}
else
{
CONFIG_DATA=SetData;
SMART=SetData.Smart;
BASE_ACCOUNT=SetData.Account;
SetArrLog(SetData.ArrLog);
}
2019-07-12 12:45:46 +00:00
NumDappInfo=SetData.NumDappInfo;
2019-09-03 01:01:40 +00:00
SetBlockChainConstant(SetData);
2019-07-12 12:45:46 +00:00
for(var key in SetData)
Data[key]=SetData[key];
Data.OPEN_PATH=OPEN_PATH;
if(!Data.PubKey)
{
//support web/light wallet mode:
Data.PubKey=GetPubKey();
Data.WalletIsOpen=IsPrivateMode(GetPrivKey());
Data.WalletCanSign=Data.WalletIsOpen;
}
CONFIG_DATA.WalletCanSign=Data.WalletCanSign;
CONFIG_DATA.PubKey=Data.PubKey;
}
SendMessage(Data);
}
});
break;
}
case "DappWalletList":
var Key=GetPubKey();
Data.Params={Smart:glSmart,Key:Key};
case "DappSmartHTMLFile":
case "DappBlockFile":
case "DappAccountList":
case "DappSmartList":
case "DappBlockList":
case "DappTransactionList":
{
2019-09-03 01:01:40 +00:00
if(Data.cmd==="DappBlockFile"
& & Data.Params.BlockNum< =CONFIG_DATA.CurBlockNum-MAX_DELTA_IGNORE_BUFFER)
2019-07-12 12:45:46 +00:00
{
2019-09-03 01:01:40 +00:00
2019-07-12 12:45:46 +00:00
//check storage
var StrKeyStorage=Data.Params.BlockNum+"-"+Data.Params.TrNum;
2019-09-03 01:01:40 +00:00
//ToLog("StrKeyStorage: "+StrKeyStorage);
2019-07-12 12:45:46 +00:00
var Storage2=sessionStorage;
var SavedTextData=Storage2[StrKeyStorage];
if(SavedTextData)
{
var SetData=JSON.parse(SavedTextData);
Data.Err=!SetData.result;
Data.arr=SetData.arr;
Data.Body=SetData.Body;
SendMessage(Data);
return;
}
}
Data.Params.Session=glSession;
GetData(Data.cmd,Data.Params, function (SetData,responseText)
{
if(SetData)
{
Data.Err=!SetData.result;
Data.arr=SetData.arr;
Data.Body=SetData.Body;
SendMessage(Data);
if(StrKeyStorage & & SetData.result)
{
Storage2[StrKeyStorage]=responseText;
}
}
});
break;
}
case "SetStatus":
{
SetStatus(escapeHtml(Data.Message));
break;
}
case "SetError":
{
SetError(escapeHtml(Data.Message));
break;
}
case "CheckInstall":
{
CheckInstall();
break;
}
case "SetLocationHash":
{
glProgramSetHash=1;
window.location.hash="#"+Data.Message;
glProgramSetHash=0;
break;
}
case "OpenLink":
{
var Path=Data.Message.substr(0,200);
if(IsLocalClient() & & Path.substr(0,6)==="/dapp/")
Path="?dapp="+Path.substr(6);
//console.log("OpenLink:"+Path);
window.open(Path);
break;
}
case "ComputeSecret":
{
ComputeSecret(Data.Account,Data.PubKey,function (Result)
{
Data.Result=Result;
SendMessage(Data);
});
break;
}
// case "GetLink":
// {
// GetData(Data.url,Data.Params, function (SetData)
// {
// if(SetData)
// {
// SendMessage({cmd:"GetLink",Result:SendData});
// }
// });
// break;
// }
case "SetMobileMode":
{
SetMobileMode();
break;
}
case "CreateNewAccount":
{
CreateNewAccount(Data.Currency);
break;
}
2019-09-03 01:01:40 +00:00
case "ReloadDapp":
{
ReloadDapp();
break;
}
2019-07-12 12:45:46 +00:00
}
}
if (window.addEventListener)
{
window.addEventListener("message", listener);
} else
{
// IE8
window.attachEvent("onmessage", listener);
}
var SMART={},BASE_ACCOUNT={},OPEN_PATH="";
window.onload=function()
{
2019-07-20 12:40:02 +00:00
DoNewSession();
2019-07-12 12:45:46 +00:00
if(window.location.hash)
OPEN_PATH=window.location.hash.substr(1);
if(IsLocalClient())
{
DapNumber=window.location.search.substr(6);
if(Storage.getItem("MainServer"))
{
MainServer=JSON.parse(Storage.getItem("MainServer"));
}
}
glSmart=parseInt(DapNumber);
var Key=GetPubKey();
GetData("DappInfo",{Smart:glSmart, Key:Key, Session:glSession, AllData:1}, function (SetData)
{
if(!SetData || !SetData.result)
return;
CONFIG_DATA=SetData;
SMART=SetData.Smart;
BASE_ACCOUNT=SetData.Account;
SetBlockChainConstant(SetData);
document.title=SMART.Name;
2019-08-26 06:20:28 +00:00
if(CONFIG_DATA.NETWORK!=="TERA-MAIN")
DAPPPREFIX="DAPP-"+CONFIG_DATA.NETWORK;
InitMenu();
2019-07-12 12:45:46 +00:00
var HTMLBlock=BASE_ACCOUNT.SmartState.HTMLBlock;
var HTMLTr=BASE_ACCOUNT.SmartState.HTMLTr;
2019-08-26 06:20:28 +00:00
if(HTMLBlock & & !glDebugPath)
2019-07-12 12:45:46 +00:00
{
console.log("Load HTML from: /file/"+HTMLBlock+"/"+HTMLTr);
GetData("DappBlockFile",{BlockNum:HTMLBlock,TrNum:HTMLTr}, function (SetData)
{
if(SetData & & SetData.result)
{
2019-08-26 06:20:28 +00:00
CreateFrame(SetData,0);
2019-07-12 12:45:46 +00:00
}
});
}
else
{
GetData("DappSmartHTMLFile",{Smart:glSmart,DebugPath:glDebugPath}, function (SetData)
{
if(SetData & & SetData.result)
{
2019-08-26 06:20:28 +00:00
CreateFrame(SetData,0);
2019-07-12 12:45:46 +00:00
}
});
}
});
if(!window.sha3)
LoadLib("./JS/sha3.js");
LoadSignLib();
window.addEventListener("popstate", function(event)
{
OPEN_PATH=window.location.hash.substr(1);
if(!glProgramSetHash)
SendMessage({cmd:"History",OPEN_PATH:OPEN_PATH});
}, false);
2019-07-20 06:20:10 +00:00
if(isMobile())
SetMobileMode();
2019-08-26 06:20:28 +00:00
2019-07-12 12:45:46 +00:00
}
2019-08-26 06:20:28 +00:00
function CreateFrame(SetData,bTrust)
2019-07-12 12:45:46 +00:00
{
2019-08-26 06:20:28 +00:00
2019-07-12 12:45:46 +00:00
var SriptLW="";
if(MainServer)
{
var StrPath=GetProtocolServerPath(MainServer);
2019-09-03 01:01:40 +00:00
2019-07-12 12:45:46 +00:00
//поддрежка старого кода dapp (после обновления dapp этот код возможно будет удален)
SetData.Body=SetData.Body.replace(/.\/CSS\/[0-9a-z_-]+.css\">/g,StrPath+"$&");
SetData.Body=SetData.Body.replace(/.\/JS\/[0-9a-z_-]+.js\">/g,StrPath+"$&");
//TODO: переделать на нормальный парсинг без регулярки
//поддержка перенаправления в блокчейн
SetData.Body=SetData.Body.replace(/\/file\/[0-9]+\/[0-9]+\"/g,StrPath+"$&");
SriptLW='< script > w i n d o w . P R O T O C O L _ S E R V E R _ P A T H = " ' + S t r P a t h + ' " ; < \ / s c r i p t > ' ;
//console.log("NEW:\n"+SetData.Body);
}
var iframe = document.createElement('iframe');
2019-08-26 06:20:28 +00:00
iframe.id="idFrame";
2019-07-12 12:45:46 +00:00
iframe.name = 'dapp';
iframe.sandbox="allow-scripts";
2019-08-26 06:20:28 +00:00
2019-07-12 12:45:46 +00:00
SetData.Body='\
< meta charset = "UTF-8" > \
< meta http-equiv = "X-Frame-Options" value = "sameorigin" > \
< script type = "text/javascript" src = "./JS/crypto-client.js" > < \ / s c r i p t > \
< script type = "text/javascript" src = "./JS/coinlib.js" > < \ / s c r i p t > \
< script type = "text/javascript" src = "./JS/client.js" > < \ / s c r i p t > \
< script type = "text/javascript" src = "./JS/dapp-inner.js" > < \ / s c r i p t > \
< script type = "text/javascript" src = "./JS/terahashlib.js" > < \ / s c r i p t > \
'+SriptLW+SetData.Body;
2019-09-03 01:01:40 +00:00
SetData.Body+=$("idModalCSS").outerHTML;
SetData.Body+=$("idOverlay").outerHTML;
SetData.Body+=$("idConfirm").outerHTML;
2019-07-12 12:45:46 +00:00
iframe.srcdoc=SetData.Body;
document.getElementsByTagName('body')[0].appendChild(iframe);
}
function SetMobileMode()
{
var newchild = document.createElement("meta")
newchild.name = "viewport"
newchild.content = "width=device-width, initial-scale=1.0";//, maximum-scale=1.0, user-scalable=0;
window.parent.document.getElementsByTagName("head")[0].appendChild(newchild);
}
var idInstallApp=0;
function CheckInstall()
{
if(!idInstallApp)
idInstallApp=setInterval(RunCheckInstall,2000);
}
2019-08-26 06:20:28 +00:00
function GetWalletLink()
{
if(MainServer)
return "./web-wallet.html#TabAccounts";
else
if(Storage.getItem("BIGWALLET"))
return "/wallet.html#TabAccounts";
else
return "/web-wallet.html#TabAccounts";
}
2019-07-12 12:45:46 +00:00
function RunCheckInstall()
{
if(CONFIG_DATA & & CONFIG_DATA.ArrWallet & & CONFIG_DATA.ArrWallet.length===0)
{
var StrRef;
if(MainServer)
2019-08-26 06:20:28 +00:00
StrRef='< A class = "btcreate" href = "'+GetWalletLink()+'" > Accounts< / A > ';
2019-07-12 12:45:46 +00:00
else
{
if(Storage.getItem("BIGWALLET"))
2019-08-26 06:20:28 +00:00
StrRef='< A class = "btcreate" href = "'+GetWalletLink()+'" > Config< / A > '
2019-07-12 12:45:46 +00:00
else
2019-08-26 06:20:28 +00:00
StrRef='< A class = "btcreate" href = "'+GetWalletLink()+'" > Accounts< / A > ';
2019-07-12 12:45:46 +00:00
}
2019-08-26 06:20:28 +00:00
var Str='< DIV style = "background-color: #c8ecff;" > For install this app press: < button class = "btcreate" onclick = "InstallApp()" > Create account< / button > < DIV > ';
2019-07-12 12:45:46 +00:00
SetStatus(Str);
}
2019-08-26 06:20:28 +00:00
}
function OpenWalletPage()
{
window.open(GetWalletLink());
2019-07-12 12:45:46 +00:00
}
//LIB
function SetArrLog(arr)
{
var Str="";
if(arr)
for(var i=0;i< arr.length ; i + + )
{
var Item=arr[i];
if(!Item.final)
continue;
if(Item.text.indexOf("Add to blockchain")>=0)
continue;
var TR=MapSendTransaction[Item.key];
if(TR & & !TR.WasSend & & Item.final)
{
var Data={};
Data.cmd="OnEvent";
2019-08-26 06:20:28 +00:00
if(isMobile())
Data.Description=Item.text;
else
Data.Description="Error: "+Item.text;
2019-07-12 12:45:46 +00:00
Data.Error=1;
//console.log(JSON.stringify(Item));
SendMessage(Data);
TR.WasSend=1;
}
}
}
2019-08-26 06:20:28 +00:00
2019-07-12 12:45:46 +00:00
function IsPrivateMode(PrivKeyStr)
{
if(PrivKeyStr & & PrivKeyStr.length===64)
return 1;
else
return 0;
}
function SetStatus(Str)
{
var id = $("idStatus");
id.innerHTML=Str;
2019-08-26 06:20:28 +00:00
if(Str)
console.log(id.innerText);
2019-07-12 12:45:46 +00:00
}
function SetError(Str,bNoSound)
{
SetStatus("< DIV style = 'color:red' > < B > "+Str+"< / B > < / DIV > ");
}
function CreateNewWebKeys()
{
var arr = new Uint8Array(32);
window.crypto.getRandomValues(arr);
var PrivKey=sha3(arr);
SetPrivKey(GetHexFromArr(PrivKey));
Storage.setItem("idPubKey",GetHexFromArr(SignLib.publicKeyCreate(PrivKey,1)));
CONFIG_DATA.PubKey=GetPubKey();
//console.log("CreateNewWebKeys: "+CONFIG_DATA.PubKey);
}
var CountCreateNewAccount=0;
function CreateNewAccount(Currency)
{
if(!CONFIG_DATA.WalletCanSign)
{
if(Storage.getItem("BIGWALLET") || IsLockedWallet())
{
SetError("Pls, open wallet");
return;
}
CreateNewWebKeys();
}
if(CountCreateNewAccount>20)
return;
CountCreateNewAccount++;
SetStatus("Calculate Tx, wait pls ...");
var TR=GetTrCreateAcc(Currency,CONFIG_DATA.PubKey,SMART.Name,0,SMART.Num);
var Body=GetBodyCreateAcc(TR);
SendTransaction(Body,TR);
}
function InstallApp()
{
2019-07-13 01:15:47 +00:00
CreateNewAccount(BASE_ACCOUNT.Currency);
2019-07-12 12:45:46 +00:00
if(idInstallApp)
{
clearInterval(idInstallApp);
idInstallApp=setInterval(RunCheckInstall,30000);
}
}
2019-08-26 06:20:28 +00:00
function ResetDapp()
{
SetStatus("");
DoNewSession();
if(idInstallApp)
{
clearInterval(idInstallApp);
idInstallApp=0;
}
}
function RunDappFromFile()
{
CloseMenu();
LoadDappFromFile();
}
var WasLoadFromFile=0;
function LoadDappFromFile()
{
$('idFile').onchange=function ()
{
ResetDapp();
CreateFromFile();
};
$('idFile').click();
}
function ReloadDapp()
{
ResetDapp();
if(WasLoadFromFile)
CreateFromFile();
else
window.location.reload();
}
function CreateFromFile()
{
var file = $("idFile").files[0];
var reader = new FileReader();
reader.onload = function()
{
WasLoadFromFile=1;
var view = new Uint8Array(reader.result);
var Str=Utf8ArrayToStr(view);
if($("idFrame"))
$("idFrame").outerHTML="";
CreateFrame({Body:Str},1);
$("idRunItem").innerText="Runing DApp from: "+file.name;
}
if(file)
reader.readAsArrayBuffer(file);
}
function InitMenu()
{
$("idCreateItem").innerText=$("idCreateItem").innerText.replace("NNN",SMART.Num);
}
var OpenMenu=0;
function OnClickMenu()
{
DoVisibleMenu(!OpenMenu);
}
function CloseMenu()
{
DoVisibleMenu(0);
}
function DoVisibleMenu(SetMenu)
{
setTimeout(function ()
{
OpenMenu=SetMenu;
$("idMenu").className="top "+(OpenMenu?"open":"close");
},50);
}
window.onclick=function (t)
{
if(OpenMenu)
{
CloseMenu();
}
}
window.onkeydown = function (e)
{
//ToLog("keyCode="+e.keyCode);
switch (e.keyCode)
{
case 27:
if(OpenMenu)
{
CloseMenu();
}
break;
2019-09-03 01:01:40 +00:00
case 116:
2019-08-26 06:20:28 +00:00
e.preventDefault();
ReloadDapp();
break;
default:
}
};
2019-07-12 12:45:46 +00:00
< / script >
< style >
2019-08-26 06:20:28 +00:00
:root
2019-07-12 12:45:46 +00:00
{
2019-08-26 06:20:28 +00:00
--colorMenu0: black;
--colorMenu1: #8daab2;
--colorMenu2: #86b0cb;
--colorMenu0: white;
--colorMenu1: black;
--colorMenu2: #343434;
2019-07-12 12:45:46 +00:00
}
2019-08-26 06:20:28 +00:00
body
2019-07-12 12:45:46 +00:00
{
2019-08-26 06:20:28 +00:00
padding: 0;
margin: 0;
}
.top
{
z-index:20;
2019-07-12 12:45:46 +00:00
position:fixed;
top: 0;
2019-08-26 06:20:28 +00:00
height:25px;
margin: 0;
text-align: center;
}
#idStatus
{
2019-07-12 12:45:46 +00:00
left: 0;
2019-08-26 06:20:28 +00:00
width: 90%;
min-width: 90%;
height:25px;
padding: 5px 0 0 0;
}
#idMenu
{
z-index:30;
right: 2px;
min-width: 70px;
max-width: 150px;
color: var(--colorMenu0);
background-color: var(--colorMenu1);
cursor: pointer;
padding: 5px 0 0 0;
}
#idMenuList
{
top: 30px;
margin-right: 2px;
}
#idMenu.open
{
width: 100px;
min-width: 150px;
}
.open
{
z-index:30;
right: 0;
width: 100px;
min-width: 150px;
cursor: pointer;
}
.close
{
width: 10%;
min-width: 50px;
}
.item
{
width: 100px;
color: var(--colorMenu0);
background-color: var(--colorMenu1);
cursor: pointer;
padding: 4px;
margin: 0;
margin-left: 5px;
min-height: 24px;
border: 1px solid #5a6c74;
vertical-align: middle;
min-width: 130px;
max-width: 130px;
}
.item:hover
{
color: #ecb84e;
background-color: var(--colorMenu2);
}
#idMenu.close #idMenuList
{
display: none;
}
#idFrame
{
z-index:10;
position:fixed;
left:0;
top: 30px;
2019-07-12 12:45:46 +00:00
width: 100%;
2019-08-26 06:20:28 +00:00
height: 97vh;
border: 0;
2019-07-12 12:45:46 +00:00
padding: 0;
margin: 0;
}
2019-08-26 06:20:28 +00:00
2019-07-12 12:45:46 +00:00
.btcreate
{
2019-08-26 06:20:28 +00:00
height:22px;
2019-07-12 12:45:46 +00:00
background-color: #347867;
color: white;
cursor: pointer;
border-radius: 3px;
padding: 2px;
text-decoration: none;
border: 1px solid gray;
}
2019-08-26 06:20:28 +00:00
#idMenu.close
{
background-image: url('./PIC/down.png');
background-repeat: no-repeat;
background-size: 16px;
background-position: right;
}
#idMenu.open
{
background-image: url('./PIC/up.png');
background-repeat: no-repeat;
background-size: 16px;
background-position: right;
}
2019-07-12 12:45:46 +00:00
< / style >
2019-09-03 01:01:40 +00:00
2019-07-12 12:45:46 +00:00
< / head >
< body >
2019-08-26 06:20:28 +00:00
< DIV id = "idStatus" class = "top" > < / DIV >
< DIV id = "idMenu" class = "top close" onclick = "OnClickMenu()" > Menu
< div id = "idMenuList" class = "top open" >
< div class = "item" onclick = "OpenWalletPage();" > Open wallet page< / div >
< div class = "item" onclick = "RunDappFromFile();" id = "idRunItem" > Load from file...< / div >
2019-09-03 01:01:40 +00:00
< div class = "item" onclick = "ReloadDapp();" > F5: ReRun< / div >
< div class = "item" onclick = "window.location.reload();" > Reset< / div >
2019-08-26 06:20:28 +00:00
< div class = "item" onclick = "InstallApp();" id = "idCreateItem" > Create account with DApp NNN< / div >
< / div >
< / DIV >
< input type = "file" id = "idFile" style = "display: none" >
2019-09-03 01:01:40 +00:00
<!-- modal support dor dapp -->
< style id = "idModalCSS" >
/*modal support*/
#idOverlay
{
background: rgba(68, 83, 104, 0.65);
position: fixed;
width: 100%;
height: 100vh;
top: 0;
display: none;
}
.ModalDlg
{
z-index: 1000;
padding: 30px;
background: #fff;
border-radius: 5px;
border: 1px solid #727473;
box-shadow: 0px 8px 10px rgba(68, 83, 104, 0.15);
color: #000;
position: fixed;
margin: 0 auto;
top: 30%;
left: 50%;
transform: translate(-50%, -50%);
max-width: 250px;
width: 87%;
}
.bt-confirm
{
border-radius: 4px;
min-height: 14px;
margin: 5px;
width: 100px;
height: 36px;
color:white;
background-color: #53687e;
border-color: #445368;
}
.bt-confirm:hover
{
color: #cb763a;
cursor: pointer;
}
< / style >
< div id = "idOverlay" onclick = "closeModal()" style = "display: none;" > < / div >
< section id = "idConfirm" class = "ModalDlg" style = "display: none;" >
< DIV align = 'center' >
< h2 id = "idConfirmTitle" > Confirm< / h2 >
< p id = "idConfirmText" > A you sure?< / p >
< button class = "bt-confirm" onclick = "OnConfirmOK()" > OK< / button >
< button class = "bt-confirm" onclick = "closeModal()" > Cancel< / button >
< / DIV >
< / section >
2019-07-12 12:45:46 +00:00
< / body >
< / html >
< script >
var glDebugPath="";
2019-08-19 06:00:17 +00:00
//{"HTMLBlock":2303846,"HTMLTr":0}
2019-07-12 12:45:46 +00:00
< / script >