Merge pull request #1645 from miken32/master

changes needed to run under web server subdirectory
This commit is contained in:
Neil Lathwood
2015-08-11 18:32:53 +01:00
55 changed files with 123 additions and 98 deletions

View File

@@ -149,7 +149,7 @@ if ($unknown) {
var device_id = $(this).data("device_id");
$.ajax({
type: 'POST',
url: '/ajax_form.php',
url: 'ajax_form.php',
data: { type: "rediscover-device", device_id: device_id },
dataType: "json",
success: function(data){

View File

@@ -101,7 +101,7 @@ $('#newThread').on('click', function(e){
var form = $('#alert-reset');
$.ajax({
type: 'POST',
url: '/ajax_form.php',
url: 'ajax_form.php',
data: form.serialize(),
dataType: "html",
success: function(data){
@@ -125,7 +125,7 @@ $( ".sensor" ).blur(function() {
var $this = $(this);
$.ajax({
type: 'POST',
url: '/ajax_form.php',
url: 'ajax_form.php',
data: { type: "health-update", device_id: device_id, data: data, sensor_id: sensor_id , value_type: value_type},
dataType: "html",
success: function(data){
@@ -155,7 +155,7 @@ $('input[name="alert-status"]').on('switchChange.bootstrapSwitch', function(eve
var sensor_id = $(this).data("sensor_id");
$.ajax({
type: 'POST',
url: '/ajax_form.php',
url: 'ajax_form.php',
data: { type: "sensor-alert-update", device_id: device_id, sensor_id: sensor_id, state: state},
dataType: "html",
success: function(data){
@@ -172,7 +172,7 @@ $("[name='remove-custom']").on('click', function(event) {
var sensor_id = $(this).data("sensor_id");
$.ajax({
type: 'POST',
url: '/ajax_form.php',
url: 'ajax_form.php',
data: { type: "sensor-alert-update", sensor_id: sensor_id, sub_type: "remove-custom" },
dataType: "html",
success: function(data){

View File

@@ -153,7 +153,7 @@ echo('
var device_id = $(this).data("device_id");
$.ajax({
type: 'POST',
url: '/ajax_form.php',
url: 'ajax_form.php',
data: { type: "poller-module-update", poller_module: poller_module, device_id: device_id, state: state},
dataType: "html",
success: function(data){
@@ -184,7 +184,7 @@ echo('
var device_id = $(this).data("device_id");
$.ajax({
type: 'POST',
url: '/ajax_form.php',
url: 'ajax_form.php',
data: { type: "discovery-module-update", discovery_module: discovery_module, device_id: device_id, state: state},
dataType: "html",
success: function(data){

View File

@@ -79,7 +79,7 @@
event.preventDefault();
$.ajax({
type: "POST",
url: "/ajax_form.php",
url: "ajax_form.php",
data: $('form#ignoreport').serialize(),
dataType: "json",
success: function(data){
@@ -108,6 +108,6 @@
device_id: "<?php echo $device['device_id']; ?>"
};
},
url: "/ajax_table.php"
url: "ajax_table.php"
});
</script>