Removed obsolete files
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
// % COMMUNICATION
|
||||
|
||||
// local debugging: print the name of every executed funtion to the console
|
||||
var debug_communication_daniel = 0;
|
||||
var debug_communication_daniel = 0
|
||||
|
||||
var timeoutID; // We need this ID to reset the timer every 30 seconds
|
||||
|
||||
@ -336,7 +336,6 @@ function successHandler(s, message) {
|
||||
}
|
||||
|
||||
// Handles incoming XMLHttp-messages depending on type of message.
|
||||
// s: slide number or -1 for replacing slide in all slider instances
|
||||
if (debugCommunication) {
|
||||
console.log("%cfrom server (reqJSON): " + message.type,
|
||||
"color:white;background:dimgray", message);
|
||||
@ -355,31 +354,10 @@ function successHandler(s, message) {
|
||||
}
|
||||
insertSlide(2, "", "parameters", createContent(2, {components:[]}));
|
||||
} else {
|
||||
// NOT USED ANYMORE -> remove swiper
|
||||
// if (s < 0) { // redraw: check for slides in all swiper instances
|
||||
// // not used any more?
|
||||
// for (var isw = 0; isw < MAXBLOCK; isw ++) {
|
||||
// var isl = findSlide(isw, message.path);
|
||||
// if (isl !== null) {
|
||||
// var slide = swiper[isw].slides[isl];
|
||||
// if (slide) {
|
||||
// console.log("redraw", isw, isl);
|
||||
// replaceSlideContent(slide, message.title,
|
||||
// createContent(isw, message));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// } else
|
||||
if (message.path == '_overview') {
|
||||
// remove comment of next line when you want overview _instead_ of Graphics
|
||||
// isl = insertSlide(s, message.title, "_overview", createContent(sLocal, message));
|
||||
// swiper[sLocal].slideTo(isl); /* go to found slide */
|
||||
} else {
|
||||
// insertSlide(s, message.title, message.path, createContent(s, message));
|
||||
// let sLocal = paramSlider[s];
|
||||
|
||||
// *************************************************************************************
|
||||
|
||||
// In the module-block a parameter was selected
|
||||
// -> write parameter-block to grid-element2
|
||||
// If nColumns < 3, hide modules (grid-element1) and show parameters (grid-element2)
|
||||
@ -394,7 +372,6 @@ function successHandler(s, message) {
|
||||
elements[1].style.display = "none"; // show modules
|
||||
elements[2].style.display = "inline-block"; // hide parameters
|
||||
}
|
||||
// swiper[sLocal].slideTo(isl); /* go to found slide */
|
||||
}
|
||||
}
|
||||
nextInitCommand();
|
||||
@ -410,9 +387,7 @@ function successHandler(s, message) {
|
||||
break;
|
||||
// Response to a "console"-server-request.
|
||||
case "accept-console":
|
||||
// draw console
|
||||
// insertSlide(0, "console", "console",
|
||||
// createContentConsole(sLocal));
|
||||
// draw console only to the last grid-element
|
||||
insertSlide(3, "console", "console",
|
||||
createContentConsole(sLocal));
|
||||
nextInitCommand();
|
||||
@ -425,7 +400,6 @@ function successHandler(s, message) {
|
||||
timeRange = message.time;
|
||||
/*createGraphics();
|
||||
// By default mostleft swiper-instance shows graphics.
|
||||
swiper[0].slideTo(0);
|
||||
|
||||
// Update time-selection. (see also SEAWebClientGraphics.js)
|
||||
var select = document.getElementsByClassName("select-time")[0];
|
||||
|
@ -4,8 +4,8 @@
|
||||
// local debugging: print the name of every executed funtion to the console
|
||||
var debug_group_daniel = 0;
|
||||
|
||||
var writePermissionTimeout; // Sets writePermission to 'false, restarts by
|
||||
// user-interaction.
|
||||
var writePermissionTimeout; // Sets writePermission to 'false,
|
||||
// restarts by user-interaction.
|
||||
|
||||
var prompt = false // True while a prompt is opened.
|
||||
|
||||
@ -13,24 +13,8 @@ function getGroup(s, name) {
|
||||
if (debug_group_daniel) {
|
||||
console.log("%cfunction: getGroup", "color:white;background:salmon");
|
||||
}
|
||||
|
||||
// var found = false;
|
||||
// if (name == "") {
|
||||
// swiper[s].slideTo(defaultSlidePos(s));
|
||||
// return;
|
||||
// }
|
||||
// for (var i = 0; i < swiper[s].slides.length; i++) {
|
||||
// var slideType = swiper[s].slides[i].slideType;
|
||||
// if (slideType == name) {
|
||||
// found = true;
|
||||
// swiper[s].slideTo(i);
|
||||
// }
|
||||
// }
|
||||
// if (!found && name != "console" && name != "graphics") {
|
||||
// Server-request for group.
|
||||
reqJSON(s, "http://" + hostPort + "/getblock?path=" + name
|
||||
+ "&id=" + clientID, successHandler, errorHandler);
|
||||
// }
|
||||
reqJSON(s, "http://" + hostPort + "/getblock?path=" + name
|
||||
+ "&id=" + clientID, successHandler, errorHandler);
|
||||
}
|
||||
|
||||
function sendCommand(s, command) {
|
||||
|
@ -1,42 +0,0 @@
|
||||
var showSettings = false;
|
||||
|
||||
function toggleSettings() {
|
||||
// Shows and hides settings.
|
||||
|
||||
console.log("toggle settings");
|
||||
if (showSettings) {
|
||||
document.getElementsByClassName("start-settings-checkboxes")[0].style.display = "none";
|
||||
document.getElementsByClassName("start-settings-show-hide")[0].innerHTML = "show";
|
||||
showSettings = false;
|
||||
} else {
|
||||
document.getElementsByClassName("start-settings-checkboxes")[0].style.display = "inline";
|
||||
document.getElementsByClassName("start-settings-show-hide")[0].innerHTML = "hide";
|
||||
showSettings = true;
|
||||
}
|
||||
}
|
||||
|
||||
function followLink(destination) {
|
||||
// Build query string and load new page.
|
||||
|
||||
var checkboxes = document.getElementsByClassName("start-checkbox");
|
||||
var query = "";
|
||||
// Loop through settings-checkboxes.
|
||||
for (var i = 0; i < checkboxes.length; i++) {
|
||||
if (checkboxes[i].checked != checkboxes[i].defaultChecked) {
|
||||
if (query === "") {
|
||||
query = "?";
|
||||
} else {
|
||||
query += "&";
|
||||
}
|
||||
query += checkboxes[i].name + "=";
|
||||
if (checkboxes[i].checked) {
|
||||
query += "1";
|
||||
} else {
|
||||
query += "0";
|
||||
}
|
||||
}
|
||||
}
|
||||
destination += query;
|
||||
console.log(destination);
|
||||
window.location = destination;
|
||||
}
|
@ -101,78 +101,27 @@ function insertSlide(s, title, type, content) {
|
||||
console.log("%cfunction: insertSlide", "color:white;background:lightblue");
|
||||
}
|
||||
|
||||
// console.log("title: ",title," s: ",s);
|
||||
console.log("title: ",title);
|
||||
|
||||
// Inserts new group to instance s of Swiper. return inserted position
|
||||
|
||||
// Removed, Swiper will be removed, so there´s no need to look for swiper slides.
|
||||
// Instead content will be replaced
|
||||
// var isl = findSlide(s, type);
|
||||
// var slide = swiper[s].slides[isl];
|
||||
// if (slide) { // slide already exists
|
||||
// replaceSlideContent(slide, title, content);
|
||||
// return isl;
|
||||
// }
|
||||
var panel = document.createElement('div');
|
||||
panel.classList.add("panel");
|
||||
|
||||
titlewrapper = document.createElement('span');
|
||||
titlewrapper.innerHTML = title;
|
||||
panel.appendChild(titlewrapper);
|
||||
/*
|
||||
if (type == "_overview" || type == "main") {
|
||||
//panel.appendChild(createHomeButton(s));
|
||||
} else if (type != "graphics" && type != "_inst_select" && type != "console") {
|
||||
panel.appendChild(createCloseButton(s));
|
||||
}
|
||||
*/
|
||||
|
||||
/*if (type === "graphics") {
|
||||
panel.appendChild(createUpdateButton(s));
|
||||
}*/
|
||||
|
||||
var gridContainer = document.createElement('div');
|
||||
// gridContainer.classList.add("swiper-slide", "swiper-slide-main");
|
||||
gridContainer.classList.add("grid-container");
|
||||
// Store type so it can be found easiely later.
|
||||
gridContainer.slideType = type;
|
||||
gridContainer.appendChild(panel);
|
||||
gridContainer.appendChild(content);
|
||||
|
||||
// Graphics-slide is put at mostleft position.
|
||||
// if (type == "graphics" || type == "_overview") {
|
||||
// swiper[s].prependSlide(slide);
|
||||
// swiper[s].slideTo(0);
|
||||
// return 0;
|
||||
// }
|
||||
// swiper[s].appendSlide(slide);
|
||||
// if (type == "console") {
|
||||
// if (s === 3) {
|
||||
// // Slide mostright swiper-instance to last position (console)
|
||||
// swiper[3].slideNext();
|
||||
// }
|
||||
// return swiper[s].slides.length - 1;
|
||||
// }
|
||||
|
||||
var gridelements = document.getElementsByClassName('grid-element');
|
||||
gridelements[s].innerHTML = "";
|
||||
gridelements[s].appendChild(gridContainer);
|
||||
|
||||
let pos = 0;
|
||||
|
||||
// if (swiper[s].slides.length > 1) {
|
||||
// var consoleslide = swiper[s].slides[swiper[s].slides.length - 2];
|
||||
// if (consoleslide.slideType == "console") {
|
||||
// // shift Console-slide to mostright position.
|
||||
// swiper[s].removeSlide(swiper[s].slides.length - 2);
|
||||
// swiper[s].appendSlide(consoleslide);
|
||||
// // Slide to position of new slide
|
||||
// pos = swiper[s].slides.length - 2;
|
||||
// } else {
|
||||
// pos = swiper[s].slides.length - 1;
|
||||
// }
|
||||
// }
|
||||
// swiper[s].slideTo(pos);
|
||||
return pos;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user