Removed obsolete files

Fri, 25 Jul 2014 23:28:44 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Fri, 25 Jul 2014 23:28:44 +0200
changeset 135
0882292322b3
parent 134
f05601490415
child 136
264e5ee5abfc

Removed obsolete files

www-thermferm/js/maintenance_panel.js file | annotate | diff | comparison | revisions
www-thermferm/maintenance_panel.php file | annotate | diff | comparison | revisions
--- a/www-thermferm/js/maintenance_panel.js	Fri Jul 25 23:27:08 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,212 +0,0 @@
-/*****************************************************************************
- * Copyright (C) 2014
- *   
- * Michiel Broek <mbroek at mbse dot eu>
- *
- * This file is part of ThermFerm
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2, or (at your option) any
- * later version.
- *
- * ThermFerm is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with ThermFerm; see the file COPYING.  If not, write to the Free
- * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
- *****************************************************************************/
-
-$(document).ready(function () {
-
-    var data = {};
-    var theme = 'ui-redmond';
-
-    /*
-     * 1-Wire bus
-     */
-    var source_bus = {
-     	datatype: "json",
-     	datafields: [
-       	    { name: 'Address', type: 'string' },
-       	    { name: 'Refcnt', type: 'int' },
-       	    { name: 'Chip', type: 'string' },
-       	    { name: 'Description', type: 'string' }
-     	],
-     	url: 'getbus.php'
-    };
-    var dataAdapter_bus = new $.jqx.dataAdapter(source_bus);
-    $("#jqxgrid_bus").jqxGrid( {
-	width: 770, height: 280,
-	source: dataAdapter_bus,
-	theme: theme,
-	columnsresize: true,
-	columns: [
-	    { text: 'Address', datafield: 'Address', width: 150 },
-	    { text: 'References', datafield: 'Refcnt', width: 100 },
-	    { text: 'Chipset', datafield: 'Chip', width: 120 },
-	    { text: 'Description', datafield: 'Description', minwidth: 120 }
-	]
-    });
-
-    /*
-     * Profiles
-     */
-    var source_profiles = {
-        datatype: "json",
-        datafields: [
-            { name: 'UUID', type: 'string' },
-            { name: 'Name', type: 'string' },
-            { name: 'Steps', type: 'int' }
-        ],
-	id: 'UUID',
-        url: 'getprofiles.php',
-	insertrow: function (rowid, commit) {
-	    var data = "insert=true&amp;" + $.param({Name: rowid});
-	    $.ajax({
-		dataType: 'json',
-		url: 'getprofiles.php',
-		data: data,
-		cache: false,
-		success: function (data, status, xhr) {
-		    // insert command is executed.
-		    commit(true);
-		},
-		error: function(jqXHR, textStatus, errorThrown) {
-		    commit(false);
-		}
-	    });
-	},
-        deleterow: function (rowid, commit) {
-            var data = "delete=true&amp;" + $.param({UUID: rowid});
-            $.ajax({
-                dataType: 'json',
-                url: 'getprofiles.php',
-                data: data,
-                cache: false,
-                success: function (data, status, xhr) {
-                    // insert command is executed.
-                    commit(true);
-                },
-                error: function(jqXHR, textStatus, errorThrown) {
-                    commit(false);
-                }
-            });
-        },
-	updaterow: function (rowid, rowdata, commit) {
-	    // synchronize with the server - send update command
-	    var data = "update=true&UUID=" + rowdata.UUID + "&Name=" + rowdata.Name;
-	    $.ajax({
-		dataType: 'json',
-		url: 'getprofiles.php',
-		data: data,
-		success: function (data, status, xhr) {
-		    // update command is executed.
-		    commit(true);
-		},
-		error: function () {
-		    // cancel changes.
-		    commit(false);
-		}
-	    });
-	}
-    };
-    var dataAdapter_profiles = new $.jqx.dataAdapter(source_profiles);
-    $("#jqxgrid_profiles").jqxGrid( {
-        width: 770, height: 280,
-	selectionmode: 'singlecell',
-        source: dataAdapter_profiles,
-        theme: theme,
-        columnsresize: true,
-	editable: true,
-	showstatusbar: true,
-	renderstatusbar: function (statusbar) {
-	    // appends buttons to the status bar.
-	    var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>");
-	    var addButton = $("<div style='float: left; margin-left: 5px;'><img style='position: relative; margin-top: 2px;' src='../images/add.png'/><span style='margin-left: 4px; position: relative; top: -3px;'>Add</span></div>");
-	    var deleteButton = $("<div style='float: left; margin-left: 5px;'><img style='position: relative; margin-top: 2px;' src='../images/close.png'/><span style='margin-left: 4px; position: relative; top: -3px;'>Delete</span></div>");
-	    var reloadButton = $("<div style='float: left; margin-left: 5px;'><img style='position: relative; margin-top: 2px;' src='../images/refresh.png'/><span style='margin-left: 4px; position: relative; top: -3px;'>Reload</span></div>");
-	    container.append(addButton);
-	    container.append(deleteButton);
-	    container.append(reloadButton);
-	    statusbar.append(container);
-	    addButton.jqxButton({  width: 60, height: 20 });
-	    deleteButton.jqxButton({  width: 65, height: 20 });
-	    reloadButton.jqxButton({  width: 65, height: 20 });
-	    // add new row.
-	    addButton.click(function (event) {
-		/*
-		 * Ask a new profile name using a popup window.
-		 * Send "ADD PROFILE name" to the server using the getprofiles.php script.
-		 * Refresh the data
-		 */
-		$("#jqxwindow_addprofile").jqxWindow('open');
-		$("#jqxgrid_profiles").jqxGrid({ source: dataAdapter_profiles });
-	    });
-	    // delete selected row.
-	    deleteButton.click(function (event) {
-		var selectedrowindex = $("#jqxgrid_profiles").jqxGrid('getselectedrowindex');
-		var rowscount = $("#jqxgrid_profiles").jqxGrid('getdatainformation').rowscount;
-		var id = $("#jqxgrid_profiles").jqxGrid('getrowid', selectedrowindex);
-		$("#jqxgrid_profiles").jqxGrid('deleterow', id);
-	    });
-	    // reload grid data.
-	    reloadButton.click(function (event) {
-		$("#jqxgrid_profiles").jqxGrid({ source: dataAdapter_profiles });
-	    });
-	},
-        columns: [
-            { text: 'UUID', editable: false, datafield: 'UUID', width: 280 },
-            { text: 'Name', datafield: 'Name', minwidth: 120 },
-            { text: 'Steps', editable: false, datafield: 'Steps', width: 50 }
-        ]
-    });
-    $("#jqxwindow_addprofile").jqxWindow({ 
-	theme: theme,
-	resizable: false, 
-	isModal: true,
-	modalOpacity: 0.5,
-	autoOpen: false, 
-	width: 210,
-	height: 180,
-	cancelButton: $("#profile_cancelButton"),
-	initContent: function () {
-	    $("#profile_addButton").jqxButton({ width: 70, height: 25, theme: theme });
-	    $("#profile_cancelButton").jqxButton({ width: 70, height: 25, theme: theme });
-	    $("#profile_addButton").click(function () {
-		var id = $("#profile_inputField").val();
-		$("#jqxgrid_profiles").jqxGrid('insertrow', id);
-		$("#jqxwindow_addprofile").jqxWindow('hide');
-	    });
-	}
-    });
-
-    /*
-     * Units
-     */
-    var source_units = {
-        datatype: "json",
-        datafields: [
-            { name: 'UUID', type: 'string' },
-            { name: 'Name', type: 'string' },
-            { name: 'Mode', type: 'string' }
-        ],
-        url: 'getunits.php'
-    };
-    var dataAdapter_units = new $.jqx.dataAdapter(source_units);
-    $("#jqxgrid_units").jqxGrid( {
-        width: 770, height: 280,
-        source: dataAdapter_units,
-        theme: theme,
-        columnsresize: true,
-	editable: true,
-        columns: [
-            { text: 'UUID', editable: false, datafield: 'UUID', width: 280 },
-            { text: 'Name', datafield: 'Name', minwidth: 120 },
-            { text: 'Mode', datafield: 'Mode', width: 70 }
-        ]
-    });
-});
--- a/www-thermferm/maintenance_panel.php	Fri Jul 25 23:27:08 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-<?php
-/*****************************************************************************
- * Copyright (C) 2014
- *   
- * Michiel Broek <mbroek at mbse dot eu>
- *
- * This file is part of ThermFerm
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2, or (at your option) any
- * later version.
- *
- * ThermFerm is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with ThermFerm; see the file COPYING.  If not, write to the Free
- * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
- *****************************************************************************/
-
-/*
- * Look for the style names in the jqwidgets/styles directory.
- */
-$my_style = 'ui-redmond';
-
-
-
-/* The maintenance popup window */
-function maintenance_panel()
-{
-    global $my_style;
-
-    $outstr  = PHP_EOL;
-    $outstr .= '   <div id="maintenance_window">'.PHP_EOL;
-    $outstr .= '    <script type="text/javascript" src="js/maintenance_panel.js"></script>'.PHP_EOL;
-    $outstr .= '    <div id="maintenance_header">'.PHP_EOL;
-    $outstr .= '     Maintenance panel'.PHP_EOL;
-    $outstr .= '    </div>'.PHP_EOL;
-    $outstr .= '    <div id="maintenance_content">'.PHP_EOL;
-    $outstr .= '     <div id="jqxTabs_maint">'.PHP_EOL;
-    $outstr .= '      <ul>'.PHP_EOL;
-    $outstr .= '       <li style="margin-left: 20px;">General</li>'.PHP_EOL;
-    $outstr .= '       <li style="margin-left: 20px;">1-Wire Bus</li>'.PHP_EOL;
-    $outstr .= '       <li style="margin-left: 20px;">Profiles</li>'.PHP_EOL;
-    $outstr .= '       <li style="margin-left: 20px;">Units</li>'.PHP_EOL;
-    $outstr .= '      </ul>'.PHP_EOL;
-    $outstr .= '      <div>'.PHP_EOL;
-    $outstr .= '       General'.PHP_EOL;
-    $outstr .= '      </div>'.PHP_EOL;
-    $outstr .= '      <div>'.PHP_EOL;
-    $outstr .= '       <div id="jqxgrid_bus" style="margin-left: 8px; margin-top: 6px;"></div>'.PHP_EOL;
-    $outstr .= '      </div>'.PHP_EOL;
-    $outstr .= '      <div>'.PHP_EOL;
-    $outstr .= '       <div id="jqxgrid_profiles" style="margin-left: 8px; margin-top: 6px;"></div>'.PHP_EOL;
-    $outstr .= '       <div id="jqxwindow_addprofile">'.PHP_EOL;
-    $outstr .= '        <div>'.PHP_EOL;
-    $outstr .= '         Add Profile</div>'.PHP_EOL;
-    $outstr .= '        <div style="overflow: hidden;">'.PHP_EOL;
-    $outstr .= '         <div>'.PHP_EOL;
-    $outstr .= '          Profile Name:</div>'.PHP_EOL;
-    $outstr .= '         <div style="margin-top:5px;">'.PHP_EOL;
-    $outstr .= '          <input id="profile_inputField" type="text" class="jqx-input" style="width: 200px; height: 23px;" />'.PHP_EOL;
-    $outstr .= '         </div>'.PHP_EOL;
-    $outstr .= '         <div>'.PHP_EOL;
-    $outstr .= '          <input type="button" style="margin-top: 15px; margin-left: 50px; float: left;" value="Add" id="profile_addButton" />'.PHP_EOL;
-    $outstr .= '          <input type="button" style="margin-left: 5px; margin-top: 15px; float: left;" value="Cancel" id="profile_cancelButton" />'.PHP_EOL;
-    $outstr .= '         </div>'.PHP_EOL;
-    $outstr .= '        </div>'.PHP_EOL;
-    $outstr .= '       </div>'.PHP_EOL;
-    $outstr .= '      </div>'.PHP_EOL;
-    $outstr .= '      <div>'.PHP_EOL;
-    $outstr .= '       <div id="jqxgrid_units" style="margin-left: 8px; margin-top: 6px;"></div>'.PHP_EOL;
-    $outstr .= '      </div>'.PHP_EOL;
-    $outstr .= '     </div>'.PHP_EOL;
-    $outstr .= '     <input type="button" id="maintenance_ok" value="Dismiss" style="margin-top: 5px; margin-left: 365px" />'.PHP_EOL;
-    $outstr .= '    </div>'.PHP_EOL;
-    $outstr .= '    <script type="text/javascript">'.PHP_EOL;
-    $outstr .= '     $(document).ready(function () {'.PHP_EOL;
-    $outstr .= '       $("#jqxTabs_maint").jqxTabs({ width: 790, height: 330, position: \'top\', theme: \''.$my_style.'\'});'.PHP_EOL;
-    $outstr .= '     });'.PHP_EOL;
-    $outstr .= '    </script>'.PHP_EOL;
-    $outstr .= '   </div> <!-- maintenance_window -->'.PHP_EOL;
-
-    return $outstr;
-}
-

mercurial