diff options
author | Wu Cheng-Han | 2016-10-10 20:32:20 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2016-10-10 20:32:20 +0800 |
commit | 3175616573a9346f8ae2731a8a963b28c42224c3 (patch) | |
tree | 8a899e1597dea0cf2502fe341a53bb46168d7c5d /public/js/extra.js | |
parent | 7a85d62b774ed6f26d0cfd772b4adf312c85f0ce (diff) |
Update to support showing owner on the infobar
Diffstat (limited to '')
-rw-r--r-- | public/js/extra.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/public/js/extra.js b/public/js/extra.js index 77f298f9..6c2e2d4a 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -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 = ""; |