diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-02-18 17:43:31 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-02-18 17:43:31 +0900 |
| commit | a5ece57e3dcbc184ce8bafe88db52d4e6b845f5b (patch) | |
| tree | eb5fa7d8169958127a31c38354d6cb975259cb0a | |
| parent | :v: (diff) | |
| download | sharkey-a5ece57e3dcbc184ce8bafe88db52d4e6b845f5b.tar.gz sharkey-a5ece57e3dcbc184ce8bafe88db52d4e6b845f5b.tar.bz2 sharkey-a5ece57e3dcbc184ce8bafe88db52d4e6b845f5b.zip | |
:v:
| -rw-r--r-- | src/web/app/desktop/mixins.ls | 2 | ||||
| -rw-r--r-- | src/web/app/desktop/scripts/input-dialog.js | 12 | ||||
| -rw-r--r-- | src/web/app/desktop/scripts/input-dialog.ls | 13 |
3 files changed, 13 insertions, 14 deletions
diff --git a/src/web/app/desktop/mixins.ls b/src/web/app/desktop/mixins.ls index d4c704b1c3..9613bcc77a 100644 --- a/src/web/app/desktop/mixins.ls +++ b/src/web/app/desktop/mixins.ls @@ -26,7 +26,7 @@ module.exports = (me) ~> ] riot.mixin \input-dialog do - input-dialog: require './scripts/input-dialog.ls' + input-dialog: require './scripts/input-dialog' riot.mixin \update-avatar do update-avatar: require './scripts/update-avatar.ls' diff --git a/src/web/app/desktop/scripts/input-dialog.js b/src/web/app/desktop/scripts/input-dialog.js new file mode 100644 index 0000000000..ab9c57401f --- /dev/null +++ b/src/web/app/desktop/scripts/input-dialog.js @@ -0,0 +1,12 @@ +const riot = require('riot'); + +module.exports = (title, placeholder, defaultValue, onOk, onCancel) => { + const dialog = document.body.appendChild(document.createElement('mk-input-dialog')); + return riot.mount(dialog, { + title: title, + placeholder: placeholder, + 'default': defaultValue, + onOk: onOk, + onCancel: onCancel + }); +}; diff --git a/src/web/app/desktop/scripts/input-dialog.ls b/src/web/app/desktop/scripts/input-dialog.ls deleted file mode 100644 index f75b12dd01..0000000000 --- a/src/web/app/desktop/scripts/input-dialog.ls +++ /dev/null @@ -1,13 +0,0 @@ -# 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 |