Change autocomplete and adapt Icard

setWidth is false + indicator icon for ICard
This commit is contained in:
Dany De Bontridder 2017-11-28 20:14:43 +01:00
parent 555841b2c2
commit 0a17ccf833
3 changed files with 3 additions and 4 deletions

BIN
html/image/ajax-loader.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

2
html/js/controls.js vendored
View file

@ -67,7 +67,7 @@ Autocompleter.Base = Class.create({
update.style.position = 'absolute';
Position.clone(element, update, {
setHeight: false,
setWidth:true,
setWidth:false,
offsetTop: element.offsetHeight
});
}

View file

@ -220,7 +220,6 @@ class ICard extends HtmlInput
{
if ($p_name==null&&$this->name=="")
throw (new Exception(_('Le nom d une icard doit être donne')));
$this->value=($p_value==null)?$this->value:$p_value;
if ($this->readOnly==true)
return $this->display();
@ -244,9 +243,9 @@ class ICard extends HtmlInput
if ($this->autocomplete==1)
{
$this->indicator="ind_".$this->id;
$ind=sprintf('<span id="%s" class="autocomplete" style="position:absolute;display:none"><img src="image/ajax-loader.gif" alt="Chargement..."/></span>',
$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";
// $this->indicator="null";
$div=($this->choice_create==1)?sprintf('<div id="%s" class="autocomplete"></div>',
$this->choice):"";