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, |