mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Debug v21
This commit is contained in:
parent
938e0380f4
commit
152050d1a8
|
|
@ -1,6 +1,7 @@
|
|||
# DOLIBARR ERP & CRM
|
||||
|
||||

|
||||

|
||||
[](https://php.net/)
|
||||
[](https://github.com/Dolibarr/dolibarr)
|
||||
[](https://bestpractices.coreinfrastructure.org/projects/5521)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# DOLIBARR ERP & CRM
|
||||
|
||||

|
||||

|
||||
[](https://php.net/)
|
||||
[](https://github.com/Dolibarr/dolibarr)
|
||||
[](https://bestpractices.coreinfrastructure.org/projects/5521)
|
||||
|
|
|
|||
|
|
@ -905,6 +905,7 @@ function getCustomerInvoiceLatestEditTable($maxCount = 5, $socid = 0)
|
|||
$objectstatic->ref = $obj->ref;
|
||||
$objectstatic->paye = $obj->paye;
|
||||
$objectstatic->statut = $obj->status;
|
||||
$objectstatic->status = $obj->status;
|
||||
$objectstatic->total_ht = $obj->total_ht;
|
||||
$objectstatic->total_tva = $obj->total_tva;
|
||||
$objectstatic->total_ttc = $obj->total_ttc;
|
||||
|
|
@ -938,7 +939,7 @@ function getCustomerInvoiceLatestEditTable($maxCount = 5, $socid = 0)
|
|||
|
||||
// Load amount of existing payment of invoice (needed for complete status)
|
||||
$payment = $objectstatic->getSommePaiement();
|
||||
$result .= '<td class="right">'.$objectstatic->getLibStatut(5, $payment).'</td>';
|
||||
$result .= '<td class="right">'.$objectstatic->getLibStatut(3, $payment).'</td>';
|
||||
|
||||
$result .= '</tr>';
|
||||
|
||||
|
|
@ -1048,11 +1049,11 @@ function getPurchaseInvoiceLatestEditTable($maxCount = 5, $socid = 0)
|
|||
|
||||
$result .= '<td class="tdoverflowmax150">'.$companystatic->getNomUrl(1, 'supplier').'</td>';
|
||||
|
||||
$result .= '<td>'.dol_print_date($db->jdate($obj->datec), 'day').'</td>';
|
||||
$result .= '<td title="'.$langs->trans("DateModification").': '.dol_print_date($db->jdate($obj->datec), 'dayhour').'">'.dol_print_date($db->jdate($obj->datec), 'day').'</td>';
|
||||
|
||||
$result .= '<td class="amount right">'.price($obj->total_ttc).'</td>';
|
||||
|
||||
$result .= '<td class="right">'.$objectstatic->getLibStatut(5).'</td>';
|
||||
$result .= '<td class="right">'.$objectstatic->getLibStatut(3).'</td>';
|
||||
|
||||
$result .= '</tr>';
|
||||
|
||||
|
|
@ -1305,8 +1306,6 @@ function getPurchaseInvoiceUnpaidOpenTable($maxCount = 500, $socid = 0)
|
|||
$num = $db->num_rows($resql);
|
||||
$othernb = 0;
|
||||
|
||||
$formfile = new FormFile($db);
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
|
|
@ -1326,7 +1325,9 @@ function getPurchaseInvoiceUnpaidOpenTable($maxCount = 500, $socid = 0)
|
|||
print '<th class="right">'.$langs->trans("Paid").'</th>';
|
||||
print '<th width="16"> </th>';
|
||||
print "</tr>\n";
|
||||
|
||||
$societestatic = new Societe($db);
|
||||
|
||||
if ($num) {
|
||||
$i = 0;
|
||||
$total = $total_ttc = $totalam = 0;
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ if ($resql) {
|
|||
print '</td>';
|
||||
|
||||
// Date
|
||||
print '<td class="center">'.dol_print_date($db->jdate($obj->datem), 'day').'</td>';
|
||||
print '<td class="center" title="'.$langs->trans("DonationDate").': '.dol_print_date($db->jdate($obj->datem), 'day').'">'.dol_print_date($db->jdate($obj->datem), 'day').'</td>';
|
||||
|
||||
print '<td class="right">'.$donation_static->LibStatut($obj->fk_statut, 5).'</td>';
|
||||
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ if ($result) {
|
|||
|
||||
$i = 0;
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
print '<table class="tagtable noborder nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
if ($agentid > 0) {
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ if ($result) {
|
|||
$selectedfields = '';
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
print '<table class="tagtable noborder nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
print '<tr class="liste_titre liste_titre_search">';
|
||||
print '<td><input type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'"></td>';
|
||||
|
|
@ -288,7 +288,7 @@ if ($result) {
|
|||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td class="liste_titre" align="middle">';
|
||||
print '<td class="liste_titre center">';
|
||||
$searchpitco = $form->showFilterButtons();
|
||||
print $searchpitco;
|
||||
print '</td>';
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@ if ($result) {
|
|||
|
||||
$i = 0;
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
print '<table class="tagtable noborder nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
if (!empty($client)) {
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ if ($result) {
|
|||
|
||||
$i = 0;
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
print '<table class="tagtable noborder nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
if ($id > 0) {
|
||||
|
|
|
|||
|
|
@ -454,6 +454,11 @@ if ($action == 'setwebsiteoffline' && $usercanedit) {
|
|||
exit;
|
||||
}
|
||||
if ($action == 'seteditinline') { // Test on permission not required here
|
||||
if (!getDolGlobalString('WEBSITE_EDITINLINE_SAVE_CKEDITOR_EDIT')) {
|
||||
// Show warning for feature not yet ready
|
||||
setEventMessages($langs->trans("FeatureNotYetAvailable"), null, 'warnings');
|
||||
}
|
||||
|
||||
dolibarr_set_const($db, 'WEBSITE_EDITINLINE', 1);
|
||||
//dolibarr_set_const($db, 'WEBSITE_SUBCONTAINERSINLINE', 0); // Force disable of 'Include dynamic content'
|
||||
header("Location: ".$_SERVER["PHP_SELF"].'?website='.urlencode(GETPOST('website')).'&pageid='.GETPOSTINT('pageid'));
|
||||
|
|
@ -3544,8 +3549,10 @@ if (!GETPOST('hide_websitemenu')) {
|
|||
isEditingEnabled = true;
|
||||
|
||||
// Trigger the function when clicking outside the elements with contenteditable=true attribute
|
||||
// so we can save the change.
|
||||
$(document).on(\'click\', function(e) {
|
||||
var target = $(e.target);
|
||||
|
||||
// Check if the click is outside the elements with contenteditable=true attribute
|
||||
if (!target.closest(\'[contenteditable="true"]\').length) {
|
||||
// Repeat through the elements with contenteditable="true" attribute
|
||||
|
|
@ -3553,6 +3560,7 @@ if (!GETPOST('hide_websitemenu')) {
|
|||
var idToUse = $(this).attr(\'id\');
|
||||
var elementType = $(this).prop("tagName").toLowerCase(); // Get the tag name (div, section, footer...)
|
||||
var instance = CKEDITOR.instances[idToUse];
|
||||
|
||||
// Check if the element has been modified
|
||||
if ($(this).hasClass(\'modified\')) {
|
||||
var content = instance.getData();
|
||||
|
|
@ -3561,13 +3569,18 @@ if (!GETPOST('hide_websitemenu')) {
|
|||
// Retrieving the content and ID of the element
|
||||
var elementId = $(this).attr(\'id\');
|
||||
|
||||
// Sending data via AJAX
|
||||
';
|
||||
if (getDolGlobalString('WEBSITE_EDITINLINE_SAVE_CKEDITOR_EDIT')) {
|
||||
print '
|
||||
console.log("A change has been detected, we send new content for update with ajax");
|
||||
|
||||
// Sending data via AJAX to update section
|
||||
$.ajax({
|
||||
type: \'POST\',
|
||||
url: \'' . DOL_URL_ROOT . '/core/ajax/editinline.php\',
|
||||
data: {
|
||||
website_ref: \''.$website->ref.'\',
|
||||
page_id: \'' . $websitepage->id . '\',
|
||||
website_ref: \''.dol_escape_js($website->ref).'\',
|
||||
page_id: \'' . ((int) $websitepage->id) . '\',
|
||||
content: content,
|
||||
element_id: elementId,
|
||||
element_type: elementType,
|
||||
|
|
@ -3598,6 +3611,11 @@ if (!GETPOST('hide_websitemenu')) {
|
|||
}, 2000);
|
||||
}
|
||||
});
|
||||
';
|
||||
} else {
|
||||
print 'console.log("A change has been detected, but saving is not enabled by option WEBSITE_EDITINLINE_SAVE_CKEDITOR_EDIT, so no ajax update is done");';
|
||||
}
|
||||
print '
|
||||
|
||||
$(this).removeClass(\'modified\');
|
||||
}
|
||||
|
|
@ -4896,8 +4914,6 @@ if ($action == 'preview') {
|
|||
if ($action == 'editfile' || $action == 'file_manager' || $action == 'convertimgwebp' || $action == 'confirmconvertimgwebp') {
|
||||
print '<!-- Edit Media -->'."\n";
|
||||
print '<div class="fiche"><br>';
|
||||
//print '<div class="center">'.$langs->trans("FeatureNotYetAvailable").'</center>';
|
||||
|
||||
|
||||
$module = 'medias';
|
||||
$formalreadyopen = 2; // So the form to submit a new file will not be open another time inside the core/tpl/filemanager.tpl.php
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user