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

Unified Diff: Tools/GardeningServer/scripts/ui.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: merge to ToT Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Tools/GardeningServer/scripts/third_party/sugar.js ('k') | Tools/GardeningServer/scripts/ui/failures.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/GardeningServer/scripts/ui.js
diff --git a/Tools/GardeningServer/scripts/ui.js b/Tools/GardeningServer/scripts/ui.js
index 9d4b7c303180d319da5847a7adc30cee81d46e2d..8787c6e0d0494f121d0a6b282dd0ed60ee10a8f6 100644
--- a/Tools/GardeningServer/scripts/ui.js
+++ b/Tools/GardeningServer/scripts/ui.js
@@ -29,7 +29,7 @@ var ui = ui || {};
ui.displayURLForBuilder = function(builderName)
{
- return config.waterfallURL + '?' + $.param({
+ return config.waterfallURL + '?' + base.queryParam({
'builder': builderName
});
}
@@ -75,8 +75,8 @@ ui.setUseNewWindowForLinks = function(enabled)
else
delete localStorage[ui.kUseNewWindowForLinksSetting];
- $('a').each(function() {
- ui.setTargetForLink(this);
+ [].forEach.call(document.querySelectorAll('a'), function(link) {
+ ui.setTargetForLink(link);
});
}
ui.setUseNewWindowForLinks(!!localStorage[ui.kUseNewWindowForLinksSetting]);
@@ -147,8 +147,9 @@ ui.onebar = base.extends('div', {
},
_setupLinkSettingHandler: function()
{
- $('#new-window-for-links').attr('checked', ui.useNewWindowForLinks);
- $('#new-window-for-links').change(function(event) {
+ if (ui.useNewWindowForLinks)
+ document.getElementById('new-window-for-links').setAttribute('checked', true);
+ document.getElementById('new-window-for-links').addEventListener('change', function(event) {
ui.setUseNewWindowForLinks(this.checked);
});
},
@@ -278,32 +279,29 @@ ui.revisionDetails = base.extends('span', {
theSpan.appendChild(revisionsNode);
// This adds a pop-up when we hover over the summary if the details aren't being shown.
- var revisionsPopUp = $('<span id="revisionPopUp">').appendTo(summaryLinkNode);
- revisionsPopUp.append($(revisionsTableNode).clone());
- $(summaryLinkNode).mouseover(function(ev) {
+ var revisionsPopUp = document.createElement('span')
+ revisionsPopUp.id = 'revisionPopUp';
+ summaryLinkNode.appendChild(revisionsPopUp);
+ revisionsPopUp.appendChild(revisionsTableNode.cloneNode(true));
+
+ summaryLinkNode.addEventListener('mouseover', function(event) {
if (!revisionsNode.open) {
- var tPosX = $(summaryNode).position().left;
- var tPosY = $(summaryNode).position().top + 16;
- $(revisionsPopUp).css({'position': 'absolute', 'top': tPosY, 'left': tPosX});
- $(revisionsPopUp).addClass('active');
+ revisionsPopUp.style.position = 'absolute';
+ revisionsPopUp.style.left = summaryNode.offsetLeft + 'px';
+ revisionsPopUp.style.top = (summaryNode.offsetTop + summaryNode.offsetHeight) + 'px';
+ revisionsPopUp.classList.add('active');
}
});
- $(summaryLinkNode).mouseout(function(ev) {
+
+ summaryLinkNode.addEventListener('mouseout', function(event) {
if (!revisionsNode.open) {
- $(revisionsPopUp).removeClass("active");
+ revisionsPopUp.classList.remove("active");
}
});
var totRevision = model.latestRevision();
theSpan.appendChild(document.createTextNode(', trunk is at '));
theSpan.appendChild(ui.createLinkNode(trac.changesetURL(totRevision), totRevision));
-
- // We want this feature, but need to fetch the lastBlinkRollRevision via the interwebs.
- // Promise.all([checkout.lastBlinkRollRevision(), rollbot.fetchCurrentRoll()]).then(function(results) {
- // theSpan.lastRolledRevision = results[0];
- // theSpan.roll = results[1];
- // theSpan.updateUI(totRevision);
- // });
}
});
« no previous file with comments | « Tools/GardeningServer/scripts/third_party/sugar.js ('k') | Tools/GardeningServer/scripts/ui/failures.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698