@@ -47,9 +47,9 @@ const AutoConnectAux::ACElementProp_t AutoConnectUpdateAct::_elmProgress[] PROGM
47
47
{ AC_Element , "progress_loader" , "<div id=\"ld\" />" , nullptr },
48
48
{ AC_Element , "c4" , "</span></div>" , nullptr },
49
49
{ AC_Text , "status" , nullptr , nullptr },
50
- { AC_Element , "c5" , "<script type=\"text/javascript\">var lap,cls;function rd(){clearInterval(lap),location.href=\"" AUTOCONNECT_URI_UPDATE_RESULT "\"}function bar(){var t=new FormData;t.append(\"op\",\"" AUTOCONNECT_UPDATE_NOTIFY_START "\");var e=new XMLHttpRequest;e.timeout=" AUTOCONNECT_STRING_DEPLOY (AUTOCONNECT_UPDATE_TIMEOUT ) ",e .open (\"POST\",\"" AUTOCONNECT_URI_UPDATE_PROGRESS "\",!0),e.onreadystatechange=function(){4==e.readyState&&(200==e.status?(cls=!1,lap=setInterval(upd," AUTOCONNECT_STRING_DEPLOY (AUTOCONNECT_UPDATE_INTERVAL ) ")):document.getElementById(\"status\").textContent=\"Could not start (\"+e.status+\"): \"+e.responseText)},e.send(t)}function upd(){if(!cls){var t=new XMLHttpRequest;t.onload=function(){var t=this.responseText.split(\",\");\"" AUTOCONNECT_UPDATE_NOTIFY_START "\"==t[0]?(window.setTimeout(rd()," AUTOCONNECT_STRING_DEPLOY (AUTOCONNECT_UPDATE_DURATION ) ")" , nullptr },
50
+ { AC_Element , "c5" , "<script type=\"text/javascript\">var lap,cls,rt ;function rd(){clearInterval(lap),location.href=\"" AUTOCONNECT_URI_UPDATE_RESULT "\"}function bar(){rt=0; var t=new FormData;t.append(\"op\",\"" AUTOCONNECT_UPDATE_NOTIFY_START "\");var e=new XMLHttpRequest;e.timeout=" AUTOCONNECT_STRING_DEPLOY (AUTOCONNECT_UPDATE_TIMEOUT ) ",e .open (\"POST\",\"" AUTOCONNECT_URI_UPDATE_PROGRESS "\",!0),e.onreadystatechange=function(){4==e.readyState&&(200==e.status?(cls=!1,lap=setInterval(upd," AUTOCONNECT_STRING_DEPLOY (AUTOCONNECT_UPDATE_INTERVAL ) ")):document.getElementById(\"status\").textContent=\"Could not start (\"+e.status+\"): \"+e.responseText)},e.send(t)}function upd(){if(!cls){var t=new XMLHttpRequest;t.onload=function(){var t=this.responseText.split(\",\");\"" AUTOCONNECT_UPDATE_NOTIFY_START "\"==t[0]?(window.setTimeout(rd()," AUTOCONNECT_STRING_DEPLOY (AUTOCONNECT_UPDATE_DURATION ) ")" , nullptr },
51
51
{ AC_Element , "enable_loader" , ",document.getElementById(\"ld\").className=\"loader\"" , nullptr },
52
- { AC_Element , "c6" , "):\"" AUTOCONNECT_UPDATE_NOTIFY_END "\"==t[0]?(cls=!0,rd()):\"" AUTOCONNECT_UPDATE_NOTIFY_PROGRESS "\"==t[0]&&incr(t[1])},t.onerror=function(){\"0\" !=t.status&&(document.getElementById(\"status\").textContent=\"" AUTOCONNECT_TEXT_OTAFAILURE "\"+t.status,console.log(\"http err:%d %s\",t.status,t.responseText),clearInterval(lap))},t.open(\"GET\",\"" AUTOCONNECT_URI_UPDATE_PROGRESS "\",!0),t.send()}}function incr(t){" , nullptr },
52
+ { AC_Element , "c6" , "):\"" AUTOCONNECT_UPDATE_NOTIFY_END "\"==t[0]?(cls=!0,rd()):\"" AUTOCONNECT_UPDATE_NOTIFY_PROGRESS "\"==t[0]&&incr(t[1])},t.onerror=function(){rt=rt++,!0==(0 !=t.status||0==t.status&&rt>10) &&(document.getElementById(\"status\").textContent=\"" AUTOCONNECT_TEXT_OTAFAILURE "\"+t.status,console.log(\"http err:%d %s\",t.status,t.responseText),clearInterval(lap))},t.open(\"GET\",\"" AUTOCONNECT_URI_UPDATE_PROGRESS "\",!0),t.send()}}function incr(t){" , nullptr },
53
53
{ AC_Element , "inprogress_meter" , "var e=t.split(\":\"),n=document.getElementById(\"progress\").getElementsByTagName(\"meter\");n[0].setAttribute(\"value\",e[0]),n[0].setAttribute(\"max\",e[1])" , nullptr },
54
54
{ AC_Element , "c7" , "}window.onload=bar;</script>" , nullptr }
55
55
};
0 commit comments