Skip to content
Permalink
Browse files

streamconfig implementation completed

  • Loading branch information...
jankammerath committed Jan 21, 2018
1 parent c9ebb31 commit 93a7e6e5942fa43eb4f9c6f771e2c4e8952f6844
Showing with 34 additions and 9 deletions.
  1. +19 −9 app/js/app.js
  2. +12 −0 app/js/streamconfig.js
  3. BIN bin/iptvx
  4. +3 −0 src/keycode.c
@@ -94,15 +94,25 @@ var app = {
app.toggle(toggleComponent);
}

/* check if any element is active
and let it handle the key */
for(var c=0; c<app.componentList.length; c++){
var componentId = app.componentList[c];
var componentObject = window[app.componentList[c]];
if($("#"+componentId).is(":visible")){
/* check if it can handle keys */
if(app.isFunction(componentObject.handleKey)){
componentObject.handleKey(keyCode);
if(keyCode == 27){
/* ESC key hides all elements */
for(var c=0; c<app.componentList.length; c++){
var componentId = app.componentList[c];
if($("#"+componentId).is(":visible")){
$("#"+componentId).fadeOut();
}
}
}else{
/* check if any element is active
and let it handle the key */
for(var c=0; c<app.componentList.length; c++){
var componentId = app.componentList[c];
var componentObject = window[app.componentList[c]];
if($("#"+componentId).is(":visible")){
/* check if it can handle keys */
if(app.isFunction(componentObject.handleKey)){
componentObject.handleKey(keyCode);
}
}
}
}
@@ -89,6 +89,18 @@ var streamconfig = {

/* flush html to component */
$("#streamconfig").html(html);

/* attach mouse handler */
$(".track").mousemove(function(){
$(".track").attr("data-selected","false");
$(this).attr("data-selected","true");
});

$(".track").mouseup(function(){
$(".track").attr("data-selected","false");
$(this).attr("data-selected","true");
streamconfig.handleKey(13);
});
},

handleKey: function(keyCode){
BIN +16 Bytes (100%) bin/iptvx
Binary file not shown.
@@ -43,6 +43,9 @@ int keycode_convert_sdl_to_gtk(int sdl_keycode){
result = sdl_keycode + 65200;
}

/* ESCAPE */
if(sdl_keycode == 27){result=65307;}

/* BACKSPACE */
if(sdl_keycode == 8){result=65288;}

0 comments on commit 93a7e6e

Please sign in to comment.
You can’t perform that action at this time.