osc: add /TABS command to enable a list of tabs (selected by ids)

This commit is contained in:
jean-emmanuel 2017-02-25 19:06:03 +01:00
parent ff89305e3a
commit e0b1a27255
2 changed files with 8 additions and 2 deletions

View file

@ -158,7 +158,11 @@ module.exports = {
$('#grid-width-input').remove()
EDITING = false
},
tabsEnable: function(tabs){
for (i in tabs) {
$(`[data-id="${tabs[i]}"]`).trigger('fake-click')
}
},
traversingDisable: function(){
$('.traversingEnable, .traversingDisable').toggleClass('on')
$('#container').trigger('disableTraversingGestures')

View file

@ -1,5 +1,6 @@
var {widgetManager} = require('./managers'),
ipc = require('./ipc')
ipc = require('./ipc'),
actions = require('./actions')
var Osc = function(){
@ -29,6 +30,7 @@ Osc.prototype.send = function(data) {
Osc.prototype.receive = function(data){
if (data.address == '/EXEC') return this.remoteExec(data.args)
if (data.address == '/TABS') return actions.tabsEnable(data.args)
// fetch ids corresponding to the osc address
var address = data.address,