Browse Source

Correcting some syntax problems in the html file. Now the website can be loaded from ROM

master
grch101 5 years ago
committed by Torsten Stauder
parent
commit
6b40e5c251
  1. 1137
      html/index.html
  2. 32
      html/management.html
  3. 32
      src/HTMLmanagement.h
  4. 2
      src/main.cpp

1137
html/index.html
File diff suppressed because it is too large
View File

32
html/management.html

@ -663,7 +663,7 @@
path: node.data.path + "/" + data.name,
directory: data.dir
}
}
};
return child;
@ -765,17 +765,17 @@
if (node.data.directory) {
items.createDir = {
label: "Neuer Ordner",
action: function(x) {
var childNode = ref.create_node(nodeId, {text: "Neuer Ordner", type: "folder"});
if(childNode) {
ref.edit(childNode, null, function(childNode, status){
putData("/explorer?path=" + node.data.path + "/" + childNode.text);
refreshNode(nodeId);
});
label: "Neuer Ordner",
action: function(x) {
var childNode = ref.create_node(nodeId, {text: "Neuer Ordner", type: "folder"});
if(childNode) {
ref.edit(childNode, null, function(childNode, status){
putData("/explorer?path=" + node.data.path + "/" + childNode.text);
refreshNode(nodeId);
});
}
}
}
}
};
}
/* Play */
@ -785,7 +785,7 @@
var playMode = node.data.directory?"5":"1";
postData("/exploreraudio?path=" + node.data.path + "&playmode=" + playMode);
}
}
};
/* Refresh */
items.refresh = {
@ -793,7 +793,7 @@
action: function(x) {
refreshNode(nodeId);
}
}
};
/* Delete */
items.delete = {
@ -802,7 +802,7 @@
handleDeleteData(nodeId);
refreshNode(ref.get_parent(nodeId));
}
}
};
/* Rename */
items.rename = {
@ -815,7 +815,7 @@
refreshNode(ref.get_parent(nodeId));
});
}
}
};
return items;
}
@ -841,7 +841,7 @@
directory: data[i].dir
},
children: []
}
};
$('#explorerTree').jstree(true).settings.core.data.children.push(newChild);
}

32
src/HTMLmanagement.h

@ -663,7 +663,7 @@ static const char management_HTML[] PROGMEM = "<!DOCTYPE html>\
path: node.data.path + \"/\" + data.name,\
directory: data.dir\
}\
}\
};\
\
return child;\
\
@ -765,17 +765,17 @@ static const char management_HTML[] PROGMEM = "<!DOCTYPE html>\
\
if (node.data.directory) {\
items.createDir = {\
label: \"Neuer Ordner\",\
action: function(x) {\
var childNode = ref.create_node(nodeId, {text: \"Neuer Ordner\", type: \"folder\"});\
if(childNode) {\
ref.edit(childNode, null, function(childNode, status){\
putData(\"/explorer?path=\" + node.data.path + \"/\" + childNode.text);\
refreshNode(nodeId);\
});\
label: \"Neuer Ordner\",\
action: function(x) {\
var childNode = ref.create_node(nodeId, {text: \"Neuer Ordner\", type: \"folder\"});\
if(childNode) {\
ref.edit(childNode, null, function(childNode, status){\
putData(\"/explorer?path=\" + node.data.path + \"/\" + childNode.text);\
refreshNode(nodeId);\
});\
}\
}\
}\
}\
};\
}\
\
/* Play */\
@ -785,7 +785,7 @@ static const char management_HTML[] PROGMEM = "<!DOCTYPE html>\
var playMode = node.data.directory?\"5\":\"1\";\
postData(\"/exploreraudio?path=\" + node.data.path + \"&playmode=\" + playMode);\
}\
}\
};\
\
/* Refresh */\
items.refresh = {\
@ -793,7 +793,7 @@ static const char management_HTML[] PROGMEM = "<!DOCTYPE html>\
action: function(x) {\
refreshNode(nodeId);\
}\
}\
};\
\
/* Delete */\
items.delete = {\
@ -802,7 +802,7 @@ static const char management_HTML[] PROGMEM = "<!DOCTYPE html>\
handleDeleteData(nodeId);\
refreshNode(ref.get_parent(nodeId));\
}\
}\
};\
\
/* Rename */\
items.rename = {\
@ -815,7 +815,7 @@ static const char management_HTML[] PROGMEM = "<!DOCTYPE html>\
refreshNode(ref.get_parent(nodeId));\
});\
}\
}\
};\
\
return items;\
}\
@ -841,7 +841,7 @@ static const char management_HTML[] PROGMEM = "<!DOCTYPE html>\
directory: data[i].dir\
},\
children: []\
}\
};\
$('#explorerTree').jstree(true).settings.core.data.children.push(newChild);\
}\
\

2
src/main.cpp

@ -3596,7 +3596,7 @@ void webserverStart(void) {
wServer.addHandler(&events);
wServer.on("/", HTTP_GET, [](AsyncWebServerRequest *request) {
request->send(FSystem, "/management.html", String(), false, templateProcessor);
request->send_P(200, "text/html", management_HTML, templateProcessor);
});
wServer.on("/upload", HTTP_POST, [](AsyncWebServerRequest *request){

Loading…
Cancel
Save