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

Side by Side Diff: Tools/GardeningServer/scripts/garden-o-matic.js

Issue 359283003: Remove usages of jquery and add sugar.js from garden-o-matic. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove jquery script from ct-sheriff-o-matic Created 6 years, 5 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 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 21 matching lines...) Expand all
32 32
33 var g_unexpectedFailuresController = null; 33 var g_unexpectedFailuresController = null;
34 var g_nonLayoutTestFailureBuilders = null; 34 var g_nonLayoutTestFailureBuilders = null;
35 35
36 var g_updating = false; 36 var g_updating = false;
37 var g_updateButton = null; 37 var g_updateButton = null;
38 38
39 function updatePartyTime() 39 function updatePartyTime()
40 { 40 {
41 if (!g_unexpectedFailuresController.length() && !g_nonLayoutTestFailureBuild ers.hasFailures()) 41 if (!g_unexpectedFailuresController.length() && !g_nonLayoutTestFailureBuild ers.hasFailures())
42 $('#onebar').addClass('partytime'); 42 document.getElementById('onebar').classList.add('partytime');
43 else 43 else
44 $('#onebar').removeClass('partytime'); 44 document.getElementById('onebar').classList.remove('partytime');
45 } 45 }
46 46
47 function updateTreeStatus() 47 function updateTreeStatus()
48 { 48 {
49 var oldTreeStatus = document.querySelector('.treestatus'); 49 var oldTreeStatus = document.querySelector('.treestatus');
50 oldTreeStatus.remove(); 50 oldTreeStatus.remove();
51 51
52 var newTreeStatus = new ui.TreeStatus(); 52 var newTreeStatus = new ui.TreeStatus();
53 document.querySelector('.topbar').appendChild(newTreeStatus); 53 document.querySelector('.topbar').appendChild(newTreeStatus);
54 } 54 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 g_revisionHint.updateWithNode(new ui.revisionDetails()); 97 g_revisionHint.updateWithNode(new ui.revisionDetails());
98 g_info.add(g_revisionHint); 98 g_info.add(g_revisionHint);
99 99
100 g_updating = false; 100 g_updating = false;
101 if (g_updateButton) 101 if (g_updateButton)
102 g_updateButton.disabled = false; 102 g_updateButton.disabled = false;
103 }); 103 });
104 }); 104 });
105 } 105 }
106 106
107 $(document).ready(function() { 107 window.addEventListener('load', function() {
abarth-chromium 2014/06/30 04:26:03 ready -> DOMContentLoaded, right?
ojan 2014/06/30 04:49:59 Ah. I didn't realize that. Done.
108 g_updateTimerId = window.setInterval(update, config.kUpdateFrequency); 108 g_updateTimerId = window.setInterval(update, config.kUpdateFrequency);
109 109
110 window.setInterval(updateTreeStatus, config.kTreeStatusUpdateFrequency); 110 window.setInterval(updateTreeStatus, config.kTreeStatusUpdateFrequency);
111 111
112 pixelzoomer.installEventListeners(); 112 pixelzoomer.installEventListeners();
113 113
114 onebar = new ui.onebar(); 114 onebar = new ui.onebar();
115 onebar.attach(); 115 onebar.attach();
116 116
117 // FIXME: This doesn't belong here. 117 // FIXME: This doesn't belong here.
118 var onebarController = { 118 var onebarController = {
119 showResults: function(resultsView) 119 showResults: function(resultsView)
120 { 120 {
121 var resultsContainer = onebar.results(); 121 var resultsContainer = onebar.results();
122 $(resultsContainer).empty().append(resultsView); 122 resultsContainer.innerHTML = '';
123 resultsContainer.appendChild(resultsView)
123 onebar.select('results'); 124 onebar.select('results');
124 } 125 }
125 }; 126 };
126 127
127 var unexpectedFailuresView = new ui.notifications.Stream(); 128 var unexpectedFailuresView = new ui.notifications.Stream();
128 g_unexpectedFailuresController = new controllers.UnexpectedFailures(model.st ate, unexpectedFailuresView, onebarController); 129 g_unexpectedFailuresController = new controllers.UnexpectedFailures(model.st ate, unexpectedFailuresView, onebarController);
129 130
130 g_info = new ui.notifications.Stream(); 131 g_info = new ui.notifications.Stream();
131 g_nonLayoutTestFailureBuilders = new controllers.FailingBuilders(g_info); 132 g_nonLayoutTestFailureBuilders = new controllers.FailingBuilders(g_info);
132 133
(...skipping 12 matching lines...) Expand all
145 var treeStatus = new ui.TreeStatus(); 146 var treeStatus = new ui.TreeStatus();
146 topBar.appendChild(treeStatus); 147 topBar.appendChild(treeStatus);
147 148
148 unexpected.appendChild(g_info); 149 unexpected.appendChild(g_info);
149 unexpected.appendChild(unexpectedFailuresView); 150 unexpected.appendChild(unexpectedFailuresView);
150 151
151 update(); 152 update();
152 }); 153 });
153 154
154 })(); 155 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698