size of attribut

This commit is contained in:
Dany De Bontridder 2011-12-03 21:21:16 +00:00
parent 42711f8088
commit 89d899fec8
6 changed files with 21 additions and 15 deletions

View file

@ -1,6 +1,9 @@
begin;
update attr_def set ad_type='numeric' where ad_id=20;
update attr_def set ad_type='poste' where ad_id=5;
update attr_def set ad_type='numeric',ad_size=6 where ad_id in (20,31);
update attr_def set ad_size=17 where ad_type='poste';
insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) select split_part(tva_poste,',',1),tva_comment,substring(split_part(tva_poste,',',1),1,3),'PAS' from tva_rate where split_part(tva_poste,',',1) not in (select pcm_val from tmp_pcmn);
insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) select split_part(tva_poste,',',2),tva_comment,substring(split_part(tva_poste,',',2),1,3),'ACT' from tva_rate where split_part(tva_poste,',',2) not in (select pcm_val from tmp_pcmn);

View file

@ -299,7 +299,7 @@ function fill_ipopcard(obj)
var content='card_'+card_layer;
var nTop=posY-40;
var nLeft=posX-20;
var str_style="top:"+nTop+";left:"+nLeft+";width:40em;height:auto";
var str_style="top:"+nTop+";left:"+nLeft+";width:45em;height:auto";
var popup={'id': content,'cssclass':'inner_box','style':str_style,'html':loading(),'drag':true};

View file

@ -643,6 +643,7 @@ class Fiche
$w=new IPoste("av_text".$r->ad_id);
$w->set_attribute('ipopup','ipop_account');
$w->set_attribute('account',"av_text".$r->ad_id);
$w->width=$r->ad_size;
$w->table=0;
$bulle=HtmlInput::infobulle(14);
break;
@ -651,6 +652,7 @@ class Fiche
// filter on frd_id
$sql=' select fd_id from fiche_def ';
$filter=$this->cn->make_list($sql);
$w->width=$r->ad_size;
$w->extra=$filter;
$w->extra2=0;
$label=new ISpan();

View file

@ -88,7 +88,7 @@ class Fiche_Def
$t->jnt_order=$row['jnt_order'];
$t->ad_size=$row['ad_size'];
$t->ad_type=$row['ad_type'];
$this->attribut[$i]=$t;
$this->attribut[$i]=clone $t;
}
return $this->attribut;
}

View file

@ -21,8 +21,8 @@
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
/*!\file
* \brief Html Input
*
* \brief Html Input
*
*/
require_once('class_html_input.php');
require_once('class_itext.php');
@ -31,7 +31,7 @@ require_once('class_ipopup.php');
require_once('function_javascript.php');
/**
*@brief show a button, for selecting a account and a input text for manually inserting an account
* the different value of table are
* the different value of table are
* - 0 no table, it means no TD tags
* - 1 the button and the text are separated by TD tags
* - 2 the button and the text are in the same column (TD)
@ -63,11 +63,11 @@ require_once('function_javascript.php');
echo js_include('controls.js');
echo js_include('dragdrop.js');
echo js_include('accounting_item.js');
require_once('class_iposte.php');
echo IPoste::ipopup('ipop_account');
// In the FORM
$text=new IPoste();
$text->name('field');
@ -76,8 +76,8 @@ $text->set_attribute('ipopup','ipop_account');
$text->set_attribute('gDossier',Dossier::id());
$text->set_attribute('jrn',0);
$text->set_attribute('account','field');
\endcode
*/
class IPoste extends HtmlInput
@ -88,8 +88,6 @@ class IPoste extends HtmlInput
$this->name=$p_name;
$this->readOnly=false;
$this->size=10;
$this->width=50;
$this->heigh=20;
$this->value=$p_value;
$this->selected="";
$this->table=0;
@ -152,7 +150,7 @@ class IPoste extends HtmlInput
/* create the text */
$itext=new IText($this->name,$this->value);
$itext->size=$this->size;
/* create the button */
$ibutton=$this->dsp_button();
if ( $this->table==3)

View file

@ -1,3 +1,6 @@
update attr_def set ad_type='numeric' where ad_id=20;
insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) select split_part(tva_poste,',',1),tva_comment,substring(split_part(tva_poste,',',1),1,3),'PAS' from tva_rate where split_part(tva_poste,',',1) not in (select pcm_val from tmp_pcmn);
insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) select split_part(tva_poste,',',2),tva_comment,substring(split_part(tva_poste,',',2),1,3),'ACT' from tva_rate where split_part(tva_poste,',',2) not in (select pcm_val from tmp_pcmn);
insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) select split_part(tva_poste,',',2),tva_comment,substring(split_part(tva_poste,',',2),1,3),'ACT' from tva_rate where split_part(tva_poste,',',2) not in (select pcm_val from tmp_pcmn);
update attr_def set ad_type='numeric',ad_size=6 where ad_id=20;
update attr_def set ad_type='poste' where ad_id=5;
update attr_def set ad_size=10 where ad_type='poste';