change the filed name from rowNumber to rowCount

This commit is contained in:
Jacky 2017-11-08 20:40:22 -05:00
parent 31943f6c9f
commit 428f7dabf8
5 changed files with 13 additions and 13 deletions

View File

@ -68,7 +68,7 @@ public class ProjectMetadata implements Jsonizable {
private String _contributors = ""; private String _contributors = "";
private String _subject = ""; // Several refine projects may be linked private String _subject = ""; // Several refine projects may be linked
private String _description = ""; // free form of comment 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 // import options is an array for 1-n data sources
private JSONArray _importOptionMetadata = new JSONArray(); private JSONArray _importOptionMetadata = new JSONArray();
@ -109,7 +109,7 @@ public class ProjectMetadata implements Jsonizable {
writer.key("contributors"); writer.value(_contributors); writer.key("contributors"); writer.value(_contributors);
writer.key("subject"); writer.value(_subject); writer.key("subject"); writer.value(_subject);
writer.key("description"); writer.value(_description); writer.key("description"); writer.value(_description);
writer.key("rowNumber"); writer.value(_rowNumber); writer.key("rowCount"); writer.value(_rowCount);
writer.key("customMetadata"); writer.object(); writer.key("customMetadata"); writer.object();
for (String key : _customMetadata.keySet()) { for (String key : _customMetadata.keySet()) {
@ -194,7 +194,7 @@ public class ProjectMetadata implements Jsonizable {
pm._contributors = JSONUtilities.getString(obj, "contributors", ""); pm._contributors = JSONUtilities.getString(obj, "contributors", "");
pm._subject = JSONUtilities.getString(obj, "subject", ""); pm._subject = JSONUtilities.getString(obj, "subject", "");
pm._description = JSONUtilities.getString(obj, "description", ""); 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")) { if (obj.has("preferences") && !obj.isNull("preferences")) {
try { try {
@ -389,13 +389,13 @@ public class ProjectMetadata implements Jsonizable {
} }
public int getRowNumber() { public int getRowCount() {
return _rowNumber; return _rowCount;
} }
public void setRowNumber(int rowNumber) { public void setRowCount(int rowCount) {
this._rowNumber = rowNumber; this._rowCount = rowCount;
updateModified(); updateModified();
} }

View File

@ -287,7 +287,7 @@ public class FileProjectManager extends ProjectManager {
jsonWriter.value(id); jsonWriter.value(id);
if (metadata.isDirty()) { if (metadata.isDirty()) {
Project project = ProjectManager.singleton.getProject(id); Project project = ProjectManager.singleton.getProject(id);
metadata.setRowNumber(project.rows.size()); metadata.setRowCount(project.rows.size());
ProjectMetadataUtilities.save(metadata, getProjectDir(id)); ProjectMetadataUtilities.save(metadata, getProjectDir(id));
saveWasNeeded = true; saveWasNeeded = true;
} }

View File

@ -93,7 +93,7 @@
"contributors": "Contributors", "contributors": "Contributors",
"subject": "Subject", "subject": "Subject",
"description": "Description", "description": "Description",
"row-number": "Row Number", "row-count": "Row Count",
"last-mod": "Last modified", "last-mod": "Last modified",
"del-title": "Delete this project", "del-title": "Delete this project",
"del-body": "Are you sure you want to delete project \"", "del-body": "Are you sure you want to delete project \"",

View File

@ -14,7 +14,7 @@ function EditMetadataDialog(metaData, targetRowElem) {
var td2 = tr.insertCell(2); 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() { $('<button class="button">').text($.i18n._('core-index')["edit"]).appendTo(td2).click(function() {
var newValue = window.prompt($.i18n._('core-index')["change-metadata-value"]+" " + key, value); var newValue = window.prompt($.i18n._('core-index')["change-metadata-value"]+" " + key, value);
if (newValue !== null) { if (newValue !== null) {

View File

@ -145,7 +145,7 @@ Refine.OpenProjectUI.prototype._renderProjects = function(data) {
'<th>'+$.i18n._('core-index-open')["creator"]+'</th>' + '<th>'+$.i18n._('core-index-open')["creator"]+'</th>' +
'<th>'+$.i18n._('core-index-open')["subject"]+'</th>' + '<th>'+$.i18n._('core-index-open')["subject"]+'</th>' +
'<th>'+$.i18n._('core-index-open')["description"]+'</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() { (function() {
var htmlDisplay = ""; var htmlDisplay = "";
for (var n in data.customMetadataColumns) { for (var n in data.customMetadataColumns) {
@ -255,7 +255,7 @@ Refine.OpenProjectUI.prototype._renderProjects = function(data) {
appendMetaField(project.creator); appendMetaField(project.creator);
appendMetaField(project.subject); appendMetaField(project.subject);
appendMetaField(project.description, '20%'); appendMetaField(project.description, '20%');
appendMetaField(project.rowNumber); appendMetaField(project.rowCount);
var data = project.userMetadata; var data = project.userMetadata;
for(var i in data) for(var i in data)
@ -345,7 +345,7 @@ Refine.OpenProjectUI.refreshProject = function(tr, metaData) {
refreshMetaField(metaData.creator, index); index++; refreshMetaField(metaData.creator, index); index++;
refreshMetaField(metaData.subject,index); index++; refreshMetaField(metaData.subject,index); index++;
refreshMetaField(metaData.description,index); index++; refreshMetaField(metaData.description,index); index++;
refreshMetaField(metaData.rowNumbe,index); index++; refreshMetaField(metaData.rowCount,index); index++;
var updateUserMetadata = function(ob) { var updateUserMetadata = function(ob) {
var userMetadata = ob.userMetadata; var userMetadata = ob.userMetadata;