Skip to content

Commit

Permalink
changes to work with release 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
flammy committed Jan 3, 2017
1 parent 7e92ff9 commit c916f97
Show file tree
Hide file tree
Showing 113 changed files with 1,170 additions and 32,761 deletions.
711 changes: 0 additions & 711 deletions backend.php

This file was deleted.

476 changes: 0 additions & 476 deletions bootstrap/3.3.4/css/bootstrap-theme.css

This file was deleted.

1 change: 0 additions & 1 deletion bootstrap/3.3.4/css/bootstrap-theme.css.map

This file was deleted.

5 changes: 0 additions & 5 deletions bootstrap/3.3.4/css/bootstrap-theme.min.css

This file was deleted.

6,584 changes: 0 additions & 6,584 deletions bootstrap/3.3.4/css/bootstrap.css

This file was deleted.

1 change: 0 additions & 1 deletion bootstrap/3.3.4/css/bootstrap.css.map

This file was deleted.

5 changes: 0 additions & 5 deletions bootstrap/3.3.4/css/bootstrap.min.css

This file was deleted.

Binary file not shown.
288 changes: 0 additions & 288 deletions bootstrap/3.3.4/fonts/glyphicons-halflings-regular.svg

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
2,317 changes: 0 additions & 2,317 deletions bootstrap/3.3.4/js/bootstrap.js

This file was deleted.

7 changes: 0 additions & 7 deletions bootstrap/3.3.4/js/bootstrap.min.js

This file was deleted.

13 changes: 0 additions & 13 deletions bootstrap/3.3.4/js/npm.js

This file was deleted.

