merge popups draft
authormanotejmeka <manotejmeka@gmail.com>
Thu, 13 Apr 2017 02:29:34 -0400
changeset 561779 263abadbd3fe5485bf5c4c8a59ccb4b007b5ea2b
parent 561778 b60774f088a763d3c1f74c40be2436ba6b91be3a
child 624087 09f383960913903c241fa8dedbd718c412c52f35
push id53863
push userbmo:manotejmeka@gmail.com
push dateThu, 13 Apr 2017 06:44:43 +0000
milestone55.0a1
merge popups MozReview-Commit-ID: BlovCJmffBd
browser/components/preferences/in-content/findInPage.js
--- a/browser/components/preferences/in-content/findInPage.js
+++ b/browser/components/preferences/in-content/findInPage.js
@@ -169,23 +169,23 @@ var gSearchResultsPane = {
         child.classList.add("search-tooltip-inner-reverse");
         parent.classList.add("search-tooltip-reverse");
       }
     }
   },
 
   subDialogInit() {
     // Mighting be missing some just a list of all visibile during inspect element
-    let ids = ["useBookmark","chooseLanguage","translateButton",
-               "advancedFonts","colors","passwordExceptions","showPasswords",
-               "popupPolicyButton","notificationsPolicyButton","addonExceptions",
-               "connectionSettings","offlineNotifyExceptions","showUpdateHistory"];
+    let ids = ["useBookmark","chooseLanguage","advancedFonts","colors"];
+			   // ,"passwordExceptions","showPasswords",
+               // "popupPolicyButton","notificationsPolicyButton","addonExceptions",
+               // "connectionSettings","offlineNotifyExceptions","showUpdateHistory"];
     for (let id of ids){
       document.getElementById(id).setAttribute("subDialog","true");
-      this.dialogBoxs[id] = "";
+      gSearchResultsPane.dialogBoxs[id] = "";
     }
   },
 
   /**
    * Check that the passed string matches the filter arguments.
    *
    * @param String str
    *    to search for filter words in.
@@ -587,27 +587,27 @@ var gSearchResultsPane = {
         this.trie.insert(listOfWords[i].toLowerCase());
       }
     }
   },
 
   getSubDialogContent() {
     console.log("getting Sub dialog Contet")
 	let that = gSearchResultsPane;
-	let dialogObj = document.getElementById("dialogBox");
-    //console.log("db",dialogObj,dialogObj.children.length);
-	Object.keys(that.dialogBoxs)[that.counterDialog] = that.leafNodes(dialogObj);
     //console.log("ar",arry[1],this.totalSubDialogs,this.counterDialog);
-	if (Object.keys(that.dialogBoxs).length + 1 != that.counterDialog) {
+	if (Object.keys(that.dialogBoxs).length >= that.counterDialog) {
 	  // Opening the dialogue box
-	  document.getElementById(that.dialogBoxs[Object.keys(that.dialogBoxs)[that.counterDialog]]).click();
+	  document.getElementById(Object.keys(that.dialogBoxs)[that.counterDialog]).click();
 	  that.counterDialog += 1;
 	} else {
 		that.dialogeInit = false;
 	}
+	let dialogObj = document.getElementById("dialogBox");
+    //console.log("db",dialogObj,dialogObj.children.length);
+	Object.keys(that.dialogBoxs)[that.counterDialog] = that.leafNodes(dialogObj);
 	document.getElementById("dialogClose").click();
   },
   
   leafNodes(nodeObject) {
 	let matchesFound = "";
 	//console.log("fun: ",nodeObject,nodeObject.childNodes.length)
     if (nodeObject.childNodes.length == 0) {
 	  //console.log("leaf",nodeObject, nodeObject.textContent,nodeObject.innerHTML);