mirror of
https://github.com/webodf/WebODF.git
synced 2026-12-01 16:56:05 +01:00
paragraph styles dialog uses contentpanes as tabs
This commit is contained in:
@@ -1,22 +1,49 @@
|
||||
widgets.ParagraphStylesDialog = (function () {
|
||||
|
||||
function makeWidget(documentObject, callback) {
|
||||
require(["dijit/Dialog"], function (Dialog) {
|
||||
require(["dijit/Dialog", "dijit/layout/TabContainer", "dijit/layout/ContentPane", "dijit/form/RadioButton"], function (Dialog, TabContainer, ContentPane, RadioButton) {
|
||||
var i,
|
||||
dialog;
|
||||
|
||||
dialog,
|
||||
tabContainer, alignmentPane, flowPane, numberingPane, tabsPane, capsPane, bordersPane, backgroundPane, indentsPane;
|
||||
|
||||
// Dialog
|
||||
dialog = new Dialog({
|
||||
title: "Paragraph Styles",
|
||||
style: "width: 300px"
|
||||
});
|
||||
|
||||
// Paragraph Style Selector
|
||||
require(["widgets/paragraphStyles.js"], function () {
|
||||
var styles = new widgets.ParagraphStyles(documentObject, function (widget) {
|
||||
widget.placeAt(dialog);
|
||||
widget.startup();
|
||||
});
|
||||
});
|
||||
// Tab Container
|
||||
tabContainer = new TabContainer({
|
||||
style: "height: 100%; width: 100%;"
|
||||
});
|
||||
dialog.addChild(tabContainer);
|
||||
|
||||
var actionBar = dojo.create("div", {
|
||||
"class": "dijitDialogPaneActionBar"
|
||||
});
|
||||
new dijit.form.Button({
|
||||
"label": "Ok"
|
||||
}).placeAt(actionBar);
|
||||
new dijit.form.Button({
|
||||
"label": "Cancel"
|
||||
}).placeAt(actionBar);
|
||||
dialog.domNode.appendChild(actionBar);
|
||||
|
||||
|
||||
require([
|
||||
"widgets/dialogWidgets/alignmentPane.js",
|
||||
"widgets/dialogWidgets/textFlowPane.js",
|
||||
], function() {
|
||||
new widgets.AlignmentPane(documentObject, function(alignmentPane) {
|
||||
alignmentPane.startup();
|
||||
tabContainer.addChild(alignmentPane);
|
||||
});
|
||||
new widgets.TextFlowPane(documentObject, function(textFlowPane) {
|
||||
textFlowPane.startup();
|
||||
tabContainer.addChild(textFlowPane);
|
||||
});
|
||||
});
|
||||
|
||||
tabContainer.startup();
|
||||
|
||||
return callback(dialog);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user