Browse Source

interception touches F5 et Cmd/Ctrl+R pour gérer les actualisations

Rajah 8 months ago
parent
commit
2942651b10

+ 3 - 2
html/index.jsp

@@ -1,8 +1,9 @@
-<!DOCTYPE html>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
 <HTML>
 <HEAD>
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
 <TITLE>Intranet Alchimique</TITLE>
+<LINK REL="stylesheet" HREF="/pages/styles/general.css" TYPE="text/css">
 </HEAD>
 
 <BODY>
@@ -10,6 +11,6 @@
 <!--
 document.location.href = '/vote/servlet/menu?ttt=10102';
 //-->
-</SCRIPT>
+</SCRIPT><NOSCRIPT><CENTER><SPAN CLASS="texte"><BR><BR><BR>Le JavaScript ou équivalent est nécessaire pour faire fonctionner ce site web.</SPAN></CENTER></NOSCRIPT>
 </BODY>
 </HTML>

+ 1 - 0
html/pages/cameras.jsp

@@ -57,6 +57,7 @@ function replacerFenetre()  {
   }
 replacerFenetre();
 window.onresize = replacerFenetre;
+document.onkeydown = function (e) { if ((e.keyCode == 82 && (e.ctrlKey || e.metaKey)) || (e.keyCode == 116)) { e.preventDefault(); document.location.reload(); } };
 </SCRIPT>
 </BODY>
 </HTML>

+ 4 - 1
html/pages/messages.jsp

@@ -153,7 +153,10 @@ replacerFenetre();
 window.onresize = replacerFenetre;
 
 setTimeout("recuperer();", 500);
-document.onkeydown = function(e) { if (e.keyCode == 13) { envoyer(); return false; } };
+document.onkeydown = function(e) { 
+	if (e.keyCode == 13) { envoyer(); return false; } 
+	if ((e.keyCode == 82 && (e.ctrlKey || e.metaKey)) || (e.keyCode == 116)) { recuperer(); e.preventDefault(); }
+	};
 if (form != null) { form.cmsg_msg.focus(); }
 
 </SCRIPT>

+ 1 - 0
html/pages/planning.jsp

@@ -161,6 +161,7 @@ function replacerFenetre()  {
   }
 replacerFenetre();
 window.onresize = replacerFenetre;
+document.onkeydown = function (e) { if ((e.keyCode == 82 && (e.ctrlKey || e.metaKey)) || (e.keyCode == 116)) { e.preventDefault(); document.location.reload(); } };
 </SCRIPT>
 </BODY>
 </HTML>

+ 3 - 0
html/pages/scripts/general.js

@@ -32,3 +32,6 @@ function replacerCadre()  {
     cadre.style.left = '' + Math.max(2, (largeurBody - largeurCadre) / 2) + 'px';
     }
   }
+
+document.onkeydown = function (e) { if ((e.keyCode == 82 && (e.ctrlKey || e.metaKey)) || (e.keyCode == 116)) { e.preventDefault(); } };
+ 

+ 1 - 0
html/pages/table.jsp

@@ -160,6 +160,7 @@ function replacerFenetre()  {
   }
 replacerFenetre();
 window.onresize = replacerFenetre;
+document.onkeydown = function (e) { if ((e.keyCode == 82 && (e.ctrlKey || e.metaKey)) || (e.keyCode == 116)) { e.preventDefault(); <% if (beanTable.isActualisationPermise()) { %>actualiser('<%=beanTable.getLienActualiser()%>');<% } %> } };
 <% if (beanTable.isActualisationAutomatique()) { %>setTimeout("actualiser('<%=beanTable.getLienActualiser()%>');", 30000);<% } %>
 </SCRIPT>
 </BODY>

File diff suppressed because it is too large
+ 1 - 1
src/fr/triplea/vote/servlet/Menu.java