diff --git a/src/CognitiveSearch.UI/CognitiveSearch.UI/Models/ClientAction.cs b/src/CognitiveSearch.UI/CognitiveSearch.UI/Models/ClientAction.cs index 0bdaf66..ac8fb5c 100644 --- a/src/CognitiveSearch.UI/CognitiveSearch.UI/Models/ClientAction.cs +++ b/src/CognitiveSearch.UI/CognitiveSearch.UI/Models/ClientAction.cs @@ -12,6 +12,7 @@ public class ClientAction public string svgicon { get; set; } public string method { get; set; } public string filter { get;set; } + public string classList { get;set; } public bool isDefault { get; set; } } } \ No newline at end of file diff --git a/src/CognitiveSearch.UI/CognitiveSearch.UI/config.json b/src/CognitiveSearch.UI/CognitiveSearch.UI/config.json index 5caf80d..e3c5425 100644 --- a/src/CognitiveSearch.UI/CognitiveSearch.UI/config.json +++ b/src/CognitiveSearch.UI/CognitiveSearch.UI/config.json @@ -104,14 +104,16 @@ "title": "Only search Emails", "fonticon": "bi bi-envelope", "method": "Microsoft.All.UpdateResultsAsList", - "filter": "(content_group eq 'Email')" + "filter": "(content_group eq 'Email')", + "classList" : "btn-outline-primary" }, { "name": "attachments", "title": "Only search Emails' attachments", "fonticon": "bi bi-paperclip", "method": "Microsoft.All.UpdateResultsAsList", - "filter": "(document_embedded eq true and parent/content_group eq 'Email')" + "filter": "(document_embedded eq true and parent/content_group eq 'Email')", + "classList" : "btn-outline-primary" } ] }, diff --git a/src/CognitiveSearch.UI/CognitiveSearch.UI/wwwroot/js/common.js b/src/CognitiveSearch.UI/CognitiveSearch.UI/wwwroot/js/common.js index 67b7606..bc9adbc 100644 --- a/src/CognitiveSearch.UI/CognitiveSearch.UI/wwwroot/js/common.js +++ b/src/CognitiveSearch.UI/CognitiveSearch.UI/wwwroot/js/common.js @@ -807,8 +807,8 @@ Microsoft.Search.Results = { if (Microsoft.View.config.resultsRenderings && Microsoft.View.config.resultsRenderings.length > 0) { var renderingHtml = ''; - var switchClassList = "view-switch-button btn btn-outline-secondary btn-sm"; - var switchClassListActive = "view-switch-button btn btn-outline-secondary btn-sm active"; + var switchClassList = "view-switch-button btn btn-sm"; + var switchClassListActive = "view-switch-button btn btn-sm active"; // For each rendering of the search vertical for (var i = 0; i < Microsoft.View.config.resultsRenderings.length; i++) { @@ -816,7 +816,16 @@ Microsoft.Search.Results = { if (rendering.name !== "blank") { - renderingHtml += '