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

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

Issue 8329305: Fixed issue reporter`s progress labels for right-to-left languages (Closed)
Patch Set: Created Sept. 14, 2012, 9:09 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This Source Code is subject to the terms of the Mozilla Public License 2 * This Source Code is subject to the terms of the Mozilla Public License
3 * version 2.0 (the "License"). You can obtain a copy of the License at 3 * version 2.0 (the "License"). You can obtain a copy of the License at
4 * http://mozilla.org/MPL/2.0/. 4 * http://mozilla.org/MPL/2.0/.
5 */ 5 */
6 6
7 // 7 //
8 // Report data template, more data will be added during data collection 8 // Report data template, more data will be added during data collection
9 // 9 //
10 10
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 let dataCollectors = [reportsListDataSource, requestsDataSource, filtersDataSour ce, subscriptionsDataSource, 1150 let dataCollectors = [reportsListDataSource, requestsDataSource, filtersDataSour ce, subscriptionsDataSource,
1151 screenshotDataSource, framesDataSource, errorsDataSource, extensionsDataSource, 1151 screenshotDataSource, framesDataSource, errorsDataSource, extensionsDataSource,
1152 subscriptionUpdateDataSource, issuesDataSource]; 1152 subscriptionUpdateDataSource, issuesDataSource];
1153 1153
1154 // 1154 //
1155 // Wizard logic 1155 // Wizard logic
1156 // 1156 //
1157 1157
1158 function initWizard() 1158 function initWizard()
1159 { 1159 {
1160 const isRTL = (window.getComputedStyle(document.documentElement).direction == "rtl");
1161 if(isRTL)
1162 {
1163 let progressLabels = Array.prototype.slice.call(E("progressBar").getElements ByTagName("label"));
1164 for(let i=progressLabels.length; i--;)
1165 {
1166 progressLabels[i].parentNode.appendChild(progressLabels[i]);
1167 }
1168 }
1169
Wladimir Palant 2012/09/14 21:20:40 This seems to be the wrong place to do that, it's
1160 // Make sure no issue type is selected by default 1170 // Make sure no issue type is selected by default
1161 E("typeGroup").selectedItem = null; 1171 E("typeGroup").selectedItem = null;
1162 document.documentElement.addEventListener("pageshow", updateNextButton, false) ; 1172 document.documentElement.addEventListener("pageshow", updateNextButton, false) ;
1163 1173
1164 // Move wizard header 1174 // Move wizard header
1165 let header = document.getAnonymousElementByAttribute(document.documentElement, "class", "wizard-header"); 1175 let header = document.getAnonymousElementByAttribute(document.documentElement, "class", "wizard-header");
1166 if (header) 1176 if (header)
1167 { 1177 {
1168 document.getElementById("wizardHeaderLabel").setAttribute("value", document. documentElement.wizardPages[0].getAttribute("label")); 1178 document.getElementById("wizardHeaderLabel").setAttribute("value", document. documentElement.wizardPages[0].getAttribute("label"));
1169 document.documentElement.insertBefore(document.getElementById("wizardHeader" ), document.documentElement.firstChild); 1179 document.documentElement.insertBefore(document.getElementById("wizardHeader" ), document.documentElement.firstChild);
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
1528 1538
1529 function censorURL(url) 1539 function censorURL(url)
1530 { 1540 {
1531 return url.replace(/([?;&\/#][^?;&\/#]+?=)[^?;&\/#]+/g, "$1*"); 1541 return url.replace(/([?;&\/#][^?;&\/#]+?=)[^?;&\/#]+/g, "$1*");
1532 } 1542 }
1533 1543
1534 function encodeHTML(str) 1544 function encodeHTML(str)
1535 { 1545 {
1536 return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"). replace(/"/g, "&quot;"); 1546 return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"). replace(/"/g, "&quot;");
1537 } 1547 }
OLDNEW
« chrome/content/ui/progressBar.js ('K') | « chrome/content/ui/progressBar.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld