Advertisement
Guest User

Untitled

a guest
Apr 25th, 2017
527
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1. <div class="modal fade" id="modal-agregar-perfil-documento-id" role="dialog">
  2. <div class="modal-dialog">
  3. <!-- Modal content-->
  4. <div class="modal-content">
  5. <div class="modal-header">
  6.  
  7. </div>
  8. <div class="modal-body">
  9.  
  10. <label for="add-perfil-documento-modulo-id">Modal</label>
  11. <input class="form-control select-perfil-documento" type="text" id="add-perfil-documento-modulo-id"
  12.  
  13.  
  14. </div>
  15. <div class="modal-footer">
  16.  
  17. </div>
  18.  
  19. </div>
  20.  
  21. </div>
  22.  
  23. </div>
  24.  
  25. <script>
  26.  
  27. $('.select-perfil-documento').select2(
  28. {
  29. placeholder: 'Buscar...',
  30. formatSearching: "Buscando...",
  31. formatLoadMore: 'Cargando más...',
  32. searching: "Buscando...",
  33. formatNoMatches: "No hay resultados.",
  34. //Does the user have to enter any data before sending the ajax request
  35. minimumInputLength: 0,
  36. allowClear: true,
  37. ajax: {
  38. //How long the user has to pause their typing before sending the next request
  39. quietMillis: 150,
  40. //The url of the json service
  41. url: '@Url.Action("GetModulos")',
  42. dataType: 'json',
  43. //Our search term and what page we are on
  44. data: function (term, page) {
  45. return {
  46. pageSize: pageSize,
  47. pageNum: page,
  48. searchTerm: term
  49. };
  50. },
  51. results: function (data, page) {
  52. //debugger
  53. //Used to determine whether or not there are more results available,
  54. //and if requests for more data should be sent in the infinite scrolling
  55. var more = (page * pageSize) <= data.Total;
  56. return { results: data.Results, more: more };
  57. }
  58. }
  59. });
  60.  
  61.  
  62. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement