HCAS#55582 multiSuggests met meerdere waarden kunnen nu ook buiten de geavanceerde kenmerken om correct worden gepinned
svn path=/Website/branches/v2018.2/; revision=40051
This commit is contained in:
@@ -113,13 +113,18 @@ var iface =
|
||||
if (!nm)
|
||||
return;
|
||||
|
||||
if ($(this).attr("type") == 'checkbox' || $(this).attr("type") == 'radio')
|
||||
if ($(this).attr("type") == "checkbox" || $(this).attr("type") == "radio")
|
||||
{
|
||||
formObject[nm] = $(this).prop("checked");
|
||||
}
|
||||
else
|
||||
{
|
||||
var val = $(this).val();
|
||||
|
||||
// Sla bij opengeklapte multiSuggests met 1 geselecteerde waarde, de text op ipv de key(s)
|
||||
if ($(this).prop("tagName") == "SELECT" && $(this).hasClass("multiSuggest") && $(this).find(":selected").length == 1)
|
||||
val = $(this).find(":selected").text();
|
||||
|
||||
if (!$(this).hasClass("adhoc") && val == "" || val == null) // Save empty adhoc filters too: DJIN#41716
|
||||
return;
|
||||
if (val == "-1" && nm.match(/key$/))
|
||||
@@ -146,7 +151,7 @@ var iface =
|
||||
stringToForm: function (formString, stringForm)
|
||||
{
|
||||
var formObject = JSON.parse(formString);
|
||||
stringForm.find("input, select").not('reportmulti').each(function() // negeer reportmulti, die kunnen we niet aan
|
||||
stringForm.find("input, select").not("reportmulti").each(function() // negeer reportmulti, die kunnen we niet aan
|
||||
{
|
||||
var nm = $(this).attr("colname") || this.id || this.name || null;
|
||||
|
||||
@@ -196,12 +201,17 @@ var iface =
|
||||
}
|
||||
else if (!input.hasClass("final")) // Final's niet opslaan als filter
|
||||
{
|
||||
// Not supported; Could take too long to open the list, so just take the first value
|
||||
if (multiple)
|
||||
// Meerdere waarden alleen supported bij multiSuggest's
|
||||
if (multiple && !$(input).hasClass("multiSuggest"))
|
||||
formObject[nm] = formObject[nm][0];
|
||||
|
||||
input.val(formObject[nm]);
|
||||
input.prop('defaultValue', formObject[nm]);
|
||||
|
||||
// multiSuggests met meerdere waarden vast openklappen
|
||||
if (input.hasClass("multiSuggest") && multiple)
|
||||
$(input).prev(".multi_suggest_toggle").click();
|
||||
|
||||
if ("suggestattr" in formObject && nm in formObject.suggestattr)
|
||||
{
|
||||
for (var sg in formObject.suggestattr[nm])
|
||||
|
||||
@@ -415,7 +415,7 @@ function Suggest(inParams)
|
||||
.attr("title", L("lcl_shared_suggest_toomany"))
|
||||
.text(L("lcl_shared_suggest_toomany")));
|
||||
var $option;
|
||||
var keys_arr = storeKeyField.value.split(",");
|
||||
var keys_arr = $suggestField.val().split(",");
|
||||
for (var i=0; i < data.result.length; i++)
|
||||
{
|
||||
$option = $("<option>").attr("value", data.result[i].key)
|
||||
|
||||
Reference in New Issue
Block a user