mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Improve checking for missing titles
This commit is contained in:
parent
a485eb8588
commit
903cdc09cc
@ -104,6 +104,10 @@ XLSXImporter.prototype.processRowByColumn = function() {
|
||||
self.tiddlerFields[name] = cell.w;
|
||||
}
|
||||
});
|
||||
// Skip the tiddler entirely if it doesn't have a title
|
||||
if(!this.tiddlerFields.title) {
|
||||
this.skipTiddler = true;
|
||||
}
|
||||
};
|
||||
|
||||
XLSXImporter.prototype.processRowByField = function() {
|
||||
@ -139,12 +143,6 @@ XLSXImporter.prototype.processField = function(fieldImportSpecTitle) {
|
||||
value = fieldImportSpec.fields["import-field-value"]
|
||||
break;
|
||||
}
|
||||
if(fieldImportSpec.fields["import-field-prefix"]) {
|
||||
value = fieldImportSpec.fields["import-field-prefix"] + value;
|
||||
}
|
||||
if(fieldImportSpec.fields["import-field-suffix"]) {
|
||||
value = value + fieldImportSpec.fields["import-field-suffix"];
|
||||
}
|
||||
if((value || "").trim() === "") {
|
||||
if((fieldImportSpec.fields["import-field-skip-tiddler-if-blank"] || "").trim().toLowerCase() === "yes") {
|
||||
this.skipTiddler = true;
|
||||
@ -153,6 +151,12 @@ XLSXImporter.prototype.processField = function(fieldImportSpecTitle) {
|
||||
value = fieldImportSpec.fields["import-field-replace-blank"];
|
||||
}
|
||||
}
|
||||
if(fieldImportSpec.fields["import-field-prefix"]) {
|
||||
value = fieldImportSpec.fields["import-field-prefix"] + value;
|
||||
}
|
||||
if(fieldImportSpec.fields["import-field-suffix"]) {
|
||||
value = value + fieldImportSpec.fields["import-field-suffix"];
|
||||
}
|
||||
switch(fieldImportSpec.fields["import-field-list-op"] || "none") {
|
||||
case "none":
|
||||
this.tiddlerFields[fieldName] = value;
|
||||
|
Loading…
Reference in New Issue
Block a user