Skip to content

Commit

Permalink
fixup! Unify headers menu design, fix click area
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
  • Loading branch information
skjnldsv committed Dec 3, 2018
1 parent d570349 commit e33dd2d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
12 changes: 0 additions & 12 deletions core/css/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -475,18 +475,6 @@ nav[role='navigation'] {
}
}

.app-loading {
> svg {
display: none;
}
.icon-loading-small-dark {
width: 20px;
height: 20px;
display: block !important;
}
}


/* Show all app titles on hovering app menu area */
&:hover {
li {
Expand Down
7 changes: 5 additions & 2 deletions core/js/js.js
Original file line number Diff line number Diff line change
Expand Up @@ -1491,8 +1491,11 @@ function initCore() {
if(!$app.is('a')) {
$app = $app.closest('a');
}
if(event.which === 1 && !event.ctrlKey && !event.metaKey) {
$app.addClass('app-loading');
console.log($app);
if(event.which === 1 && !event.ctrlKey && !event.metaKey && $app.parent('#more-apps').length === 0) {
$app.find('svg').remove();
$app.find('div').remove(); // prevent odd double-clicks
$app.prepend($('<div/>').addClass('icon-loading-small'));
} else {
// Close navigation when opening app in
// a new tab
Expand Down
3 changes: 0 additions & 3 deletions core/templates/layout.user.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@
<?php } ?>
<image x="0" y="0" width="20" height="20" preserveAspectRatio="xMinYMin meet"<?php if ($_['themingInvertMenu']) { ?> filter="url(#invertMenuMain-<?php p($entry['id']); ?>)"<?php } ?> xlink:href="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>" class="app-icon" />
</svg>
<div class="icon-loading-small-dark"
style="display:none;"></div>
</a>
<span>
<?php p($entry['name']); ?>
Expand Down Expand Up @@ -87,7 +85,6 @@
<defs><filter id="invertMenuMore-<?php p($entry['id']); ?>"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"></feColorMatrix></filter></defs>
<image x="0" y="0" width="16" height="16" preserveAspectRatio="xMinYMin meet" filter="url(#invertMenuMore-<?php p($entry['id']); ?>)" xlink:href="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>" class="app-icon"></image>
</svg>
<div class="icon-loading-small" style="display:none;"></div>
<span><?php p($entry['name']); ?></span>
</a>
</li>
Expand Down

0 comments on commit e33dd2d

Please sign in to comment.