summaryrefslogtreecommitdiffstats
path: root/core/js/js.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-05-17 18:03:00 +0200
committerJan-Christoph Borchardt <hey@jancborchardt.net>2014-06-04 14:38:24 +0200
commit52d9e313d18003f842cb4329090727b92a287f8d (patch)
treead0722241f89e180d8bf5d3d69fbd7c2e67cf087 /core/js/js.js
parent8eadc2fbd7c4c22b199a36b7d8dbe98277a1fb06 (diff)
downloadnextcloud-server-52d9e313d18003f842cb4329090727b92a287f8d.tar.gz
nextcloud-server-52d9e313d18003f842cb4329090727b92a287f8d.zip
Remove obsoleted code to trigger navigation menu
Now that the navigation menu is always togglable, the media query dependent code can be removed.
Diffstat (limited to 'core/js/js.js')
-rw-r--r--core/js/js.js33
1 files changed, 6 insertions, 27 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 67da7915cfb..0d255b55e57 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -1115,35 +1115,14 @@ function initCore() {
var $toggle = $('#header #owncloud');
var $navigation = $('#navigation');
- function updateMainMenu() {
- if (!$toggle.hasClass('menutoggle')) {
- // init the menu
- OC.registerMenu($toggle, $navigation);
- $toggle.data('oldhref', $toggle.attr('href'));
- $toggle.attr('href', '#');
- $navigation.hide();
- }
- else {
- OC.unregisterMenu($toggle, $navigation);
- $toggle.attr('href', $toggle.data('oldhref'));
- $navigation.show();
- }
- }
-
- updateMainMenu();
-
- // TODO: debounce this
- $(window).resize(function() {
- if (lastMatch !== mq.matches) {
- lastMatch = mq.matches;
- updateMainMenu();
- }
- });
+ // init the menu
+ OC.registerMenu($toggle, $navigation);
+ $toggle.data('oldhref', $toggle.attr('href'));
+ $toggle.attr('href', '#');
+ $navigation.hide();
}
- if (window.matchMedia) {
- setupMainMenu();
- }
+ setupMainMenu();
}
$(document).ready(initCore);