Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorjoergmschulz <joergmschulz@users.noreply.github.com>2016-08-06 00:10:55 +0300
committerGitHub <noreply@github.com>2016-08-06 00:10:55 +0300
commit0c757f107833c0bcd4eccf3ec81837b5ede91ba8 (patch)
treedf06610c973d7db98917651b17b5c97fab775512 /js
parent00091e9aa6fd3aaf503ef0ab472e056aed4498d9 (diff)
see issue #71 / handle different entry types
@jaeger-sb proposed a change, in my environment it looks good, so I took the freedom to create this PR. All Kudos to jaeger-sb!
Diffstat (limited to 'js')
-rw-r--r--js/vote.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/js/vote.js b/js/vote.js
index a3004f84..e49f5fe5 100644
--- a/js/vote.js
+++ b/js/vote.js
@@ -34,7 +34,11 @@ $(document).ready(function () {
} else {
newUserTypes.push(-1);
}
- newUserDates.push(parseInt($(this).attr('id')));
+ var userDate = $(this).attr('id');
+ if(isNaN($(this).attr('id')) == true) {
+ newUserDates.push($(this).attr('id'));
+ } else { newUserDates.push(parseInt($(this).attr('id')));
+ }
});
form.elements['dates'].value = JSON.stringify(newUserDates);
form.elements['types'].value = JSON.stringify(newUserTypes);