8 changes: 8 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"require": {
"components/jquery": "1.11.*",
"components/bootstrap": "3.3.*",
"xajax/xajax": "dev-master",
"flammy/fsapi": "dev-master"
}
}
Empty file removed config.txt
Empty file.
103 changes: 63 additions & 40 deletions content/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,74 @@
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="media">
<div class="media-left media-middle">
<a href="#">
<img class="media-object netRemote_play_info_graphicUri" src="logo.png" alt="wdr2">
</a>
</div>
<div class="media-body">
<h4 class="txt netRemote_play_info_name media-heading">-</h4>
<h5 class="txt netRemote_play_info_text">-</h5>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<button type="button" id="play-step-backwar" class="disabled btn btn-default"><span class="glyphicon glyphicon-step-backward" aria-label="Left Align" aria-hidden="true"></span></button>
<button type="button" id="play-start" class="disabled btn btn-default netRemote_play_status_play"><span class="glyphicon glyphicon-play" aria-label="Left Align" aria-hidden="true"></span></button>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">Now Playing</div>
<div class="panel-body">
<div class="media">
<div class="media-left media-middle">
<a href="#">
<img class="media-object netRemote_play_info_graphicUri" src="logo.png" alt="wdr2">
</a>
</div>
<div class="media-body">
<h4 class="txt netRemote_play_info_name media-heading">-</h4>
<h5 class="txt netRemote_play_info_text">-</h5>
</div>
</div>
<br/>
<button type="button" id="play-step-backwar" class="btn btn-default"><span class="glyphicon glyphicon-step-backward" aria-label="Left Align" aria-hidden="true"></span></button>
<button type="button" id="play-pause" class="disabled btn btn-default netRemote_play_status_pause"><span class="glyphicon glyphicon-pause" aria-label="Left Align" aria-hidden="true"></span></button>
<button type="button" id="play-start" class="btn btn-default netRemote_play_status_play"><span class="glyphicon glyphicon-play" aria-label="Left Align" aria-hidden="true"></span></button>
<button type="button" id="play-stop" class="disabled btn btn-default netRemote_play_status_stop"><span class="glyphicon glyphicon-stop" aria-label="Left Align" aria-hidden="true"></span></button>
<button type="button" id="play-pause" class="btn btn-default netRemote_play_status_pause"><span class="glyphicon glyphicon-pause" aria-label="Left Align" aria-hidden="true"></span></button>
<button type="button" id="play-step-forward" class="disabled btn btn-default"><span class="glyphicon glyphicon-step-forward" aria-label="Left Align" aria-hidden="true"></span></button>
<button type="button" id="play-stop" class="btn btn-default netRemote_play_status_stop"><span class="glyphicon glyphicon-stop" aria-label="Left Align" aria-hidden="true"></span></button>
<button type="button" id="play-step-forward" class="btn btn-default"><span class="glyphicon glyphicon-step-forward" aria-label="Left Align" aria-hidden="true"></span></button>
&nbsp;&nbsp;
<button type="button" id="play-random" class=" btn btn-default netRemote_play_shuffle"><span class="glyphicon glyphicon-random" aria-label="Shuffle / Random" aria-hidden="true"></span></button>
<button type="button" id="play-repeat" class=" btn btn-default netRemote_play_repeat"><span class="glyphicon glyphicon-retweet" aria-label="Repeat" aria-hidden="true"></span></button>
<button type="button" id="volume-down" class="btn btn-default"><span class="glyphicon glyphicon-volume-down" aria-label="Left Align" aria-hidden="true"></span></button>
<input type="text" id="volume" class="slider netRemote_sys_audio_volume" value="1" data-slider-min="0" data-slider-max="20" data-slider-step="1" data-slider-value="1" data-slider-orientation="horizontal" data-slider-selection="after" data-slider-tooltip="hide">
<button type="button" id="volume-up" class="btn btn-default"><span class="glyphicon glyphicon-volume-up" aria-label="Left Align" aria-hidden="true"></span></button>
<button type="button" id="volume-mute" class="btn btn-default netRemote_sys_audio_mute"><span class="glyphicon glyphicon-volume-off" aria-label="Left Align" aria-hidden="true"></span></button>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">Volume &amp; Sound</div>
<div class="panel-body">
<button type="button" id="volume-down" class="btn btn-default"><span class="glyphicon glyphicon-volume-down" aria-label="Left Align" aria-hidden="true"></span></button>
<div class="progress" style="display: inline-block; margin: 0px; width: 50%">
<div class="progress-bar netRemote_sys_audio_volume" role="progressbar " aria-valuenow="0" aria-valuemin="0" aria-valuemax="20" style="width: 0%;">
</div>
</div>
<button type="button" id="volume-up" class="btn btn-default"><span class="glyphicon glyphicon-volume-up" aria-label="Left Align" aria-hidden="true"></span></button>
<button type="button" id="volume-mute" class="btn btn-default netRemote_sys_audio_mute"><span class="glyphicon glyphicon-volume-off" aria-label="Left Align" aria-hidden="true"></span></button>
<br/><br/>
<div class="progress" style="display: inline-block; margin: 0px; width: 50%">
<div class="progress-bar netRemote_sys_audio_eqCustom_param0" role="progressbar " aria-valuenow="0" aria-valuemin="0" aria-valuemax="20" style="width: 0%;">
</div>
</div>
<br/><br/>
<div class="progress" style="display: inline-block; margin: 0px; width: 50%">
<div class="progress-bar netRemote_sys_audio_eqCustom_param1" role="progressbar " aria-valuenow="0" aria-valuemin="0" aria-valuemax="20" style="width: 0%;">
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="list-group netRemote_sys_caps_eqPresets_list">
<a href="#" class="list-group-item disabled">
Loading EQS
</a>
</div>
</div>
</div>
</div>
Expand All @@ -61,30 +96,18 @@
<div class="col-md-4">
<div class="list-group netRemote_nav_list">
<a href="#" class="list-group-item disabled">
Loading Channels
Loading Menu
</a>
</div>
</div>
</div>
<br/>
<div class="row">
<div class="col-md-4">
<div class="list-group netRemote_sys_caps_eqPresets_list">
<a href="#" class="list-group-item disabled">
Loading EQS
</a>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">Custom EQS</div>
<div class="panel-body">
<input type="text" id="sl1" class="slider netRemote_sys_audio_eqCustom_param0" value="" data-slider-min="-20" data-slider-max="20" data-slider-step="1" data-slider-value="-14" data-slider-orientation="horizontal" data-slider-selection="after"data-slider-tooltip="hide">
<input type="text" id="sl2" class="slider netRemote_sys_audio_eqCustom_param1" value="" data-slider-min="-20" data-slider-max="20" data-slider-step="1" data-slider-value="-14" data-slider-orientation="horizontal" data-slider-selection="after"data-slider-tooltip="hide">
</div>
</div>
</div>
<div class="col-md-4">
</div>
</div>
Expand Down Expand Up @@ -797,7 +820,7 @@ function addEvents(){
/*
* Get all values via xajax
*/
//xajax_refresh();
xajax_refresh();
/* not ready yet
* $('.slider').slider();
*/
Expand Down
2 changes: 1 addition & 1 deletion content/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<div class="col-md-4">
<div class="well">
<h2>add device</h2>
<form>
<form id="entries">
<input type="hidden" class="form-control" autocomplete="off" value="N" name="index" id="index">
<div class="form-group">
<label for="host">IP / Hostname</label>
Expand Down
1 change: 0 additions & 1 deletion fsapi
Submodule fsapi deleted from b78f7d
65 changes: 31 additions & 34 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
<?php
require_once("xajax/xajax_core/xajax.inc.php");
$xajax = new xajax();
include('backend.php');
$xajax->processRequest();
$configs = config_read();
//require_once("vendor/autoload.php");
require_once('src/autoload.php');
$Config = new Config;
$config = $Config->read();
$folder = str_replace(basename($_SERVER['SCRIPT_NAME']),'',$_SERVER['SCRIPT_NAME']);

$Xajax = new xajax();
//include('backend.php');

$Backend = new Backend($Xajax,$Config);

//$Xajax->register(XAJAX_FUNCTION, new xajaxUserFunction('refresh', $Backend, 'refresh'));
$Xajax->processRequest();


?>
<!DOCTYPE html>
<html lang="en">
Expand All @@ -13,39 +23,24 @@
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- css -->
<link rel="stylesheet" href="bootstrap/3.3.4/css/bootstrap.min.css">
<link rel="stylesheet" href="bootstrap/3.3.4/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="vendor/components/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="vendor/components/bootstrap/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="css/style.css">

<!-- js -->
<script src="jquery/1.11.2/jquery.min.js"></script>
<script src="bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="vendor/components/jquery/jquery.min.js"></script>
<script src="vendor/components/bootstrap/js/bootstrap.min.js"></script>
<script src="js/script.js"></script>


<!-- start xajax-js-->
<?php
$xajax->configure('javascript URI','/fsapi-remote/xajax/');
$xajax->printJavascript();
// determine active device
<?php

if(!isset($_REQUEST['setup']) || $_REQUEST['setup'] != true){
echo '<script type="text/javascript">';
$i = 0;
$act_device = "";
foreach($configs[1] as $key => $config){
if($i == 0){
$act_device = $key;
}elseif(isset($config['active']) && ($config['active'] == true)) {
$act_device = $key;
echo 'console.log("loading last active device: '.$key.'");';
}
$i ++;
}

echo "xajax_devicesel(".$act_device.");";
}
echo '</script>';


//die($_SERVER["REQUEST_URI"].'vendor/xajax/');
$Xajax->configure('javascript URI',$folder .'vendor/xajax/xajax/');
$Xajax->printJavascript();
?>
<!-- end xajax-js-->
</head>
Expand Down Expand Up @@ -80,9 +75,12 @@
<form class="form-inline" style="margin-top: 7px;">
<select class="form-control" id="devicesel">
<?php

foreach($configs[1] as $index => $config){
echo '<option value="'.$index.'">'.$config['friendlyname'].'</option>';
foreach($config as $index => $config){
$selected = '';
if($Backend->getActiveDevice() == $index){
$selected = 'selected="selected"';
}
echo '<option value="'.$index.'" '.$selected.' >'.$config['friendlyname'].'</option>';
}
?>
</select>
Expand Down Expand Up @@ -122,7 +120,6 @@
}
?>
<script type="text/javascript">

$('#devicesel').change( function() {
xajax_devicesel($(this).val());
});
Expand Down
4 changes: 0 additions & 4 deletions jquery/1.11.2/jquery.min.js

This file was deleted.

7 changes: 5 additions & 2 deletions js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@
$(this).html(value);
}
// Input of type slider
if($(this).hasClass('slider')){
if($(this).hasClass('progress-bar')){
console.log('changing value to: '+value);
$(this).val(value);
percentage = (value*100)/20;
$(this).width(percentage+'%');
$(this).html(value);
$(this).attr('aria-valuenow',value)
}
// image src
if($(this).hasClass('media-object')){
Expand Down
Loading

0 comments on commit c916f97

Please sign in to comment.