Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent editor toolbar being too small, at least for left-aligned elements #855

Merged
merged 1 commit into from
Jan 5, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ See also section about WebODF

* Fix wrongly enabled hyperlink tools with no document loaded ([#833](https://github.com/kogmbh/WebODF/pull/833))
* Prevent Cross-Site Scripting from style names and font names ([#849](https://github.com/kogmbh/WebODF/pull/849)))
* Avoid badly rendered toolbar element with subsets of tools ([#849](https://github.com/kogmbh/WebODF/pull/855)))

# Changes between 0.5.3 and 0.5.4

Expand Down
50 changes: 19 additions & 31 deletions programs/editor/Tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,7 @@ define("webodf/editor/Tools", [
aboutButton = new Button({
label: tr('About WebODF Text Editor'),
showLabel: false,
iconClass: 'webodfeditor-dijitWebODFIcon',
style: {
float: 'left'
}
iconClass: 'webodfeditor-dijitWebODFIcon'
});
aboutDialog = new AboutDialog(function (dialog) {
aboutButton.onClick = function () {
Expand All @@ -159,33 +156,12 @@ define("webodf/editor/Tools", [
aboutButton.placeAt(toolbar);
}

// Undo/Redo
undoRedoMenu = createTool(UndoRedoMenu, args.undoRedoEnabled);

// Add annotation
annotationControl = createTool(AnnotationControl, args.annotationsEnabled);

// Simple Style Selector [B, I, U, S]
simpleStyles = createTool(SimpleStyles, args.directTextStylingEnabled);

// Paragraph direct alignment buttons
paragraphAlignment = createTool(ParagraphAlignment, args.directParagraphStylingEnabled);

// Paragraph Style Selector
currentStyle = createTool(CurrentStyle, args.paragraphStyleSelectingEnabled);

// Zoom Level Selector
zoomSlider = createTool(ZoomSlider, args.zoomingEnabled);

// Load
if (loadOdtFile) {
loadButton = new Button({
label: tr('Open'),
showLabel: false,
iconClass: 'dijitIcon dijitIconFolderOpen',
style: {
float: 'left'
},
onClick: function () {
loadOdtFile();
}
Expand All @@ -199,9 +175,6 @@ define("webodf/editor/Tools", [
label: tr('Save'),
showLabel: false,
iconClass: 'dijitEditorIcon dijitEditorIconSave',
style: {
float: 'left'
},
onClick: function () {
saveOdtFile();
onToolDone();
Expand Down Expand Up @@ -234,13 +207,28 @@ define("webodf/editor/Tools", [
disabled: true,
label: tr('Format'),
iconClass: "dijitIconEditTask",
style: {
float: 'left'
}
});
formatMenuButton.placeAt(toolbar);
}

// Undo/Redo
undoRedoMenu = createTool(UndoRedoMenu, args.undoRedoEnabled);

// Add annotation
annotationControl = createTool(AnnotationControl, args.annotationsEnabled);

// Simple Style Selector [B, I, U, S]
simpleStyles = createTool(SimpleStyles, args.directTextStylingEnabled);

// Paragraph direct alignment buttons
paragraphAlignment = createTool(ParagraphAlignment, args.directParagraphStylingEnabled);

// Paragraph Style Selector
currentStyle = createTool(CurrentStyle, args.paragraphStyleSelectingEnabled);

// Zoom Level Selector
zoomSlider = createTool(ZoomSlider, args.zoomingEnabled);

// hyper links
editHyperlinks = createTool(EditHyperlinks, args.hyperlinkEditingEnabled);

Expand Down
9 changes: 9 additions & 0 deletions programs/editor/wodotexteditor.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@
text-align: center;
}

/* Fix toolbar not adapting size to floating toolbar elements */
.dijitToolbar:after {
content: ".";
visibility: hidden;
display: block;
height: 0;
clear: both;
}

.dijitDialog {
border: none !important;
box-shadow: 0 1px 50px rgba(0, 0, 0, 0.25) !important;
Expand Down