Commit fae873d9c5a0a2c689203fc9851d13b2f3c63e3a
start converting tabs file
mix irving committed on 2/1/2017, 12:41:01 AMParent: 1a38414b82ac1f77a9a6e484fb098e4737b5de09
Files changed
modules_core/tabs.js | changed |
modules_core/tabs.js | |||
---|---|---|---|
@@ -1,8 +1,8 @@ | |||
1 | -var Tabs = require('hypertabs') | ||
2 | -var h = require('hyperscript') | ||
3 | -var keyscroll = require('../keyscroll') | ||
4 | -var open = require('open-external') | ||
1 … | +const Tabs = require('hypertabs') | ||
2 … | +const h = require('../h') | ||
3 … | +const keyscroll = require('../keyscroll') | ||
4 … | +const open = require('open-external') | ||
5 | 5 … | ||
6 | 6 … | function ancestor (el) { | |
7 | 7 … | if(!el) return | |
8 | 8 … | if(el.tagName !== 'A') return ancestor(el.parentElement) | |
@@ -19,10 +19,9 @@ | |||
19 | 19 … | exports.gives = 'screen_view' | |
20 | 20 … | ||
21 | 21 … | exports.create = function (api) { | |
22 | 22 … | return function (path) { | |
23 | - if(path !== 'tabs') | ||
24 | - return | ||
23 … | + if(path !== 'tabs') return | ||
25 | 24 … | ||
26 | 25 … | function setSelected (indexes) { | |
27 | 26 … | var ids = indexes.map(function (index) { | |
28 | 27 … | return tabs.get(index).id | |
@@ -54,12 +53,16 @@ | |||
54 | 53 … | } | |
55 | 54 … | }) | |
56 | 55 … | ||
57 | 56 … | //reposition hypertabs menu to inside a container... | |
58 | - tabs.insertBefore(h('div.header.row', | ||
59 | - h('div.header__tabs.row', tabs.firstChild), //tabs | ||
60 | - h('div.header__search.row.end', h('div', search), api.menu()) | ||
61 | - ), tabs.firstChild) | ||
57 … | + tabs.insertBefore(h('div.header.row', [ | ||
58 … | + h('div.header__tabs.row', tabs.firstChild), //tabs | ||
59 … | + h('div.header__search.row.end', [ | ||
60 … | + h('div', search), | ||
61 … | + api.menu() | ||
62 … | + ]) | ||
63 … | + ]), | ||
64 … | + tabs.firstChild) | ||
62 | 65 … | // tabs.insertBefore(search, tabs.firstChild.nextSibling) | |
63 | 66 … | ||
64 | 67 … | var saved = [] | |
65 | 68 … | // try { saved = JSON.parse(localStorage.openTabs) } |
Built with git-ssb-web