0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-18 02:21:47 -05:00

Merge pull request #3553 from PaulAdamDavis/3546-usermenu-button

Change user menu link to a button
This commit is contained in:
Sebastian Gierlinger 2014-08-01 12:40:24 +02:00
commit 19bef057dc
3 changed files with 4 additions and 4 deletions

View file

@ -7,11 +7,11 @@
{{gh-activating-list-item route="posts" title="Content" classNames="content js-close-sidebar"}}
{{gh-activating-list-item route="editor.new" title="New Post" classNames="editor js-close-sidebar"}}
{{#unless session.user.isAuthor}}
{{gh-activating-list-item route="settings" title="Settings" classNames="settings js-close-sidebar"}}
{{gh-activating-list-item route="settings" title="Settings" classNames="settings js-close-sidebar"}}
{{/unless}}
<li id="usermenu" class="usermenu subnav">
{{#gh-popover-button popoverName="user-menu" tagName="a" href="#" classNames="dropdown"}}
{{#gh-popover-button popoverName="user-menu" classNames="dropdown"}}
{{#if session.user.image}}
<img class="avatar" {{bind-attr src="session.user.image"}} alt="Avatar" />
{{else}}

View file

@ -43,7 +43,7 @@ CasperTest.begin('Admin navigation bar is correct', 28, function suite(test) {
test.assertNotExists('#usermenu ul.overlay.open', 'User menu should not be visible');
});
casper.thenClick('#usermenu a');
casper.thenClick('#usermenu button');
casper.waitForSelector('#usermenu ul.overlay.open', function then() {
var profileHref = this.getElementAttribute('#usermenu li.usermenu-profile a', 'href'),
helpHref = this.getElementAttribute('#usermenu li.usermenu-help a', 'href'),

View file

@ -11,7 +11,7 @@ CasperTest.begin('Ghost signout works correctly', 3, function suite(test) {
test.assertUrlMatch(/ghost\/\d+\/$/, 'Landed on the correct URL without signing in');
});
casper.thenClick('#usermenu a').waitFor(function checkOpaque() {
casper.thenClick('#usermenu button').waitFor(function checkOpaque() {
return this.evaluate(function () {
var menu = document.querySelector('#usermenu .overlay.open');
return window.getComputedStyle(menu).getPropertyValue('display') === 'block' &&