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/app.js
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2017-10-29 23:15:39 +0300
committerdartcafe <github@dartcafe.de>2017-10-29 23:15:39 +0300
commit518f830ab5614d34ec9f01fc05828be3860b2fd4 (patch)
tree02f780568c1b34ff9dabedf887c6e2281fbc2c42 /js/app.js
parent262371a9781e08cca92dafb2bee6534768883964 (diff)
"some" work
Diffstat (limited to 'js/app.js')
-rw-r--r--js/app.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/js/app.js b/js/app.js
new file mode 100644
index 00000000..0d6ad2df
--- /dev/null
+++ b/js/app.js
@@ -0,0 +1,13 @@
+function deletePoll($pollEl) {
+ var str = t('polls', 'Do you really want to delete that poll (new)?') + '\n\n' + $($pollEl).attr('data-value');
+ if (confirm(str)) {
+ var form = document.form_delete_poll;
+ var hiddenId = document.createElement("input");
+ hiddenId.setAttribute("name", "pollId");
+ hiddenId.setAttribute("type", "hidden");
+ form.appendChild(hiddenId);
+ form.elements.pollId.value = $pollEl.id.split('_')[2];
+ form.submit();
+ }
+}
+