Bug 1520464 - Fix gloda facet custom element loading. r=mkmelin
authorArshad Khan <arshdkhn1@gmail.com>
Wed, 16 Jan 2019 19:22:43 +0530
changeset 33375 f28d1534be7c
parent 33374 335361a67f2d
child 33376 4badb35825a8
push id2368
push userclokep@gmail.com
push dateMon, 28 Jan 2019 21:12:50 +0000
treeherdercomm-beta@56d23c07d815 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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"