Skip to content

Commit

Permalink
Publish version 2.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
aspangaro committed Jun 19, 2023
1 parent 2692aeb commit 62db32b
Show file tree
Hide file tree
Showing 23 changed files with 247 additions and 123 deletions.
7 changes: 7 additions & 0 deletions htdocs/custom/oblyon/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## Changelog ##

### Version 2.2.6 - Compatibility 14.0.x - 18beta (2023/06/13)
- Fix CSS Dashboard on Easya 2022.5.3
- Fix Oblyon menu for problem in accountancy module
- Move Open-DSI to Easya Solutions
- Add support demand in about/support page
- Move customCCS to new version

### Version 2.2.5 - Compatibility 14.0.x - 18alpha (2023/05/09)
- Upgrade CSS
- Fix z-index for left menu if invert & with option fix area enabled
Expand Down
1 change: 1 addition & 0 deletions htdocs/custom/oblyon/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.2.6
52 changes: 28 additions & 24 deletions htdocs/custom/oblyon/admin/about.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2015 Nicolas Rivera <nrivera.pro@gmail.com>
* Copyright (C) 2015-2019 Open-DSI <support@open-dsi.fr>
* Copyright (C) 2015-2023 Open-DSI <support@open-dsi.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -26,6 +26,7 @@

// Libraries
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
dol_include_once('/oblyon/core/modules/modOblyon.class.php');
dol_include_once('/oblyon/lib/oblyon.lib.php');
dol_include_once('/oblyon/lib/opendsi_common.lib.php');

Expand Down Expand Up @@ -58,21 +59,37 @@

print dol_get_fiche_head($head, 'about', $langs->trans("Module113900Name"), 0, "opendsi@oblyon");

print '<div class="div-table-responsive-no-min">';
print '<table summary="edit" class="noborder centpercent editmode tableforfield">';
$modClass = new modOblyon($db);
$oblyonVersion = !empty($modClass->getVersion()) ? $modClass->getVersion() : 'NC';

print '<tr class="liste_titre"><td colspan="2">' . $langs->trans("Authors") . '</td>';
print '</tr>'."\n";
$supportvalue = "/*****"."<br>";
$supportvalue.= " * Module : Oblyon"."<br>";
$supportvalue.= " * Module version : ".$oblyonVersion."<br>";
$supportvalue.= " * Dolibarr version : ".DOL_VERSION."<br>";
$supportvalue.= " * Dolibarr version installation initiale : ".$conf->global->MAIN_VERSION_LAST_INSTALL."<br>";
$supportvalue.= " *****/"."<br><br>";
$supportvalue.= "Description de votre problème :"."<br>";

// print '<div class="div-table-responsive-no-min">';
print '<table class="centpercent">';

// Alexandre Spangaro
//print '<tr class="liste_titre"><td colspan="2">' . $langs->trans("Authors") . '</td>';
//print '</tr>'."\n";

// Easya Solutions
print '<tr>';
print '<td width="310px"><img alt="OpenDsi" src="../img/opendsi_dolibarr_preferred_partner.png" /></td>'."\n";
print '<td align="left" valign="top"><p>'.$langs->trans("OpenDsiAboutDesc").'</p></td>'."\n";
print '<form id="ticket" method="POST" target="_blank" action="https://support.easya.solutions/create_ticket.php">';
print '<input name=message type="hidden" value="'.$supportvalue.'" />';
print '<input name=email type="hidden" value="'.$user->email.'" />';
print '<td class="titlefield center"><img alt="Easya Solutions" src="../img/opendsi_dolibarr_preferred_partner.png" /></td>'."\n";
print '<td class="left"><p>'.$langs->trans("OpenDsiAboutDesc1").' <button type="submit" >'.$langs->trans("OpenDsiAboutDesc2").'</button> '.$langs->trans("OpenDsiAboutDesc3").'</p></td>'."\n";
print '</tr>'."\n";

print '</table>'."\n";
print '</div>';
// print '</div>';

print '<br>';
print '<br>';
print '<br>';

