Explorar o código

fix: v5 sidemenu & link to shortcuts now works, fixes #10087

Torkel Ödegaard %!s(int64=8) %!d(string=hai) anos
pai
achega
87ceeb0898

+ 1 - 1
public/app/core/components/sidemenu/sidemenu.html

@@ -59,7 +59,7 @@
 				</a>
 			</li>
 			<li ng-repeat="child in ::item.children" ng-class="{divider: child.divider}" ng-hide="::child.hideFromMenu">
-				<a href="{{::child.url}}" target="{{::child.target}}">
+				<a href="{{::child.url}}" target="{{::child.target}}" ng-click="ctrl.itemClicked(child, $event)">
 					<i class="{{::child.icon}}" ng-show="::child.icon"></i>
 					{{::child.text}}
 				</a>

+ 7 - 0
public/app/core/components/sidemenu/sidemenu.ts

@@ -50,6 +50,13 @@ export class SideMenuCtrl {
       templateHtml: '<org-switcher dismiss="dismiss()"></org-switcher>',
     });
   }
+
+  itemClicked(item, evt) {
+    if (item.url === '/shortcuts') {
+      appEvents.emit('show-modal', {templateHtml: '<help-modal></help-modal>'});
+      evt.preventDefault();
+    }
+  }
 }
 
 export function sideMenuDirective() {

+ 0 - 2
public/app/core/services/keybindingSrv.ts

@@ -1,5 +1,3 @@
-///<reference path="../../headers/common.d.ts" />
-
 import $ from 'jquery';
 import _ from 'lodash';
 

+ 0 - 1
public/sass/components/_shortcuts.scss

@@ -11,7 +11,6 @@
   .shortcut-table-category-header {
     font-weight: normal;
     font-size: $font-size-h6;
-    font-style: italic;
     text-align: left;
   }