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

Go to the source code of this file.

Functions

function add_material (dossier_id, plugin_code, target)
 javascript More...
 
function display_material (dossier_id, f_id, plugin_code, target)
 
function success_add_material (req)
 
function error_ajax ()
 
function save_new_material (obj)
 Answer to a post (or get) in ajax. More...
 
function success_save_new_material (req)
 
function save_modify (obj)
 
function remove_mat (g_dossier, plugin_code, a_id)
 

Function Documentation

function add_material (   dossier_id,
  plugin_code,
  target 
)

javascript

Definition at line 6 of file skel_javascript.js.

References error_ajax(), style, and success_add_material().

7 {
8  var qs="?gDossier="+dossier_id+'&plugin_code='+plugin_code+'&op=add_mat&t='+target;
9 
10  var action=new Ajax.Request ( 'ajax.php',
11  {
12  method:'get',
13  parameters:qs,
14  onFailure:error_ajax,
15  onSuccess:success_add_material
16  }
17  );
18  if ( $(target))
19  {
20  removeDiv(target);
21  }
22 
23  var sx=0;
24  if ( window.scrollY)
25  {
26  sx=window.scrollY+120;
27  }
28  else
29  {
30  sx=document.body.scrollTop+120;
31  }
32  var str_style="top:"+sx+";width:50%;height:70%";
33 
34  var div={id:target, cssclass:'inner_box',style:str_style,html:loading()};
35 
36  add_div(div);
37 
38 }
$note style
function error_ajax()
function success_add_material(req)
function display_material (   dossier_id,
  f_id,
  plugin_code,
  target 
)

Definition at line 39 of file skel_javascript.js.

References error_ajax(), style, and success_add_material().

40 {
41  var qs="?gDossier="+dossier_id+'&plugin_code='+plugin_code+'&op=display_modify&t='+target+'&f='+f_id;
42 
43  var action=new Ajax.Request ( 'ajax.php',
44  {
45  method:'get',
46  parameters:qs,
47  onFailure:error_ajax,
48  onSuccess:success_add_material
49  }
50  );
51  if ( $(target))
52  {
53  removeDiv(target);
54  }
55 
56  var sx=0;
57  if ( window.scrollY)
58  {
59  sx=window.scrollY+120;
60  }
61  else
62  {
63  sx=document.body.scrollTop+120;
64  }
65  var str_style="top:"+sx+";width:50%;height:auto";
66 
67  var div={id:target, cssclass:'inner_box',style:str_style,html:loading()};
68 
69  add_div(div);
70 
71 }
$note style
function error_ajax()
function success_add_material(req)
function error_ajax ( )

Definition at line 77 of file skel_javascript.js.

Referenced by add_material(), display_material(), remove_mat(), and save_new_material().

77  {
78  alert_box('Erreur ajax AMORTIS');
79 }
function remove_mat (   g_dossier,
  plugin_code,
  a_id 
)

Definition at line 124 of file skel_javascript.js.

References a_id, error_ajax(), and success_add_material().

125 {
126  if ( ! confirm('Vous confirmez EFFACEMENT')) { return false;}
127  var qs="?gDossier="+g_dossier+"&plugin_code="+plugin_code+"&a_id="+a_id+"&op=rm&t=bxmat";
128  var action=new Ajax.Request ( 'ajax.php',
129  {
130  method:'get',
131  parameters:qs,
132  onFailure:error_ajax,
133  onSuccess:success_add_material
134  }
135  );
136 
137 
138 
139 }
function error_ajax()
function success_add_material(req)
if($p_number->value==0) l les annuités seront recalculées et l pct[] ad_year[] select h_amount from amortissement amortissement_histo where a_id
function save_modify (   obj)

Definition at line 107 of file skel_javascript.js.

108 {
109  var querystring="?"+$(obj).serialize()+'&op=save_modify&t=bxmat';
110  waiting_box();
111  // Create a ajax request to get all the person
112  var action = new Ajax.Updater($('source_id'),'ajax.php',
113  {
114  method: 'post',
115  parameters: querystring,
116  }
117  );
118 
119  remove_waiting_box();
120  return false;
121 
122 }
function save_new_material (   obj)

Answer to a post (or get) in ajax.

Definition at line 84 of file skel_javascript.js.

References error_ajax(), and success_save_new_material().

85 {
86 
87  var querystring="?"+$(obj).serialize()+'&op=save_new_material&t=bxmat';
88 
89  // Create a ajax request to get all the person
90  var action = new Ajax.Request ('ajax.php',
91  {
92  method: 'post',
93  parameters: querystring,
94  onFailure: error_ajax,
95  onSuccess: success_save_new_material
96  }
97  );
98 
99  return false;
100 }
function error_ajax()
function success_save_new_material(req)
function success_add_material (   req)

Definition at line 72 of file skel_javascript.js.

Referenced by add_material(), display_material(), and remove_mat().

73 {
74  fill_box(req);
75 
76 }
function success_save_new_material (   req)

Definition at line 102 of file skel_javascript.js.

References style.

Referenced by save_new_material().

103 {
104  fill_box(req);
105  $('bxmat').style.height='auto';
106 }
$note style