Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: chrome/content/ui/sendReport.js

Issue 11015083: Merge labels and access keys into one string in locales (Closed)
Patch Set: Created July 3, 2013, 9:11 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/content/ui/overlay.xul ('k') | chrome/content/ui/sendReport.xul » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2013 Eyeo GmbH 3 * Copyright (C) 2006-2013 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 if (requests[i].filter && !requests[i].filter.subscriptions.filter(fun ction(s) !s.disabled).length) 811 if (requests[i].filter && !requests[i].filter.subscriptions.filter(fun ction(s) !s.disabled).length)
812 filtersRemoved = true; 812 filtersRemoved = true;
813 813
814 if (filtersRemoved) 814 if (filtersRemoved)
815 { 815 {
816 // Force the user to reload the page 816 // Force the user to reload the page
817 E("updateFixedIssue").hidden = false; 817 E("updateFixedIssue").hidden = false;
818 document.documentElement.canAdvance = true; 818 document.documentElement.canAdvance = true;
819 819
820 let nextButton = document.documentElement.getButton("next"); 820 let nextButton = document.documentElement.getButton("next");
821 nextButton.label = E("updatePage").getAttribute("reloadButtonLabel"); 821 [nextButton.label, nextButton.accessKey] = Utils.splitLabel(E("updateP age").getAttribute("reloadButtonLabel"));
822 nextButton.accessKey = E("updatePage").getAttribute("reloadButtonAcces skey");
823 document.documentElement.addEventListener("wizardnext", function(event ) 822 document.documentElement.addEventListener("wizardnext", function(event )
824 { 823 {
825 event.preventDefault(); 824 event.preventDefault();
826 event.stopPropagation(); 825 event.stopPropagation();
827 window.close(); 826 window.close();
828 this.contentWnd.location.reload(); 827 this.contentWnd.location.reload();
829 }.bind(this), true); 828 }.bind(this), true);
830 } 829 }
831 else 830 else
832 { 831 {
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 { 1062 {
1064 // User changed configuration, don't allow sending report now - page needs 1063 // User changed configuration, don't allow sending report now - page needs
1065 // to be reloaded 1064 // to be reloaded
1066 E("issuesOverride").hidden = true; 1065 E("issuesOverride").hidden = true;
1067 E("issuesChangeMessage").hidden = false; 1066 E("issuesChangeMessage").hidden = false;
1068 document.documentElement.canRewind = false; 1067 document.documentElement.canRewind = false;
1069 document.documentElement.canAdvance = true; 1068 document.documentElement.canAdvance = true;
1070 1069
1071 let contentWnd = this.contentWnd; 1070 let contentWnd = this.contentWnd;
1072 let nextButton = document.documentElement.getButton("next"); 1071 let nextButton = document.documentElement.getButton("next");
1073 nextButton.label = E("issuesPage").getAttribute("reloadButtonLabel"); 1072 [nextButton.label, nextButton.accessKey] = Utils.splitLabel(E("updatePage"). getAttribute("reloadButtonLabel"));
1074 nextButton.accessKey = E("issuesPage").getAttribute("reloadButtonAccesskey") ;
1075 document.documentElement.addEventListener("wizardnext", function(event) 1073 document.documentElement.addEventListener("wizardnext", function(event)
1076 { 1074 {
1077 event.preventDefault(); 1075 event.preventDefault();
1078 event.stopPropagation(); 1076 event.stopPropagation();
1079 window.close(); 1077 window.close();
1080 contentWnd.location.reload(); 1078 contentWnd.location.reload();
1081 }, true); 1079 }, true);
1082 }, 1080 },
1083 1081
1084 removeWhitelist: function() 1082 removeWhitelist: function()
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1198 function updateNextButton() 1196 function updateNextButton()
1199 { 1197 {
1200 let nextButton = document.documentElement.getButton("next"); 1198 let nextButton = document.documentElement.getButton("next");
1201 if (!nextButton) 1199 if (!nextButton)
1202 return; 1200 return;
1203 1201
1204 if (document.documentElement.currentPage.id == "commentPage") 1202 if (document.documentElement.currentPage.id == "commentPage")
1205 { 1203 {
1206 if (!nextButton.hasAttribute("_origLabel")) 1204 if (!nextButton.hasAttribute("_origLabel"))
1207 { 1205 {
1208 nextButton.setAttribute("_origLabel", nextButton.getAttribute("label")); 1206 nextButton._origLabel = nextButton.label;
1209 nextButton.setAttribute("label", document.documentElement.getAttribute("se ndbuttonlabel")); 1207 nextButton._origAccessKey = nextButton.accessKey;
1210 nextButton.setAttribute("_origAccessKey", nextButton.getAttribute("accessk ey")); 1208 [nextButton.label, nextButton.accessKey] = Utils.splitLabel(document.docum entElement.getAttribute("sendbuttonlabel"));
1211 nextButton.setAttribute("accesskey", document.documentElement.getAttribute ("sendbuttonaccesskey"));
1212 } 1209 }
1213 } 1210 }
1214 else 1211 else
1215 { 1212 {
1216 if (nextButton.hasAttribute("_origLabel")) 1213 if (nextButton.hasAttribute("_origLabel"))
1217 { 1214 {
1218 nextButton.setAttribute("label", nextButton.getAttribute("_origLabel")); 1215 nextButton.label = nextButton._origLabel;
1219 nextButton.removeAttribute("_origLabel"); 1216 nextButton.accessKey = nextButton._origAccessKey;
1220 nextButton.setAttribute("accesskey", nextButton.getAttribute("_origAccessK ey")); 1217 delete nextButton._origLabel;
Felix Dahlke 2013/07/03 15:20:47 Seems like an unrelated change, what's wrong with
Wladimir Palant 2013/07/09 12:10:59 Yes, this is somewhat unrelated. However, using an
1221 nextButton.removeAttribute("_origAccessKey"); 1218 delete nextButton._origAccessKey;
1222 } 1219 }
1223 } 1220 }
1224 } 1221 }
1225 1222
1226 function initDataCollectorPage() 1223 function initDataCollectorPage()
1227 { 1224 {
1228 document.documentElement.canAdvance = false; 1225 document.documentElement.canAdvance = false;
1229 1226
1230 let totalSteps = dataCollectors.length; 1227 let totalSteps = dataCollectors.length;
1231 let initNextDataSource = function() 1228 let initNextDataSource = function()
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
1563 1560
1564 function censorURL(url) 1561 function censorURL(url)
1565 { 1562 {
1566 return url.replace(/([?;&\/#][^?;&\/#]+?=)[^?;&\/#]+/g, "$1*"); 1563 return url.replace(/([?;&\/#][^?;&\/#]+?=)[^?;&\/#]+/g, "$1*");
1567 } 1564 }
1568 1565
1569 function encodeHTML(str) 1566 function encodeHTML(str)
1570 { 1567 {
1571 return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"). replace(/"/g, "&quot;"); 1568 return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"). replace(/"/g, "&quot;");
1572 } 1569 }
OLDNEW
« no previous file with comments | « chrome/content/ui/overlay.xul ('k') | chrome/content/ui/sendReport.xul » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld