Hi,
I made a simple remote page for controlling the video & audio and present it here so it's easier/faster for people to create for instance buttons with custom icons.
The foundations for the code came from
viewtopic.php?f=2&t=2892
Then I updated jQuery Mobile to version 1.0. You have to understand I don't have prior knowledge about how AJAX&jQuery works and still don't know much. This is just copy&paste code from the vaults of the internet. That why there's also still some code in pages that are not really needed. I don't plan to learn everything about these things, I only need remote pages that work smooth. I will be using Android tablet as remote.
The top navigation bar is a simple ripoff of the original code. Because the active button did not stay active, I had to update jQuery Mobile to version 1.0. Now it works. I don't actually use the other pages right now, so I present only the main page.
The video section simply calls a batch file in EG that changes display settings. I don't plan to make it show which is the active configuration.
The audio section is because I'm using convolvers for equalizers and the buttons start the Vst-convolver programs. I can have multiple convolvers on at the same time, so there's two buttons for each convolver, one that switches individual convolver on/off and one the stops all other convolvers and starts the selected. For this section I'd like to have status information updated. I have already python script for updating the global variables and it works when I manually refresh the page but pressing the button does not refresh the page. So, how do I refresh the page when a button is pressed? I have found some code for only doing the refresh but I need the button that sends an EG event AND refreshes the page after that. ( There's seems to be some code in config.js from the original example that handles the button events )
Another question is how I make the transient background work for the whole screen? In Honeycomb's stock browser the black background is only seen for the page part where there's text, after that it's white background. In PC's Firefox browser it works as intended. Is this simply a bug in Android's browser?
Used icons were from glyphish and a mono icon set from some free icons site. Used Paint.NET to simply invert the colors or change it to red like the on/off-icon. Paint.NET preservers the alpha channel.
Code: Select all
<!DOCTYPE html>
<html manifest="minifest.manifest">
<head>
<meta name="viewport" content="width=device-width, height=device-height,initial-scale=1">
<title>Dashboard</title>
<link rel="stylesheet" href="css/jquery.mobile-1.0.min.css" />
<link rel="stylesheet" href="css/my_own.css" />
<script src="js/jquery.js"></script>
<script src="js/config.js"></script>
<script src="js/jquery.mobile-1.0.min.js"></script>
<link rel="shortcut icon" href="favicon.ico"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta content="width=device-width,height=device-height,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport2"/>
<meta content="telephone=no" name="format-detection"/>
<meta content="address=no" name="format-detection"/>
</head>
<body>
<div data-role="page" data-theme="a" id="jqm-home">
<div data-role="header" data-position="fixed" data-id="mynavigation">
<div data-role="navbar" >
<ul>
<li><a href="index.html" class="ui-state-persist ui-btn-active">Main</a></li>
<li><a href="audio.html" >Audio</a></li>
<li><a href="icm.html" >ICM</a></li>
<li><a href="xbmc.html" >Xbmc</a></li>
<li><a href="tv.html" >TV</a></li>
</ul>
</div>
</div>
<style>
.nav-big-icons .ui-btn .ui-btn-inner { padding-top: 40px !important; }
.nav-big-icons .ui-btn .ui-icon { width: 30px!important; height: 30px!important; margin-left: -15px !important; box-shadow: none!important; -moz-box-shadow: none!important; -webkit-box-shadow: none!important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
.nav-big-two-icons .ui-btn .ui-btn-inner { padding-top: 40px !important; }
.nav-big-two-icons .ui-btn .ui-icon { width: 70px!important; height: 30px!important; margin-left: -35px !important; box-shadow: none!important; -moz-box-shadow: none!important; -webkit-box-shadow: none!important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
#tv .ui-icon { background: url("icons/70-tv-neg.png") no-repeat; background-size: 22px 24px; }
#monitor .ui-icon { background: url("icons/69-display-neg.png") no-repeat; background-size: 22px 20px; }
#projector .ui-icon { background: url("icons/Projector-48-neg.png") no-repeat; background-size: 32px 32px; }
#movies .ui-icon { background: url("icons/45-movie-1-neg.png") no-repeat; background-size: 19px 25px; }
#music .ui-icon { background: url("icons/194-note-2-neg.png") no-repeat; background-size: 23px 23px; }
#headphones .ui-icon { background: url("icons/120-headphones-neg.png") no-repeat; background-size: 22px 21px; }
#speaker .ui-icon { background: url("icons/speaker-neg.png") no-repeat; background-size: 22px 21px; }
#music_headphones .ui-icon { background: url("icons/194-note-2-neg.png") top left no-repeat, url("icons/120-headphones-neg.png") top right no-repeat; background-size: 30px 30px; }
#music_speakers .ui-icon { background: url("icons/194-note-2-neg.png") top left no-repeat, url("icons/speaker-neg.png") top right no-repeat; background-size: 30px 30px; }
#movies_headphones .ui-icon { background: url("icons/45-movie-1-neg.png") top left no-repeat, url("icons/120-headphones-neg.png") top right no-repeat; background-size: 30px 30px; }
#movies_speakers .ui-icon { background: url("icons/45-movie-1-neg.png") top left no-repeat, url("icons/speaker-neg.png") top right no-repeat; background-size: 30px 30px; }
#movies_tv .ui-icon { background: url("icons/45-movie-1-neg.png") top left no-repeat, url("icons/70-tv-neg.png") top right no-repeat; background-size: 30px 30px; }
#on .ui-icon { background: url("icons/on.png") top center no-repeat; background-size: 24px 24px; }
#off .ui-icon { background: url("icons/off.png") top center no-repeat; background-size: 24px 24px; }
</style>
<div class="ui-grid-a" >
<div class="ui-block-a">
<div data-role="content" class="nav-big-icons" >
<div data-role="controlgroup" data-type="horizontal" >
<div title="projector.on" data-role="button">Projector On</div>
<div title="projector.off" data-role="button">Projector Off</div>
</div>
<div data-role="controlgroup" data-type="horizontal">
<div title="CCC_Profiles.Monitor.60Hz" data-role="button" id="monitor" data-icon="custom" data-iconpos="top" style="width: 200px;" >Monitor 60Hz</div>
</div>
<div data-role="controlgroup" data-type="horizontal" >
<div title="CCC_Profiles.Projector.24Hz" data-role="button" id="projector" data-icon="custom" data-iconpos="top" style="width: 200px;" >Projector 24Hz</div>
<div title="CCC_Profiles.Projector.50Hz" data-role="button" id="projector" data-icon="custom" data-iconpos="top" style="width: 200px;" >Projector 50Hz</div>
<div title="CCC_Profiles.Projector.60Hz" data-role="button" id="projector" data-icon="custom" data-iconpos="top" style="width: 200px;" >Projector 60Hz</div>
</div>
<div data-role="controlgroup" data-type="horizontal">
<div title="CCC_Profiles.TV.24Hz" data-role="button" id="tv" data-icon="custom" data-iconpos="top" style="width: 200px;" >TV 24Hz</div>
<div title="CCC_Profiles.TV.50Hz" data-role="button" id="tv" data-icon="custom" data-iconpos="top" style="width: 200px;" >TV 50Hz</div>
<div title="CCC_Profiles.TV.60Hz" data-role="button" id="tv" data-icon="custom" data-iconpos="top" style="width: 200px;" >TV 60Hz</div>
</div>
</div>
</div>
<div class="ui-block-b">
<div data-role="content" class="nav-big-two-icons">
<div data-role="controlgroup" data-type="horizontal">
<div title="VstHost.MusicHeadphonesOnly" data-role="button" id="music_headphones" data-icon="custom" data-iconpos="top" style="width: 250px;" >Music Headphones</div>
<div title="VstHost.MusicHeadphones" data-role="button" id="{{"on" if eg.globals.Music_Headphones else "off"}}" data-icon="custom" data-iconpos="top">{{"On" if eg.globals.Music_Headphones else "Off"}}</div>
</div>
<div data-role="controlgroup" data-type="horizontal">
<div title="VstHost.MusicSpeakersOnly" data-role="button" id="music_speakers" data-icon="custom" data-iconpos="top" style="width: 250px;" >Music Speakers</div>
<div title="VstHost.MusicSpeakers" data-role="button" id="{{"on" if eg.globals.Music else "off"}}" data-icon="custom" data-iconpos="top">{{"On" if eg.globals.Music else "Off"}}</div>
</div>
<div data-role="controlgroup" data-type="horizontal">
<div title="VstHost.MoviesHeadphonesOnly" data-role="button" id="movies_headphones" data-icon="custom" data-iconpos="top" style="width: 250px;" >Movies Headphones</div>
<div title="VstHost.MoviesHeadphones" data-role="button" id="{{"on" if eg.globals.Movies_Headphones else "off"}}" data-icon="custom" data-iconpos="top">{{"On" if eg.globals.Movies_Headphones else "Off"}}</div>
</div>
<div data-role="controlgroup" data-type="horizontal">
<div title="VstHost.MoviesSpeakersOnly" data-role="button" id="movies_speakers" data-icon="custom" data-iconpos="top" style="width: 250px;" >Movies Speakers</div>
<div title="VstHost.MoviesSpeakers" data-role="button" id="{{"on" if eg.globals.Movies else "off"}}" data-icon="custom" data-iconpos="top">{{"On" if eg.globals.Movies else "Off"}}</div>
</div>
<div data-role="controlgroup" data-type="horizontal">
<div title="VstHost.MoviesTVOnly" data-role="button" id="movies_tv" data-icon="custom" data-iconpos="top" style="width: 250px;" >Movies TV</div>
<div title="VstHost.MoviesTV" data-role="button" id="{{"on" if eg.globals.Movies_HDMI else "off"}}" data-icon="custom" data-iconpos="top">{{"On" if eg.globals.Movies_HDMI else "Off"}}</div>
</div>
</div>
</div>
<!-- /grid-a -->
</body>
</html>