From e4ef6334aacd527f6741fd725834ff7e0e0460fd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 25 May 2020 14:08:36 +0200 Subject: [PATCH] Look and feel v12 --- htdocs/bom/class/bom.class.php | 2 +- htdocs/core/class/commonobject.class.php | 9 +++++---- htdocs/core/class/html.formticket.class.php | 4 ++-- htdocs/ecm/dir_add_card.php | 2 +- htdocs/modulebuilder/template/class/myobject.class.php | 1 + htdocs/theme/eldy/global.inc.php | 2 +- htdocs/theme/eldy/theme_vars.inc.php | 4 ++-- htdocs/ticket/class/ticket.class.php | 2 +- 8 files changed, 14 insertions(+), 12 deletions(-) diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index 86e0b84b655..790487b4032 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -91,7 +91,7 @@ class BOM extends CommonObject 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>"Id",), 'entity' => array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'notnull'=> 1, 'default'=>1, 'index'=>1, 'position'=>5), 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'noteditable'=>1, 'visible'=>4, 'position'=>10, 'notnull'=>1, 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of BOM", 'showoncombobox'=>'1',), - 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'notnull'=>1, 'searchall'=>1, 'showoncombobox'=>'1',), + 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'notnull'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'autofocusoncreate'=>1), 'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>-1, 'position'=>60, 'notnull'=>-1,), 'fk_product' => array('type'=>'integer:Product:product/class/product.class.php:1:(finished IS NULL or finished <> 0)', 'label'=>'Product', 'enabled'=>1, 'visible'=>1, 'position'=>35, 'notnull'=>1, 'index'=>1, 'help'=>'ProductBOMHelp'), 'qty' => array('type'=>'real', 'label'=>'Quantity', 'enabled'=>1, 'visible'=>1, 'default'=>1, 'position'=>55, 'notnull'=>1, 'isameasure'=>'1', 'css'=>'maxwidth75imp'), diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index f3f1b9eaee3..4fcac1979b7 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6046,6 +6046,7 @@ abstract class CommonObject $computed = $this->fields[$key]['computed']; $unique = $this->fields[$key]['unique']; $required = $this->fields[$key]['required']; + $autofocusoncreate = $this->fields[$key]['autofocusoncreate']; $langfile = $this->fields[$key]['langfile']; $list = $this->fields[$key]['list']; @@ -6122,19 +6123,19 @@ abstract class CommonObject { $tmp = explode(',', $size); $newsize = $tmp[0]; - $out = ''; + $out = ''; } elseif (in_array($type, array('real'))) { - $out = ''; + $out = ''; } elseif (preg_match('/varchar/', $type)) { - $out = ''; + $out = ''; } elseif (in_array($type, array('mail', 'phone', 'url'))) { - $out = ''; + $out = ''; } elseif ($type == 'text') { diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index da41a02491b..a8654f6bfc5 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -175,7 +175,7 @@ class FormTicket print ''; } - // Si origin du ticket + // If ticket created from another object if (isset($this->param['origin']) && $this->param['originid'] > 0) { // Parse element/subelement (ex: project_task) $element = $subelement = $this->param['origin']; @@ -225,7 +225,7 @@ class FormTicket if ($this->withthreadid > 0) { $subject = $langs->trans('SubjectAnswerToTicket').' '.$this->withthreadid.' : '.$this->topic_title.''; } - print ''; + print ''; print ''; } } diff --git a/htdocs/ecm/dir_add_card.php b/htdocs/ecm/dir_add_card.php index 4d6f2bdce5a..a826c6382ce 100644 --- a/htdocs/ecm/dir_add_card.php +++ b/htdocs/ecm/dir_add_card.php @@ -241,7 +241,7 @@ if ($action == 'create') print ''; // Label - print ''."\n"; + print ''."\n"; print '
'.$langs->trans("Label").'
'.$langs->trans("Label").'
'.$langs->trans("AddIn").''; print $formecm->selectAllSections((GETPOST("catParent", 'alpha') ? GETPOST("catParent", 'alpha') : $ecmdir->fk_parent), 'catParent', $module); diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 2070bedf568..12400ecb087 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -83,6 +83,7 @@ class MyObject extends CommonObject * 'showoncombobox' if value of the field must be visible into the label of the combobox that list record * 'disabled' is 1 if we want to have the field locked by a 'disabled' attribute. In most cases, this is never set into the definition of $fields into class, but is set dynamically by some part of code. * 'arraykeyval' to set list of value if type is a list of predefined values. For example: array("0"=>"Draft","1"=>"Active","-1"=>"Cancel") + * 'autofocusoncreate' to have field having the focus on a create form. Only 1 field should have this property set to 1. * 'comment' is not used. You can store here any text of your choice. It is not used by application. * * Note: To have value dynamic, you can set value to 0 in definition and edit the value on the fly into the constructor. diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 569e84496b6..4eaa193e682 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -3843,7 +3843,7 @@ div.info { padding-bottom: 8px; margin: 1em 0em 1em 0em; background: #eff8fc; - color: #668; + color: #558; } /* Warning message */ diff --git a/htdocs/theme/eldy/theme_vars.inc.php b/htdocs/theme/eldy/theme_vars.inc.php index fdbd23f1a3a..0677c8e4918 100644 --- a/htdocs/theme/eldy/theme_vars.inc.php +++ b/htdocs/theme/eldy/theme_vars.inc.php @@ -82,7 +82,7 @@ $toolTipFontColor = '#333'; // text color $textSuccess = '#28a745'; $colorblind_deuteranopes_textSuccess = '#37de5d'; -$textWarning = '#a37c0d'; // See $badgeWarning +$textWarning = '#bc9526'; // See $badgeWarning $textDanger = '#9f4705'; // See $badgeDanger $colorblind_deuteranopes_textWarning = $textWarning; // currently not tested with a color blind people so use default color @@ -91,7 +91,7 @@ $colorblind_deuteranopes_textWarning = $textWarning; // currently not tested wit $badgePrimary = '#007bff'; $badgeSecondary = '#cccccc'; $badgeSuccess = '#55a580'; -$badgeWarning = '#a37c0d'; // See $textDanger bc9526 +$badgeWarning = '#bc9526'; // See $textWarning bc9526 $badgeDanger = '#9f4705'; // See $textDanger $badgeInfo = '#aaaabb'; $badgeDark = '#343a40'; diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 4db98cfe7ad..4545497be62 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -184,7 +184,7 @@ class Ticket extends CommonObject 'track_id' => array('type'=>'varchar(255)', 'label'=>'TicketTrackId', 'visible'=>-2, 'enabled'=>1, 'position'=>11, 'notnull'=>-1, 'searchall'=>1, 'help'=>"Help text"), 'fk_user_create' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Author', 'visible'=>1, 'enabled'=>1, 'position'=>15, 'notnull'=>1, 'css'=>'tdoverflowmax150 maxwidth150onsmartphone'), 'origin_email' => array('type'=>'mail', 'label'=>'OriginEmail', 'visible'=>-2, 'enabled'=>1, 'position'=>16, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'css'=>'tdoverflowmax150'), - 'subject' => array('type'=>'varchar(255)', 'label'=>'Subject', 'visible'=>1, 'enabled'=>1, 'position'=>18, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth75'), + 'subject' => array('type'=>'varchar(255)', 'label'=>'Subject', 'visible'=>1, 'enabled'=>1, 'position'=>18, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth75', 'autofocusoncreate'=>1), 'type_code' => array('type'=>'varchar(32)', 'label'=>'Type', 'visible'=>1, 'enabled'=>1, 'position'=>20, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth100'), 'category_code' => array('type'=>'varchar(32)', 'label'=>'TicketGroup', 'visible'=>-1, 'enabled'=>1, 'position'=>21, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth100'), 'severity_code' => array('type'=>'varchar(32)', 'label'=>'Severity', 'visible'=>1, 'enabled'=>1, 'position'=>22, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth100'),