diff --git a/src/pretix/control/templates/pretixcontrol/base.html b/src/pretix/control/templates/pretixcontrol/base.html
index a48347077..0a45954e4 100644
--- a/src/pretix/control/templates/pretixcontrol/base.html
+++ b/src/pretix/control/templates/pretixcontrol/base.html
@@ -19,7 +19,7 @@
-
+
diff --git a/src/pretix/control/templates/pretixcontrol/event/base.html b/src/pretix/control/templates/pretixcontrol/event/base.html
index 0bf8c0be7..244e38bee 100644
--- a/src/pretix/control/templates/pretixcontrol/event/base.html
+++ b/src/pretix/control/templates/pretixcontrol/event/base.html
@@ -20,9 +20,12 @@
{% endif %}
{% if request.eventperm.can_change_items %}
-
+
{% trans "Products" %}
+
+
@@ -54,9 +57,12 @@
{% endif %}
{% if request.eventperm.can_view_orders %}
-
-
+
{% trans "Orders" %}
+
+
diff --git a/src/static/pretixcontrol/js/menu.js b/src/static/pretixcontrol/js/menu.js
new file mode 100644
index 000000000..c026ee645
--- /dev/null
+++ b/src/static/pretixcontrol/js/menu.js
@@ -0,0 +1,86 @@
+/*
+ * Based on:
+ * metismenu - v1.1.3
+ * Easy menu jQuery plugin for Twitter Bootstrap 3
+ * https://github.com/onokumus/metisMenu
+ *
+ * Made by Osman Nuri Okumus
+ * Under MIT License
+ * Modified by Raphael Michel
+ */
+;(function($, window, document, undefined) {
+
+ var pluginName = "metisMenu",
+ defaults = {
+ toggle: true,
+ };
+
+ function Plugin(element, options) {
+ this.element = $(element);
+ this.settings = $.extend({}, defaults, options);
+ this._defaults = defaults;
+ this._name = pluginName;
+ this.init();
+ }
+
+ Plugin.prototype = {
+ init: function() {
+
+ var $this = this.element,
+ $toggle = this.settings.toggle,
+ obj = this;
+
+ if (this.isIE() <= 9) {
+ $this.find("li.active").has("ul").children("ul").collapse("show");
+ $this.find("li").not(".active").has("ul").children("ul").collapse("hide");
+ } else {
+ $this.find("li.active").has("ul").children("ul").addClass("collapse in");
+ $this.find("li").not(".active").has("ul").children("ul").addClass("collapse");
+ }
+
+ $this.find("li").has("ul").children("a.arrow").on("click" + "." + pluginName, function(e) {
+ e.preventDefault();
+ $(this).blur();
+
+ $(this).parent("li").toggleClass("active").children("ul").collapse("toggle");
+
+ if ($toggle) {
+ $(this).parent("li").siblings().removeClass("active").children("ul.in").collapse("hide");
+ }
+
+ });
+ },
+
+ isIE: function() { //https://gist.github.com/padolsey/527683
+ var undef,
+ v = 3,
+ div = document.createElement("div"),
+ all = div.getElementsByTagName("i");
+
+ while (
+ div.innerHTML = "",
+ all[0]
+ ) {
+ return v > 4 ? v : undef;
+ }
+ },
+
+ remove: function() {
+ this.element.off("." + pluginName);
+ this.element.removeData(pluginName);
+ }
+
+ };
+
+ $.fn[pluginName] = function(options) {
+ this.each(function () {
+ var el = $(this);
+ if (el.data(pluginName)) {
+ el.data(pluginName).remove();
+ }
+ el.data(pluginName, new Plugin(this, options));
+ });
+ return this;
+ };
+
+})(jQuery, window, document);
\ No newline at end of file
diff --git a/src/static/pretixcontrol/js/metisMenu.min.js b/src/static/pretixcontrol/js/metisMenu.min.js
deleted file mode 100644
index a3d46977b..000000000
--- a/src/static/pretixcontrol/js/metisMenu.min.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * metismenu - v1.1.3
- * Easy menu jQuery plugin for Twitter Bootstrap 3
- * https://github.com/onokumus/metisMenu
- *
- * Made by Osman Nuri Okumus
- * Under MIT License
- */
-!function(a,b,c){function d(b,c){this.element=a(b),this.settings=a.extend({},f,c),this._defaults=f,this._name=e,this.init()}var e="metisMenu",f={toggle:!0,doubleTapToGo:!1};d.prototype={init:function(){var b=this.element,d=this.settings.toggle,f=this;this.isIE()<=9?(b.find("li.active").has("ul").children("ul").collapse("show"),b.find("li").not(".active").has("ul").children("ul").collapse("hide")):(b.find("li.active").has("ul").children("ul").addClass("collapse in"),b.find("li").not(".active").has("ul").children("ul").addClass("collapse")),f.settings.doubleTapToGo&&b.find("li.active").has("ul").children("a").addClass("doubleTapToGo"),b.find("li").has("ul").children("a").on("click."+e,function(b){return b.preventDefault(),f.settings.doubleTapToGo&&f.doubleTapToGo(a(this))&&"#"!==a(this).attr("href")&&""!==a(this).attr("href")?(b.stopPropagation(),void(c.location=a(this).attr("href"))):(a(this).parent("li").toggleClass("active").children("ul").collapse("toggle"),void(d&&a(this).parent("li").siblings().removeClass("active").children("ul.in").collapse("hide")))})},isIE:function(){for(var a,b=3,d=c.createElement("div"),e=d.getElementsByTagName("i");d.innerHTML="",e[0];)return b>4?b:a},doubleTapToGo:function(a){var b=this.element;return a.hasClass("doubleTapToGo")?(a.removeClass("doubleTapToGo"),!0):a.parent().children("ul").length?(b.find(".doubleTapToGo").removeClass("doubleTapToGo"),a.addClass("doubleTapToGo"),!1):void 0},remove:function(){this.element.off("."+e),this.element.removeData(e)}},a.fn[e]=function(b){return this.each(function(){var c=a(this);c.data(e)&&c.data(e).remove(),c.data(e,new d(this,b))}),this}}(jQuery,window,document);
diff --git a/src/static/pretixcontrol/js/sb-admin-2.js b/src/static/pretixcontrol/js/sb-admin-2.js
index ca20df47b..12066a24b 100644
--- a/src/static/pretixcontrol/js/sb-admin-2.js
+++ b/src/static/pretixcontrol/js/sb-admin-2.js
@@ -1,4 +1,10 @@
/*global $ */
+/*
+ Based on https://github.com/BlackrockDigital/startbootstrap-sb-admin-2
+ Copyright 2013-2016 Blackrock Digital LLC
+ MIT License
+ Modified by Raphael Michel
+ */
//Loads the correct sidebar on window load,
//collapses the sidebar on window resize.
// Sets the min-height of #page-wrapper to window size
@@ -23,5 +29,7 @@ $(function () {
});
$('ul.nav ul.nav-second-level a.active').parent().parent().addClass('in').parent().addClass('active');
- $('#side-menu').metisMenu({'toggle': false});
+ $('#side-menu').metisMenu({
+ 'toggle': false,
+ });
});
diff --git a/src/static/pretixcontrol/scss/_sb-admin-2.scss b/src/static/pretixcontrol/scss/_sb-admin-2.scss
index d11f53245..b37c684bd 100644
--- a/src/static/pretixcontrol/scss/_sb-admin-2.scss
+++ b/src/static/pretixcontrol/scss/_sb-admin-2.scss
@@ -1,4 +1,9 @@
-
+/*
+Based on https://github.com/BlackrockDigital/startbootstrap-sb-admin-2
+Copyright 2013-2016 Blackrock Digital LLC
+MIT License
+Modified by Raphael Michel
+*/
// Global Styles
body {
@@ -103,15 +108,27 @@ body {
.sidebar ul li {
border-bottom: 1px solid darken($gray-lightest, 6.5%);
+ position: relative;
a {
&.active {
background-color: $gray-lighter;
}
}
+ a.arrow {
+ position: absolute;
+ right: 0;
+ top: 0;
+ display: block;
+ }
+ a.has-children {
+ margin-right: 40px;
+ }
}
-.sidebar .arrow {
- float: right;
+.sidebar .fa.arrow {
+ line-height: 19px !important;
+ width: 10px;
+ text-align: center;
}
.sidebar .fa.arrow:before {