main.js 651 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. {"label":"JS","syntax":"js"}
  2. jQuery(document).ready(function($) {
  3. });
  4. /* {{ENTITY}} **/
  5. // Search
  6. function {{plugin}}_{{entity}}_search() {
  7. var data = {
  8. custom_action: '{{plugin}}_{{entity}}_search',
  9. };
  10. $.ajax({
  11. url : document.URL,
  12. method : 'POST',
  13. data: data,
  14. success : function(r){
  15. },
  16. error: function(xhr, status, error) {
  17. }
  18. });
  19. }
  20. // Save
  21. function {{plugin}}_{{entity}}_save(){
  22. var data = {};
  23. data.custom_action = '{{plugin}}_{{entity}}_save';
  24. $.ajax({
  25. url : document.URL,
  26. method : 'POST',
  27. data: data,
  28. success : function(r){
  29. },
  30. error : function(xhr, status, error) {
  31. }
  32. });
  33. }