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)
|
@@ -292,9 +292,9 @@ define("tinymce/dom/EventUtils", [], function() {
|
|
292
292
|
* @param {String} id Expando id value to look for.
|
293
293
|
*/
|
294
294
|
function executeHandlers(evt, id) {
|
295
|
-
var callbackList, i, l, callback;
|
295
|
+
var callbackList, i, l, callback, container = events[id];
|
296
296
|
|
297
|
-
callbackList =
|
297
|
+
callbackList = container && container[evt.type];
|
298
298
|
if (callbackList) {
|
299
299
|
for (i = 0, l = callbackList.length; i < l; i++) {
|
300
300
|
callback = callbackList[i];
|
@@ -3371,6 +3371,12 @@ define("tinymce/html/Styles", [], function() {
|
|
3371
3371
|
function compress(prefix, suffix) {
|
3372
3372
|
var top, right, bottom, left;
|
3373
3373
|
|
3374
|
+
// IE 11 will produce a border-image: none when getting the style attribute from <p style="border: 1px solid red"></p>
|
3375
|
+
// So lets asume it shouldn't be there
|
3376
|
+
if (styles['border-image'] === 'none') {
|
3377
|
+
delete styles['border-image'];
|
3378
|
+
}
|
3379
|
+
|
3374
3380
|
// Get values and check it it needs compressing
|
3375
3381
|
top = styles[prefix + '-top' + suffix];
|
3376
3382
|
if (!top) {
|
@@ -16253,8 +16259,9 @@ define("tinymce/Formatter", [
|
|
16253
16259
|
|
16254
16260
|
// Move selection to text node
|
16255
16261
|
selection.setCursorLocation(node, 1);
|
16262
|
+
|
16256
16263
|
// If the formatNode is empty, we can remove it safely.
|
16257
|
-
if(dom.isEmpty(formatNode)) {
|
16264
|
+
if (dom.isEmpty(formatNode)) {
|
16258
16265
|
dom.remove(formatNode);
|
16259
16266
|
}
|
16260
16267
|
}
|
@@ -17309,6 +17316,10 @@ define("tinymce/EnterKey", [
|
|
17309
17316
|
}
|
17310
17317
|
|
17311
17318
|
dom.setAttrib(newBlock, 'id', ''); // Remove ID since it needs to be document unique
|
17319
|
+
|
17320
|
+
// Allow custom handling of new blocks
|
17321
|
+
editor.fire('NewBlock', { newBlock: newBlock });
|
17322
|
+
|
17312
17323
|
undoManager.add();
|
17313
17324
|
}
|
17314
17325
|
|
@@ -19497,7 +19508,19 @@ define("tinymce/ui/DomUtils", [
|
|
19497
19508
|
},
|
19498
19509
|
|
19499
19510
|
getSize: function(elm) {
|
19500
|
-
|
19511
|
+
var width, height;
|
19512
|
+
|
19513
|
+
if (elm.getBoundingClientRect) {
|
19514
|
+
var rect = elm.getBoundingClientRect();
|
19515
|
+
|
19516
|
+
width = Math.max(rect.width || (rect.right - rect.left), elm.offsetWidth);
|
19517
|
+
height = Math.max(rect.height || (rect.bottom - rect.bottom), elm.offsetHeight);
|
19518
|
+
} else {
|
19519
|
+
width = elm.offsetWidth;
|
19520
|
+
height = elm.offsetHeight;
|
19521
|
+
}
|
19522
|
+
|
19523
|
+
return {width: width, height: height};
|
19501
19524
|
},
|
19502
19525
|
|
19503
19526
|
getPos: function(elm, root) {
|
@@ -19589,6 +19612,10 @@ define("tinymce/ui/Control", [
|
|
19589
19612
|
controlIdLookup: {}
|
19590
19613
|
},
|
19591
19614
|
|
19615
|
+
isRtl: function() {
|
19616
|
+
return Control.rtl;
|
19617
|
+
},
|
19618
|
+
|
19592
19619
|
/**
|
19593
19620
|
* Class/id prefix to use for all controls.
|
19594
19621
|
*
|
@@ -19792,7 +19819,7 @@ define("tinymce/ui/Control", [
|
|
19792
19819
|
}
|
19793
19820
|
|
19794
19821
|
function getSide(name) {
|
19795
|
-
var val =
|
19822
|
+
var val = parseFloat(getStyle(name), 10);
|
19796
19823
|
|
19797
19824
|
return isNaN(val) ? 0 : val;
|
19798
19825
|
}
|
@@ -19816,18 +19843,19 @@ define("tinymce/ui/Control", [
|
|
19816
19843
|
initLayoutRect: function() {
|
19817
19844
|
var self = this, settings = self.settings, borderBox, layoutRect;
|
19818
19845
|
var elm = self.getEl(), width, height, minWidth, minHeight, autoResize;
|
19819
|
-
var startMinWidth, startMinHeight;
|
19846
|
+
var startMinWidth, startMinHeight, initialSize;
|
19820
19847
|
|
19821
|
-
// Measure
|
19848
|
+
// Measure the current element
|
19822
19849
|
borderBox = self._borderBox = self._borderBox || self.measureBox(elm, 'border');
|
19823
19850
|
self._paddingBox = self._paddingBox || self.measureBox(elm, 'padding');
|
19824
19851
|
self._marginBox = self._marginBox || self.measureBox(elm, 'margin');
|
19852
|
+
initialSize = DomUtils.getSize(elm);
|
19825
19853
|
|
19826
19854
|
// Setup minWidth/minHeight and width/height
|
19827
19855
|
startMinWidth = settings.minWidth;
|
19828
19856
|
startMinHeight = settings.minHeight;
|
19829
|
-
minWidth = startMinWidth ||
|
19830
|
-
minHeight = startMinHeight ||
|
19857
|
+
minWidth = startMinWidth || initialSize.width;
|
19858
|
+
minHeight = startMinHeight || initialSize.height;
|
19831
19859
|
width = settings.width;
|
19832
19860
|
height = settings.height;
|
19833
19861
|
autoResize = settings.autoResize;
|
@@ -20245,6 +20273,17 @@ define("tinymce/ui/Control", [
|
|
20245
20273
|
return args;
|
20246
20274
|
},
|
20247
20275
|
|
20276
|
+
/**
|
20277
|
+
* Returns true/false if the specified event has any listeners.
|
20278
|
+
*
|
20279
|
+
* @method hasEventListeners
|
20280
|
+
* @param {String} name Name of the event to check for.
|
20281
|
+
* @return {Boolean} True/false state if the event has listeners.
|
20282
|
+
*/
|
20283
|
+
hasEventListeners: function(name) {
|
20284
|
+
return name in this._bindings;
|
20285
|
+
},
|
20286
|
+
|
20248
20287
|
/**
|
20249
20288
|
* Returns a control collection with all parent controls.
|
20250
20289
|
*
|
@@ -21053,7 +21092,7 @@ define("tinymce/ui/Control", [
|
|
21053
21092
|
*/
|
21054
21093
|
// title: function(value) {} -- Generated
|
21055
21094
|
});
|
21056
|
-
|
21095
|
+
|
21057
21096
|
return Control;
|
21058
21097
|
});
|
21059
21098
|
|
@@ -21219,6 +21258,10 @@ define("tinymce/ui/Container", [
|
|
21219
21258
|
self._fixed = settings.fixed;
|
21220
21259
|
self._items = new Collection();
|
21221
21260
|
|
21261
|
+
if (self.isRtl()) {
|
21262
|
+
self.addClass('rtl');
|
21263
|
+
}
|
21264
|
+
|
21222
21265
|
self.addClass('container');
|
21223
21266
|
self.addClass('container-body', 'body');
|
21224
21267
|
|
@@ -22010,7 +22053,7 @@ define("tinymce/ui/Movable", [
|
|
22010
22053
|
"use strict";
|
22011
22054
|
|
22012
22055
|
function calculateRelativePosition(ctrl, targetElm, rel) {
|
22013
|
-
var ctrlElm, pos, x, y, selfW, selfH, targetW, targetH, viewport;
|
22056
|
+
var ctrlElm, pos, x, y, selfW, selfH, targetW, targetH, viewport, size;
|
22014
22057
|
|
22015
22058
|
viewport = DomUtils.getViewPort();
|
22016
22059
|
|
@@ -22026,12 +22069,14 @@ define("tinymce/ui/Movable", [
|
|
22026
22069
|
|
22027
22070
|
// Get size of self
|
22028
22071
|
ctrlElm = ctrl.getEl();
|
22029
|
-
|
22030
|
-
|
22072
|
+
size = DomUtils.getSize(ctrlElm);
|
22073
|
+
selfW = size.width;
|
22074
|
+
selfH = size.height;
|
22031
22075
|
|
22032
22076
|
// Get size of target
|
22033
|
-
|
22034
|
-
|
22077
|
+
size = DomUtils.getSize(targetElm);
|
22078
|
+
targetW = size.width;
|
22079
|
+
targetH = size.height;
|
22035
22080
|
|
22036
22081
|
// Parse align string
|
22037
22082
|
rel = (rel || '').split('');
|
@@ -22488,7 +22533,7 @@ define("tinymce/ui/FloatPanel", [
|
|
22488
22533
|
|
22489
22534
|
if (settings.popover) {
|
22490
22535
|
self._preBodyHtml = '<div class="' + self.classPrefix + 'arrow"></div>';
|
22491
|
-
self.addClass('popover').addClass('bottom').addClass('start');
|
22536
|
+
self.addClass('popover').addClass('bottom').addClass(self.isRtl() ? 'end' : 'start');
|
22492
22537
|
}
|
22493
22538
|
},
|
22494
22539
|
|
@@ -23020,6 +23065,10 @@ define("tinymce/ui/Window", [
|
|
23020
23065
|
|
23021
23066
|
self._super(settings);
|
23022
23067
|
|
23068
|
+
if (self.isRtl()) {
|
23069
|
+
self.addClass('rtl');
|
23070
|
+
}
|
23071
|
+
|
23023
23072
|
self.addClass('window');
|
23024
23073
|
self._fixed = true;
|
23025
23074
|
|
@@ -23031,7 +23080,7 @@ define("tinymce/ui/Window", [
|
|
23031
23080
|
spacing: 3,
|
23032
23081
|
padding: 10,
|
23033
23082
|
align: 'center',
|
23034
|
-
pack: 'end',
|
23083
|
+
pack: self.isRtl() ? 'start' : 'end',
|
23035
23084
|
defaults: {
|
23036
23085
|
type: 'button'
|
23037
23086
|
},
|
@@ -23110,8 +23159,12 @@ define("tinymce/ui/Window", [
|
|
23110
23159
|
// Reserve vertical space for title
|
23111
23160
|
if (self.settings.title && !self._fullscreen) {
|
23112
23161
|
headEl = self.getEl('head');
|
23113
|
-
|
23114
|
-
|
23162
|
+
|
23163
|
+
var size = DomUtils.getSize(headEl);
|
23164
|
+
|
23165
|
+
layoutRect.headerW = size.width;
|
23166
|
+
layoutRect.headerH = size.height;
|
23167
|
+
|
23115
23168
|
deltaH += layoutRect.headerH;
|
23116
23169
|
}
|
23117
23170
|
|
@@ -24726,6 +24779,7 @@ define("tinymce/util/Quirks", [
|
|
24726
24779
|
if (e.target.nodeName == 'HTML') {
|
24727
24780
|
editor.execCommand('SelectAll');
|
24728
24781
|
editor.selection.collapse(true);
|
24782
|
+
editor.nodeChanged();
|
24729
24783
|
}
|
24730
24784
|
});
|
24731
24785
|
}
|
@@ -25614,6 +25668,7 @@ define("tinymce/Editor", [
|
|
25614
25668
|
var self = this, settings = self.settings, elm = self.getElement();
|
25615
25669
|
var w, h, minHeight, n, o, url, bodyId, bodyClass, re, i, initializedPlugins = [];
|
25616
25670
|
|
25671
|
+
self.rtl = this.editorManager.i18n.rtl;
|
25617
25672
|
self.editorManager.add(self);
|
25618
25673
|
|
25619
25674
|
settings.aria_label = settings.aria_label || DOM.getAttrib(elm, 'aria-label', self.getLang('aria.rich_text_area'));
|
@@ -26889,8 +26944,17 @@ define("tinymce/Editor", [
|
|
26889
26944
|
// Move selection to start of body if it's a after init setContent call
|
26890
26945
|
// This prevents IE 7/8 from moving focus to empty editors
|
26891
26946
|
if (!args.initial) {
|
26892
|
-
self.selection.
|
26893
|
-
|
26947
|
+
var dom = self.dom, selection = self.selection;
|
26948
|
+
|
26949
|
+
// IE can't have the caret inside <body><p>|</p></body> unless we do some magic
|
26950
|
+
if (ie < 11 && dom.isBlock(body.firstChild) && dom.isEmpty(body.firstChild)) {
|
26951
|
+
body.firstChild.appendChild(dom.doc.createTextNode('\u00a0'));
|
26952
|
+
selection.select(body.firstChild, true);
|
26953
|
+
dom.remove(body.firstChild.lastChild);
|
26954
|
+
} else {
|
26955
|
+
selection.select(body, true);
|
26956
|
+
selection.collapse(true);
|
26957
|
+
}
|
26894
26958
|
}
|
26895
26959
|
|
26896
26960
|
return args.content;
|
@@ -27200,6 +27264,10 @@ define("tinymce/Editor", [
|
|
27200
27264
|
bindNative: function(name) {
|
27201
27265
|
var self = this;
|
27202
27266
|
|
27267
|
+
if (self.settings.readonly) {
|
27268
|
+
return;
|
27269
|
+
}
|
27270
|
+
|
27203
27271
|
if (self.initialized) {
|
27204
27272
|
self.dom.bind(getEventTarget(self, name), name, function(e) {
|
27205
27273
|
self.fire(name, e);
|
@@ -27344,6 +27412,14 @@ define("tinymce/util/I18n", [], function() {
|
|
27344
27412
|
var data = {};
|
27345
27413
|
|
27346
27414
|
return {
|
27415
|
+
/**
|
27416
|
+
* Property gets set to true if a RTL language pack was loaded.
|
27417
|
+
*
|
27418
|
+
* @property rtl
|
27419
|
+
* @type {Boolean}
|
27420
|
+
*/
|
27421
|
+
rtl: false,
|
27422
|
+
|
27347
27423
|
/**
|
27348
27424
|
* Adds translations for a specific language code.
|
27349
27425
|
*
|
@@ -27355,6 +27431,8 @@ define("tinymce/util/I18n", [], function() {
|
|
27355
27431
|
for (var name in items) {
|
27356
27432
|
data[name] = items[name];
|
27357
27433
|
}
|
27434
|
+
|
27435
|
+
this.rtl = this.rtl || data._dir === 'rtl';
|
27358
27436
|
},
|
27359
27437
|
|
27360
27438
|
/**
|
@@ -27646,7 +27724,7 @@ define("tinymce/EditorManager", [
|
|
27646
27724
|
* @property minorVersion
|
27647
27725
|
* @type String
|
27648
27726
|
*/
|
27649
|
-
minorVersion : '0.
|
27727
|
+
minorVersion : '0.8',
|
27650
27728
|
|
27651
27729
|
/**
|
27652
27730
|
* Release date of TinyMCE build.
|
@@ -27654,7 +27732,7 @@ define("tinymce/EditorManager", [
|
|
27654
27732
|
* @property releaseDate
|
27655
27733
|
* @type String
|
27656
27734
|
*/
|
27657
|
-
releaseDate: '2013-10-
|
27735
|
+
releaseDate: '2013-10-10',
|
27658
27736
|
|
27659
27737
|
/**
|
27660
27738
|
* Collection of editor instances.
|
@@ -29411,7 +29489,7 @@ define("tinymce/ui/Button", [
|
|
29411
29489
|
'<div id="' + id + '" class="' + self.classes() + '" tabindex="-1">' +
|
29412
29490
|
'<button role="presentation" type="button" tabindex="-1">' +
|
29413
29491
|
(icon ? '<i class="' + icon + '"' + image + '></i>' : '') +
|
29414
|
-
(self._text ? (icon ? '
|
29492
|
+
(self._text ? (icon ? '\u00a0' : '') + self.encode(self._text) : '') +
|
29415
29493
|
'</button>' +
|
29416
29494
|
'</div>'
|
29417
29495
|
);
|
@@ -29665,7 +29743,7 @@ define("tinymce/ui/PanelButton", [
|
|
29665
29743
|
self.panel.show();
|
29666
29744
|
}
|
29667
29745
|
|
29668
|
-
self.panel.moveRel(self.getEl(), settings.popoverAlign || ['bc-tl', 'bc-tc']);
|
29746
|
+
self.panel.moveRel(self.getEl(), settings.popoverAlign || (self.isRtl() ? ['bc-tr', 'bc-tc'] : ['bc-tl', 'bc-tc']));
|
29669
29747
|
},
|
29670
29748
|
|
29671
29749
|
/**
|
@@ -29869,8 +29947,8 @@ define("tinymce/ui/ComboBox", [
|
|
29869
29947
|
e.preventDefault();
|
29870
29948
|
self.fire('change');
|
29871
29949
|
|
29872
|
-
if (ctrl.submit) {
|
29873
|
-
ctrl.submit();
|
29950
|
+
if (ctrl.hasEventListeners('submit') && ctrl.toJSON) {
|
29951
|
+
ctrl.fire('submit', {data: ctrl.toJSON()});
|
29874
29952
|
return false;
|
29875
29953
|
}
|
29876
29954
|
});
|
@@ -29974,7 +30052,7 @@ define("tinymce/ui/ComboBox", [
|
|
29974
30052
|
var width, lineHeight;
|
29975
30053
|
|
29976
30054
|
if (openElm) {
|
29977
|
-
width = rect.w - openElm.
|
30055
|
+
width = rect.w - DomUtils.getSize(openElm).width - 10;
|
29978
30056
|
} else {
|
29979
30057
|
width = rect.w - 10;
|
29980
30058
|
}
|
@@ -30071,19 +30149,15 @@ define("tinymce/ui/ComboBox", [
|
|
30071
30149
|
*
|
30072
30150
|
* @-x-less Path.less
|
30073
30151
|
* @class tinymce.ui.Path
|
30074
|
-
* @extends tinymce.ui.
|
30152
|
+
* @extends tinymce.ui.Widget
|
30075
30153
|
*/
|
30076
30154
|
define("tinymce/ui/Path", [
|
30077
|
-
"tinymce/ui/
|
30155
|
+
"tinymce/ui/Widget",
|
30078
30156
|
"tinymce/ui/KeyboardNavigation"
|
30079
|
-
], function(
|
30157
|
+
], function(Widget, KeyboardNavigation) {
|
30080
30158
|
"use strict";
|
30081
30159
|
|
30082
|
-
return
|
30083
|
-
Defaults: {
|
30084
|
-
delimiter: "\u00BB"
|
30085
|
-
},
|
30086
|
-
|
30160
|
+
return Widget.extend({
|
30087
30161
|
/**
|
30088
30162
|
* Constructs a instance with the specified settings.
|
30089
30163
|
*
|
@@ -30094,6 +30168,10 @@ define("tinymce/ui/Path", [
|
|
30094
30168
|
init: function(settings) {
|
30095
30169
|
var self = this;
|
30096
30170
|
|
30171
|
+
if (!settings.delimiter) {
|
30172
|
+
settings.delimiter = '\u00BB';
|
30173
|
+
}
|
30174
|
+
|
30097
30175
|
self._super(settings);
|
30098
30176
|
self.addClass('path');
|
30099
30177
|
self.canFocus = true;
|
@@ -30177,7 +30255,7 @@ define("tinymce/ui/Path", [
|
|
30177
30255
|
var self = this;
|
30178
30256
|
|
30179
30257
|
return (
|
30180
|
-
'<div id="' + self._id + '" class="' + self.
|
30258
|
+
'<div id="' + self._id + '" class="' + self.classes() + '">' +
|
30181
30259
|
self._getPathHtml() +
|
30182
30260
|
'</div>'
|
30183
30261
|
);
|
@@ -30382,7 +30460,12 @@ define("tinymce/ui/Form", [
|
|
30382
30460
|
flex: 1,
|
30383
30461
|
padding: 20,
|
30384
30462
|
labelGap: 30,
|
30385
|
-
spacing: 10
|
30463
|
+
spacing: 10,
|
30464
|
+
callbacks: {
|
30465
|
+
submit: function() {
|
30466
|
+
this.submit();
|
30467
|
+
}
|
30468
|
+
}
|
30386
30469
|
},
|
30387
30470
|
|
30388
30471
|
/**
|
@@ -30707,9 +30790,9 @@ define("tinymce/ui/FlexLayout", [
|
|
30707
30790
|
contLayoutRect = container.layoutRect();
|
30708
30791
|
contPaddingBox = container._paddingBox;
|
30709
30792
|
contSettings = container.settings;
|
30710
|
-
direction = contSettings.direction;
|
30793
|
+
direction = container.isRtl() ? (contSettings.direction || 'row-reversed') : contSettings.direction;
|
30711
30794
|
align = contSettings.align;
|
30712
|
-
pack = contSettings.pack;
|
30795
|
+
pack = container.isRtl() ? (contSettings.pack || 'end') : contSettings.pack;
|
30713
30796
|
spacing = contSettings.spacing || 0;
|
30714
30797
|
|
30715
30798
|
if (direction == "row-reversed" || direction == "column-reverse") {
|
@@ -30985,6 +31068,10 @@ define("tinymce/ui/FormatControls", [
|
|
30985
31068
|
var each = Tools.each;
|
30986
31069
|
|
30987
31070
|
EditorManager.on('AddEditor', function(e) {
|
31071
|
+
if (e.editor.rtl) {
|
31072
|
+
Control.rtl = true;
|
31073
|
+
}
|
31074
|
+
|
30988
31075
|
registerControls(e.editor);
|
30989
31076
|
});
|
30990
31077
|
|
@@ -31932,8 +32019,9 @@ define("tinymce/ui/Iframe", [
|
|
31932
32019
|
* @extends tinymce.ui.Widget
|
31933
32020
|
*/
|
31934
32021
|
define("tinymce/ui/Label", [
|
31935
|
-
"tinymce/ui/Widget"
|
31936
|
-
|
32022
|
+
"tinymce/ui/Widget",
|
32023
|
+
"tinymce/ui/DomUtils"
|
32024
|
+
], function(Widget, DomUtils) {
|
31937
32025
|
"use strict";
|
31938
32026
|
|
31939
32027
|
return Widget.extend({
|
@@ -31973,40 +32061,21 @@ define("tinymce/ui/Label", [
|
|
31973
32061
|
var self = this, layoutRect = self._super();
|
31974
32062
|
|
31975
32063
|
if (self.settings.multiline) {
|
32064
|
+
var size = DomUtils.getSize(self.getEl());
|
32065
|
+
|
31976
32066
|
// Check if the text fits within maxW if not then try word wrapping it
|
31977
|
-
if (
|
32067
|
+
if (size.width > layoutRect.maxW) {
|
31978
32068
|
layoutRect.minW = layoutRect.maxW;
|
31979
32069
|
self.addClass('multiline');
|
31980
32070
|
}
|
31981
32071
|
|
31982
32072
|
self.getEl().style.width = layoutRect.minW + 'px';
|
31983
|
-
layoutRect.startMinH = layoutRect.h = layoutRect.minH = Math.min(layoutRect.maxH, self.getEl().
|
32073
|
+
layoutRect.startMinH = layoutRect.h = layoutRect.minH = Math.min(layoutRect.maxH, DomUtils.getSize(self.getEl()).height);
|
31984
32074
|
}
|
31985
32075
|
|
31986
32076
|
return layoutRect;
|
31987
32077
|
},
|
31988
32078
|
|
31989
|
-
/**
|
31990
|
-
* Sets/gets the disabled state on the control.
|
31991
|
-
*
|
31992
|
-
* @method disabled
|
31993
|
-
* @param {Boolean} state Value to set to control.
|
31994
|
-
* @return {Boolean/tinymce.ui.Label} Current control on a set operation or current state on a get.
|
31995
|
-
*/
|
31996
|
-
disabled: function(state) {
|
31997
|
-
var self = this, undef;
|
31998
|
-
|
31999
|
-
if (state !== undef) {
|
32000
|
-
self.toggleClass('label-disabled', state);
|
32001
|
-
|
32002
|
-
if (self._rendered) {
|
32003
|
-
self.getEl()[0].className = self.classes();
|
32004
|
-
}
|
32005
|
-
}
|
32006
|
-
|
32007
|
-
return self._super(state);
|
32008
|
-
},
|
32009
|
-
|
32010
32079
|
/**
|
32011
32080
|
* Repaints the control after a layout operation.
|
32012
32081
|
*
|
@@ -32262,7 +32331,7 @@ define("tinymce/ui/MenuButton", [
|
|
32262
32331
|
|
32263
32332
|
self.menu.show();
|
32264
32333
|
self.menu.layoutRect({w: self.layoutRect().w});
|
32265
|
-
self.menu.moveRel(self.getEl(), ['bl-tl', 'tl-bl']);
|
32334
|
+
self.menu.moveRel(self.getEl(), self.isRtl() ? ['br-tr', 'tr-br'] : ['bl-tl', 'tl-bl']);
|
32266
32335
|
},
|
32267
32336
|
|
32268
32337
|
/**
|
@@ -32310,7 +32379,7 @@ define("tinymce/ui/MenuButton", [
|
|
32310
32379
|
'<div id="' + id + '" class="' + self.classes() + '" tabindex="-1">' +
|
32311
32380
|
'<button id="' + id + '-open" role="presentation" type="button" tabindex="-1">' +
|
32312
32381
|
(icon ? '<i class="' + icon + '"></i>' : '') +
|
32313
|
-
'<span>' + (self._text ? (icon ? '
|
32382
|
+
'<span>' + (self._text ? (icon ? '\u00a0' : '') + self.encode(self._text) : '') + '</span>' +
|
32314
32383
|
' <i class="' + prefix + 'caret"></i>' +
|
32315
32384
|
'</button>' +
|
32316
32385
|
'</div>'
|
@@ -32685,7 +32754,11 @@ define("tinymce/ui/MenuItem", [
|
|
32685
32754
|
|
32686
32755
|
menu.addClass('menu-sub');
|
32687
32756
|
|
32688
|
-
var rel = menu.testMoveRel(
|
32757
|
+
var rel = menu.testMoveRel(
|
32758
|
+
self.getEl(),
|
32759
|
+
self.isRtl() ? ['tl-tr', 'bl-br', 'tr-tl', 'br-bl'] : ['tr-tl', 'br-bl', 'tl-tr', 'bl-br']
|
32760
|
+
);
|
32761
|
+
|
32689
32762
|
menu.moveRel(self.getEl(), rel);
|
32690
32763
|
|
32691
32764
|
rel = 'menu-sub-' + rel;
|
@@ -33116,10 +33189,8 @@ define("tinymce/ui/Spacer", [
|
|
33116
33189
|
*/
|
33117
33190
|
define("tinymce/ui/SplitButton", [
|
33118
33191
|
"tinymce/ui/MenuButton",
|
33119
|
-
"tinymce/
|
33192
|
+
"tinymce/ui/DomUtils"
|
33120
33193
|
], function(MenuButton, DomUtils) {
|
33121
|
-
var DOM = DomUtils.DOM;
|
33122
|
-
|
33123
33194
|
return MenuButton.extend({
|
33124
33195
|
Defaults: {
|
33125
33196
|
classes: "widget btn splitbtn",
|
@@ -33139,12 +33210,12 @@ define("tinymce/ui/SplitButton", [
|
|
33139
33210
|
mainButtonElm = elm.firstChild;
|
33140
33211
|
menuButtonElm = elm.lastChild;
|
33141
33212
|
|
33142
|
-
|
33143
|
-
width: rect.w - menuButtonElm.
|
33213
|
+
DomUtils.css(mainButtonElm, {
|
33214
|
+
width: rect.w - DomUtils.getSize(menuButtonElm).width,
|
33144
33215
|
height: rect.h - 2
|
33145
33216
|
});
|
33146
33217
|
|
33147
|
-
|
33218
|
+
DomUtils.css(menuButtonElm, {
|
33148
33219
|
height: rect.h - 2
|
33149
33220
|
});
|
33150
33221
|
|
@@ -33165,7 +33236,7 @@ define("tinymce/ui/SplitButton", [
|
|
33165
33236
|
activeMenu: function(state) {
|
33166
33237
|
var self = this;
|
33167
33238
|
|
33168
|
-
|
33239
|
+
DomUtils.toggleClass(self.getEl().lastChild, self.classPrefix + 'active', state);
|
33169
33240
|
},
|
33170
33241
|
|
33171
33242
|
/**
|
@@ -33186,7 +33257,7 @@ define("tinymce/ui/SplitButton", [
|
|
33186
33257
|
'</button>' +
|
33187
33258
|
'<button type="button" class="' + prefix + 'open" hidefocus tabindex="-1">' +
|
33188
33259
|
//(icon ? '<i class="' + icon + '"></i>' : '') +
|
33189
|
-
(self._menuBtnText ? (icon ? '
|
33260
|
+
(self._menuBtnText ? (icon ? '\u00a0' : '') + self._menuBtnText : '') +
|
33190
33261
|
' <i class="' + prefix + 'caret"></i>' +
|
33191
33262
|
'</button>' +
|
33192
33263
|
'</div>'
|
@@ -33202,9 +33273,19 @@ define("tinymce/ui/SplitButton", [
|
|
33202
33273
|
var self = this, onClickHandler = self.settings.onclick;
|
33203
33274
|
|
33204
33275
|
self.on('click', function(e) {
|
33205
|
-
|
33206
|
-
|
33207
|
-
|
33276
|
+
var node = e.target;
|
33277
|
+
|
33278
|
+
if (e.control == this) {
|
33279
|
+
// Find clicks that is on the main button
|
33280
|
+
while (node) {
|
33281
|
+
if (node.nodeName == 'BUTTON' && node.className.indexOf('open') == -1) {
|
33282
|
+
e.stopImmediatePropagation();
|
33283
|
+
onClickHandler.call(this, e);
|
33284
|
+
return;
|
33285
|
+
}
|
33286
|
+
|
33287
|
+
node = node.parentNode;
|
33288
|
+
}
|
33208
33289
|
}
|
33209
33290
|
});
|
33210
33291
|
|
@@ -33380,7 +33461,7 @@ define("tinymce/ui/TabPanel", [
|
|
33380
33461
|
initLayoutRect: function() {
|
33381
33462
|
var self = this, rect, minW, minH;
|
33382
33463
|
|
33383
|
-
minW = self.getEl('head').
|
33464
|
+
minW = DomUtils.getSize(self.getEl('head')).width;
|
33384
33465
|
minW = minW < 0 ? 0 : minW;
|
33385
33466
|
minH = 0;
|
33386
33467
|
self.items().each(function(item, i) {
|
@@ -33405,13 +33486,13 @@ define("tinymce/ui/TabPanel", [
|
|
33405
33486
|
});
|
33406
33487
|
});
|
33407
33488
|
|
33408
|
-
var headH = self.getEl('head').
|
33489
|
+
var headH = DomUtils.getSize(self.getEl('head')).height;
|
33409
33490
|
|
33410
33491
|
self.settings.minWidth = minW;
|
33411
33492
|
self.settings.minHeight = minH + headH;
|
33412
33493
|
|
33413
33494
|
rect = self._super();
|
33414
|
-
rect.deltaH +=
|
33495
|
+
rect.deltaH += headH;
|
33415
33496
|
rect.innerH = rect.h - rect.deltaH;
|
33416
33497
|
|
33417
33498
|
return rect;
|
@@ -33471,8 +33552,8 @@ define("tinymce/ui/TextBox", [
|
|
33471
33552
|
self.parents().reverse().each(function(ctrl) {
|
33472
33553
|
e.preventDefault();
|
33473
33554
|
|
33474
|
-
if (ctrl.submit) {
|
33475
|
-
ctrl.submit();
|
33555
|
+
if (ctrl.hasEventListeners('submit') && ctrl.toJSON) {
|
33556
|
+
ctrl.fire('submit', {data: ctrl.toJSON()});
|
33476
33557
|
return false;
|
33477
33558
|
}
|
33478
33559
|
});
|