mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-04 12:22:47 +00:00 
			
		
		
		
	New CSS File
This commit is contained in:
		@@ -210,31 +210,14 @@ class ConcordanceQueryBuilder {
 | 
			
		||||
    window.location.href = '#query-container';
 | 
			
		||||
    this.elements.counter += 1;
 | 
			
		||||
    queryText = encodeURI(queryText);
 | 
			
		||||
    let chipColor = 'style="background-color:#';
 | 
			
		||||
 | 
			
		||||
    // Sets chip color, depending on the type of element
 | 
			
		||||
    if (dataType === 'start-sentence' || dataType === 'end-sentence') {
 | 
			
		||||
      chipColor += 'FD9720';
 | 
			
		||||
    } else if (dataType === 'start-empty-entity' || dataType === 'start-entity' || dataType === 'end-entity') {
 | 
			
		||||
      chipColor += 'A6E22D';
 | 
			
		||||
    } else if (dataType === 'text-annotation') {
 | 
			
		||||
     chipColor += '2FBBAB';
 | 
			
		||||
    } else if (dataType === 'token') {
 | 
			
		||||
     chipColor += '28B3D1';
 | 
			
		||||
    } else {
 | 
			
		||||
     chipColor = '';
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Creates a chip with the previously selected element. Is first created in the 'BuilderElement' and populated with an EventListener, then moved to 'yourQuery'.
 | 
			
		||||
    let builderElement = document.createElement('div');
 | 
			
		||||
    builderElement.innerHTML +=`
 | 
			
		||||
      <div class='chip' ${chipColor}' data-type='${dataType}' data-query='${queryText}' draggable='true' style='cursor:pointer;' ondragstart='concordanceQueryBuilder.dragStartHandler(event)' ondragend='concordanceQueryBuilder.dragEndHandler(event)'>
 | 
			
		||||
        ${prettyText}
 | 
			
		||||
        <i class='material-icons close'>close</i>
 | 
			
		||||
      </div>
 | 
			
		||||
    `.trim();
 | 
			
		||||
 | 
			
		||||
    let buttonElement = builderElement.firstElementChild;
 | 
			
		||||
    let buttonElement = Utils.elementFromString(
 | 
			
		||||
      `
 | 
			
		||||
        <div class='chip' data-type='${dataType}' data-query='${queryText}' draggable='true' style='cursor:pointer;' ondragstart='concordanceQueryBuilder.dragStartHandler(event)' ondragend='concordanceQueryBuilder.dragEndHandler(event)'>
 | 
			
		||||
          ${prettyText}
 | 
			
		||||
          <i class='material-icons close'>close</i>
 | 
			
		||||
        </div>
 | 
			
		||||
      `
 | 
			
		||||
    );
 | 
			
		||||
    buttonElement.addEventListener('click', () => {this.deleteAttr(buttonElement);});
 | 
			
		||||
 | 
			
		||||
    // Ensures that metadata is always at the end of the query:
 | 
			
		||||
@@ -963,12 +946,6 @@ class ConcordanceQueryBuilder {
 | 
			
		||||
      this.hideEverything();
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//#endregion Structural Attribute Builder Functions
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  //#endregion Structural Attribute Builder Functions
 | 
			
		||||
  
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user