Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enviar_a_box: function(url, bloque_cod){
- esperar.cubrir('body');
- parametros = [{
- name: 'bloque_cod', value: bloque_cod,
- name: 'enviar_a_box', value: true
- }];
- values = $('#blo_select_peds').val();
- box_cod = $( "li.ui-selected").text();
- if (box_cod === "") {
- notificaciones.noti_popu_faster('ERROR',
- 'DEBE SELECCIONAR AL MENOS UN BOX',
- 'danger');
- return
- }
- if (!values) {
- notificaciones.noti_popu_faster('ERROR',
- 'DEBE SELECCIONAR AL MENOS UN PEDIDO',
- 'danger');
- return
- }
- parametros.push({name: 'box_cod', value: box_cod})
- $.each(values, function(i, val){
- parametros.push({ name: 'pedidos_numeros', value: val })
- });
- $.get(url, parametros, function(response){
- notificaciones.noti_popu_faster('EXITOS',
- 'PEDIDOS MARCADOS PARA EL BOX ' + response.box_cod,
- 'info');
- $( "li.ui-selected").css('color', 'red');
- options = [];
- select = $('#blo_select_peds');
- $(select).find('option').each(function() {
- options.push({value: $(this).val(), text: $(this).text()});
- });
- $(select).data('options', options);
- esperar.descubrir();
- }, 'json' );
- }
Advertisement
Add Comment
Please, Sign In to add comment