main.js 723 B

1234567891011121314151617181920212223
  1. // SAVE
  2. function activedirectory_activedirectory_save_link(){
  3. var data = $.getForm('#ad-correspondance');
  4. data.id = $('#ad-correspondance').attr('data-id');
  5. $.action(data,function(r){
  6. $.message('success','Enregistré');
  7. $('#ad-correspondance input').val('');
  8. $('#ad-correspondance').attr('data-id','');
  9. $('#active-directory-form-settings').load(document.URL + ' #active-directory-form-settings');
  10. });
  11. }
  12. // EDIT
  13. function activedirectory_activedirectory_edit_link(element){
  14. var line = $(element).closest('tr');
  15. $.action({
  16. action:'activedirectory_activedirectory_edit_link',
  17. id:line.attr('data-id')
  18. },function(r){
  19. $.setForm('#ad-correspondance',r);
  20. $('#ad-correspondance').attr('data-id',r.id);
  21. });
  22. }