mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 07:12:26 +02:00
Advanced Search: Auto-complete search on foreign keys
SVN:b1162[5600]
This commit is contained in:
@@ -227,7 +227,7 @@ function SearchFormForeignKeys(id, sTargetClass, sAttCode, oSearchWidgetElmt, sF
|
|||||||
// Gather the parameters from the search form
|
// Gather the parameters from the search form
|
||||||
var theMap = {};
|
var theMap = {};
|
||||||
var context = $('#SearchResultsToAdd_'+me.id);
|
var context = $('#SearchResultsToAdd_'+me.id);
|
||||||
var selectionMode = $(':input[name=selectionMode]', context);
|
var selectionMode = $(':input[name="selectionMode"]', context);
|
||||||
if (selectionMode.length > 0) {
|
if (selectionMode.length > 0) {
|
||||||
// Paginated table retrieve the mode and the exceptions
|
// Paginated table retrieve the mode and the exceptions
|
||||||
theMap['selectionMode'] = selectionMode.val();
|
theMap['selectionMode'] = selectionMode.val();
|
||||||
@@ -235,7 +235,7 @@ function SearchFormForeignKeys(id, sTargetClass, sAttCode, oSearchWidgetElmt, sF
|
|||||||
theMap[this.name] = this.value;
|
theMap[this.name] = this.value;
|
||||||
});
|
});
|
||||||
|
|
||||||
$(':input[name^=storedSelection]', context).each(function () {
|
$(':input[name="storedSelection[]"]', context).each(function () {
|
||||||
if (typeof theMap[this.name] === "undefined") {
|
if (typeof theMap[this.name] === "undefined") {
|
||||||
theMap[this.name] = [];
|
theMap[this.name] = [];
|
||||||
}
|
}
|
||||||
@@ -245,7 +245,7 @@ function SearchFormForeignKeys(id, sTargetClass, sAttCode, oSearchWidgetElmt, sF
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Normal table, retrieve all the checked check-boxes
|
// Normal table, retrieve all the checked check-boxes
|
||||||
$(':checked[name^=selectObject]', context).each(
|
$(':checked[name="selectObject[]"]', context).each(
|
||||||
function () {
|
function () {
|
||||||
if ((this.name !== '') && ((this.type !== 'checkbox') || (this.checked))) {
|
if ((this.name !== '') && ((this.type !== 'checkbox') || (this.checked))) {
|
||||||
var arrayExpr = /\[\]$/;
|
var arrayExpr = /\[\]$/;
|
||||||
|
|||||||
Reference in New Issue
Block a user