Merge pull request #1313 from jackyq2015/master

adjust the width of the table
This commit is contained in:
Jacky 2017-11-08 17:50:49 -05:00 committed by GitHub
commit 7aa4cfe6c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 45 additions and 4 deletions

View File

@ -403,7 +403,7 @@ public class FileProjectManager extends ProjectManager {
return found;
}
private void mergeEmptyUserMetadata(ProjectMetadata metadata) {
public void mergeEmptyUserMetadata(ProjectMetadata metadata) {
if (metadata == null)
return;

View File

@ -34,7 +34,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
var html = "text/html";
var encoding = "UTF-8";
var ClientSideResourceManager = Packages.com.google.refine.ClientSideResourceManager;
var bundle = true;
var bundle = false;
var templatedFiles = {
// Requests with last path segments mentioned here

View File

@ -108,8 +108,24 @@ Refine.OpenProjectUI.prototype._renderProjects = function(data) {
var project = data.projects[n];
project.id = n;
project.date = Date.parseExact(project.modified, "yyyy-MM-ddTHH:mm:ssZ");
projects.push(project);
for (var n in data.customMetaDataColumns) {
var found = false;
for(var i = 0; i < project.userMetaData.length; i++) {
if (project.userMetaData[i].name === data.customMetaDataColumns[n].name) {
found = true;
break;
}
if (!found) {
project.userMetaData.push({
name: data.customMetaDataColumns[n].name,
dispay: data.customMetaDataColumns[n].display,
value: ""
});
}
}
}
}
projects.push(project);
}
projects.sort(function(a, b) { return b.date.getTime() - a.date.getTime(); });
@ -283,7 +299,8 @@ Refine.OpenProjectUI.prototype._renderProjects = function(data) {
3 : {
sorter : "isoDateParser"
}
}
},
widthFixed: false
});
}
};

View File

@ -90,6 +90,30 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#projects-container > table {
table-layout: fixed
}
#projects-container > table thead th:nth-child(1) {
width: 1%
}
#projects-container > table thead th:nth-child(2) {
width: 3%
}
#projects-container > table thead th:nth-child(3) {
width: 3%
}
#projects-container > table thead th:nth-child(4) {
width: 9%
}
#projects-container > table thead th:nth-child(5) {
width: 15%
}
#projects-container > table thead th:nth-child(8) {
width: 35%
}
#projects-container > table > tbody > tr > td {
word-wrap: break-word;