* IMDB Tool. Order of save to field now A-Z
* Documentation for tools
* Documentation for tool imdbweb grabber. Default config added.
+ * Fixed bug #3
1.0 - Castle 20210106
* First usable version
* Mass edit of entries
* User and groupmanagement: Check where a user or group is used!
* Better error handling and display while adding / update and delete
-* stats overview page. amount of entries. file and db storage. Version info and where to find it.
+* stats overview page. amount of entries. file / cache and db storage. Version info and where to find it.
* Export of an entry, collection or everything. Stored on disk.
* Import of the export
let listBox = document.getElementById(targetStartString + '-listbox');
let newTagTemplate = document.getElementById(targetStartString + '-template');
- if(saveInput && listBox && elem && newTagTemplate) {
+ let checkString = _checkForSpaceString(elem.value,'nospace');
+
+ if(saveInput && listBox && elem && newTagTemplate && checkString) {
let toAdd = elem.value;
let newSaveValue = _appendToCommaString(saveInput.value,toAdd);
return el;
}
+
+/**
+ * simple check if the string is empty or contains whitespace chars
+ *
+ * @param string
+ * @returns boolean
+ * @private
+ */
+function _checkForSpaceString(stringTocheck) {
+ let check = stringTocheck.replace(/\s/gm,'');
+ if(check === stringTocheck && check.length > 0) {
+ return true;
+ }
+ return false;
+}