' +
@@ -221,12 +234,12 @@ var documentsMain = {
$(document.body).attr('id', 'body-login');
$('header,footer,nav').show();
}
- // Fade out toolbar
- $('#odf-toolbar').fadeOut('fast');
+
+ documentsMain.toolbar.documentToolbar('hide');
+
// Fade out editor
$('#mainContainer').fadeOut('fast', function() {
$('#mainContainer').remove();
- $('#odf-toolbar').remove();
$('#content').fadeIn('fast');
$(document.body).removeClass('claro');
$('title').text(documentsMain.UI.mainTitle);
@@ -284,6 +297,7 @@ var documentsMain = {
documentsMain.isGuest = true;
if ($("[name='document']").val()){
+ documentsMain.toolbar.documentToolbar('show');
documentsMain.prepareSession();
documentsMain.joinSession(
$("[name='document']").val()
@@ -339,11 +353,9 @@ var documentsMain = {
return documentsMain.view(response.id);
}
- if (!$('#odf-toolbar').length){
- $('header,footer,nav').hide();
- $(document.body).prepend(documentsMain.UI.toolbar);
- }
-
+ $('header,footer,nav').hide();
+ documentsMain.toolbar.documentToolbar('show');
+
if (!response || !response.status || response.status==='error'){
documentsMain.onEditorShutdown(t('documents', 'Failed to load this document. Please check if it can be opened with an external odt editor. This might also mean it has been unshared or deleted recently.'));
return;
@@ -770,6 +782,7 @@ $(document).ready(function() {
documentsMain.docs = $('.documentslist').documentGrid();
documentsMain.overlay = $('').documentOverlay();
+ documentsMain.toolbar = $('').documentToolbar();
$('.documentslist').on('click', 'li:not(.add-document)', function(event) {
event.preventDefault();