This commit is contained in:
sparkyx 2021-04-05 15:07:09 +02:00
parent a4fdc4dbce
commit 440b435aaf
5 changed files with 220 additions and 23 deletions

View file

@ -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.

View file

@ -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) {
}
/**========*/
/**========*/

View file

@ -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);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Before After
Before After

View file

@ -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):"";