]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tpl/vintage/js/shaarli.js
Merge tag 'v0.10.4' into stable
[github/shaarli/Shaarli.git] / tpl / vintage / js / shaarli.js
diff --git a/tpl/vintage/js/shaarli.js b/tpl/vintage/js/shaarli.js
deleted file mode 100644 (file)
index 9bcc96f..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-window.onload = function () {
-    var continent = document.getElementById('continent');
-    var city = document.getElementById('city');
-    if (continent != null && city != null) {
-        continent.addEventListener('change', function(event) {
-            hideTimezoneCities(city, continent.options[continent.selectedIndex].value, true);
-        });
-        hideTimezoneCities(city, continent.options[continent.selectedIndex].value, false);
-    }
-};
-
-/**
- * Add the class 'hidden' to city options not attached to the current selected continent.
- *
- * @param cities           List of <option> elements
- * @param currentContinent Current selected continent
- * @param reset            Set to true to reset the selected value
- */
-function hideTimezoneCities(cities, currentContinent, reset = false) {
-    var first = true;
-    [].forEach.call(cities, function(option) {
-        if (option.getAttribute('data-continent') != currentContinent) {
-            option.className = 'hidden';
-        } else {
-            option.className = '';
-            if (reset === true && first === true) {
-                option.setAttribute('selected', 'selected');
-                first = false;
-            }
-        }
-    });
-}