Qual: Removed deprecated code for using a specific mobile theme.

New: Include terminal variables to optimize any themes.
Qual: First change to allow butAction buttons to wrap on new lines for
small size screens.
This commit is contained in:
Laurent Destailleur 2013-04-03 15:20:56 +02:00
parent fb048ccfda
commit 545ac638b0
23 changed files with 324 additions and 293 deletions

View File

@ -46,7 +46,8 @@ For developers:
- Add hook getFormMail. - Add hook getFormMail.
- Function plimit of databases drivers accept -1 as value (it means default value set - Function plimit of databases drivers accept -1 as value (it means default value set
into conf->liste_limit). into conf->liste_limit).
- New: Add option dol_hide_topmenu and dol_hide_leftmenu onto login page. - New: Add option dol_hide_topmenu, dol_hide_leftmenu, dol_optimize_smallscreen,
dol_no_mouse_hover and dol_use_jmobile onto login page (to support different terminal).
- New: dol_syslog method accept a suffix to use different log files for log. - New: dol_syslog method accept a suffix to use different log files for log.
- New: Type of fields are received by export format handlers. - New: Type of fields are received by export format handlers.
- New: when adding an action, we can define a free code to tag it for a specific need. - New: when adding an action, we can define a free code to tag it for a specific need.

View File

@ -88,8 +88,7 @@ $var=!$var;
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("CurrentTheme").'</td><td colspan="2">'.$conf->theme.'</td></tr>'."\n"; print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("CurrentTheme").'</td><td colspan="2">'.$conf->theme.'</td></tr>'."\n";
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("CurrentMenuHandler").'</td><td colspan="2">'; print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("CurrentMenuHandler").'</td><td colspan="2">';
if (preg_match('/^smartphone/',$conf->smart_menu) && ! empty($conf->browser->phone)) print $conf->smart_menu; print $conf->standard_menu;
else print $conf->standard_menu;
print '</td></tr>'."\n"; print '</td></tr>'."\n";
print '</table>'; print '</table>';
print '<br>'; print '<br>';

View File

@ -500,8 +500,8 @@ if ($id > 0)
while ($i < $num && $i < $MAXLIST) while ($i < $num && $i < $MAXLIST)
{ {
$objp = $db->fetch_object($resql); $objp = $db->fetch_object($resql);
print "<tr $bc[$var]>"; print "<tr ".$bc[$var].">";
print '<td nowrap><a href="propal.php?id='.$objp->propalid.'">'.img_object($langs->trans("ShowPropal"),"propal").' '.$objp->ref.'</a>'."\n"; print '<td nowrap="nowrap"><a href="propal.php?id='.$objp->propalid.'">'.img_object($langs->trans("ShowPropal"),"propal").' '.$objp->ref.'</a>'."\n";
if ( ($db->jdate($objp->dp) < ($now - $conf->propal->cloture->warning_delay)) && $objp->fk_statut == 1 ) if ( ($db->jdate($objp->dp) < ($now - $conf->propal->cloture->warning_delay)) && $objp->fk_statut == 1 )
{ {
print " ".img_warning(); print " ".img_warning();
@ -751,7 +751,7 @@ if ($id > 0)
$objp = $db->fetch_object($resql); $objp = $db->fetch_object($resql);
$var=!$var; $var=!$var;
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";
print '<td>'; print '<td nowrap="nowrap">';
$facturestatic->id=$objp->facid; $facturestatic->id=$objp->facid;
$facturestatic->ref=$objp->facnumber; $facturestatic->ref=$objp->facnumber;
$facturestatic->type=$objp->type; $facturestatic->type=$objp->type;
@ -790,30 +790,30 @@ if ($id > 0)
/* /*
* Barre d'actions * Barre d'actions
*/ */
print '<div class="tabsAction">'; print '<div class="tabsAction" style="clear: both;">';
if (! empty($conf->propal->enabled) && $user->rights->propal->creer) if (! empty($conf->propal->enabled) && $user->rights->propal->creer)
{ {
$langs->load("propal"); $langs->load("propal");
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/propal.php?socid='.$object->id.'&amp;action=create">'.$langs->trans("AddProp").'</a>'; print '<div class="floatright divbutaction"><a class="butAction" href="'.DOL_URL_ROOT.'/comm/propal.php?socid='.$object->id.'&amp;action=create">'.$langs->trans("AddProp").'</a></div>';
} }
if (! empty($conf->commande->enabled) && $user->rights->commande->creer) if (! empty($conf->commande->enabled) && $user->rights->commande->creer)
{ {
$langs->load("orders"); $langs->load("orders");
print '<a class="butAction" href="'.DOL_URL_ROOT.'/commande/fiche.php?socid='.$object->id.'&amp;action=create">'.$langs->trans("AddOrder").'</a>'; print '<div class="floatright divbutaction"><a class="butAction" href="'.DOL_URL_ROOT.'/commande/fiche.php?socid='.$object->id.'&amp;action=create">'.$langs->trans("AddOrder").'</a></div>';
} }
if ($user->rights->contrat->creer) if ($user->rights->contrat->creer)
{ {
$langs->load("contracts"); $langs->load("contracts");
print '<a class="butAction" href="'.DOL_URL_ROOT.'/contrat/fiche.php?socid='.$object->id.'&amp;action=create">'.$langs->trans("AddContract").'</a>'; print '<div class="floatright divbutaction"><a class="butAction" href="'.DOL_URL_ROOT.'/contrat/fiche.php?socid='.$object->id.'&amp;action=create">'.$langs->trans("AddContract").'</a></div>';
} }
if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer) if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer)
{ {
$langs->load("fichinter"); $langs->load("fichinter");
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fichinter/fiche.php?socid='.$object->id.'&amp;action=create">'.$langs->trans("AddIntervention").'</a>'; print '<div class="floatright divbutaction"><a class="butAction" href="'.DOL_URL_ROOT.'/fichinter/fiche.php?socid='.$object->id.'&amp;action=create">'.$langs->trans("AddIntervention").'</a></div>';
} }
// Add invoice // Add invoice
@ -822,7 +822,7 @@ if ($id > 0)
if (! empty($conf->deplacement->enabled)) if (! empty($conf->deplacement->enabled))
{ {
$langs->load("trips"); $langs->load("trips");
print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/deplacement/fiche.php?socid='.$object->id.'&amp;action=create">'.$langs->trans("AddTrip").'</a>'; print '<div class="floatright divbutaction"><a class="butAction" href="'.DOL_URL_ROOT.'/compta/deplacement/fiche.php?socid='.$object->id.'&amp;action=create">'.$langs->trans("AddTrip").'</a></div>';
} }
if (! empty($conf->facture->enabled)) if (! empty($conf->facture->enabled))
@ -834,17 +834,17 @@ if ($id > 0)
if (! empty($conf->commande->enabled)) if (! empty($conf->commande->enabled))
{ {
if($orders2invoice > 0) print '<a class="butAction" href="'.DOL_URL_ROOT.'/commande/orderstoinvoice.php?socid='.$object->id.'">'.$langs->trans("CreateInvoiceForThisCustomer").'</a>'; if($orders2invoice > 0) print '<div class="floatright divbutaction"><a class="butAction" href="'.DOL_URL_ROOT.'/commande/orderstoinvoice.php?socid='.$object->id.'">'.$langs->trans("CreateInvoiceForThisCustomer").'</a></div>';
else print '<a class="butActionRefused" title="'.dol_escape_js($langs->trans("NoOrdersToInvoice")).'" href="#">'.$langs->trans("CreateInvoiceForThisCustomer").'</a>'; else print '<div class="floatright divbutaction"><a class="butActionRefused" title="'.dol_escape_js($langs->trans("NoOrdersToInvoice")).'" href="#">'.$langs->trans("CreateInvoiceForThisCustomer").'</a></div>';
} }
if ($object->client != 0) print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture.php?action=create&socid='.$object->id.'">'.$langs->trans("AddBill").'</a>'; if ($object->client != 0) print '<div class="floatright divbutaction"><a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture.php?action=create&socid='.$object->id.'">'.$langs->trans("AddBill").'</a></div>';
else print '<a class="butActionRefused" title="'.dol_escape_js($langs->trans("ThirdPartyMustBeEditAsCustomer")).'" href="#">'.$langs->trans("AddBill").'</a>'; else print '<div class="floatright divbutaction"><a class="butActionRefused" title="'.dol_escape_js($langs->trans("ThirdPartyMustBeEditAsCustomer")).'" href="#">'.$langs->trans("AddBill").'</a></div>';
} }
else else
{ {
print '<a class="butActionRefused" title="'.dol_escape_js($langs->trans("NotAllowed")).'" href="#">'.$langs->trans("AddBill").'</a>'; print '<div class="floatright divbutaction"><a class="butActionRefused" title="'.dol_escape_js($langs->trans("NotAllowed")).'" href="#">'.$langs->trans("AddBill").'</a></div>';
} }
} }
} }
@ -854,11 +854,11 @@ if ($id > 0)
{ {
if ($user->rights->agenda->myactions->create) if ($user->rights->agenda->myactions->create)
{ {
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&socid='.$object->id.'">'.$langs->trans("AddAction").'</a>'; print '<div class="floatright divbutaction"><a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&socid='.$object->id.'">'.$langs->trans("AddAction").'</a></div>';
} }
else else
{ {
print '<a class="butAction" title="'.dol_escape_js($langs->trans("NotAllowed")).'" href="#">'.$langs->trans("AddAction").'</a>'; print '<div class="floatright divbutaction"><a class="butAction" title="'.dol_escape_js($langs->trans("NotAllowed")).'" href="#">'.$langs->trans("AddAction").'</a></div>';
} }
} }

View File

@ -164,7 +164,7 @@ class ModeleBoxes // Can't be abtract as it is instanciated to build "empty"
{ {
print '</td><td class="nocellnopadd boxclose" nowrap="nowrap">'; print '</td><td class="nocellnopadd boxclose" nowrap="nowrap">';
// The image must have the class 'boxhandle' beause it's value used in DOM draggable objects to define the area used to catch the full object // The image must have the class 'boxhandle' beause it's value used in DOM draggable objects to define the area used to catch the full object
print img_picto($langs->trans("MoveBox",$this->box_id),'grip','class="boxhandle" style="cursor:move;"'); print img_picto($langs->trans("MoveBox",$this->box_id),'grip','class="boxhandle hideonsmartphone" style="cursor:move;"');
print img_picto($langs->trans("Close",$this->box_id),'close','class="boxclose" style="cursor:pointer;" id="imgclose'.$this->box_id.'"'); print img_picto($langs->trans("Close",$this->box_id),'close','class="boxclose" style="cursor:pointer;" id="imgclose'.$this->box_id.'"');
print '</td></tr></table>'; print '</td></tr></table>';
} }

View File

