Only add header integration once (fixes #462)

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2019-05-19 20:10:51 +02:00
Родитель 45dc32fc6c
Коммит e3d1cb404e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4C614C6ED2CDE6DF
1 изменённых файлов: 12 добавлений и 10 удалений

Просмотреть файл

@ -208,18 +208,20 @@ var documentsMain = {
following: null,
init : function(){
documentsMain.UI.mainTitle = parent.document.title;
if (!richdocuments_directEdit && parent.$('#richdocuments-avatars').length === 0) {
documentsMain.UI.mainTitle = parent.document.title;
//Add the avatar toolbar if possible
var avatarList = $('<div id="richdocuments-avatars">');
avatarList.on('click', function(e) {
e.stopPropagation();
parent.$('#editors-menu').toggle();
});
var headerRight = parent.$('#header .header-right');
headerRight.prepend(avatarList);
//Add the avatar toolbar if possible
var avatarList = $('<div id="richdocuments-avatars">');
avatarList.on('click', function (e) {
e.stopPropagation();
parent.$('#editors-menu').toggle();
});
var headerRight = parent.$('#header .header-right');
headerRight.prepend(avatarList);
this.addVersionSidebarEvents();
this.addVersionSidebarEvents();
}
},
_addHeaderFileActions: function() {