still cleaning...
This commit is contained in:
parent
674c5d295c
commit
a47307ad1e
5 changed files with 110 additions and 115 deletions
|
|
@ -11,3 +11,35 @@ ipc.on('receiveOsc',function(data){
|
|||
ipc.on('load',function(preset){
|
||||
setState(preset)
|
||||
})
|
||||
|
||||
|
||||
ipc.on('listSessions',function(data){
|
||||
for (i in data) {
|
||||
$('#lobby .list').append('<li><a class="btn" data-session="'+i+'">'+data[i]+'<span>x</span></a></li>')
|
||||
}
|
||||
$('#lobby .list').append('<a class="btn" data-session="browse">...</a>')
|
||||
$('#lobby a').click(function(){
|
||||
ipc.send('loadSession',$(this).data('session'))
|
||||
})
|
||||
$('#lobby a span').click(function(e){
|
||||
ipc.send('removeSessionFromHistory',$(this).parent().data('session'))
|
||||
$(this).parents('li').hide()
|
||||
e.stopPropagation()
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
ipc.on('openSession',function(data){
|
||||
TABS=false
|
||||
require(data)
|
||||
if (TABS!=false) {
|
||||
$('#lobby').hide()
|
||||
$('#container').append('<div class="spinner"></div>')
|
||||
setTimeout(function(){
|
||||
init(function(){$('#container .spinner').hide()});
|
||||
},1)
|
||||
|
||||
} else {
|
||||
console.log('ERROR: invalid session file (TABS must be defined)')
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue