Fix portal mode links and simplify menu styles

This commit is contained in:
Joe Fiorini 2015-05-27 15:29:07 -04:00
parent 66cb2aaec0
commit d13b063f08
8 changed files with 12 additions and 40 deletions

View File

@ -5,7 +5,7 @@
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Random" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="PortalMode--exit" sketch:type="MSArtboardGroup" fill="#FFFFFF">
<g id="PortalMode--exit" sketch:type="MSArtboardGroup" fill="#000000">
<g id="PortalMode--exit-arrow" sketch:type="MSLayerGroup" transform="translate(2.000000, 8.000000)">
<path d="M11,8.25000041 L32.5589445,8.25 L32.5589445,13.451166 L11,13.4511664 L11,8.25000041 Z" id="Signout-arrow-line" sketch:type="MSShapeGroup"></path>
<path d="M0.66,10.56 L11.22,0.66 L11.22,20.46 L0.66,10.56 L0.66,10.56 Z" id="Signout-arrowhead" sketch:type="MSShapeGroup"></path>

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -2,7 +2,7 @@
function getMenuStylePartialUrl(style) {
if (style !== 'default' && style !== 'minimal') {
if (style !== 'default' && style !== 'portal') {
/* jshint ignore:start */
console.warn('main-menu: "', style, 'is not a valid menu style. Please use "default" or "minimal".');
/* jshint ignore:end */

View File

@ -1,7 +1,6 @@
import mainMenu from './main-menu.directive';
import menuItem from './menu-item.directive';
import menuToggle from './menu-toggle.directive';
import portalModeLink from './portal-mode-link.directive';
import webSocketStatus from './web-socket-status.directive';
import includePartial from 'tower/shared/include-partial/main';
@ -12,7 +11,6 @@ export default
[ includePartial.name,
shared.name
])
.directive('portalModeLink', portalModeLink)
.directive('menuItem', menuItem)
.directive('menuToggleButton', menuToggle)
.directive('webSocketStatus', webSocketStatus)

View File

@ -24,7 +24,7 @@
</i>
<span class="MenuItem-helpTitle">Setup</span>
</a>
<a link-to="portal" portal-mode-link class="MenuItem MenuItem--fixed">
<a link-to="portal" class="MenuItem MenuItem--fixed">
<i class="MenuItem-icon" title="Portal Mode" data-placement="bottom">
<aw-icon name="PortalMode"></aw-icon>
<!-- <img src="/static/img/PortalMode.svg" title="Portal Mode" data-placement="bottom" class="MenuItem-icon"> -->

View File

@ -1,6 +0,0 @@
<a href="#portal" title="Portal" class="MenuItem MenuItem--hoverable">
Portal
</a>
<a portal-mode-link class="MenuItem MenuItem--right MenuItem--fixed" title="Portal Mode">
<img src="/static/img/PortalMode.svg" class="MenuItem-icon">
</a>

View File

@ -0,0 +1,8 @@
<a href="#portal" title="Portal" class="MenuItem MenuItem--hoverable">
Portal
</a>
<a link-to="dashboard" class="MenuItem MenuItem--right MenuItem--fixed" title="Portal Mode">
<i class="MenuItem-icon" title="Exit Portal Mode" data-placement="bottom">
<aw-icon name="PortalMode--exit"></aw-icon>
</i>
</a>

View File

@ -1,28 +0,0 @@
/* jshint unused: vars */
function wrapper(rootScope) {
return function compile(element, attrs) {
var href, title, icon;
if (rootScope.portalMode) {
href = '#';
title = 'Exit Portal Mode';
icon = 'PortalMode--exit.svg';
} else {
href = '#portal';
title = 'Portal Mode';
icon = 'PortalMode.svg';
}
element
.attr('href', href)
.attr('title', title)
.find('>img')
.attr('src', '/static/img/' + icon);
};
}
export default ['$rootScope', function($rootScope) {
return {
compile: wrapper($rootScope)
};
}];

View File

@ -31,7 +31,7 @@
<include-svg href="{{ STATIC_URL }}img/icons.svg"></include-svg>
<main-menu
menu-style="portalMode ? 'minimal' : 'default'"
menu-style="portalMode ? 'portal' : 'default'"
current-user="current_user">
</main-menu>