Ignore:
Timestamp:
Dec 10, 2018, 8:43:53 AM (3 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #2133: Formatting of sync filter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.13-stable/www/views/itemlists/syncfilter/ajax.jsp

    r6793 r7546  
    4747    StringBuilder sb = new StringBuilder();
    4848    Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(dc.getSessionControl());
    49     Formatter<PropertyFilter> filterFormatter = new PropertyFilterFormatter(dc, dateFormatter);
     49    Formatter<PropertyFilter> filterFormatter = new PropertyFilterFormatter(dc, dateFormatter, true);
    5050    for (int filterRow = 0; filterRow < syncFilter.getFilterRows(); filterRow++)
    5151    {
    52       sb.append(filterRow > 0 ? "\nOR " : "");
     52      sb.append(filterRow > 0 ? "\n<operator>OR</operator> " : "");
    5353      List<String> filters = SyncFilter.getFormattedAndSortedFilters(syncFilter.getPropertyFilters(filterRow), filterFormatter);
    54       sb.append(Values.getString(filters, "\n   AND ", true));
     54      sb.append(Values.getString(filters, "\n   <operator>AND</operator> ", true));
    5555    }
    5656    return sb.toString();
     
    8989    if (sourceItemType == syncFilter.getSourceItemType())
    9090    {
    91       json.put("filter", HTML.encodeTags(formatFilter(dc, syncFilter)));
     91      json.put("filter", HTML.encodeTags(formatFilter(dc, syncFilter), "value|name|operator|function"));
    9292    }
    9393  }
Note: See TracChangeset for help on using the changeset viewer.