summaryrefslogtreecommitdiff
path: root/src/web
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-02-18 17:42:17 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-02-18 17:42:17 +0900
commita62fe67e25b012389afb6bd859f1808f7ef7db6f (patch)
tree5d90465bc01786c03f408d863a9b3698554c5cc0 /src/web
parent:v: (diff)
downloadsharkey-a62fe67e25b012389afb6bd859f1808f7ef7db6f.tar.gz
sharkey-a62fe67e25b012389afb6bd859f1808f7ef7db6f.tar.bz2
sharkey-a62fe67e25b012389afb6bd859f1808f7ef7db6f.zip
:v:
Diffstat (limited to 'src/web')
-rw-r--r--src/web/app/desktop/mixins.ls2
-rw-r--r--src/web/app/desktop/scripts/dialog.js16
-rw-r--r--src/web/app/desktop/scripts/dialog.ls17
3 files changed, 17 insertions, 18 deletions
diff --git a/src/web/app/desktop/mixins.ls b/src/web/app/desktop/mixins.ls
index 1c80efa523..d4c704b1c3 100644
--- a/src/web/app/desktop/mixins.ls
+++ b/src/web/app/desktop/mixins.ls
@@ -11,7 +11,7 @@ module.exports = (me) ~>
riot.mixin \notify do
notify: require './scripts/notify'
- dialog = require './scripts/dialog.ls'
+ dialog = require './scripts/dialog'
riot.mixin \dialog do
dialog: dialog
diff --git a/src/web/app/desktop/scripts/dialog.js b/src/web/app/desktop/scripts/dialog.js
new file mode 100644
index 0000000000..6fe7b6e8d7
--- /dev/null
+++ b/src/web/app/desktop/scripts/dialog.js
@@ -0,0 +1,16 @@
+const riot = require('riot');
+
+module.exports = (title, text, buttons, canThrough, onThrough) => {
+ const dialog = document.body.appendChild(document.createElement('mk-dialog'));
+ const controller = riot.observable();
+ riot.mount(dialog, {
+ controller: controller,
+ title: title,
+ text: text,
+ buttons: buttons,
+ canThrough: canThrough,
+ onThrough: onThrough
+ });
+ controller.trigger('open');
+ return controller;
+};
diff --git a/src/web/app/desktop/scripts/dialog.ls b/src/web/app/desktop/scripts/dialog.ls
deleted file mode 100644
index f3dd6cea1b..0000000000
--- a/src/web/app/desktop/scripts/dialog.ls
+++ /dev/null
@@ -1,17 +0,0 @@
-# Dialog
-#================================
-
-riot = require 'riot'
-
-module.exports = (title, text, buttons, can-through, on-through) ~>
- dialog = document.body.append-child document.create-element \mk-dialog
- controller = riot.observable!
- riot.mount dialog, do
- controller: controller
- title: title
- text: text
- buttons: buttons
- can-through: can-through
- on-through: on-through
- controller.trigger \open
- return controller