noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 06/73: Cosmetic


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 06/73: Cosmetic
Date: Fri, 28 May 2021 05:26:15 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 440b435aafa802cae398f4fa508688db898bebf4
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Mon Apr 5 15:07:09 2021 +0200

    Cosmetic
---
 doc/developper/Doxyfile     |   2 +-
 html/css/style-classic7.css |  10 +--
 html/fid_card.php           |  31 ++++---
 html/image/logo9000.png     | Bin 37158 -> 56350 bytes
 include/lib/icard.class.php | 200 +++++++++++++++++++++++++++++++++++++++++++-
 5 files changed, 220 insertions(+), 23 deletions(-)

diff --git a/doc/developper/Doxyfile b/doc/developper/Doxyfile
index 766c242..9901901 100644
--- a/doc/developper/Doxyfile
+++ b/doc/developper/Doxyfile
@@ -31,7 +31,7 @@ PROJECT_NAME           = noalyss
 # This could be handy for archiving the generated documentation or
 # if some version control system is used.
 
-PROJECT_NUMBER         = Version-8.1
+PROJECT_NUMBER         = Version-9
 
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
 # base path where the generated documentation will be put.
diff --git a/html/css/style-classic7.css b/html/css/style-classic7.css
index d127470..c55e512 100644
--- a/html/css/style-classic7.css
+++ b/html/css/style-classic7.css
@@ -777,7 +777,7 @@ a#anchorbutton:hover, 
.button:hover,a.button:hover,div.content a.button:hover  {
     border-color:orange;
 }
 a#smallanchorbutton, .smallbutton, a.smallbutton,div.content a.smallbutton {
-    color:#FFFFFF;
+    color:darkblue;
     font-weight: normal;
     text-decoration:none;
     font-family: arial,verdana,sans-serif,helvetica;
@@ -801,17 +801,17 @@ a#smallanchorbutton, .smallbutton, 
a.smallbutton,div.content a.smallbutton {
     /*! -moz-border-radius: 2px; */
     -webkit-border-radius: 5px;
     font-family: SansationLight;
-  background: #ffffff;
+  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 );
-     color: #746B6B;
+  
 }
 a#smallanchorbutton:hover, .smallbutton:hover,a.smallbutton:hover,div.content 