@ -47,9 +47,8 @@ class Conf
//! Used to store current css (from theme) //! Used to store current css (from theme)
public $theme; // Contains current theme ("eldy", "auguria", ...) public $theme; // Contains current theme ("eldy", "auguria", ...)
public $css; // Contains full path of css page ("/theme/eldy/style.css.php", ...) public $css; // Contains full path of css page ("/theme/eldy/style.css.php", ...)
//! Used to store current menu handlers //! Used to store current menu handler
public $standard_menu; public $standard_menu;
public $smart_menu;
public $modules = array(); // List of activated modules public $modules = array(); // List of activated modules
public $modules_parts = array('css'=>array(),'js'=>array(),'tabs'=>array(),'triggers'=>array(),'login'=>array(),'substitutions'=>array(),'menus'=>array(),'theme'=>array(),'sms'=>array(),'tpl'=>array(),'barcode'=>array(),'models'=>array(),'societe'=>array(),'hooks'=>array(),'dir'=>array()); public $modules_parts = array('css'=>array(),'js'=>array(),'tabs'=>array(),'triggers'=>array(),'login'=>array(),'substitutions'=>array(),'menus'=>array(),'theme'=>array(),'sms'=>array(),'tpl'=>array(),'barcode'=>array(),'models'=>array(),'societe'=>array(),'hooks'=>array(),'dir'=>array());
@ -64,6 +63,11 @@ class Conf
//! Used to store list of entities to use for each element //! Used to store list of entities to use for each element
public $entities = array(); public $entities = array();
public $dol_hide_topmenu; // Set if we force param dol_hide_topmenu into login url
public $dol_hide_leftmenu; // Set if we force param dol_hide_leftmenu into login url
public $dol_optimize_smallscreen; // Set if we force param dol_optimize_smallscreen into login url or if browser is smartphone
public $dol_no_mouse_hover; // Set if we force param dol_no_mouse_hover into login url or if browser is smartphone
public $dol_use_jmobile; // Set if we force param dol_use_jmobile into login url
/** /**

View File

@ -422,8 +422,9 @@ class Form
$htmltext = ''; $htmltext = '';
} }
} }
// If info or help with smartphone, show only text
if (! empty($conf->browser->phone)) // If info or help with smartphone, show only text (tooltip can't works)
if (! empty($conf->dol_no_mouse_hover))
{ {
if ($type == 'info' || $type == 'help') return $text; if ($type == 'info' || $type == 'help') return $text;
} }

View File

@ -19,8 +19,8 @@
*/ */
/** /**
* \file htdocs/core/getmenu_jmobile.php * \file htdocs/core/get_menudiv.php
* \brief File to return menu * \brief File to return menu into a div tree
*/ */
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language //if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language
@ -50,9 +50,9 @@ $left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
* View * View
*/ */
// URL http://mydolibarr/core/getmenu_jmobile?mainmenu=mainmenu&leftmenu=leftmenu can be used for tests // URL http://mydolibarr/core/get_menudiv.php?dol_use_jmobile=1 can be used for tests
$arrayofjs=array('/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js'); $arrayofjs=array();
$arrayofcss=array('/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css'); $arrayofcss=array();
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
print '<body>'."\n"; print '<body>'."\n";
@ -60,16 +60,14 @@ print '<body>'."\n";
if (empty($user->societe_id)) // If internal user or not defined if (empty($user->societe_id)) // If internal user or not defined
{ {
$conf->standard_menu=(empty($conf->global->MAIN_MENU_STANDARD_FORCED)?(empty($conf->global->MAIN_MENU_STANDARD)?'eldy_menu.php':$conf->global->MAIN_MENU_STANDARD):$conf->global->MAIN_MENU_STANDARD_FORCED); $conf->standard_menu=(empty($conf->global->MAIN_MENU_STANDARD_FORCED)?(empty($conf->global->MAIN_MENU_STANDARD)?'eldy_menu.php':$conf->global->MAIN_MENU_STANDARD):$conf->global->MAIN_MENU_STANDARD_FORCED);
$conf->smart_menu=(empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?(empty($conf->global->MAIN_MENU_SMARTPHONE)?'smartphone_menu.php':$conf->global->MAIN_MENU_SMARTPHONE):$conf->global->MAIN_MENU_SMARTPHONE_FORCED);
} }
else // If external user else // If external user
{ {
$conf->standard_menu=(empty($conf->global->MAIN_MENUFRONT_STANDARD_FORCED)?(empty($conf->global->MAIN_MENUFRONT_STANDARD)?'eldy_menu.php':$conf->global->MAIN_MENUFRONT_STANDARD):$conf->global->MAIN_MENUFRONT_STANDARD_FORCED); $conf->standard_menu=(empty($conf->global->MAIN_MENUFRONT_STANDARD_FORCED)?(empty($conf->global->MAIN_MENUFRONT_STANDARD)?'eldy_menu.php':$conf->global->MAIN_MENUFRONT_STANDARD):$conf->global->MAIN_MENUFRONT_STANDARD_FORCED);
$conf->smart_menu=(empty($conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED)?(empty($conf->global->MAIN_MENUFRONT_SMARTPHONE)?'smartphone_menu.php':$conf->global->MAIN_MENUFRONT_SMARTPHONE):$conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED);
} }
// Load the menu manager (only if not already done) // Load the menu manager (only if not already done)
$file_menu=empty($conf->browser->phone)?$conf->standard_menu:$conf->smart_menu; $file_menu=$conf->standard_menu;
if (GETPOST('menu')) $file_menu=GETPOST('menu'); // example: menu=eldy_menu.php if (GETPOST('menu')) $file_menu=GETPOST('menu'); // example: menu=eldy_menu.php
if (! class_exists('MenuManager')) if (! class_exists('MenuManager'))
{ {

View File

@ -328,7 +328,7 @@ function dol_clone($object)
function dol_size($size,$type='') function dol_size($size,$type='')
{ {
global $conf; global $conf;
if (empty($conf->browser->phone)) return $size; if (empty($conf->dol_optimize_smallscreen)) return $size;
if ($type == 'width' && $size > 250) return 250; if ($type == 'width' && $size > 250) return 250;
else return 10; else return 10;
} }
@ -594,7 +594,7 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p
// Show title // Show title
$showtitle=1; $showtitle=1;
if (! empty($conf->browser->phone)) $showtitle=0; if (! empty($conf->dol_optimize_smallscreen)) $showtitle=0;
if (! empty($title) && $showtitle) if (! empty($title) && $showtitle)
{ {
$limittitle=30; $limittitle=30;
@ -767,6 +767,7 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e
{ {
global $conf,$langs; global $conf,$langs;
// Clean parameters
$to_gmt=false; $to_gmt=false;
$offsettz=$offsetdst=0; $offsettz=$offsetdst=0;
if ($tzoutput) if ($tzoutput)
@ -792,11 +793,8 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e
} }
} }
} }
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
if (! $format) $format='daytextshort';
// Si format non defini, on prend $conf->format_date_text_short sinon %Y-%m-%d %H:%M:%S
if (! $format) $format=(isset($conf->format_date_text_short) ? $conf->format_date_text_short : '%Y-%m-%d %H:%M:%S');
// Change predefined format into computer format. If found translation in lang file we use it, otherwise we use default. // Change predefined format into computer format. If found translation in lang file we use it, otherwise we use default.
if ($format == 'day') $format=($outputlangs->trans("FormatDateShort")!="FormatDateShort"?$outputlangs->trans("FormatDateShort"):$conf->format_date_short); if ($format == 'day') $format=($outputlangs->trans("FormatDateShort")!="FormatDateShort"?$outputlangs->trans("FormatDateShort"):$conf->format_date_short);
@ -808,7 +806,6 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e
else if ($format == 'dayhoursec') $format=($outputlangs->trans("FormatDateHourSecShort")!="FormatDateHourSecShort"?$outputlangs->trans("FormatDateHourSecShort"):$conf->format_date_hour_sec_short); else if ($format == 'dayhoursec') $format=($outputlangs->trans("FormatDateHourSecShort")!="FormatDateHourSecShort"?$outputlangs->trans("FormatDateHourSecShort"):$conf->format_date_hour_sec_short);
else if ($format == 'dayhourtext') $format=($outputlangs->trans("FormatDateHourText")!="FormatDateHourText"?$outputlangs->trans("FormatDateHourText"):$conf->format_date_hour_text); else if ($format == 'dayhourtext') $format=($outputlangs->trans("FormatDateHourText")!="FormatDateHourText"?$outputlangs->trans("FormatDateHourText"):$conf->format_date_hour_text);
else if ($format == 'dayhourtextshort') $format=($outputlangs->trans("FormatDateHourTextShort")!="FormatDateHourTextShort"?$outputlangs->trans("FormatDateHourTextShort"):$conf->format_date_hour_text_short); else if ($format == 'dayhourtextshort') $format=($outputlangs->trans("FormatDateHourTextShort")!="FormatDateHourTextShort"?$outputlangs->trans("FormatDateHourTextShort"):$conf->format_date_hour_text_short);
// Format not sensitive to language // Format not sensitive to language
else if ($format == 'dayhourlog') $format='%Y%m%d%H%M%S'; else if ($format == 'dayhourlog') $format='%Y%m%d%H%M%S';
else if ($format == 'dayhourldap') $format='%Y%m%d%H%M%SZ'; else if ($format == 'dayhourldap') $format='%Y%m%d%H%M%SZ';
@ -816,12 +813,12 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e
else if ($format == 'dayxcard') $format='%Y%m%d'; else if ($format == 'dayxcard') $format='%Y%m%d';
else if ($format == 'dayrfc') $format='%Y-%m-%d'; // DATE_RFC3339 else if ($format == 'dayrfc') $format='%Y-%m-%d'; // DATE_RFC3339
else if ($format == 'dayhourrfc') $format='%Y-%m-%dT%H:%M:%SZ'; // DATETIME RFC3339 else if ($format == 'dayhourrfc') $format='%Y-%m-%dT%H:%M:%SZ'; // DATETIME RFC3339
else if ($format == 'standard') $format='%Y-%m-%d %H:%M:%S';
// If date undefined or "", we return "" // If date undefined or "", we return ""
if (dol_strlen($time) == 0) return ''; // $time=0 allowed (it means 01/01/1970 00:00:00) if (dol_strlen($time) == 0) return ''; // $time=0 allowed (it means 01/01/1970 00:00:00)
//print 'x'.$time; // Clean format
if (preg_match('/%b/i',$format)) // There is some text to translate if (preg_match('/%b/i',$format)) // There is some text to translate
{ {
// We inhibate translation to text made by strftime functions. We will use trans instead later. // We inhibate translation to text made by strftime functions. We will use trans instead later.
@ -2477,7 +2474,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
} }
else else
{ {
if (empty($conf->browser->phone) && $picto && $titre) print '<td class="nobordernopadding" width="40" align="left" valign="middle">'.img_picto('',$picto, '', $pictoisfullpath).'</td>'; if (empty($conf->dol_optimize_smallscreen) && $picto && $titre) print '<td class="nobordernopadding" width="40" align="left" valign="middle">'.img_picto('',$picto, '', $pictoisfullpath).'</td>';
print '<td class="nobordernopadding">'; print '<td class="nobordernopadding">';
print '<div class="titre">'.$titre.'</div>'; print '<div class="titre">'.$titre.'</div>';
$pagelist.= $langs->trans('Page').' '.($page+1); $pagelist.= $langs->trans('Page').' '.($page+1);
@ -2486,7 +2483,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
} }
else else
{ {
if (empty($conf->browser->phone) && $picto && $titre) print '<td class="nobordernopadding" width="40" align="left" valign="middle">'.img_picto('',$picto, '', $pictoisfullpath).'</td>'; if (empty($conf->dol_optimize_smallscreen) && $picto && $titre) print '<td class="nobordernopadding" width="40" align="left" valign="middle">'.img_picto('',$picto, '', $pictoisfullpath).'</td>';
print '<td class="nobordernopadding"><div class="titre">'.$titre.'</div></td>'; print '<td class="nobordernopadding"><div class="titre">'.$titre.'</div></td>';
} }

