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

Unified Diff: Tools/GardeningServer/scripts/ui.js

Issue 356273002: Remove StatusArea code from GOM it's dead. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/controllers.js ('k') | Tools/GardeningServer/scripts/ui/actions.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 f4e0cb6a5afbc29509d4cf0aef5a9114aad8dc21..ec7328c499ad52efd19b796f3ed58c3f05085413 100644
--- a/Tools/GardeningServer/scripts/ui.js
+++ b/Tools/GardeningServer/scripts/ui.js
@@ -223,99 +223,6 @@ ui.TreeStatus = base.extends('div', {
},
});
-ui.StatusArea = base.extends('div', {
- init: function()
- {
- // This is a Singleton.
- if (ui.StatusArea._instance)
- return ui.StatusArea._instance;
- ui.StatusArea._instance = this;
-
- var kMinimumStatusAreaHeightPx = 60;
- var dragger = document.createElement('div');
- var initialY;
- var initialHeight;
- dragger.className = 'dragger';
- $(dragger).mousedown(function(e) {
- initialY = e.pageY;
- initialHeight = $(this).height();
- $(document.body).addClass('status-resizing');
- }.bind(this));
- $(document.body).mouseup(function(e) {
- initialY = 0;
- initialHeight = 0;
- $(document.body).removeClass('status-resizing');
- });
- $(document.body).mousemove(function(e) {
- if (initialY) {
- var newHeight = initialHeight + initialY - e.pageY;
- if (newHeight >= kMinimumStatusAreaHeightPx)
- $(this).height(newHeight);
- e.preventDefault();
- }
- }.bind(this));
- this.appendChild(dragger);
-
- this.contents = document.createElement('div');
- this.contents.className = 'contents';
- this.appendChild(this.contents);
-
- this.className = 'status';
- document.body.appendChild(this);
- this._currentId = 0;
- this._unfinishedIds = {};
-
- this.appendChild(new ui.actions.List([new ui.actions.Close()]));
- $(this).bind('close', this.close.bind(this));
-
- var processing = document.createElement('progress');
- processing.className = 'process-text';
- processing.textContent = 'Processing...';
- this.appendChild(processing);
- },
- close: function()
- {
- this.style.visibility = 'hidden';
- Array.prototype.forEach.call(this.querySelectorAll('.status-content'), function(node) {
- node.parentNode.removeChild(node);
- });
- },
- addMessage: function(id, message)
- {
- this.style.visibility = 'visible';
- $(this).addClass('processing');
-
- var element = document.createElement('div');
- $(element).addClass('message').text(message);
-
- var content = this.querySelector('#' + id);
- if (!content) {
- content = document.createElement('div');
- content.id = id;
- content.className = 'status-content';
- this.contents.appendChild(content);
- }
-
- content.appendChild(element);
- if (element.offsetTop < this.scrollTop || element.offsetTop + element.offsetHeight > this.scrollTop + this.offsetHeight)
- this.scrollTop = element.offsetTop;
- },
- // FIXME: It's unclear whether this code could live here or in a controller.
- addFinalMessage: function(id, message)
- {
- this.addMessage(id, message);
-
- delete this._unfinishedIds[id];
- if (!Object.keys(this._unfinishedIds).length)
- $(this).removeClass('processing');
- },
- newId: function() {
- var id = 'status-content-' + ++this._currentId;
- this._unfinishedIds[id] = 1;
- return id;
- }
-});
-
ui.revisionDetails = base.extends('span', {
// We only support 2 levels of visual escalation levels: warning and critical.
warnRollRevisionSpanThreshold: 45,
« no previous file with comments | « Tools/GardeningServer/scripts/controllers.js ('k') | Tools/GardeningServer/scripts/ui/actions.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698