diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index daacc4ca4da..62b4ccddce6 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2013 Laurent Destailleur + * Copyright (C) 2005-2015 Laurent Destailleur * Copyright (C) 2014 Marcos GarcĂ­a * * This program is free software; you can redistribute it and/or modify @@ -165,7 +165,7 @@ if ($action == 'create') print ''.$langs->trans("ChooseIfANewWindowMustBeOpenedOnClickOnBookmark").''; print ''.$langs->trans("Owner").''; - $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 ' '; // Position @@ -262,7 +262,7 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) print ''.$langs->trans("Owner").''; 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 c539efa5a9b..1226d3b35ba 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -176,18 +176,18 @@ class FormFile $out .= ''; $out .= ''; - $out .= '
'; - $out .= '
'; + $out .= '
'; + $out .= '
'; if (! empty($conf->global->OPTIMIZEFORTEXTBROWSER)) $out .= ' '; $out .= ''; $out .= '
'; - $out .= '
'; + $out .= '
'; if (! empty($conf->global->OPTIMIZEFORTEXTBROWSER)) $out .= ' '; $out .= ''; $out .= ''; $out .= ''; $out .= '
'; - $out .= '
'; + $out .= '
'; $out .= '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 70988d7e330..c7b370b287f 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 ''; + // Name - Position print ''; print ''; @@ -766,10 +767,8 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print ''."\n"; - print "
\n"; -?> - -trans('Address')).'" style="display: none;">
'; return $i; } @@ -1343,7 +1342,7 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0) $i++; } $out.="\n"; - $out.="
\n"; + //$out.="
\n"; } if ($noprint) return $out; diff --git a/htdocs/core/tpl/resource_view.tpl.php b/htdocs/core/tpl/resource_view.tpl.php index a5e5ab21919..dd775662db6 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 '
'; @@ -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 '
'; @@ -91,8 +94,6 @@ if( (array) $linked_resources && count($linked_resources) > 0) print '
'; } - - } print '
'; diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index 10b19d66da3..c59a594b5a6 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 ''; - $html->select_dolusers($search_user,"search_user",1,"",0,''); + print $form->select_dolusers($search_user,"search_user",1,"",0,''); print ''; } else { print ' '; diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 51939d8e9fc..463cda3953c 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 ''.$langs->trans("OpportunityAmount").''; - print ''; + print ''; print ''; } // Budget print ''.$langs->trans("Budget").''; - print ''; + print ''; print ''; // Description @@ -672,13 +672,13 @@ else // Opportunity amount print ''.$langs->trans("OpportunityAmount").''; - print ''; + print ''; print ''; } // Budget print ''.$langs->trans("Budget").''; - print ''; + print ''; print ''; // Description diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php index 5c2414d22a2..21dad5afa05 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); - } - if ($res > 0) - { - setEventMessage($langs->trans('ResourceLinkedWithSuccess'),'mesgs'); - header("Location: ".$_SERVER['PHP_SELF'].'?element='.$element.'&element_id='.$element_id); - exit; + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Resource")), null, 'errors'); + $action=''; } else { - setEventMessage($langs->trans('ErrorWhenLinkingResource') . " " . $objstat->error, 'errors'); - header("Location: ".$_SERVER['PHP_SELF'].'?mode=add&resource_type='.$resource_type.'&element='.$element.'&element_id='.$element_id); + $objstat = fetchObjectByElement($element_id, $element); + + $res = $objstat->add_element_resource($resource_id, $resource_type, $busy, $mandatory); + } + if (! $error && $res > 0) + { + 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); + $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'); - } + 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 ''; - - //$linkback = ''.$langs->trans("BackToList").''; - - // Name - print ''; - print ''; - print ''; + dol_banner_tab($socstatic, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + + print '
'; + + print '
'; + print '
'.$langs->trans('ThirdPartyName').''; - print $form->showrefnav($socstatic, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); - print '
'; + + // Alias name (commercial, trademark or alias name) + print '"; + print '
'.$langs->trans('AliasNames').''; + print $socstatic->name_alias; + print "
'; + print '
'; + 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 0423a912956..201577281f0 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 0c778179606..bb00659f171 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 b0292d92aae..0e49c902a09 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 fb51c4b100c..b0292d92aae 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 e983a16f3f9..13b2e4df171 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 em; - margin: 0em em; - font-family: ; - - 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 em; - margin: 0em em; - font-family: !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);