Bug 1520464 - Fix gloda facet custom element loading. r=mkmelin
authorArshad Khan <arshdkhn1@gmail.com>
Wed, 16 Jan 2019 19:22:43 +0530
changeset 34229 f28d1534be7c75ac4d468cbf7662bae87f1ecd4c
parent 34228 335361a67f2d354655b2beb5c670b74a57f96725
child 34230 4badb35825a810d8c4ac586cca6aa7e4bfbed0ab
push id389
push userclokep@gmail.com
push dateMon, 18 Mar 2019 19:01:53 +0000
reviewersmkmelin
bugs1520464
Bug 1520464 - Fix gloda facet custom element loading. r=mkmelin
mail/base/content/glodaFacetView.js
mail/base/content/glodaFacetView.xhtml
--- a/mail/base/content/glodaFacetView.js
+++ b/mail/base/content/glodaFacetView.js
@@ -129,21 +129,21 @@ const UIFacets = {
       facet = document.createElement("facet-boolean");
     } else if (type === "boolean-filtered") {
       facet = document.createElement("facet-boolean-filtered");
     } else if (type === "discrete") {
       facet = document.createElement("facet-discrete");
     } else {
       facet = document.createElement("div");
       facet.setAttribute("class", "facetious");
-      facet.setAttribute("type", type);
     }
 
     facet.attrDef = attrDef;
     facet.nounDef = attrDef.objectNounDef;
+    facet.setAttribute("type", type);
 
     for (let key in args) {
       facet[key] = args[key];
     }
 
     facet.setAttribute("name", attrDef.attributeName);
     this.node.appendChild(facet);
 
--- a/mail/base/content/glodaFacetView.xhtml
+++ b/mail/base/content/glodaFacetView.xhtml
@@ -45,20 +45,21 @@
       onkeypress="if (event.keyCode == event.DOM_VK_ESCAPE) document.getElementById('popup-menu').hide();"
       onmouseup="return clickOnBody(event)">
   <div id="popup-menu" class="popup-menu" variety="invisible"/>
   <div id="table">
     <div>
         <div class="facets facets-sidebar" id="facets">
           <h1 id="filter-header-label">&glodaFacetView.filters.label;</h1>
           <div>
-            <facet-boolean id="facet-fromMe" attr="fromMe" uninitialized="true"/>
-            <facet-boolean id="facet-toMe" attr="toMe" uninitialized="true"/>
-            <facet-boolean id="facet-star" attr="star" uninitialized="true"/><br/>
+            <facet-boolean id="facet-fromMe" type="boolean" attr="fromMe" uninitialized="true"/>
+            <facet-boolean id="facet-toMe" type="boolean" attr="toMe" uninitialized="true"/>
+            <facet-boolean id="facet-star" type="boolean" attr="star" uninitialized="true"/><br/>
             <facet-boolean-filtered id="facet-attachmentTypes"
+                                    type="boolean-filtered"
                                     attr="attachmentTypes"
                                     groupDisplayProperty="categoryLabel"
                                     uninitialized="true"/>
           </div>
         </div>
         <div id="main-column">
           <div id="header">
             <div id="date-toggle" class="date-toggle" tabindex="0" role="button"