Changeset 7887
- Timestamp:
- Dec 4, 2020, 9:56:39 AM (2 years ago)
- Location:
- branches/3.17-stable
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.17-stable/src/clients/web/net/sf/basedb/clients/web/util/HTML.java
r7748 r7887 322 322 else 323 323 { 324 m.appendReplacement(sb, "<$2 >");324 m.appendReplacement(sb, "<$2 $3>"); 325 325 } 326 326 } -
branches/3.17-stable/src/core/net/sf/basedb/util/formatter/PropertyFilterFormatter.java
r7886 r7887 27 27 import net.sf.basedb.core.DbControl; 28 28 import net.sf.basedb.core.Item; 29 import net.sf.basedb.core.ItemNotFoundException; 29 30 import net.sf.basedb.core.Nameable; 30 31 import net.sf.basedb.core.Operator; 31 32 import net.sf.basedb.core.PropertyFilter; 33 import net.sf.basedb.core.RawDataType; 34 import net.sf.basedb.core.RawDataTypes; 32 35 import net.sf.basedb.core.Type; 33 36 import net.sf.basedb.util.Values; … … 96 99 } 97 100 98 int subtypeId = Values.getInt(tmp[baseIndex+2]);101 Item relatedItemType = Item.valueOf(tmp[baseIndex+1]); 99 102 property = tmp[baseIndex+3]; 100 103 sb.append(function(parentOrChild)).append("("); 101 sb.append(value(nameOfItem(dc, Item.ITEMSUBTYPE, subtypeId, false))); 104 if (relatedItemType == Item.RAWBIOASSAY) 105 { 106 RawDataType rdt = RawDataTypes.getRawDataType(tmp[baseIndex+2]); 107 if (rdt == null) 108 { 109 sb.append(value(missing(tmp[baseIndex+2], "This raw data type doesn't exist!"))); 110 } 111 else 112 { 113 sb.append(value(rdt.getName())); 114 } 115 } 116 else 117 { 118 int subtypeId = Values.getInt(tmp[baseIndex+2]); 119 sb.append(value(nameOfItem(dc, Item.ITEMSUBTYPE, subtypeId, false))); 120 } 102 121 sb.append(")"); 103 122 if (!property.startsWith("#")) sb.append("."); … … 283 302 return q+((Nameable)itemType.getById(dc, id)).getName()+q; 284 303 } 304 catch (ItemNotFoundException ex) 305 { 306 return missing(Integer.toString(id), "This " + itemType.toString().toLowerCase() + " doesn't exist!"); 307 } 285 308 catch (RuntimeException ex) 286 309 { 287 return Integer.toString(id);310 return missing(Integer.toString(id), ex.getMessage()); 288 311 } 289 312 } … … 321 344 return tagElements ? "<function>"+function+"</function>" : function; 322 345 } 346 private String missing(String missing, String title) 347 { 348 return tagElements ? "<missing title=\""+(title!=null ? title :"Missing")+"\">"+missing+"</missing>" : missing; 349 } 323 350 324 351 -
branches/3.17-stable/www/views/itemlists/syncfilter/ajax.jsp
r7605 r7887 89 89 if (sourceItemType == syncFilter.getSourceItemType()) 90 90 { 91 json.put("filter", HTML.encodeTags(formatFilter(dc, syncFilter), "value|name|operator|function "));91 json.put("filter", HTML.encodeTags(formatFilter(dc, syncFilter), "value|name|operator|function|missing")); 92 92 } 93 93 } -
branches/3.17-stable/www/views/itemlists/syncfilter/filtertext.css
r7604 r7887 22 22 color: #666666; 23 23 } 24 24 .filtertext missing 25 { 26 text-decoration: underline dashed #d00000; 27 } -
branches/3.17-stable/www/views/itemlists/view_list.jsp
r7794 r7887 536 536 } 537 537 %> 538 <pre class="filtertext" id="syncfilter.<%=filterId%>"><%=HTML.encodeTags(filterString, "value|name|operator|function ")%></pre></tbl:cell>538 <pre class="filtertext" id="syncfilter.<%=filterId%>"><%=HTML.encodeTags(filterString, "value|name|operator|function|missing")%></pre></tbl:cell> 539 539 <tbl:cell column="inSync"> 540 540 <base:icon
Note: See TracChangeset
for help on using the changeset viewer.