(records, options)
| 19059 | }); |
| 19060 | metadataContainer.appendChild(designerItem); |
| 19061 | } |
| 19062 | |
| 19063 | // Add source with icon (only show if this model has source data) |
| 19064 | const sourceValue = (model.source && model.source.trim()) ? model.source.trim() : ''; |
| 19065 | if (sourceValue) { |
| 19066 | const sourceItem = document.createElement('div'); |
| 19067 | sourceItem.className = 'metadata-item source-item'; |
| 19068 | sourceItem.innerHTML = ` |
| 19069 | <span class="metadata-icon">🔗</span> |
| 19070 | <span class="metadata-value source-info" style="color: #ccc" title="${sourceValue}">${sourceValue}</span> |
| 19071 | `; |
| 19072 | metadataContainer.appendChild(sourceItem); |
| 19073 | } |
| 19074 | |
| 19075 | // Add parent model with icon (only show if this model has parent model data) |
| 19076 | const parentValue = (model.parentModel && model.parentModel.trim()) ? model.parentModel.trim() : ''; |
| 19077 | if (parentValue) { |
| 19078 | const parentItem = document.createElement('div'); |
| 19079 | parentItem.className = 'metadata-item parent-item'; |
| 19080 | parentItem.style.cursor = 'pointer'; |
| 19081 | parentItem.classList.add('clickable-metadata'); |
| 19082 | |
| 19083 | parentItem.innerHTML = ` |
| 19084 | <span class="metadata-icon">📦</span> |
| 19085 | <span class="metadata-value parent-info" style="color: #ccc" title="${parentValue}">${parentValue}</span> |
| 19086 | `; |
| 19087 | |
| 19088 | // Add click handler to filter by parent model |
| 19089 | parentItem.addEventListener('click', async (e) => { |
| 19090 | e.preventDefault(); |
| 19091 | e.stopPropagation(); |
| 19092 | // Set the parent model filter |
| 19093 | const parentSelect = document.getElementById('parent-select'); |
| 19094 | if (parentSelect) { |
| 19095 | parentSelect.value = parentValue; |
| 19096 | // Trigger combined search to apply filter |
| 19097 | if (typeof window.performCombinedSearch === 'function') { |
| 19098 | await window.performCombinedSearch(); |
| 19099 | } |
| 19100 | } |
| 19101 | }); |
| 19102 | metadataContainer.appendChild(parentItem); |
| 19103 | } |
| 19104 | |
| 19105 | // Add license with icon (only show if this model has license data) |
| 19106 | const licenseValue = (model.license && model.license.trim()) ? model.license.trim() : ''; |
| 19107 | if (licenseValue) { |
| 19108 | const licenseItem = document.createElement('div'); |
| 19109 | licenseItem.className = 'metadata-item license-item'; |
| 19110 | licenseItem.style.cursor = 'pointer'; |
| 19111 | licenseItem.classList.add('clickable-metadata'); |
| 19112 | |
| 19113 | licenseItem.innerHTML = ` |
| 19114 | <span class="metadata-icon">📜</span> |
| 19115 | <span class="metadata-value license-info" style="color: #ccc" title="${licenseValue}">${licenseValue}</span> |
| 19116 | `; |
| 19117 | |
| 19118 | // Add click handler to filter by license |
no test coverage detected