includes/clientside/static/ajax.js
changeset 179 36b287f1d85c
parent 175 1465f48faba0
child 209 8a00247d1dee
equal deleted inserted replaced
178:4c19952406db 179:36b287f1d85c
  1182 function aboutKeepAlive()
  1182 function aboutKeepAlive()
  1183 {
  1183 {
  1184   new messagebox(MB_OK|MB_ICONINFORMATION, 'About the keep-alive feature', 'Keep-alive is a new Enano feature that keeps your administrative session from timing out while you are using the administration panel. This feature can be useful if you are editing a large page or doing something in the administration interface that will take longer than 15 minutes.<br /><br />For security reasons, Enano mandates that high-privilege logins last only 15 minutes, with the time being reset each time a page is loaded (or, more specifically, each time the session API is started). The consequence of this is that if you are performing an action in the administration panel that takes more than 15 minutes, your session may be terminated. The keep-alive feature attempts to relieve this by sending a "ping" to the server every 10 minutes.<br /><br />Please note that keep-alive state is determined by a cookie. Thus, if you log out and then back in as a different administrator, keep-alive will use the same setting that was used when you were logged in as the first administrative user. In the same way, if you log into the administration panel under your account from another computer, keep-alive will be set to "off".<br /><br /><b>For more information:</b><br /><a href="http://docs.enanocms.org/Help:Appendix_B" onclick="window.open(this.href); return false;">Overview of Enano'+"'"+'s security model');
  1184   new messagebox(MB_OK|MB_ICONINFORMATION, 'About the keep-alive feature', 'Keep-alive is a new Enano feature that keeps your administrative session from timing out while you are using the administration panel. This feature can be useful if you are editing a large page or doing something in the administration interface that will take longer than 15 minutes.<br /><br />For security reasons, Enano mandates that high-privilege logins last only 15 minutes, with the time being reset each time a page is loaded (or, more specifically, each time the session API is started). The consequence of this is that if you are performing an action in the administration panel that takes more than 15 minutes, your session may be terminated. The keep-alive feature attempts to relieve this by sending a "ping" to the server every 10 minutes.<br /><br />Please note that keep-alive state is determined by a cookie. Thus, if you log out and then back in as a different administrator, keep-alive will use the same setting that was used when you were logged in as the first administrative user. In the same way, if you log into the administration panel under your account from another computer, keep-alive will be set to "off".<br /><br /><b>For more information:</b><br /><a href="http://docs.enanocms.org/Help:Appendix_B" onclick="window.open(this.href); return false;">Overview of Enano'+"'"+'s security model');
  1185 }
  1185 }
  1186 
  1186 
       
  1187 function ajaxShowCaptcha(code)
       
  1188 {
       
  1189   var mydiv = document.createElement('div');
       
  1190   mydiv.style.backgroundColor = '#FFFFFF';
       
  1191   mydiv.style.padding = '10px';
       
  1192   mydiv.style.position = 'absolute';
       
  1193   mydiv.style.top = '0px';
       
  1194   mydiv.id = 'autoCaptcha';
       
  1195   var img = document.createElement('img');
       
  1196   img.onload = function()
       
  1197   {
       
  1198     if ( this.loaded )
       
  1199       return true;
       
  1200     var mydiv = document.getElementById('autoCaptcha');
       
  1201     var width = getWidth();
       
  1202     var divw = $(mydiv).Width();
       
  1203     var left = ( width / 2 ) - ( divw / 2 );
       
  1204     mydiv.style.left = left + 'px';
       
  1205     fly_in_top(mydiv, false, true);
       
  1206     this.loaded = true;
       
  1207   };
       
  1208   img.src = makeUrlNS('Special', 'Captcha/' + code);
       
  1209   img.onclick = function() { this.src = this.src + '/a'; };
       
  1210   img.style.cursor = 'pointer';
       
  1211   mydiv.appendChild(img);
       
  1212   domObjChangeOpac(0, mydiv);
       
  1213   var body = document.getElementsByTagName('body')[0];
       
  1214   body.appendChild(mydiv);
       
  1215 }
       
  1216