summaryrefslogtreecommitdiff
path: root/src/web/app/desktop/scripts/input-dialog.ls
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2016-12-29 07:49:51 +0900
committersyuilo <syuilotan@yahoo.co.jp>2016-12-29 07:49:51 +0900
commitb3f42e62af698a67c2250533c437569559f1fdf9 (patch)
treecdf6937576e99cccf85e6fa3aa8860a1173c7cfb /src/web/app/desktop/scripts/input-dialog.ls
downloadsharkey-b3f42e62af698a67c2250533c437569559f1fdf9.tar.gz
sharkey-b3f42e62af698a67c2250533c437569559f1fdf9.tar.bz2
sharkey-b3f42e62af698a67c2250533c437569559f1fdf9.zip
Initial commit :four_leaf_clover:
Diffstat (limited to 'src/web/app/desktop/scripts/input-dialog.ls')
-rw-r--r--src/web/app/desktop/scripts/input-dialog.ls13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/web/app/desktop/scripts/input-dialog.ls b/src/web/app/desktop/scripts/input-dialog.ls
new file mode 100644
index 0000000000..f75b12dd01
--- /dev/null
+++ b/src/web/app/desktop/scripts/input-dialog.ls
@@ -0,0 +1,13 @@
+# Input Dialog
+#================================
+
+riot = require 'riot'
+
+module.exports = (title, placeholder, default-value, on-ok, on-cancel) ~>
+ dialog = document.body.append-child document.create-element \mk-input-dialog
+ riot.mount dialog, do
+ title: title
+ placeholder: placeholder
+ default: default-value
+ on-ok: on-ok
+ on-cancel: on-cancel