Add current document to title in editor mode. Ref #17
This commit is contained in:
parent
e54b18416f
commit
9ba6064af1
@ -5,8 +5,11 @@ var documentsMain = {
|
|||||||
_members: [],
|
_members: [],
|
||||||
isEditormode : false,
|
isEditormode : false,
|
||||||
useUnstable : false,
|
useUnstable : false,
|
||||||
|
mainTitle : '',
|
||||||
|
documentTitle : '',
|
||||||
onStartup: function() {
|
onStartup: function() {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
documentsMain.mainTitle = $('title').text();
|
||||||
$('<div id="documents-overlay"></div> <div id="documents-overlay-below"></div>').hide().appendTo(document.body);
|
$('<div id="documents-overlay"></div> <div id="documents-overlay-below"></div>').hide().appendTo(document.body);
|
||||||
OC.addScript('documents', 'dojo-amalgamation', function() {
|
OC.addScript('documents', 'dojo-amalgamation', function() {
|
||||||
OC.addScript('documents', 'webodf-debug').done(function() {
|
OC.addScript('documents', 'webodf-debug').done(function() {
|
||||||
@ -80,6 +83,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);
|
||||||
documentsMain.webodfEditorInstance.startEditing();
|
documentsMain.webodfEditorInstance.startEditing();
|
||||||
documentsMain.hideOverlay();
|
documentsMain.hideOverlay();
|
||||||
});
|
});
|
||||||
@ -167,6 +171,7 @@ var documentsMain = {
|
|||||||
$('.actions,#file_access_panel').fadeIn('slow');
|
$('.actions,#file_access_panel').fadeIn('slow');
|
||||||
$('#content').fadeIn('slow');
|
$('#content').fadeIn('slow');
|
||||||
$(document.body).removeClass('claro');
|
$(document.body).removeClass('claro');
|
||||||
|
$('title').text(documentsMain.mainTitle);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
// });
|
// });
|
||||||
@ -266,6 +271,7 @@ $(document).ready(function() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
documentsMain.isEditorMode = true;
|
documentsMain.isEditorMode = true;
|
||||||
|
documentsMain.documentTitle = documentsMain.mainTitle + '| ' + $(this).find('label').text();
|
||||||
documentsMain.showOverlay();
|
documentsMain.showOverlay();
|
||||||
|
|
||||||
if ($(this).attr('data-esid')){
|
if ($(this).attr('data-esid')){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user