View File

@ -168,12 +168,6 @@ function dol_loginfunction($langs,$conf,$mysoc)
$conf_css = $themepath."?lang=".$langs->defaultlang; $conf_css = $themepath."?lang=".$langs->defaultlang;
// Select templates // Select templates
if (! empty($conf->browser->phone) && preg_match('/^smartphone/',$conf->smart_menu))
{
$template_dir = DOL_DOCUMENT_ROOT.'/theme/phones/smartphone/tpl/';
}
else
{
if (! empty($conf->modules_parts['tpl'])) // Using this feature slow down application if (! empty($conf->modules_parts['tpl'])) // Using this feature slow down application
{ {
$dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl/')); $dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl/'));
@ -187,7 +181,6 @@ function dol_loginfunction($langs,$conf,$mysoc)
{ {
$template_dir = DOL_DOCUMENT_ROOT."/core/tpl/"; $template_dir = DOL_DOCUMENT_ROOT."/core/tpl/";
} }
}
// Set cookie for timeout management // Set cookie for timeout management
$prefix=dol_getprefix(); $prefix=dol_getprefix();
@ -295,9 +288,12 @@ function dol_loginfunction($langs,$conf,$mysoc)
$jquerytheme = 'smoothness'; $jquerytheme = 'smoothness';
if (! empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME; if (! empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME;
// Set dol_hide_topmenu and dol_hide_leftmenu // Set dol_hide_topmenu, dol_hide_leftmenu, dol_optimize_smallscreen, dol_nomousehover
$dol_hide_topmenu=GETPOST('dol_hide_topmenu'); $dol_hide_topmenu=GETPOST('dol_hide_topmenu');
$dol_hide_leftmenu=GETPOST('dol_hide_leftmenu'); $dol_hide_leftmenu=GETPOST('dol_hide_leftmenu');
$dol_optimize_smallscreen=GETPOST('dol_optimize_smallscreen');
$dol_no_mouse_hover=GETPOST('dol_no_mouse_hover');
$dol_use_jmobile=GETPOST('dol_use_jmobile');
// Include login page template // Include login page template
include $template_dir.'login.tpl.php'; include $template_dir.'login.tpl.php';

View File

@ -19,7 +19,7 @@
*/ */
/** /**
* \file htdocs/core/search_jmobile.php * \file htdocs/core/search_page.php
* \brief File to return search box * \brief File to return search box
*/ */
@ -50,7 +50,7 @@ $left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
* View * View
*/ */
// URL http://mydolibarr/core/getmenu_jmobime?mainmenu=mainmenu&leftmenu=leftmenu can be used for tests // URL http://mydolibarr/core/search_page?dol_use_jmobile=1 can be used for tests
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);

View File

@ -89,6 +89,9 @@ $(document).ready(function () {
<input type="hidden" name="screenheight" id="screenheight" value="" /> <input type="hidden" name="screenheight" id="screenheight" value="" />
<input type="hidden" name="dol_hide_topmenu" id="dol_hide_topmenu" value="<?php echo $dol_hide_topmenu; ?>" /> <input type="hidden" name="dol_hide_topmenu" id="dol_hide_topmenu" value="<?php echo $dol_hide_topmenu; ?>" />
<input type="hidden" name="dol_hide_leftmenu" id="dol_hide_leftmenu" value="<?php echo $dol_hide_leftmenu; ?>" /> <input type="hidden" name="dol_hide_leftmenu" id="dol_hide_leftmenu" value="<?php echo $dol_hide_leftmenu; ?>" />
<input type="hidden" name="dol_optimize_smallscreen" id="dol_optimize_smallscreen" value="<?php echo $dol_optimize_smallscreen; ?>" />
<input type="hidden" name="dol_no_mouse_hover" id="dol_no_mouse_hover" value="<?php echo $dol_no_mouse_hover; ?>" />
<input type="hidden" name="dol_use_jmobile" id="dol_use_jmobile" value="<?php echo $dol_use_jmobile; ?>" />
<table class="login_table_title" summary="<?php echo dol_escape_htmltag($title); ?>" cellpadding="0" cellspacing="0" border="0" align="center"> <table class="login_table_title" summary="<?php echo dol_escape_htmltag($title); ?>" cellpadding="0" cellspacing="0" border="0" align="center">
<tr class="vmenu"><td align="center"><?php echo $title; ?></td></tr> <tr class="vmenu"><td align="center"><?php echo $title; ?></td></tr>

View File

@ -52,13 +52,6 @@ if (!isset($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_IN
* View * View
*/ */
// If smartphone mode, we do not show main page, we show only menu. TODO Remove this
if (preg_match('/^smartphone/',$conf->smart_menu) && ! empty($conf->browser->phone))
{
include_once DOL_DOCUMENT_ROOT.'/theme/phones/smartphone/tpl/menu.tpl.php';
exit;
}
llxHeader('',$langs->trans("HomeArea")); llxHeader('',$langs->trans("HomeArea"));
print_fiche_titre($langs->trans("HomeArea")); print_fiche_titre($langs->trans("HomeArea"));

View File

@ -571,7 +571,7 @@ ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP
NoFileFound=No documents saved in this directory NoFileFound=No documents saved in this directory
CurrentUserLanguage=Current language CurrentUserLanguage=Current language
CurrentTheme=Current theme CurrentTheme=Current theme
CurrentMenuManager=current menu manager CurrentMenuManager=Current menu manager
DisabledModules=Disabled modules DisabledModules=Disabled modules
For=For For=For
ForCustomer=For customer ForCustomer=For customer

View File

@ -418,6 +418,11 @@ if (! defined('NOLOGIN'))
$dol_dst_second=$_POST["dst_second"]; $dol_dst_second=$_POST["dst_second"];
$dol_screenwidth=$_POST["screenwidth"]; $dol_screenwidth=$_POST["screenwidth"];
$dol_screenheight=$_POST["screenheight"]; $dol_screenheight=$_POST["screenheight"];
$dol_hide_topmenu=$_POST['dol_hide_topmenu'];
$dol_hide_leftmenu=$_POST['dol_hide_leftmenu'];
$dol_optimize_smallscreen=$_POST['dol_optimize_smallscreen'];
$dol_no_mouse_hover=$_POST['dol_no_mouse_hover'];
$dol_use_jmobile=$_POST['dol_use_jmobile'];
} }
if (! $login) if (! $login)
@ -527,7 +532,7 @@ if (! defined('NOLOGIN'))
} }
else else
{ {
if (! empty($conf->global->MAIN_ACTIVATE_UPDATESESSIONTRIGGER)) // We do not execute such trigger at each page load by default if (! empty($conf->global->MAIN_ACTIVATE_UPDATESESSIONTRIGGER)) // We do not execute such trigger at each page load by default (triggers are time consuming)
{ {
// Call triggers // Call triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
@ -545,9 +550,10 @@ if (! defined('NOLOGIN'))
// If we are here, this means authentication was successfull. // If we are here, this means authentication was successfull.
if (! isset($_SESSION["dol_login"])) if (! isset($_SESSION["dol_login"]))
{ {
// New session for this login.
$error=0; $error=0;
// New session for this login // Store value into session (values always stored)
$_SESSION["dol_login"]=$user->login; $_SESSION["dol_login"]=$user->login;
$_SESSION["dol_authmode"]=isset($dol_authmode)?$dol_authmode:''; $_SESSION["dol_authmode"]=isset($dol_authmode)?$dol_authmode:'';
$_SESSION["dol_tz"]=isset($dol_tz)?$dol_tz:''; $_SESSION["dol_tz"]=isset($dol_tz)?$dol_tz:'';
@ -560,8 +566,13 @@ if (! defined('NOLOGIN'))
$_SESSION["dol_screenheight"]=isset($dol_screenheight)?$dol_screenheight:''; $_SESSION["dol_screenheight"]=isset($dol_screenheight)?$dol_screenheight:'';
$_SESSION["dol_company"]=$conf->global->MAIN_INFO_SOCIETE_NOM; $_SESSION["dol_company"]=$conf->global->MAIN_INFO_SOCIETE_NOM;
$_SESSION["dol_entity"]=$conf->entity; $_SESSION["dol_entity"]=$conf->entity;
if (GETPOST('dol_hide_topmenu')) $_SESSION['dol_hide_topmenu']=1; // Store value into session (values stored only if defined)
if (GETPOST('dol_hide_leftmenu')) $_SESSION['dol_hide_leftmenu']=1; if (! empty($dol_hide_topmenu)) $_SESSION['dol_hide_topmenu']=$dol_hide_topmenu;
if (! empty($dol_hide_leftmenu)) $_SESSION['dol_hide_leftmenu']=$dol_hide_leftmenu;
if (! empty($dol_optimize_smallscreen)) $_SESSION['dol_optimize_smallscreen']=$dol_optimize_smallscreen;
if (! empty($dol_no_mouse_hover)) $_SESSION['dol_no_mouse_hover']=$dol_no_mouse_hover;
if (! empty($dol_use_jmobile)) $_SESSION['dol_use_jmobile']=$dol_use_jmobile;
dol_syslog("This is a new started user session. _SESSION['dol_login']=".$_SESSION["dol_login"].' Session id='.session_id()); dol_syslog("This is a new started user session. _SESSION['dol_login']=".$_SESSION["dol_login"].' Session id='.session_id());
$db->begin(); $db->begin();
@ -631,21 +642,25 @@ if (! defined('NOLOGIN'))
/* /*
* Overwrite configs global by personal configs * Overwrite configs global by personal configs
*/ */
// Set liste_limit // Set liste_limit
if (isset($user->conf->MAIN_SIZE_LISTE_LIMIT)) // Can be 0 if (isset($user->conf->MAIN_SIZE_LISTE_LIMIT)) $conf->liste_limit = $user->conf->MAIN_SIZE_LISTE_LIMIT; // Can be 0
{ if (isset($user->conf->PRODUIT_LIMIT_SIZE)) $conf->product->limit_size = $user->conf->PRODUIT_LIMIT_SIZE; // Can be 0
$conf->liste_limit = $user->conf->MAIN_SIZE_LISTE_LIMIT;
}
if (isset($user->conf->PRODUIT_LIMIT_SIZE)) // Can be 0
{
$conf->product->limit_size = $user->conf->PRODUIT_LIMIT_SIZE;
}
// Replace conf->css by personalized value // Replace conf->css by personalized value
if (isset($user->conf->MAIN_THEME) && $user->conf->MAIN_THEME) if (isset($user->conf->MAIN_THEME) && $user->conf->MAIN_THEME)
{ {
$conf->theme=$user->conf->MAIN_THEME; $conf->theme=$user->conf->MAIN_THEME;
$conf->css = "/theme/".$conf->theme."/style.css.php"; $conf->css = "/theme/".$conf->theme."/style.css.php";
} }
}
// Case forcing style from url
if (GETPOST('theme'))
{
$conf->theme=GETPOST('theme','alpha',1);
$conf->css = "/theme/".$conf->theme."/style.css.php";
}
// Set javascript option // Set javascript option
if (! GETPOST('nojs')) // If javascript was not disabled on URL if (! GETPOST('nojs')) // If javascript was not disabled on URL
@ -656,6 +671,17 @@ if (! defined('NOLOGIN'))
} }
} }
else $conf->use_javascript_ajax=0; else $conf->use_javascript_ajax=0;
// Set terminal output option
if (GETPOST('dol_hide_leftmenu') || ! empty($_SESSION['dol_hide_leftmenu'])) $conf->dol_hide_leftmenu=1;
if (GETPOST('dol_hide_topmenu') || ! empty($_SESSION['dol_hide_topmenu'])) $conf->dol_hide_topmenu=1;
if (GETPOST('dol_optimize_smallscreen') || ! empty($_SESSION['dol_optimize_smallscreen'])) $conf->dol_optimize_smallscreen=1;
if (GETPOST('dol_no_mouse_hover') || ! empty($_SESSION['dol_no_mouse_hover'])) $conf->dol_no_mouse_hover=1;
if (GETPOST('dol_use_jmobile') || ! empty($_SESSION['dol_use_jmobile'])) $conf->dol_use_jmobile=1;
if (! empty($conf->browser->phone))
{
$conf->dol_optimize_smallscreen=1;
$conf->dol_no_mouse_hover=1;
} }
if (! defined('NOREQUIRETRAN')) if (! defined('NOREQUIRETRAN'))
@ -673,20 +699,8 @@ if (! defined('NOREQUIRETRAN'))
} }
} }
} }
/* else // If language was forced on URL
{
$langs->setDefaultLang(GETPOST('lang','alpha',1));
}*/
} }
// Case forcing style from url
if (GETPOST('theme'))
{
$conf->theme=GETPOST('theme','alpha',1);
$conf->css = "/theme/".$conf->theme."/style.css.php";
}
if (! defined('NOLOGIN')) if (! defined('NOLOGIN'))
{ {
// If the login is not recovered, it is identified with an account that does not exist. // If the login is not recovered, it is identified with an account that does not exist.
@ -775,16 +789,14 @@ if (! defined('NOREQUIREMENU'))
if (empty($user->societe_id)) // If internal user or not defined if (empty($user->societe_id)) // If internal user or not defined
{ {
$conf->standard_menu=(empty($conf->global->MAIN_MENU_STANDARD_FORCED)?(empty($conf->global->MAIN_MENU_STANDARD)?'eldy_menu.php':$conf->global->MAIN_MENU_STANDARD):$conf->global->MAIN_MENU_STANDARD_FORCED); $conf->standard_menu=(empty($conf->global->MAIN_MENU_STANDARD_FORCED)?(empty($conf->global->MAIN_MENU_STANDARD)?'eldy_menu.php':$conf->global->MAIN_MENU_STANDARD):$conf->global->MAIN_MENU_STANDARD_FORCED);
$conf->smart_menu=(empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?(empty($conf->global->MAIN_MENU_SMARTPHONE)?'smartphone_menu.php':$conf->global->MAIN_MENU_SMARTPHONE):$conf->global->MAIN_MENU_SMARTPHONE_FORCED);
} }
else // If external user else // If external user
{ {
$conf->standard_menu=(empty($conf->global->MAIN_MENUFRONT_STANDARD_FORCED)?(empty($conf->global->MAIN_MENUFRONT_STANDARD)?'eldy_menu.php':$conf->global->MAIN_MENUFRONT_STANDARD):$conf->global->MAIN_MENUFRONT_STANDARD_FORCED); $conf->standard_menu=(empty($conf->global->MAIN_MENUFRONT_STANDARD_FORCED)?(empty($conf->global->MAIN_MENUFRONT_STANDARD)?'eldy_menu.php':$conf->global->MAIN_MENUFRONT_STANDARD):$conf->global->MAIN_MENUFRONT_STANDARD_FORCED);
$conf->smart_menu=(empty($conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED)?(empty($conf->global->MAIN_MENUFRONT_SMARTPHONE)?'smartphone_menu.php':$conf->global->MAIN_MENUFRONT_SMARTPHONE):$conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED);
} }
// Load the menu manager (only if not already done) // Load the menu manager (only if not already done)
$file_menu=empty($conf->browser->phone)?$conf->standard_menu:$conf->smart_menu; $file_menu=$conf->standard_menu;
if (GETPOST('menu')) $file_menu=GETPOST('menu'); // example: menu=eldy_menu.php if (GETPOST('menu')) $file_menu=GETPOST('menu'); // example: menu=eldy_menu.php
if (! class_exists('MenuManager')) if (! class_exists('MenuManager'))
{ {
@ -947,7 +959,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/timepicker/jquery-ui-timepicker-addon.css" />'."\n"; print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/timepicker/jquery-ui-timepicker-addon.css" />'."\n";
} }
// jQuery jMobile // jQuery jMobile
if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || GETPOST('jmobile')) if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || ! empty($conf->dol_use_jmobile))
{ {
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css" />'."\n"; print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css" />'."\n";
} }
@ -973,6 +985,9 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
if (! empty($_SESSION['dol_resetcache'])) $themeparam.='&amp;dol_resetcache='.$_SESSION['dol_resetcache']; if (! empty($_SESSION['dol_resetcache'])) $themeparam.='&amp;dol_resetcache='.$_SESSION['dol_resetcache'];
if (GETPOST('dol_hide_topmenu')) $themeparam.='&amp;dol_hide_topmenu=1'; if (GETPOST('dol_hide_topmenu')) $themeparam.='&amp;dol_hide_topmenu=1';
if (GETPOST('dol_hide_leftmenu')) $themeparam.='&amp;dol_hide_leftmenu=1'; if (GETPOST('dol_hide_leftmenu')) $themeparam.='&amp;dol_hide_leftmenu=1';
if (GETPOST('dol_optimize_smallscreen')) $themeparam.='&amp;dol_optimize_smallscreen=1';
if (GETPOST('dol_no_mouse_hover')) $themeparam.='&amp;dol_no_mouse_hover=1';
if (GETPOST('dol_use_jmobile')) $themeparam.='&amp;dol_use_jmobile=1';
//print 'themepath='.$themepath.' themeparam='.$themeparam;exit; //print 'themepath='.$themepath.' themeparam='.$themeparam;exit;
print '<link rel="stylesheet" type="text/css" title="default" href="'.$themepath.$themeparam.'">'."\n"; print '<link rel="stylesheet" type="text/css" title="default" href="'.$themepath.$themeparam.'">'."\n";
@ -1112,7 +1127,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/timepicker.js.php?lang='.$langs->defaultlang.'"></script>'."\n"; print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/timepicker.js.php?lang='.$langs->defaultlang.'"></script>'."\n";
} }
// jQuery jMobile // jQuery jMobile
if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || GETPOST('jmobile')) if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || ! empty($conf->dol_use_jmobile))
{ {
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js"></script>'."\n"; print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js"></script>'."\n";
} }
@ -1247,7 +1262,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
//togglerLength_open: 0, //togglerLength_open: 0,
// effect defaults - overridden on some panes // effect defaults - overridden on some panes
//slideTrigger_open: "mouseover", //slideTrigger_open: "mouseover",
initClosed: '.(empty($conf->browser->phone)?'false':'true').', initClosed: '.(empty($conf->dol_optimize_smallscreen)?'false':'true').',
fxName: "drop", fxName: "drop",
fxSpeed: "fast", fxSpeed: "fast",
fxSettings: { easing: "" } fxSettings: { easing: "" }
@ -1630,21 +1645,6 @@ function main_area($title='')
print "\n"; print "\n";
print '<div class="fiche"> <!-- begin div class="fiche" -->'."\n"; print '<div class="fiche"> <!-- begin div class="fiche" -->'."\n";
if (preg_match('/^smartphone/',$conf->smart_menu) && ! empty($conf->browser->phone))
{
print '<div data-role="page"> <!-- begin div data-role="page" -->';
print '<div data-role="header" data-nobackbtn="false" data-theme="b">';
print '<div id="dol-homeheader">'."\n";
$appli='Dolibarr';
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $appli=$conf->global->MAIN_APPLICATION_TITLE;
print $appli;
print '</div>'."\n";
print '</div>'."\n";
print "\n";
print '<div data-role="content"> <!-- begin div data-role="content" -->'."\n";
}
if (! empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) print info_admin($langs->trans("WarningYouAreInMaintenanceMode",$conf->global->MAIN_ONLY_LOGIN_ALLOWED)); if (! empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) print info_admin($langs->trans("WarningYouAreInMaintenanceMode",$conf->global->MAIN_ONLY_LOGIN_ALLOWED));
} }
@ -1762,11 +1762,6 @@ if (! function_exists("llxFooter"))
} }
print "\n\n"; print "\n\n";
if (preg_match('/^smartphone/',$conf->smart_menu) && ! empty($conf->browser->phone))
{
print '</div> <!-- end div data-role="content" -->'."\n";
print '</div> <!-- end div data-role="page" -->'."\n";
}
print '</div> <!-- end div class="fiche" -->'."\n"; print '</div> <!-- end div class="fiche" -->'."\n";

