[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 217/323: Periode : fix bug
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 217/323: Periode : fix bug |
Date: |
Wed, 14 Mar 2018 17:38:52 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 0bbb93f296fac71800e08b6614d97de660284148
Merge: 90bb145 b3f7eb0
Author: Dany De Bontridder <address@hidden>
Date: Sun Feb 18 21:14:40 2018 +0100
Periode : fix bug
html/admin-noalyss.php | 1 +
html/ajax_misc.php | 6 +
html/do.php | 12 +-
html/index.css | 76 ++++--
html/index.php | 22 +-
html/install.php | 136 ++++------
html/style-classic7.css | 7 +-
html/user_login.php | 38 +--
include/admin_repo.inc.php | 18 +-
include/ajax/ajax_admin.php | 95 +++++--
include/ajax/ajax_periode.php | 2 +
include/audit_log.php | 4 +-
include/class/dossier.class.php | 124 +++++++--
include/class/extension.class.php | 416 ++++++++++++++++-------------
include/class/package_contrib.class.php | 25 ++
include/class/package_core.class.php | 64 +++++
include/class/package_noalyss.class.php | 117 ++++++++
include/class/package_plugin.class.php | 66 +++++
include/class/package_repository.class.php | 175 ++++++++++++
include/class/package_template.class.php | 77 ++++++
include/class/periode.class.php | 12 +-
include/constant.php | 14 +-
include/dossier.inc.php | 2 +-
include/lib/user_menu.php | 4 +-
include/modele.inc.php | 2 +-
include/restore.inc.php | 2 +-
include/upgrade-core.php | 65 +++++
include/upgrade-plugin.php | 133 +++++++++
include/upgrade-template.php | 66 +++++
include/upgrade.inc.php | 134 ++++------
include/user.inc.php | 2 +-
scenario/package_repository.test.php | 103 +++++++
32 files changed, 1564 insertions(+), 456 deletions(-)
diff --cc html/ajax_misc.php
index 70f4f93,5da6df5..fdf3a7e
--- a/html/ajax_misc.php
+++ b/html/ajax_misc.php
@@@ -203,6 -203,10 +203,12 @@@ $path = array
"modele_drop"=>"ajax_admin",
// From admin, display the information of a template you can modify
"modele_modify"=>"ajax_admin",
+ // From admin , upgrade Noalyss
+ "upgradeCore"=>"ajax_admin",
+ // From admin , upgrade or install plugin
+ "upgradePlugin"=>"ajax_admin",
++ // From admin , install a template
++ "installTemplate"=>"ajax_admin",
// From dashboard, display detail about last operation
"action_show"=>"ajax_gestion",
// From dashboard, display form for a new event
diff --cc html/index.css
index 1bdcd38,ad79604..e2b1017
--- a/html/index.css
+++ b/html/index.css
@@@ -98,52 -84,28 +84,78 @@@ background-repeat: repeat-x repeat-y
}
#recover_link {
position:absolute;
+ margin-bottom:30px;
+ width: 100%;
+ }
+
+ }
address@hidden only screen and (max-width : 900px) {
+ #alternate_browser {
+ display : none;
+ }
+ #logo_id {
+ position:absolute;
+ z-index:-1;
+ height:45%;
+ width:auto;
+ left:0px;
+
+ }
++ #login_frm {
++ position:absolute;
++ left:15%;
++ top:50%;
++ }
+ .input_text {
+ width:8em;
+ }
++ #recover_link {
++ position:absolute;
+ bottom:30px;
+ width: 100%;
+ }
+ #recover_box {
+
+ display: none;
+ position: absolute;
+ top: 15%;
+ z-index: 1;
+ border: 2px solid blue;
+ width: 96%;
+ margin-left: 1%;
+ background-color: whitesmoke;
+
+}
}
address@hidden only screen and (max-width : 900px) {
+ #alternate_browser {
+ display : none;
+ }
+ #logo_id {
+ position:absolute;
+ z-index:-1;
+ height:45%;
+ width:auto;
+ left:15%;
+ top:15%;
+
+ }
+ .input_text {
+ width:8em;
+ }
+ #recover_box {
+
+ display:none;
+ position: absolute;
+ top: 15%;
+ z-index: 1;
+ border: 2px solid blue;
+ width: 96%;
+ left: 1%;
+ background-color: whitesmoke;
+
+}
+}
@media only screen and (min-width : 901px) {
#alternate_browser {
position:absolute;
diff --cc include/ajax/ajax_periode.php
index 05cd807,05cd807..6dd4938
--- a/include/ajax/ajax_periode.php
+++ b/include/ajax/ajax_periode.php
@@@ -279,9 -279,9 +279,11 @@@ switch ($act
$a_answer['content']=ob_get_clean();
$a_answer['status']="OK";
$a_answer['p_id']=$p_id;
++ $a_answer['status']="OK";
}
catch (Exception $e)
{
++ $a_answer['status']="NOK";
$a_answer['content']=$e->getMessage();
}
break;
diff --cc include/class/periode.class.php
index 8e4a64c,0ca7725..4ff4dfc
--- a/include/class/periode.class.php
+++ b/include/class/periode.class.php
@@@ -270,9 -271,9 +271,7 @@@ class Period
record_log($e->getTraceAsString());
$this->cn->rollback();
throw $e;
-- return 1;
}
-- return 0;
}
/* !\brief load data from database
@@@ -478,10 -479,10 +477,7 @@@
$date_start=sprintf('01.%02d.%d', $month, $year);
$date_end=$this->cn->get_value("select
to_char(to_date($1,'DD.MM.YYYY')+interval '1 month'-interval '1
day','DD.MM.YYYY')",
array($date_start));
-- if ($this->insert($date_start, $date_end, $p_exercice)!=0)
-- {
-- throw new Exception('Erreur insertion période');
-- }
++ $this->insert($date_start, $date_end, $p_exercice);
}
$month++;
if ($month == 13 )
diff --cc include/upgrade-template.php
index 0000000,7bde312..9373205
mode 000000,100644..100644
--- a/include/upgrade-template.php
+++ b/include/upgrade-template.php
@@@ -1,0 -1,66 +1,66 @@@
+ <?php
+ /*
+ * This file is part of NOALYSS.
+ *
+ * PhpCompta 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 2 of the License, or
+ * (at your option) any later version.
+ *
+ * PhpCompta 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 PhpCompta; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+ // Copyright (2018) Author Dany De Bontridder <address@hidden>
+
+ if (!defined('ALLOWED'))
+ die('Appel direct ne sont pas permis');
+ if (!defined('ALLOWED_ADMIN'))
+ {
+ die(_('Non autorisé'));
+ }
+ require_once NOALYSS_INCLUDE.'/class/package_repository.class.php';
+ require_once NOALYSS_INCLUDE.'/class/extension.class.php';
+
+
+ $package_repository=new Package_Repository();
+ $xml=$package_repository->getContent();
+
+
+ $a_template=$xml->xpath('//database_template/dbtemplate');
+ $nb_template=count($a_template);
+ echo "<table>";
+ echo tr(
+ th(_("Nom")).th(_("Description")).th(_("Mise à jour"))
+ );
+ for ($i=0; $i<$nb_template; $i++)
+ {
+ echo '<tr>';
+ echo td($a_template[$i]->name);
+ echo td($a_template[$i]->description);
+ echo td($a_template[$i]->date_update);
+ echo '<td id="template'.trim($a_template[$i]->code).'" >';
+ $js=sprintf("onclick=\"install_template('%s')\"",
trim($a_template[$i]->code));
+ echo HtmlInput::button("installTemplate", "Installation modèle", $js);
+ echo '</td>';
+ echo '</tr>';
+ }
+ echo "</table>";
+ ?>
+ <script>
+ function install_template(p_code)
+ {
+ var task_id = "<?= uniqid() ?>";
- /* progress_bar_start(task_id)*/
++ progress_bar_start(task_id);
+ new Ajax.Updater("installTemplate" + p_code, "ajax_misc.php", {
+ method:"POST",
- parameters:{op:"installTemplate", gDossier:0, code:p_code}
++ parameters:{op:"installTemplate", gDossier:0,
code:p_code,task_id:task_id}
+ }
+ );
+ }
+ </script>
- [Noalyss-commit] [noalyss] 225/323: Dashboard : Fix box, (continued)
- [Noalyss-commit] [noalyss] 225/323: Dashboard : Fix box, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 181/323: Task #0001535: TVA : réécriture du module CFGTVA, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 183/323: Task #0001536: Achat - Vente : n'utilisez que les codes TVA disponibles, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 215/323: Plugin : fix doc, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 213/323: Plugin : fix indent, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 234/323: Fix warning, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 230/323: index.css : CSS responsive, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 249/323: SQL Patch : correct syntax for new version, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 252/323: PLANANC : fix bug when creating first plan, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 226/323: Dashboard : remove dead code, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 217/323: Periode : fix bug,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 208/323: Missing file, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 233/323: Backward comptability for SQL function, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 264/323: Category Aged Balance add a start date, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 269/323: typo, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 270/323: check if open_basedir is empty, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 170/323: indent, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 207/323: Missing file, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 236/323: Merge tag 'rel6920', Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 175/323: Manage_Table_SQL : Improve Documentation + add function count_error, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 214/323: Plugin : fix indent, Dany De Bontridder, 2018/03/14