mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-07-13 00:12:43 -04:00
Apply is_deleted in item suggestion search
This commit is contained in:
@@ -88,7 +88,7 @@ class Items extends Secure_area implements iData_controller
|
||||
*/
|
||||
function suggest()
|
||||
{
|
||||
$suggestions = $this->Item->get_search_suggestions($this->input->post('q'), $this->input->post('limit')/*, $this->input->post('is_deleted')*/); // TODO: is_deleted doesn't seem to be effective...
|
||||
$suggestions = $this->Item->get_search_suggestions($this->input->post('q'), $this->input->post('limit'), $this->input->post('is_deleted'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,11 @@ $(document).ready(function()
|
||||
enable_select_all();
|
||||
enable_checkboxes();
|
||||
enable_row_selection();
|
||||
enable_search('<?php echo site_url("$controller_name/suggest")?>','<?php echo $this->lang->line("common_confirm_search")?>');
|
||||
enable_search('<?php echo site_url("$controller_name/suggest")?>','<?php echo $this->lang->line("common_confirm_search")?>', undefined, {
|
||||
'is_deleted' : function () {
|
||||
return $("#is_deleted").is(":checked") ? 1 : 0;
|
||||
}
|
||||
});
|
||||
enable_delete('<?php echo $this->lang->line($controller_name."_confirm_delete")?>','<?php echo $this->lang->line($controller_name."_none_selected")?>');
|
||||
enable_bulk_edit('<?php echo $this->lang->line($controller_name."_none_selected")?>');
|
||||
|
||||
|
||||
4
dist/opensourcepos.js
vendored
4
dist/opensourcepos.js
vendored
@@ -14564,7 +14564,7 @@ Date.fullYearStart = '20';
|
||||
}
|
||||
}
|
||||
|
||||
function enable_search(suggest_url,confirm_search_message,format_item)
|
||||
function enable_search(suggest_url,confirm_search_message,format_item,extra_params)
|
||||
{
|
||||
if (!format_item) {
|
||||
format_item = function(results) {
|
||||
@@ -14580,7 +14580,7 @@ function enable_search(suggest_url,confirm_search_message,format_item)
|
||||
$(this).attr('value','');
|
||||
});
|
||||
|
||||
$("#search").autocomplete(suggest_url,{max:100,delay:10, selectFirst: false, formatItem : format_item});
|
||||
$("#search").autocomplete(suggest_url,{max:100,delay:10, selectFirst: false, formatItem : format_item, extraParams: extra_params});
|
||||
$("#search").result(function(event, data, formatted)
|
||||
{
|
||||
do_search(true);
|
||||
|
||||
4
dist/opensourcepos.min.js
vendored
4
dist/opensourcepos.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -12,7 +12,7 @@ function checkbox_click(event)
|
||||
}
|
||||
}
|
||||
|
||||
function enable_search(suggest_url,confirm_search_message,format_item)
|
||||
function enable_search(suggest_url,confirm_search_message,format_item,extra_params)
|
||||
{
|
||||
if (!format_item) {
|
||||
format_item = function(results) {
|
||||
@@ -28,7 +28,7 @@ function enable_search(suggest_url,confirm_search_message,format_item)
|
||||
$(this).attr('value','');
|
||||
});
|
||||
|
||||
$("#search").autocomplete(suggest_url,{max:100,delay:10, selectFirst: false, formatItem : format_item});
|
||||
$("#search").autocomplete(suggest_url,{max:100,delay:10, selectFirst: false, formatItem : format_item, extraParams: extra_params});
|
||||
$("#search").result(function(event, data, formatted)
|
||||
{
|
||||
do_search(true);
|
||||
|
||||
Reference in New Issue
Block a user