View File

@ -1309,12 +1309,12 @@ else
print "}\n"; print "}\n";
print '</script>'; print '</script>';
print "\n"; print "\n";
$s.='<a href="#" onclick="javascript: CheckVAT(document.formsoc.tva_intra.value);">'.$langs->trans("VATIntraCheck").'</a>'; $s.='<a href="#" class="hideonsmartphone" onclick="javascript: CheckVAT(document.formsoc.tva_intra.value);">'.$langs->trans("VATIntraCheck").'</a>';
$s = $form->textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1); $s = $form->textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1);
} }
else else
{ {
$s.='<a href="'.$langs->transcountry("VATIntraCheckURL",$object->country_id).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').'</a>'; $s.='<a href="'.$langs->transcountry("VATIntraCheckURL",$object->country_id).'" class="hideonsmartphone" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').'</a>';
} }
} }
print $s; print $s;
@ -1368,7 +1368,7 @@ else
print '</td></tr>'; print '</td></tr>';
// Capital // Capital
print '<tr><td>'.$langs->trans("Capital").'</td><td colspan="3"><input type="text" name="capital" size="10" value="'.$object->capital.'"> '.$langs->trans("Currency".$conf->currency).'</td></tr>'; print '<tr><td>'.$langs->trans("Capital").'</td><td colspan="3"><input type="text" name="capital" size="10" value="'.$object->capital.'"> <font class="hideonsmartphone">'.$langs->trans("Currency".$conf->currency).'</font></td></tr>';
// Default language // Default language
if (! empty($conf->global->MAIN_MULTILANGS)) if (! empty($conf->global->MAIN_MULTILANGS))
@ -1378,6 +1378,7 @@ else
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
} }
// Other attributes // Other attributes
$parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3'); $parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3');
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
@ -1385,8 +1386,9 @@ else
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');
} }
// Logo // Logo
print '<tr>'; print '<tr class="hideonsmartphone">';
print '<td>'.$langs->trans("Logo").'</td>'; print '<td>'.$langs->trans("Logo").'</td>';
print '<td colspan="3">'; print '<td colspan="3">';
if ($object->logo) print $form->showphoto('societe',$object,50); if ($object->logo) print $form->showphoto('societe',$object,50);
@ -1618,12 +1620,12 @@ else
print "}\n"; print "}\n";
print '</script>'; print '</script>';
print "\n"; print "\n";
$s.='<a href="#" onclick="javascript: CheckVAT( $(\'#tva_intra\').val() );">'.$langs->trans("VATIntraCheck").'</a>'; $s.='<a href="#" class="hideonsmartphone" onclick="javascript: CheckVAT( $(\'#tva_intra\').val() );">'.$langs->trans("VATIntraCheck").'</a>';
$s = $form->textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1); $s = $form->textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1);
} }
else else
{ {
$s.='<a href="'.$langs->transcountry("VATIntraCheckURL",$object->country_id).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').'</a>'; $s.='<a href="'.$langs->transcountry("VATIntraCheckURL",$object->country_id).'" class="hideonsmartphone" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').'</a>';
} }
} }
print $s; print $s;

