mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-24 08:20:54 -04:00
Filters in items module working and on one line (#293)
This commit is contained in:
@@ -54,7 +54,8 @@ class Items extends Secure_area implements iData_controller
|
||||
'is_deleted' => FALSE);
|
||||
|
||||
// check if any filter is set in the multiselect dropdown
|
||||
$filters = array_merge($filters, $this->input->get('filters'));
|
||||
$filledup = array_fill_keys($this->input->get('filters'), true);
|
||||
$filters = array_merge($filters, $filledup);
|
||||
|
||||
$items = $this->Item->search($search, $filters, $offset, $limit);
|
||||
$total_rows = $this->Item->get_found_rows($search, $filters);
|
||||
|
||||
@@ -38,7 +38,7 @@ $(document).ready(function()
|
||||
return $.extend(arguments[0], {
|
||||
start_date: start_date,
|
||||
end_date: end_date,
|
||||
filters: $("#filters").val() || []
|
||||
filters: $("#filters").val() || [""]
|
||||
});
|
||||
});
|
||||
table_support.init_delete('<?php echo $this->lang->line($controller_name."_confirm_delete")?>');
|
||||
@@ -94,19 +94,22 @@ function post_bulk_form_submit(response)
|
||||
<button id="generate_barcodes" class="btn btn-default btn-sm" data-href='<?php echo site_url($controller_name."/generate_barcodes"); ?>' title='<?php echo $this->lang->line('items_generate_barcodes');?>'>
|
||||
<span class="glyphicon glyphicon-barcode"></span>
|
||||
<?php echo $this->lang->line("items_generate_barcodes");?></button>
|
||||
</div>
|
||||
<div class="pull-right btn-toolbar">
|
||||
<div>
|
||||
<div class="col-xs-4">
|
||||
<?php echo form_input(array('name'=>'daterangepicker', 'class'=>'form-control input-sm', 'id'=>'daterangepicker')); ?>
|
||||
</div>
|
||||
|
||||
<?php echo form_multiselect('filters[]', $filters, '', array('id'=>'filters', 'class'=>'selectpicker show-menu-arrow', 'data-selected-text-format'=>'count > 1', 'data-style'=>'btn-default btn-sm', 'data-width'=>'fit')); ?>
|
||||
<?php
|
||||
if (count($stock_locations) > 1)
|
||||
{
|
||||
echo form_dropdown('stock_location', $stock_locations, $stock_location, array('id'=>'stock_location', 'class'=>'selectpicker show-menu-arrow', 'data-style'=>'btn-default btn-sm', 'data-width'=>'fit'));
|
||||
}
|
||||
?>
|
||||
<div class="col-xs-2" style="vertical-align: none;">
|
||||
<?php echo form_multiselect('filters[]', $filters, '', array('id'=>'filters', 'class'=>'selectpicker show-menu-arrow', 'data-selected-text-format'=>'count > 1', 'data-style'=>'btn-default btn-sm', 'data-width'=>'fit')); ?>
|
||||
</div>
|
||||
<?php
|
||||
if (count($stock_locations) > 1)
|
||||
{
|
||||
?>
|
||||
<div class="col-xs-2">
|
||||
<?php echo form_dropdown('stock_location', $stock_locations, $stock_location, array('id'=>'stock_location', 'class'=>'selectpicker show-menu-arrow', 'data-style'=>'btn-default btn-sm', 'data-width'=>'fit')); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -142,6 +142,11 @@ a.rollover img
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#filters.btn-group
|
||||
{
|
||||
vertical-align: none;
|
||||
}
|
||||
|
||||
button.btn.dropdown-toggle.btn-sm
|
||||
{
|
||||
background-color: white;
|
||||
|
||||
Reference in New Issue
Block a user