noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 34/73: javascript : test and improve cosmetic


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 34/73: javascript : test and improve cosmetic
Date: Fri, 28 May 2021 05:26:31 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit d6435fcacbba9f18027952e58e73f31aed7075a5
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Fri Apr 23 21:58:28 2021 +0200

    javascript : test and improve cosmetic
---
 html/css/style-classic7.css      | 61 ++++++++++++++++++++++++++-------------
 html/js/smoke.js                 | 10 +++++--
 include/class/pdf_land.class.php |  2 +-
 scenario/smoke.php               | 62 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 112 insertions(+), 23 deletions(-)

diff --git a/html/css/style-classic7.css b/html/css/style-classic7.css
index c6f516b..8a9bed6 100644
--- a/html/css/style-classic7.css
+++ b/html/css/style-classic7.css
@@ -2075,7 +2075,7 @@ td.box {
     z-index:3;
     position:absolute;
     left:10%;
-    border:1px solid #00008B;
+ /*   border:1px solid #00008B;*/
 -moz-box-shadow: 10px 10px 5px #888;
 -webkit-box-shadow: 10px 10px 5px #888;
 box-shadow: 10px 10px 5px #888;
@@ -2085,30 +2085,51 @@ width: 85%;
   color:beige;
   font-weight: bold;
 }