View File

@ -56,8 +56,8 @@ if (GETPOST('theme')) $conf->theme=GETPOST('theme'); // If theme was forced on
$langs->load("main",0,1); $langs->load("main",0,1);
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right'); $right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left'); $left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
$fontsize=empty($conf->browser->phone)?'12':'12'; $fontsize=empty($conf->dol_optimize_smallscreen)?'12':'12';
$fontsizesmaller=empty($conf->browser->phone)?'11':'11'; $fontsizesmaller=empty($conf->dol_optimize_smallscreen)?'11':'11';
$path=''; // This value may be used in future for external module to overwrite theme $path=''; // This value may be used in future for external module to overwrite theme
$theme='amarok'; // Value of theme $theme='amarok'; // Value of theme
@ -180,6 +180,14 @@ form {
padding:0px; padding:0px;
margin:0px; margin:0px;
} }
div.float
{
float:<?php print $left; ?>;
}
div.floatright
{
float:<?php print $right; ?>;
}
.valignmiddle { .valignmiddle {
vertical-align: middle; vertical-align: middle;
@ -584,7 +592,7 @@ a.help:link, a.help:visited, a.help:hover, a.help:active { font-size:<?php print
* RESIZER-BARS * RESIZER-BARS
*/ */
.ui-layout-resizer { /* all 'resizer-bars' */ .ui-layout-resizer { /* all 'resizer-bars' */
width: <?php echo (empty($conf->browser->phone)?'8':'24'); ?>px !important; width: <?php echo (empty($conf->dol_optimize_smallscreen)?'8':'24'); ?>px !important;
} }
.ui-layout-resizer-hover { /* affects both open and closed states */ .ui-layout-resizer-hover { /* affects both open and closed states */
} }
@ -593,7 +601,7 @@ a.help:link, a.help:visited, a.help:hover, a.help:active { font-size:<?php print
/*.ui-layout-resizer-open-hover ,*/ /* hover-color to 'resize' */ /*.ui-layout-resizer-open-hover ,*/ /* hover-color to 'resize' */
.ui-layout-resizer-dragging { /* resizer beging 'dragging' */ .ui-layout-resizer-dragging { /* resizer beging 'dragging' */
background: #DDD; background: #DDD;
width: <?php echo (empty($conf->browser->phone)?'8':'24'); ?>px; width: <?php echo (empty($conf->dol_optimize_smallscreen)?'8':'24'); ?>px;
} }
.ui-layout-resizer-dragging { /* CLONED resizer being dragged */ .ui-layout-resizer-dragging { /* CLONED resizer being dragged */
border-left: 1px solid #BBB; border-left: 1px solid #BBB;
@ -629,7 +637,7 @@ a.help:link, a.help:visited, a.help:hover, a.help:active { font-size:<?php print
* TOGGLER-BUTTONS * TOGGLER-BUTTONS
*/ */
.ui-layout-toggler { .ui-layout-toggler {
<?php if (empty($conf->browser->phone)) { ?> <?php if (empty($conf->dol_optimize_smallscreen)) { ?>
border-top: 1px solid #AAA; /* match pane-border */ border-top: 1px solid #AAA; /* match pane-border */
border-right: 1px solid #AAA; /* match pane-border */ border-right: 1px solid #AAA; /* match pane-border */
border-bottom: 1px solid #AAA; /* match pane-border */ border-bottom: 1px solid #AAA; /* match pane-border */
@ -641,14 +649,14 @@ a.help:link, a.help:visited, a.help:hover, a.help:active { font-size:<?php print
} }
.ui-layout-toggler-open { .ui-layout-toggler-open {
height: 54px !important; height: 54px !important;
width: <?php echo (empty($conf->browser->phone)?'7':'22'); ?>px !important; width: <?php echo (empty($conf->dol_optimize_smallscreen)?'7':'22'); ?>px !important;
-moz-border-radius:0px 10px 10px 0px; -moz-border-radius:0px 10px 10px 0px;
-webkit-border-radius:0px 10px 10px 0px; -webkit-border-radius:0px 10px 10px 0px;
border-radius:0px 10px 10px 0px; border-radius:0px 10px 10px 0px;
} }
.ui-layout-toggler-closed { .ui-layout-toggler-closed {
height: <?php echo (empty($conf->browser->phone)?'54':'2'); ?>px !important; height: <?php echo (empty($conf->dol_optimize_smallscreen)?'54':'2'); ?>px !important;
width: <?php echo (empty($conf->browser->phone)?'7':'22'); ?>px !important; width: <?php echo (empty($conf->dol_optimize_smallscreen)?'7':'22'); ?>px !important;
-moz-border-radius:0px 10px 10px 0px; -moz-border-radius:0px 10px 10px 0px;
-webkit-border-radius:0px 10px 10px 0px; -webkit-border-radius:0px 10px 10px 0px;
border-radius:0px 10px 10px 0px; border-radius:0px 10px 10px 0px;
@ -667,7 +675,7 @@ a.help:link, a.help:visited, a.help:hover, a.help:active { font-size:<?php print
} }
.ui-layout-north { .ui-layout-north {
height: <?php print (empty($conf->browser->phone)?'54':'21'); ?>px !important; height: <?php print (empty($conf->dol_optimize_smallscreen)?'54':'21'); ?>px !important;
} }
@ -816,8 +824,8 @@ td.vmenu {
div.fiche { div.fiche {
padding:8px 6px 10px; padding:8px 6px 10px;
margin-<?php print $left; ?>: <?php print (empty($conf->browser->phone) || empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))?'16':'24'; ?>px; margin-<?php print $left; ?>: <?php print (empty($conf->dol_optimize_smallscreen) || empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))?'16':'24'; ?>px;
margin-<?php print $right; ?>: <?php print empty($conf->browser->phone)?'12':'6'; ?>px; margin-<?php print $right; ?>: <?php print empty($conf->dol_optimize_smallscreen)?'12':'6'; ?>px;
} }
div.fichecenter { div.fichecenter {
@ -825,25 +833,25 @@ div.fichecenter {
clear: both; /* This is to have div fichecenter that are true rectangles */ clear: both; /* This is to have div fichecenter that are true rectangles */
} }
div.fichethirdleft { div.fichethirdleft {
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 35%;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 35%;\n"; } ?>
<?php if (! empty($conf->browser->phone)) { print "padding-bottom: 6px;\n"; } ?> <?php if (! empty($conf->dol_optimize_smallscreen)) { print "padding-bottom: 6px;\n"; } ?>
} }
div.fichetwothirdright { div.fichetwothirdright {
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 65%;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 65%;\n"; } ?>
<?php if (! empty($conf->browser->phone)) { print "padding-bottom: 6px\n"; } ?> <?php if (! empty($conf->dol_optimize_smallscreen)) { print "padding-bottom: 6px\n"; } ?>
} }
div.fichehalfleft { div.fichehalfleft {
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 50%;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 50%;\n"; } ?>
} }
div.fichehalfright { div.fichehalfright {
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 50%;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 50%;\n"; } ?>
} }
div.ficheaddleft { div.ficheaddleft {
<?php if (empty($conf->browser->phone)) { print "padding-left: 16px;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "padding-left: 16px;\n"; } ?>
} }
@ -852,7 +860,8 @@ div.ficheaddleft {
/* Boutons actions */ /* Boutons actions */
/* ============================================================================== */ /* ============================================================================== */
/* boutons : */ div.divbutaction { margin-bottom: 1.4em; }
.button, .butAction {background: #999; border: solid 1px #888; font-weight: normal; } .button, .butAction {background: #999; border: solid 1px #888; font-weight: normal; }
.butActionRefused {background: #eaeaea; color:rgba(0,0,0,0.6); font-weight: normal;} .butActionRefused {background: #eaeaea; color:rgba(0,0,0,0.6); font-weight: normal;}
.butActionDelete {background: #b33c37; border:solid 1px #8d2f2b; font-weight: normal;} .butActionDelete {background: #b33c37; border:solid 1px #8d2f2b; font-weight: normal;}

View File

@ -53,8 +53,8 @@ if (GETPOST('theme')) $conf->theme=GETPOST('theme'); // If theme was forced on
$langs->load("main",0,1); $langs->load("main",0,1);
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right'); $right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left'); $left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
$fontsize=empty($conf->browser->phone)?'12':'12'; $fontsize=empty($conf->dol_optimize_smallscreen)?'12':'12';
$fontsizesmaller=empty($conf->browser->phone)?'11':'11'; $fontsizesmaller=empty($conf->dol_optimize_smallscreen)?'11':'11';
$path=''; // This value may be used in future for external module to overwrite theme $path=''; // This value may be used in future for external module to overwrite theme
$theme='auguria'; // Value of theme $theme='auguria'; // Value of theme
@ -165,6 +165,10 @@ div.float
{ {
float:<?php print $left; ?>; float:<?php print $left; ?>;
} }
div.floatright
{
float:<?php print $right; ?>;
}
.valignmiddle { .valignmiddle {
vertical-align: middle; vertical-align: middle;
@ -188,7 +192,7 @@ div.float
/* ============================================================================== */ /* ============================================================================== */
.hideobject { display: none; } .hideobject { display: none; }
<?php if (! empty($conf->browser->phone)) { ?> <?php if (! empty($conf->dol_optimize_smallscreen)) { ?>
.hideonsmartphone { display: none; } .hideonsmartphone { display: none; }
<?php } ?> <?php } ?>
.linkobject { cursor: pointer; } .linkobject { cursor: pointer; }
@ -213,8 +217,8 @@ td.showDragHandle {
/* ============================================================================== */ /* ============================================================================== */
div.fiche { div.fiche {
margin-<?php print $left; ?>: <?php print empty($conf->browser->phone)?'10':'2'; ?>px; margin-<?php print $left; ?>: <?php print empty($conf->dol_optimize_smallscreen)?'10':'2'; ?>px;
margin-<?php print $right; ?>: <?php print empty($conf->browser->phone)?'8':''; ?>px; margin-<?php print $right; ?>: <?php print empty($conf->dol_optimize_smallscreen)?'8':''; ?>px;
} }
div.fichecenter { div.fichecenter {
@ -222,23 +226,23 @@ div.fichecenter {
clear: both; /* This is to have div fichecenter that are true rectangles */ clear: both; /* This is to have div fichecenter that are true rectangles */
} }
div.fichethirdleft { div.fichethirdleft {
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 35%;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 35%;\n"; } ?>
} }
div.fichetwothirdright { div.fichetwothirdright {
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 65%;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 65%;\n"; } ?>
} }
div.fichehalfleft { div.fichehalfleft {
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 50%;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 50%;\n"; } ?>
} }
div.fichehalfright { div.fichehalfright {
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 50%;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 50%;\n"; } ?>
} }
div.ficheaddleft { div.ficheaddleft {
<?php if (empty($conf->browser->phone)) { print "padding-left: 10px;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "padding-left: 10px;\n"; } ?>
} }
@ -247,7 +251,7 @@ div.ficheaddleft {
/* ============================================================================== */ /* ============================================================================== */
<?php <?php
if (! empty($conf->browser->phone)) if (! empty($conf->dol_optimize_smallscreen))
{ {
$minwidthtmenu=70; $minwidthtmenu=70;
$heightmenu=39; $heightmenu=39;
@ -295,7 +299,7 @@ div.mainmenu {
} }
*/ */
<?php if (empty($conf->browser->phone)) { ?> <?php if (empty($conf->dol_optimize_smallscreen)) { ?>
/* /*
div.mainmenu.home{ div.mainmenu.home{
@ -552,7 +556,7 @@ div#login_left, div#login_right {
div.login { div.login {
white-space:nowrap; white-space:nowrap;
padding: <?php echo ($conf->browser->phone?'0':'8')?>px 0px 0px 0px; padding: <?php echo ($conf->dol_optimize_smallscreen?'0':'8')?>px 0px 0px 0px;
margin: 0px 0px 0px 8px; margin: 0px 0px 0px 8px;
font-weight: bold; font-weight: bold;
} }
@ -565,7 +569,7 @@ div.login a:hover {
} }
img.login, img.printer, img.entity { img.login, img.printer, img.entity {
padding: <?php echo ($conf->browser->phone?'0':'8')?>px 0px 0px 0px; padding: <?php echo ($conf->dol_optimize_smallscreen?'0':'8')?>px 0px 0px 0px;
margin: 0px 0px 0px 8px; margin: 0px 0px 0px 8px;
text-decoration: none; text-decoration: none;
color: white; color: white;
@ -675,7 +679,7 @@ div.blockvmenubookmarks
div.blockvmenuhelp div.blockvmenuhelp
{ {
<?php if (empty($conf->browser->phone)) { ?> <?php if (empty($conf->dol_optimize_smallscreen)) { ?>
text-align: center; text-align: center;
border-spacing: 0px; border-spacing: 0px;
width: 162px; width: 162px;
@ -894,7 +898,7 @@ img.toolbarbutton {
} }
.ui-layout-north { .ui-layout-north {
height: <?php print (empty($conf->browser->phone)?'42':'42'); ?>px !important; height: <?php print (empty($conf->dol_optimize_smallscreen)?'42':'42'); ?>px !important;
} }
/* ECM */ /* ECM */
@ -1105,6 +1109,8 @@ span.tabspan {
/* Boutons actions */ /* Boutons actions */
/* ============================================================================== */ /* ============================================================================== */
div.divbutaction { margin-bottom: 1.4em; }
.butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active { .butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active {
font-family: <?php print $fontlist ?>; font-family: <?php print $fontlist ?>;
font-weight: bold; font-weight: bold;

View File

@ -54,8 +54,8 @@ if (GETPOST('theme')) $conf->theme=GETPOST('theme'); // If theme was forced on
$langs->load("main",0,1); $langs->load("main",0,1);
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right'); $right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left'); $left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
$fontsize=empty($conf->browser->phone)?'12':'12'; $fontsize=empty($conf->dol_optimize_smallscreen)?'12':'12';
$fontsizesmaller=empty($conf->browser->phone)?'11':'11'; $fontsizesmaller=empty($conf->dol_optimize_smallscreen)?'11':'11';
$fontlist='arial,tahoma,verdana,helvetica'; $fontlist='arial,tahoma,verdana,helvetica';
//$fontlist='Verdana,Helvetica,Arial,sans-serif'; //$fontlist='Verdana,Helvetica,Arial,sans-serif';
@ -190,6 +190,14 @@ form {
padding: 0em 0em 0em 0em; padding: 0em 0em 0em 0em;
margin: 0em 0em 0em 0em; margin: 0em 0em 0em 0em;
} }
div.float
{
float:<?php print $left; ?>;
}
div.floatright
{
float:<?php print $right; ?>;
}
.valignmiddle { .valignmiddle {
vertical-align: middle; vertical-align: middle;
@ -213,7 +221,7 @@ form {
/* ============================================================================== */ /* ============================================================================== */
.hideobject { display: none; } .hideobject { display: none; }
<?php if (! empty($conf->browser->phone)) { ?> <?php if (! empty($conf->dol_optimize_smallscreen)) { ?>
.hideonsmartphone { display: none; } .hideonsmartphone { display: none; }
<?php } ?> <?php } ?>
.linkobject { cursor: pointer; } .linkobject { cursor: pointer; }
@ -251,8 +259,8 @@ div.vmenu {
} }
div.fiche { div.fiche {
margin-<?php print $left; ?>: <?php print empty($conf->browser->phone)?'10':'2'; ?>px; margin-<?php print $left; ?>: <?php print empty($conf->dol_optimize_smallscreen)?'10':'2'; ?>px;
margin-<?php print $right; ?>: <?php print empty($conf->browser->phone)?'10':''; ?>px; margin-<?php print $right; ?>: <?php print empty($conf->dol_optimize_smallscreen)?'10':''; ?>px;
padding: 0px; padding: 0px;
position: relative; position: relative;
height: auto; height: auto;
@ -263,23 +271,23 @@ div.fichecenter {
clear: both; /* This is to have div fichecenter that are true rectangles */ clear: both; /* This is to have div fichecenter that are true rectangles */
} }
div.fichethirdleft { div.fichethirdleft {
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 35%;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 35%;\n"; } ?>
} }
div.fichetwothirdright { div.fichetwothirdright {
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 65%;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 65%;\n"; } ?>
} }
div.fichehalfleft { div.fichehalfleft {
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 50%;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 50%;\n"; } ?>
} }
div.fichehalfright { div.fichehalfright {
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 50%;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 50%;\n"; } ?>
} }
div.ficheaddleft { div.ficheaddleft {
<?php if (empty($conf->browser->phone)) { print "padding-left: 6px;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "padding-left: 6px;\n"; } ?>
} }
@ -297,7 +305,7 @@ div.ficheaddleft {
/* ============================================================================== */ /* ============================================================================== */
<?php <?php
if (! empty($conf->browser->phone)) if (! empty($conf->dol_optimize_smallscreen))
{ {
$minwidthtmenu=70; $minwidthtmenu=70;
$heightmenu=39; $heightmenu=39;
@ -341,7 +349,7 @@ div.mainmenu {
} }
*/ */
<?php if (empty($conf->browser->phone)) { ?> <?php if (empty($conf->dol_optimize_smallscreen)) { ?>
/* /*
div.mainmenu.home{ div.mainmenu.home{
@ -600,7 +608,7 @@ div#login_left, div#login_right {
div.login { div.login {
white-space:nowrap; white-space:nowrap;
padding: <?php echo ($conf->browser->phone?'0':'8')?>px 0px 0px 0px; padding: <?php echo ($conf->dol_optimize_smallscreen?'0':'8')?>px 0px 0px 0px;
margin: 0px 0px 0px 8px; margin: 0px 0px 0px 8px;
font-weight: bold; font-weight: bold;
} }
@ -613,7 +621,7 @@ div.login a:hover {
} }
img.login, img.printer, img.entity { img.login, img.printer, img.entity {
padding: <?php echo ($conf->browser->phone?'0':'8')?>px 0px 0px 0px; padding: <?php echo ($conf->dol_optimize_smallscreen?'0':'8')?>px 0px 0px 0px;
margin: 0px 0px 0px 8px; margin: 0px 0px 0px 8px;
text-decoration: none; text-decoration: none;
color: white; color: white;
@ -759,7 +767,7 @@ div.blockvmenubookmarks
div.blockvmenuhelp div.blockvmenuhelp
{ {
<?php if (empty($conf->browser->phone)) { ?> <?php if (empty($conf->dol_optimize_smallscreen)) { ?>
text-align: center; text-align: center;
border-spacing: 0px; border-spacing: 0px;
width: 162px; width: 162px;
@ -980,7 +988,7 @@ img.toolbarbutton {
} }
.ui-layout-north { .ui-layout-north {
height: <?php print (empty($conf->browser->phone)?'40':'40'); ?>px !important; height: <?php print (empty($conf->dol_optimize_smallscreen)?'40':'40'); ?>px !important;
} }
/* ECM */ /* ECM */
@ -1244,7 +1252,7 @@ span.tabspan {
/* Boutons actions */ /* Boutons actions */
/* ============================================================================== */ /* ============================================================================== */
/* Nouvelle syntaxe a utiliser */ div.divbutaction { margin-bottom: 1.4em; }
.butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active { .butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active {
font-family:"Trebuchet MS",Arial,Helvetica,sans-serif; font-family:"Trebuchet MS",Arial,Helvetica,sans-serif;

View File

@ -99,6 +99,9 @@ $(document).ready(function () {
<input type="hidden" name="screenheight" id="screenheight" value="" /> <input type="hidden" name="screenheight" id="screenheight" value="" />
<input type="hidden" name="dol_hide_topmenu" id="dol_hide_topmenu" value="" /> <input type="hidden" name="dol_hide_topmenu" id="dol_hide_topmenu" value="" />
<input type="hidden" name="dol_hide_leftmenu" id="dol_hide_leftmenu" value="" /> <input type="hidden" name="dol_hide_leftmenu" id="dol_hide_leftmenu" value="" />
<input type="hidden" name="dol_optimize_smallscreen" id="dol_optimize_smallscreen" value="<?php echo $dol_optimize_smallscreen; ?>" />
<input type="hidden" name="dol_no_mouse_hover" id="dol_no_mouse_over" value="<?php echo $dol_no_mouse_hover; ?>" />
<input type="hidden" name="dol_use_jmobile" id="dol_use_jmobile" value="<?php echo $dol_use_jmobile; ?>" />
<div id="infoVersion"><?php echo $title; ?></div> <div id="infoVersion"><?php echo $title; ?></div>

View File

@ -54,8 +54,8 @@ if (! empty($_GET["theme"])) $conf->theme=$_GET["theme"]; // If theme was force
$langs->load("main",0,1); $langs->load("main",0,1);
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right'); $right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left'); $left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
$fontsize=empty($conf->browser->phone)?'12':'12'; $fontsize=empty($conf->dol_optimize_smallscreen)?'12':'12';
$fontsizesmaller=empty($conf->browser->phone)?'11':'11'; $fontsizesmaller=empty($conf->dol_optimize_smallscreen)?'11':'11';
$fontlist='arial,tahoma,verdana,helvetica'; $fontlist='arial,tahoma,verdana,helvetica';
//$fontlist='Verdana,Helvetica,Arial,sans-serif'; //$fontlist='Verdana,Helvetica,Arial,sans-serif';
@ -170,6 +170,10 @@ div.float
{ {
float:<?php print $left; ?>; float:<?php print $left; ?>;
} }
div.floatright
{
float:<?php print $right; ?>;
}
.valignmiddle { .valignmiddle {
vertical-align: middle; vertical-align: middle;
@ -193,7 +197,7 @@ div.float
/* ============================================================================== */ /* ============================================================================== */
.hideobject { display: none; } .hideobject { display: none; }
<?php if (! empty($conf->browser->phone)) { ?> <?php if (! empty($conf->dol_optimize_smallscreen)) { ?>
.hideonsmartphone { display: none; } .hideonsmartphone { display: none; }
<?php } ?> <?php } ?>
.linkobject { cursor: pointer; } .linkobject { cursor: pointer; }
@ -223,8 +227,8 @@ div.leftContent {
} }
div.fiche { div.fiche {
margin-<?php print $left; ?>: <?php print empty($conf->browser->phone)?'5':'2'; ?>px; margin-<?php print $left; ?>: <?php print empty($conf->dol_optimize_smallscreen)?'5':'2'; ?>px;
margin-<?php print $right; ?>: <?php print empty($conf->browser->phone)?'5':''; ?>px; margin-<?php print $right; ?>: <?php print empty($conf->dol_optimize_smallscreen)?'5':''; ?>px;
} }
div.fichecenter { div.fichecenter {
@ -232,23 +236,23 @@ div.fichecenter {
clear: both; /* This is to have div fichecenter that are true rectangles */ clear: both; /* This is to have div fichecenter that are true rectangles */
} }
div.fichethirdleft { div.fichethirdleft {
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 35%;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 35%;\n"; } ?>
} }
div.fichetwothirdright { div.fichetwothirdright {
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 65%;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 65%;\n"; } ?>
} }
div.fichehalfleft { div.fichehalfleft {
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 50%;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 50%;\n"; } ?>
} }
div.fichehalfright { div.fichehalfright {
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 50%;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 50%;\n"; } ?>
} }
div.ficheaddleft { div.ficheaddleft {
<?php if (empty($conf->browser->phone)) { print "padding-left: 6px;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "padding-left: 6px;\n"; } ?>
} }
@ -257,7 +261,7 @@ div.ficheaddleft {
/* ============================================================================== */ /* ============================================================================== */
<?php <?php
if (! empty($conf->browser->phone)) if (! empty($conf->dol_optimize_smallscreen))
{ {
$minwidthtmenu=0; $minwidthtmenu=0;
$heightmenu=19; $heightmenu=19;
@ -404,7 +408,7 @@ div.mainmenu {
margin-left: 0px; margin-left: 0px;
} }
<?php if (empty($conf->browser->phone)) { ?> <?php if (empty($conf->dol_optimize_smallscreen)) { ?>
div.mainmenu.agenda { div.mainmenu.agenda {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/agenda.png',1); ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/agenda.png',1); ?>);
@ -608,7 +612,7 @@ div#login_left, div#login_right {
div.login { div.login {
white-space:nowrap; white-space:nowrap;
padding: <?php echo ($conf->browser->phone?'0':'8')?>px 0px 0px 0px; padding: <?php echo ($conf->dol_optimize_smallscreen?'0':'8')?>px 0px 0px 0px;
margin: 0px 0px 0px 8px; margin: 0px 0px 0px 8px;
font-weight: bold; font-weight: bold;
} }
@ -621,7 +625,7 @@ div.login a:hover {
} }
img.login, img.printer, img.entity { img.login, img.printer, img.entity {
padding: <?php echo ($conf->browser->phone?'0':'8')?>px 0px 0px 0px; padding: <?php echo ($conf->dol_optimize_smallscreen?'0':'8')?>px 0px 0px 0px;
margin: 0px 0px 0px 8px; margin: 0px 0px 0px 8px;
text-decoration: none; text-decoration: none;
color: white; color: white;
@ -781,7 +785,7 @@ div.blockvmenubookmarks
div.blockvmenuhelp div.blockvmenuhelp
{ {
<?php if (empty($conf->browser->phone)) { ?> <?php if (empty($conf->dol_optimize_smallscreen)) { ?>
text-align: center; text-align: center;
border-spacing: 0px; border-spacing: 0px;
width: 162px; width: 162px;
@ -1010,7 +1014,7 @@ img.toolbarbutton {
} }
.ui-layout-north { .ui-layout-north {
height: <?php print (empty($conf->browser->phone)?'54':'21'); ?>px !important; height: <?php print (empty($conf->dol_optimize_smallscreen)?'54':'21'); ?>px !important;
} }
/* ECM */ /* ECM */
@ -1213,7 +1217,7 @@ span.tabspan {
/* Boutons actions */ /* Boutons actions */
/* ============================================================================== */ /* ============================================================================== */
/* Nouvelle syntaxe a utiliser */ div.divbutaction { margin-bottom: 1.4em; }
.butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionRefused, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active { .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionRefused, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active {
font-family:"Trebuchet MS",Arial,Helvetica,sans-serif; font-family:"Trebuchet MS",Arial,Helvetica,sans-serif;

View File

@ -67,8 +67,12 @@ if (! empty($conf->global->MAIN_OVERWRITE_THEME_RES)) { $path='/'.$conf->global-
$fontlist='arial,tahoma,verdana,helvetica'; //$fontlist='Verdana,Helvetica,Arial,sans-serif'; $fontlist='arial,tahoma,verdana,helvetica'; //$fontlist='Verdana,Helvetica,Arial,sans-serif';
$img_head=dol_buildpath($path.'/theme/'.$theme.'/img/headbg2.jpg',1); $img_head=dol_buildpath($path.'/theme/'.$theme.'/img/headbg2.jpg',1);
$img_button=dol_buildpath($path.'/theme/'.$theme.'/img/button_bg.png',1); $img_button=dol_buildpath($path.'/theme/'.$theme.'/img/button_bg.png',1);
$dol_hide_topmenu=(! empty($_SESSION['dol_hide_topmenu']) || GETPOST('dol_hide_topmenu')); $dol_hide_topmenu=$conf->dol_hide_topmenu;
$dol_hide_leftmenu=(! empty($_SESSION['dol_hide_leftmenu']) || GETPOST('dol_hide_leftmenu')); $dol_hide_leftmenu=$conf->dol_hide_leftmenu;
$dol_optimize_smallscreen=$conf->dol_optimize_smallscreen;
$dol_no_mouse_hover=$conf->dol_no_mouse_hover;
$dol_use_jmobile=$conf->dol_use_jmobile;
// Define reference colors // Define reference colors
// Example: Light grey: $colred=235;$colgreen=235;$colblue=235; // Example: Light grey: $colred=235;$colgreen=235;$colblue=235;
@ -104,8 +108,8 @@ $colorbacklinepair2='255,255,255'; // line pair
$colorbacklinepairhover=(230+round(($isred+$isgreen+$isblue)/9)).','.(230+round(($isred+$isgreen+$isblue)/9)).','.(230+round(($isred+$isgreen+$isblue)/9)); $colorbacklinepairhover=(230+round(($isred+$isgreen+$isblue)/9)).','.(230+round(($isred+$isgreen+$isblue)/9)).','.(230+round(($isred+$isgreen+$isblue)/9));
$colorbackbody='#ffffff url('.$img_head.') 0 0 no-repeat;'; $colorbackbody='#ffffff url('.$img_head.') 0 0 no-repeat;';
$colortext='40,40,40'; $colortext='40,40,40';
$fontsize=empty($conf->browser->phone)?'12':'14'; $fontsize=empty($conf->dol_optimize_smallscreen)?'12':'14';
$fontsizesmaller=empty($conf->browser->phone)?'11':'14'; $fontsizesmaller=empty($conf->dol_optimize_smallscreen)?'11':'14';
// Eldy colors // Eldy colors
if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED)) if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED))
@ -183,8 +187,14 @@ print 'colorbacklinepair1='.$colorbacklinepair1."\n";
print 'colorbacklinepair2='.$colorbacklinepair2."\n"; print 'colorbacklinepair2='.$colorbacklinepair2."\n";
print 'colorbacklinepairhover='.$colorbacklinepairhover."\n"; print 'colorbacklinepairhover='.$colorbacklinepairhover."\n";
print 'usecss3='.$usecss3."\n"; print 'usecss3='.$usecss3."\n";
print 'dol_hide_topmenu='.$dol_hide_topmenu."\n";
print 'dol_hide_leftmenu='.$dol_hide_leftmenu."\n";
print 'dol_optimize_smallscreen='.$dol_optimize_smallscreen."\n";
print 'dol_no_mouse_hover='.$dol_no_mouse_hover."\n";
print 'dol_use_jmobile='.$dol_use_jmobile."\n";
print '*/'."\n"; print '*/'."\n";
if (! empty($conf->dol_optimize_smallscreen)) $fontsize=11;
?> ?>
/* ============================================================================== */ /* ============================================================================== */
@ -192,7 +202,7 @@ print '*/'."\n";
/* ============================================================================== */ /* ============================================================================== */
body { body {
<?php if (GETPOST("optioncss") == 'print' || ! empty($conf->browser->phone)) { ?> <?php if (GETPOST("optioncss") == 'print' || ! empty($conf->dol_optimize_smallscreen)) { ?>
background-color: #FFFFFF; background-color: #FFFFFF;
<?php } else { ?> <?php } else { ?>
background: <?php print $colorbackbody; ?>; background: <?php print $colorbackbody; ?>;
@ -301,6 +311,11 @@ div.float
{ {
float:<?php print $left; ?>; float:<?php print $left; ?>;
} }
div.floatright
{
float:<?php print $right; ?>;
}
th .button { th .button {
-moz-box-shadow: none !important; -moz-box-shadow: none !important;
-webkit-box-shadow: none !important; -webkit-box-shadow: none !important;
@ -332,7 +347,7 @@ th .button {
/* ============================================================================== */ /* ============================================================================== */
.hideobject { display: none; } .hideobject { display: none; }
<?php if (! empty($conf->browser->phone)) { ?> <?php if (! empty($conf->dol_optimize_smallscreen)) { ?>
.hideonsmartphone { display: none; } .hideonsmartphone { display: none; }
<?php } ?> <?php } ?>
.linkobject { cursor: pointer; } .linkobject { cursor: pointer; }
@ -359,7 +374,7 @@ td.showDragHandle {
div.fiche { div.fiche {
margin-<?php print $left; ?>: <?php print (GETPOST("optioncss") == 'print'?6:((empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))?($dol_hide_leftmenu?'4':'20'):'24')); ?>px; margin-<?php print $left; ?>: <?php print (GETPOST("optioncss") == 'print'?6:((empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))?($dol_hide_leftmenu?'4':'20'):'24')); ?>px;
margin-<?php print $right; ?>: <?php print (GETPOST("optioncss") == 'print'?8:(empty($conf->browser->phone)?'12':'6')); ?>px; margin-<?php print $right; ?>: <?php print (GETPOST("optioncss") == 'print'?8:(empty($conf->dol_optimize_smallscreen)?'12':'6')); ?>px;
} }
div.fichecenter { div.fichecenter {
@ -367,25 +382,25 @@ div.fichecenter {
clear: both; /* This is to have div fichecenter that are true rectangles */ clear: both; /* This is to have div fichecenter that are true rectangles */
} }
div.fichethirdleft { div.fichethirdleft {
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 35%;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 35%;\n"; } ?>
<?php if (! empty($conf->browser->phone)) { print "padding-bottom: 6px;\n"; } ?> <?php if (! empty($conf->dol_optimize_smallscreen)) { print "padding-bottom: 6px;\n"; } ?>
} }
div.fichetwothirdright { div.fichetwothirdright {
<?php if (empty($conf->browser->phone)) { print "float: ".$right.";\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$right.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 65%;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 65%;\n"; } ?>
<?php if (! empty($conf->browser->phone)) { print "padding-bottom: 6px\n"; } ?> <?php if (! empty($conf->dol_optimize_smallscreen)) { print "padding-bottom: 6px\n"; } ?>
} }
div.fichehalfleft { div.fichehalfleft {
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 50%;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 50%;\n"; } ?>
} }
div.fichehalfright { div.fichehalfright {
<?php if (empty($conf->browser->phone)) { print "float: ".$right.";\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$right.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 50%;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 50%;\n"; } ?>
} }
div.ficheaddleft { div.ficheaddleft {
<?php if (empty($conf->browser->phone)) { print "padding-left: 16px;\n"; } ?> <?php if (empty($conf->dol_optimize_smallscreen)) { print "padding-left: 16px;\n"; } ?>
} }
@ -394,7 +409,7 @@ div.ficheaddleft {
/* ============================================================================== */ /* ============================================================================== */
<?php <?php
if (! empty($conf->browser->phone)) if (! empty($conf->dol_optimize_smallscreen))
{ {
$minwidthtmenu=0; $minwidthtmenu=0;
$heightmenu=19; $heightmenu=19;
@ -565,7 +580,7 @@ div.mainmenu {
min-width: 40px; min-width: 40px;
} }
<?php if (empty($conf->browser->phone)) { ?> <?php if (empty($conf->dol_optimize_smallscreen)) { ?>
div.mainmenu.home{ div.mainmenu.home{
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/home.png',1) ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/home.png',1) ?>);
@ -795,7 +810,7 @@ div.login_block table {
div.login { div.login {
white-space:nowrap; white-space:nowrap;
padding: <?php echo ($conf->browser->phone?'0':'8')?>px 0px 0px 0px; padding: <?php echo ($conf->dol_optimize_smallscreen?'0':'8')?>px 0px 0px 0px;
margin: 0px 0px 0px 8px; margin: 0px 0px 0px 8px;
font-weight: bold; font-weight: bold;
} }
@ -808,7 +823,7 @@ div.login a:hover {
} }
img.login, img.printer, img.entity { img.login, img.printer, img.entity {
padding: <?php echo ($conf->browser->phone?'0':'8')?>px 0px 0px 0px; padding: <?php echo ($conf->dol_optimize_smallscreen?'0':'8')?>px 0px 0px 0px;
margin: 0px 0px 0px 8px; margin: 0px 0px 0px 8px;
text-decoration: none; text-decoration: none;
color: white; color: white;
@ -953,7 +968,7 @@ div.blockvmenubookmarksold
div.blockvmenuhelp div.blockvmenuhelp
{ {
<?php if (empty($conf->browser->phone)) { ?> <?php if (empty($conf->dol_optimize_smallscreen)) { ?>
width:174px; width:174px;
font-family: <?php print $fontlist ?>; font-family: <?php print $fontlist ?>;
color: #000000; color: #000000;
@ -1089,7 +1104,7 @@ img.toolbarbutton {
* RESIZER-BARS * RESIZER-BARS
*/ */
.ui-layout-resizer { /* all 'resizer-bars' */ .ui-layout-resizer { /* all 'resizer-bars' */
width: <?php echo (empty($conf->browser->phone)?'8':'24'); ?>px !important; width: <?php echo (empty($conf->dol_optimize_smallscreen)?'8':'24'); ?>px !important;
} }
.ui-layout-resizer-hover { /* affects both open and closed states */ .ui-layout-resizer-hover { /* affects both open and closed states */
} }
@ -1098,7 +1113,7 @@ img.toolbarbutton {
/*.ui-layout-resizer-open-hover ,*/ /* hover-color to 'resize' */ /*.ui-layout-resizer-open-hover ,*/ /* hover-color to 'resize' */
.ui-layout-resizer-dragging { /* resizer beging 'dragging' */ .ui-layout-resizer-dragging { /* resizer beging 'dragging' */
background: #DDD; background: #DDD;
width: <?php echo (empty($conf->browser->phone)?'8':'24'); ?>px; width: <?php echo (empty($conf->dol_optimize_smallscreen)?'8':'24'); ?>px;
} }
.ui-layout-resizer-dragging { /* CLONED resizer being dragged */ .ui-layout-resizer-dragging { /* CLONED resizer being dragged */
border-left: 1px solid #BBB; border-left: 1px solid #BBB;
@ -1134,7 +1149,7 @@ img.toolbarbutton {
* TOGGLER-BUTTONS * TOGGLER-BUTTONS
*/ */
.ui-layout-toggler { .ui-layout-toggler {
<?php if (empty($conf->browser->phone)) { ?> <?php if (empty($conf->dol_optimize_smallscreen)) { ?>
border-top: 1px solid #AAA; /* match pane-border */ border-top: 1px solid #AAA; /* match pane-border */
border-right: 1px solid #AAA; /* match pane-border */ border-right: 1px solid #AAA; /* match pane-border */
border-bottom: 1px solid #AAA; /* match pane-border */ border-bottom: 1px solid #AAA; /* match pane-border */
@ -1146,14 +1161,14 @@ img.toolbarbutton {
} }
.ui-layout-toggler-open { .ui-layout-toggler-open {
height: 54px !important; height: 54px !important;
width: <?php echo (empty($conf->browser->phone)?'7':'22'); ?>px !important; width: <?php echo (empty($conf->dol_optimize_smallscreen)?'7':'22'); ?>px !important;
-moz-border-radius:0px 10px 10px 0px; -moz-border-radius:0px 10px 10px 0px;
-webkit-border-radius:0px 10px 10px 0px; -webkit-border-radius:0px 10px 10px 0px;
border-radius:0px 10px 10px 0px; border-radius:0px 10px 10px 0px;
} }
.ui-layout-toggler-closed { .ui-layout-toggler-closed {
height: <?php echo (empty($conf->browser->phone)?'54':'2'); ?>px !important; height: <?php echo (empty($conf->dol_optimize_smallscreen)?'54':'2'); ?>px !important;
width: <?php echo (empty($conf->browser->phone)?'7':'22'); ?>px !important; width: <?php echo (empty($conf->dol_optimize_smallscreen)?'7':'22'); ?>px !important;
-moz-border-radius:0px 10px 10px 0px; -moz-border-radius:0px 10px 10px 0px;
-webkit-border-radius:0px 10px 10px 0px; -webkit-border-radius:0px 10px 10px 0px;
border-radius:0px 10px 10px 0px; border-radius:0px 10px 10px 0px;
@ -1172,7 +1187,7 @@ img.toolbarbutton {
} }
.ui-layout-north { .ui-layout-north {
height: <?php print (empty($conf->browser->phone)?'54':'21'); ?>px !important; height: <?php print (empty($conf->dol_optimize_smallscreen)?'54':'21'); ?>px !important;
} }
@ -1374,6 +1389,8 @@ span.tabspan {
/* Boutons actions */ /* Boutons actions */
/* ============================================================================== */ /* ============================================================================== */
div.divbutaction { margin-bottom: 1.4em; }
.butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active { .butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active {
font-family: <?php print $fontlist ?>; font-family: <?php print $fontlist ?>;
font-weight: bold; font-weight: bold;
@ -1382,8 +1399,8 @@ span.tabspan {
color: #434956; color: #434956;
text-decoration: none; text-decoration: none;
white-space: nowrap; white-space: nowrap;
padding: 0.4em 0.7em; padding: 0.4em <?php echo ($dol_optimize_smallscreen?'0.4':'0.7'); ?>em;
margin: 0em 0.7em; margin: 0em <?php echo ($dol_optimize_smallscreen?'0.9':'0.7'); ?>em;
-moz-border-radius:0px 5px 0px 5px; -moz-border-radius:0px 5px 0px 5px;
-webkit-border-radius:0px 5px 0px 5px; -webkit-border-radius:0px 5px 0px 5px;
border-radius:0px 5px 0px 5px; border-radius:0px 5px 0px 5px;

View File

@ -63,6 +63,8 @@ if (! empty($conf->global->MAIN_LOGOUT_GOTO_URL)) $url=$conf->global->MAIN_LOGOU
if (GETPOST('dol_hide_topmenu')) $url.=(preg_match('/\?/',$url)?'&':'?').'dol_hide_topmenu=1'; if (GETPOST('dol_hide_topmenu')) $url.=(preg_match('/\?/',$url)?'&':'?').'dol_hide_topmenu=1';
if (GETPOST('dol_hide_leftmenu')) $url.=(preg_match('/\?/',$url)?'&':'?').'dol_hide_leftmenu=1'; if (GETPOST('dol_hide_leftmenu')) $url.=(preg_match('/\?/',$url)?'&':'?').'dol_hide_leftmenu=1';
if (GETPOST('dol_optimize_smallscreen')) $url.=(preg_match('/\?/',$url)?'&':'?').'dol_optimize_smallscreen=1';
if (GETPOST('dol_no_mouse_over')) $url.=(preg_match('/\?/',$url)?'&':'?').'dol_no_mouse_over=1';
// Destroy session // Destroy session
$prefix=dol_getprefix(); $prefix=dol_getprefix();

View File

@ -153,12 +153,6 @@ $title='Dolibarr '.DOL_VERSION;
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title=$conf->global->MAIN_APPLICATION_TITLE; if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title=$conf->global->MAIN_APPLICATION_TITLE;
// Select templates // Select templates
if (preg_match('/^smartphone/',$conf->smart_menu) && ! empty($conf->browser->phone))
{
$template_dir = DOL_DOCUMENT_ROOT.'/theme/phones/smartphone/tpl/';
}
else
{
if (file_exists(DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/passwordforgotten.tpl.php")) if (file_exists(DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/passwordforgotten.tpl.php"))
{ {
$template_dir = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/"; $template_dir = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/";
@ -167,7 +161,6 @@ else
{ {
$template_dir = DOL_DOCUMENT_ROOT."/core/tpl/"; $template_dir = DOL_DOCUMENT_ROOT."/core/tpl/";
} }
}
// Note: $conf->css looks like '/theme/eldy/style.css.php' // Note: $conf->css looks like '/theme/eldy/style.css.php'
$conf->css = "/theme/".(GETPOST('theme')?GETPOST('theme','alpha'):$conf->theme)."/style.css.php"; $conf->css = "/theme/".(GETPOST('theme')?GETPOST('theme','alpha'):$conf->theme)."/style.css.php";