diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-10-31 20:04:06 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-10-31 20:04:06 +0100 |
commit | 141cb7cba5c36a9c5415772e2de9823f927d7abb (patch) | |
tree | 03354c1437db7760ca0a44f0ec99b1dfb4a7a162 /src | |
parent | 9d97d8f89bc570b1232c0dd8450f489b39023e18 (diff) | |
download | diller-server-141cb7cba5c36a9c5415772e2de9823f927d7abb.tar.gz diller-server-141cb7cba5c36a9c5415772e2de9823f927d7abb.tar.bz2 diller-server-141cb7cba5c36a9c5415772e2de9823f927d7abb.tar.xz diller-server-141cb7cba5c36a9c5415772e2de9823f927d7abb.zip |
web:
o Better form interaction: enter to submit and autofocus on the field.
Diffstat (limited to 'src')
-rw-r--r-- | src/DillerDao.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/DillerDao.js b/src/DillerDao.js index fa27aa1..e372841 100644 --- a/src/DillerDao.js +++ b/src/DillerDao.js @@ -32,7 +32,8 @@ function DillerDao(tx) { var fields = _(attributes).chain() .map(function (value, attribute) { if (attribute == 'name' || attribute == 'description') { - values.push(value); + value = (value || '').trim(); + values.push(value.length > 0 ? value : null); return attribute + ' = $' + i++; } }) |