summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorGabriel Luong2013-06-11 15:01:37 (EDT)
committer Mark Macdonald2013-06-12 12:11:01 (EDT)
commit8498fe98844e094ad16013cf7a283cdf2cc80c79 (patch)
tree01f0419a75bd7f9d8f16265257421ca7ae7b6ecb
parent3824eeb8e9d823698741501163ae3b94fe9e3f0c (diff)
downloadorg.eclipse.orion.client-8498fe98844e094ad16013cf7a283cdf2cc80c79.zip
org.eclipse.orion.client-8498fe98844e094ad16013cf7a283cdf2cc80c79.tar.gz
org.eclipse.orion.client-8498fe98844e094ad16013cf7a283cdf2cc80c79.tar.bz2
Bug 410105 - The Recent Operations popup looks awful
-rw-r--r--bundles/org.eclipse.orion.client.ui/web/css/theme.css63
-rw-r--r--bundles/org.eclipse.orion.client.ui/web/orion/webui/dialogs/OperationsDialog.js63
2 files changed, 69 insertions, 57 deletions
diff --git a/bundles/org.eclipse.orion.client.ui/web/css/theme.css b/bundles/org.eclipse.orion.client.ui/web/css/theme.css
index 235fa2a..ce51fe9 100644
--- a/bundles/org.eclipse.orion.client.ui/web/css/theme.css
+++ b/bundles/org.eclipse.orion.client.ui/web/css/theme.css
@@ -19,8 +19,8 @@
display: -ms-flexbox; /* TWEENER - IE 10 */
display: -webkit-flex; /* NEW - Chrome */
display: flex;
- width:calc(100% - 10px - 3px);
- whitespace:nowrap;
+ width: calc(100% - 10px - 3px);
+ whitespace: nowrap;
}
a {
@@ -37,7 +37,7 @@ a:hover {
.primaryNav {
font-size: 8pt;
- font-weight:normal;
+ font-weight: normal;
color: #BFBFBF;
vertical-align: baseline;
}
@@ -66,12 +66,12 @@ a:hover {
.titleArea {
margin: 0;
- padding-top:3px;
+ padding-top: 3px;
border: 0;
background: #EFEFEF;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#EFEFEF), color-stop(100%,#EFEFEF));
border-bottom: 1px solid #DEDEDE;
- min-height:20px;
+ min-height: 20px;
}
/* Row selection */
@@ -85,14 +85,13 @@ a:hover {
color: black;
}
-
/* Breadcrumbs */
.breadcrumb {
font-size: 8pt;
text-decoration: none;
color: #CCC;
- padding-top:2px;
+ padding-top: 2px;
}
a.breadcrumb:hover {
@@ -120,7 +119,7 @@ a.breadcrumb:hover {
color: #444;
text-decoration: none;
text-wrap: normal;
- line-height:10pt;
+ line-height: 10pt;
}
a.currentLocation:hover {
@@ -174,17 +173,17 @@ a.currentLocation:hover {
width: 15em;
height: 16px;
border-radius: 10px; /* 10px */
- color:#999;
- padding:0;
- padding-left:20px;
- padding-right:16px;
- margin-left:5px;
+ color: #999;
+ padding: 0;
+ padding-left: 20px;
+ padding-right: 16px;
+ margin-left: 5px;
font: 7pt Lucida Sans Unicode,Lucida Grande,Verdana,Arial,Helvetica,Myriad,Tahoma,clean,sans-serif !important;
}
.searchbox:focus{
color: white;
- outline:none;
+ outline: none;
}
/* Orion button provides standard padding, margin, alignment for any button, regardless of whether it is a command or not. Using
@@ -196,7 +195,7 @@ a.currentLocation:hover {
vertical-align: baseline;
display: inline-block;
padding: 2px 6px 3px;
- border-radius:2px;
+ border-radius: 2px;
line-height: 12px;
font: 8pt Lucida Sans Unicode,Lucida Grande,Verdana,Arial,Helvetica,Myriad,Tahoma,clean,sans-serif; /* to override user agent stylesheet */
margin: 0; /* to override user agent stylesheet */
@@ -206,7 +205,7 @@ a.currentLocation:hover {
color: #222;
border: 1px solid #dedede;
background-color: #ddd;
- border-radius:2px;
+ border-radius: 2px;
}
.commandButton:hover, .commandButton:focus {
@@ -240,7 +239,7 @@ a.currentLocation:hover {
/* should be used in conjunction with .commandButton when a tool has no icon. */
.commandMissingImageButton {
- font-weight:bold;
+ font-weight: bold;
}
.commandLink {
@@ -296,12 +295,13 @@ a.currentLocation:hover {
height: 16px;
display: inline-block;
vertical-align: top;
- cursor:pointer;
+ cursor: pointer;
}
.dropdownArrowDown {
background-position: 0 -422px;
- width: 5px; height: 3px;
+ width: 5px;
+ height: 3px;
background-image: url(../images/core_sprites.png);
display: inline-block;
margin: 4px 4px 0;
@@ -310,7 +310,8 @@ a.currentLocation:hover {
.dropdownArrowRight {
background-position: 0 -654px;
- width: 6px; height: 11px;
+ width: 6px;
+ height: 11px;
background-image: url(../images/core_sprites.png);
margin-right: 4px;
vertical-align: middle;
@@ -373,7 +374,7 @@ a.currentLocation:hover {
.dropdownMenu > li > *:focus {
outline: 1px dotted #ddd;
background: #f3f6fe;
- padding-right:0;
+ padding-right: 0;
}
.dropdownMenu > li:hover {
@@ -397,7 +398,7 @@ a.currentLocation:hover {
display: inline-block;
vertical-align: baseline;
color: #222 !important;
- padding:5px;
+ padding: 5px;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
@@ -430,12 +431,24 @@ a.currentLocation:hover {
z-index: 200;
}
-.tooltip.left {
+.tooltip .left {
min-width: 15em;
}
.tooltip .navlinkonpage {
- color:skyblue;
+ color: skyblue;
+}
+
+.tooltip h2 {
+ color: #fafafa;
+}
+
+.tooltip .operationStatus {
+ color: skyblue;
+}
+
+.tooltip .operationError {
+ color: orangered;
}
.tooltipTailFromleft {
@@ -568,7 +581,7 @@ a.currentLocation:hover {
.dialogDismiss {
display: block;
cursor: pointer;
- padding:2px;
+ padding: 2px;
}
.dialogContent {
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/webui/dialogs/OperationsDialog.js b/bundles/org.eclipse.orion.client.ui/web/orion/webui/dialogs/OperationsDialog.js
index 9ed6b77..e5f038d 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/webui/dialogs/OperationsDialog.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/webui/dialogs/OperationsDialog.js
@@ -1,6 +1,6 @@
/*******************************************************************************
* @license
- * Copyright (c) 2010, 2012 IBM Corporation and others.
+ * Copyright (c) 2010, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the Eclipse Public License v1.0
* (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
@@ -30,20 +30,20 @@ function(messages, require, lib, popupdialog, mOperationsCommands) {
OperationsDialog.prototype.TEMPLATE =
'<table style="width: 360px;"><tr>' + //$NON-NLS-0$
'<td><h2>Recent operations</h2></td>' + //$NON-NLS-0$
- '<td style="text-align: right;"><a id="allOperationsLink">All Operations</a></td>' + //$NON-NLS-0$
+ '<td style="text-align: right;"><a id="allOperationsLink" class="navlinkonpage">All Operations</a></td>' + //$NON-NLS-0$
'</tr></table>' + //$NON-NLS-0$
- '<span id="operationsExist">' + //$NON-NLS-0$
- '<span class="secondaryColumn" id="myOperationsListEmpty">No operations running on this page.</span>' + //$NON-NLS-0$
+ '<div id="operationsExist">' + //$NON-NLS-0$
+ '<div style="padding-left: 7px" id="myOperationsListEmpty">No operations running on this page.</div>' + //$NON-NLS-0$
'<table id="myOperationsList" style="display: none;"></table>' + //$NON-NLS-0$
- '</span>' + //$NON-NLS-0$
- '<span class="secondaryColumn" id="operationsDontExist">No operations running.</span>'; //$NON-NLS-0$
+ '</div>' + //$NON-NLS-0$
+ '<div style="padding-left: 7px" id="operationsDontExist">No operations running.</div>'; //$NON-NLS-0$
OperationsDialog.prototype._init = function(options) {
this._myOperations = [];
this._operationsDeferreds = [];
this._commandService = options.commandRegistry;
- mOperationsCommands.createOperationsCommands(this._commandService);
+ mOperationsCommands.createOperationsCommands(this._commandService);
this._commandService.registerCommandContribution("operationsDialogItems", "eclipse.cancelOperation", 1); //$NON-NLS-1$ //$NON-NLS-0$
this._initialize(options.triggerNode);
};
@@ -54,21 +54,22 @@ function(messages, require, lib, popupdialog, mOperationsCommands) {
};
OperationsDialog.prototype.setOperations = function(operations, deferreds){
- if(!this._myOperations){
- this._init(this._options)
+ if (!this._myOperations) {
+ this._init(this._options);
}
this._myOperations = [];
this._operationsDeferreds = [];
- if(operations)
- for(var i in operations){
+ if (operations) {
+ for (var i in operations) {
this._myOperations.push(operations[i]);
this._operationsDeferreds.push(deferreds[i]);
}
+ }
this._renderOperations();
};
OperationsDialog.prototype.parseProgressResult = function(message){
- if(!message){
+ if (!message) {
return {};
}
//could either be responseText from xhrGet or just a string
@@ -79,7 +80,7 @@ function(messages, require, lib, popupdialog, mOperationsCommands) {
} catch(error) {
//it is not JSON, just continue;
}
- var ret = {Message: status.Message || status, Severity: status.Severity};
+ var ret = { Message: status.Message || status, Severity: status.Severity };
if(status.DetailedMessage && status.DetailedMessage !== ret.Message){
ret.DetailedMessage = status.DetailedMessage;
}
@@ -92,25 +93,21 @@ function(messages, require, lib, popupdialog, mOperationsCommands) {
OperationsDialog.prototype._renderOperationsTable = function(operationsTable, operations, deferreds){
lib.empty(operationsTable);
- for(var i=0; i<operations.length; i++){
+ for (var i = 0; i < operations.length; i++) {
var operation = operations[i];
var tr = document.createElement("tr"); //$NON-NLS-0$
var col = document.createElement("td"); //$NON-NLS-0$
- col.style.paddingLeft = "5px;"; //$NON-NLS-0$
- col.style.paddingRight = "5px;"; //$NON-NLS-0$
+ col.style.paddingLeft = "5px"; //$NON-NLS-0$
+ col.style.paddingRight = "5px"; //$NON-NLS-0$
col.textContent = operation.Name;
tr.appendChild(col);
+
var div = document.createElement("div"); //$NON-NLS-0$
col.appendChild(div);
var operationIcon = document.createElement("span"); //$NON-NLS-0$
- div.appendChild(operationIcon);
+ operationIcon.style.paddingRight = "5px"; //$NON-NLS-0$
operationIcon.classList.add("imageSprite"); //$NON-NLS-0$
-
- var link = document.createElement("span"); //$NON-NLS-0$
- link.classList.add("primaryColumn"); //$NON-NLS-0$
- div.appendChild(link);
- link.appendChild(document.createTextNode(operation.Name));
switch (operation.type) {
case "Warning": //$NON-NLS-0$
@@ -137,20 +134,22 @@ function(messages, require, lib, popupdialog, mOperationsCommands) {
break;
}
- if(operation.error){
+ div.appendChild(operationIcon);
+
+ var operationStatus = document.createElement("span"); //$NON-NLS-0$
+ operationStatus.classList.add("operationStatus"); //$NON-NLS-0$
+ operationStatus.textContent = operation.Name;
+ div.appendChild(operationStatus);
+
+ if (operation.error) {
var message = operation.error.Message || operation.error;
- if(operation.error.DetailedMessage && operation.error.DetailedMessage!=="")
+ if (operation.error.DetailedMessage && operation.error.DetailedMessage !== "")
message += ": " + operation.error.DetailedMessage; //$NON-NLS-0$
- div.appendChild(document.createElement("br")); //$NON-NLS-0$
- var span = document.createElement("span"); //$NON-NLS-0$
- span.classList.add("secondaryColumn"); //$NON-NLS-0$
- span.style.marginLeft = "18px;"; //$NON-NLS-0$
- div.appendChild(span);
- span.textContent = message;
+ operationStatus.textContent = message;
+ operationStatus.classList.remove("operationStatus"); //$NON-NLS-0$
+ operationStatus.classList.add("operationError"); //$NON-NLS-0$
}
- var operationActions = document.createElement("span"); //$NON-NLS-0$
- div.appendChild(operationActions);
this._commandService.renderCommands("operationsDialogItems", div, {operation: operation, deferred: deferreds[i]}, this, "tool"); //$NON-NLS-0$
operationsTable.appendChild(tr);