+
-
+
+
diff --git a/rpimonitor/web/js/rpimonitor.addons.js b/rpimonitor/web/js/rpimonitor.addons.js
new file mode 100644
index 0000000..a00adb5
--- /dev/null
+++ b/rpimonitor/web/js/rpimonitor.addons.js
@@ -0,0 +1,66 @@
+// This file is part of RPi-Monitor project
+//
+// Copyright 2014 - Xavier Berger - http://rpi-experiences.blogspot.fr/
+//
+// This program 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 3 of the License, or
+// (at your option) any later version.
+//
+// This program 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 this program. If not, see .
+function ConstructPage()
+{
+ var activePage = GetURLParameter('activePage');
+
+ if ( typeof activePage == 'undefined') {
+ activePage=localStorage.getItem('activePage', activePage);
+ if ( activePage ==null ) { activePage = 0 }
+ }
+ data = getData('addons');
+ if ( activePage >= data.length ){
+ activePage=0;
+ }
+ localStorage.setItem('activePage', activePage);
+ if ( data.length > 1 ) {
+ $('
'+data[activePage].name+'
').insertBefore("#insertionPoint");
+ }
+ else {
+ $('#addonslink').html(data[activePage].name)
+ }
+
+ $("#insertionPoint").load("addons/"+data[activePage].addons+"/"+data[activePage].addons+".html")
+
+ $("head").append("");
+
+ jQuery.ajax({
+ url: "addons/"+data[activePage].addons+"/"+data[activePage].addons+".js",
+ dataType: "script",
+ }).done(function() {
+ });
+
+}
+
+$(function () {
+ /* Set no cache */
+ $.ajaxSetup({ cache: false });
+
+ /* Show friends */
+ ShowFriends();
+
+ /* Add qrcode shortcut*/
+ setupqr();
+ doqr(document.URL);
+
+ /* Get static values once */
+ data = getData('static');
+ localStorage.setItem('static', JSON.stringify(data));
+ ConstructPage();
+});
+
+
diff --git a/rpimonitor/web/js/rpimonitor.index.js b/rpimonitor/web/js/rpimonitor.index.js
index ca5cdc0..ff8e3bd 100644
--- a/rpimonitor/web/js/rpimonitor.index.js
+++ b/rpimonitor/web/js/rpimonitor.index.js
@@ -1,3 +1,19 @@
+// This file is part of RPi-Monitor project
+//
+// Copyright 2013 - 2014 - Xavier Berger - http://rpi-experiences.blogspot.fr/
+//
+// This program 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 3 of the License, or
+// (at your option) any later version.
+//
+// This program 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 this program. If not, see .
$(function () {
ShowFriends();
/* Add qrcode shortcut*/
diff --git a/rpimonitor/web/js/rpimonitor.js b/rpimonitor/web/js/rpimonitor.js
index 9db9cd7..7de59b6 100644
--- a/rpimonitor/web/js/rpimonitor.js
+++ b/rpimonitor/web/js/rpimonitor.js
@@ -1,6 +1,6 @@
// This file is part of RPi-Monitor project
//
-// Copyright 2013 - Xavier Berger - http://rpi-experiences.blogspot.fr/
+// Copyright 2013 - 2014 - Xavier Berger - http://rpi-experiences.blogspot.fr/
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,9 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
var animate;
-var shellinabox;
var shellinaboxuri;
-var shellinaboxwarning;
var statusautorefresh;
var refreshTimerId;
var clickId;
@@ -37,25 +35,6 @@ function GetURLParameter(sParam)
}
}
-function SetShellinaboxMenu(){
- $('#shellinabox').attr('checked', shellinabox );
- $('#shellinaboxwarning').attr('checked', shellinaboxwarning );
- if ( shellinabox ) {
- $('#shellinaboxmenu').removeClass('hide');
- $('#shellinaboxuri').val(shellinaboxuri);
- $('#shellinaboxuri').attr('disabled',false);
- $('#shellinaboxwarning').attr('disabled',false);
- $('#shellinaboxwarninglabel').removeClass('muted');
- }
- else{
- $('#shellinaboxmenu').addClass('hide');
- $('#shellinaboxuri').val('');
- $('#shellinaboxuri').attr('disabled',true);
- $('#shellinaboxwarning').attr('disabled',true);
- $('#shellinaboxwarninglabel').addClass('muted');
- }
-}
-
function getData( name ){
if ( localStorage.getItem(name+'Version') == localStorage.getItem('version') ) {
return eval("(" + localStorage.getItem(name) + ')');
@@ -94,16 +73,13 @@ function ShowFriends(){
function AddFooter(){
$('#footer').html(
'