diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index daacc4ca4da63d477e643eb3da6787c5dbb651ef..62b4ccddce6617a37a791a9da29c1fbbe2b3f0a8 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> - * Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2005-2015 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2014 Marcos GarcĂa <marcosgdf@gmail.com> * * This program is free software; you can redistribute it and/or modify @@ -165,7 +165,7 @@ if ($action == 'create') print '</td><td class="hideonsmartphone">'.$langs->trans("ChooseIfANewWindowMustBeOpenedOnClickOnBookmark").'</td></tr>'; print '<tr><td>'.$langs->trans("Owner").'</td><td>'; - $form->select_dolusers(isset($_POST['userid'])?$_POST['userid']:$user->id,'userid',1); + print $form->select_dolusers(isset($_POST['userid'])?$_POST['userid']:$user->id,'userid',1); print '</td><td class="hideonsmartphone"> </td></tr>'; // Position @@ -262,7 +262,7 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) print '<tr><td>'.$langs->trans("Owner").'</td><td>'; if ($action == 'edit' && $user->admin) { - $form->select_dolusers(isset($_POST['userid'])?$_POST['userid']:($bookmark->fk_user?$bookmark->fk_user:''),'userid',1); + print $form->select_dolusers(isset($_POST['userid'])?$_POST['userid']:($bookmark->fk_user?$bookmark->fk_user:''),'userid',1); } else { diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index c539efa5a9b625860be009b799b4f5a12bcc6040..1226d3b35ba8296689be2267bc92488d200d35d5 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -176,18 +176,18 @@ class FormFile $out .= '<input type="hidden" id="'.$htmlname.'_link_section_id" name="link_section_id" value="'.$sectionid.'">'; $out .= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; - $out .= '<div>'; - $out .= '<div class="float" style="padding-right: 10px;">'; + $out .= '<div class="valignmiddle" >'; + $out .= '<div class="inline-block" style="padding-right: 10px;">'; if (! empty($conf->global->OPTIMIZEFORTEXTBROWSER)) $out .= '<label for="link">'.$langs->trans("URLToLink") . ':</label> '; $out .= '<input type="text" name="link" size="'.$maxlength.'" id="link" placeholder="'.dol_escape_htmltag($langs->trans("URLToLink")).'">'; $out .= '</div>'; - $out .= '<div class="float" style="padding-right: 10px;">'; + $out .= '<div class="inline-block" style="padding-right: 10px;">'; if (! empty($conf->global->OPTIMIZEFORTEXTBROWSER)) $out .= '<label for="label">'.$langs->trans("Label") . ':</label> '; $out .= '<input type="text" name="label" id="label" placeholder="'.dol_escape_htmltag($langs->trans("Label")).'">'; $out .= '<input type="hidden" name="objecttype" value="' . $object->element . '">'; $out .= '<input type="hidden" name="objectid" value="' . $object->id . '">'; $out .= '</div>'; - $out .= '<div class="float" style="padding-right: 10px;">'; + $out .= '<div class="inline-block" style="padding-right: 10px;">'; $out .= '<input type="submit" class="button" name="linkit" value="'.$langs->trans("ToLink").'"'; $out .= (empty($conf->global->MAIN_UPLOAD_DOC) || empty($perm)?' disabled':''); $out .= '>'; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 70988d7e330fb0281a608b25274a94c4ab56e11e..c7b370b287f0967b73f3b9bb3d3179e40376c003 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -658,6 +658,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') if ($num || (GETPOST('button_search') || GETPOST('button_search.x') || GETPOST('button_search_x'))) { print '<tr class="liste_titre">'; + // Name - Position print '<td class="liste_titre">'; print '<input type="text" class="flat" name="search_name" size="20" value="'.$search_name.'">'; @@ -766,10 +767,8 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print '</form>'."\n"; - print "<br>\n"; -?> -<div id="dialog" title="<?php echo dol_escape_htmltag($langs->trans('Address')); ?>" style="display: none;"></div> -<?php + // A div for the address popup + print '<div id="dialog" title="'.dol_escape_htmltag($langs->trans('Address')).'" style="display: none;"></div>'; return $i; } @@ -1343,7 +1342,7 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0) $i++; } $out.="</table>\n"; - $out.="<br>\n"; + //$out.="<br>\n"; } if ($noprint) return $out; diff --git a/htdocs/core/tpl/resource_view.tpl.php b/htdocs/core/tpl/resource_view.tpl.php index a5e5ab219191f90fe4380c469e6cb06a3ec2b39c..dd775662db6b4fc968eec39d34b7aaacb16feee6 100644 --- a/htdocs/core/tpl/resource_view.tpl.php +++ b/htdocs/core/tpl/resource_view.tpl.php @@ -37,7 +37,10 @@ if( (array) $linked_resources && count($linked_resources) > 0) { $var=!$var; $object_resource = fetchObjectByElement($linked_resource['resource_id'],$linked_resource['resource_type']); - if($mode == 'edit' && $linked_resource['rowid'] == GETPOST('lineid')) + + //$element_id = $linked_resource['rowid']; + + if ($mode == 'edit' && $linked_resource['rowid'] == GETPOST('lineid')) { print '<form class="tagtr '.($var==true?'pair':'impair').'" action="'.$_SERVER["PHP_SELF"].'?element='.$element.'&element_id='.$element_id.'" method="POST">'; @@ -58,7 +61,7 @@ if( (array) $linked_resources && count($linked_resources) > 0) else { $style=''; - if($linked_resource['rowid'] == GETPOST('lineid')) + if ($linked_resource['rowid'] == GETPOST('lineid')) $style='style="background: orange;"'; print '<div class="tagtr '.($var==true?"pair":"impair").'" '.$style.'>'; @@ -91,8 +94,6 @@ if( (array) $linked_resources && count($linked_resources) > 0) print '</div>'; } - - } print '</div>'; diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index 10b19d66da3956c677b32cb904d2f7c02ae14092..c59a594b5a651485f627d3338be191d5d437cfae 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -79,7 +79,7 @@ $fieldstosearchall = array( * View */ -$html = new Form($db); +$form = new Form($db); $formother = new FormOther($db); $expensereporttmp=new ExpenseReport($db); @@ -247,7 +247,7 @@ if ($resql) // User if ($user->rights->expensereport->readall || $user->rights->expensereport->lire_tous){ print '<td class="liste_titre" align="left">'; - $html->select_dolusers($search_user,"search_user",1,"",0,''); + print $form->select_dolusers($search_user,"search_user",1,"",0,''); print '</td>'; } else { print '<td class="liste_titre"> </td>'; diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 51939d8e9fc7c9f6be2708036c10d8a58c8b4ea6..463cda3953c51600ef9b73cb0fad1f9eca312efe 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -507,13 +507,13 @@ if ($action == 'create' && $user->rights->projet->creer) // Opportunity amount print '<tr><td>'.$langs->trans("OpportunityAmount").'</td>'; - print '<td><input size="4" type="text" name="opp_amount" value="'.(GETPOST('opp_amount')!=''?price(GETPOST('opp_amount')):'').'"></td>'; + print '<td><input size="5" type="text" name="opp_amount" value="'.(GETPOST('opp_amount')!=''?price(GETPOST('opp_amount')):'').'"></td>'; print '</tr>'; } // Budget print '<tr><td>'.$langs->trans("Budget").'</td>'; - print '<td><input size="6" type="text" name="budget_amount" value="'.(GETPOST('budget_amount')!=''?price(GETPOST('budget_amount')):'').'"></td>'; + print '<td><input size="5" type="text" name="budget_amount" value="'.(GETPOST('budget_amount')!=''?price(GETPOST('budget_amount')):'').'"></td>'; print '</tr>'; // Description @@ -672,13 +672,13 @@ else // Opportunity amount print '<tr><td>'.$langs->trans("OpportunityAmount").'</td>'; - print '<td><input size="6" type="text" name="opp_amount" value="'.(isset($_POST['opp_amount'])?GETPOST('opp_amount'):(strcmp($object->opp_amount,'')?price($object->opp_amount):'')).'"></td>'; + print '<td><input size="5" type="text" name="opp_amount" value="'.(isset($_POST['opp_amount'])?GETPOST('opp_amount'):(strcmp($object->opp_amount,'')?price($object->opp_amount):'')).'"></td>'; print '</tr>'; } // Budget print '<tr><td>'.$langs->trans("Budget").'</td>'; - print '<td><input size="6" type="text" name="budget_amount" value="'.(isset($_POST['budget_amount'])?GETPOST('budget_amount'):(strcmp($object->budget_amount,'')?price($object->budget_amount):'')).'"></td>'; + print '<td><input size="5" type="text" name="budget_amount" value="'.(isset($_POST['budget_amount'])?GETPOST('budget_amount'):(strcmp($object->budget_amount,'')?price($object->budget_amount):'')).'"></td>'; print '</tr>'; // Description diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php index 5c2414d22a2ae1ec9f3a476c46fc86429fe5cd05..21dad5afa05ebf9f824708a8a004fc9c29b5cb92 100644 --- a/htdocs/resource/element_resource.php +++ b/htdocs/resource/element_resource.php @@ -49,7 +49,7 @@ $hookmanager->initHooks(array('element_resource')); $object->available_resources = array('resource'); // Get parameters -$id = GETPOST('id','int'); +$id = GETPOST('id','int'); $action = GETPOST('action','alpha'); $mode = GETPOST('mode','alpha'); $lineid = GETPOST('lineid','int'); @@ -61,30 +61,40 @@ $busy = GETPOST('busy','int'); $mandatory = GETPOST('mandatory','int'); $cancel = GETPOST('cancel','alpha'); $confirm = GETPOST('confirm','alpha'); +$socid = GETPOST('socid','int'); +if ($socid > 0) +{ + $element_id = $socid; + $element = 'societe'; +} + + /* * Actions */ if ($action == 'add_element_resource' && ! $cancel) { - $objstat = fetchObjectByElement($element_id, $element); + $error++; $res = 0; - if ($resource_id > 0) + if (! ($resource_id > 0)) { - $res = $objstat->add_element_resource($resource_id, $resource_type, $busy, $mandatory); + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Resource")), null, 'errors'); + $action=''; } - if ($res > 0) + else { - setEventMessage($langs->trans('ResourceLinkedWithSuccess'),'mesgs'); - header("Location: ".$_SERVER['PHP_SELF'].'?element='.$element.'&element_id='.$element_id); - exit; + $objstat = fetchObjectByElement($element_id, $element); + + $res = $objstat->add_element_resource($resource_id, $resource_type, $busy, $mandatory); } - else + if (! $error && $res > 0) { - setEventMessage($langs->trans('ErrorWhenLinkingResource') . " " . $objstat->error, 'errors'); - header("Location: ".$_SERVER['PHP_SELF'].'?mode=add&resource_type='.$resource_type.'&element='.$element.'&element_id='.$element_id); + setEventMessage($langs->trans('ResourceLinkedWithSuccess'),'mesgs'); + header("Location: ".$_SERVER['PHP_SELF'].'?element='.$element.'&element_id='.$element_id); exit; } } @@ -103,7 +113,7 @@ if ($action == 'update_linked_resource' && $user->rights->resource->write && !GE if ($result >= 0) { setEventMessage($langs->trans('RessourceLineSuccessfullyUpdated')); - Header("Location: ".$_SERVER['PHP_SELF']."?element=".$element."&element_id=".$element_id); + header("Location: ".$_SERVER['PHP_SELF']."?element=".$element."&element_id=".$element_id); exit; } else { @@ -115,25 +125,18 @@ if ($action == 'update_linked_resource' && $user->rights->resource->write && !GE // Delete a resource linked to an element if ($action == 'confirm_delete_linked_resource' && $user->rights->resource->delete && $confirm === 'yes') { - $res = $object->fetch($id); - if($res > 0) - { - $result = $object->delete_resource($lineid,$element); - - if ($result >= 0) - { - setEventMessage($langs->trans('RessourceLineSuccessfullyDeleted')); - Header("Location: ".$_SERVER['PHP_SELF']."?element=".$element."&element_id=".$element_id); - exit; - } - else { - setEventMessage($object->error,'errors'); - } - } - else - { - setEventMessage($object->error,'errors'); - } + $result = $object->delete_resource($lineid,$element); + + if ($result >= 0) + { + setEventMessage($langs->trans('RessourceLineSuccessfullyDeleted')); + header("Location: ".$_SERVER['PHP_SELF']."?element=".$element."&element_id=".$element_id); + exit; + } + else + { + setEventMessage($object->error,'errors'); + } } $parameters=array('resource_id'=>$resource_id); @@ -178,12 +181,13 @@ else /* * Specific to agenda module */ - if($element_id && $element == 'action') + if ($element_id && $element == 'action') { require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; $act = fetchObjectByElement($element_id,$element); - if(is_object($act)) { + if (is_object($act)) + { $head=actions_prepare_head($act); @@ -219,26 +223,36 @@ else if ($element_id && $element == 'societe') { $socstatic = fetchObjectByElement($element_id,$element); - if (is_object($socstatic)) { + if (is_object($socstatic)) + { + $savobject = $object; + + $object = $socstatic; + require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; $head = societe_prepare_head($socstatic); dol_fiche_head($head, 'resources', $langs->trans("ThirdParty"),0,'company'); - // Affichage fiche action en mode visu - print '<table class="border" width="100%">'; - - //$linkback = '<a href="'.DOL_URL_ROOT.'/comm/action/listactions.php">'.$langs->trans("BackToList").'</a>'; - - // Name - print '<tr><td width="25%">'.$langs->trans('ThirdPartyName').'</td>'; - print '<td colspan="3">'; - print $form->showrefnav($socstatic, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); - print '</td>'; - print '</tr>'; + dol_banner_tab($socstatic, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + + print '<div class="fichecenter">'; + + print '<div class="underbanner clearboth"></div>'; + print '<table class="border" width="100%">'; + + // Alias name (commercial, trademark or alias name) + print '<tr><td class="titelfield">'.$langs->trans('AliasNames').'</td><td colspan="3">'; + print $socstatic->name_alias; + print "</td></tr>"; + print '</table>'; + print '</div>'; + dol_fiche_end(); + + $object = $savobject; } } @@ -248,7 +262,7 @@ else - foreach ($object->available_resources as $modresources => $resources) + foreach ($object->available_resources as $modresources => $resources) { $resources=(array) $resources; // To be sure $resources is an array foreach($resources as $resource_obj) @@ -273,7 +287,7 @@ else { $res=include DOL_DOCUMENT_ROOT . '/core/tpl/resource_add.tpl.php'; } - + //var_dump($element_id); if ($mode != 'add' || $resource_obj != $resource_type) { diff --git a/htdocs/theme/common/gmap.png b/htdocs/theme/common/gmap.png index 0423a91295654c414c56ff401e1b03257fb2c45e..201577281f048ad530a5ffc90ae5ddcde1ea09cb 100644 Binary files a/htdocs/theme/common/gmap.png and b/htdocs/theme/common/gmap.png differ diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 0c7781796068c9d0d9ba3b3bc74f051e09c0b346..bb00659f171b3a2a052a31d7dc50efa2f79da659 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -64,7 +64,7 @@ $theme='eldy'; // Value of theme if (! empty($conf->global->MAIN_OVERWRITE_THEME_RES)) { $path='/'.$conf->global->MAIN_OVERWRITE_THEME_RES; $theme=$conf->global->MAIN_OVERWRITE_THEME_RES; } // Define image path files and other constants -$fontlist='arial,tahoma,verdana,helvetica'; //$fontlist='Helvetica, Verdana, Arial, sans-serif'; +$fontlist='roboto,arial,tahoma,verdana,helvetica'; //$fontlist='helvetica, verdana, arial, sans-serif'; $img_head=''; $img_button=dol_buildpath($path.'/theme/'.$theme.'/img/button_bg.png',1); $dol_hide_topmenu=$conf->dol_hide_topmenu; diff --git a/htdocs/theme/md/img/object_category-expanded.png b/htdocs/theme/md/img/object_category-expanded.png index b0292d92aaec99817b1a0dff1c1c354cd715f10c..0e49c902a096b8a10c90061911198af46c60d266 100644 Binary files a/htdocs/theme/md/img/object_category-expanded.png and b/htdocs/theme/md/img/object_category-expanded.png differ diff --git a/htdocs/theme/md/img/object_category.png b/htdocs/theme/md/img/object_category.png index fb51c4b100c90c3e1bcb801cd16e0226cd598516..b0292d92aaec99817b1a0dff1c1c354cd715f10c 100644 Binary files a/htdocs/theme/md/img/object_category.png and b/htdocs/theme/md/img/object_category.png differ diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index e983a16f3f91c5a08894828b2f3945f2a4f873b5..13b2e4df17105bd3dc3ed0f6623615eb1d877c1b 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -65,7 +65,7 @@ $theme='md'; // Value of theme if (! empty($conf->global->MAIN_OVERWRITE_THEME_RES)) { $path='/'.$conf->global->MAIN_OVERWRITE_THEME_RES; $theme=$conf->global->MAIN_OVERWRITE_THEME_RES; } // Define image path files and other constants -$fontlist='Open Sans,sans-serif'; //$fontlist='Verdana,Helvetica,Arial,sans-serif'; +$fontlist='roboto,arial,tahoma,verdana,helvetica'; //$fontlist='verdana,helvetica,arial,sans-serif'; $img_head=''; $img_button=dol_buildpath($path.'/theme/'.$theme.'/img/button_bg.png',1); $dol_hide_topmenu=$conf->dol_hide_topmenu; @@ -1704,62 +1704,8 @@ span.butAction, span.butActionDelete { } -/* -.butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active -{ - text-decoration: none; - white-space: nowrap; - padding: 0.4em <?php echo ($dol_optimize_smallscreen?'0.4':'0.7'); ?>em; - margin: 0em <?php echo ($dol_optimize_smallscreen?'0.7':'0.9'); ?>em; - font-family: <?php print $fontlist ?>; - - font-weight: bold; - background: white; - border: 1px solid #8CACBB; - color: #434956; - -moz-border-radius:0px 2px 0px 2px; - -webkit-border-radius:0px 2px 0px 2px; - border-radius:0px 2px 0px 2px; - -moz-box-shadow: 2px 2px 3px #f4f4f4; - -webkit-box-shadow: 2px 2px 3px #f4f4f4; - box-shadow: 2px 2px 3px #f4f4f4; -} - -.butAction:hover { - background: #dee7ec; -} - -.butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active { - border: 1px solid #997777; -} - -.butActionDelete:hover { - background: #FFe7ec; -} - -.butActionRefused { - text-decoration: none !important; - white-space: nowrap !important; - cursor: not-allowed; - padding: 0.4em <?php echo ($dol_optimize_smallscreen?'0.4':'0.7'); ?>em; - margin: 0em <?php echo ($dol_optimize_smallscreen?'0.7':'0.9'); ?>em; - font-family: <?php print $fontlist ?> !important; - - font-weight: bold !important; - background: white !important; - border: 1px solid #AAAAAA !important; - color: #AAAAAA !important; - -moz-border-radius:0px 2px 0px 2px; - -webkit-border-radius:0px 2px 0px 2px; - border-radius:0px 2px 0px 2px; - -moz-box-shadow: 3px 3px 4px #f4f4f4; - -webkit-box-shadow: 3px 3px 4px #f4f4f4; - box-shadow: 3px 3px 4px #f4f4f4; -} -*/ - /* Prepare for bootstrap look */ -.butAction, .butActionDelete, .butActionRefused { +.button, .butAction, .butActionDelete, .butActionRefused { border-color: #c5c5c5; border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); display: inline-block; @@ -1792,7 +1738,7 @@ span.butAction, span.butActionDelete { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); } -.butAction { +.button, .butAction { color: #ffffff !important; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #006dcc; @@ -1807,7 +1753,21 @@ span.butAction, span.butActionDelete { border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } - +.button:disabled, .butAction:disabled { + color: #666 !important; + text-shadow: none; + border-color: #555; + cursor: not-allowed; + + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x +} + .butActionDelete { color: #ffffff !important; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); @@ -1946,7 +1906,7 @@ table.liste, table.noborder, table.formdoc, div.noborder { border-color: #BBB; border-style: solid; - margin: 0px 0px 2px 0px; + margin: 0px 0px 8px 0px; /* -moz-box-shadow: 2px 2px 4px #CCC; -webkit-box-shadow: 2px 2px 4px #CCC; @@ -3465,7 +3425,7 @@ a span.select2-chosen line-height: 13px; color: #333; cursor: default; - border: 1px solid #aaaaaa; + border: 1px solid #ddd; border-radius: 3px; -webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05); box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);