Fix several bugs in css and in jmobile usage

This commit is contained in:
Laurent Destailleur 2016-01-02 20:48:19 +01:00
parent d02c261d2e
commit d5fa91f7ba
8 changed files with 45 additions and 33 deletions

View File

@ -60,7 +60,7 @@ class DolEditor
* @param int $uselocalbrowser Enabled to add links to local object with local browser. If false, only external images can be added in content.
* @param int $okforextendededitor True=Allow usage of extended editor tool (like fckeditor)
* @param int $rows Size of rows for textarea tool
* @param int $cols Size of cols for textarea tool (textarea number of cols or %)
* @param string $cols Size of cols for textarea tool (textarea number of cols '70' or percent 'x%')
* @param int $readonly 0=Read/Edit, 1=Read only
*/
function __construct($htmlname,$content,$width='',$height=200,$toolbarname='Basic',$toolbarlocation='In',$toolbarstartexpanded=false,$uselocalbrowser=true,$okforextendededitor=true,$rows=0,$cols=0,$readonly=0)

View File

@ -4248,6 +4248,7 @@ class Form
// Show date with combo selects
else
{
//$retstring.='<div class="inline-block">';
// Day
$retstring.='<select'.($disabled?' disabled':'').' class="flat" id="'.$prefix.'day" name="'.$prefix.'day">';
@ -4293,6 +4294,7 @@ class Form
}
$retstring.="</select>\n";
}
//$retstring.='</div>';
}
}

View File

