Merge pull request #1317 from jackyq2015/master
UI improvement on metadata view and project list view
This commit is contained in:
commit
bc686f9cf6
@ -22,7 +22,19 @@
|
||||
"no-proj": "No existing project. Select 'Create Project' on the left to create a new project.",
|
||||
"try-these": "If you have no data to work with, try these",
|
||||
"sample-data": "sample data sets",
|
||||
"change-metadata-value": "Change value of metadata key"
|
||||
"change-metadata-value": "Change value of metadata key",
|
||||
"name": "Project Name:",
|
||||
"created": "Create Time:",
|
||||
"modified": "Last Modified Time:",
|
||||
"creator": "Creator:",
|
||||
"contributors": "Contributors:",
|
||||
"subject": "Subject:",
|
||||
"description": "Description:",
|
||||
"rowCount": "Row Count:",
|
||||
"customMetadata": "Custom Metadata(JSON):",
|
||||
"id": "Project Id:",
|
||||
"date": "Date:",
|
||||
"importOptionMetadata": "Import Option Metadata(JSON):"
|
||||
},
|
||||
"core-index-create": {
|
||||
"create-proj": "Create Project",
|
||||
|
@ -7,7 +7,9 @@ function EditMetadataDialog(metaData, targetRowElem) {
|
||||
this._MetadataUI = function(tr, key, value, project) {
|
||||
var self = this;
|
||||
var td0 = tr.insertCell(0);
|
||||
$(td0).text(key);
|
||||
|
||||
var keyLable = $.i18n._('core-index')[key] || key;
|
||||
$(td0).text(keyLable);
|
||||
|
||||
var td1 = tr.insertCell(1);
|
||||
$(td1).text((value !== null) ? value : "");
|
||||
@ -92,6 +94,8 @@ EditMetadataDialog.prototype._createDialog = function() {
|
||||
|
||||
this._metaDataUIs.push(new this._MetadataUI(tr, k, v, flatMetadata.id));
|
||||
}
|
||||
|
||||
$(".dialog-container").css("top", Math.round(($(".dialog-overlay").height() - $(frame).height()) / 2) + "px");
|
||||
};
|
||||
|
||||
EditMetadataDialog.prototype._dismiss = function() {
|
||||
|
@ -167,7 +167,6 @@ Refine.OpenProjectUI.prototype._renderProjects = function(data) {
|
||||
.addClass("delete-project")
|
||||
.attr("title",$.i18n._('core-index-open')["del-title"])
|
||||
.attr("href","")
|
||||
.css("visibility", "hidden")
|
||||
.html("<img src='images/close.png' />")
|
||||
.click(function() {
|
||||
if (window.confirm($.i18n._('core-index-open')["del-body"] + project.name + "\"?")) {
|
||||
@ -192,7 +191,6 @@ Refine.OpenProjectUI.prototype._renderProjects = function(data) {
|
||||
.text($.i18n._('core-index-open')["rename"])
|
||||
.addClass("secondary")
|
||||
.attr("href", "javascript:{}")
|
||||
.css("visibility", "hidden")
|
||||
.click(function() {
|
||||
var name = window.prompt($.i18n._('core-index-open')["new-title"], project.name);
|
||||
if (name === null) {
|
||||
@ -225,7 +223,6 @@ Refine.OpenProjectUI.prototype._renderProjects = function(data) {
|
||||
.text($.i18n._('core-index-open')["edit-meta-data"])
|
||||
.addClass("secondary")
|
||||
.attr("href", "javascript:{}")
|
||||
.css("visibility", "hidden")
|
||||
.click(function() {
|
||||
new EditMetadataDialog(project, $(this).parent().parent());
|
||||
})
|
||||
@ -264,16 +261,6 @@ Refine.OpenProjectUI.prototype._renderProjects = function(data) {
|
||||
appendMetaField(data[i].value);
|
||||
}
|
||||
}
|
||||
|
||||
$(tr).mouseenter(function() {
|
||||
renameLink.css("visibility", "visible");
|
||||
deleteLink.css("visibility", "visible");
|
||||
editMetadataLink.css("visibility", "visible");
|
||||
}).mouseleave(function() {
|
||||
renameLink.css("visibility", "hidden");
|
||||
deleteLink.css("visibility", "hidden");
|
||||
editMetadataLink.css("visibility", "hidden");
|
||||
});
|
||||
};
|
||||
|
||||
for (var i = 0; i < projects.length; i++) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="dialog-frame" style="width: 1600px; height: 700px">
|
||||
<div class="dialog-frame" style="width: 1600px;">
|
||||
<div class="dialog-border">
|
||||
<div class="dialog-header" bind="dialogHeader"></div>
|
||||
<div class="dialog-body" bind="dialogBody">
|
||||
|
@ -92,14 +92,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
}
|
||||
|
||||
#projects-container > table thead th:nth-child(1) {
|
||||
border: 0;
|
||||
width: 1%
|
||||
}
|
||||
|
||||
#projects-container > table thead th:nth-child(2) {
|
||||
border: 0;
|
||||
width: 3%
|
||||
}
|
||||
|
||||
#projects-container > table thead th:nth-child(3) {
|
||||
left-border: 0;
|
||||
width: 3%
|
||||
}
|
||||
|
||||
@ -119,7 +122,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
#metadata-body tr:nth-child(even) {background: #CCC}
|
||||
#metadata-body table {
|
||||
border-collapse:collapse
|
||||
}
|
||||
|
||||
#metadata-body td {
|
||||
padding: 8px
|
||||
}
|
||||
|
||||
#metadata-body tr:nth-child(even) {background: #BFDBFF}
|
||||
#metadata-body tr:nth-child(odd) {background: #FFF}
|
||||
|
||||
#metadata-body > table {
|
||||
|
Loading…
Reference in New Issue
Block a user