Skip to content

Commit

Permalink
Merge pull request #2745 from NateWr/i2473_ios_dropdowns
Browse files Browse the repository at this point in the history
#2473 Fix nav menu dropdowns on iOS devices
  • Loading branch information
bozana authored Sep 1, 2017
2 parents 762f4b3 + bdc4a36 commit e74943f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 14 deletions.
9 changes: 0 additions & 9 deletions js/controllers/MenuHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@
function(e) {
$(e.currentTarget).attr('aria-expanded', 'false');
});

// Prevent first touch on top-level menu items from following the link
this.getHtmlElement().find('[aria-haspopup="true"] > a').on(
'touchstart', function(e) {
if ($(this).parent().attr('aria-expanded') != false) {
$(this).focus();
e.preventDefault();
}
});
};
$.pkp.classes.Helper.inherits(
$.pkp.controllers.MenuHandler, $.pkp.classes.Handler);
Expand Down
6 changes: 3 additions & 3 deletions templates/common/header.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

{if array_intersect(array(ROLE_ID_MANAGER), (array)$userRoles)}
<li aria-haspopup="true" aria-expanded="false">
<a href="{url router=$smarty.const.ROUTE_PAGE page="management" op="settings"}">{translate key="navigation.settings"}</a>
<a href="#">{translate key="navigation.settings"}</a>
<ul>
<li><a href="{$contextSettingsUrl}">{translate key="context.context"}</a></li>
<li><a href="{url router=$smarty.const.ROUTE_PAGE page="management" op="settings" path="website"}">{translate key="manager.website"}</a></li>
Expand All @@ -82,15 +82,15 @@
</ul>
</li>
<li aria-haspopup="true" aria-expanded="false">
<a href="{url router=$smarty.const.ROUTE_PAGE page="management" op="settings" path="access"}">{translate key="navigation.access"}</a>
<a href="#">{translate key="navigation.access"}</a>
<ul>
<li><a href="{url router=$smarty.const.ROUTE_PAGE page="management" op="settings" path="access" anchor="users"}">{translate key="manager.users"}</a></li>
<li><a href="{url router=$smarty.const.ROUTE_PAGE page="management" op="settings" path="access" anchor="roles"}">{translate key="manager.roles"}</a></li>
<li><a href="{url router=$smarty.const.ROUTE_PAGE page="management" op="settings" path="access" anchor="siteAccessOptions"}">{translate key="manager.siteAccessOptions.siteAccessOptions"}</a></li>
</ul>
</li>
<li aria-haspopup="true" aria-expanded="false">
<a href="{url router=$smarty.const.ROUTE_PAGE page="management" op="tools" path="index"}">{translate key="navigation.tools"}</a>
<a href="#">{translate key="navigation.tools"}</a>
<ul>
<li><a href="{url router=$smarty.const.ROUTE_PAGE page="management" op="tools" anchor="importexport"}">{translate key="navigation.tools.importExport"}</a></li>
<li><a href="{url router=$smarty.const.ROUTE_PAGE page="management" op="tools" anchor="statistics"}">{translate key="navigation.tools.statistics"}</a></li>
Expand Down
2 changes: 1 addition & 1 deletion templates/header/usernav.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
{/if}
{if $isUserLoggedIn}
<li class="user" aria-haspopup="true" aria-expanded="false">
<a href="{url router=$smarty.const.ROUTE_PAGE page="user" op="profile"}">
<a href="#">
<span class="fa fa-user"></span>
{$loggedInUsername|escape}
</a>
Expand Down
2 changes: 1 addition & 1 deletion tests/data/PKPCreateUsersTest.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ protected function createUsers($users) {
$this->open(self::$baseUrl);
$this->waitForElementPresent($selector='css=li.profile a:contains(\'Dashboard\')');
$this->clickAndWait($selector);
$this->waitForElementPresent($selector='link=Users & Roles');
$this->waitForElementPresent($selector='link=Users');
$this->click($selector);

foreach ($users as $data) {
Expand Down

0 comments on commit e74943f

Please sign in to comment.