diff --git a/html/style-classic7.css b/html/style-classic7.css index 6bb8ce04d..4baeb9e06 100644 --- a/html/style-classic7.css +++ b/html/style-classic7.css @@ -264,6 +264,7 @@ td.mtitle { border-bottom-left-radius: 0px; border-collapse: collapse; + background-color: #366497; } @media only screen and (max-width:1250px) { td.mtitle { @@ -278,16 +279,15 @@ td.mtitle { } } td.mtitle a.mtitle { - color : white; + color : lightblue; display:block; font-size:1rem; font-family:OpenSansRegular; - /*! width:100%; */ padding:0px; margin:0px; - height:100%; + height:42px; padding:4px 0px 0px 0px; - + border-radius:4px; } @media only screen and (max-width:1280px) { td.mtitle a.mtitle { @@ -367,7 +367,7 @@ a.mtitle { text-decoration:none; display:inline; color: #0000FF; - pointer:cursor; + cursor: pointer; background-color: transparent; } a.mtitle:hover { @@ -517,7 +517,7 @@ a.document:hover { margin:1px; } .input_text { - border:solid text #4b4b91; + border:1px solid #4b4b91; margin:1px; border-radius: 2px; } @@ -753,7 +753,7 @@ a#anchorbutton:hover, .button:hover,a.button:hover,div.content a.button:hover { } a#smallanchorbutton, .smallbutton, a.smallbutton,div.content a.smallbutton { color:#FFFFFF; - font-weight: bold; + font-weight: normal; text-decoration:none; font-family: arial,verdana,sans-serif,helvetica; /*! background-image: url("image/bg-submit2.gif"); */ @@ -922,7 +922,7 @@ div.inner_box { /*! -webkit-box-shadow: 10px 10px 5px #888; */ box-shadow: 15px 15px 15px #888; font-size:14.4px; -font-size:0.90rem; +font-size:0.9rem; } div.inner_box { width: 85%; @@ -930,7 +930,7 @@ div.inner_box { @media only screen and (min-width: 1281px) { div.inner_box { width: 85%; - /*! border-radius: 9px; */ + border-radius: 9px; /*! padding: 5px; */ } } @@ -1230,17 +1230,25 @@ h1.title { } h2.title { - color:#FFFFFF; + color:white; text-align:center; padding-top: 9px; margin-top: 0px; padding-bottom: 2px; - background-color: #366497; - font-size: 1.05rem; + background-color: #5681B7; + font-size: 1.1rem; height: 25px; vertical-align: middle; + border-bottom: white; + border-bottom-style: groove; + border-bottom-width: 2px; + font-style: normal; + font-stretch: normal; + font-variant-caps: all-small-caps; + font-family: OpenSansRegular; + margin-bottom: 1px; } h3.title { color: #0000FF; @@ -1304,7 +1312,7 @@ div.menu2 a.mtitle:hover { /*! padding: 5px; */ } div.menu2 table { - border-collapse: collapse; + border-collapse: separate; /*! border-spacing:1px; */ } div.menu3 { @@ -1977,8 +1985,8 @@ td.box { right: 0px; visibility: hidden; opacity: 0; - background: rgba(0,0,0,.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#90000000,endColorstr=#900000000); + background-color: rgba(0,0,0,.3); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#90000000,endColorstr=#90000000); } .smoke-base.smoke-visible { @@ -2257,7 +2265,7 @@ div.menu2 td.mtitle, div.menu2 td.mtitle a{ border-width: 0.1px; border-color:white; height:25px; - /*! border-radius: 0px 0px 0px 10px; */ + border-radius: 4px 4px 4px 4px; } div.menu2 td.mtitle a{ border-width:0px; @@ -2282,7 +2290,7 @@ div.menu2 td.mtitle a{ */ div.bxbutton .icon { - color:white; + /*! color:white; */ text-decoration:none; margin-left: 6px; margin-right:6px; @@ -2292,6 +2300,7 @@ div.bxbutton .icon cursor: pointer; border:0px; height: 18px; + color: #f0d19a; } div.bxbutton .icon:hover { @@ -2488,7 +2497,6 @@ p.info { /* Cell with tag */ span.tagcell { border-radius:3px; - border:1px solid darkblue; padding:3px;margin:1px; display: inline-block; } diff --git a/include/ajax/ajax_card.php b/include/ajax/ajax_card.php index 3c0e86d57..ce42ebc65 100644 --- a/include/ajax/ajax_card.php +++ b/include/ajax/ajax_card.php @@ -110,14 +110,18 @@ switch($op2) case 'dc': $f=new Fiche($cn); /* add title + close */ - $html=HtmlInput::title_box(_("Détail fiche"), $ctl,"close","","y"); - + $qcode=$http->request("qcode","string",false); // if there is no qcode then try to find it thanks the card id - if ( ! isset ($qcode) ){ + if ( $qcode == false ){ $f->id=$http->get("f_id","number"); $qcode=$f->get_quick_code(); + } else { + $f->get_by_qcode($qcode); + } - + $title=$f->getLabelCategory(); + $html=HtmlInput::title_box($title, $ctl,"close","","y"); + // after save , we can either show a card in readonly or update a row $safter_save=$http->request("after_save","string","1"); switch ($safter_save) @@ -134,22 +138,21 @@ case 'dc': break; } - if ( $qcode != '') + if ( $qcode != null) { - $f->get_by_qcode($qcode); - $can_modify=$g_user->check_action(FIC); - if ( isset($ro) ) - { - $can_modify=0; - } - if ( $can_modify==1) - $card=$f->Display(false,$ctl); - else - $card=$f->Display(true); - if ( $card == 'FNT' ) - { - $html.='
| Quickcode'.$info.' | '. ''._('Poste').$info_poste.' | '. @@ -2040,7 +2040,7 @@ class Acc_Ledger extends jrn_def_sql echo ''; $op=new Pre_operation($cn); $op->p_jrn=$id; - $op->od_direct='t'; + if ($op->count()!=0) { echo HtmlInput::submit('use_opd', diff --git a/include/class/fiche.class.php b/include/class/fiche.class.php index b62f6d74c..579e5fa90 100644 --- a/include/class/fiche.class.php +++ b/include/class/fiche.class.php @@ -20,7 +20,7 @@ // Copyright Author Dany De Bontridder danydb@aevalys.eu -include_once("class/fiche_attr.class.php"); +require_once NOALYSS_INCLUDE."/class/fiche_attr.class.php"; require_once NOALYSS_INCLUDE.'/lib/ispan.class.php'; require_once NOALYSS_INCLUDE.'/lib/itva_popup.class.php'; require_once NOALYSS_INCLUDE.'/lib/itext.class.php'; @@ -60,7 +60,7 @@ class Fiche $this->id=$p_id; $this->quick_code=''; $this->attribut=array(); - $f_enable='1'; + $this->f_enable='1'; } public function get_id() { @@ -162,8 +162,8 @@ class Fiche /** *@brief set an attribute by a value, if the attribut array is empty * a call to getAttribut is performed - *@param the AD_ID - *@param the value + *@param int AD_ID + *@param int value *@see constant.php table: attr_def */ function setAttribut($p_ad_id,$p_value) @@ -253,9 +253,9 @@ class Fiche } /** * @brief find the card with the p_attribut equal to p_value, it is not case sensitive - * @param $p_attribut attribute to find see table attr_def - * @param $p_value value in attr_value.av_text - * @return return ARRAY OF jft_id,f_id,fd_id,ad_id,av_text + * @param int $p_attribut attribute to find see table attr_def + * @param string $p_value value in attr_value.av_text + * @return array returns ARRAY OF jft_id,f_id,fd_id,ad_id,av_text */ function seek($p_attribut,$p_value) { @@ -281,31 +281,38 @@ class Fiche /*! ************************************************** - * \brief Return array of card from the frd family + * \brief Count the nb of card with the reference card id frd_id * * \param $p_frd_id the fiche_def_ref.frd_id * \param $p_search p_search is a filter on the name * \param $p_sql extra sql condition * - * \return array of fiche object + * \return nb of item found */ function count_by_modele($p_frd_id,$p_search="",$p_sql="") { // Scan for SQL inject $this->cn->search_sql_inject($p_sql); - from - fiche join fiche_Def using (fd_id) - where frd_id=$1 ".$p_sql + if ( $p_search != "" ) { - $a=sql_string($p_search); - $sql="select * from vw_fiche_attr where frd_id=".$p_frd_id. - " and vw_name ilike '%$p_search%'"; + $result = $this->cn->get_value("select count(*) from + vw_fiche_attr + where + frd_id=$1 + and vw_name ilike '%'||$2||'%'", + [$p_frd_id,$p_search]); + return $result; + } else { + $result = $this->cn->get_value("select count(*) + from + fiche join fiche_Def using (fd_id) + where frd_id=$1 ".$p_sql + ,[$p_frd_id]); + return $result; } - $Ret=$this->cn->exec_sql($sql.$p_sql); - return Database::num_row($Ret) ; } /*! ************************************************** @@ -376,8 +383,8 @@ class Fiche /*** * @brief return the string of the given attribute * (attr_def.ad_id) - * @param $p_ad_id the AD_ID from attr_def.ad_id - * @param $p_return 1 return NOTFOUND otherwise an empty string + * @param int $p_ad_id AD_ID from attr_def.ad_id + * @param int $p_return 1 return NOTFOUND otherwise an empty string * @see constant.php * @return string */ @@ -592,6 +599,17 @@ class Fiche return $r; } + /** + * + * @return string with the category + */ + function getLabelCategory() + { + $type_card=$this->cn->get_value('select fd_label ' + . ' from fiche_def join fiche using (fd_id) where f_id=$1', + array($this->id)); + return $type_card; + } /*! * \brief Display object instance, getAttribute @@ -606,14 +624,9 @@ class Fiche { $this->GetAttribut(); $attr=$this->attribut; - /* show card type here */ - $type_card=$this->cn->get_value('select fd_label ' - . ' from fiche_def join fiche using (fd_id) where f_id=$1', - array($this->id)); $ret=""; - $ret.=h2(_("Catégorie")." ".$type_card, 'style="display:inline"'); - $ret.=''. - _('id fiche').':'.$this->id.""; + $ret.=''. + _('id').':'.$this->id.""; $ret.="
|---|