2
0
forked from Wavyzz/dolibarr
This commit is contained in:
Laurent Destailleur
2011-08-31 21:27:43 +00:00
parent 2b8ad8e002
commit 2fb58dd1fc
4 changed files with 38 additions and 52 deletions

View File

@@ -168,6 +168,9 @@ if (isset($_SERVER["HTTP_USER_AGENT"]))
// Other
if (in_array($conf->browser->name,array('firefox','iceweasel'))) $conf->browser->firefox=1;
//$conf->browser->phone='android';
// Force usage of left menu when smartphone is used
if ($conf->browser->phone && ! empty($conf->global->MAIN_MENU_FORCE_USE_JQUERY_LAYOUT)) $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT='forced';
}
@@ -640,8 +643,6 @@ if (! defined('NOLOGIN'))
$conf->theme=$user->conf->MAIN_THEME;
$conf->css = "/theme/".$conf->theme."/style.css.php";
}
// If theme support flip-hide left menu and we use a smartphone, we force it
if ($conf->browser->phone && $conf->theme == 'eldy') $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT='forced';
// Set javascript option
if (! GETPOST('nojs')) // If javascript was not disabled on URL
{
@@ -1112,7 +1113,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
//togglerLength_open: 0,
// effect defaults - overridden on some panes
//slideTrigger_open: "mouseover",
initClosed: '.(empty($conf->browser->phone)?'false':'true').',
//initClosed: true,
fxName: "drop",
fxSpeed: "fast",
fxSettings: { easing: "" }

View File

@@ -54,8 +54,8 @@ if (GETPOST('theme')) $conf->theme=GETPOST('theme'); // If theme was forced on
$langs->load("main",0,1);
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
$fontsize=empty($conf->browser->phone)?'12':'14';
$fontsizesmaller=empty($conf->browser->phone)?'11':'14';
$fontsize=empty($conf->browser->phone)?'12':'12';
$fontsizesmaller=empty($conf->browser->phone)?'11':'11';
$path=''; // This value may be used in future for external module to overwrite theme
@@ -217,7 +217,7 @@ td.showDragHandle {
/* ============================================================================== */
div.fiche {
margin-<?php print $left; ?>: <?php print empty($conf->browser->phone)?'10':'24'; ?>px;
margin-<?php print $left; ?>: <?php print empty($conf->browser->phone)?'10':'2'; ?>px;
margin-<?php print $right; ?>: <?php print empty($conf->browser->phone)?'8':''; ?>px;
}
@@ -226,25 +226,23 @@ div.fichecenter {
clear: both; /* This is to have div fichecenter that are true rectangles */
}
div.fichethirdleft {
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 35%;\n"; } ?>
<?php if (! empty($conf->browser->phone)) { print "padding-bottom: 4px;\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 35%;\n"; } ?>
}
div.fichetwothirdright {
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 65%;\n"; } ?>
<?php if (! empty($conf->browser->phone)) { print "padding-bottom: 4px\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 65%;\n"; } ?>
}
div.fichehalfleft {
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 50%;\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 50%;\n"; } ?>
}
div.fichehalfright {
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 50%;\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "width: 50%;\n"; } ?>
}
div.ficheaddleft {
<?php if (empty($conf->browser->phone)) { print "padding-left: 10px;\n"; } ?>
<?php if (empty($conf->browser->phone)) { print "padding-left: 10px;\n"; } ?>
}
@@ -708,7 +706,7 @@ td.photo {
/* ============================================================================== */
.toolbar {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$conf->theme.'/img/tmenu2.jpg',1) ?>) !important;
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$conf->theme.'/img/tmenu2.png',1) ?>) !important;
background-repeat: repeat-x !important;
border: 1px solid #BBB !important;
}
@@ -759,7 +757,7 @@ td.photo {
* RESIZER-BARS
*/
.ui-layout-resizer { /* all 'resizer-bars' */
width: <?php echo (empty($conf->browser->phone)?'8':'24'); ?>px !important;
width: 8px !important;
}
.ui-layout-resizer-hover { /* affects both open and closed states */
}
@@ -768,7 +766,7 @@ td.photo {
/*.ui-layout-resizer-open-hover ,*/ /* hover-color to 'resize' */
.ui-layout-resizer-dragging { /* resizer beging 'dragging' */
background: #DDD;
width: <?php echo (empty($conf->browser->phone)?'8':'24'); ?>px;
width: 8px;
}
.ui-layout-resizer-dragging { /* CLONED resizer being dragged */
border-left: 1px solid #BBB;
@@ -784,13 +782,13 @@ td.photo {
.ui-layout-resizer-sliding { /* resizer when pane is 'slid open' */
opacity: .10; /* show only a slight shadow */
filter: alpha(opacity=10);
}
.ui-layout-resizer-sliding-hover { /* sliding resizer - hover */
opacity: 1.00; /* on-hover, show the resizer-bar normally */
filter: alpha(opacity=100);
}
/* sliding resizer - add 'outside-border' to resizer on-hover */
/* this sample illustrates how to target specific panes and states */
}
.ui-layout-resizer-sliding-hover { /* sliding resizer - hover */
opacity: 1.00; /* on-hover, show the resizer-bar normally */
filter: alpha(opacity=100);
}
/* sliding resizer - add 'outside-border' to resizer on-hover
* this sample illustrates how to target specific panes and states */
.ui-layout-resizer-north-sliding-hover { border-bottom-width: 1px; }
.ui-layout-resizer-south-sliding-hover { border-top-width: 1px; }
.ui-layout-resizer-west-sliding-hover { border-right-width: 1px; }
@@ -808,14 +806,14 @@ td.photo {
}
.ui-layout-toggler-open {
height: 48px !important;
width: <?php echo (empty($conf->browser->phone)?'7':'22'); ?>px !important;
width: 5px !important;
-moz-border-radius:0px 10px 10px 0px;
-webkit-border-radius:0px 10px 10px 0px;
border-radius:0px 10px 10px 0px;
}
.ui-layout-toggler-closed {
height: 48px !important;
width: <?php echo (empty($conf->browser->phone)?'7':'22'); ?>px !important;
width: 5px !important;
-moz-border-radius:0px 10px 10px 0px;
-webkit-border-radius:0px 10px 10px 0px;
border-radius:0px 10px 10px 0px;

View File

@@ -20,21 +20,17 @@
* \brief Fichier de style CSS du theme Smartphone default
*/
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled to increase speed. Language code is found on url.
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled cause need to do translations
if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK',1);
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1);
if (! defined('NOLOGIN')) define('NOLOGIN',1);
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1);
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Disables token renewal
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // We need to use translation files to know direction
if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1');
session_cache_limiter( FALSE );
require_once("../../../../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/functions.lib.php");
require_once("../../../../../master.inc.php");
// Define css type
header('Content-type: text/css');
@@ -43,15 +39,6 @@ header('Content-type: text/css');
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate');
else header('Cache-Control: no-cache');
// On the fly GZIP compression for all pages (if browser support it). Must set the bit 3 of constant to 1.
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) { ob_start("ob_gzhandler"); }
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); // If language was forced on URL
if (GETPOST('theme')) $conf->theme=GETPOST('theme'); // If theme was forced on URL
$langs->load("main",0,1);
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
?>
.ui-mobile-viewport {
/*width:600px;

View File

@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
@@ -235,7 +235,7 @@ else
print '</div>';
print '<div class="tabsAction">';
if (empty($user->admin) && ! empty($dolibarr_main_demo))
if (! empty($dolibarr_main_demo))
{
print "<a class=\"butActionRefused\" title=\"".$langs->trans("FeatureDisabledInDemo")."\" href=\"#\">".$langs->trans("Modify")."</a>";
}