rename notify => notification once more :-)

This commit is contained in:
nupplaPhil 2020-01-24 19:08:03 +01:00
parent b229939c3d
commit 0458b9c2df
No known key found for this signature in database
GPG Key ID: D8365C3D36B77D90
8 changed files with 16 additions and 16 deletions

View File

@ -240,7 +240,7 @@ final class Notification
// Transform the different types of notification in an usable array // Transform the different types of notification in an usable array
switch ($notification['verb']) { switch ($notification['verb']) {
case Activity::LIKE: case Activity::LIKE:
$formattedNotify = [ $formattedNotification = [
'label' => 'like', 'label' => 'like',
'link' => $this->baseUrl->get(true) . '/display/' . $notification['parent-guid'], 'link' => $this->baseUrl->get(true) . '/display/' . $notification['parent-guid'],
'image' => ProxyUtils::proxifyUrl($notification['author-avatar'], false, ProxyUtils::SIZE_MICRO), 'image' => ProxyUtils::proxifyUrl($notification['author-avatar'], false, ProxyUtils::SIZE_MICRO),
@ -253,7 +253,7 @@ final class Notification
break; break;
case Activity::DISLIKE: case Activity::DISLIKE:
$formattedNotify = [ $formattedNotification = [
'label' => 'dislike', 'label' => 'dislike',
'link' => $this->baseUrl->get(true) . '/display/' . $notification['parent-guid'], 'link' => $this->baseUrl->get(true) . '/display/' . $notification['parent-guid'],
'image' => ProxyUtils::proxifyUrl($notification['author-avatar'], false, ProxyUtils::SIZE_MICRO), 'image' => ProxyUtils::proxifyUrl($notification['author-avatar'], false, ProxyUtils::SIZE_MICRO),
@ -266,7 +266,7 @@ final class Notification
break; break;
case Activity::ATTEND: case Activity::ATTEND:
$formattedNotify = [ $formattedNotification = [
'label' => 'attend', 'label' => 'attend',
'link' => $this->baseUrl->get(true) . '/display/' . $notification['parent-guid'], 'link' => $this->baseUrl->get(true) . '/display/' . $notification['parent-guid'],
'image' => ProxyUtils::proxifyUrl($notification['author-avatar'], false, ProxyUtils::SIZE_MICRO), 'image' => ProxyUtils::proxifyUrl($notification['author-avatar'], false, ProxyUtils::SIZE_MICRO),
@ -279,7 +279,7 @@ final class Notification
break; break;
case Activity::ATTENDNO: case Activity::ATTENDNO:
$formattedNotify = [ $formattedNotification = [
'label' => 'attendno', 'label' => 'attendno',
'link' => $this->baseUrl->get(true) . '/display/' . $notification['parent-guid'], 'link' => $this->baseUrl->get(true) . '/display/' . $notification['parent-guid'],
'image' => ProxyUtils::proxifyUrl($notification['author-avatar'], false, ProxyUtils::SIZE_MICRO), 'image' => ProxyUtils::proxifyUrl($notification['author-avatar'], false, ProxyUtils::SIZE_MICRO),
@ -292,7 +292,7 @@ final class Notification
break; break;
case Activity::ATTENDMAYBE: case Activity::ATTENDMAYBE:
$formattedNotify = [ $formattedNotification = [
'label' => 'attendmaybe', 'label' => 'attendmaybe',
'link' => $this->baseUrl->get(true) . '/display/' . $notification['parent-guid'], 'link' => $this->baseUrl->get(true) . '/display/' . $notification['parent-guid'],
'image' => ProxyUtils::proxifyUrl($notification['author-avatar'], false, ProxyUtils::SIZE_MICRO), 'image' => ProxyUtils::proxifyUrl($notification['author-avatar'], false, ProxyUtils::SIZE_MICRO),
@ -306,7 +306,7 @@ final class Notification
case Activity::FRIEND: case Activity::FRIEND:
if (!isset($notification['object'])) { if (!isset($notification['object'])) {
$formattedNotify = [ $formattedNotification = [
'label' => 'friend', 'label' => 'friend',
'link' => $default_item_link, 'link' => $default_item_link,
'image' => $default_item_image, 'image' => $default_item_image,
@ -325,7 +325,7 @@ final class Notification
$obj = XML::parseString($xmlHead . $notification['object']); $obj = XML::parseString($xmlHead . $notification['object']);
$notification['fname'] = $obj->title; $notification['fname'] = $obj->title;
$formattedNotify = [ $formattedNotification = [
'label' => 'friend', 'label' => 'friend',
'link' => $this->baseUrl->get(true) . '/display/' . $notification['parent-guid'], 'link' => $this->baseUrl->get(true) . '/display/' . $notification['parent-guid'],
'image' => ProxyUtils::proxifyUrl($notification['author-avatar'], false, ProxyUtils::SIZE_MICRO), 'image' => ProxyUtils::proxifyUrl($notification['author-avatar'], false, ProxyUtils::SIZE_MICRO),
@ -338,7 +338,7 @@ final class Notification
break; break;
default: default:
$formattedNotify = [ $formattedNotification = [
'label' => $default_item_label, 'label' => $default_item_label,
'link' => $default_item_link, 'link' => $default_item_link,
'image' => $default_item_image, 'image' => $default_item_image,
@ -350,7 +350,7 @@ final class Notification
]; ];
} }
$formattedNotifications[] = $formattedNotify; $formattedNotifications[] = $formattedNotification;
} }
return $formattedNotifications; return $formattedNotifications;

View File

@ -948,7 +948,7 @@ function checkboxhighlight(box) {
} }
} }
function notifyMarkAll() { function notificationMarkAll() {
$.get('notification/mark/all', function(data) { $.get('notification/mark/all', function(data) {
if (timer) { if (timer) {
clearTimeout(timer); clearTimeout(timer);

View File

@ -52,7 +52,7 @@
<span id="notification-update" class="nav-ajax-left"></span> <span id="notification-update" class="nav-ajax-left"></span>
<ul id="nav-notifications-menu" class="menu-popup"> <ul id="nav-notifications-menu" class="menu-popup">
<li id="nav-notifications-see-all"><a href="{{$nav.notifications.all.0}}">{{$nav.notifications.all.1}}</a></li> <li id="nav-notifications-see-all"><a href="{{$nav.notifications.all.0}}">{{$nav.notifications.all.1}}</a></li>
<li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.3}}</a></li> <li id="nav-notifications-mark-all"><a href="#" onclick="notificationMarkAll(); return false;">{{$nav.notifications.mark.3}}</a></li>
<li class="empty">{{$emptynotifications}}</li> <li class="empty">{{$emptynotifications}}</li>
</ul> </ul>
{{/if}} {{/if}}

View File

@ -51,7 +51,7 @@
<span id="notification-update" class="nav-ajax-left"></span> <span id="notification-update" class="nav-ajax-left"></span>
<ul id="nav-notifications-menu" class="menu-popup"> <ul id="nav-notifications-menu" class="menu-popup">
<li id="nav-notifications-see-all"><a href="{{$nav.notifications.all.0}}">{{$nav.notifications.all.1}}</a></li> <li id="nav-notifications-see-all"><a href="{{$nav.notifications.all.0}}">{{$nav.notifications.all.1}}</a></li>
<li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.3}}</a></li> <li id="nav-notifications-mark-all"><a href="#" onclick="notificationMarkAll(); return false;">{{$nav.notifications.mark.3}}</a></li>
<li class="empty">{{$emptynotifications}}</li> <li class="empty">{{$emptynotifications}}</li>
</ul> </ul>
{{/if}} {{/if}}

View File

@ -84,7 +84,7 @@
<div class="arrow"></div> <div class="arrow"></div>
{{$nav.notifications.1}} {{$nav.notifications.1}}
<div class="dropdown-header-link"> <div class="dropdown-header-link">
<button role="menuitem" type="button" class="btn-link" onclick="notifyMarkAll();" data-toggle="tooltip" aria-label="{{$nav.notifications.mark.3}}" title="{{$nav.notifications.mark.3}}">{{$nav.notifications.mark.1}}</button> <button role="menuitem" type="button" class="btn-link" onclick="notificationMarkAll();" data-toggle="tooltip" aria-label="{{$nav.notifications.mark.3}}" title="{{$nav.notifications.mark.3}}">{{$nav.notifications.mark.1}}</button>
</div> </div>
</li> </li>

View File

@ -63,7 +63,7 @@
<span id="notification-update" class="nav-notification"></span> <span id="notification-update" class="nav-notification"></span>
<ul id="nav-notifications-menu" class="menu-popup"> <ul id="nav-notifications-menu" class="menu-popup">
<!-- TODO: better icons! --> <!-- TODO: better icons! -->
<li id="nav-notifications-mark-all" class="toolbar"><a href="#" onclick="notifyMarkAll(); return false;" title="{{$nav.notifications.mark.3}}"><span class="icon s10 edit"></span></a></a><a href="{{$nav.notifications.all.0}}" title="{{$nav.notifications.all.1}}"><span class="icon s10 plugin"></span></a></li> <li id="nav-notifications-mark-all" class="toolbar"><a href="#" onclick="notificationMarkAll(); return false;" title="{{$nav.notifications.mark.3}}"><span class="icon s10 edit"></span></a></a><a href="{{$nav.notifications.all.0}}" title="{{$nav.notifications.all.1}}"><span class="icon s10 plugin"></span></a></li>
<li class="empty">{{$emptynotifications}}</li> <li class="empty">{{$emptynotifications}}</li>
</ul> </ul>
</li> </li>

View File

@ -11,7 +11,7 @@
{{if $nav.notifications}}<a rel="#nav-notifications-menu" id="notification-update" class="nav-ajax-update" href="{{$nav.notifications.0}}" title="{{$nav.notifications.1}}"></a>{{/if}} {{if $nav.notifications}}<a rel="#nav-notifications-menu" id="notification-update" class="nav-ajax-update" href="{{$nav.notifications.0}}" title="{{$nav.notifications.1}}"></a>{{/if}}
<ul id="nav-notifications-menu" class="menu-popup"> <ul id="nav-notifications-menu" class="menu-popup">
<li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.3}}</a></li> <li id="nav-notifications-mark-all"><a href="#" onclick="notificationMarkAll(); return false;">{{$nav.notifications.mark.3}}</a></li>
<li id="nav-notifications-see-all"><a href="{{$nav.notifications.all.0}}">{{$nav.notifications.all.1}}</a></li> <li id="nav-notifications-see-all"><a href="{{$nav.notifications.all.0}}">{{$nav.notifications.all.1}}</a></li>
<li class="empty">{{$emptynotifications}}</li> <li class="empty">{{$emptynotifications}}</li>
</ul> </ul>

View File

@ -69,7 +69,7 @@
<span id="notification-update" class="nav-notification"></span> <span id="notification-update" class="nav-notification"></span>
</a> </a>
<ul id="nav-notifications-menu" class="menu-popup"> <ul id="nav-notifications-menu" class="menu-popup">
<li role="menuitem" id="nav-notifications-mark-all"><a onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.1}}</a></li> <li role="menuitem" id="nav-notifications-mark-all"><a onclick="notificationMarkAll(); return false;">{{$nav.notifications.mark.1}}</a></li>
<li role="menuitem" id="nav-notifications-see-all"><a href="{{$nav.notifications.all.0}}">{{$nav.notifications.all.1}}</a></li> <li role="menuitem" id="nav-notifications-see-all"><a href="{{$nav.notifications.all.0}}">{{$nav.notifications.all.1}}</a></li>
<li role="menuitem" class="empty">{{$emptynotifications}}</li> <li role="menuitem" class="empty">{{$emptynotifications}}</li>
</ul> </ul>