Initial commit - Typo3 11.5.41
BIN
typo3conf/ext/lfeditor/Resources/Public/Icons/Extension.png
Normal file
|
After Width: | Height: | Size: 295 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 321.95 321.95"><defs><style>.cls-1{fill:none;}.cls-2{fill:#e8e8e8;}.cls-3{fill:#fff;}.cls-4{fill:#333e48;}.cls-5{fill:#1e252b;}.cls-6{fill:#61b4e4;}.cls-7{fill:#2f6384;}.cls-8{fill:#1b7fbc;}.cls-9{fill:#ceb782;}</style></defs><title>Extension</title><g id="Ebene_2" data-name="Ebene 2"><g id="Layer_1" data-name="Layer 1"><rect class="cls-1" width="321.95" height="321.95"/><polygon class="cls-2" points="4.6 0 189.02 0 273.37 64.21 273.37 321.94 4.6 321.94 4.6 0"/><polygon class="cls-3" points="26.59 26.33 168.35 26.33 168.35 87.63 251.39 87.63 251.39 295.61 26.59 295.61 26.59 26.33"/><path class="cls-4" d="M184.45,112.41H43.53a4.5,4.5,0,0,1,0-9H184.45a4.5,4.5,0,0,1,0,9Z"/><path class="cls-4" d="M206.09,144.76H43.53a4.5,4.5,0,0,1,0-9H206.09a4.5,4.5,0,0,1,0,9Z"/><path class="cls-4" d="M144.52,80.07h-101a4.5,4.5,0,0,1,0-9h101a4.5,4.5,0,0,1,0,9Z"/><path class="cls-4" d="M224.45,177.1H43.53a4.5,4.5,0,0,1,0-9H224.45a4.5,4.5,0,0,1,0,9Z"/><path class="cls-4" d="M218.74,209.45H43.53a4.5,4.5,0,0,1,0-9h175.2a4.5,4.5,0,0,1,0,9Z"/><path class="cls-4" d="M234.45,241.79H43.53a4.5,4.5,0,0,1,0-9H234.45a4.5,4.5,0,0,1,0,9Z"/><path class="cls-4" d="M139,274.14H43.53a4.5,4.5,0,1,1,0-9H139a4.5,4.5,0,0,1,0,9Z"/><path class="cls-5" d="M109.33,285.95c1.73,1.77-.46,6.74-3.57,9.78s-7,4.06-8.76,2.28-.61-5.67,2.5-8.7S107.6,284.17,109.33,285.95Z"/><circle class="cls-6" cx="299.32" cy="54.82" r="22.63" transform="translate(-3.83 28.36) rotate(-5.39)"/><rect class="cls-7" x="84.78" y="133.22" width="261.86" height="45.25" transform="translate(-41.88 222.67) rotate(-50.39)"/><rect class="cls-8" x="84.8" y="147.93" width="261.85" height="15.84" transform="translate(-41.88 222.69) rotate(-50.39)"/><polygon class="cls-9" points="105.31 296.74 97.73 290.46 114.8 242.29 149.67 271.15 105.31 296.74"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
BIN
typo3conf/ext/lfeditor/Resources/Public/Icons/diff.png
Normal file
|
After Width: | Height: | Size: 882 B |
BIN
typo3conf/ext/lfeditor/Resources/Public/Icons/garbage.png
Normal file
|
After Width: | Height: | Size: 133 B |
BIN
typo3conf/ext/lfeditor/Resources/Public/Icons/join.png
Normal file
|
After Width: | Height: | Size: 108 B |
BIN
typo3conf/ext/lfeditor/Resources/Public/Icons/joinBottom.png
Normal file
|
After Width: | Height: | Size: 103 B |
BIN
typo3conf/ext/lfeditor/Resources/Public/Icons/line.png
Normal file
|
After Width: | Height: | Size: 105 B |
BIN
typo3conf/ext/lfeditor/Resources/Public/Icons/recover.png
Normal file
|
After Width: | Height: | Size: 210 B |
BIN
typo3conf/ext/lfeditor/Resources/Public/Icons/treeMinus.png
Normal file
|
After Width: | Height: | Size: 139 B |
|
After Width: | Height: | Size: 137 B |
BIN
typo3conf/ext/lfeditor/Resources/Public/Icons/treePlus.png
Normal file
|
After Width: | Height: | Size: 153 B |
BIN
typo3conf/ext/lfeditor/Resources/Public/Icons/treePlusBottom.png
Normal file
|
After Width: | Height: | Size: 151 B |
@@ -0,0 +1,123 @@
|
||||
/***************************************************************
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) sgalinski Internet Services (https://www.sgalinski.de)
|
||||
*
|
||||
* All rights reserved
|
||||
*
|
||||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||||
* free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The GNU General Public License can be found at
|
||||
* http://www.gnu.org/copyleft/gpl.html.
|
||||
*
|
||||
* This script is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* This copyright notice MUST APPEAR in all copies of the script!
|
||||
***************************************************************/
|
||||
|
||||
/**
|
||||
* Indicates if untranslated languages are hidden.
|
||||
* @type {boolean}
|
||||
*/
|
||||
var untranslatedAreHidden = false;
|
||||
|
||||
/**
|
||||
* Index of column which contains state of languages.
|
||||
* @type {number}
|
||||
*/
|
||||
var STATE_COLUMN_INDEX = 1;
|
||||
|
||||
/**
|
||||
* Index of span element which contains number of translated constants.
|
||||
* @type {number}
|
||||
*/
|
||||
var TRANSLATED_SPAN_INDEX = 1;
|
||||
|
||||
/**
|
||||
* Gets list of table rows.
|
||||
* @returns {NodeList|*}
|
||||
*/
|
||||
function getTableRowElements() {
|
||||
var tableElement = document.getElementById('tx-lfeditor-table');
|
||||
var tableBodyElement = tableElement ? tableElement.getElementsByTagName('tbody')[0] : null;
|
||||
var tableRowElements = tableBodyElement ? tableBodyElement.getElementsByTagName('tr') : null;
|
||||
return tableRowElements;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function hides table rows which contain untranslated languages.
|
||||
* @returns boolean
|
||||
*/
|
||||
var hideUntranslatedLanguagesInTable = function() {
|
||||
var thereAreHiddenElements = false;
|
||||
var tableRowElements = getTableRowElements();
|
||||
if (tableRowElements === null) {
|
||||
return thereAreHiddenElements;
|
||||
}
|
||||
|
||||
for (var tableRowIndex = tableRowElements.length; tableRowIndex--;) {
|
||||
var tableDataElements = tableRowElements[tableRowIndex].getElementsByTagName('td');
|
||||
if (tableDataElements === null) {
|
||||
return thereAreHiddenElements;
|
||||
}
|
||||
var tableDataSpanElements = tableDataElements[STATE_COLUMN_INDEX].getElementsByTagName('span');
|
||||
if (!tableDataSpanElements || !tableDataSpanElements[TRANSLATED_SPAN_INDEX]) {
|
||||
return thereAreHiddenElements;
|
||||
}
|
||||
var numberTranslated = tableDataSpanElements[TRANSLATED_SPAN_INDEX].innerText.trim();
|
||||
if (numberTranslated !== '0') {
|
||||
continue;
|
||||
}
|
||||
tableRowElements[tableRowIndex].style.display = 'none';
|
||||
untranslatedAreHidden = true;
|
||||
thereAreHiddenElements = true;
|
||||
}
|
||||
return thereAreHiddenElements;
|
||||
};
|
||||
|
||||
/**
|
||||
* Reveals hidden table rows.
|
||||
* @returns void
|
||||
*/
|
||||
function showUntranslatedLanguagesInTable() {
|
||||
var tableRowElements = getTableRowElements();
|
||||
if (tableRowElements === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (var tableRowIndex = tableRowElements.length; tableRowIndex--;) {
|
||||
if (tableRowElements[tableRowIndex].style.display === 'none') {
|
||||
tableRowElements[tableRowIndex].style.display = '';
|
||||
}
|
||||
}
|
||||
untranslatedAreHidden = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hides or un hides rows of table which contain untranslated languages.
|
||||
* @returns void
|
||||
*/
|
||||
function hideShowUntranslatedLanguagesInTable() {
|
||||
if (untranslatedAreHidden) {
|
||||
showUntranslatedLanguagesInTable();
|
||||
} else {
|
||||
hideUntranslatedLanguagesInTable();
|
||||
}
|
||||
}
|
||||
|
||||
var initHideShowFunctionality = function() {
|
||||
var thereAreHiddenElements = hideUntranslatedLanguagesInTable();
|
||||
if (!thereAreHiddenElements) {
|
||||
var hideShowLinkElement = document.getElementById('hideShowUntranslatedLanguagesInTableId');
|
||||
hideShowLinkElement.style.display = 'none';
|
||||
}
|
||||
};
|
||||
|
||||
document.addEventListener('DOMContentLoaded', initHideShowFunctionality);
|
||||
185
typo3conf/ext/lfeditor/Resources/Public/JavaScript/Lfeditor.js
Normal file
@@ -0,0 +1,185 @@
|
||||
/***************************************************************
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) sgalinski Internet Services (https://www.sgalinski.de)
|
||||
*
|
||||
* All rights reserved
|
||||
*
|
||||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||||
* free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The GNU General Public License can be found at
|
||||
* http://www.gnu.org/copyleft/gpl.html.
|
||||
*
|
||||
* This script is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* This copyright notice MUST APPEAR in all copies of the script!
|
||||
***************************************************************/
|
||||
|
||||
define([
|
||||
'jquery',
|
||||
'TYPO3/CMS/Backend/Modal',
|
||||
'TYPO3/CMS/Backend/Severity'
|
||||
], function($, Modal, Severity) {
|
||||
'use strict';
|
||||
|
||||
var lfEditor = {
|
||||
hideAll: null,
|
||||
init: function() {
|
||||
document.onkeydown = this.saveOnKeyDown;
|
||||
|
||||
$(document).ready(function() {
|
||||
$.get(TYPO3.settings.ajaxUrls['lfeditor::ajaxPing']);
|
||||
});
|
||||
},
|
||||
submitLanguageFileEdit: function(buttonType) {
|
||||
var $form = $(document.forms.contentForm);
|
||||
$form.find("[name$='[buttonType]']").val(buttonType);
|
||||
$form.submit();
|
||||
},
|
||||
/**
|
||||
* Renders confirmation dialog for cancel button.
|
||||
*
|
||||
* @returns {boolean}
|
||||
*/
|
||||
confirmCancelFileEdit: function() {
|
||||
Modal.confirm(
|
||||
TYPO3.lang['function.langfile.confirmCancel.title'],
|
||||
TYPO3.lang['function.langfile.confirmCancel']
|
||||
).on('confirm.button.ok', function() {
|
||||
Modal.dismiss();
|
||||
TYPO3.lfEditor.submitLanguageFileEdit(-1);
|
||||
}).on('confirm.button.cancel', function() {
|
||||
Modal.dismiss();
|
||||
});
|
||||
return false;
|
||||
},
|
||||
|
||||
/** args -- fieldID(id), picID(id), bottom(boolean) */
|
||||
openCloseTreeEntry: function(prefix, args) {
|
||||
var length = arguments.length;
|
||||
var pic, curTreeHide;
|
||||
|
||||
for (var i = 1; i < length; i += 3) {
|
||||
curTreeHide = 0;
|
||||
if (!document.getElementById(arguments[i]).style.display) {
|
||||
curTreeHide = 1;
|
||||
}
|
||||
|
||||
if (curTreeHide) {
|
||||
document.getElementById(arguments[i]).style.display = 'none';
|
||||
pic = 'Plus';
|
||||
} else {
|
||||
document.getElementById(arguments[i]).style.display = '';
|
||||
pic = 'Minus';
|
||||
}
|
||||
|
||||
if (arguments[i + 2]) {
|
||||
pic = pic + 'Bottom';
|
||||
}
|
||||
|
||||
document.getElementById(arguments[i + 1]).src = prefix + '/tree' + pic + '.png';
|
||||
document.getElementById(arguments[i + 1]).alt = 'tree' + pic + '.png';
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Folds and un folds all constants in tree, on tree view.
|
||||
*/
|
||||
hideUnHideAll: function() {
|
||||
if (this.hideAll === null) {
|
||||
this.hideAll = document.getElementById('ul-Root').style.display !== 'none';
|
||||
}
|
||||
|
||||
var ulIdRegex = /^ul-/;
|
||||
var treeUlElements = [];
|
||||
var allUl = document.getElementsByTagName('ul');
|
||||
for (var iterator = allUl.length; iterator--;) {
|
||||
if (ulIdRegex.test(allUl[iterator].id)) {
|
||||
treeUlElements.push(allUl[iterator]);
|
||||
}
|
||||
}
|
||||
|
||||
var imageIdRegex = /^icon-/;
|
||||
var imageMinusSrcRegex = /treeMinus/;
|
||||
var imagePlusSrcRegex = /treePlus/;
|
||||
var treeImgMinusElements = [];
|
||||
var treeImgPlusElements = [];
|
||||
var allImg = document.getElementsByTagName('img');
|
||||
for (var iterator = allImg.length; iterator--;) {
|
||||
if (imageIdRegex.test(allImg[iterator].id)) {
|
||||
if (imageMinusSrcRegex.test(allImg[iterator].src)) {
|
||||
treeImgMinusElements.push(allImg[iterator]);
|
||||
} else if (imagePlusSrcRegex.test(allImg[iterator].src)) {
|
||||
treeImgPlusElements.push(allImg[iterator]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.hideAll) {
|
||||
for (var iterator = treeUlElements.length; iterator--;) {
|
||||
treeUlElements[iterator].style.display = 'none';
|
||||
}
|
||||
for (var iterator = treeImgMinusElements.length; iterator--;) {
|
||||
treeImgMinusElements[iterator].src = treeImgMinusElements[iterator].src.replace(imageMinusSrcRegex, 'treePlus');
|
||||
}
|
||||
this.hideAll = false;
|
||||
} else {
|
||||
for (var iterator = treeUlElements.length; iterator--;) {
|
||||
treeUlElements[iterator].style.display = '';
|
||||
}
|
||||
for (var iterator = treeImgPlusElements.length; iterator--;) {
|
||||
treeImgPlusElements[iterator].src = treeImgPlusElements[iterator].src.replace(imagePlusSrcRegex, 'treeMinus');
|
||||
}
|
||||
this.hideAll = true;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Triggers click on button with id = 'tx-lfeditor-button-submit' when user presses Ctrl + Enter.
|
||||
*
|
||||
* @param eventParameter
|
||||
* @returns void
|
||||
*/
|
||||
saveOnKeyDown: function(eventParameter) {
|
||||
var eventObject = window.event ? event : eventParameter;
|
||||
if (eventObject.keyCode == 13 && eventObject.ctrlKey) {
|
||||
document.getElementById('contentForm').submit();
|
||||
}
|
||||
},
|
||||
changeForm: function(id) {
|
||||
Modal.confirm(
|
||||
TYPO3.lang['function.langfile.confirmChange.title'],
|
||||
TYPO3.lang['function.langfile.confirmChange']
|
||||
).on('confirm.button.ok', function() {
|
||||
Modal.dismiss();
|
||||
document.getElementById(id).submit();
|
||||
}).on('confirm.button.cancel', function() {
|
||||
Modal.dismiss();
|
||||
});
|
||||
return false;
|
||||
},
|
||||
jump: function(select) {
|
||||
Modal.confirm(
|
||||
TYPO3.lang['function.langfile.confirmChange.title'],
|
||||
TYPO3.lang['function.langfile.confirmChange']
|
||||
).on('confirm.button.ok', function() {
|
||||
Modal.dismiss();
|
||||
window.location.href = select.options[select.selectedIndex].value;
|
||||
}).on('confirm.button.cancel', function() {
|
||||
Modal.dismiss();
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
TYPO3.lfEditor = lfEditor;
|
||||
|
||||
lfEditor.init();
|
||||
|
||||
return lfEditor;
|
||||
});
|
||||
@@ -0,0 +1,244 @@
|
||||
/*
|
||||
* TextAreaResizer script by Jason Johnston (jj@lojjic.net)
|
||||
* Created August 2003. Use freely, but give me credit.
|
||||
*
|
||||
* This script adds a handle below textareas that the user
|
||||
* can drag with the mouse to resize the textarea.
|
||||
************************************************************
|
||||
* Modified by John Ha 2005, 2006 (ink@bur.st)
|
||||
*
|
||||
* Modified by Peter Klein/Stefan Galinski for special needs in LFEditor
|
||||
*/
|
||||
|
||||
function TextAreaResizer(elt) {
|
||||
this.element = elt;
|
||||
this.create();
|
||||
}
|
||||
|
||||
TextAreaResizer.prototype = {
|
||||
// create hr element (+class, +title tooltip)
|
||||
create: function() {
|
||||
var elt = this.element;
|
||||
if (elt.title != 'true') {
|
||||
var thisRef = this; // for usage in events definition
|
||||
var h = this.handle = document.createElement("hr");
|
||||
h.className = 'handle-normal';
|
||||
|
||||
// tooltip dont work in every browser correct (eg. firefox no page break)
|
||||
if (typeof tooltip != 'undefined') {
|
||||
h.title = '<ul><li>Click & drag to resize</li><li>Double-left-click to' +
|
||||
'minimize/maximize</li><li>Right-click best-fit to window</li></ul>';
|
||||
} else if (checkIt('opera')) {
|
||||
h.title = '- Click & drag to resize \n- Double-left-click to minimize/maximize \n';
|
||||
} else {
|
||||
h.title = '- Click & drag to resize \n- Double-left-click to minimize/maximize \n' +
|
||||
'- Right-click best-fit to window';
|
||||
}
|
||||
|
||||
// double click resizing
|
||||
addEvent(h, 'dblclick', function() {
|
||||
thisRef.max(1);
|
||||
}, false);
|
||||
|
||||
// onclick optimal resizing
|
||||
addEvent(h, 'mousedown', function(evt) {
|
||||
if (!checkIt('opera')) {
|
||||
if (evt.button == 2) {
|
||||
thisRef.max(2);
|
||||
} else {
|
||||
thisRef.dragStart(evt);
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
|
||||
// class changing mechanism
|
||||
addEvent(h, 'mouseover', function() {
|
||||
h.className = 'handle-highlight';
|
||||
}, false);
|
||||
addEvent(h, 'mouseout', this.handleHigh = function() {
|
||||
h.className = 'handle-normal';
|
||||
}, false);
|
||||
|
||||
// deactivate context menu
|
||||
addEvent(h, 'contextmenu', function() {
|
||||
return false;
|
||||
}, false);
|
||||
|
||||
// insert now into document
|
||||
elt.parentNode.insertBefore(h, elt.nextSibling);
|
||||
}
|
||||
},
|
||||
|
||||
dragStart: function(evt) {
|
||||
var thisRef = this;
|
||||
|
||||
// lock cursor shape
|
||||
document.getElementsByTagName('body')[0].style.cursor = 's-resize';
|
||||
|
||||
if (typeof (this.handle.mouseoverHandler) == 'function' &&
|
||||
typeof (this.handle.mouseoutHandler) == 'function') {
|
||||
// save mouseover handler from dom-tooltips
|
||||
this.mouseoverHandler = this.handle.mouseoverHandler;
|
||||
|
||||
// disable mouseover for tooltips - tooltips should be "off" while dragging
|
||||
removeEvent(this.handle, 'mouseover', this.handle.mouseoverHandler, false);
|
||||
|
||||
// turn off tooltip
|
||||
this.handle.mouseoutHandler();
|
||||
}
|
||||
|
||||
// highlight should remain on
|
||||
removeEvent(this.handle, 'mouseout', this.handleHigh, false);
|
||||
|
||||
this.dragStartY = evt.clientY + 8;
|
||||
this.dragStartH = this.element.offsetHeight;
|
||||
|
||||
addEvent(document, 'mousemove', this.dragMoveHdlr = function(evt) {
|
||||
thisRef.dragMove(evt);
|
||||
}, false);
|
||||
addEvent(document, 'mouseup', this.dragStopHdlr = function() {
|
||||
thisRef.dragStop();
|
||||
|
||||
// restore default cursor shape
|
||||
document.getElementsByTagName('body')[0].style.cursor = 'default';
|
||||
|
||||
// restore mouseover for tooltips after drag stop
|
||||
if (typeof (thisRef.mouseoverHandler) == 'function') {
|
||||
addEvent(thisRef.handle, 'mouseover', thisRef.mouseoverHandler, false);
|
||||
}
|
||||
|
||||
// restore highlight handler
|
||||
thisRef.handle.className = 'handle-normal';
|
||||
addEvent(thisRef.handle, 'mouseout', thisRef.handleHigh =
|
||||
function() {
|
||||
thisRef.handle.className = 'handle-normal';
|
||||
}, false);
|
||||
}, false);
|
||||
},
|
||||
|
||||
dragMove: function(evt) {
|
||||
var height = this.dragStartH + evt.clientY - this.dragStartY;
|
||||
this.element.style.height = (height > 0 ? height : 0) + 'px';
|
||||
},
|
||||
|
||||
dragStop: function() {
|
||||
//this.element.style.borderStyle = 'solid';
|
||||
removeEvent(document, 'mousemove', this.dragMoveHdlr, false);
|
||||
removeEvent(document, 'mouseup', this.dragStopHdlr, false);
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
var elt = this.element;
|
||||
elt.parentNode.removeChild(this.handle);
|
||||
elt.style.height = '';
|
||||
},
|
||||
|
||||
max: function(mode) {
|
||||
if (!this.defHeight) {
|
||||
this.defHeight = this.element.offsetHeight;
|
||||
}
|
||||
if (!this.defWidth) {
|
||||
this.defWidth = this.handle.offsetWidth;
|
||||
}
|
||||
|
||||
if (this.element.style.height == '1px') {
|
||||
this.element.style.height = this.defHeight + 'px';
|
||||
} else {
|
||||
this.element.style.height = '1px';
|
||||
}
|
||||
|
||||
if (mode == 2) {
|
||||
var str = '';
|
||||
for (var i = 0; i < parseInt(this.element.scrollWidth / 10); i++) {
|
||||
str += ' ';
|
||||
}
|
||||
this.element.value += str;
|
||||
|
||||
// IE Bug? Need to retrieve scrollWidth first to init it!
|
||||
var dummy = this.element.scrollWidth,
|
||||
wrap = 0;
|
||||
if (this.element.scrollWidth == this.element.clientWidth) {
|
||||
wrap = 1;
|
||||
}
|
||||
this.element.value = this.element.value.replace(str, '');
|
||||
|
||||
// IE Bug? Need to retrieve scrollHeight first to init it!
|
||||
dummy = this.element.scrollHeight;
|
||||
var maxHeight = this.element.scrollHeight +
|
||||
(checkIt('msie') ? wrap ? -6 : 9 : wrap ? 0 : this.element.scrollWidth > this.element.clientWidth ? 20 : 0);
|
||||
|
||||
if (maxHeight > winSize()[1]) {
|
||||
maxHeight = winSize()[1] - (checkIt('msie') ? 60 : 90);
|
||||
}
|
||||
// For some reason Netscape won't accept style.height greater than 10000px
|
||||
this.element.style.height = maxHeight - (checkIt('msie') ? 8 : 0) + 'px';
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
function winSize() {
|
||||
var myWidth = 0, myHeight = 0;
|
||||
if (typeof (window.innerWidth) == 'number') {
|
||||
//Non-IE
|
||||
myWidth = window.innerWidth - 16;
|
||||
myHeight = window.innerHeight - 16;
|
||||
} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
|
||||
//IE 6+ in 'standards compliant mode'
|
||||
myWidth = document.documentElement.clientWidth - 20;
|
||||
myHeight = document.documentElement.clientHeight - 20;
|
||||
} else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
|
||||
//IE 4 compatible
|
||||
myWidth = document.body.clientWidth - 20;
|
||||
myHeight = document.body.clientHeight - 20;
|
||||
}
|
||||
return new Array(myWidth, myHeight);
|
||||
}
|
||||
|
||||
// safari, omniweb, opera, webtv, icab, msie
|
||||
function checkIt(string) {
|
||||
return navigator.userAgent.toLowerCase().indexOf(string) + 1;
|
||||
}
|
||||
|
||||
function LFEtextarea_init() {
|
||||
var textareas = document.getElementsByTagName('textarea');
|
||||
// Somehow var i was being corrupted.
|
||||
// Only when max(3) or max(2) called.
|
||||
// Using z instead. Weird.
|
||||
for (var z = 0; z < textareas.length; z++) {
|
||||
new TextAreaResizer(textareas[z]);
|
||||
}
|
||||
// Re-init dom-tooltips (if available), so tooltips are shown for handles
|
||||
typeof tooltip != 'undefined' ? tooltip.init(new Array('hr', 'a')) : 0;
|
||||
}
|
||||
|
||||
if (typeof schedule != 'function') {
|
||||
function addEvent(obj, evType, fn, useCapture) {
|
||||
if (obj.addEventListener) {
|
||||
obj.addEventListener(evType, fn, useCapture);
|
||||
return true;
|
||||
} else if (obj.attachEvent) {
|
||||
return obj.attachEvent("on" + evType, fn);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function removeEvent(obj, evType, fn, useCapture) {
|
||||
if (obj.removeEventListener) {
|
||||
obj.removeEventListener(evType, fn, useCapture);
|
||||
return true;
|
||||
} else if (obj.detachEvent) {
|
||||
return obj.detachEvent('on' + evType, fn);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
addEvent(window, 'load', function() {
|
||||
LFEtextarea_init();
|
||||
}, false);
|
||||
} else {
|
||||
schedule('textarea_init()');
|
||||
}
|
||||
320
typo3conf/ext/lfeditor/Resources/Public/StyleSheets/Lfeditor.css
Normal file
@@ -0,0 +1,320 @@
|
||||
.docheader-funcmenu {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.docheader-funcmenu select {
|
||||
margin-top: 4px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
#typo3-inner-docbody input[type=text][type=submit] {
|
||||
margin: 0 5px 5px 0;
|
||||
border: 1px solid #9B9B9B;
|
||||
}
|
||||
|
||||
#typo3-inner-docbody input[type=text].tx-lfeditor-wideField {
|
||||
width: 435px;
|
||||
}
|
||||
|
||||
#typo3-inner-docbody .tx-lfeditor-fieldset input[type=text] {
|
||||
margin-left: 10px;
|
||||
width: 230px;
|
||||
}
|
||||
|
||||
#typo3-inner-docbody label {
|
||||
vertical-align: top;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.typo3-messages {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
/* fieldset class (box) */
|
||||
fieldset.tx-lfeditor-fieldset, fieldset.tx-lfeditor-fieldset fieldset {
|
||||
padding: 10px 5px 5px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 10px;
|
||||
border: 1px solid #AAA;
|
||||
}
|
||||
|
||||
fieldset.tx-lfeditor-fleft, fieldset.tx-lfeditor-fright {
|
||||
width: 48%;
|
||||
}
|
||||
|
||||
fieldset.tx-lfeditor-fleft {
|
||||
float: left;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
fieldset.tx-lfeditor-fright {
|
||||
float: right;
|
||||
}
|
||||
|
||||
fieldset.tx-lfeditor-fieldset legend {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
font-weight: bold;
|
||||
border: 1px solid #AAA;
|
||||
width: auto;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.tx-lfeditor-constantMaxWidth400 {
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
fieldset.tx-lfeditor-fieldset p,
|
||||
fieldset.tx-lfeditor-fieldset p input {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
fieldset.tx-lfeditor-fieldset p {
|
||||
max-width: 100%;
|
||||
max-height: 100px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
#typo3-inner-docbody fieldset.tx-lfeditor-fieldset p label {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
fieldset.tx-lfeditor-fieldset fieldset dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
fieldset.tx-lfeditor-fieldset fieldset a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
fieldset.tx-lfeditor-fieldset fieldset dd {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
/* table */
|
||||
#tx-lfeditor-table {
|
||||
margin-bottom: 10px;
|
||||
width: 100%;
|
||||
clear: both;
|
||||
font-size: 12px;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
#tx-lfeditor-table thead {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#tx-lfeditor-table tbody {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#tx-lfeditor-table tbody td, #tx-lfeditor-table thead th {
|
||||
padding: 2px;
|
||||
border: 1px solid #AAA;
|
||||
}
|
||||
|
||||
#tx-lfeditor-table tbody td a {
|
||||
text-decoration: underline;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#tx-lfeditor-table tbody td img {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* markup classes */
|
||||
.tx-lfeditor-error, .tx-lfeditor-notice,
|
||||
.tx-lfeditor-success, .tx-lfeditor-delConst {
|
||||
margin-bottom: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.tx-lfeditor-goodMarkup, .tx-lfeditor-success {
|
||||
color: #390;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.tx-lfeditor-badMarkup, .tx-lfeditor-error, .tx-lfeditor-delConst {
|
||||
color: #C20;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.tx-lfeditor-specialMarkup, .tx-lfeditor-notice {
|
||||
color: #0078DE;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#tx-lfeditor-table-markup1, #tx-lfeditor-table-markup2,
|
||||
#tx-lfeditor-table-markup3, #tx-lfeditor-table-markup4,
|
||||
#tx-lfeditor-deleteAll {
|
||||
color: #FFF;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
#tx-lfeditor-table-markup1 {
|
||||
background-color: #C20;
|
||||
}
|
||||
|
||||
#tx-lfeditor-table-markup2 {
|
||||
background-color: #390;
|
||||
}
|
||||
|
||||
#tx-lfeditor-table-markup3 {
|
||||
background-color: #0078DE;
|
||||
}
|
||||
|
||||
#tx-lfeditor-table-markup4 {
|
||||
background-color: #E9FA2E;
|
||||
}
|
||||
|
||||
/* some special classes/ids */
|
||||
.tx-lfeditor-buttons {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.tx-lfeditor-buttons-refresh {
|
||||
background: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.tx-lfeditor-checkBox-bottom {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.tx-lfeditor-defaultTranslation {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
border: 1px solid #AAA;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.tx-lfeditor-textarea {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.tx-lfeditor-fieldset #metaType {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#tx-lfeditor-numberCur, #tx-lfeditor-numberOf {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.tx-lfeditor-label {
|
||||
padding-top: 1px;
|
||||
font-weight: bold;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.tx-lfeditor-input {
|
||||
width: 230px;
|
||||
}
|
||||
|
||||
.tx-lfeditor-label, .tx-lfeditor-input {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
/* tree view */
|
||||
.tx-lfeditor-fieldset ul.tx-lfeditor-treeview {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style-type: none;
|
||||
clear: left;
|
||||
}
|
||||
|
||||
.tx-lfeditor-fieldset ul.tx-lfeditor-treeview img {
|
||||
float: left;
|
||||
}
|
||||
|
||||
fieldset.tx-lfeditor-fieldset fieldset ul.tx-lfeditor-treeview li {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* manage backups */
|
||||
.tx-lfeditor-fieldset ul.tx-lfeditor-backups-label {
|
||||
list-style-type: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.tx-lfeditor-fieldset ul.tx-lfeditor-backups-value {
|
||||
list-style-type: none;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* textarea resizer */
|
||||
.handle-normal, .handle-highlight {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: none;
|
||||
height: 5px;
|
||||
cursor: s-resize;
|
||||
}
|
||||
|
||||
* html body .handle-normal, * html body .handle-highlight {
|
||||
margin-top: -8px;
|
||||
}
|
||||
|
||||
.handle-normal {
|
||||
color: #390;
|
||||
background: #390;
|
||||
}
|
||||
|
||||
.handle-highlight {
|
||||
color: #0078DE;
|
||||
background: #0078DE;
|
||||
}
|
||||
|
||||
.uppercase {
|
||||
padding-bottom: 6px;
|
||||
border-bottom: 1px solid #CDCDCD;
|
||||
}
|
||||
|
||||
.v11 select {
|
||||
background-size: 16px 16px;
|
||||
padding-right: 24px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: right 4px center;
|
||||
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' enable-background='new 0 0 16 16' viewBox='0 0 16 16'%3e%3cg fill='%23000'%3e%3cpath d='m4.464 6.05-.707.707L8 11l4.243-4.243-.707-.707L8 9.586z'/%3e%3c/g%3e%3c/svg%3e");
|
||||
}
|
||||
|
||||
.v11 .handle-normal:not([size]) {
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
.v11 .form-group {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.v11 .form-group:last-child {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.v11 legend {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: 18px;
|
||||
font-size: 18px;
|
||||
line-height: inherit;
|
||||
color: #5a5a5a;
|
||||
border: 0;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
float: none;
|
||||
}
|
||||
|
||||
.v11 label {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.v11 fieldset.tx-lfeditor-fieldset legend {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
font-weight: bold;
|
||||
border: 1px solid #AAA;
|
||||
width: auto;
|
||||
margin: 0;
|
||||
}
|
||||