print '<div class="div-table-responsive-no-min">';
Expand All @@ -90,26 +107,13 @@

// Mathieu BRUNOT / Monogramm
print '<tr>';
print '<td width="310px"><img alt="Monogramm" src="../img/monogramm.png" /></td>'."\n";
print '<td align="left" valign="top"><p>'.$langs->trans("MonogrammAboutDesc").'</p></td>'."\n";
print '<td class="titlefield center"><img alt="Monogramm" width="100px" src="../img/monogramm.png" /></td>'."\n";
print '<td><b>Mathieu Brunot - Monogramm.io</b>&nbsp;-&nbsp;Développeur';
print '</tr>'."\n";

print '</table>'."\n";
print '</div>';

print '<br>';

print '<h2>Licence</h2>';
print $langs->trans("LicenseMessage");
print '<h2>Bugs / comments</h2>';
print $langs->trans("AboutMessage");

$changelog = opendsi_common_getChangeLog('oblyon');

print '<div class="moduledesclong">'."\n";
print (!empty($changelog) ? $changelog : $langs->trans("NotAvailable"));
print '<div>'."\n";

llxFooter();

$db->close();
77 changes: 77 additions & 0 deletions htdocs/custom/oblyon/admin/changelog.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?php
/* Copyright (C) 2015 Nicolas Rivera <nrivera.pro@gmail.com>
* Copyright (C) 2015-2023 Open-DSI <support@open-dsi.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

/**
* \file admin/changelog.php
* \ingroup oblyon
* \brief Changelog Page < Oblyon Theme Configurator >
*/
// Dolibarr environment *************************
require '../config.php';

// Libraries
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
dol_include_once('/oblyon/lib/oblyon.lib.php');
dol_include_once('/oblyon/lib/opendsi_common.lib.php');

// Langs
$langs->loadLangs(array('oblyon@oblyon', 'opendsi@oblyon', 'monogramm@oblyon'));

// Access control
if (! $user->admin)
accessforbidden();

// Parameters
$action = GETPOST('action', 'alpha');

/*
* Actions
*/

/*
* View
*/
$page_name = "ThemeOblyonChangelogTitle";
llxHeader('', $langs->trans($page_name));

// Subheader
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
print load_fiche_titre($langs->trans($page_name), $linkback);

// Configuration header
$head = oblyon_admin_prepare_head();

print dol_get_fiche_head($head, 'changelog', $langs->trans("Module113900Name"), 0, "opendsi@oblyon");

print '<div class="div-table-responsive-no-min">';
print '<table summary="edit" class="noborder centpercent editmode tableforfield">';

print '<h2>Licence</h2>';
print $langs->trans("LicenseMessage");
print '<h2>Bugs / comments</h2>';
print $langs->trans("AboutMessage");

$changelog = opendsi_common_getChangeLog('oblyon');

print '<div class="moduledesclong">'."\n";
print (!empty($changelog) ? $changelog : $langs->trans("NotAvailable"));
print '<div>'."\n";

llxFooter();

$db->close();
7 changes: 5 additions & 2 deletions htdocs/custom/oblyon/admin/colors.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
require_once '../lib/oblyon.lib.php';

// Translations *********************************
$langs->loadLangs(array('admin', 'oblyon@oblyon'));
$langs->loadLangs(array('admin', 'oblyon@oblyon', 'opendsi@oblyon'));

// Access control *******************************
if (! $user->admin) accessforbidden();
Expand Down Expand Up @@ -318,7 +318,10 @@
});
</script>
<form action = "'.$_SERVER['PHP_SELF'].'" method = "POST" enctype = "multipart/form-data">
<input type = "hidden" name = "token" value = "'.newToken().'" />';
<input type="hidden" name="token" value="'.newToken().'" />
<input type="hidden" name="action" value="update">
<input type="hidden" name="page_y" value="">
<input type="hidden" name="dol_resetcache" value="1">';
// Sauvegarde / Restauration
oblyon_print_backup_restore();
clearstatcache();
Expand Down
85 changes: 29 additions & 56 deletions htdocs/custom/oblyon/admin/customcss.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2022 Paul Lepont <paul@kawagency.fr>
* Copyright (C) 2022 Alexandre Spangaro <support@open-dsi.fr>
* Copyright (C) 2022-2023 Alexandre Spangaro <aspangaro@open-dsi.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -32,11 +32,12 @@

