~canonical-sysadmins/wordpress/4.4.1

« back to all changes in this revision

Viewing changes to wp-includes/js/tinymce/themes/modern/theme.js

  • Committer: Ryan Finnie
  • Date: 2015-09-15 23:22:31 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: ryan.finnie@canonical.com-20150915232231-8o4k4qwyh9qb9hrp
Merge WP4.3.1 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
        var defaultToolbar = "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | " +
29
29
                "bullist numlist outdent indent | link image";
30
30
 
31
 
        function createToolbar(items) {
 
31
        function createToolbar(items, size) {
32
32
                var toolbarItems = [], buttonGroup;
33
33
 
34
34
                if (!items) {
88
88
                                buttonGroup = null;
89
89
                        } else {
90
90
                                if (Factory.has(item)) {
91
 
                                        item = {type: item};
92
 
 
93
 
                                        if (settings.toolbar_items_size) {
94
 
                                                item.size = settings.toolbar_items_size;
95
 
                                        }
96
 
 
 
91
                                        item = {type: item, size: size};
97
92
                                        toolbarItems.push(item);
98
93
                                        buttonGroup = null;
99
94
                                } else {
112
107
                                                }
113
108
 
114
109
                                                item.type = item.type || 'button';
115
 
 
116
 
                                                if (settings.toolbar_items_size) {
117
 
                                                        item.size = settings.toolbar_items_size;
118
 
                                                }
 
110
                                                item.size = size;
119
111
 
120
112
                                                item = Factory.create(item);
121
113
                                                buttonGroup.items.push(item);
140
132
        /**
141
133
         * Creates the toolbars from config and returns a toolbar array.
142
134
         *
 
135
         * @param {String} size Optional toolbar item size.
143
136
         * @return {Array} Array with toolbars.
144
137
         */
145
 
        function createToolbars() {
 
138
        function createToolbars(size) {
146
139
                var toolbars = [];
147
140
 
148
141
                function addToolbar(items) {
149
142
                        if (items) {
150
 
                                toolbars.push(createToolbar(items));
 
143
                                toolbars.push(createToolbar(items, size));
151
144
                                return true;
152
145
                        }
153
146
                }
670
663
                                border: 1,
671
664
                                items: [
672
665
                                        settings.menubar === false ? null : {type: 'menubar', border: '0 0 1 0', items: createMenuButtons()},
673
 
                                        createToolbars()
 
666
                                        createToolbars(settings.toolbar_items_size)
674
667
                                ]
675
668
                        });
676
669
 
747
740
                        border: 1,
748
741
                        items: [
749
742
                                settings.menubar === false ? null : {type: 'menubar', border: '0 0 1 0', items: createMenuButtons()},
750
 
                                createToolbars(),
 
743
                                createToolbars(settings.toolbar_items_size),
751
744
                                {type: 'panel', name: 'iframe', layout: 'stack', classes: 'edit-area', html: '', border: '1 0 0 0'}
752
745
                        ]
753
746
                });