Plugins  LAST
 All Data Structures Files Functions Variables Pages
Functions
js_scripts.js File Reference

Go to the source code of this file.

Functions

function show_declaration (p_type, p_id)
 
function success_show_declaration (answer)
 
function error_show_declaration ()
 
function record_writing (plugin, dossier, p_id)
 
function remove_form (plugin, dossier, p_id, type)
 
function success_record_writing (req)
 
function save_write (obj)
 
function success_save_write (req)
 
function show_addparam (pcode, plugin_code, dossier, tab)
 
function success_showaddparam (req)
 
function tva_show_param (p_div)
 

Function Documentation

function error_show_declaration ( )

Definition at line 32 of file js_scripts.js.

Referenced by show_declaration().

32  {
33  alert_box('error_show_declaration : ajax not supported');
34 }
function record_writing (   plugin,
  dossier,
  p_id 
)

Definition at line 35 of file js_scripts.js.

References p_id, style, and success_record_writing().

35  {
36  // call ajax to fill with form
37  query='gDossier='+dossier+'&plugin_code='+plugin+'&act=rw&p_id='+p_id;
38 
39  // add a section
40  show_box({id:'record_write',html:loading(),cssclass:'inner_box',style:'position:absolute;top:0;left:0%;margin-top:10%;height:80%;margin-left:10%;width:80%;',js_error:null,js_success:success_record_writing,qs:query,fixed:1,callback:'ajax.php'});
41 }
$note style
function success_record_writing(req)
Definition: js_scripts.js:50
$oPeriode p_id
function remove_form (   plugin,
  dossier,
  p_id,
  type 
)

Definition at line 42 of file js_scripts.js.

References p_id, and style.

42  {
43  // call ajax to fill with form
44  query='gDossier='+dossier+'&plugin_code='+plugin+'&act=rm_form&p_id='+p_id+"&type="+type;
45 
46  // add a section
47  show_box({id:'remove_form',html:loading(),cssclass:'inner_box',style:'position:absolute;top:0;left:20%;margin-top:10%;',js_error:null,js_success:success_box,qs:query,callback:'ajax.php'});
48 }
$note style
$oPeriode p_id
function save_write (   obj)

Definition at line 69 of file js_scripts.js.

References success_save_write().

69  {
70  var query="act=sw&"+$(obj).serialize();
71  var action=new Ajax.Request ( 'ajax.php',
72  {
73  method:'get',
74  parameters:query,
75  onFailure:null,
76  onSuccess:success_save_write
77  });
78  return false;
79 }
function success_save_write(req)
Definition: js_scripts.js:80
function show_addparam (   pcode,
  plugin_code,
  dossier,
  tab 
)

Definition at line 100 of file js_scripts.js.

References success_showaddparam().

101 {
102  try {
103  waiting_box();
104  var action=new Ajax.Request ( 'ajax.php',
105  {
106  method:'get',
107  parameters:"act=add_param&pcode="+pcode+"&gDossier="+dossier+"&plugin_code="+plugin_code+'&tab='+tab,
108  onFailure:null,
109  onSuccess:success_showaddparam
110  });
111  }catch (e){
112  alert_box(e.message);
113  }
114 }
function success_showaddparam(req)
Definition: js_scripts.js:116
function show_declaration (   p_type,
  p_id 
)

Definition at line 2 of file js_scripts.js.

References error_show_declaration(), p_id, show(), success_show_declaration(), and value.

2  {
3  try {
4  $('detail').innerHTML='<image src="image/loading.gif" border="0" alt="Chargement...">';
5  $('detail').show();
6  $('main').hide();
7  var gDossier=$('gDossier').value;var code=$('plugin_code').value;
8  var queryString='act=dsp_decl&gDossier='+gDossier+'&plugin_code='+code;
9  queryString+='&type='+p_type+'&id='+p_id;
10  var action=new Ajax.Request ( 'ajax.php',
11  {
12  method:'get',
13  parameters:queryString,
14  onFailure:error_show_declaration,
15  onSuccess:success_show_declaration
16  }
17  );
18  } catch(e) {alert_box('show_declaration '+e.message);}
19 }
$p_year value
show($p_code, $p_desc)
function error_show_declaration()
Definition: js_scripts.js:32
$oPeriode p_id
function success_show_declaration(answer)
Definition: js_scripts.js:20
function success_record_writing (   req)

Definition at line 50 of file js_scripts.js.

Referenced by record_writing().

50  {
51  try{
52  var answer=req.responseXML;
53  var a=answer.getElementsByTagName('ctl');
54  var html=answer.getElementsByTagName('code');
55  if ( a.length == 0 ) {var rec=req.responseText;alert_box ('erreur :'+rec);}
56  var name_ctl=a[0].firstChild.nodeValue;
57  var code_html=getNodeText(html[0]);
58 
59  code_html=unescape_xml(code_html);
60  g(name_ctl).innerHTML=code_html;
61  }
62  catch (e) {
63  alert_box("success_box"+e.message);}
64  try{
65  code_html.evalScripts();}
66  catch(e){
67  alert_box("answer_box Impossible executer script de la reponse\n"+e.message);}
68 }
function success_save_write (   req)

Definition at line 80 of file js_scripts.js.

Referenced by save_write().

80  {
81 
82  try{
83  var answer=req.responseXML;
84  var a=answer.getElementsByTagName('ctl');
85  var html=answer.getElementsByTagName('code');
86  if ( a.length == 0 ) {var rec=req.responseText;alert_box ('erreur :'+rec);}
87  var name_ctl=a[0].firstChild.nodeValue;
88  var code_html=getNodeText(html[0]);
89 
90  code_html=unescape_xml(code_html);
91  g(name_ctl).innerHTML=code_html;
92  }
93  catch (e) {
94  alert_box("success_box"+e.message);}
95  try{
96  code_html.evalScripts();}
97  catch(e){
98  alert_box("answer_box Impossible executer script de la reponse\n"+e.message);}
99 }
function success_show_declaration (   answer)

Definition at line 20 of file js_scripts.js.

Referenced by show_declaration().

20  {
21  try {
22  var xml=answer.responseXML;
23  var html=xml.getElementsByTagName('code');
24  if ( html.length == 0 ) {var rec=answer.responseText;alert_box ('erreur :'+rec);}
25  var code_html=getNodeText(html[0]);
26  code_html=unescape_xml(code_html);
27  $('detail').innerHTML=code_html;
28  code_html.evalScripts();
29 
30  } catch(e) {alert_box('success_show_declaration '+e.message);}
31 }
function success_showaddparam (   req)

Definition at line 116 of file js_scripts.js.

Referenced by show_addparam().

116  {
117  try{
118  remove_waiting_box();
119  var sx=0;
120  if ( window.scrollY)
121  {
122  sx=window.scrollY+120;
123  }
124  else
125  {
126  sx=document.body.scrollTop+120;
127  }
128 
129  var div_style="top:"+sx+"px;";
130  removeDiv("paramadd_id");
131  add_div({
132  "id":'paramadd_id',
133  "drag":"1",
134  "cssclass":"inner_box",
135  "style":div_style
136  });
137  var answer=req.responseXML;
138  var html=answer.getElementsByTagName('code');
139  var code_html=getNodeText(html[0]);
140  code_html=unescape_xml(code_html);
141  g("paramadd_id").innerHTML=code_html;
142  }
143  catch (e) {
144  alert_box("success_box "+e.message);
145  }
146  try{
147  code_html.evalScripts();
148  }
149  catch(e){
150  alert_box("answer_box Impossible executer script de la reponse\n"+e.message);
151  }
152 }
function tva_show_param (   p_div)

Definition at line 154 of file js_scripts.js.

References show(), and value.

155 {
156  try{
157  var div=['opin','opout','tvadue','tvaded','divers','lintra','assujetti'];
158  for (var r =0;r<div.length;r++ ) {$(div[r]).hide(); }
159  $(p_div).show();
160  $('tab').value=p_div;
161  } catch(e)
162  {
163  alert_box(e.message)
164  }
165 }
$p_year value
show($p_code, $p_desc)