Jump to content

New Notification Flash Message template


adcantu

Recommended Posts

Posted

I would like to edit the flash message that pops up with a new notification. Specifically I am wanting to handle the avatar display depending on user group. I've updated userPhoto and userPhotofromData but neither of those manage this section. 

image.png.1396e90512e073b889a37581d4bbfce4.png

Same for when composing a private message, the autocomplete menu item. 

image.png.41abe2fd92b64701dedd70e242947116.png

Where can I edit these?

Posted

in searching, I found that the mentions function also has this display, and was able to find that template file. However still no luck with the ones I mentioned above.  ¯\_(ツ)_/¯

Posted

The flash message is a javascript template, which you would need to redefine after the default one loads

ips.templates.set('core.notification.flashSingle', " \
	<a href='{{url}}' data-role='newNotification'>\
		<div class='ipsPhotoPanel ipsPhotoPanel_tiny ipsType_medium ipsType_blendLinks'>\
			<img src='{{icon}}' alt='' class='ipsUserPhoto ipsUserPhoto_tiny ipsPos_middle'>\
			<div class='ipsType_left'>\
				{{text}}\
				<p class='ipsType_reset ipsType_light ipsTruncate ipsTruncate_line'>{{{body}}}</p>\
			</div>\
		</div>\
	</a>\
");

same with the typeahead

ips.templates.set('core.autocomplete.memberItem', " \
	<li class='ipsAutocompleteMenu_item ipsClearfix' data-value=\"{{value}}\" role='option' role='listitem'>\
		<div class='ipsPhotoPanel ipsPhotoPanel_tiny'>\
			<span class='ipsUserPhoto ipsUserPhoto_tiny'><img src='{{{photo}}}'></span>\
			<div>\
				<strong>{{{name}}}</strong><br>\
				<span class='ipsType_light'>{{{extra}}}</span>\
			</div>\
		</div>\
	</li>\
");

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...