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

Delta Between Two Patch Sets: sitescripts/reports/static/reports.js

Issue 8625042: Reports - user usefullness (Closed)
Left Patch Set: Reports - user usefulness Created Oct. 23, 2012, 2:15 p.m.
Right Patch Set: Reports - user usefulness Created Oct. 29, 2012, 12:35 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « sitescripts/reports/static/lib/reportsview.js ('k') | sitescripts/reports/template/digest.html » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 if (typeof localStorage == "undefined") 1 if (typeof localStorage == "undefined")
2 window.localStorage = {}; 2 window.localStorage = {};
3 var templates; 3 var templates;
4 4
5 function migrateCookies() 5 function migrateCookies()
6 { 6 {
7 var cookies = document.cookie.split(/\s*;\s*/); 7 var cookies = document.cookie.split(/\s*;\s*/);
8 for (var i = 0; i < cookies.length; i++) 8 for (var i = 0; i < cookies.length; i++)
9 { 9 {
10 if (/^(.*?)=(.*)/.test(cookies[i])) 10 if (/^(.*?)=(.*)/.test(cookies[i]))
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 var notifyField = document.getElementById("notify"); 125 var notifyField = document.getElementById("notify");
126 if (notifyField) 126 if (notifyField)
127 notifyField.checked = true; 127 notifyField.checked = true;
128 updateTemplateButtons(); 128 updateTemplateButtons();
129 } 129 }
130 }, false); 130 }, false);
131 131
132 var statusField = document.getElementById("statusField"); 132 var statusField = document.getElementById("statusField");
133 statusField.value = status; 133 statusField.value = status;
134 134
135 var usefulness = document.getElementById("usefulnessCell").getAttribute("val ue"); 135 var usefulness = 0;
136 var usefulnessCell = document.getElementById("usefulnessCell");
137 if (usefulnessCell)
138 usefulness = usefulnessCell.getAttribute("value");
136 setRadio(radios, usefulness); 139 setRadio(radios, usefulness);
137 setRadioListener(radios, updateTemplates); 140 setRadioListener(radios, updateTemplates);
138 141
139 updateTemplates(); 142 updateTemplates();
140 statusField.focus(); 143 statusField.focus();
141 } 144 }
142 } 145 }
143 146
144 function updateTemplates() 147 function updateTemplates()
145 { 148 {
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 var spans = nodes[j].getElementsByTagName("span"); 390 var spans = nodes[j].getElementsByTagName("span");
388 for (var k = 0; k < spans.length; k++) 391 for (var k = 0; k < spans.length; k++)
389 if (spans[k].hasAttribute("title")) 392 if (spans[k].hasAttribute("title"))
390 spans[k].setAttribute("title", toLocalDate(spans[k].getAttribute("titl e"))); 393 spans[k].setAttribute("title", toLocalDate(spans[k].getAttribute("titl e")));
391 } 394 }
392 } 395 }
393 } 396 }
394 397
395 window.addEventListener("DOMContentLoaded", initTables, false); 398 window.addEventListener("DOMContentLoaded", initTables, false);
396 window.addEventListener("DOMContentLoaded", changeDates, false); 399 window.addEventListener("DOMContentLoaded", changeDates, false);
LEFTRIGHT

Powered by Google App Engine
This is Rietveld