tinymce-rails 4.0.7 → 4.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/source/tinymce/tinymce.jquery.js +166 -85
- data/app/assets/source/tinymce/tinymce.js +166 -85
- data/lib/tinymce/rails/version.rb +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/code/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/importcss/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/media/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/table/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/textcolor/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.ie7.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/themes/modern/theme.js +1 -1
- data/vendor/assets/javascripts/tinymce/tinymce.jquery.js +9 -9
- data/vendor/assets/javascripts/tinymce/tinymce.js +10 -10
- metadata +2 -2
@@ -1,4 +1,4 @@
|
|
1
|
-
// 4.0.
|
1
|
+
// 4.0.8 (2013-10-10)
|
2
2
|
|
3
3
|
/**
|
4
4
|
* Compiled inline version. (Library mode)
|
@@ -202,6 +202,12 @@ define("tinymce/html/Styles", [], function() {
|
|
202
202
|
function compress(prefix, suffix) {
|
203
203
|
var top, right, bottom, left;
|
204
204
|
|
205
|
+
// IE 11 will produce a border-image: none when getting the style attribute from <p style="border: 1px solid red"></p>
|
206
|
+
// So lets asume it shouldn't be there
|
207
|
+
if (styles['border-image'] === 'none') {
|
208
|
+
delete styles['border-image'];
|
209
|
+
}
|
210
|
+
|
205
211
|
// Get values and check it it needs compressing
|
206
212
|
top = styles[prefix + '-top' + suffix];
|
207
213
|
if (!top) {
|
@@ -628,9 +634,9 @@ define("tinymce/dom/EventUtils", [], function() {
|
|
628
634
|
* @param {String} id Expando id value to look for.
|
629
635
|
*/
|
630
636
|
function executeHandlers(evt, id) {
|
631
|
-
var callbackList, i, l, callback;
|
637
|
+
var callbackList, i, l, callback, container = events[id];
|
632
638
|
|
633
|
-
callbackList =
|
639
|
+
callbackList = container && container[evt.type];
|
634
640
|
if (callbackList) {
|
635
641
|
for (i = 0, l = callbackList.length; i < l; i++) {
|
636
642
|
callback = callbackList[i];
|
@@ -13634,8 +13640,9 @@ define("tinymce/Formatter", [
|
|
13634
13640
|
|
13635
13641
|
// Move selection to text node
|
13636
13642
|
selection.setCursorLocation(node, 1);
|
13643
|
+
|
13637
13644
|
// If the formatNode is empty, we can remove it safely.
|
13638
|
-
if(dom.isEmpty(formatNode)) {
|
13645
|
+
if (dom.isEmpty(formatNode)) {
|
13639
13646
|
dom.remove(formatNode);
|
13640
13647
|
}
|
13641
13648
|
}
|
@@ -14690,6 +14697,10 @@ define("tinymce/EnterKey", [
|
|
14690
14697
|
}
|
14691
14698
|
|
14692
14699
|
dom.setAttrib(newBlock, 'id', ''); // Remove ID since it needs to be document unique
|
14700
|
+
|
14701
|
+
// Allow custom handling of new blocks
|
14702
|
+
editor.fire('NewBlock', { newBlock: newBlock });
|
14703
|
+
|
14693
14704
|
undoManager.add();
|
14694
14705
|
}
|
14695
14706
|
|
@@ -16878,7 +16889,19 @@ define("tinymce/ui/DomUtils", [
|
|
16878
16889
|
},
|
16879
16890
|
|
16880
16891
|
getSize: function(elm) {
|
16881
|
-
|
16892
|
+
var width, height;
|
16893
|
+
|
16894
|
+
if (elm.getBoundingClientRect) {
|
16895
|
+
var rect = elm.getBoundingClientRect();
|
16896
|
+
|
16897
|
+
width = Math.max(rect.width || (rect.right - rect.left), elm.offsetWidth);
|
16898
|
+
height = Math.max(rect.height || (rect.bottom - rect.bottom), elm.offsetHeight);
|
16899
|
+
} else {
|
16900
|
+
width = elm.offsetWidth;
|
16901
|
+
height = elm.offsetHeight;
|
16902
|
+
}
|
16903
|
+
|
16904
|
+
return {width: width, height: height};
|
16882
16905
|
},
|
16883
16906
|
|
16884
16907
|
getPos: function(elm, root) {
|
@@ -16970,6 +16993,10 @@ define("tinymce/ui/Control", [
|
|
16970
16993
|
controlIdLookup: {}
|
16971
16994
|
},
|
16972
16995
|
|
16996
|
+
isRtl: function() {
|
16997
|
+
return Control.rtl;
|
16998
|
+
},
|
16999
|
+
|
16973
17000
|
/**
|
16974
17001
|
* Class/id prefix to use for all controls.
|
16975
17002
|
*
|
@@ -17173,7 +17200,7 @@ define("tinymce/ui/Control", [
|
|
17173
17200
|
}
|
17174
17201
|
|
17175
17202
|
function getSide(name) {
|
17176
|
-
var val =
|
17203
|
+
var val = parseFloat(getStyle(name), 10);
|
17177
17204
|
|
17178
17205
|
return isNaN(val) ? 0 : val;
|
17179
17206
|
}
|
@@ -17197,18 +17224,19 @@ define("tinymce/ui/Control", [
|
|
17197
17224
|
initLayoutRect: function() {
|
17198
17225
|
var self = this, settings = self.settings, borderBox, layoutRect;
|
17199
17226
|
var elm = self.getEl(), width, height, minWidth, minHeight, autoResize;
|
17200
|
-
var startMinWidth, startMinHeight;
|
17227
|
+
var startMinWidth, startMinHeight, initialSize;
|
17201
17228
|
|
17202
|
-
// Measure
|
17229
|
+
// Measure the current element
|
17203
17230
|
borderBox = self._borderBox = self._borderBox || self.measureBox(elm, 'border');
|
17204
17231
|
self._paddingBox = self._paddingBox || self.measureBox(elm, 'padding');
|
17205
17232
|
self._marginBox = self._marginBox || self.measureBox(elm, 'margin');
|
17233
|
+
initialSize = DomUtils.getSize(elm);
|
17206
17234
|
|
17207
17235
|
// Setup minWidth/minHeight and width/height
|
17208
17236
|
startMinWidth = settings.minWidth;
|
17209
17237
|
startMinHeight = settings.minHeight;
|
17210
|
-
minWidth = startMinWidth ||
|
17211
|
-
minHeight = startMinHeight ||
|
17238
|
+
minWidth = startMinWidth || initialSize.width;
|
17239
|
+
minHeight = startMinHeight || initialSize.height;
|
17212
17240
|
width = settings.width;
|
17213
17241
|
height = settings.height;
|
17214
17242
|
autoResize = settings.autoResize;
|
@@ -17626,6 +17654,17 @@ define("tinymce/ui/Control", [
|
|
17626
17654
|
return args;
|
17627
17655
|
},
|
17628
17656
|
|
17657
|
+
/**
|
17658
|
+
* Returns true/false if the specified event has any listeners.
|
17659
|
+
*
|
17660
|
+
* @method hasEventListeners
|
17661
|
+
* @param {String} name Name of the event to check for.
|
17662
|
+
* @return {Boolean} True/false state if the event has listeners.
|
17663
|
+
*/
|
17664
|
+
hasEventListeners: function(name) {
|
17665
|
+
return name in this._bindings;
|
17666
|
+
},
|
17667
|
+
|
17629
17668
|
/**
|
17630
17669
|
* Returns a control collection with all parent controls.
|
17631
17670
|
*
|
@@ -18434,7 +18473,7 @@ define("tinymce/ui/Control", [
|
|
18434
18473
|
*/
|
18435
18474
|
// title: function(value) {} -- Generated
|
18436
18475
|
});
|
18437
|
-
|
18476
|
+
|
18438
18477
|
return Control;
|
18439
18478
|
});
|
18440
18479
|
|
@@ -18600,6 +18639,10 @@ define("tinymce/ui/Container", [
|
|
18600
18639
|
self._fixed = settings.fixed;
|
18601
18640
|
self._items = new Collection();
|
18602
18641
|
|
18642
|
+
if (self.isRtl()) {
|
18643
|
+
self.addClass('rtl');
|
18644
|
+
}
|
18645
|
+
|
18603
18646
|
self.addClass('container');
|
18604
18647
|
self.addClass('container-body', 'body');
|
18605
18648
|
|
@@ -19391,7 +19434,7 @@ define("tinymce/ui/Movable", [
|
|
19391
19434
|
"use strict";
|
19392
19435
|
|
19393
19436
|
function calculateRelativePosition(ctrl, targetElm, rel) {
|
19394
|
-
var ctrlElm, pos, x, y, selfW, selfH, targetW, targetH, viewport;
|
19437
|
+
var ctrlElm, pos, x, y, selfW, selfH, targetW, targetH, viewport, size;
|
19395
19438
|
|
19396
19439
|
viewport = DomUtils.getViewPort();
|
19397
19440
|
|
@@ -19407,12 +19450,14 @@ define("tinymce/ui/Movable", [
|
|
19407
19450
|
|
19408
19451
|
// Get size of self
|
19409
19452
|
ctrlElm = ctrl.getEl();
|
19410
|
-
|
19411
|
-
|
19453
|
+
size = DomUtils.getSize(ctrlElm);
|
19454
|
+
selfW = size.width;
|
19455
|
+
selfH = size.height;
|
19412
19456
|
|
19413
19457
|
// Get size of target
|
19414
|
-
|
19415
|
-
|
19458
|
+
size = DomUtils.getSize(targetElm);
|
19459
|
+
targetW = size.width;
|
19460
|
+
targetH = size.height;
|
19416
19461
|
|
19417
19462
|
// Parse align string
|
19418
19463
|
rel = (rel || '').split('');
|
@@ -19869,7 +19914,7 @@ define("tinymce/ui/FloatPanel", [
|
|
19869
19914
|
|
19870
19915
|
if (settings.popover) {
|
19871
19916
|
self._preBodyHtml = '<div class="' + self.classPrefix + 'arrow"></div>';
|
19872
|
-
self.addClass('popover').addClass('bottom').addClass('start');
|
19917
|
+
self.addClass('popover').addClass('bottom').addClass(self.isRtl() ? 'end' : 'start');
|
19873
19918
|
}
|
19874
19919
|
},
|
19875
19920
|
|
@@ -20401,6 +20446,10 @@ define("tinymce/ui/Window", [
|
|
20401
20446
|
|
20402
20447
|
self._super(settings);
|
20403
20448
|
|
20449
|
+
if (self.isRtl()) {
|
20450
|
+
self.addClass('rtl');
|
20451
|
+
}
|
20452
|
+
|
20404
20453
|
self.addClass('window');
|
20405
20454
|
self._fixed = true;
|
20406
20455
|
|
@@ -20412,7 +20461,7 @@ define("tinymce/ui/Window", [
|
|
20412
20461
|
spacing: 3,
|
20413
20462
|
padding: 10,
|
20414
20463
|
align: 'center',
|
20415
|
-
pack: 'end',
|
20464
|
+
pack: self.isRtl() ? 'start' : 'end',
|
20416
20465
|
defaults: {
|
20417
20466
|
type: 'button'
|
20418
20467
|
},
|
@@ -20491,8 +20540,12 @@ define("tinymce/ui/Window", [
|
|
20491
20540
|
// Reserve vertical space for title
|
20492
20541
|
if (self.settings.title && !self._fullscreen) {
|
20493
20542
|
headEl = self.getEl('head');
|
20494
|
-
|
20495
|
-
|
20543
|
+
|
20544
|
+
var size = DomUtils.getSize(headEl);
|
20545
|
+
|
20546
|
+
layoutRect.headerW = size.width;
|
20547
|
+
layoutRect.headerH = size.height;
|
20548
|
+
|
20496
20549
|
deltaH += layoutRect.headerH;
|
20497
20550
|
}
|
20498
20551
|
|
@@ -22107,6 +22160,7 @@ define("tinymce/util/Quirks", [
|
|
22107
22160
|
if (e.target.nodeName == 'HTML') {
|
22108
22161
|
editor.execCommand('SelectAll');
|
22109
22162
|
editor.selection.collapse(true);
|
22163
|
+
editor.nodeChanged();
|
22110
22164
|
}
|
22111
22165
|
});
|
22112
22166
|
}
|
@@ -22995,6 +23049,7 @@ define("tinymce/Editor", [
|
|
22995
23049
|
var self = this, settings = self.settings, elm = self.getElement();
|
22996
23050
|
var w, h, minHeight, n, o, url, bodyId, bodyClass, re, i, initializedPlugins = [];
|
22997
23051
|
|
23052
|
+
self.rtl = this.editorManager.i18n.rtl;
|
22998
23053
|
self.editorManager.add(self);
|
22999
23054
|
|
23000
23055
|
settings.aria_label = settings.aria_label || DOM.getAttrib(elm, 'aria-label', self.getLang('aria.rich_text_area'));
|
@@ -24270,8 +24325,17 @@ define("tinymce/Editor", [
|
|
24270
24325
|
// Move selection to start of body if it's a after init setContent call
|
24271
24326
|
// This prevents IE 7/8 from moving focus to empty editors
|
24272
24327
|
if (!args.initial) {
|
24273
|
-
self.selection.
|
24274
|
-
|
24328
|
+
var dom = self.dom, selection = self.selection;
|
24329
|
+
|
24330
|
+
// IE can't have the caret inside <body><p>|</p></body> unless we do some magic
|
24331
|
+
if (ie < 11 && dom.isBlock(body.firstChild) && dom.isEmpty(body.firstChild)) {
|
24332
|
+
body.firstChild.appendChild(dom.doc.createTextNode('\u00a0'));
|
24333
|
+
selection.select(body.firstChild, true);
|
24334
|
+
dom.remove(body.firstChild.lastChild);
|
24335
|
+
} else {
|
24336
|
+
selection.select(body, true);
|
24337
|
+
selection.collapse(true);
|
24338
|
+
}
|
24275
24339
|
}
|
24276
24340
|
|
24277
24341
|
return args.content;
|
@@ -24581,6 +24645,10 @@ define("tinymce/Editor", [
|
|
24581
24645
|
bindNative: function(name) {
|
24582
24646
|
var self = this;
|
24583
24647
|
|
24648
|
+
if (self.settings.readonly) {
|
24649
|
+
return;
|
24650
|
+
}
|
24651
|
+
|
24584
24652
|
if (self.initialized) {
|
24585
24653
|
self.dom.bind(getEventTarget(self, name), name, function(e) {
|
24586
24654
|
self.fire(name, e);
|
@@ -24725,6 +24793,14 @@ define("tinymce/util/I18n", [], function() {
|
|
24725
24793
|
var data = {};
|
24726
24794
|
|
24727
24795
|
return {
|
24796
|
+
/**
|
24797
|
+
* Property gets set to true if a RTL language pack was loaded.
|
24798
|
+
*
|
24799
|
+
* @property rtl
|
24800
|
+
* @type {Boolean}
|
24801
|
+
*/
|
24802
|
+
rtl: false,
|
24803
|
+
|
24728
24804
|
/**
|
24729
24805
|
* Adds translations for a specific language code.
|
24730
24806
|
*
|
@@ -24736,6 +24812,8 @@ define("tinymce/util/I18n", [], function() {
|
|
24736
24812
|
for (var name in items) {
|
24737
24813
|
data[name] = items[name];
|
24738
24814
|
}
|
24815
|
+
|
24816
|
+
this.rtl = this.rtl || data._dir === 'rtl';
|
24739
24817
|
},
|
24740
24818
|
|
24741
24819
|
/**
|
@@ -25027,7 +25105,7 @@ define("tinymce/EditorManager", [
|
|
25027
25105
|
* @property minorVersion
|
25028
25106
|
* @type String
|
25029
25107
|
*/
|
25030
|
-
minorVersion : '0.
|
25108
|
+
minorVersion : '0.8',
|
25031
25109
|
|
25032
25110
|
/**
|
25033
25111
|
* Release date of TinyMCE build.
|
@@ -25035,7 +25113,7 @@ define("tinymce/EditorManager", [
|
|
25035
25113
|
* @property releaseDate
|
25036
25114
|
* @type String
|
25037
25115
|
*/
|
25038
|
-
releaseDate: '2013-10-
|
25116
|
+
releaseDate: '2013-10-10',
|
25039
25117
|
|
25040
25118
|
/**
|
25041
25119
|
* Collection of editor instances.
|
@@ -26792,7 +26870,7 @@ define("tinymce/ui/Button", [
|
|
26792
26870
|
'<div id="' + id + '" class="' + self.classes() + '" tabindex="-1">' +
|
26793
26871
|
'<button role="presentation" type="button" tabindex="-1">' +
|
26794
26872
|
(icon ? '<i class="' + icon + '"' + image + '></i>' : '') +
|
26795
|
-
(self._text ? (icon ? '
|
26873
|
+
(self._text ? (icon ? '\u00a0' : '') + self.encode(self._text) : '') +
|
26796
26874
|
'</button>' +
|
26797
26875
|
'</div>'
|
26798
26876
|
);
|
@@ -27046,7 +27124,7 @@ define("tinymce/ui/PanelButton", [
|
|
27046
27124
|
self.panel.show();
|
27047
27125
|
}
|
27048
27126
|
|
27049
|
-
self.panel.moveRel(self.getEl(), settings.popoverAlign || ['bc-tl', 'bc-tc']);
|
27127
|
+
self.panel.moveRel(self.getEl(), settings.popoverAlign || (self.isRtl() ? ['bc-tr', 'bc-tc'] : ['bc-tl', 'bc-tc']));
|
27050
27128
|
},
|
27051
27129
|
|
27052
27130
|
/**
|
@@ -27250,8 +27328,8 @@ define("tinymce/ui/ComboBox", [
|
|
27250
27328
|
e.preventDefault();
|
27251
27329
|
self.fire('change');
|
27252
27330
|
|
27253
|
-
if (ctrl.submit) {
|
27254
|
-
ctrl.submit();
|
27331
|
+
if (ctrl.hasEventListeners('submit') && ctrl.toJSON) {
|
27332
|
+
ctrl.fire('submit', {data: ctrl.toJSON()});
|
27255
27333
|
return false;
|
27256
27334
|
}
|
27257
27335
|
});
|
@@ -27355,7 +27433,7 @@ define("tinymce/ui/ComboBox", [
|
|
27355
27433
|
var width, lineHeight;
|
27356
27434
|
|
27357
27435
|
if (openElm) {
|
27358
|
-
width = rect.w - openElm.
|
27436
|
+
width = rect.w - DomUtils.getSize(openElm).width - 10;
|
27359
27437
|
} else {
|
27360
27438
|
width = rect.w - 10;
|
27361
27439
|
}
|
@@ -27452,19 +27530,15 @@ define("tinymce/ui/ComboBox", [
|
|
27452
27530
|
*
|
27453
27531
|
* @-x-less Path.less
|
27454
27532
|
* @class tinymce.ui.Path
|
27455
|
-
* @extends tinymce.ui.
|
27533
|
+
* @extends tinymce.ui.Widget
|
27456
27534
|
*/
|
27457
27535
|
define("tinymce/ui/Path", [
|
27458
|
-
"tinymce/ui/
|
27536
|
+
"tinymce/ui/Widget",
|
27459
27537
|
"tinymce/ui/KeyboardNavigation"
|
27460
|
-
], function(
|
27538
|
+
], function(Widget, KeyboardNavigation) {
|
27461
27539
|
"use strict";
|
27462
27540
|
|
27463
|
-
return
|
27464
|
-
Defaults: {
|
27465
|
-
delimiter: "\u00BB"
|
27466
|
-
},
|
27467
|
-
|
27541
|
+
return Widget.extend({
|
27468
27542
|
/**
|
27469
27543
|
* Constructs a instance with the specified settings.
|
27470
27544
|
*
|
@@ -27475,6 +27549,10 @@ define("tinymce/ui/Path", [
|
|
27475
27549
|
init: function(settings) {
|
27476
27550
|
var self = this;
|
27477
27551
|
|
27552
|
+
if (!settings.delimiter) {
|
27553
|
+
settings.delimiter = '\u00BB';
|
27554
|
+
}
|
27555
|
+
|
27478
27556
|
self._super(settings);
|
27479
27557
|
self.addClass('path');
|
27480
27558
|
self.canFocus = true;
|
@@ -27558,7 +27636,7 @@ define("tinymce/ui/Path", [
|
|
27558
27636
|
var self = this;
|
27559
27637
|
|
27560
27638
|
return (
|
27561
|
-
'<div id="' + self._id + '" class="' + self.
|
27639
|
+
'<div id="' + self._id + '" class="' + self.classes() + '">' +
|
27562
27640
|
self._getPathHtml() +
|
27563
27641
|
'</div>'
|
27564
27642
|
);
|
@@ -27763,7 +27841,12 @@ define("tinymce/ui/Form", [
|
|
27763
27841
|
flex: 1,
|
27764
27842
|
padding: 20,
|
27765
27843
|
labelGap: 30,
|
27766
|
-
spacing: 10
|
27844
|
+
spacing: 10,
|
27845
|
+
callbacks: {
|
27846
|
+
submit: function() {
|
27847
|
+
this.submit();
|
27848
|
+
}
|
27849
|
+
}
|
27767
27850
|
},
|
27768
27851
|
|
27769
27852
|
/**
|
@@ -28088,9 +28171,9 @@ define("tinymce/ui/FlexLayout", [
|
|
28088
28171
|
contLayoutRect = container.layoutRect();
|
28089
28172
|
contPaddingBox = container._paddingBox;
|
28090
28173
|
contSettings = container.settings;
|
28091
|
-
direction = contSettings.direction;
|
28174
|
+
direction = container.isRtl() ? (contSettings.direction || 'row-reversed') : contSettings.direction;
|
28092
28175
|
align = contSettings.align;
|
28093
|
-
pack = contSettings.pack;
|
28176
|
+
pack = container.isRtl() ? (contSettings.pack || 'end') : contSettings.pack;
|
28094
28177
|
spacing = contSettings.spacing || 0;
|
28095
28178
|
|
28096
28179
|
if (direction == "row-reversed" || direction == "column-reverse") {
|
@@ -28366,6 +28449,10 @@ define("tinymce/ui/FormatControls", [
|
|
28366
28449
|
var each = Tools.each;
|
28367
28450
|
|
28368
28451
|
EditorManager.on('AddEditor', function(e) {
|
28452
|
+
if (e.editor.rtl) {
|
28453
|
+
Control.rtl = true;
|
28454
|
+
}
|
28455
|
+
|
28369
28456
|
registerControls(e.editor);
|
28370
28457
|
});
|
28371
28458
|
|
@@ -29313,8 +29400,9 @@ define("tinymce/ui/Iframe", [
|
|
29313
29400
|
* @extends tinymce.ui.Widget
|
29314
29401
|
*/
|
29315
29402
|
define("tinymce/ui/Label", [
|
29316
|
-
"tinymce/ui/Widget"
|
29317
|
-
|
29403
|
+
"tinymce/ui/Widget",
|
29404
|
+
"tinymce/ui/DomUtils"
|
29405
|
+
], function(Widget, DomUtils) {
|
29318
29406
|
"use strict";
|
29319
29407
|
|
29320
29408
|
return Widget.extend({
|
@@ -29354,40 +29442,21 @@ define("tinymce/ui/Label", [
|
|
29354
29442
|
var self = this, layoutRect = self._super();
|
29355
29443
|
|
29356
29444
|
if (self.settings.multiline) {
|
29445
|
+
var size = DomUtils.getSize(self.getEl());
|
29446
|
+
|
29357
29447
|
// Check if the text fits within maxW if not then try word wrapping it
|
29358
|
-
if (
|
29448
|
+
if (size.width > layoutRect.maxW) {
|
29359
29449
|
layoutRect.minW = layoutRect.maxW;
|
29360
29450
|
self.addClass('multiline');
|
29361
29451
|
}
|
29362
29452
|
|
29363
29453
|
self.getEl().style.width = layoutRect.minW + 'px';
|
29364
|
-
layoutRect.startMinH = layoutRect.h = layoutRect.minH = Math.min(layoutRect.maxH, self.getEl().
|
29454
|
+
layoutRect.startMinH = layoutRect.h = layoutRect.minH = Math.min(layoutRect.maxH, DomUtils.getSize(self.getEl()).height);
|
29365
29455
|
}
|
29366
29456
|
|
29367
29457
|
return layoutRect;
|
29368
29458
|
},
|
29369
29459
|
|
29370
|
-
/**
|
29371
|
-
* Sets/gets the disabled state on the control.
|
29372
|
-
*
|
29373
|
-
* @method disabled
|
29374
|
-
* @param {Boolean} state Value to set to control.
|
29375
|
-
* @return {Boolean/tinymce.ui.Label} Current control on a set operation or current state on a get.
|
29376
|
-
*/
|
29377
|
-
disabled: function(state) {
|
29378
|
-
var self = this, undef;
|
29379
|
-
|
29380
|
-
if (state !== undef) {
|
29381
|
-
self.toggleClass('label-disabled', state);
|
29382
|
-
|
29383
|
-
if (self._rendered) {
|
29384
|
-
self.getEl()[0].className = self.classes();
|
29385
|
-
}
|
29386
|
-
}
|
29387
|
-
|
29388
|
-
return self._super(state);
|
29389
|
-
},
|
29390
|
-
|
29391
29460
|
/**
|
29392
29461
|
* Repaints the control after a layout operation.
|
29393
29462
|
*
|
@@ -29643,7 +29712,7 @@ define("tinymce/ui/MenuButton", [
|
|
29643
29712
|
|
29644
29713
|
self.menu.show();
|
29645
29714
|
self.menu.layoutRect({w: self.layoutRect().w});
|
29646
|
-
self.menu.moveRel(self.getEl(), ['bl-tl', 'tl-bl']);
|
29715
|
+
self.menu.moveRel(self.getEl(), self.isRtl() ? ['br-tr', 'tr-br'] : ['bl-tl', 'tl-bl']);
|
29647
29716
|
},
|
29648
29717
|
|
29649
29718
|
/**
|
@@ -29691,7 +29760,7 @@ define("tinymce/ui/MenuButton", [
|
|
29691
29760
|
'<div id="' + id + '" class="' + self.classes() + '" tabindex="-1">' +
|
29692
29761
|
'<button id="' + id + '-open" role="presentation" type="button" tabindex="-1">' +
|
29693
29762
|
(icon ? '<i class="' + icon + '"></i>' : '') +
|
29694
|
-
'<span>' + (self._text ? (icon ? '
|
29763
|
+
'<span>' + (self._text ? (icon ? '\u00a0' : '') + self.encode(self._text) : '') + '</span>' +
|
29695
29764
|
' <i class="' + prefix + 'caret"></i>' +
|
29696
29765
|
'</button>' +
|
29697
29766
|
'</div>'
|
@@ -30066,7 +30135,11 @@ define("tinymce/ui/MenuItem", [
|
|
30066
30135
|
|
30067
30136
|
menu.addClass('menu-sub');
|
30068
30137
|
|
30069
|
-
var rel = menu.testMoveRel(
|
30138
|
+
var rel = menu.testMoveRel(
|
30139
|
+
self.getEl(),
|
30140
|
+
self.isRtl() ? ['tl-tr', 'bl-br', 'tr-tl', 'br-bl'] : ['tr-tl', 'br-bl', 'tl-tr', 'bl-br']
|
30141
|
+
);
|
30142
|
+
|
30070
30143
|
menu.moveRel(self.getEl(), rel);
|
30071
30144
|
|
30072
30145
|
rel = 'menu-sub-' + rel;
|
@@ -30497,10 +30570,8 @@ define("tinymce/ui/Spacer", [
|
|
30497
30570
|
*/
|
30498
30571
|
define("tinymce/ui/SplitButton", [
|
30499
30572
|
"tinymce/ui/MenuButton",
|
30500
|
-
"tinymce/
|
30573
|
+
"tinymce/ui/DomUtils"
|
30501
30574
|
], function(MenuButton, DomUtils) {
|
30502
|
-
var DOM = DomUtils.DOM;
|
30503
|
-
|
30504
30575
|
return MenuButton.extend({
|
30505
30576
|
Defaults: {
|
30506
30577
|
classes: "widget btn splitbtn",
|
@@ -30520,12 +30591,12 @@ define("tinymce/ui/SplitButton", [
|
|
30520
30591
|
mainButtonElm = elm.firstChild;
|
30521
30592
|
menuButtonElm = elm.lastChild;
|
30522
30593
|
|
30523
|
-
|
30524
|
-
width: rect.w - menuButtonElm.
|
30594
|
+
DomUtils.css(mainButtonElm, {
|
30595
|
+
width: rect.w - DomUtils.getSize(menuButtonElm).width,
|
30525
30596
|
height: rect.h - 2
|
30526
30597
|
});
|
30527
30598
|
|
30528
|
-
|
30599
|
+
DomUtils.css(menuButtonElm, {
|
30529
30600
|
height: rect.h - 2
|
30530
30601
|
});
|
30531
30602
|
|
@@ -30546,7 +30617,7 @@ define("tinymce/ui/SplitButton", [
|
|
30546
30617
|
activeMenu: function(state) {
|
30547
30618
|
var self = this;
|
30548
30619
|
|
30549
|
-
|
30620
|
+
DomUtils.toggleClass(self.getEl().lastChild, self.classPrefix + 'active', state);
|
30550
30621
|
},
|
30551
30622
|
|
30552
30623
|
/**
|
@@ -30567,7 +30638,7 @@ define("tinymce/ui/SplitButton", [
|
|
30567
30638
|
'</button>' +
|
30568
30639
|
'<button type="button" class="' + prefix + 'open" hidefocus tabindex="-1">' +
|
30569
30640
|
//(icon ? '<i class="' + icon + '"></i>' : '') +
|
30570
|
-
(self._menuBtnText ? (icon ? '
|
30641
|
+
(self._menuBtnText ? (icon ? '\u00a0' : '') + self._menuBtnText : '') +
|
30571
30642
|
' <i class="' + prefix + 'caret"></i>' +
|
30572
30643
|
'</button>' +
|
30573
30644
|
'</div>'
|
@@ -30583,9 +30654,19 @@ define("tinymce/ui/SplitButton", [
|
|
30583
30654
|
var self = this, onClickHandler = self.settings.onclick;
|
30584
30655
|
|
30585
30656
|
self.on('click', function(e) {
|
30586
|
-
|
30587
|
-
|
30588
|
-
|
30657
|
+
var node = e.target;
|
30658
|
+
|
30659
|
+
if (e.control == this) {
|
30660
|
+
// Find clicks that is on the main button
|
30661
|
+
while (node) {
|
30662
|
+
if (node.nodeName == 'BUTTON' && node.className.indexOf('open') == -1) {
|
30663
|
+
e.stopImmediatePropagation();
|
30664
|
+
onClickHandler.call(this, e);
|
30665
|
+
return;
|
30666
|
+
}
|
30667
|
+
|
30668
|
+
node = node.parentNode;
|
30669
|
+
}
|
30589
30670
|
}
|
30590
30671
|
});
|
30591
30672
|
|
@@ -30761,7 +30842,7 @@ define("tinymce/ui/TabPanel", [
|
|
30761
30842
|
initLayoutRect: function() {
|
30762
30843
|
var self = this, rect, minW, minH;
|
30763
30844
|
|
30764
|
-
minW = self.getEl('head').
|
30845
|
+
minW = DomUtils.getSize(self.getEl('head')).width;
|
30765
30846
|
minW = minW < 0 ? 0 : minW;
|
30766
30847
|
minH = 0;
|
30767
30848
|
self.items().each(function(item, i) {
|
@@ -30786,13 +30867,13 @@ define("tinymce/ui/TabPanel", [
|
|
30786
30867
|
});
|
30787
30868
|
});
|
30788
30869
|
|
30789
|
-
var headH = self.getEl('head').
|
30870
|
+
var headH = DomUtils.getSize(self.getEl('head')).height;
|
30790
30871
|
|
30791
30872
|
self.settings.minWidth = minW;
|
30792
30873
|
self.settings.minHeight = minH + headH;
|
30793
30874
|
|
30794
30875
|
rect = self._super();
|
30795
|
-
rect.deltaH +=
|
30876
|
+
rect.deltaH += headH;
|
30796
30877
|
rect.innerH = rect.h - rect.deltaH;
|
30797
30878
|
|
30798
30879
|
return rect;
|
@@ -30852,8 +30933,8 @@ define("tinymce/ui/TextBox", [
|
|
30852
30933
|
self.parents().reverse().each(function(ctrl) {
|
30853
30934
|
e.preventDefault();
|
30854
30935
|
|
30855
|
-
if (ctrl.submit) {
|
30856
|
-
ctrl.submit();
|
30936
|
+
if (ctrl.hasEventListeners('submit') && ctrl.toJSON) {
|
30937
|
+
ctrl.fire('submit', {data: ctrl.toJSON()});
|
30857
30938
|
return false;
|
30858
30939
|
}
|
30859
30940
|
});
|