diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-02-18 17:39:15 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-02-18 17:39:15 +0900 |
| commit | c83302bb80d2b1cab884526b5296d8e10ae3c03f (patch) | |
| tree | 12bb5637a3598b12b2f77966b882ccf3e69d5d24 /src/web | |
| parent | Merge branch 'master' into no-ls (diff) | |
| download | sharkey-c83302bb80d2b1cab884526b5296d8e10ae3c03f.tar.gz sharkey-c83302bb80d2b1cab884526b5296d8e10ae3c03f.tar.bz2 sharkey-c83302bb80d2b1cab884526b5296d8e10ae3c03f.zip | |
:v:
Diffstat (limited to 'src/web')
| -rw-r--r-- | src/web/app/desktop/mixins.ls | 2 | ||||
| -rw-r--r-- | src/web/app/desktop/scripts/open-window.js | 8 | ||||
| -rw-r--r-- | src/web/app/desktop/scripts/open-window.ls | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/web/app/desktop/mixins.ls b/src/web/app/desktop/mixins.ls index 900d7ee193..cb3c93a3df 100644 --- a/src/web/app/desktop/mixins.ls +++ b/src/web/app/desktop/mixins.ls @@ -6,7 +6,7 @@ module.exports = (me) ~> require './scripts/user-preview' - require './scripts/open-window.ls' + require './scripts/open-window' riot.mixin \notify do notify: require './scripts/notify.ls' diff --git a/src/web/app/desktop/scripts/open-window.js b/src/web/app/desktop/scripts/open-window.js new file mode 100644 index 0000000000..3f7cc424e0 --- /dev/null +++ b/src/web/app/desktop/scripts/open-window.js @@ -0,0 +1,8 @@ +const riot = require('riot'); + +riot.mixin('open-window', { + openWindow: (name, opts) => { + const window = document.body.appendChild(document.createElement(name)); + return riot.mount(window, opts)[0]; + } +}); diff --git a/src/web/app/desktop/scripts/open-window.ls b/src/web/app/desktop/scripts/open-window.ls deleted file mode 100644 index 4388272ecf..0000000000 --- a/src/web/app/desktop/scripts/open-window.ls +++ /dev/null @@ -1,8 +0,0 @@ -riot = require \riot - -function open(name, opts) - window = document.body.append-child document.create-element name - riot.mount window, opts - -riot.mixin \open-window do - open-window: open |