mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-12 09:26:05 +00:00
Merge "Remove primary link from the bundle of page linked notification"
This commit is contained in:
commit
92c7c8d521
|
@ -22,10 +22,14 @@ class EchoPageLinkedPresentationModel extends EchoEventPresentationModel {
|
|||
}
|
||||
|
||||
public function getPrimaryLink() {
|
||||
return array(
|
||||
'url' => $this->getPageFrom()->getFullURL(),
|
||||
'label' => $this->msg( 'notification-link-text-view-page' )->text(),
|
||||
);
|
||||
if ( $this->isBundled() ) {
|
||||
return false;
|
||||
} else {
|
||||
return array(
|
||||
'url' => $this->getPageFrom()->getFullURL(),
|
||||
'label' => $this->msg( 'notification-link-text-view-page' )->text(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function getSecondaryLinks() {
|
||||
|
|
|
@ -69,6 +69,12 @@
|
|||
// Events
|
||||
this.toggleExpandButton.connect( this, { click: 'expand' } );
|
||||
|
||||
if ( !this.model.getPrimaryUrl() ) {
|
||||
// If there's no primary link, make sure a click
|
||||
// triggers the 'expand' action
|
||||
this.$content.on( 'click', this.expand.bind( this ) );
|
||||
}
|
||||
|
||||
// Initialization
|
||||
this.populateFromModel();
|
||||
this.toggleExpanded( false );
|
||||
|
|
Loading…
Reference in a new issue