More helpful UI if the database has changed plus ignore changes that are

just white space or capitalisation
pull/205/head
Christopher Usher 4 years ago
parent 31d241eecc
commit 84f7ef71c1

@ -288,7 +288,8 @@ thrimbletrimmerSubmit = function(state, override_changes=false) {
var error = response.statusText + ": " + text;
console.log(error);
if (response.status == 409) {
if (confirm(text)) {
dialogue = text + "\nClick Ok to submit anyway; Click Cancel to return to editing"
if (confirm(dialogue)) {
thrimbletrimmerSubmit(state, true);
} else {

@ -250,8 +250,8 @@ def update_row(ident, editor=None):
for column in sheet_columns:
if isinstance(old_row[column], datetime.datetime):
old_row[column] = old_row[column].isoformat()
if new_row[column] != old_row[column]:
changes += '{}: Database: {} Thrimbletrimmer: {}\n'.format(column, old_row[column], new_row[column])
if new_row[column].lower().strip() != old_row[column].lower().strip():
changes += u'{}: {} \u2192 {}\n'.format(column, new_row[column], old_row[column])
if changes and not override_changes:
return 'Sheet columns have changed since editing has begun. Please review changes\n' + changes, 409

Loading…
Cancel
Save