OLD | NEW |
1 <html i18n-values="dir:textdirection;"> | 1 <html i18n-values="dir:textdirection;"> |
2 <head> | 2 <head> |
3 <title></title> | 3 <title></title> |
4 <style type="text/css"> | 4 <style type="text/css"> |
5 body { | 5 body { |
6 line-height: 1.5em; | 6 line-height: 1.5em; |
7 background: #FFFFFF; | 7 background: #FFFFFF; |
8 font-size: 11pt; | 8 font-size: 11pt; |
9 } | 9 } |
10 html[os='mac'] body { | 10 html[os='mac'] body { |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 185 |
186 function setCheckboxesAndErrors(args) { | 186 function setCheckboxesAndErrors(args) { |
187 setChooseDataTypesCheckboxes(args); | 187 setChooseDataTypesCheckboxes(args); |
188 setEncryptionCheckboxes(args); | 188 setEncryptionCheckboxes(args); |
189 setErrorState(args); | 189 setErrorState(args); |
190 } | 190 } |
191 | 191 |
192 function checkAllDataTypeCheckboxes() { | 192 function checkAllDataTypeCheckboxes() { |
193 var checkboxes = document.getElementsByName("dataTypeCheckbox"); | 193 var checkboxes = document.getElementsByName("dataTypeCheckbox"); |
194 for (var i = 0; i < checkboxes.length; i++) { | 194 for (var i = 0; i < checkboxes.length; i++) { |
195 checkboxes[i].checked = true; | 195 // Only check the visible ones (since there's no way to uncheck |
| 196 // the invisible ones). |
| 197 if (checkboxes[i].parentElement.className == "sync-item-show") { |
| 198 checkboxes[i].checked = true; |
| 199 } |
196 } | 200 } |
197 } | 201 } |
198 | 202 |
199 function setCheckboxesToKeepEverythingSynced(value) { | 203 function setCheckboxesToKeepEverythingSynced(value) { |
200 setDataTypeCheckboxesEnabled(!value); | 204 setDataTypeCheckboxesEnabled(!value); |
201 if (value) | 205 if (value) |
202 checkAllDataTypeCheckboxes(); | 206 checkAllDataTypeCheckboxes(); |
203 } | 207 } |
204 | 208 |
205 // Can be called multiple times. | 209 // Can be called multiple times. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 } | 299 } |
296 | 300 |
297 // Returns true if at least one data type is enabled and no data types are | 301 // Returns true if at least one data type is enabled and no data types are |
298 // checked. (If all data type checkboxes are disabled, it's because "keep | 302 // checked. (If all data type checkboxes are disabled, it's because "keep |
299 // everything synced" is checked.) | 303 // everything synced" is checked.) |
300 function noDataTypesChecked() { | 304 function noDataTypesChecked() { |
301 var checkboxes = document.getElementsByName("dataTypeCheckbox"); | 305 var checkboxes = document.getElementsByName("dataTypeCheckbox"); |
302 var atLeastOneChecked = false; | 306 var atLeastOneChecked = false; |
303 var atLeastOneEnabled = false; | 307 var atLeastOneEnabled = false; |
304 for (var i = 0; i < checkboxes.length; i++) { | 308 for (var i = 0; i < checkboxes.length; i++) { |
305 if (!checkboxes[i].disabled && checkboxes[i].style.display != 'none') { | 309 if (!checkboxes[i].disabled && |
| 310 checkboxes[i].parentElement.className == "sync-item-show") { |
306 atLeastOneEnabled = true; | 311 atLeastOneEnabled = true; |
307 if (checkboxes[i].checked) { | 312 if (checkboxes[i].checked) { |
308 atLeastOneChecked = true; | 313 atLeastOneChecked = true; |
309 } | 314 } |
310 } | 315 } |
311 } | 316 } |
312 return atLeastOneEnabled && !atLeastOneChecked; | 317 return atLeastOneEnabled && !atLeastOneChecked; |
313 } | 318 } |
314 | 319 |
315 function sendConfiguration() { | 320 function sendConfiguration() { |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 </div> | 491 </div> |
487 | 492 |
488 <div class="sync-footer"> | 493 <div class="sync-footer"> |
489 <input id="okButton" type="submit" i18n-values="value:ok" /> | 494 <input id="okButton" type="submit" i18n-values="value:ok" /> |
490 <input id="cancelButton" type="button" i18n-values="value:cancel" | 495 <input id="cancelButton" type="button" i18n-values="value:cancel" |
491 onclick='chrome.send("DialogClose", [""])' /> | 496 onclick='chrome.send("DialogClose", [""])' /> |
492 </div> | 497 </div> |
493 </form> | 498 </form> |
494 </body> | 499 </body> |
495 </html> | 500 </html> |
OLD | NEW |