From 9b0044c968b04ffcde27ac4e494c7f7ba3e781fa Mon Sep 17 00:00:00 2001
From: Tobias Hintze
Date: Sun, 14 Jul 2013 18:56:32 +0200
Subject: [PATCH] fix broken claro styling; some cosmetics
---
js/office.js | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/js/office.js b/js/office.js
index 77ae8b3e..ccf98c20 100644
--- a/js/office.js
+++ b/js/office.js
@@ -50,17 +50,18 @@ var officeMain = {
''+
''+
''+
- '';
-
+ '',
+ bodyelement = document.getElementsByTagName('body')[0];
+ bodyelement.className += " claro";
$('table').after(canvashtml);
// in case we are on the public sharing page we shall display the odf into the preview tag
- // $('#preview').html(canvashtml);
+ $('#preview').html(canvashtml);
webodfEditor.boot(
{
collaborative: 0,
docUrl: doclocation,
- callback: function() {
+ callback: function() {
// initialized.
}
}
@@ -73,14 +74,17 @@ var officeMain = {
});
},
onClose: function() {
+ "use strict";
+ var bodyelement = document.getElementsByTagName('body')[0];
// Fade out odf-toolbar
$('#odf-toolbar').fadeOut('slow');
// Fade out editor
- $('#odf-canvas').fadeOut('slow', function() {
- $('#odf-toolbar').remove();
+ $('#mainContainer').fadeOut('slow', function() {
+ $('#mainContainer').remove();
$('#odf-canvas').remove();
$('.actions,#file_access_panel').fadeIn('slow');
$('table').fadeIn('slow');
+ bodyelement.className.replace(' claro', '');
});
is_editor_shown = false;
}
|