From 31ee414cc67e9ff054d704d9eab69cad1021e1b5 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sat, 7 Jan 2012 04:58:01 +0000 Subject: [PATCH] cosmetic : input_text_ro add date fin (ad_id=33) cosmetic fiche : itext --- html/style-color.css | 9 +++++-- html/style-epad.css | 5 ++++ html/style-light.css | 11 ++++++--- html/style.css | 7 +++++- include/class_itext.php | 12 +++++----- include/template/result_cat_card_summary.php | 25 ++++++++++++++------ sql/upgrade.sql | 4 +++- 7 files changed, 53 insertions(+), 20 deletions(-) diff --git a/html/style-color.css b/html/style-color.css index 7d04c08c7..6f88b88a7 100644 --- a/html/style-color.css +++ b/html/style-color.css @@ -540,6 +540,11 @@ a.document:hover { display:block; +} +.input_text_ro { + border:solid 1px blue; + background:lightgrey; + margin:1px; } .input_text { border:groove 1px blue; @@ -839,7 +844,7 @@ a#anchorbutton:hover, .button:hover,a.button:hover,div.content a.button:hover { td.tool { border: solid 1px gray; background-color:white; - + } div.topmenu { width:100%; @@ -1104,7 +1109,7 @@ a.nav:hover,div.content a.nav:hover,div.redcontent a.nav:hover { float:left; width:40em; top:0px; - + } div.foldercontent { diff --git a/html/style-epad.css b/html/style-epad.css index 8c9054456..58beef6dd 100644 --- a/html/style-epad.css +++ b/html/style-epad.css @@ -540,6 +540,11 @@ a.document:hover { display:block; +} +.input_text_ro { + border:solid 1px blue; + background:#EDEDED; + margin:1px; } .input_text { border:groove 1px blue; diff --git a/html/style-light.css b/html/style-light.css index 66211e8f0..f89489818 100644 --- a/html/style-light.css +++ b/html/style-light.css @@ -316,7 +316,7 @@ a.mtitle { text-decoration:none; display:inline; color: blue; - + } a.mtitle:hover { font-size:10px; @@ -535,6 +535,11 @@ a.document:hover { display:block; +} +.input_text_ro { + border:solid 1px blue; + background:#EDEDED; + margin:1px; } .input_text { border:groove 1px blue; @@ -804,7 +809,7 @@ a#anchorbutton, .button, a.button,div.content a.button { color:lightblue; font-weight: bold; border:1px black outset ; - + background-image: url("image/bg-submit5.png"); background-repeat: repeat-x; background-position: left; @@ -820,7 +825,7 @@ background-repeat: repeat-x; margin-left:3px; cursor:pointer; font-size:1.1em; - + } a#anchorbutton:hover, .button:hover,a.button:hover,div.content a.button:hover { cursor:pointer; diff --git a/html/style.css b/html/style.css index 6aed23698..369e31073 100644 --- a/html/style.css +++ b/html/style.css @@ -535,6 +535,11 @@ a.document:hover { display:block; +} +.input_text_ro { + border:solid 1px blue; + background:#EDEDED; + margin:1px; } .input_text { border:groove 1px blue; @@ -832,7 +837,7 @@ a#anchorbutton:hover, .button:hover,a.button:hover,div.content a.button:hover { td.tool { border: solid 1px gray; background-color: white; - + } div.topmenu { margin-top:2px; diff --git a/include/class_itext.php b/include/class_itext.php index 306bc7854..ed138fdbd 100644 --- a/include/class_itext.php +++ b/include/class_itext.php @@ -21,7 +21,7 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /*!\file - * \brief Html Input + * \brief Html Input */ require_once('class_html_input.php'); class IText extends HtmlInput @@ -56,8 +56,8 @@ class IText extends HtmlInput 'NAME="'.$this->name.'" VALUE="'.$this->value.'" '. ' style="width:'.$this->css_size.';" '.$this->javascript." $this->extra >"; - } - + } + if ( $this->table == 1 ) $r=''.$r.''; return $r; @@ -71,16 +71,16 @@ class IText extends HtmlInput $extra=(isset($this->extra))?$this->extra:""; $readonly=" readonly "; - $style='style="border:solid 1px blue;color:black;background:#EDEDED"'; $this->value=str_replace('"','',$this->value); + $this->style=' class="input_text_ro" '; if ( ! isset ($this->css_size)) { - $r='javascript." $readonly $this->extra >"; } else { - $r='javascript." $readonly $this->extra >"; diff --git a/include/template/result_cat_card_summary.php b/include/template/result_cat_card_summary.php index be4f06501..1d1eb22df 100644 --- a/include/template/result_cat_card_summary.php +++ b/include/template/result_cat_card_summary.php @@ -1,20 +1,20 @@
-ad_text,'style="color:blue;padding: 0 5 1 10"'); endfor; ?> -'; - else + else echo ''; $fiche=new Fiche($cn); $fiche->id=$row['f_id']; @@ -22,10 +22,21 @@ foreach ($array as $row ) : $detail=HtmlInput::card_detail($fiche->strAttribut(ATTR_DEF_QUICKCODE)); echo td($detail); foreach($fiche->attribut as $attr) : - echo td($attr->av_text,'style="padding: 0 10 1 10;white-space:nowrap;"'); - endforeach; + if ( $attr->ad_type != 'select'): + echo td($attr->av_text,'style="padding: 0 10 1 10;white-space:nowrap;"'); + else: + $value=$cn->make_array($attr->ad_extra); + for ($e=0;$eav_text): + echo td($value[$e]['label'],'style="padding: 0 10 1 10;white-space:nowrap;"'); + break; + endif; + endfor; + + endif; + endforeach; echo ''; -endforeach; +endforeach; ?>
diff --git a/sql/upgrade.sql b/sql/upgrade.sql index 98aedbc45..88d5f9725 100644 --- a/sql/upgrade.sql +++ b/sql/upgrade.sql @@ -1 +1,3 @@ -alter table attr_def add ad_extra text ; \ No newline at end of file +alter table attr_def add ad_extra text ; + +insert into attr_def (ad_id,ad_text,ad_type,ad_size) values (33,'Date Fin','date',8); \ No newline at end of file