Skip to content

Commit 9d794fb

Browse files
committedMar 24, 2021
Hide captions
1 parent d0ef5c8 commit 9d794fb

File tree

2 files changed

+61
-58
lines changed

2 files changed

+61
-58
lines changed
 

‎plugins/ilimgupload/plugin.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@
590590
}else{
591591
image.style.verticalAlign =value;
592592
}
593-
}
593+
};
594594
var defaultData = function() {
595595
return {
596596
src: '',
@@ -1247,14 +1247,15 @@
12471247
info.hasImageTitle ? [imageTitle] : [],
12481248
[alignment],
12491249
info.hasDimensions ? [imageDimensions] : [],
1250-
[{
1250+
/* The caption sometimes appears on the right side of the image: remove the possibility to set captions */
1251+
/*[{
12511252
type: 'grid',
12521253
columns: 2,
12531254
items: flatten([
12541255
classList.toArray(),
12551256
info.hasImageCaption ? [caption] : []
12561257
])
1257-
}],
1258+
}], */
12581259
]);
12591260
};
12601261
var makeTab$1 = function(info) {
@@ -1730,8 +1731,8 @@
17301731
};
17311732

17321733
var register = function(editor) {
1733-
editor.addCommand('mceilimgupload', Dialog(editor).open);
1734-
editor.addCommand('mceUpdateilimgupload', function(_ui, data) {
1734+
editor.addCommand('mceIlimgupload', Dialog(editor).open);
1735+
editor.addCommand('mceUpdateIlimgupload', function(_ui, data) {
17351736
editor.undoManager.transact(function() {
17361737
return insertOrUpdateImage(editor, data);
17371738
});

‎plugins/ilimgupload/plugin.min.js

+55-53
Original file line numberDiff line numberDiff line change
@@ -578,19 +578,19 @@
578578
}
579579
};
580580
var getAlignment = function(image) {
581-
var align = getStyle(image, 'vertical-align');
582-
if (getStyle(image, 'float')) {
583-
align = getStyle(image, 'float');
581+
var align=getStyle(image, 'vertical-align');
582+
if (getStyle(image, 'float')){
583+
align=getStyle(image, 'float');
584584
}
585585
return align;
586586
};
587587
var setAlignment = function(image, value) {
588-
if (value == 'left' || value == 'right') {
588+
if(value== 'left'|| value=='right'){
589589
image.style.float = value;
590-
} else {
591-
image.style.verticalAlign = value;
590+
}else{
591+
image.style.verticalAlign =value;
592592
}
593-
}
593+
};
594594
var defaultData = function() {
595595
return {
596596
src: '',
@@ -624,7 +624,7 @@
624624
if (getBorderStyle(image) || data.borderStyle !== '') {
625625
setBorderStyle(image, data.borderStyle);
626626
}
627-
if (getAlignment(image) || data.alignment !== '') {
627+
if (getAlignment(image) || data.alignment!==''){
628628
setAlignment(image, data.alignment)
629629
}
630630
return normalizeCss(image.getAttribute('style'));
@@ -1126,9 +1126,9 @@
11261126
};
11271127

11281128
var makeItems = function(info) {
1129-
var image_text = maxSizeHintText();
1130-
var maxsize = image_text.maxsize;
1131-
var file_types = image_text.file_types;
1129+
var image_text =maxSizeHintText();
1130+
var maxsize=image_text.maxsize;
1131+
var file_types = image_text.file_types;
11321132
var imageUrl = {
11331133
name: 'src',
11341134
type: 'urlinput',
@@ -1184,54 +1184,55 @@
11841184
label: 'Show caption'
11851185
}]
11861186
};
1187-
var image_text = maxSizeHintText();
1188-
var maxsize = image_text.maxsize;
1187+
var image_text =maxSizeHintText();
1188+
var maxsize=image_text.maxsize;
11891189
var file_types = image_text.file_types;
1190-
var maxsize_desc = {
1190+
var maxsize_desc ={
11911191
type: 'htmlpanel',
11921192
label: 'Descriptions',
11931193
html: '<p style="font-size:smaller">' + maxsize + '</p>' +
1194-
'<p style="font-size:smaller">' + file_types + '</p>'
1194+
'<p style="font-size:smaller">' + file_types + '</p>'
11951195
};
11961196
var alignment = {
11971197
type: 'listbox',
11981198
name: 'alignment',
11991199
label: 'Alignment',
1200-
items: [{
1201-
text: tinymce.translate('ilimgupload.align_unset'),
1202-
value: ""
1203-
},
1204-
{
1205-
text: tinymce.translate('ilimgupload.align_baseline'),
1206-
value: "baseline"
1200+
items: [
1201+
{
1202+
text: tinymce.translate('ilimgupload.align_unset'),
1203+
value: ""
1204+
},
1205+
{
1206+
text: tinymce.translate('ilimgupload.align_baseline'),
1207+
value: "baseline"
12071208
},
1208-
{
1209-
text: 'Top',
1210-
value: "top"
1209+
{
1210+
text: 'Top',
1211+
value: "top"
12111212
},
1212-
{
1213-
text: 'Middle',
1214-
value: "middle"
1213+
{
1214+
text: 'Middle',
1215+
value: "middle"
12151216
},
1216-
{
1217-
text: 'Bottom',
1218-
value: "bottom"
1217+
{
1218+
text: 'Bottom',
1219+
value: "bottom"
12191220
},
1220-
{
1221-
text: tinymce.translate('ilimgupload.align_textbottom'),
1222-
value: "text-bottom"
1221+
{
1222+
text: tinymce.translate('ilimgupload.align_textbottom'),
1223+
value: "text-bottom"
12231224
},
1224-
{
1225-
text: tinymce.translate('ilimgupload.align_texttop'),
1226-
value: "text-top"
1225+
{
1226+
text: tinymce.translate('ilimgupload.align_texttop'),
1227+
value: "text-top"
12271228
},
1228-
{
1229-
text: 'Left',
1230-
value: "left"
1229+
{
1230+
text: 'Left',
1231+
value: "left"
12311232
},
1232-
{
1233-
text: 'Right',
1234-
value: "right"
1233+
{
1234+
text: 'Right',
1235+
value: "right"
12351236
},
12361237
]
12371238

@@ -1246,14 +1247,15 @@
12461247
info.hasImageTitle ? [imageTitle] : [],
12471248
[alignment],
12481249
info.hasDimensions ? [imageDimensions] : [],
1249-
[{
1250+
/* The caption sometimes appears on the right side of the image: remove the possibility to set captions */
1251+
/*[{
12501252
type: 'grid',
12511253
columns: 2,
12521254
items: flatten([
12531255
classList.toArray(),
12541256
info.hasImageCaption ? [caption] : []
12551257
])
1256-
}],
1258+
}], */
12571259
]);
12581260
};
12591261
var makeTab$1 = function(info) {
@@ -1267,7 +1269,7 @@
12671269
makeTab: makeTab$1,
12681270
makeItems: makeItems
12691271
};
1270-
var maxSizeHintText = function() {
1272+
var maxSizeHintText =function (){
12711273
var file_types = "",
12721274
maxsize = "";
12731275
var editor = tinymce.activeEditor;
@@ -1283,8 +1285,8 @@
12831285
}
12841286
}
12851287
var makeTab$2 = function(_info) {
1286-
var image_text = maxSizeHintText();
1287-
var maxsize = image_text.maxsize;
1288+
var image_text =maxSizeHintText();
1289+
var maxsize=image_text.maxsize;
12881290
var file_types = image_text.file_types;
12891291

12901292
var items = [{
@@ -1457,7 +1459,7 @@
14571459
});
14581460
};
14591461

1460-
1462+
14611463
var initValidationEngine = function(editor) {
14621464
var supportedLanguages = ["hu", "en", "de"];
14631465
var pluginPath = tinymce.baseURI.relative + "/plugins/ilimgupload/";
@@ -1513,8 +1515,8 @@
15131515
var calcStyle = function(parseStyle, serializeStyle, css) {
15141516
return serializeStyle(parseStyle(serializeStyle(css)));
15151517
};
1516-
var calcAlignement = function(css) {
1517-
return css['vertical-align'] ? String(css['vertical-align']) : '';
1518+
var calcAlignement = function(css){
1519+
return css['vertical-align'] ? String(css['vertical-align']): '';
15181520
};
15191521
var changeStyle2 = function(parseStyle, serializeStyle, data) {
15201522
var css = mergeMargins(parseStyle(data.style));
@@ -1729,8 +1731,8 @@
17291731
};
17301732

17311733
var register = function(editor) {
1732-
editor.addCommand('mceilimgupload', Dialog(editor).open);
1733-
editor.addCommand('mceUpdateilimgupload', function(_ui, data) {
1734+
editor.addCommand('mceIlimgupload', Dialog(editor).open);
1735+
editor.addCommand('mceUpdateIlimgupload', function(_ui, data) {
17341736
editor.undoManager.transact(function() {
17351737
return insertOrUpdateImage(editor, data);
17361738
});

0 commit comments

Comments
 (0)
Please sign in to comment.