Subversion Repositories HomeAutomation

Rev

Rev 2058 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 2058 Rev 2059
Line 7... Line 7...
7
 
7
 
8
$response = array();
8
$response = array();
9
 
9
 
10
if (isset($_GET["DimmerStrength"]))
10
if (isset($_GET["DimmerStrength"]))
11
{
11
{
12
  if (intval($_GET["strength"]) < 10)
12
  if (intval($_GET["DimmerStrength"]) < 10)
13
  {
13
  {
14
    $_GET["strength"] = 0;
14
    $_GET["DimmerStrength"] = 0;
15
  }
15
  }
16
 
-
 
17
  SetDimmerValue($_GET["alias"], $_GET["strength"]);
16
  SetDimmerValue($_GET["alias"], $_GET["DimmerStrength"]);
18
 
-
 
19
  echo json_encode($response);
17
  echo json_encode($response);
20
  exit(0);
18
  exit(0);
21
}
19
}
22
else if (isset($_GET["getdata"]))
20
else if (isset($_GET["getdata"]))
23
{
21
{
Line 82... Line 80...
82
    var timer = null;
80
    var timer = null;
83
 
81
 
84
    function checkCurrentValue()
82
    function checkCurrentValue()
85
    {
83
    {
86
      updating_current = true;
84
      updating_current = true;
87
      jQuery.getJSON("?getdata=1", "<? echo "alias[]=" . implode("&alias[]=", $aliasesDimmer)?>", function(data)
85
      jQuery.getJSON("?getdata=1", "<?php echo "alias[]=" . implode("&alias[]=", $aliasesDimmer)?>", function(data)
88
      {
86
      {
89
       
87
       
90
       
88
       
91
        jQuery.each(data, function(alias, value)
89
        jQuery.each(data, function(alias, value)
92
        {
90
        {
Line 94... Line 92...
94
          $('#slider' + alias).val(value.Level.value).slider("refresh");
92
          $('#slider' + alias).val(value.Level.value).slider("refresh");
95
        });
93
        });
96
       
94
       
97
        updating_current = false;
95
        updating_current = false;
98
      });
96
      });
99
      jQuery.getJSON("?getdata=1", "<? echo "alias[]=" . implode("&alias[]=", $aliasesOther)?>", function(data)
97
      jQuery.getJSON("?getdata=1", "<?php echo "alias[]=" . implode("&alias[]=", $aliasesOther)?>", function(data)
100
      {
98
      {
101
      var element = $("#current-information");
99
      var element = $("#current-information");
102
 
100
 
103
      element.empty();
101
      element.empty();
104
 
102