-
sort list by:
+
+ sort list by
-
- theme:
-
-
@@ -59,12 +49,14 @@
diff --git a/js/main.js b/js/main.js
index 27e8ce1..04ff12f 100644
--- a/js/main.js
+++ b/js/main.js
@@ -6,24 +6,19 @@
* * NOTICE:
* If your nginx config varies from the default config
* provided in this code, you probably need to change
- * value of filesBaseUrl here too.
+ * value of filesBaseUrl on top of this module too.
*
* Created by mohamnag on 11/02/16.
*/
+
+
$(document).ready(function () {
- function applyTheme() {
- var theme = $('input[name=theme]:checked').val()
+ var filesBaseUrl = "/files";
- console.log(`setting theme to '${theme}'`)
-
- $('body')
- .removeClass()
- .addClass(theme)
-
- localStorage.setItem("theme", theme)
- }
+ var fileListElement = $("#file-list");
+ var fileItemElementTemplate = fileListElement.find("li").detach();
function renderFileElement(directory, fileName, fileType, fileSize, fileDate) {
@@ -208,26 +203,14 @@ $(document).ready(function () {
}
+ var isNavigating = false;
+
function navigateToUrlLocation() {
var requestedPath = window.location.hash;
var startPath = requestedPath ? requestedPath.substr(1) : "/";
navigateTo(startPath);
}
- var filesBaseUrl = "/files";
- var isNavigating = false;
- var fileListElement = $("#file-list");
- var fileItemElementTemplate = fileListElement.find("li").detach();
-
- // setup theme switching
- $('input[name=theme]').on("change", applyTheme);
-
- // apply current theme
- var theme = localStorage.getItem("theme")
- console.log(`theme '${theme}' loaded`)
- $(`input[name=theme][value='${theme}']`).prop('checked', true)
- applyTheme()
-
window.onpopstate = function () {
if (!isNavigating) {
navigateToUrlLocation();