Bug 1241316 - Display device last sync time in synced tabs menu panel tooltip. r=markh
authorThom Chiovoloni <tchiovoloni@mozilla.com>
Tue, 27 Sep 2016 15:14:25 -0400
changeset 315790 7e9f453f768f0fc533f6ace26b06bd8f8324543e
parent 315789 d40e2abb42d61e0411135c624f9fba88fe6c85c8
child 315791 e7aa4e7bb71e9ebbd428794c62c9ac5eba9da9c1
push id20634
push usercbook@mozilla.com
push dateFri, 30 Sep 2016 10:10:13 +0000
treeherderfx-team@afe79b010d13 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarkh
bugs1241316
milestone52.0a1
Bug 1241316 - Display device last sync time in synced tabs menu panel tooltip. r=markh MozReview-Commit-ID: LF1GOf8XIrR
browser/components/customizableui/CustomizableWidgets.jsm
--- a/browser/components/customizableui/CustomizableWidgets.jsm
+++ b/browser/components/customizableui/CustomizableWidgets.jsm
@@ -461,16 +461,19 @@ const CustomizableWidgets = [
       appendTo.appendChild(messageLabel);
       return messageLabel;
     },
     _appendClient: function (client, attachFragment) {
       let doc = attachFragment.ownerDocument;
       // Create the element for the remote client.
       let clientItem = doc.createElementNS(kNSXUL, "label");
       clientItem.setAttribute("itemtype", "client");
+      let window = doc.defaultView;
+      clientItem.setAttribute("tooltiptext",
+        window.gSyncUI.formatLastSyncDate(new Date(client.lastModified)));
       clientItem.textContent = client.name;
 
       attachFragment.appendChild(clientItem);
 
       if (client.tabs.length == 0) {
         let label = this._appendMessageLabel("notabsforclientlabel", attachFragment);
         label.setAttribute("class", "PanelUI-remotetabs-notabsforclient-label");
       } else {