Merge pull request #1315 from jackyq2015/master
change the filed name from rowNumber to rowCount
This commit is contained in:
commit
58ca14585e
@ -68,7 +68,7 @@ public class ProjectMetadata implements Jsonizable {
|
||||
private String _contributors = "";
|
||||
private String _subject = ""; // Several refine projects may be linked
|
||||
private String _description = ""; // free form of comment
|
||||
private int _rowNumber; // at the creation. Essential for cleaning old projects too heavy
|
||||
private int _rowCount; // at the creation. Essential for cleaning old projects too heavy
|
||||
|
||||
// import options is an array for 1-n data sources
|
||||
private JSONArray _importOptionMetadata = new JSONArray();
|
||||
@ -109,7 +109,7 @@ public class ProjectMetadata implements Jsonizable {
|
||||
writer.key("contributors"); writer.value(_contributors);
|
||||
writer.key("subject"); writer.value(_subject);
|
||||
writer.key("description"); writer.value(_description);
|
||||
writer.key("rowNumber"); writer.value(_rowNumber);
|
||||
writer.key("rowCount"); writer.value(_rowCount);
|
||||
|
||||
writer.key("customMetadata"); writer.object();
|
||||
for (String key : _customMetadata.keySet()) {
|
||||
@ -194,7 +194,7 @@ public class ProjectMetadata implements Jsonizable {
|
||||
pm._contributors = JSONUtilities.getString(obj, "contributors", "");
|
||||
pm._subject = JSONUtilities.getString(obj, "subject", "");
|
||||
pm._description = JSONUtilities.getString(obj, "description", "");
|
||||
pm._rowNumber = JSONUtilities.getInt(obj, "rowNumber", 0);
|
||||
pm._rowCount = JSONUtilities.getInt(obj, "rowCount", 0);
|
||||
|
||||
if (obj.has("preferences") && !obj.isNull("preferences")) {
|
||||
try {
|
||||
@ -389,13 +389,13 @@ public class ProjectMetadata implements Jsonizable {
|
||||
}
|
||||
|
||||
|
||||
public int getRowNumber() {
|
||||
return _rowNumber;
|
||||
public int getRowCount() {
|
||||
return _rowCount;
|
||||
}
|
||||
|
||||
|
||||
public void setRowNumber(int rowNumber) {
|
||||
this._rowNumber = rowNumber;
|
||||
public void setRowCount(int rowCount) {
|
||||
this._rowCount = rowCount;
|
||||
updateModified();
|
||||
}
|
||||
|
||||
|
@ -287,7 +287,7 @@ public class FileProjectManager extends ProjectManager {
|
||||
jsonWriter.value(id);
|
||||
if (metadata.isDirty()) {
|
||||
Project project = ProjectManager.singleton.getProject(id);
|
||||
metadata.setRowNumber(project.rows.size());
|
||||
metadata.setRowCount(project.rows.size());
|
||||
ProjectMetadataUtilities.save(metadata, getProjectDir(id));
|
||||
saveWasNeeded = true;
|
||||
}
|
||||
|
@ -93,7 +93,7 @@
|
||||
"contributors": "Contributors",
|
||||
"subject": "Subject",
|
||||
"description": "Description",
|
||||
"row-number": "Row Number",
|
||||
"row-count": "Row Count",
|
||||
"last-mod": "Last modified",
|
||||
"del-title": "Delete this project",
|
||||
"del-body": "Are you sure you want to delete project \"",
|
||||
|
@ -14,7 +14,7 @@ function EditMetadataDialog(metaData, targetRowElem) {
|
||||
|
||||
var td2 = tr.insertCell(2);
|
||||
|
||||
if (key !== "modified" && key !== "rowNumber" && key !== "importOptionMetadata" && key !== "id") {
|
||||
if (key !== "modified" && key !== "rowCount" && key !== "importOptionMetadata" && key !== "id") {
|
||||
$('<button class="button">').text($.i18n._('core-index')["edit"]).appendTo(td2).click(function() {
|
||||
var newValue = window.prompt($.i18n._('core-index')["change-metadata-value"]+" " + key, value);
|
||||
if (newValue !== null) {
|
||||
|
@ -145,7 +145,7 @@ Refine.OpenProjectUI.prototype._renderProjects = function(data) {
|
||||
'<th>'+$.i18n._('core-index-open')["creator"]+'</th>' +
|
||||
'<th>'+$.i18n._('core-index-open')["subject"]+'</th>' +
|
||||
'<th>'+$.i18n._('core-index-open')["description"]+'</th>' +
|
||||
'<th>'+$.i18n._('core-index-open')["row-number"]+'</th>' +
|
||||
'<th>'+$.i18n._('core-index-open')["row-count"]+'</th>' +
|
||||
(function() {
|
||||
var htmlDisplay = "";
|
||||
for (var n in data.customMetadataColumns) {
|
||||
@ -255,7 +255,7 @@ Refine.OpenProjectUI.prototype._renderProjects = function(data) {
|
||||
appendMetaField(project.creator);
|
||||
appendMetaField(project.subject);
|
||||
appendMetaField(project.description, '20%');
|
||||
appendMetaField(project.rowNumber);
|
||||
appendMetaField(project.rowCount);
|
||||
|
||||
var data = project.userMetadata;
|
||||
for(var i in data)
|
||||
@ -345,7 +345,7 @@ Refine.OpenProjectUI.refreshProject = function(tr, metaData) {
|
||||
refreshMetaField(metaData.creator, index); index++;
|
||||
refreshMetaField(metaData.subject,index); index++;
|
||||
refreshMetaField(metaData.description,index); index++;
|
||||
refreshMetaField(metaData.rowNumbe,index); index++;
|
||||
refreshMetaField(metaData.rowCount,index); index++;
|
||||
|
||||
var updateUserMetadata = function(ob) {
|
||||
var userMetadata = ob.userMetadata;
|
||||
|
Loading…
Reference in New Issue
Block a user