+
+.dialog-title {
+    background: lightgray;
+    padding: 5px;
+    color: black;
+    font-weight:700;
+    font-size:110%;
+    border: 1px edge blue;
+    border-bottom: outset 1px darkgray;
+    color:#665757;
+}
 .dialog-buttons button {
-   color:#FFFFFF;
+    color:darkblue;
     font-weight: normal;
     text-decoration:none;
-    background: #606c88; /* Old browsers */
-    background: -moz-linear-gradient(top, #606c88 0%, #3f4c6b 100%); /* FF3.6+ 
*/
-    background: -webkit-gradient(linear, left top, left bottom, 
color-stop(0%,#606c88), color-stop(100%,#3f4c6b)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top, #606c88 0%,#3f4c6b 100%); /* 
Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top, #606c88 0%,#3f4c6b 100%); /* Opera 
11.10+ */
-    background: -ms-linear-gradient(top, #606c88 0%,#3f4c6b 100%); /* IE10+ */
-    background: linear-gradient(to bottom, #606c88 0%,#3f4c6b 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( 
startColorstr='#606c88', endColorstr='#3f4c6b',GradientType=0 ); /* IE6-9 */
-    border-color:  #605D5D;
-    border-width:0px;
-    padding:4px;
-    margin:3px;
+    font-family: arial,verdana,sans-serif,helvetica;
+     /*! background-image: url("font/bg-submit2.gif"); */ 
+    /*! background-repeat: repeat-x; */
+    /*! background-position: left; */
+    font-size:12px;
+    font-size:0.85rem;
+    font-family: SansationLight;
+    border-style:  ridge ; 
+    border-color: grey ;
+    border-width:1px;
+    padding-bottom: 5px;
+    padding-top: 5px;
+    padding-right: 5px;
+    padding-left:  5px;
+    margin-top:3px;
     cursor:pointer;
     margin:1px 2px 1px 2px;
-    border-radius: 5px;
-    -moz-border-radius:5px;
-    width:7em;
-    width:7rem;
+    font-family: SansationLight;
+  background: lightgray;
+background: -moz-linear-gradient(top, #ffffff 0%, #f1f1f1 50%, #e1e1e1 51%, 
#f6f6f6 100%);
+background: -webkit-linear-gradient(top, #ffffff 0%,#f1f1f1 50%,#e1e1e1 
51%,#f6f6f6 100%);
+background: linear-gradient(to bottom, #ffffff 0%,#f1f1f1 50%,#e1e1e1 
51%,#f6f6f6 100%);
+filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', 
endColorstr='#f6f6f6',GradientType=0 );
+  min-width:5rem !important;
+  border-radius:5px;
+}
+.dialog-buttons button:hover {
+       color:navy;
+       background-color:darkgrey;
 }
-
 .dialog-prompt input {
   margin: 0;
   border: 0;
@@ -2869,4 +2890,4 @@ span.tagcell {
 
 #facturation_div_id {
     margin-top:2rem;
-}
\ No newline at end of file
+}
diff --git a/html/js/smoke.js b/html/js/smoke.js
index b9a05a8..95a1a5a 100644
--- a/html/js/smoke.js
+++ b/html/js/smoke.js
@@ -54,6 +54,7 @@
                     cancel = 'Cancel',
                     classname = '',
                     buttons = '',
+                    sTitle = '',
                     box;
 
             if (f.type === 'prompt') {
@@ -62,7 +63,12 @@
                         '<input id="dialog-input-' + f.newid + '" type="text" 
' + (f.params.value ? 'value="' + f.params.value + '"' : '') + ' />' +
                         '</div>';
             }
-
+            /**
+             * Add a title
+             */
+            if ( f.params.title) {
+                sTitle='<div class="dialog-title">'+f.params.title+'</div>';
+            }
             if (f.params.ok) {
                 ok = f.params.ok;
             }
@@ -119,6 +125,7 @@
             box =
                     '<div id="smoke-bg-' + f.newid + '" 
class="smokebg"></div>' +
                     '<div class="dialog smoke ' + classname + '">' +
+                     sTitle +
                     '<div class="dialog-inner">' +
                     e +
                     prompt +
@@ -425,7 +432,6 @@
             if (g.duration !== 'undefined') {
                 duration = g.duration;
             }
-
             var id = smoke.newdialog();
             smoke.build(e, {
                 type: 'signal',
diff --git a/include/class/pdf_land.class.php b/include/class/pdf_land.class.php
index 811f39b..03bdbd2 100644
--- a/include/class/pdf_land.class.php
+++ b/include/class/pdf_land.class.php
@@ -26,7 +26,7 @@ require_once NOALYSS_INCLUDE.'/class/pdf.class.php';
 class PDFLand extends PDF
 {
 
-    public function __construct ($p_cn = null, $orientation = 'P', $unit = 
'mm', $format = 'A4')
+    public function __construct ($p_cn = null, $orientation = 'L', $unit = 
'mm', $format = 'A4')
     {
 
         if($p_cn == null) die("No database connection. Abort.");
diff --git a/scenario/smoke.php b/scenario/smoke.php
new file mode 100644
index 0000000..fa7e2e7
--- /dev/null
+++ b/scenario/smoke.php
@@ -0,0 +1,62 @@
+<?php
+//@description: test smoke javascript for managing dialog box
+
+?>
+<h1> smoke alert</h1>
+<pre>
+               smoke.alert('alert',func_callback,{title:"Titre"});
+</pre>
+
+<script>
+       function func_callback() {
+               alert("Function called");
+       }
+       function smoke_alert()
+       {
+               smoke.alert('alert',func_callback,{title:"Titre"});
+       }
+       
+</script>
+<button onclick="smoke_alert()">smoke_alert</button>
+
+<h1> smoke confirm</h1>
+<pre>
+               smoke.confirm('Confirmez-vous',function(ev) { if (ev) { 
alert("confirmé");},{title:"Titre"});
+</pre>
+
+<script>
+
+       function smoke_confirm()
+       {
+               smoke.confirm('Confirmez-vous',function(ev) { if (ev) { 
alert("confirmé");}},{title:"Titre"});
+       }
+       
+</script>
+<button onclick="smoke_confirm()">smoke_confirm</button>
+
+<h1> smoke prompt</h1>
+<pre>
+       function func_callback_prompt(ev)
+       {
+               if (ev) { alert ("accepted  "+ev);}
+               console.debug(ev);
+               return true;
+       }
+       
+smoke.prompt('Confirmez-vous',func_callback_prompt,{title:"Titre"});
+</pre>
+
+<script>
+       function func_callback_prompt(ev)
+       {
+               if (ev) { alert ("accepted  "+ev);}
+               console.debug(ev);
+               return true;
+       }
+       function smoke_prompt()
+       {
+               smoke.prompt('Donnez un 
élement',func_callback_prompt,{title:"Titre"});
+       }
+       
+</script>
+<button onclick="smoke_prompt()">smoke_prompt</button>



reply via email to

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