| OLD | NEW |
| 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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 // Recent activities | 679 // Recent activities |
| 680 | 680 |
| 681 function layoutLowerSections() { | 681 function layoutLowerSections() { |
| 682 // This lower sections are inline blocks so all we need to do is to set the | 682 // This lower sections are inline blocks so all we need to do is to set the |
| 683 // width and opacity. | 683 // width and opacity. |
| 684 var lowerSectionsElement = $('lower-sections'); | 684 var lowerSectionsElement = $('lower-sections'); |
| 685 var recentElement = $('recent-activities'); | 685 var recentElement = $('recent-activities'); |
| 686 var tipsElement = $('tips'); | 686 var tipsElement = $('tips'); |
| 687 var spacer = recentElement.nextElementSibling; | 687 var spacer = recentElement.nextElementSibling; |
| 688 | 688 |
| 689 var totalWidth = useSmallGrid() ? 692 : 940; | 689 var totalWidth = useSmallGrid() ? 692 : 920; |
| 690 var spacing = 20; | 690 var spacing = 20; |
| 691 var rtl = document.documentElement.dir == 'rtl'; | 691 var rtl = document.documentElement.dir == 'rtl'; |
| 692 | 692 |
| 693 var recentShown = shownSections & Section.RECENT; | 693 var recentShown = shownSections & Section.RECENT; |
| 694 var tipsShown = shownSections & Section.TIPS; | 694 var tipsShown = shownSections & Section.TIPS; |
| 695 | 695 |
| 696 if (recentShown || tipsShown) { | 696 if (recentShown || tipsShown) { |
| 697 lowerSectionsElement.style.height = '198px'; | 697 lowerSectionsElement.style.height = '198px'; |
| 698 lowerSectionsElement.style.opacity = ''; | 698 lowerSectionsElement.style.opacity = ''; |
| 699 } else { | 699 } else { |
| (...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1413 el.addEventListener('dragover', bind(this.handleDragOver, this)); | 1413 el.addEventListener('dragover', bind(this.handleDragOver, this)); |
| 1414 el.addEventListener('dragleave', bind(this.handleDragLeave, this)); | 1414 el.addEventListener('dragleave', bind(this.handleDragLeave, this)); |
| 1415 el.addEventListener('drop', bind(this.handleDrop, this)); | 1415 el.addEventListener('drop', bind(this.handleDrop, this)); |
| 1416 el.addEventListener('dragend', bind(this.handleDragEnd, this)); | 1416 el.addEventListener('dragend', bind(this.handleDragEnd, this)); |
| 1417 el.addEventListener('drag', bind(this.handleDrag, this)); | 1417 el.addEventListener('drag', bind(this.handleDrag, this)); |
| 1418 el.addEventListener('mousedown', bind(this.handleMouseDown, this)); | 1418 el.addEventListener('mousedown', bind(this.handleMouseDown, this)); |
| 1419 } | 1419 } |
| 1420 }; | 1420 }; |
| 1421 | 1421 |
| 1422 dnd.init(); | 1422 dnd.init(); |
| OLD | NEW |