Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="modal fade" id="modal-agregar-perfil-documento-id" role="dialog">
- <div class="modal-dialog">
- <!-- Modal content-->
- <div class="modal-content">
- <div class="modal-header">
- </div>
- <div class="modal-body">
- <label for="add-perfil-documento-modulo-id">Modal</label>
- <input class="form-control select-perfil-documento" type="text" id="add-perfil-documento-modulo-id"
- </div>
- <div class="modal-footer">
- </div>
- </div>
- </div>
- </div>
- <script>
- $('.select-perfil-documento').select2(
- {
- placeholder: 'Buscar...',
- formatSearching: "Buscando...",
- formatLoadMore: 'Cargando más...',
- searching: "Buscando...",
- formatNoMatches: "No hay resultados.",
- //Does the user have to enter any data before sending the ajax request
- minimumInputLength: 0,
- allowClear: true,
- ajax: {
- //How long the user has to pause their typing before sending the next request
- quietMillis: 150,
- //The url of the json service
- url: '@Url.Action("GetModulos")',
- dataType: 'json',
- //Our search term and what page we are on
- data: function (term, page) {
- return {
- pageSize: pageSize,
- pageNum: page,
- searchTerm: term
- };
- },
- results: function (data, page) {
- //debugger
- //Used to determine whether or not there are more results available,
- //and if requests for more data should be sent in the infinite scrolling
- var more = (page * pageSize) <= data.Total;
- return { results: data.Results, more: more };
- }
- }
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement