Skip to content

Commit

Permalink
Merge branch 'develop' into pre-opportunity
Browse files Browse the repository at this point in the history
  • Loading branch information
accellier-dev authored Oct 3, 2024
2 parents 7655914 + 916423f commit 39be31d
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 34 deletions.
35 changes: 10 additions & 25 deletions htdocs/admin/ihm.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,9 @@
0,
0,
array(
'/includes/ace/src/ace.js',
'/includes/ace/src/ext-statusbar.js',
'/includes/ace/src/ext-language_tools.js',
'/includes/ace/src/ace.js',
'/includes/ace/src/ext-statusbar.js',
'/includes/ace/src/ext-language_tools.js',
),
array(),
'',
Expand Down Expand Up @@ -456,36 +456,28 @@
print '</td>';
print '</tr>';

// show input border
/*
print '<tr><td>'.$langs->trans("showInputBorder").'</td><td>';
print $form->selectyesno('main_showInputBorder',isset($conf->global->THEME_ELDY_SHOW_BORDER_INPUT)?$conf->global->THEME_ELDY_SHOW_BORDER_INPUT:0,1);
print '</td>';
print '</tr>';
*/

// First day for weeks
print '<tr class="oddeven"><td>' . $langs->trans("WeekStartOnDay") . '</td><td>';
print $formother->select_dayofweek((isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : '1'), 'MAIN_START_WEEK', 0);
print $formother->select_dayofweek(getDolGlobalString('MAIN_START_WEEK', '1'), 'MAIN_START_WEEK', 0);
print '</td>';
print '</tr>';

// DefaultWorkingDays
print '<tr class="oddeven"><td>' . $langs->trans("DefaultWorkingDays") . '</td><td>';
print '<input type="text" name="MAIN_DEFAULT_WORKING_DAYS" size="5" value="' . (isset($conf->global->MAIN_DEFAULT_WORKING_DAYS) ? $conf->global->MAIN_DEFAULT_WORKING_DAYS : '1-5') . '">';
print '<input type="text" name="MAIN_DEFAULT_WORKING_DAYS" size="5" value="' . getDolGlobalString('MAIN_DEFAULT_WORKING_DAYS', '1-5') . '">';
print '</td>';
print '</tr>';

// DefaultWorkingHours
print '<tr class="oddeven"><td>' . $langs->trans("DefaultWorkingHours") . '</td><td>';
print '<input type="text" name="MAIN_DEFAULT_WORKING_HOURS" size="5" value="' . (isset($conf->global->MAIN_DEFAULT_WORKING_HOURS) ? $conf->global->MAIN_DEFAULT_WORKING_HOURS : '9-18') . '">';
print '<input type="text" name="MAIN_DEFAULT_WORKING_HOURS" size="5" value="' . getDolGlobalString('MAIN_DEFAULT_WORKING_HOURS', '9-18') . '">';
print '</td>';
print '</tr>';

// Firstname/Name
print '<tr class="oddeven"><td>' . $langs->trans("FirstnameNamePosition") . '</td><td>';
$array = array(0 => $langs->trans("Firstname") . ' ' . $langs->trans("Lastname"), 1 => $langs->trans("Lastname") . ' ' . $langs->trans("Firstname"));
print $form->selectarray('MAIN_FIRSTNAME_NAME_POSITION', $array, (isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION) ? $conf->global->MAIN_FIRSTNAME_NAME_POSITION : 0));
print $form->selectarray('MAIN_FIRSTNAME_NAME_POSITION', $array, getDolGlobalInt('MAIN_FIRSTNAME_NAME_POSITION', 0));
print '</td>';
print '</tr>';

Expand Down Expand Up @@ -523,7 +515,7 @@
print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")), $langs->trans("ShowBugTrackLinkDesc"));
print '</td><td>';
print '<input type="text" name="MAIN_BUGTRACK_ENABLELINK" value="' . (!getDolGlobalString('MAIN_BUGTRACK_ENABLELINK') ? '' : $conf->global->MAIN_BUGTRACK_ENABLELINK) . '">';
print '<input type="text" name="MAIN_BUGTRACK_ENABLELINK" value="' . getDolGlobalString('MAIN_BUGTRACK_ENABLELINK') . '">';
print '</td>';
print '</tr>';

Expand Down Expand Up @@ -561,17 +553,10 @@

print '</td><td>';

$doleditor = new DolEditor('main_motd', (isset($conf->global->MAIN_MOTD) ? $conf->global->MAIN_MOTD : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
$doleditor = new DolEditor('main_motd', getDolGlobalString('MAIN_MOTD'), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
$doleditor->Create();

print '</td></tr>' . "\n";

/* no more need for this option. It is now a widget already controlled by end user
print '<tr class="oddeven"><td>' . $langs->trans('BoxstatsDisableGlobal') . '</td><td>';
print ajax_constantonoff("MAIN_DISABLE_GLOBAL_BOXSTATS", array(), $conf->entity, 0, 0, 1, 0);
print '</td>';
print '</tr>';
*/
print '</td></tr>'."\n";

print '</table>';
print '</div>';
Expand Down
8 changes: 7 additions & 1 deletion htdocs/core/class/doleditor.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,12 @@ public function Create($noprint = 0, $morejs = '', $disallowAnyContent = true, $
//$out.= '<textarea id="'.$this->htmlname.'" name="'.$this->htmlname.'" '.($this->readonly?' disabled':'').' rows="'.$this->rows.'"'.(preg_match('/%/',$this->cols)?' style="margin-top: 5px; width: '.$this->cols.'"':' cols="'.$this->cols.'"').' class="flat">';
// TODO We do not put the 'disabled' tag because on a read form, it change style with grey.
//print $this->content;
$out .= '<textarea id="'.$this->htmlname.'" name="'.$this->htmlname.'" rows="'.$this->rows.'"'.(preg_match('/%/', $this->cols) ? ' style="margin-top: 5px; width: '.$this->cols.'"' : ' cols="'.$this->cols.'"').' '.($moreparam ? $moreparam : '').' class="flat '.$morecss.'">';
$out .= '<textarea id="'.$this->htmlname.'" name="'.$this->htmlname.'"';
$out .= ' rows="'.$this->rows.'"';
//$out .= ' style="height: 700px; min-height: 700px;"';
$out .= (preg_match('/%/', $this->cols) ? ' style="margin-top: 5px; width: '.$this->cols.'"' : ' cols="'.$this->cols.'"');
$out .= ' '.($moreparam ? $moreparam : '');
$out .= ' class="flat '.$morecss.'">';
$out .= htmlspecialchars($this->content);
$out .= '</textarea>';

Expand Down Expand Up @@ -204,6 +209,7 @@ public function Create($noprint = 0, $morejs = '', $disallowAnyContent = true, $
$htmlencode_force = preg_match('/_encoded$/', $this->toolbarname) ? 'true' : 'false';

$out .= '<!-- Output ckeditor disallowAnyContent='.dol_escape_htmltag((string) $disallowAnyContent).' toolbarname='.dol_escape_htmltag($this->toolbarname).' -->'."\n";
//$out .= '<style>#cke_1_top { height: 34px !important; }</style>';
$out .= '<script nonce="'.getNonce().'" type="text/javascript">
$(document).ready(function () {
/* console.log("Run ckeditor"); */
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/lib/functions.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2596,7 +2596,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
// Show tabs
// if =0 we don't use the feature
if (empty($limittoshow)) {
$limittoshow = (!getDolGlobalString('MAIN_MAXTABS_IN_CARD') ? 99 : $conf->global->MAIN_MAXTABS_IN_CARD);
$limittoshow = getDolGlobalInt('MAIN_MAXTABS_IN_CARD', 99);
}
if (!empty($conf->dol_optimize_smallscreen)) {
$limittoshow = 2;
Expand Down Expand Up @@ -2641,7 +2641,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
$out .= '<a'.(!empty($links[$i][2]) ? ' id="'.$links[$i][2].'"' : '').' class="tab inline-block valignmiddle'.($morecss ? ' '.$morecss : '').(!empty($links[$i][5]) ? ' '.$links[$i][5] : '').'" href="'.$links[$i][0].'" title="'.dol_escape_htmltag($titletoshow).'">';
}

if ($displaytab == 0) {
if ($displaytab == 0 && $picto) {
$out .= img_picto($title, $picto, '', $pictoisfullpath, 0, 0, '', 'imgTabTitle paddingright marginrightonlyshort');
}

Expand Down
11 changes: 8 additions & 3 deletions htdocs/societe/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -2391,6 +2391,11 @@ function manageprospectcustomer(element) {
$s = $modCodeClient->getToolTip($langs, $object, 0);
print $form->textwithpicto('', $s, 1);
print '</td></tr></table>';
print '</td>';

if ($conf->browser->layout == 'phone') {
print '</tr><tr>';
}

print '<td>'.$form->editfieldkey('SupplierCode', 'supplier_code', '', $object, 0).'</td><td>';

Expand All @@ -2414,7 +2419,7 @@ function manageprospectcustomer(element) {
print '<tr><td class="tdtop">'.$form->editfieldkey('Gencod', 'barcode', '', $object, 0).'</td>';
print '<td colspan="3">';
print img_picto('', 'barcode', 'class="pictofixedwidth"');
print '<input type="text" name="barcode" id="barcode" value="'.dol_escape_htmltag($object->barcode).'">';
print '<input type="text" class="minwidth100 maxwidth200 widthcentpercentminusx" name="barcode" id="barcode" value="'.dol_escape_htmltag($object->barcode).'">';
print '</td></tr>';
}

Expand Down Expand Up @@ -2449,7 +2454,7 @@ function manageprospectcustomer(element) {
// Country
print '<tr><td>'.$form->editfieldkey('Country', 'selectcounty_id', '', $object, 0).'</td><td colspan="3">';
print img_picto('', 'globe-americas', 'class="pictofixedwidth"');
print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $object->country_id), 'country_id', '', 0, 'minwidth300 maxwidth500 widthcentpercentminusx');
print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $object->country_id), 'country_id', '', 0, 'minwidth200 maxwidth400 widthcentpercentminusx');
if ($user->admin) {
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
}
Expand All @@ -2464,7 +2469,7 @@ function manageprospectcustomer(element) {
}

print img_picto('', 'state', 'class="pictofixedwidth"');
print $formcompany->select_state($object->state_id, $object->country_code);
print $formcompany->select_state($object->state_id, $object->country_code, 'state_id', 'minwidth200 maxwidth400 widthcentpercentminusx');
print '</td></tr>';
}

Expand Down
17 changes: 14 additions & 3 deletions htdocs/theme/eldy/global.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -4011,13 +4011,14 @@
padding-left: 7px !important;
padding-right: 7px !important;
}
input.button.smallpaddingimp, input.buttonreset.smallpaddingimp {
font-size: 0.8em;
font-weight: normal !important;
}
input.button[name="upload"] {
padding: 5px !important;
font-size: 0.9em;
}
input.button.smallpaddingimp, input.buttonreset.smallpaddingimp {
font-size: 0.8em;
}
input.buttonlink {
color: var(--colortextlink);
background-color: transparent;
Expand Down Expand Up @@ -6266,6 +6267,16 @@
visibility: hidden;
}

/* CSS To hide the picto menu on smartphone, except when maximize */
@media only screen and (max-width: 768px)
{
.cke_inner:not(.cke_maximized) .cke_toolbar_separator,
.cke_inner:not(.cke_maximized) .cke_combo,
.cke_inner:not(.cke_maximized) .cke_button:not(.cke_button__maximize) {
display: none;
}
}


/* ============================================================================== */
/* ACE editor */
Expand Down
17 changes: 17 additions & 0 deletions htdocs/theme/md/style.css.php
Original file line number Diff line number Diff line change
Expand Up @@ -4129,7 +4129,14 @@

.smallpaddingimp {
padding: 4px !important;
padding-left: 7px !important;
padding-right: 7px !important;
}
input.button.smallpaddingimp, input.buttonreset.smallpaddingimp {
font-size: 0.8em;
font-weight: normal !important;
}

input.buttonlink {
color: var(--colortextlink);
background-color: transparent;
Expand Down Expand Up @@ -6240,6 +6247,16 @@
visibility: hidden;
}

/* CSS To hide the picto menu on smartphone, except when maximize */
@media only screen and (max-width: 768px)
{
.cke_inner:not(.cke_maximized) .cke_toolbar_separator,
.cke_inner:not(.cke_maximized) .cke_combo,
.cke_inner:not(.cke_maximized) .cke_button:not(.cke_button__maximize) {
display: none;
}
}


/* ============================================================================== */
/* ACE editor */
Expand Down

0 comments on commit 39be31d

Please sign in to comment.