Standardize VM folder structure (step 1)

Moved the PHP files to the subfolder 'classes' together with all other
PHP files
This commit is contained in:
bergware
2018-03-07 16:12:45 +01:00
parent 37850372a6
commit 46dbfff026
10 changed files with 13 additions and 15 deletions

View File

@@ -15,7 +15,6 @@ Markdown="false"
* all copies or substantial portions of the Software.
*/
?>
<?
require_once "$docroot/plugins/dynamix.vm.manager/VMedit.php";
require_once "$docroot/plugins/dynamix.vm.manager/classes/VMedit.php";
?>

View File

@@ -15,7 +15,6 @@ Markdown="false"
* all copies or substantial portions of the Software.
*/
?>
<?
require_once "$docroot/plugins/dynamix.vm.manager/VMedit.php";
require_once "$docroot/plugins/dynamix.vm.manager/classes/VMedit.php";
?>

View File

@@ -202,7 +202,7 @@ foreach ($vms as $vm) {
<?endif;?>
$('.autostart').switchButton({labels_placement:"right"});
$('.autostart').change(function() {
$.post('/plugins/dynamix.vm.manager/VMajax.php',{action:'domain-autostart',uuid:$(this).attr('uuid'),autostart:$(this).prop('checked'),response:'json'},function(data){
$.post('/plugins/dynamix.vm.manager/classes/VMajax.php',{action:'domain-autostart',uuid:$(this).attr('uuid'),autostart:$(this).prop('checked'),response:'json'},function(data){
$(this).prop('checked', data.autostart);
},'json');
});

View File

@@ -334,11 +334,11 @@ $(function(){
return;
}
if ($('#pcie_acs_override').val() == '1') {
$.getJSON("/plugins/dynamix.vm.manager/VMajax.php", {action: "acs-override-enable"}, function(data) {
$.getJSON("/plugins/dynamix.vm.manager/classes/VMajax.php", {action: "acs-override-enable"}, function(data) {
$("#settingsForm").submit();
});
} else {
$.getJSON("/plugins/dynamix.vm.manager/VMajax.php", {action: "acs-override-disable"}, function(data) {
$.getJSON("/plugins/dynamix.vm.manager/classes/VMajax.php", {action: "acs-override-disable"}, function(data) {
$("#settingsForm").submit();
});
}
@@ -365,7 +365,7 @@ $(function(){
$form.find('input,select').prop('disabled', true);
$button.removeClass('fa-download').addClass('fa-circle-o-notch fa-spin');
$.post("/plugins/dynamix.vm.manager/VMajax.php", postdata, function( data ) {
$.post("/plugins/dynamix.vm.manager/classes/VMajax.php", postdata, function( data ) {
if (data.error) {
$("#download_status").html('<span style="color: red">' + data.error + '</span>');
} else {
@@ -419,7 +419,7 @@ $(function(){
file: $(this).val()
};
$.get("/plugins/dynamix.vm.manager/VMajax.php", params, function( data ) {
$.get("/plugins/dynamix.vm.manager/classes/VMajax.php", params, function( data ) {
if (!data.exists) {
$("#download_button").show('fast');

View File

@@ -1,7 +1,7 @@
function ajaxVMDispatch(params, reload){
var spin = typeof reload != 'undefined';
if (spin) $('#vm-'+params['uuid']).find('i').addClass('fa-spin');
$.post("/plugins/dynamix.vm.manager/VMajax.php", params, function(data) {
$.post("/plugins/dynamix.vm.manager/classes/VMajax.php", params, function(data) {
if (data.error) {
swal({title:"Execution error",text:data.error,type:"error"});
} else {

View File

@@ -1133,7 +1133,7 @@ $(function() {
$disk_bus_sections.filter('.wasadvanced').removeClass('wasadvanced').addClass('advanced');
slideDownRows($disk_bus_sections.not(isVMAdvancedMode() ? '.basic' : '.advanced'));
$.getJSON("/plugins/dynamix.vm.manager/VMajax.php?action=file-info&file=" + encodeURIComponent($disk_input.val()), function( info ) {
$.getJSON("/plugins/dynamix.vm.manager/classes/VMajax.php?action=file-info&file=" + encodeURIComponent($disk_input.val()), function( info ) {
if (info.isfile || info.isblock) {
slideUpRows($disk_file_sections);
$disk_file_sections.filter('.advanced').removeClass('advanced').addClass('wasadvanced');
@@ -1159,7 +1159,7 @@ $(function() {
$disk_bus_sections.filter('.wasadvanced').removeClass('wasadvanced').addClass('advanced');
slideDownRows($disk_bus_sections.not(isVMAdvancedMode() ? '.basic' : '.advanced'));
$.getJSON("/plugins/dynamix.vm.manager/VMajax.php?action=file-info&file=" + encodeURIComponent(auto_disk_path), function( info ) {
$.getJSON("/plugins/dynamix.vm.manager/classes/VMajax.php?action=file-info&file=" + encodeURIComponent(auto_disk_path), function( info ) {
if (info.isfile || info.isblock) {
slideUpRows($disk_file_sections);
$disk_file_sections.filter('.advanced').removeClass('advanced').addClass('wasadvanced');
@@ -1277,7 +1277,7 @@ $(function() {
$("#vmform").on("click", ".mac_generate", function generateMac() {
var $input = $(this).prev('input');
$.getJSON("/plugins/dynamix.vm.manager/VMajax.php?action=generate-mac", function( data ) {
$.getJSON("/plugins/dynamix.vm.manager/classes/VMajax.php?action=generate-mac", function( data ) {
if (data.mac) {
$input.val(data.mac);
}

View File

@@ -1028,7 +1028,7 @@ $(function() {
$("#vmform").on("click", ".mac_generate", function generateMac() {
var $input = $(this).prev('input');
$.getJSON("/plugins/dynamix.vm.manager/VMajax.php?action=generate-mac", function (data) {
$.getJSON("/plugins/dynamix.vm.manager/classes/VMajax.php?action=generate-mac", function (data) {
if (data.mac) {
$input.val(data.mac);
}

View File

@@ -1031,7 +1031,7 @@ $(function() {
$("#vmform").on("click", ".mac_generate", function generateMac() {
var $input = $(this).prev('input');
$.getJSON("/plugins/dynamix.vm.manager/VMajax.php?action=generate-mac", function (data) {
$.getJSON("/plugins/dynamix.vm.manager/classes/VMajax.php?action=generate-mac", function (data) {
if (data.mac) {
$input.val(data.mac);
}