git ssb

16+

Dominic / patchbay



Commit fae873d9c5a0a2c689203fc9851d13b2f3c63e3a

start converting tabs file

mix irving committed on 2/1/2017, 12:41:01 AM
Parent: 1a38414b82ac1f77a9a6e484fb098e4737b5de09

Files changed

modules_core/tabs.jschanged
modules_core/tabs.jsView
@@ -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')
55
66 function ancestor (el) {
77 if(!el) return
88 if(el.tagName !== 'A') return ancestor(el.parentElement)
@@ -19,10 +19,9 @@
1919 exports.gives = 'screen_view'
2020
2121 exports.create = function (api) {
2222 return function (path) {
23- if(path !== 'tabs')
24- return
23 + if(path !== 'tabs') return
2524
2625 function setSelected (indexes) {
2726 var ids = indexes.map(function (index) {
2827 return tabs.get(index).id
@@ -54,12 +53,16 @@
5453 }
5554 })
5655
5756 //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)
6265 // tabs.insertBefore(search, tabs.firstChild.nextSibling)
6366
6467 var saved = []
6568 // try { saved = JSON.parse(localStorage.openTabs) }

Built with git-ssb-web