diff --git a/doc/developper/Doxyfile b/doc/developper/Doxyfile
index 63ef35284..3571e04c5 100644
--- a/doc/developper/Doxyfile
+++ b/doc/developper/Doxyfile
@@ -673,7 +673,6 @@ EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = a?.php \
b?.php \
?.php \
- test*.php \
calendar-*.js \
richtext.js \
builder.js \
diff --git a/html/ajax_misc.php b/html/ajax_misc.php
index c4bcbe955..70f4f9387 100644
--- a/html/ajax_misc.php
+++ b/html/ajax_misc.php
@@ -46,6 +46,7 @@ require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
require_once NOALYSS_INCLUDE.'/class/user.class.php';
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
require_once NOALYSS_INCLUDE.'/lib/icon_action.class.php';
+require_once NOALYSS_INCLUDE.'/lib/progress_bar.class.php';
$http=new HttpInput();
mb_internal_encoding("UTF-8");
@@ -86,6 +87,16 @@ else
$g_user = new User($cn);
$g_user->check(true);
}
+
+// For progress bar, for saving time , we check and answer directly
+if ($op == "progressBar") {
+ $task_id=$http->request("task_id");
+ $task=new Progress_Bar($task_id);
+ $task->answer();
+ return;
+}
+
+
$html = var_export($_REQUEST, true);
set_language();
if ( LOGINPUT)
@@ -208,6 +219,8 @@ $path = array(
"accounting"=>"ajax_accounting",
// Show detail of an ANC operation
"anc_detail_op"=>"ajax_anc_detail_operation",
+ // show history of an analytic account
+ "history_anc_account"=>"ajax_history_anc_account",
// Display the list of filter saved
"display_search_filter"=>"ajax_search_filter",
// Save search filter
@@ -223,7 +236,9 @@ $path = array(
// Attribute for category of card
'template_cat_category'=>'ajax_template_cat_category',
// From FollowUp , update a comment on a file
- 'update_comment_followUp'=>'ajax_follow_up'
+ 'update_comment_followUp'=>'ajax_follow_up',
+ // TVA param
+ "tva_parameter"=>"ajax_tva_parameter"
) ;
if (array_key_exists($op, $path)) {
@@ -232,6 +247,60 @@ if (array_key_exists($op, $path)) {
}
switch ($op)
{
+ case "periode_change":
+ $field=$http->get("field");
+ $type=$http->get("type");
+ $exercice=$http->get("exercice","number");
+ $last=$http->get("last","number");
+
+ // if last == 1 then show first and last periode of the
+ // exercice
+ $periode_start=0;
+ $periode_end=0;
+ if ( $last==1) {
+ $t_periode=new Periode($cn);
+ list($per_max,$per_min)=$t_periode->get_limit($exercice);
+ $periode_start=$per_max->p_id;
+ $periode_end=$per_min->p_id;
+ }
+
+ $iperiod = new IPeriod($field);
+ $iperiod->id=$field;
+ $iperiod->user = $g_user;
+ $iperiod->cn = $cn;
+ $iperiod->filter_year = true;
+ $iperiod->exercice=$exercice;
+ if ( $type=="from")
+ {
+ $iperiod->show_end_date=FALSE;
+ $iperiod->value=$periode_start;
+ } elseif ($type=="to"){
+ $iperiod->show_start_date=FALSE;
+ $iperiod->value=$periode_end;
+
+ } else {
+ throw new Exception(_("Invalide type"));
+ }
+
+ $iperiod->type = ALL;
+ echo $iperiod->input();
+
+ return;
+
+ break;
+ case "pref_exercice":
+ $iperiod = new IPeriod("period");
+ $iperiod->id="setting_period";
+ $iperiod->user = $g_user;
+ $iperiod->cn = $cn;
+ $iperiod->filter_year = true;
+ $iperiod->exercice=$http->get("exercice");
+
+ $iperiod->type = ALL;
+ echo $iperiod->input();
+
+ return;
+ break;
case "remove_anc":
if ($g_user->check_module('ANCODS') == 0)
exit();
@@ -350,7 +419,29 @@ EOF;
break;
case 'dsp_tva':
$cn = Dossier::connect();
- $Res = $cn->exec_sql("select * from tva_rate order by tva_rate desc");
+ // Filter the VAT
+ $filter=$http->get("filter","string","none");
+ if ( $filter == 'sale') {
+ $Res = $cn->exec_sql("select *
+ from v_tva_rate
+ where
+ tva_sale <> '#'
+ order by tva_rate desc");
+
+ } elseif ($filter == "purchase") {
+
+ $Res = $cn->exec_sql("select *
+ from
+ v_tva_rate
+ where
+ tva_purchase <> '#'
+ order by tva_rate desc");
+ }else {
+
+ $Res = $cn->exec_sql("select * from v_tva_rate
+ where
+ order by tva_rate desc");
+ }
$Max = Database::num_row($Res);
$r = "";
$r.=HtmlInput::title_box(_('Choisissez la TVA'),'tva_select',"close","","y");
diff --git a/html/do.php b/html/do.php
index 2125c714b..67145029f 100644
--- a/html/do.php
+++ b/html/do.php
@@ -196,7 +196,7 @@ if (DBVERSION > dossier::get_version($cn))
{
echo '
' . _("Votre base de données n'est pas à jour") . ' ';
$a = _("cliquez ici pour appliquer le patch");
- $base = dirname($_SERVER['SCRIPT_NAME']);
+ $base = dirname($_SERVER['REQUEST_URI']);
if ($base == '/') { $base = ''; }
$base .= '/admin-noalyss.php';
echo '' . $a . ' ';
diff --git a/html/image/bg-submit4.gif b/html/image/bg-submit4.gif
deleted file mode 100644
index 9774a3ff5..000000000
Binary files a/html/image/bg-submit4.gif and /dev/null differ
diff --git a/html/image/bg-submit4.png b/html/image/bg-submit4.png
deleted file mode 100644
index 34f6c5afb..000000000
Binary files a/html/image/bg-submit4.png and /dev/null differ
diff --git a/html/image/bg-submit5.png b/html/image/bg-submit5.png
deleted file mode 100644
index fc0bb8cbd..000000000
Binary files a/html/image/bg-submit5.png and /dev/null differ
diff --git a/html/image/bgcolor.gif b/html/image/bgcolor.gif
deleted file mode 100644
index 55fcf1ba6..000000000
Binary files a/html/image/bgcolor.gif and /dev/null differ
diff --git a/html/image/blackdot.gif b/html/image/blackdot.gif
deleted file mode 100644
index f79319f81..000000000
Binary files a/html/image/blackdot.gif and /dev/null differ
diff --git a/html/image/bold.gif b/html/image/bold.gif
deleted file mode 100644
index bdb3259c3..000000000
Binary files a/html/image/bold.gif and /dev/null differ
diff --git a/html/image/button-edit.png b/html/image/button-edit.png
deleted file mode 100644
index cf57c75cf..000000000
Binary files a/html/image/button-edit.png and /dev/null differ
diff --git a/html/image/centre.gif b/html/image/centre.gif
deleted file mode 100644
index f98c86a78..000000000
Binary files a/html/image/centre.gif and /dev/null differ
diff --git a/html/image/compute.png b/html/image/compute.png
deleted file mode 100644
index 1468e7f02..000000000
Binary files a/html/image/compute.png and /dev/null differ
diff --git a/html/image/copy.gif b/html/image/copy.gif
deleted file mode 100644
index faebb18c4..000000000
Binary files a/html/image/copy.gif and /dev/null differ
diff --git a/html/image/cut.gif b/html/image/cut.gif
deleted file mode 100644
index ca60a1aa3..000000000
Binary files a/html/image/cut.gif and /dev/null differ
diff --git a/html/image/delete.gif b/html/image/delete.gif
deleted file mode 100644
index 327af2a5b..000000000
Binary files a/html/image/delete.gif and /dev/null differ
diff --git a/html/image/edit.png b/html/image/edit.png
deleted file mode 100644
index 5da832338..000000000
Binary files a/html/image/edit.png and /dev/null differ
diff --git a/html/image/email.gif b/html/image/email.gif
deleted file mode 100644
index 7e376ea5d..000000000
Binary files a/html/image/email.gif and /dev/null differ
diff --git a/html/image/empty.gif b/html/image/empty.gif
deleted file mode 100644
index b3dadb0a5..000000000
Binary files a/html/image/empty.gif and /dev/null differ
diff --git a/html/image/home.png b/html/image/home.png
deleted file mode 100644
index 66f4c3d02..000000000
Binary files a/html/image/home.png and /dev/null differ
diff --git a/html/image/hr.gif b/html/image/hr.gif
deleted file mode 100644
index c98da9d00..000000000
Binary files a/html/image/hr.gif and /dev/null differ
diff --git a/html/image/hyperlink.gif b/html/image/hyperlink.gif
deleted file mode 100644
index 1fb1a4a5c..000000000
Binary files a/html/image/hyperlink.gif and /dev/null differ
diff --git a/html/image/icon-off.png b/html/image/icon-off.png
deleted file mode 100644
index c8d7bd452..000000000
Binary files a/html/image/icon-off.png and /dev/null differ
diff --git a/html/image/icon-on.png b/html/image/icon-on.png
deleted file mode 100644
index df9c4c9fe..000000000
Binary files a/html/image/icon-on.png and /dev/null differ
diff --git a/html/image/indent.gif b/html/image/indent.gif
deleted file mode 100644
index 2abb6b281..000000000
Binary files a/html/image/indent.gif and /dev/null differ
diff --git a/html/image/italic.gif b/html/image/italic.gif
deleted file mode 100644
index 8b1485b43..000000000
Binary files a/html/image/italic.gif and /dev/null differ
diff --git a/html/image/justifyfull.gif b/html/image/justifyfull.gif
deleted file mode 100644
index b12528b9f..000000000
Binary files a/html/image/justifyfull.gif and /dev/null differ
diff --git a/html/image/left_just.gif b/html/image/left_just.gif
deleted file mode 100644
index 505c5d961..000000000
Binary files a/html/image/left_just.gif and /dev/null differ
diff --git a/html/image/list.gif b/html/image/list.gif
deleted file mode 100644
index b3018d9f2..000000000
Binary files a/html/image/list.gif and /dev/null differ
diff --git a/html/image/load.gif b/html/image/load.gif
deleted file mode 100644
index 16278c05e..000000000
Binary files a/html/image/load.gif and /dev/null differ
diff --git a/html/image/logo-noalyss-7000-3.svg b/html/image/logo-noalyss-7000-3.svg
deleted file mode 100644
index 3b3a956fd..000000000
--- a/html/image/logo-noalyss-7000-3.svg
+++ /dev/null
@@ -1,305 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- image/svg+xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Noalyss comptabilite
-
-
diff --git a/html/image/logo6720.png b/html/image/logo6720.png
deleted file mode 100644
index ca014e1f9..000000000
Binary files a/html/image/logo6720.png and /dev/null differ
diff --git a/html/image/logo7.png b/html/image/logo7.png
deleted file mode 100644
index ca014e1f9..000000000
Binary files a/html/image/logo7.png and /dev/null differ
diff --git a/html/image/logo7000.png b/html/image/logo7000.png
new file mode 100644
index 000000000..336c984b3
Binary files /dev/null and b/html/image/logo7000.png differ
diff --git a/html/image/logout.png b/html/image/logout.png
deleted file mode 100644
index 598cf76be..000000000
Binary files a/html/image/logout.png and /dev/null differ
diff --git a/html/image/magnifier13.png b/html/image/magnifier13.png
deleted file mode 100644
index 9ea232dac..000000000
Binary files a/html/image/magnifier13.png and /dev/null differ
diff --git a/html/image/numbered_list.gif b/html/image/numbered_list.gif
deleted file mode 100644
index d1a4dbcad..000000000
Binary files a/html/image/numbered_list.gif and /dev/null differ
diff --git a/html/image/orange_flower.gif b/html/image/orange_flower.gif
deleted file mode 100644
index 55c2c0639..000000000
Binary files a/html/image/orange_flower.gif and /dev/null differ
diff --git a/html/image/outdent.gif b/html/image/outdent.gif
deleted file mode 100644
index fa3c1b6aa..000000000
Binary files a/html/image/outdent.gif and /dev/null differ
diff --git a/html/image/param.png b/html/image/param.png
deleted file mode 100644
index 6a2f729e6..000000000
Binary files a/html/image/param.png and /dev/null differ
diff --git a/html/image/paste.gif b/html/image/paste.gif
deleted file mode 100644
index 9bcc76ac2..000000000
Binary files a/html/image/paste.gif and /dev/null differ
diff --git a/html/image/popout.png b/html/image/popout.png
deleted file mode 100644
index 4d7c6b8b0..000000000
Binary files a/html/image/popout.png and /dev/null differ
diff --git a/html/image/preference.png b/html/image/preference.png
deleted file mode 100644
index 930d4c5e8..000000000
Binary files a/html/image/preference.png and /dev/null differ
diff --git a/html/image/print.png b/html/image/print.png
deleted file mode 100644
index 12d2277be..000000000
Binary files a/html/image/print.png and /dev/null differ
diff --git a/html/image/redo.gif b/html/image/redo.gif
deleted file mode 100644
index b51d6b842..000000000
Binary files a/html/image/redo.gif and /dev/null differ
diff --git a/html/image/right_just.gif b/html/image/right_just.gif
deleted file mode 100644
index a3204d97e..000000000
Binary files a/html/image/right_just.gif and /dev/null differ
diff --git a/html/image/search.png b/html/image/search.png
deleted file mode 100644
index a0f81612c..000000000
Binary files a/html/image/search.png and /dev/null differ
diff --git a/html/image/smiley.gif b/html/image/smiley.gif
deleted file mode 100644
index 72dcb4c7f..000000000
Binary files a/html/image/smiley.gif and /dev/null differ
diff --git a/html/image/spellcheck.gif b/html/image/spellcheck.gif
deleted file mode 100644
index e6c8d827e..000000000
Binary files a/html/image/spellcheck.gif and /dev/null differ
diff --git a/html/image/spirale2.gif b/html/image/spirale2.gif
deleted file mode 100644
index 01bb6d66d..000000000
Binary files a/html/image/spirale2.gif and /dev/null differ
diff --git a/html/image/textcolor.gif b/html/image/textcolor.gif
deleted file mode 100644
index 413e04178..000000000
Binary files a/html/image/textcolor.gif and /dev/null differ
diff --git a/html/image/trash-24.gif b/html/image/trash-24.gif
new file mode 100644
index 000000000..b586d42d3
Binary files /dev/null and b/html/image/trash-24.gif differ
diff --git a/html/image/undefined.png b/html/image/undefined.png
deleted file mode 100644
index eea4fc777..000000000
Binary files a/html/image/undefined.png and /dev/null differ
diff --git a/html/image/underline.gif b/html/image/underline.gif
deleted file mode 100644
index db8fb4ffd..000000000
Binary files a/html/image/underline.gif and /dev/null differ
diff --git a/html/image/undo.gif b/html/image/undo.gif
deleted file mode 100644
index 555d0db96..000000000
Binary files a/html/image/undo.gif and /dev/null differ
diff --git a/html/image/x-office-calendar.png b/html/image/x-office-calendar.png
deleted file mode 100644
index ca55f9077..000000000
Binary files a/html/image/x-office-calendar.png and /dev/null differ
diff --git a/html/index.css b/html/index.css
index b368f2da8..d7101d20c 100644
--- a/html/index.css
+++ b/html/index.css
@@ -59,32 +59,39 @@ border-width: 0px;
background-image: url("image/bg-submit3.gif");
background-repeat: repeat-x repeat-y;
}
+#logo_id {
+ width:19%;
+}
@media only screen and (max-width : 900px) {
#alternate_browser {
display : none;
}
#logo_id {
- height:160px;
+ position:absolute;
+ z-index:-1;
+ height:60%;
+ width:auto;
+ left:0px;
+
}
.input_text {
width:8em;
}
}
-@media only screen and (min-width : 1201px) {
+@media only screen and (min-width : 901px) {
#alternate_browser {
position:absolute;
bottom: 0px;
left:0px;
- z-index: -1
+ z-index: -1;
}
#logo_id {
- width:608px;
z-index:-1;
position:absolute;
- top:230px;
- left:688px;
- height: 125px;
+ width:19%;
+ left:27%;
+ top:24.5%;
}
#login_frm {
position:absolute;
@@ -99,5 +106,6 @@ background-repeat: repeat-x repeat-y;
position:absolute;
margin-top:397px;
left:539px;
+ background-color: white;
}
}
diff --git a/html/index.php b/html/index.php
index d4d23b35e..716ffdb61 100644
--- a/html/index.php
+++ b/html/index.php
@@ -183,7 +183,7 @@ version NOALYSS_VERSION - '.$my_domain.'
-
+
diff --git a/html/install.php b/html/install.php
index 20a9000a4..db64b0188 100644
--- a/html/install.php
+++ b/html/install.php
@@ -67,12 +67,18 @@ session_start();
.warning,.error {
color:red;
}
+ img:hover {
+ cursor: inherit;
+ background-color: inherit;
+ color: inherit;
+}
-
+
+NOALYSS : comptabilité - accountancy
@@ -277,7 +284,7 @@ require_once NOALYSS_INCLUDE.'/lib/database.class.php';
// we shouldn't use it
// if ( defined ("MULTI") && MULTI==1) { create_htaccess();}
-echo '
'._('Configuration').' ';
+echo ''._('Configuration').' ';
?>
Info
@@ -422,11 +429,11 @@ $sql="select setting from pg_settings where name='server_version'";
$version=$cn->get_value($sql);
echo _("Version base de données :"),$version;
-
-if ( $version[0] < 9 )
+$majeur=explode(".",$version);
+if ( $majeur[0] < 9 )
{
?>
-
diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js
index 9df198f8c..3bbe15048 100644
--- a/html/js/acc_ledger.js
+++ b/html/js/acc_ledger.js
@@ -681,6 +681,38 @@ function view_history_account(p_value, dossier,p_exercice)
}
);
+}
+/**
+ * @brief View the history of an account
+ * @param {type} p_value
+ * @param {type} dossier
+ * @returns {undefined}
+ */
+function view_history_anc_account(p_value, dossier,p_exercice)
+{
+ layer++;
+ var idbox = 'det' + layer;
+ var popup = {'id': idbox, 'cssclass': 'inner_box', 'html': loading(), 'drag': false};
+
+ var querystring={'gDossier':dossier,'op':'history_anc_account','po_id':p_value,'div':idbox,'l':layer,'act':'history','exercice':p_exercice};
+ waiting_box();
+
+ var action = new Ajax.Request(
+ "ajax_misc.php",
+ {
+ method: 'get',
+ parameters: querystring,
+ onFailure: error_box,
+ onSuccess: function (req, xml)
+ {
+ remove_waiting_box();
+ add_div(popup);
+ $(idbox).innerHTML=req.responseText;
+ $(idbox).style.top = calcy(140 + (layer * 3)) + "px";
+ }
+ }
+ );
+
}
/**
* @brief Change the view of account history
diff --git a/html/js/managetable.js b/html/js/managetable.js
index af876cf8f..9be363ace 100644
--- a/html/js/managetable.js
+++ b/html/js/managetable.js
@@ -303,7 +303,7 @@ var ManageTable = function (p_table_name)
var obj = {id: control, "cssclass": "inner_box", "html": loading()};
add_div(obj);
var pos = calcy(250);
- $(obj.id).setStyle({position: "absolute", top: '15%', width: "auto", "margin-left": "20%"});
+ $(obj.id).setStyle({position: "fixed", top: '15%', width: "auto", "margin-left": "20%"});
$(obj.id).update(x['html']);
} catch (e) {
smoke.alert("ERREUR " + e.message);
diff --git a/html/js/scripts.js b/html/js/scripts.js
index 633427941..46ddea91e 100644
--- a/html/js/scripts.js
+++ b/html/js/scripts.js
@@ -496,6 +496,8 @@ function popup_select_tva(obj)
queryString += '&code=' + obj.jcode;
if (obj.compute)
queryString += '&compute=' + obj.compute;
+ if (obj.filter)
+ queryString += '&filter=' + obj.filter;
var action = new Ajax.Request(
"ajax_misc.php",
@@ -2896,7 +2898,7 @@ function create_anchor_up()
function init_scroll()
{
var up=new Element('div',{"class":"inner_box",
- "style":"padding:5px;left:auto;width:auto;height: auto;display:none;position:fixed;bottom:25px;right:50px;text-align:center",
+ "style":"padding:5px;left:auto;width:auto;height: auto;display:none;position:fixed;bottom:95px;right:50px;text-align:center;font-size:20px",
id:"go_up"
});
up.innerHTML=' ';
@@ -2904,7 +2906,7 @@ function init_scroll()
window.onscroll=function () {
if ( document.viewport.getScrollOffsets().top> 0) {
if ($('go_up').visible() == false) {
- $('go_up').setOpacity(0.80);
+ $('go_up').setOpacity(0.45);
$('go_up').show();
$('go_up').style.zIndex=99;
}
@@ -3009,14 +3011,14 @@ function pin (object_id) {
if ( aDraggableElement[object_id]) {
aDraggableElement[object_id].destroy();
aDraggableElement[object_id]=undefined;
- $('pin_'+object_id).innerHTML="";
+ $('pin_'+object_id).innerHTML="";
} else {
aDraggableElement[object_id]=new Draggable(object_id, {starteffect: function ()
{
new Effect.Highlight(object_id, {scroll: window, queue: 'end'});
}}
);
- $('pin_'+object_id).innerHTML="";
+ $('pin_'+object_id).innerHTML="";
}
}
/**
@@ -3394,3 +3396,115 @@ Periode.filter_exercice=function (p_table_id) {
}
};
+
+// keep track of progress bar
+var progressBar = [];
+// idx of progress bar
+var progressIdx = 0;
+
+/**
+ * Start the progress bar
+ * @param {string} p_taskid id to monitor
+ * @param {int} p_dossier
+ */
+function progress_bar_start(p_taskid,p_message)
+{
+ try {
+ progressIdx++;
+ // block the window
+ var message="Un instant svp";
+ if ( p_message) {
+ message=p_message;
+ }
+ add_div({id:"blocking"+progressIdx,cssclass:"smoke-base smoke-visible "});
+
+ add_div({id:"message"+progressIdx,cssclass:"inner_box",style:"z-index:1000;position:fixed;top:30%;width:40%;left:30%"});
+ $("message"+progressIdx).update(message);
+ // Create a div
+ add_div({id: "progressDiv" + progressIdx, cssclass: "progressbar", html: '0 '});
+ // Check status every sec.
+ progressBar[progressIdx] = setInterval(progress_bar_check.bind(null, progressIdx, p_taskid), 1000);
+ } catch (e) {
+ console.error(e.message);
+ }
+}
+
+/**
+ * Check every second the status
+ * @param {integer} p_idx idx of progressbar
+ * @param {string} p_taskid id to monitor
+ */
+function progress_bar_check(p_idx, p_taskid)
+{
+ try {
+
+ new Ajax.Request("ajax_misc.php", {
+ parameters: {gDossier: 0, task_id: p_taskid,op:"progressBar"},
+ method:"get",
+ onSuccess: function (req) {
+ try
+ {
+ var answer=req.responseText.evalJSON();
+ var progress_div=$("progressDiv"+progressIdx);
+ var a_child=progress_div.childNodes;
+ var i=0;
+ for ( i=0;i< a_child.length;i++) {
+ if ( a_child[i].id="progressValue") {
+ var progressValue = a_child[i];
+ }
+ }
+ var progress = parseFloat(progressValue.innerHTML);
+ if ( answer.value <= progress ) {
+ return;
+ }
+
+ progressValue.innerHTML = answer.value;
+ progressValue.setStyle("width:" + answer.value + "%");
+ if (answer.value== 100) {
+ clearInterval(progressBar[p_idx]);
+ progressValue.innerHTML="Success";
+ Effect.BlindUp("progressDiv"+p_idx,{duration:1.0,scaleContent:false})
+ $("message"+p_idx).remove();
+ $("blocking"+p_idx).remove();
+ setTimeout(function() { $("progressDiv"+progressIdx).remove } , 1100);
+ }
+ } catch (e) {
+ clearInterval(progressBar[p_idx]);
+ document.getElementById("progressValue").innerHTML=req.responseText;
+ console.error(e.message);
+ }
+ }
+ });
+ } catch (e) {
+ clearInterval(progressBar[p_idx]);
+ console.error(e.message);
+ }
+}
+
+/**
+ * In the user's setting box, update the period list with the choosen exercice
+ * @param {int} p_dossier
+ */
+function updatePeriodePreference(p_dossier)
+{
+ waiting_box();
+ var exercice=$('exercice_setting').value;
+ new Ajax.Updater('setting_period',"ajax_misc.php",{method:"get",parameters:{ "op":"pref_exercice","gDossier":p_dossier,"exercice":exercice}});
+ remove_waiting_box();
+}
+/**
+ * Update the from and to periode list when changing the exercice
+ * @param {int} p_dossier
+ * @param {string} p_exercice id of the exercice
+ * @param {type} p_periode_from id of the starting periode
+ * @param {type} p_periode_to id of the ending periode
+ * @param {type} p_last possible value = 1 to show last periode or 0 the first
+ */
+function updatePeriode(p_dossier,p_exercice,p_periode_from,p_periode_to,p_last)
+{
+ waiting_box();
+ var exercice=$(p_exercice).value;
+ new Ajax.Updater(p_periode_from,"ajax_misc.php",{method:"get",parameters:{op:"periode_change","gDossier":p_dossier,"exercice":exercice,field:p_periode_from,"type":"from","last":p_last}});
+ new Ajax.Updater(p_periode_to,"ajax_misc.php",{method:"get",parameters:{op:"periode_change","gDossier":p_dossier,"exercice":exercice,field:p_periode_to,"type":"to","last":p_last}});
+ remove_waiting_box();
+}
diff --git a/html/js/smoke.js b/html/js/smoke.js
index aab68fa69..bfde05060 100644
--- a/html/js/smoke.js
+++ b/html/js/smoke.js
@@ -1,519 +1,514 @@
/*
- SMOKE.JS - 0.1.3
- (c) 2011-2013 Jonathan Youngblood
- demos / documentation: http://smoke-js.com/
-*/
+ SMOKE.JS - 0.1.3
+ (c) 2011-2013 Jonathan Youngblood
+ demos / documentation: http://smoke-js.com/
+ */
-;(function(window, document) {
+;
+(function (window, document) {
- /*jslint browser: true, onevar: true, undef: true, nomen: false, eqeqeq: true, bitwise: true, regexp: true, newcap: true, immed: true */
-
- var smoke = {
- smoketimeout: [],
- init: false,
- zindex: 1000,
- i: 0,
-
- bodyload: function(id) {
- var ff = document.createElement('div');
- ff.setAttribute('id','smoke-out-'+id);
- ff.className = 'smoke-base';
- ff.style.zIndex = smoke.zindex;
- smoke.zindex++;
- document.body.appendChild(ff);
- },
-
- newdialog: function() {
- var newid = new Date().getTime();
- newid = Math.random(1,99) + newid;
-
- if (!smoke.init) {
- smoke.listen(window,"load", function() {
- smoke.bodyload(newid);
- });
- }else{
- smoke.bodyload(newid);
- }
-
- return newid;
- },
-
- forceload: function() {},
-
- build: function (e, f) {
- smoke.i++;
-
- f.stack = smoke.i;
-
- e = e.replace(/\n/g,' ');
- e = e.replace(/\r/g,' ');
-
- var prompt = '',
- ok = 'OK',
- cancel = 'Cancel',
- classname = '',
- buttons = '',
- box;
-
- if (f.type === 'prompt') {
- prompt =
- ''+
- ' '+
- '
';
- }
-
- if (f.params.ok) {
- ok = f.params.ok;
- }
-
- if (f.params.cancel) {
- cancel = f.params.cancel;
- }
-
- if (f.params.classname) {
- classname = f.params.classname;
- }
-
- if (f.type !== 'signal') {
- buttons = '';
- if (f.type === 'alert') {
- buttons +=
- ''+ok+' ';
- }
- else if (f.type === 'quiz') {
-
- if (f.params.button_1) {
- buttons +=
- ''+f.params.button_1+' ';
- }
-
- if (f.params.button_2) {
- buttons +=
- ''+f.params.button_2+' ';
- }
-
- if (f.params.button_3) {
- buttons +=
- ''+f.params.button_3+' ';
- }
- if (f.params.button_cancel) {
- buttons +=
- ''+f.params.button_cancel+' ';
- }
-
- }
-
- else if (f.type === 'prompt' || f.type === 'confirm') {
- if (f.params.reverseButtons) {
- buttons +=
- ''+ok+' ' +
- ''+cancel+' ';
- } else {
- buttons +=
- ''+cancel+' '+
- ''+ok+' ';
- }
- }
- buttons += '
';
- }
-
-
- box =
- '
'+
- ''+
- '
'+
- e+
- prompt+
- buttons+
- '
'+
- '
';
-
- if (!smoke.init) {
- smoke.listen(window,"load", function() {
- smoke.finishbuild(e,f,box);
- });
- } else{
- smoke.finishbuild(e,f,box);
- }
-
- },
-
- finishbuild: function(e, f, box) {
-
- var ff = document.getElementById('smoke-out-'+f.newid);
-
- ff.className = 'smoke-base smoke-visible smoke-' + f.type;
- ff.innerHTML = box;
-
- while (ff.innerHTML === "") {
- ff.innerHTML = box;
- }
-
- if (smoke.smoketimeout[f.newid]) {
- clearTimeout(smoke.smoketimeout[f.newid]);
- }
-
- smoke.listen(
- document.getElementById('smoke-bg-'+f.newid),
- "click",
- function () {
- smoke.destroy(f.type, f.newid);
- if (f.type === 'prompt' || f.type === 'confirm' || f.type === 'quiz') {
- f.callback(false);
- } else if (f.type === 'alert' && typeof f.callback !== 'undefined') {
- f.callback();
- }
- }
- );
-
-
- switch (f.type) {
- case 'alert':
- smoke.finishbuildAlert(e, f, box);
- break;
- case 'confirm':
- smoke.finishbuildConfirm(e, f, box);
- break;
- case 'quiz':
- smoke.finishbuildQuiz(e, f, box);
- break;
- case 'prompt':
- smoke.finishbuildPrompt(e, f, box);
- break;
- case 'signal':
- smoke.finishbuildSignal(e, f, box);
- break;
- default:
- throw "Unknown type: " + f.type;
- }
- },
-
- finishbuildAlert: function (e, f, box) {
- smoke.listen(
- document.getElementById('alert-ok-'+f.newid),
- "click",
- function () {
- smoke.destroy(f.type, f.newid);
- if (typeof f.callback !== 'undefined') {
- f.callback();
- }
- }
- );
-
- document.onkeyup = function (e) {
- if (!e) {
- e = window.event;
- }
- if (e.keyCode === 13 || e.keyCode === 32 || e.keyCode === 27) {
- smoke.destroy(f.type, f.newid);
- if (typeof f.callback !== 'undefined') {
- f.callback();
- }
- }
- };
- },
-
- finishbuildConfirm: function (e, f, box) {
- smoke.listen(
- document.getElementById('confirm-cancel-' + f.newid),
- "click",
- function ()
- {
- smoke.destroy(f.type, f.newid);
- f.callback(false);
- }
- );
-
- smoke.listen(
- document.getElementById('confirm-ok-' + f.newid),
- "click",
- function ()
- {
- smoke.destroy(f.type, f.newid);
- f.callback(true);
- }
- );
-
- document.onkeyup = function (e) {
- if (!e) {
- e = window.event;
- }
- /*if (e.keyCode === 13 || e.keyCode === 32) {
- smoke.destroy(f.type, f.newid);
- f.callback(true);
- } else*/
- if (e.keyCode === 27) {
- smoke.destroy(f.type, f.newid);
- f.callback(false);
- }
- };
- },
-
- finishbuildQuiz: function (e, f, box) {
- var a, b, c;
-
- smoke.listen(
- document.getElementById('quiz-cancel-' + f.newid),
- "click",
- function ()
- {
- smoke.destroy(f.type, f.newid);
- f.callback(false);
- }
- );
-
-
- if (a = document.getElementById('quiz-ok1-'+f.newid))
- smoke.listen(
- a,
- "click",
- function () {
- smoke.destroy(f.type, f.newid);
- f.callback(a.innerHTML);
- }
- );
-
-
- if (b = document.getElementById('quiz-ok2-'+f.newid))
- smoke.listen(
- b,
- "click",
- function () {
- smoke.destroy(f.type, f.newid);
- f.callback(b.innerHTML);
- }
- );
-
-
- if (c = document.getElementById('quiz-ok3-'+f.newid))
- smoke.listen(
- c,
- "click",
- function () {
- smoke.destroy(f.type, f.newid);
- f.callback(c.innerHTML);
- }
- );
-
- document.onkeyup = function (e) {
- if (!e) {
- e = window.event;
- }
- if (e.keyCode === 27) {
- smoke.destroy(f.type, f.newid);
- f.callback(false);
- }
- };
-
- },
-
- finishbuildPrompt: function (e, f, box) {
- var pi = document.getElementById('dialog-input-'+f.newid);
-
- setTimeout(function () {
- pi.focus();
- pi.select();
- }, 100);
-
- smoke.listen(
- document.getElementById('prompt-cancel-'+f.newid),
- "click",
- function () {
- smoke.destroy(f.type, f.newid);
- f.callback(false);
- }
- );
-
- smoke.listen(
- document.getElementById('prompt-ok-'+f.newid),
- "click",
- function () {
- smoke.destroy(f.type, f.newid);
- f.callback(pi.value);
- }
- );
-
- document.onkeyup = function (e) {
- if (!e) {
- e = window.event;
- }
-
- if (e.keyCode === 13) {
- smoke.destroy(f.type, f.newid);
- f.callback(pi.value);
- } else if (e.keyCode === 27) {
- smoke.destroy(f.type, f.newid);
- f.callback(false);
- }
- };
- },
-
- finishbuildSignal: function (e, f, box) {
-
-
- document.onkeyup = function (e) {
- if (!e) {
- e = window.event;
- }
- if (e.keyCode === 27) {
- smoke.destroy(f.type, f.newid);
- if (typeof f.callback !== 'undefined') {
- f.callback();
- }
- }
- };
-
- smoke.smoketimeout[f.newid] = setTimeout(function () {
- smoke.destroy(f.type, f.newid);
- if (typeof f.callback !== 'undefined') {
- f.callback();
- }
- }, f.timeout);
- },
-
-
- destroy: function (type,id) {
-
- var box = document.getElementById('smoke-out-'+id);
-
- if (type !== 'quiz') {
- var okButton = document.getElementById(type+'-ok-'+id);
- }
-
- var cancelButton = document.getElementById(type+'-cancel-'+id);
- box.className = 'smoke-base';
-
- if (okButton) {
- smoke.stoplistening(okButton, "click", function() {});
- document.onkeyup = null;
- }
-
- if (type === 'quiz') {
- var quiz_buttons = document.getElementsByClassName("quiz-button");
- for (var i = 0; i < quiz_buttons.length; i++) {
- smoke.stoplistening(quiz_buttons[i], "click", function() {});
- document.onkeyup = null;
- }
- }
-
- if (cancelButton) {
- smoke.stoplistening(cancelButton, "click", function() {});
- }
-
- smoke.i = 0;
- document.body.removeChild(box);
- },
-
- alert: function (e, f, g) {
- if (typeof g !== 'object') {
- g = false;
- }
-
- var id = smoke.newdialog();
-
- smoke.build(e, {
- type: 'alert',
- callback: f,
- params: g,
- newid: id
- });
- },
-
- signal: function (e, f, g) {
- if (typeof g !== 'object') {
- g = false;
- }
+ /*jslint browser: true, onevar: true, undef: true, nomen: false, eqeqeq: true, bitwise: true, regexp: true, newcap: true, immed: true */
- var duration = 5000;
- if (g.duration !== 'undefined'){
- duration = g.duration;
- }
-
- var id = smoke.newdialog();
- smoke.build(e, {
- type: 'signal',
- callback: f,
- timeout: duration,
- params: g,
- newid: id
- });
- },
-
- confirm: function (e, f, g) {
- if (typeof g !== 'object') {
- g = false;
- }
-
- var id = smoke.newdialog();
- smoke.build(e, {
- type: 'confirm',
- callback: f,
- params: g,
- newid: id
- });
- },
-
- quiz: function (e, f, g) {
- if (typeof g !== 'object') {
- g = false;
- }
-
- var id = smoke.newdialog();
- smoke.build(e, {
- type: 'quiz',
- callback: f,
- params: g,
- newid: id
- });
- },
-
- prompt: function (e, f, g) {
- if (typeof g !== 'object') {
- g = false;
- }
-
- var id = smoke.newdialog();
- return smoke.build(e,{type:'prompt',callback:f,params:g,newid:id});
- },
-
- listen: function (e, f, g) {
- if (e.addEventListener) {
- return e.addEventListener(f, g, false);
- }
-
- if (e.attachEvent) {
- return e.attachEvent('on'+f, g);
- }
-
- return false;
- },
-
- stoplistening: function (e, f, g) {
- if (e.removeEventListener) {
- return e.removeEventListener(f, g, false);
- }
-
- if (e.detachEvent) {
- return e.detachEvent('on'+f, g);
- }
-
- return false;
- }
- };
-
-
- smoke.init = true;
+ var smoke = {
+ smoketimeout: [],
+ init: false,
+ zindex: 1000,
+ i: 0,
- if (typeof module != 'undefined' && module.exports) {
- module.exports = smoke;
- }
- else if (typeof define === 'function' && define.amd) {
- define('smoke', [], function() {
- return smoke;
- });
- }
- else {
- this.smoke = smoke;
- }
+ bodyload: function (id) {
+ var ff = document.createElement('div');
+ ff.setAttribute('id', 'smoke-out-' + id);
+ ff.className = 'smoke-base';
+ ff.style.zIndex = smoke.zindex;
+ smoke.zindex++;
+ document.body.appendChild(ff);
+ },
+
+ newdialog: function () {
+ var newid = new Date().getTime();
+ newid = Math.random(1, 99) + newid;
+
+ if (!smoke.init) {
+ smoke.listen(window, "load", function () {
+ smoke.bodyload(newid);
+ });
+ } else {
+ smoke.bodyload(newid);
+ }
+
+ return newid;
+ },
+
+ forceload: function () {},
+
+ build: function (e, f) {
+ smoke.i++;
+
+ f.stack = smoke.i;
+
+ e = e.replace(/\n/g, ' ');
+ e = e.replace(/\r/g, ' ');
+
+ var prompt = '',
+ ok = 'OK',
+ cancel = 'Cancel',
+ classname = '',
+ buttons = '',
+ box;
+
+ if (f.type === 'prompt') {
+ prompt =
+ '' +
+ ' ' +
+ '
';
+ }
+
+ if (f.params.ok) {
+ ok = f.params.ok;
+ }
+
+ if (f.params.cancel) {
+ cancel = f.params.cancel;
+ }
+
+ if (f.params.classname) {
+ classname = f.params.classname;
+ }
+
+ if (f.type !== 'signal') {
+ buttons = '';
+ if (f.type === 'alert') {
+ buttons +=
+ '' + ok + ' ';
+ } else if (f.type === 'quiz') {
+
+ if (f.params.button_1) {
+ buttons +=
+ '' + f.params.button_1 + ' ';
+ }
+
+ if (f.params.button_2) {
+ buttons +=
+ '' + f.params.button_2 + ' ';
+ }
+
+ if (f.params.button_3) {
+ buttons +=
+ '' + f.params.button_3 + ' ';
+ }
+ if (f.params.button_cancel) {
+ buttons +=
+ '' + f.params.button_cancel + ' ';
+ }
+
+ } else if (f.type === 'prompt' || f.type === 'confirm') {
+ if (f.params.reverseButtons) {
+ buttons +=
+ '' + ok + ' ' +
+ '' + cancel + ' ';
+ } else {
+ buttons +=
+ '' + cancel + ' ' +
+ '' + ok + ' ';
+ }
+ }
+ buttons += '
';
+ }
+
+
+ box =
+ '
' +
+ '' +
+ '
' +
+ e +
+ prompt +
+ buttons +
+ '
' +
+ '
';
+
+ if (!smoke.init) {
+ smoke.listen(window, "load", function () {
+ smoke.finishbuild(e, f, box);
+ });
+ } else {
+ smoke.finishbuild(e, f, box);
+ }
+
+ },
+
+ finishbuild: function (e, f, box) {
+
+ var ff = document.getElementById('smoke-out-' + f.newid);
+
+ ff.className = 'smoke-base smoke-visible smoke-' + f.type;
+ ff.innerHTML = box;
+
+ while (ff.innerHTML === "") {
+ ff.innerHTML = box;
+ }
+
+ if (smoke.smoketimeout[f.newid]) {
+ clearTimeout(smoke.smoketimeout[f.newid]);
+ }
+
+ smoke.listen(
+ document.getElementById('smoke-bg-' + f.newid),
+ "click",
+ function () {
+ smoke.destroy(f.type, f.newid);
+ if (f.type === 'prompt' || f.type === 'confirm' || f.type === 'quiz') {
+ f.callback(false);
+ } else if (f.type === 'alert' && typeof f.callback !== 'undefined') {
+ f.callback();
+ }
+ }
+ );
+
+
+ switch (f.type) {
+ case 'alert':
+ smoke.finishbuildAlert(e, f, box);
+ break;
+ case 'confirm':
+ smoke.finishbuildConfirm(e, f, box);
+ break;
+ case 'quiz':
+ smoke.finishbuildQuiz(e, f, box);
+ break;
+ case 'prompt':
+ smoke.finishbuildPrompt(e, f, box);
+ break;
+ case 'signal':
+ smoke.finishbuildSignal(e, f, box);
+ break;
+ default:
+ throw "Unknown type: " + f.type;
+ }
+ },
+
+ finishbuildAlert: function (e, f, box) {
+ smoke.listen(
+ document.getElementById('alert-ok-' + f.newid),
+ "click",
+ function () {
+ smoke.destroy(f.type, f.newid);
+ if (typeof f.callback !== 'undefined') {
+ f.callback();
+ }
+ }
+ );
+
+ document.onkeyup = function (e) {
+ if (!e) {
+ e = window.event;
+ }
+ if (e.keyCode === 13 || e.keyCode === 32 || e.keyCode === 27) {
+ smoke.destroy(f.type, f.newid);
+ if (typeof f.callback !== 'undefined') {
+ f.callback();
+ }
+ }
+ };
+ },
+
+ finishbuildConfirm: function (e, f, box) {
+ smoke.listen(
+ document.getElementById('confirm-cancel-' + f.newid),
+ "click",
+ function ()
+ {
+ smoke.destroy(f.type, f.newid);
+ f.callback(false);
+ }
+ );
+
+ smoke.listen(
+ document.getElementById('confirm-ok-' + f.newid),
+ "click",
+ function ()
+ {
+ smoke.destroy(f.type, f.newid);
+ f.callback(true);
+ }
+ );
+
+ document.onkeyup = function (e) {
+ if (!e) {
+ e = window.event;
+ }
+ /*if (e.keyCode === 13 || e.keyCode === 32) {
+ smoke.destroy(f.type, f.newid);
+ f.callback(true);
+ } else*/
+ if (e.keyCode === 27) {
+ smoke.destroy(f.type, f.newid);
+ f.callback(false);
+ }
+ };
+ },
+
+ finishbuildQuiz: function (e, f, box) {
+ var a, b, c;
+
+ smoke.listen(
+ document.getElementById('quiz-cancel-' + f.newid),
+ "click",
+ function ()
+ {
+ smoke.destroy(f.type, f.newid);
+ f.callback(false);
+ }
+ );
+
+
+ if (a = document.getElementById('quiz-ok1-' + f.newid))
+ smoke.listen(
+ a,
+ "click",
+ function () {
+ smoke.destroy(f.type, f.newid);
+ f.callback(a.innerHTML);
+ }
+ );
+
+
+ if (b = document.getElementById('quiz-ok2-' + f.newid))
+ smoke.listen(
+ b,
+ "click",
+ function () {
+ smoke.destroy(f.type, f.newid);
+ f.callback(b.innerHTML);
+ }
+ );
+
+
+ if (c = document.getElementById('quiz-ok3-' + f.newid))
+ smoke.listen(
+ c,
+ "click",
+ function () {
+ smoke.destroy(f.type, f.newid);
+ f.callback(c.innerHTML);
+ }
+ );
+
+ document.onkeyup = function (e) {
+ if (!e) {
+ e = window.event;
+ }
+ if (e.keyCode === 27) {
+ smoke.destroy(f.type, f.newid);
+ f.callback(false);
+ }
+ };
+
+ },
+
+ finishbuildPrompt: function (e, f, box) {
+ var pi = document.getElementById('dialog-input-' + f.newid);
+
+ setTimeout(function () {
+ pi.focus();
+ pi.select();
+ }, 100);
+
+ smoke.listen(
+ document.getElementById('prompt-cancel-' + f.newid),
+ "click",
+ function () {
+ smoke.destroy(f.type, f.newid);
+ f.callback(false);
+ }
+ );
+
+ smoke.listen(
+ document.getElementById('prompt-ok-' + f.newid),
+ "click",
+ function () {
+ smoke.destroy(f.type, f.newid);
+ f.callback(pi.value);
+ }
+ );
+
+ document.onkeyup = function (e) {
+ if (!e) {
+ e = window.event;
+ }
+
+ if (e.keyCode === 13) {
+ smoke.destroy(f.type, f.newid);
+ f.callback(pi.value);
+ } else if (e.keyCode === 27) {
+ smoke.destroy(f.type, f.newid);
+ f.callback(false);
+ }
+ };
+ },
+
+ finishbuildSignal: function (e, f, box) {
+
+
+ document.onkeyup = function (e) {
+ if (!e) {
+ e = window.event;
+ }
+ if (e.keyCode === 27) {
+ smoke.destroy(f.type, f.newid);
+ if (typeof f.callback !== 'undefined') {
+ f.callback();
+ }
+ }
+ };
+
+ smoke.smoketimeout[f.newid] = setTimeout(function () {
+ smoke.destroy(f.type, f.newid);
+ if (typeof f.callback !== 'undefined') {
+ f.callback();
+ }
+ }, f.timeout);
+ },
+
+ destroy: function (type, id) {
+
+ var box = document.getElementById('smoke-out-' + id);
+
+ if (type !== 'quiz') {
+ var okButton = document.getElementById(type + '-ok-' + id);
+ }
+
+ var cancelButton = document.getElementById(type + '-cancel-' + id);
+ box.className = 'smoke-base';
+
+ if (okButton) {
+ smoke.stoplistening(okButton, "click", function () {});
+ document.onkeyup = null;
+ }
+
+ if (type === 'quiz') {
+ var quiz_buttons = document.getElementsByClassName("quiz-button");
+ for (var i = 0; i < quiz_buttons.length; i++) {
+ smoke.stoplistening(quiz_buttons[i], "click", function () {});
+ document.onkeyup = null;
+ }
+ }
+
+ if (cancelButton) {
+ smoke.stoplistening(cancelButton, "click", function () {});
+ }
+
+ smoke.i = 0;
+ document.body.removeChild(box);
+ },
+
+ alert: function (e, f, g) {
+ if (typeof g !== 'object') {
+ g = false;
+ }
+
+ var id = smoke.newdialog();
+
+ smoke.build(e, {
+ type: 'alert',
+ callback: f,
+ params: g,
+ newid: id
+ });
+ },
+
+ signal: function (e, f, g) {
+ if (typeof g !== 'object') {
+ g = false;
+ }
+
+ var duration = 5000;
+ if (g.duration !== 'undefined') {
+ duration = g.duration;
+ }
+
+ var id = smoke.newdialog();
+ smoke.build(e, {
+ type: 'signal',
+ callback: f,
+ timeout: duration,
+ params: g,
+ newid: id
+ });
+ },
+
+ confirm: function (e, f, g) {
+ if (typeof g !== 'object') {
+ g = false;
+ }
+
+ var id = smoke.newdialog();
+ smoke.build(e, {
+ type: 'confirm',
+ callback: f,
+ params: g,
+ newid: id
+ });
+ },
+
+ quiz: function (e, f, g) {
+ if (typeof g !== 'object') {
+ g = false;
+ }
+
+ var id = smoke.newdialog();
+ smoke.build(e, {
+ type: 'quiz',
+ callback: f,
+ params: g,
+ newid: id
+ });
+ },
+
+ prompt: function (e, f, g) {
+ if (typeof g !== 'object') {
+ g = false;
+ }
+
+ var id = smoke.newdialog();
+ return smoke.build(e, {type: 'prompt', callback: f, params: g, newid: id});
+ },
+
+ listen: function (e, f, g) {
+ if (e.addEventListener) {
+ return e.addEventListener(f, g, false);
+ }
+
+ if (e.attachEvent) {
+ return e.attachEvent('on' + f, g);
+ }
+
+ return false;
+ },
+
+ stoplistening: function (e, f, g) {
+ if (e.removeEventListener) {
+ return e.removeEventListener(f, g, false);
+ }
+
+ if (e.detachEvent) {
+ return e.detachEvent('on' + f, g);
+ }
+
+ return false;
+ }
+ };
+
+
+ smoke.init = true;
+
+ if (typeof module != 'undefined' && module.exports) {
+ module.exports = smoke;
+ } else if (typeof define === 'function' && define.amd) {
+ define('smoke', [], function () {
+ return smoke;
+ });
+ } else {
+ this.smoke = smoke;
+ }
})(window, document);
diff --git a/html/popup.php b/html/popup.php
index 5bed03162..811841117 100644
--- a/html/popup.php
+++ b/html/popup.php
@@ -24,10 +24,11 @@ require_once NOALYSS_INCLUDE.'/lib/html_input.class.php';
require_once NOALYSS_INCLUDE.'/lib/icon_action.class.php';
require_once NOALYSS_INCLUDE.'/class/dossier.class.php';
require_once NOALYSS_INCLUDE.'/lib/database.class.php';
+require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
require_once NOALYSS_INCLUDE.'/class/user.class.php';
require_once NOALYSS_INCLUDE.'/class/periode.class.php';
-
+$http=new HttpInput();
/*
* Check if the user is still connected
*/
@@ -66,8 +67,13 @@ $g_user->check_dossier(Dossier::id());
if ( basename($_GET['op']) == 'history' )
{
$href=dossier::get();
+
+ $exercice=$http->get("exercice","number",0);
+
/* current year */
- $exercice=$g_user->get_exercice();
+ if ($exercice == 0 ) {
+ $exercice=$g_user->get_exercice();
+ }
/* get date limit */
$periode=new Periode($cn);
diff --git a/html/style-r692.css b/html/style-classic7.css
similarity index 97%
rename from html/style-r692.css
rename to html/style-classic7.css
index 95feecf81..6a5e501b5 100644
--- a/html/style-r692.css
+++ b/html/style-classic7.css
@@ -235,18 +235,13 @@ td.mtitle {
padding: 0px;
text-align:center;
width:250px;
- /*! height :30px; */
- border-radius:5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
+ height:42px;
+
background-color: #5681B7;
- /*! border-style: solid; */
- /*! border-width: 1px; */
border-color: darkblue;
border-top-right-radius: 0px;
border-bottom-left-radius: 0px;
- /*! padding-top: 5px; */
- /*! padding-bottom: 5px; */
+
}
@media only screen and (max-width:955px) {
td.mtitle {
@@ -258,11 +253,14 @@ td.mtitle {
td.mtitle a.mtitle {
color : white;
display:block;
- /*! width:100%; */
- /*! height: 100%; */
font-size:1rem;
- padding-top: 8px;
- padding-bottom: 8px;
+ font-family:SansationLight;
+ width:100%;
+ padding:0px;
+ margin:0px;
+ height:100%;
+ padding:4px 0px 0px 0px;
+
}
span.mtitle {
@@ -307,21 +305,16 @@ td.cell{
}
td.selectedcell{
-/* border-color:#0000FF;*/
- border-radius:5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
+ border-radius:15px;
+ -moz-border-radius: 15px;
+ -webkit-border-radius: 15px;
font-weight: bold;
-/* background:#5D90CD ;*/
color:#FFFFFF;
width:250px;
text-align:center;
- /*! height:30px; */
-
background: #b8c6df; /* Old browsers */
-
-border-top-right-radius: 0px;
-border-bottom-left-radius: 0px;
+ border-top-right-radius: 0px;
+ border-bottom-left-radius: 0px;
}
.menu2 td.mtitle ,.menu2 td.selectedcell{
border-radius: 0px;
@@ -349,6 +342,7 @@ a.mtitle:hover {
background-color:#EFEBEB;
color: blue;
+ /*! padding: 100px; */
}
td.selectedcell a.mtitle,div.content td.selectedcell a.mtitle {
text-decoration:none;
@@ -1248,17 +1242,20 @@ div.menu2 a.mtitle{
font-size:1rem;
font-weight: normal;
color: darkblue;
- padding-top: 4px;
- padding-bottom: 4px;
- padding-left: 10px;
- padding-right: 10px;
+ padding:5px;
+ margin:0px;
color: whitesmoke;
+ border-radius: 5px;
}
div.menu2 a.mtitle:hover,div.menu a.mtitle:hover,td.mtitle a.mtitle:hover {
color:#5681B7;
background-color: #EFEBEB;
+ /* padding:18px 0px 18px 0px; */
}
+div.menu2 a.mtitle:hover {
+ border-radius: 0px 0px;
+}
div.menu3 {
font-size:13.6px;
font-size:0.80rem;
@@ -2184,14 +2181,16 @@ div.select_box a:hover,div.select_box ul li:hover {
* Menu second level
*/
div.menu2 td.mtitle, div.menu2 td.mtitle a{
- background-color: white;
- color:darkblue;
+
border-style: solid;
border-width: 0.1px;
- border-color:lightgrey;
+ border-color:white;
+ height:25px;
+ border-radius: 0px 0px 0px 10px;
}
div.menu2 td.mtitle a{
border-width:0px;
+ padding:5px;
}
/**
* For the icon (font-famillo fontello)
@@ -2227,4 +2226,30 @@ div.bxbutton .icon:hover
{
background-color: white;
color: blue;
-}
\ No newline at end of file
+}
+/**
+ * progressBar
+ */
+div.progressbar {
+ width:300px;
+ height:30px;
+ position:fixed;
+ top:5px;
+ left:40%;
+ background-color: white;
+ color:blue;
+ z-index:800;
+ border-color: #596a72;
+ border-width: 1px;
+ border-style: solid;
+}
+#progressValue {
+ display:block;
+ width: 0px;
+ height: 100%;
+ margin:0px;
+ padding: 0px;
+ background-color:darkblue;
+ color:antiquewhite;
+ font-weight: bolder;
+}
diff --git a/html/style-light.css b/html/style-light.css
index 8875abe15..7e291e8bb 100644
--- a/html/style-light.css
+++ b/html/style-light.css
@@ -2200,4 +2200,30 @@ div.bxbutton .icon:hover
{
background-color: white;
color: blue;
+}
+/**
+ * progressBar
+ */
+div.progressbar {
+ width:300px;
+ height:30px;
+ position:fixed;
+ top:5px;
+ left:40%;
+ background-color: white;
+ color:blue;
+ z-index:800;
+ border-color: #596a72;
+ border-width: 1px;
+ border-style: solid;
+}
+#progressValue {
+ display:block;
+ width: 0px;
+ height: 100%;
+ margin:0px;
+ padding: 0px;
+ background-color:darkblue;
+ color:antiquewhite;
+ font-weight: bolder;
}
\ No newline at end of file
diff --git a/html/test.php b/html/test.php
index d5a467e75..e45ddc264 100644
--- a/html/test.php
+++ b/html/test.php
@@ -23,7 +23,7 @@
* It is only a quick and dirty testing. You should use a tool as PHPUNIT for the unit testing
*
* - first do not forget to create the authorized_debug file in the html folder
- * - secund the test must adapted to this page : if you do a post (or get) from a test, you won't get any result
+ * - secund the test must be adapted to this page : if you do a post (or get) from a test, you won't get any result
* if the $_REQUEST[test_select] is not set, so set it .
*/
diff --git a/include/ajax/ajax_history.php b/include/ajax/ajax_history.php
index 128fc6da7..f3fb23bc7 100644
--- a/include/ajax/ajax_history.php
+++ b/include/ajax/ajax_history.php
@@ -53,8 +53,10 @@ if ( isset($_GET['f_id']))
$f_id=$http->get('f_id',"number");
$fiche=new Fiche($cn,$f_id);
- $year=$http->get("exercice","string",$g_user->get_exercice());
- if ( $year == 0 )
+ $year=$http->get("exercice","string","");
+ if ( $year == "") $year=$g_user->get_exercice();
+
+ if ( $year == "" )
{
$html=_("erreur aucune période par défaut, allez dans préférence pour en choisir une");
}
@@ -137,7 +139,8 @@ if ( isset($_REQUEST['pcm_val']))
{
$poste=new Acc_Account_Ledger($cn,$_REQUEST['pcm_val']);
$poste->load();
- $year=$http->get("exercice","string",$g_user->get_exercice());
+ $year=$http->get("exercice","string","");
+ if ( $year == "") $year=$g_user->get_exercice();
if ( $year == 0 )
{
$html=_("erreur aucune période par défaut, allez dans préférence pour en choisir une");
diff --git a/include/ajax/ajax_history_anc_account.php b/include/ajax/ajax_history_anc_account.php
new file mode 100644
index 000000000..73036ae8a
--- /dev/null
+++ b/include/ajax/ajax_history_anc_account.php
@@ -0,0 +1,69 @@
+
+
+if (!defined('ALLOWED')) die('Appel direct ne sont pas permis');
+
+/**
+ * @file
+ * @brief Display the history of an analytic account.
+ * Receives the parameters GET:
+ - gDossier integer
+ - act history_anc_account
+ - po_id integer poste_analytic.po_id
+ - div DOM ID of the box
+ - op history
+ - exercice integer
+ */
+require_once NOALYSS_INCLUDE."/class/anc_grandlivre.class.php";
+
+try {
+ $po_id=$http->get("po_id","number");
+ $exercice=$http->get("exercice","number");
+ $div=$http->get("div");
+} catch (Exception $ex) {
+ echo $ex->getTraceAsString();
+ throw $ex;
+}
+$poste_analytic=new Poste_analytique_SQL($cn, $po_id);
+
+$anc_grandlivre=new Anc_GrandLivre($cn);
+
+$anc_grandlivre->from_poste=$poste_analytic->po_name;
+$anc_grandlivre->to_poste=$poste_analytic->po_name;
+
+// Find the first and last periode
+$periode=new Periode($cn);
+$a_periode_limit=$periode->limit_year($exercice);
+
+// Find the first day
+$first_day=$periode->first_day($a_periode_limit['start']);
+
+// find the last day
+$last_day=$periode->last_day($a_periode_limit['end']);
+
+$anc_grandlivre->from=$first_day;
+$anc_grandlivre->to=$last_day;
+
+echo HtmlInput::title_box($poste_analytic->getp("po_name"), $div, "close", "", "n");
+
+echo $anc_grandlivre->display_html(0);
+$anc_grandlivre->pa_id=$poste_analytic->pa_id;
+echo $anc_grandlivre->show_button();
\ No newline at end of file
diff --git a/include/ajax/ajax_preference.php b/include/ajax/ajax_preference.php
index 1b92a860f..07f62bf5e 100644
--- a/include/ajax/ajax_preference.php
+++ b/include/ajax/ajax_preference.php
@@ -27,6 +27,7 @@ require_once NOALYSS_INCLUDE.'/lib/iselect.class.php';
require_once NOALYSS_INCLUDE.'/lib/iperiod.class.php';
require_once NOALYSS_INCLUDE.'/class/acc_report.class.php';
require_once NOALYSS_INCLUDE.'/class/periode.class.php';
+require_once NOALYSS_INCLUDE.'/class/exercice.class.php';
echo HtmlInput::title_box(_('Préférence'), 'preference_div');
echo '';
echo '
';
@@ -105,21 +106,37 @@ if (isset($_REQUEST['gDossier']) && $_REQUEST['gDossier']<>0)
$period->p_id = $l_user_per;
$period->jrn_def_id = 0;
+ $selected_exercice=$period->get_exercice();
+ $js=sprintf('onchange="updatePeriodePreference(%d);"',Dossier::id());
+ $exercice=new Exercice($cn);
+
if ($period->is_closed($l_user_per) == 1)
{
$msg = _('Attention cette période est fermée, vous ne pourrez rien modifier dans le module comptable');
$msg = '
' . $msg . ' ';
}
-
- $period = new IPeriod("period");
- $period->user = $g_user;
- $period->cn = $cn;
- $period->filter_year = false;
- $period->value = $l_user_per;
- $period->type = ALL;
- $l_form_per = $period->input();
+
+ $iperiod = new IPeriod("period");
+ $iperiod->id="setting_period";
+ $iperiod->user = $g_user;
+ $iperiod->cn = $cn;
+ $iperiod->filter_year = true;
+ $iperiod->exercice=$selected_exercice;
+ $iperiod->value = $l_user_per;
+ $iperiod->type = ALL;
+ $l_form_per = $iperiod->input();
?>
-
+
+
+ =_("Exercice")?>
+
+
+ =$exercice->select("exercice_setting",$selected_exercice,$js)->input();?>
+
+
+
+
+
diff --git a/include/ajax/ajax_tva_parameter.php b/include/ajax/ajax_tva_parameter.php
new file mode 100644
index 000000000..9dffd57c2
--- /dev/null
+++ b/include/ajax/ajax_tva_parameter.php
@@ -0,0 +1,78 @@
+
+
+if (!defined('ALLOWED'))
+ die('Appel direct ne sont pas permis');
+
+/**
+ * @file
+ * @brief
+ * @param type $name Descriptionara
+ */
+require_once NOALYSS_INCLUDE."/class/tva_rate_mtable.class.php";
+
+if ( $g_user->check_module('CFGTVA') ==0 )
+{
+ return;
+}
+try
+{
+ $table=$http->request('table');
+ $action=$http->request('action');
+ $p_id=$http->request('p_id', "number");
+ $ctl_id=$http->request('ctl');
+}
+catch (Exception $e)
+{
+ record_log($e->getTraceAsString());
+ return;
+}
+
+$tva_rate=new V_Tva_Rate_SQL($cn);
+$p_id=$http->request('p_id', "number");
+$tva_rate->set_pk_value($p_id);
+$tva_rate->load();
+$manage_table=new Tva_Rate_MTable($tva_rate);
+$manage_table->set_callback("ajax_misc.php");
+$manage_table->add_json_param("op", "tva_parameter");
+
+if ($action=="input")
+{
+
+ $manage_table->set_object_name($ctl_id);
+ header('Content-type: text/xml; charset=UTF-8');
+ echo $manage_table->ajax_input()->saveXML();
+ return;
+}
+elseif ($action=="save")
+{
+ $manage_table->set_object_name($ctl_id);
+ header('Content-type: text/xml; charset=UTF-8');
+ echo $manage_table->ajax_save()->saveXML();
+ return;
+}
+elseif ($action=="delete")
+{
+ $manage_table->set_object_name($ctl_id);
+ header('Content-type: text/xml; charset=UTF-8');
+ echo $manage_table->ajax_delete()->saveXML();
+}
+return;
diff --git a/include/anc_great_ledger.inc.php b/include/anc_great_ledger.inc.php
index 0ecb747af..3cf291be7 100644
--- a/include/anc_great_ledger.inc.php
+++ b/include/anc_great_ledger.inc.php
@@ -34,10 +34,13 @@ if ($result != null)
echo '';
echo _('Tout sélectionner')." ".ICheckBox::toggle_checkbox('export_pdf_bt1','export_anc_receipt_pdf');
echo ' ';
+ $task_id=uniqid();
echo $grandLivre->show_button();
- printf ('