// Libraries ************************************
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once '../lib/oblyon.lib.php';

// Translations *********************************
$langs->loadLangs(array('admin', 'oblyon@oblyon'));
$langs->loadLangs(array('admin', 'oblyon@oblyon', 'opendsi@oblyon'));

// Access control *******************************
if (!$user->admin) {
Expand All @@ -46,11 +47,12 @@
// Actions **************************************
$action = GETPOST('action', 'aZ09');
$result = '';

// Sauvegarde / Restauration
if ($action == 'bkupParams') $result = oblyon_bkup_module ('oblyon');
if ($action == 'restoreParams') $result = oblyon_restore_module ('oblyon');

if($action == 'update') $result = dolibarr_set_const($db, "OBLYON_CUSTOM_CSS", GETPOST('custom_css'), 'chaine', 0, '', $conf->entity);
if($action == 'update') $result = dolibarr_set_const($db, "OBLYON_CUSTOM_CSS", GETPOST('OBLYON_CUSTOM_CSS', 'restricthtml'), 'chaine', 0, '', $conf->entity);

// Retour => message Ok ou Ko
if ($result == 1) setEventMessages($langs->trans('SetupSaved'), null, 'mesgs');
Expand All @@ -59,7 +61,13 @@

// View *****************************************
$page_name = $langs->trans('OblyonCustomCSSTitle');
llxHeader('', $page_name);

llxHeader('', $page_name, '', '', 0, 0,
array(
'/includes/ace/src/ace.js',
'/includes/ace/src/ext-statusbar.js',
'/includes/ace/src/ext-language_tools.js',
), array());
$linkback = '<a href = "'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans('BackToModuleList').'</a>';
print load_fiche_titre($page_name, $linkback);

Expand All @@ -71,75 +79,40 @@
$formfile = new FormFile($db);

// setup page goes here *************************
print '<form action = "'.$_SERVER['PHP_SELF'].'" method = "POST" enctype = "multipart/form-data">';
print '<input type = "hidden" name = "token" value = "'.newToken().'" />';
print '<form enctype="multipart/form-data" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="page_y" value="">';
print '<input type="hidden" name="dol_resetcache" value="1">';

// Sauvegarde / Restauration
oblyon_print_backup_restore();
clearstatcache();

print '
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/codemirror.min.js" integrity="sha512-xwrAU5yhWwdTvvmMNheFn9IyuDbl/Kyghz2J3wQRDR8tyNmT8ZIYOd0V3iPYY/g4XdNPy0n/g0NvqGu9f0fPJQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/codemirror.min.css" integrity="sha512-uf06llspW44/LZpHzHT6qBOIVODjWtv4MxCricRxkzvopAlSWnTf6hpZTFxuuZcuNE9CBQhqE0Seu1CoRk84nQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/css/css.min.js" integrity="sha512-2gAMyrBfWPuTJDA2ZNIWVrBBe9eN6/hOjyvewDd0bsk2Zg06sUla/nPPlqQs75MQMvJ+S5AmfKmq9q3+W2qeKw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
';

print '<span class="opacitymedium">'.$langs->trans("DisplayDesc")."</span><br>\n";
print "<br>\n";

print '<div class="div-table-responsive-no-min">';
print '<table summary="blockdashboard" class="noborder centpercent editmode tableforfield">';
//print $form->textwithpicto($langs->trans("AddCustomCssSentence"), "", 1, 'help', '', 0, 2, 'tooltipmessageofday');

print '<div class="div-table-responsive-no-min">';
print '<table summary="edit" class="noborder centpercent editmode tableforfield">';

print '<tr class="oddeven width25p"><td>';
$texthelp = '';
print $form->textwithpicto($langs->trans("AddCustomCssSentence"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessageofday');
print '</td></tr>';
print '<tr class="liste_titre">';
print '<td colspan="2">';

print '<tr class="oddeven width25p"><td>';
print '<div id="codeMirror"></div>';
$customcssValue = getDolGlobalString('OBLYON_CUSTOM_CSS');

print '</td></tr>' . "\n";
$doleditor = new DolEditor('OBLYON_CUSTOM_CSS', $customcssValue, '', '80%', 'Basic', 'In', true, false, 'ace',10,'90%');
$doleditor->Create(0,'',true,'css','css');
print '</td></tr>'."\n";

print '</table>';
print '</table>'."\n";
print '</div>';

print '<div class="center">';
print '<input class="button button-save reposition" type="submit" name="submit" value="' . $langs->trans("Save") . '">';
print '<input class="button button-save reposition buttonforacesave" type="submit" name="submit" value="' . $langs->trans("Save") . '">';
print '</div>';

$constantOblyonCustomCSS = !empty($conf->global->OBLYON_CUSTOM_CSS) ? $conf->global->OBLYON_CUSTOM_CSS : '';
print ' <script type = "text/javascript">
$(document).ready(function() {
$(".action").keyup(function(event) {
if (event.which === 13) $("#action").click();
});
var elem = document.getElementById("codeMirror")
var initialValue = `'.$constantOblyonCustomCSS.'`;
if(initialValue) {
var textDefault = initialValue;
} else {
var textDefault = "#myCustomId{ \n width : 100%; \n}"
}
var myCodeMirror = CodeMirror(elem, {
value: textDefault,
mode: "css"
});
$(".button-save").on("click", function(){
event.preventDefault();
$.ajax({
url: "./customcss.php",
type: "POST",
data : { action : "update", token : "'.newToken().'", custom_css : myCodeMirror.getValue()}
})
.done(function(response){
if(response == 1){
location.reload()
}
})
})
})';
print '</script>';

print '</form>';
print '<br/>';
// End of page
Expand Down
7 changes: 5 additions & 2 deletions htdocs/custom/oblyon/admin/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
require_once '../lib/oblyon.lib.php';

// Translations *********************************
$langs->loadLangs(array('admin', 'oblyon@oblyon'));
$langs->loadLangs(array('admin', 'oblyon@oblyon', 'opendsi@oblyon'));

// Access control *******************************
if (! $user->admin) accessforbidden();
Expand Down Expand Up @@ -102,7 +102,10 @@
});
</script>
<form action = "'.$_SERVER['PHP_SELF'].'" method = "POST" enctype = "multipart/form-data">
<input type = "hidden" name = "token" value = "'.newToken().'" />';
<input type="hidden" name="token" value="'.newToken().'" />
<input type="hidden" name="action" value="update">
<input type="hidden" name="page_y" value="">
<input type="hidden" name="dol_resetcache" value="1">';
// Sauvegarde / Restauration
oblyon_print_backup_restore();
clearstatcache();
Expand Down
2 changes: 1 addition & 1 deletion htdocs/custom/oblyon/admin/icons.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
require_once '../lib/oblyon.lib.php';

// Translations *********************************
$langs->loadLangs(array('admin', 'oblyon@oblyon'));
$langs->loadLangs(array('admin', 'oblyon@oblyon', 'opendsi@oblyon'));

// Access control *******************************
if (! $user->admin) accessforbidden();
Expand Down
2 changes: 1 addition & 1 deletion htdocs/custom/oblyon/admin/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
require_once '../lib/oblyon.lib.php';

// Translations *********************************
$langs->loadLangs(array('admin', 'oblyon@oblyon'));
$langs->loadLangs(array('admin', 'oblyon@oblyon', 'opendsi@oblyon'));

// Access control *******************************
if (! $user->admin) accessforbidden();
Expand Down
Loading

0 comments on commit 62db32b

Please sign in to comment.