Show document title in the panel. Closes #17

This commit is contained in:
Victor Dubiniuk 2013-09-12 22:07:21 +03:00
parent caeaacfc45
commit a6ea161534
2 changed files with 14 additions and 2 deletions

View File

@ -73,6 +73,15 @@
z-index: 500; z-index: 500;
} }
#document-title{
position: relative;
top: 6px;
width:50%;
margin:0 auto -14px auto;
text-align: center;
font-weight: bold;
}
#odf-close{ #odf-close{
float:left; float:left;
} }

View File

@ -44,6 +44,9 @@ var documentsMain = {
' <button id="odf-close">' + ' <button id="odf-close">' +
t('documents', 'Close') + t('documents', 'Close') +
' </button>' + ' </button>' +
'<div id="document-title">' +
documentsMain.documentTitle +
'</div>' +
' <button id="odf-invite">' + ' <button id="odf-invite">' +
t('documents', 'Invite') + t('documents', 'Invite') +
' </button>' + ' </button>' +
@ -83,7 +86,7 @@ var documentsMain = {
// load the document and get called back when it's live // load the document and get called back when it's live
documentsMain.webodfEditorInstance.openSession(response.es_id, memberId, function() { documentsMain.webodfEditorInstance.openSession(response.es_id, memberId, function() {
$('title').text(documentsMain.documentTitle); $('title').text(documentsMain.mainTitle + '| ' + documentsMain.documentTitle);
documentsMain.webodfEditorInstance.startEditing(); documentsMain.webodfEditorInstance.startEditing();
documentsMain.hideOverlay(); documentsMain.hideOverlay();
}); });
@ -271,7 +274,7 @@ $(document).ready(function() {
return; return;
} }
documentsMain.isEditorMode = true; documentsMain.isEditorMode = true;
documentsMain.documentTitle = documentsMain.mainTitle + '| ' + $(this).find('label').text(); documentsMain.documentTitle = $(this).find('label').text();
documentsMain.showOverlay(); documentsMain.showOverlay();
if ($(this).attr('data-esid')){ if ($(this).attr('data-esid')){