Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: chrome/browser/resources/new_new_tab.js

Issue 270081: Facelifts to sync UI (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 1
2 // Helpers 2 // Helpers
3 3
4 function $(id) { 4 function $(id) {
5 return document.getElementById(id); 5 return document.getElementById(id);
6 } 6 }
7 7
8 // TODO(arv): Remove these when classList is available in HTML5. 8 // TODO(arv): Remove these when classList is available in HTML5.
9 // https://bugs.webkit.org/show_bug.cgi?id=20709 9 // https://bugs.webkit.org/show_bug.cgi?id=20709
10 function hasClass(el, name) { 10 function hasClass(el, name) {
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 * 'SyncLinkClicked'). 721 * 'SyncLinkClicked').
722 * linkurl: the URL to use as the element's href (only used if linkurlisset is 722 * linkurl: the URL to use as the element's href (only used if linkurlisset is
723 * true). 723 * true).
724 */ 724 */
725 function syncMessageChanged(newMessage) { 725 function syncMessageChanged(newMessage) {
726 var syncStatusElement = $('sync-status'); 726 var syncStatusElement = $('sync-status');
727 var style = syncStatusElement.style; 727 var style = syncStatusElement.style;
728 728
729 // Hide the section if the message is emtpy. 729 // Hide the section if the message is emtpy.
730 if (!newMessage.syncsectionisvisible) { 730 if (!newMessage.syncsectionisvisible) {
731 style.display = 'none';
731 return; 732 return;
732 } 733 }
733 style.display = 'block'; 734 style.display = 'block';
734 735
735 // Set the sync section background color based on the state. 736 // Set the sync section background color based on the state.
736 if (newMessage.msgtype == 'error') { 737 if (newMessage.msgtype == 'error') {
737 style.backgroundColor = 'tomato'; 738 style.backgroundColor = 'tomato';
738 } else { 739 } else {
739 style.backgroundColor = ''; 740 style.backgroundColor = '';
740 } 741 }
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
1682 function fixLinkUnderline(el) { 1683 function fixLinkUnderline(el) {
1683 var span = document.createElement('span'); 1684 var span = document.createElement('span');
1684 span.className = 'link-color'; 1685 span.className = 'link-color';
1685 while (el.hasChildNodes()) { 1686 while (el.hasChildNodes()) {
1686 span.appendChild(el.firstChild); 1687 span.appendChild(el.firstChild);
1687 } 1688 }
1688 el.appendChild(span); 1689 el.appendChild(span);
1689 } 1690 }
1690 1691
1691 updateAttribution(); 1692 updateAttribution();
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/new_tab_page_sync_handler.cc ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698