mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +00:00 
			
		
		
		
	Further improvements for filter elements
This commit is contained in:
		| @@ -295,8 +295,6 @@ | ||||
|     vertical-align: middle; | ||||
|     margin: 1px; | ||||
|     padding: 2px; | ||||
|     background: #eee; | ||||
|     border: 1px solid #eee; | ||||
|     border-radius: 3px; | ||||
| } | ||||
|  | ||||
| @@ -322,8 +320,6 @@ | ||||
|     zoom: 1; | ||||
|     padding-left: 3px; | ||||
|     padding-right: 3px; | ||||
|     padding-top: 2px; | ||||
|     padding-bottom: 2px; | ||||
|     border: 1px solid #aaa; | ||||
|     border-radius: 3px; | ||||
|     background: #eee; | ||||
| @@ -332,6 +328,12 @@ | ||||
|     margin-right: 5px; | ||||
| } | ||||
|  | ||||
| .filter-button { | ||||
|     padding: 2px; | ||||
|     padding-left: 4px; | ||||
|     padding-right: 4px; | ||||
| } | ||||
|  | ||||
| .filter-input { | ||||
|     display: inline-block; | ||||
|     *display: inline; | ||||
|   | ||||
| @@ -281,7 +281,7 @@ function setupFilterList(tableKey, table, target) { | ||||
|     // One blank slate, please | ||||
|     element.empty(); | ||||
|  | ||||
|     element.append(`<button id='reload-${tableKey}' title='{% trans "Reload data" %}' class='btn btn-outline-secondary filter-tag'><span class='fas fa-redo-alt'></span></button>`); | ||||
|     element.append(`<button id='reload-${tableKey}' title='{% trans "Reload data" %}' class='btn btn-outline-secondary filter-button'><span class='fas fa-redo-alt'></span></button>`); | ||||
|  | ||||
|     // Callback for reloading the table | ||||
|     element.find(`#reload-${tableKey}`).click(function() { | ||||
| @@ -293,11 +293,10 @@ function setupFilterList(tableKey, table, target) { | ||||
|         return; | ||||
|     } | ||||
|  | ||||
|     // If there are filters currently "in use", add them in! | ||||
|     element.append(`<button id='${add}' title='{% trans "Add new filter" %}' class='btn btn-outline-secondary filter-tag'><span class='fas fa-filter'></span></button>`); | ||||
|     element.append(`<button id='${add}' title='{% trans "Add new filter" %}' class='btn btn-outline-secondary filter-button'><span class='fas fa-filter'></span></button>`); | ||||
|  | ||||
|     if (Object.keys(filters).length > 0) { | ||||
|         element.append(`<button id='${clear}' title='{% trans "Clear all filters" %}' class='btn btn-outline-secondary filter-tag'><span class='fas fa-backspace icon-red'></span></button>`); | ||||
|         element.append(`<button id='${clear}' title='{% trans "Clear all filters" %}' class='btn btn-outline-secondary filter-button'><span class='fas fa-backspace icon-red'></span></button>`); | ||||
|     } | ||||
|  | ||||
|     for (var key in filters) { | ||||
| @@ -320,7 +319,7 @@ function setupFilterList(tableKey, table, target) { | ||||
|             html += generateAvailableFilterList(tableKey); | ||||
|             html += generateFilterInput(tableKey); | ||||
|  | ||||
|             html += `<button title='{% trans "Create filter" %}' class='btn btn-outline-secondary filter-tag' id='${make}'><span class='fas fa-plus'></span></button>`; | ||||
|             html += `<button title='{% trans "Create filter" %}' class='btn btn-outline-secondary filter-button' id='${make}'><span class='fas fa-plus'></span></button>`; | ||||
|  | ||||
|             element.append(html); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user