@ -50,7 +50,7 @@ $userstatic=new User($db);
<?php if ($permission) { ?>
<form class="tagtr liste_titre">
<div class="tagtd"><?php echo $langs->trans("Source"); ?></div>
<div class="tagtd"><?php echo $langs->trans("Company"); ?></div>
<div class="tagtd"><?php echo $langs->trans("ThirdParty"); ?></div>
<div class="tagtd"><?php echo $langs->trans("Contacts"); ?></div>
<div class="tagtd"><?php echo $langs->trans("ContactType"); ?></div>
<div class="tagtd">&nbsp;</div>
@ -102,10 +102,10 @@ $userstatic=new User($db);
<?php $selectedCompany = isset($_GET["newcompany"])?$_GET["newcompany"]:$object->socid; ?>
<?php
// add company icon for direct link
if ($selectedCompany)
if ($selectedCompany && empty($conf->dol_use_jmobile))
{
$companystatic->fetch($selectedCompany);
echo $companystatic->getNomUrl(2);
echo $companystatic->getNomUrl(2, '', 0, 1);
}
?>
<?php $selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany', '', 0); ?>
@ -130,7 +130,7 @@ $userstatic=new User($db);
<form class="tagtr liste_titre">
<div class="tagtd"><?php echo $langs->trans("Source"); ?></div>
<div class="tagtd"><?php echo $langs->trans("Company"); ?></div>
<div class="tagtd"><?php echo $langs->trans("ThirdParty"); ?></div>
<div class="tagtd"><?php echo $langs->trans("Contacts"); ?></div>
<div class="tagtd"><?php echo $langs->trans("ContactType"); ?></div>
<div class="tagtd" align="center"><?php echo $langs->trans("Status"); ?></div>

View File

@ -1153,7 +1153,7 @@ if ($action == 'create')
print '<td class="border" valign="top">' . $langs->trans('NotePublic') . '</td>';
print '<td valign="top" colspan="2">';
$doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
$doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
print $doleditor->Create(1);
print '</td></tr>';
@ -1163,7 +1163,7 @@ if ($action == 'create')
print '<td class="border" valign="top">' . $langs->trans('NotePrivate') . '</td>';
print '<td valign="top" colspan="2">';
$doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
$doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
print $doleditor->Create(1);
print '</td></tr>';
}
@ -1303,7 +1303,7 @@ else
print '<td class="border" valign="top">' . $langs->trans('NotePublic') . '</td>';
print '<td valign="top" colspan="2">';
$doleditor = new DolEditor('note_public', $object->note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
$doleditor = new DolEditor('note_public', $object->note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
print $doleditor->Create(1);
print '</td></tr>';
@ -1313,7 +1313,7 @@ else
print '<td class="border" valign="top">' . $langs->trans('NotePrivate') . '</td>';
print '<td valign="top" colspan="2">';
$doleditor = new DolEditor('note_private', $object->note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
$doleditor = new DolEditor('note_private', $object->note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
print $doleditor->Create(1);
print '</td></tr>';
}

View File

@ -1220,15 +1220,25 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
if (empty($conf->dol_use_jmobile) || ($conf->dol_use_jmobile != 2 && $conf->dol_use_jmobile != 3))
{
print '<script type="text/javascript">
$(document).bind("mobileinit", function(){
$.extend( $.mobile , {
autoInitializePage : true, /* We need this to run jmobile */
/* loadingMessage : \'xxxxx\', */
touchOverflowEnabled : true,
defaultPageTransition : \'none\',
defaultDialogTransition : \'none\',
ajaxEnabled : false /* old param was ajaxFormsEnabled and ajaxLinksEnabled */
});
$(document).bind("mobileinit", function() {
';
if ($conf->theme == 'md')
{
print '
/* Disabled decoration for some css */
$.mobile.keepNative = \'input[type="submit"]\'; /* jQuery Mobile 1.4 and higher */
$.mobile.page.prototype.options.keepNative = \'input[type="submit"]\'; /* jQuery Mobile 1.4 and lower */
';
}
print '
$.extend( $.mobile , {
autoInitializePage : true, /* We need this to run jmobile */
/* loadingMessage : \'xxxxx\', */
touchOverflowEnabled : true,
defaultPageTransition : \'none\',
defaultDialogTransition : \'none\',
ajaxEnabled : false /* old param was ajaxFormsEnabled and ajaxLinksEnabled */
});
});
</script>';
}

View File

@ -193,8 +193,6 @@ $colortexttitle=join(',',colorStringToArray($colortexttitle));
$colortext=join(',',colorStringToArray($colortext));
$colortextlink=join(',',colorStringToArray($colortextlink));
if (! empty($conf->dol_optimize_smallscreen)) $fontsize=11;
$nbtopmenuentries=$menumanager->showmenu('topnb');
print '/*'."\n";
@ -584,8 +582,8 @@ td.showDragHandle {
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 $right; ?>: <?php print (GETPOST("optioncss") == 'print'?8:(empty($conf->dol_optimize_smallscreen)?'12':'4')); ?>px;
margin-<?php print $left; ?>: <?php print (GETPOST("optioncss") == 'print'?6:((empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))?($dol_hide_leftmenu?'8':'20'):'24')); ?>px;
margin-<?php print $right; ?>: <?php print (GETPOST("optioncss") == 'print'?8:(empty($conf->dol_optimize_smallscreen)?'12':'8')); ?>px;
<?php if (! empty($conf->dol_hide_leftmenu) && ! empty($conf->dol_hide_topmenu)) print 'margin-top: 4px;'; ?>
}
@ -1626,13 +1624,11 @@ div.tabsAction > a {
}
a.tabTitle {
/* background: #657090;
color: white;*/
color:rgba(0,0,0,.5);
color:rgba(0,0,0,.5) !important;
margin-right:10px;
text-shadow:1px 1px 1px #ffffff;
font-family: <?php print $fontlist ?>;
font-weight: normal;
font-weight: normal !important;
padding: 4px 6px 2px 6px;
margin: 0px 6px;
text-decoration: none;
@ -2142,7 +2138,7 @@ table.listwithfilterbefore {
/* Pagination */
div.refidpadding {
padding-top: <?php print empty($conf->dol_use_jmobile)?'3':'14'; ?>px;
padding-top: <?php print empty($conf->dol_use_jmobile)?'3':'7'; ?>px;
}
div.refid {
font-weight: bold;
@ -3758,6 +3754,9 @@ a.ui-link, a.ui-link:hover, .ui-btn:hover, span.ui-btn-text:hover, span.ui-btn-i
.ui-select .ui-btn-icon-left .ui-btn-inner {
padding-left: 38px;
}
.ui-select {
display: inline-block;
}
.fiche .ui-controlgroup {
margin: 0px;
padding-bottom: 0px;
@ -3841,7 +3840,7 @@ ul.ulmenu {
/* Style for first level menu with jmobile */
.ui-bar-b, .lilevel0 {
border: 1px solid #5f5f7a !important;
border: 1px solid #888 !important;
background: rgb(<?php echo $colorbacktitle1; ?>);
background-repeat: repeat-x;
@ -3870,7 +3869,7 @@ ul.ulmenu {
text-shadow: none;
}
.ui-body-c .ui-link, .ui-body-c .ui-link:visited, .ui-body-c .ui-link:hover {
color: rgb(<?php print $colortext; ?>);
color: rgb(<?php print $colortextlink; ?>);
}
.ui-btn-up-c .vsmenudisabled {
color: #<?php echo $colorshadowtitle; ?> !important;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 B

After

Width:  |  Height:  |  Size: 356 B

View File

@ -188,8 +188,6 @@ $colortexttitle=join(',',colorStringToArray($colortexttitle));
$colortext=join(',',colorStringToArray($colortext));
$colortextlink=join(',',colorStringToArray($colortextlink));
if (! empty($conf->dol_optimize_smallscreen)) $fontsize=11;
$nbtopmenuentries=$menumanager->showmenu('topnb');
print '/*'."\n";
@ -213,6 +211,7 @@ print 'dol_no_mouse_hover='.$dol_no_mouse_hover."\n";
print 'dol_use_jmobile='.$dol_use_jmobile."\n";
print 'dol_screenwidth='.$_SESSION['dol_screenwidth']."\n";
print 'dol_screenheight='.$_SESSION['dol_screenheight']."\n";
print 'fontsize='.$fontsize."\n";
print 'nbtopmenuentries='.$nbtopmenuentries."\n";
print '*/'."\n";
@ -1755,11 +1754,13 @@ span.butAction, span.butActionDelete {
color: #ffffff !important;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #006dcc;
<?php // if (empty($conf->dol_use_jmobile)) { ?>
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(to bottom, #0088cc, #0044cc);
<?php // } ?>
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
@ -3683,7 +3684,7 @@ ul.ulmenu {
/* Style for first level menu with jmobile */
.ui-bar-b, .lilevel0 {
border: 1px solid #5f5f7a !important;
border: 1px solid #888 !important;
background: rgb(<?php echo $colorbacktitle1; ?>);
background-repeat: repeat-x;
@ -3712,7 +3713,7 @@ ul.ulmenu {
text-shadow: none;
}
.ui-body-c .ui-link, .ui-body-c .ui-link:visited, .ui-body-c .ui-link:hover {
color: rgb(<?php print $colortext; ?>);
color: rgb(<?php print $colortextlink; ?>);
}
.ui-btn-up-c .vsmenudisabled {
color: #<?php echo $colorshadowtitle; ?> !important;