mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-21 10:45:20 -04:00
Update to support showing owner on the infobar
This commit is contained in:
parent
7a85d62b77
commit
3175616573
6 changed files with 55 additions and 8 deletions
|
@ -7,6 +7,7 @@ var lastchangeui = {
|
|||
user: $(".ui-lastchangeuser"),
|
||||
nouser: $(".ui-no-lastchangeuser")
|
||||
}
|
||||
var ownerui = $(".ui-owner");
|
||||
|
||||
function updateLastChange() {
|
||||
if (!lastchangeui) return;
|
||||
|
@ -41,6 +42,23 @@ function updateLastChangeUser() {
|
|||
}
|
||||
}
|
||||
|
||||
var owner = null;
|
||||
var ownerprofile = null;
|
||||
function updateOwner() {
|
||||
if (ownerui) {
|
||||
if (owner && ownerprofile && owner !== lastchangeuser) {
|
||||
var icon = ownerui.children('i');
|
||||
icon.attr('title', ownerprofile.name).tooltip('fixTitle');
|
||||
var styleString = 'background-image:url(' + ownerprofile.photo + ')';
|
||||
if (ownerprofile.photo && icon.attr('style') !== styleString)
|
||||
icon.attr('style', styleString);
|
||||
ownerui.show();
|
||||
} else {
|
||||
ownerui.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//get title
|
||||
function getTitle(view) {
|
||||
var title = "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue