phpcompta-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpcompta-dev] r5396 - in phpcompta/trunk: html html/js include


From: phpcompta-dev
Subject: [Phpcompta-dev] r5396 - in phpcompta/trunk: html html/js include
Date: Tue, 17 Sep 2013 19:24:47 +0200 (CEST)

Author: danydb
Date: 2013-09-17 19:24:46 +0200 (Tue, 17 Sep 2013)
New Revision: 5396

Modified:
   phpcompta/trunk/html/js/scripts.js
   phpcompta/trunk/html/style.css
   phpcompta/trunk/include/ac_common.php
Log:
New javascript function : error_message which displays a error message into a 
div

Modified: phpcompta/trunk/html/js/scripts.js
===================================================================
--- phpcompta/trunk/html/js/scripts.js  2013-09-17 17:23:04 UTC (rev 5395)
+++ phpcompta/trunk/html/js/scripts.js  2013-09-17 17:24:46 UTC (rev 5396)
@@ -1967,7 +1967,17 @@
                                  }
                                  );
     } catch (e) {
-        info_message(e.getMessage);
+        error_message(e.getMessage);
     }
     
+}
+/**
+ address@hidden display the error message into the div error_content_div 
(included into error_div)
+ address@hidden message message to display
+ address@hidden there is no protection
+ */
+function error_message(message)
+{
+    $('error_content_div').innerHTML=message;
+    $('error_div').style.visibility='visible';
 }
\ No newline at end of file

Modified: phpcompta/trunk/html/style.css
===================================================================
--- phpcompta/trunk/html/style.css      2013-09-17 17:23:04 UTC (rev 5395)
+++ phpcompta/trunk/html/style.css      2013-09-17 17:24:46 UTC (rev 5396)
@@ -1316,4 +1316,27 @@
     top:2em;
     left:20%;
     width:50%;
+}
+#error_div{
+    position:absolute;
+    border:1px solid black;
+    background-color:whitesmoke;
+    padding-bottom: 2px;
+    padding-top: 2px;
+    padding-left: 2px;
+    padding-right: 2px;
+    color:red;
+    top:20%;left:25%;
+    visibility:hidden;
+    width:40em;
+    z-index:20;
+}
+#error_div h2 {
+    background: red;
+}
+div#error_content_div {
+   font-size: 1.2em;
+   color:error;
+   font-weight: bold;
+   text-align: center;
 }
\ No newline at end of file

Modified: phpcompta/trunk/include/ac_common.php
===================================================================
--- phpcompta/trunk/include/ac_common.php       2013-09-17 17:23:04 UTC (rev 
5395)
+++ phpcompta/trunk/include/ac_common.php       2013-09-17 17:24:46 UTC (rev 
5396)
@@ -310,7 +310,15 @@
     ';
 
     echo "<BODY $p_script>";
-       echo '<div id="info_div"></div>';
+    echo '<div id="info_div"></div>';
+    echo '<div id="error_div">'.
+            HtmlInput::title_box("Erreur", 'error_div','hide').
+            '<div id="error_content_div">'.
+            '</div>'.
+            '<p style="text-align:center">'.
+            
HtmlInput::button_action('Valider','$(\'error_div\').style.visibility=\'hidden\';$(\'error_content_div\').innerHTML=\'\';').
+            '</p>'.
+            '</div>';
 // language
     if (isset($_SESSION['g_lang']))
     {



---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]