a.smallbutton:hover  {
     cursor:pointer;
     background-color:#FFFFFF;
-    color:darkblue;
+    color:orangered;
     margin:1px 2px 1px 2px;
    /* Permalink - use to edit and share this gradient: 
http://colorzilla.com/gradient-editor/#ffffff+0,f1f1f1+50,e1e1e1+51,f6f6f6+100;White+Gloss+%231
 */
 background: #f6f6f6;
@@ -2853,4 +2853,4 @@ span.tagcell {
  @media (min-width: 1200px) {
 
  }
- /**========*/
\ No newline at end of file
+ /**========*/
diff --git a/html/fid_card.php b/html/fid_card.php
index 8c5180c..0e16ef7 100644
--- a/html/fid_card.php
+++ b/html/fid_card.php
@@ -23,16 +23,9 @@
 /*!\file
  * \brief this file is used by the autocomplete functionnality
  *\see ICard
- */
-
-require_once '../include/constant.php';
-require_once NOALYSS_INCLUDE.'/class/database.class.php';
-require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
-require_once NOALYSS_INCLUDE.'/class/dossier.class.php';
-/*!\brief
- *  Received parameters are
+ * *  Received parameters are
  *   - j for the ledger
- *   - e for extra (typecard)
+ *   - e for extra (typecard)poss. values : all , a sql condition or a  list 
of fd_id (fiche_def.fd_id) separated by comma
  *   - type is the ledger type (ach, ven, fin, gl or nothing)
  *   - FID contains the string the user is typing
  *\note the typecard can be
@@ -42,6 +35,12 @@ require_once NOALYSS_INCLUDE.'/class/dossier.class.php';
  *   - list of fd_id
  *
  */
+
+require_once '../include/constant.php';
+require_once NOALYSS_INCLUDE.'/class/database.class.php';
+require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
+require_once NOALYSS_INCLUDE.'/class/dossier.class.php';
+ 
 $http=new HttpInput();
 
 $jrn= $http->request("j","number",-1); 
@@ -50,7 +49,7 @@ $limit=$http->request("limit","number",12);
 $jrn= $http->request("j","number",-1); 
 $filter_card="";
 $cn=Dossier::connect();
-$d=$http->request('e');
+$typecard=$http->request('e');
 $filter_card='';
 
 require_once('class/user.class.php');
@@ -60,19 +59,19 @@ $g_user->check();
 $g_user->check_dossier(dossier::id());
 set_language();
 
-if ( $d == 'all')
+if ( $typecard == 'all')
 {
     $filter_card='';
 }
-else if (strpos($d,'sql]')==true)
+else if (strpos($typecard,'sql]')==true)
 {
-       $filter_card=  str_replace('[sql]', " and ", $d);
+       $filter_card=  str_replace('[sql]', " and ", $typecard);
 } else
-    $filter_card="and fd_id in ($d)";
+    $filter_card="and fd_id in ($typecard)";
 
 if ( $jrn != -1 )
 {
-    switch ($d)
+    switch ($typecard)
     {
     case 'cred':
         $filter_jrn=$cn->make_list("select jrn_def_fiche_cred from jrn_def 
where jrn_def_id=$1",array($jrn));
@@ -170,7 +169,7 @@ if ($sql != false && sizeof($sql) != 0 )
               );
     }
     echo '</ul>';
-    if (count($sql) > 12)
+    if (count($sql) > $limit)
     {
         printf ('<i>...'._('Résultat limité à %s').'  ...</i>',$limit);
     }
diff --git a/html/image/logo9000.png b/html/image/logo9000.png
index 788d6ff..1443fcc 100644
Binary files a/html/image/logo9000.png and b/html/image/logo9000.png differ
diff --git a/include/lib/icard.class.php b/include/lib/icard.class.php
index 70c9353..ed69aac 100644
--- a/include/lib/icard.class.php
+++ b/include/lib/icard.class.php
@@ -178,7 +178,203 @@ class ICard extends HtmlInput
         $this->typecard='all';
         $this->autocomplete_file="fid_card.php";
     }
-   
+    /**
+     * Function javascript by default it is update_value called BEFORE the 
querystring is send in ajax
+     * @return type
+     */
+    public function get_fct()
+    {
+        return $this->fct;
+    }
+    /**
+     * @brief id_of_div_to_populate with the output of the autocomplete_file, 
it is
+     * the autocomplete div presenting a list of possible choices. Default 
{this->id}_choices
+     * 
+     * @return html string (
+     */
+    public function get_choice()
+    {
+        if ( $this->choice==null) {
+            return sprintf("%s_choices", $this->id);
+        }
+        return $this->choice;
+    }
+    /**
+     * Id of the element to show that it is seaching
+     * @return type
+     */
+    public function get_indicator()
+    {
+        return $this->indicator;
+    }
+   /**
+     * @brief 1 if you want to create automatically the autocomplete DIV to 
fill with the the output of 
+    * "autocomplete_file"  or 0 if this DIV is created explicitly
+     * 
+     * @return this
+     */
+    public function get_choice_create()
+    {
+        return $this->choice_create;
+    }
+    /**
+     * @brief 1 autocomplete enable ; 0 autocomplete disable
+     * @return type
+     */
+    public function get_autocomplete()
+    {
+        return $this->autocomplete;
+    }
+    /**
+     * CSS Style  of the INPUT TEXT element
+     * @return type
+     */
+    public function get_style()
+    {
+        return $this->style;
+    }
+    /***
+     * @brief $accvis account_visible =1 otherwise 0, default 1
+     */
+    public function get_accvis()
+    {
+        return $this->accvis;
+    }
+
+    public function get_limit()
+    {
+        return $this->limit;
+    }
+    /**
+     * @brief amount_from_type : accountancy , sell or purchase price
+     * 
+     */
+    public function get_amount_from_type()
+    {
+        return $this->amount_from_type;
+    }
+
+    public function get_typecard()
+    {
+        return $this->typecard;
+    }
+    /**
+     * @brief php file to call to complete info from the card
+     * @param string $autocomplete_file
+     * @see fid_card.php
+     * @return $this
+     */
+    public function get_autocomplete_file()
+    {
+        return $this->autocomplete_file;
+    }
+    /***
+    * @brief Function javascript by default it is update_value called BEFORE 
the querystring is send in ajax
+    *@see afterUpdateElement
+    */
+    public function set_fct($fct)
+    {
+        $this->fct=$fct;
+        return $this;
+    }
+   /**
+     * @brief id_of_div_to_populate with the output of the autocomplete_file, 
it is
+     * the autocomplete div presenting a list of possible choices. Default 
{this->id}_choices
+     * 
+     * @return html string (
+     */
+    public function set_choice($choice)
+    {
+        $this->choice=$choice;
+        return $this;
+    }
+    /**
+     * @brief Id of the element to show that it is seaching
+     */
+    public function set_indicator($indicator)
+    {
+        $this->indicator=$indicator;
+        return $this;
+    }
+   /**
+     * @brief 1 if you want to create automatically the autocomplete DIV to 
fill with the the output of 
+    * "autocomplete_file"  or 0 if this DIV is created explicitly
+     * 
+     * @return this
+     */
+    public function set_choice_create($choice_create)
+    {
+        $this->choice_create=$choice_create;
+        return $this;
+    }
+    /**
+     * @brief 1 autocomplet enable ; 0 autocomplete disable
+     * @return type
+     */
+    public function set_autocomplete($autocomplete)
+    {
+        $this->autocomplete=$autocomplete;
+        return $this;
+    }
+    /**
+     * CSS Style  of the INPUT TEXT element
+     * @return type
+     */
+    public function set_style($style)
+    {
+        $this->style=$style;
+        return $this;
+    }
+    /***
+     * @brief $accvis account_visible =1 otherwise 0, default 1
+     */
+    public function set_accvis($accvis)
+    {
+        $this->accvis=$accvis;
+        return $this;
+    }
+
+    public function set_limit($limit)
+    {
+        $this->limit=$limit;
+        return $this;
+    }
+    /**
+     * @brief amount_from_type : accountancy , sell or purchase price
+     * @parameter $amount_from_type ACH VEN or GL
+     * 
+     */
+    public function set_amount_from_type($amount_from_type)
+    {
+        if ( ! in_array($amount_from_type,array("ACH","VEN","GL"))) {
+            throw new Exception('icard.305 
'.sprintf("[%s]",$amount_from_type));
+        }
+        $this->amount_from_type=$amount_from_type;
+        return $this;
+    }
+    /**
+     * argument "e" passed to autocomplete_file ,
+     * @see fid_card.php
+     * @param type $typecard
+     * @return $this
+     */
+    public function set_typecard($typecard)
+    {
+        $this->typecard=$typecard;
+        return $this;
+    }
+    /**
+     * @brief php file to call to complete info from the card
+     * @param string $autocomplete_file
+     * @see fid_card.php
+     * @return $this
+     */
+    public function set_autocomplete_file($autocomplete_file)
+    {
+        $this->autocomplete_file=$autocomplete_file;
+        return $this;
+    }
+
     /**
      * @brief in the search box, the accounting will be shown it is the default
      */
@@ -292,10 +488,12 @@ class ICard extends HtmlInput
         );
         if ($this->autocomplete==1)
         {
+            // --- indicator 
             $this->indicator="ind_".$this->id;
             $ind=sprintf('<span id="%s" class="autocomplete" 
style="position:absolute;display:none;margin-left:-20px"><img 
src="image/ajax-loader.gif" alt="Chargement..."/></span>',
                     $this->indicator);
            // $this->indicator="null";
+            
             $div=($this->choice_create==1)?sprintf('<div id="%s"  
class="autocomplete"></div>',
                             $this->choice):"";
 



reply via email to

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