Advertisement
Guest User

Untitled

a guest
Aug 27th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. ajax: {
  2. url: "GET_JSONDATA.php",
  3. dataType: 'json',
  4. type: 'POST',
  5. delay: 600,
  6. data: function (params) {
  7. return {
  8. q: params.term, // search term
  9. page: params.page,
  10. _FORN:1,
  11. };
  12. },
  13. processResults: function (data, params) {
  14. params.page = params.page || 1;
  15. currentRequestFamilias=null;
  16.  
  17. return {
  18.  
  19. results: data.items,
  20. pagination: {
  21. more: (params.page * 30) < data.total_count
  22. }
  23. };
  24. },
  25. cache: true,
  26. beforeSend : function()
  27. {
  28. if(currentRequestFamilias != null)
  29. {
  30. currentRequestFamilias.abort();
  31. }
  32. if(!FornecedorEscolhido())
  33. {
  34. return false;
  35. }
  36.  
  37. },
  38.  
  39. }
  40. ,
  41. initSelection : function (element, callback) {
  42. LoadInicialValues();
  43. if(FamiliasIniciais_==null)
  44. return;
  45. callback(FamiliasIniciais_);
  46. },
  47. escapeMarkup: function (markup) { return markup; },
  48. minimumInputLength: 1,
  49. templateResult: formatoItemSelecionado, //id
  50.  
  51. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement