| 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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 // Recent activities | 673 // Recent activities |
| 674 | 674 |
| 675 function layoutLowerSections() { | 675 function layoutLowerSections() { |
| 676 // This lower sections are inline blocks so all we need to do is to set the | 676 // This lower sections are inline blocks so all we need to do is to set the |
| 677 // width and opacity. | 677 // width and opacity. |
| 678 var lowerSectionsElement = $('lower-sections'); | 678 var lowerSectionsElement = $('lower-sections'); |
| 679 var recentElement = $('recent-activities'); | 679 var recentElement = $('recent-activities'); |
| 680 var tipsElement = $('tips'); | 680 var tipsElement = $('tips'); |
| 681 var spacer = recentElement.nextElementSibling; | 681 var spacer = recentElement.nextElementSibling; |
| 682 | 682 |
| 683 var totalWidth = useSmallGrid() ? 692 : 940; | 683 var totalWidth = useSmallGrid() ? 692 : 920; |
| 684 var spacing = 20; | 684 var spacing = 20; |
| 685 var rtl = document.documentElement.dir == 'rtl'; | 685 var rtl = document.documentElement.dir == 'rtl'; |
| 686 | 686 |
| 687 var recentShown = shownSections & Section.RECENT; | 687 var recentShown = shownSections & Section.RECENT; |
| 688 var tipsShown = shownSections & Section.TIPS; | 688 var tipsShown = shownSections & Section.TIPS; |
| 689 | 689 |
| 690 if (recentShown || tipsShown) { | 690 if (recentShown || tipsShown) { |
| 691 lowerSectionsElement.style.height = '198px'; | 691 lowerSectionsElement.style.height = '198px'; |
| 692 lowerSectionsElement.style.opacity = ''; | 692 lowerSectionsElement.style.opacity = ''; |
| 693 } else { | 693 } else { |
| (...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1402 el.addEventListener('dragover', bind(this.handleDragOver, this)); | 1402 el.addEventListener('dragover', bind(this.handleDragOver, this)); |
| 1403 el.addEventListener('dragleave', bind(this.handleDragLeave, this)); | 1403 el.addEventListener('dragleave', bind(this.handleDragLeave, this)); |
| 1404 el.addEventListener('drop', bind(this.handleDrop, this)); | 1404 el.addEventListener('drop', bind(this.handleDrop, this)); |
| 1405 el.addEventListener('dragend', bind(this.handleDragEnd, this)); | 1405 el.addEventListener('dragend', bind(this.handleDragEnd, this)); |
| 1406 el.addEventListener('drag', bind(this.handleDrag, this)); | 1406 el.addEventListener('drag', bind(this.handleDrag, this)); |
| 1407 el.addEventListener('mousedown', bind(this.handleMouseDown, this)); | 1407 el.addEventListener('mousedown', bind(this.handleMouseDown, this)); |
| 1408 } | 1408 } |
| 1409 }; | 1409 }; |
| 1410 | 1410 |
| 1411 dnd.init(); | 1411 dnd.init(); |
| OLD | NEW |