Merge branch 'tinymce4'

Conflicts:
	program/js/app.js
	program/js/editor.js
	program/js/tiny_mce/tiny_mce.js
	program/steps/utils/spell_html.inc
pull/193/head^2
Aleksander Machniak 10 years ago
commit 731d190fec

@ -71,8 +71,8 @@ class emoticons extends rcube_plugin
}
private function img_tag($ico, $title)
{
$path = './program/js/tiny_mce/plugins/emotions/img/';
{
$path = './program/js/tinymce/plugins/emoticons/img/';
return html::img(array('src' => $path.$ico, 'title' => $title));
}
}

@ -1769,17 +1769,20 @@ class rcmail extends rcube
return;
}
$lang = strtolower($_SESSION['language']);
$lang_codes = array($_SESSION['language']);
// TinyMCE uses two-letter lang codes, with exception of Chinese
if (strpos($lang, 'zh_') === 0) {
$lang = str_replace('_', '-', $lang);
if ($pos = strpos($_SESSION['language'], '_')) {
$lang_codes[] = substr($_SESSION['language'], 0, $pos);
}
else {
$lang = substr($lang, 0, 2);
foreach ($lang_codes as $code) {
if (file_exists(INSTALL_PATH . 'program/js/tinymce/langs/'.$code.'.js')) {
$lang = $code;
break;
}
}
if (!file_exists(INSTALL_PATH . 'program/js/tiny_mce/langs/'.$lang.'.js')) {
if (empty($lang)) {
$lang = 'en';
}
@ -1791,7 +1794,8 @@ class rcmail extends rcube
'spelldict' => intval($this->config->get('spellcheck_dictionary'))
));
$this->output->include_script('tiny_mce/tiny_mce.js');
$this->output->add_label('selectimage', 'addimage');
$this->output->include_script('tinymce/tinymce.min.js');
$this->output->include_script('editor.js');
$this->output->add_script("rcmail_editor_init($script)", 'docready');
}
@ -1825,8 +1829,8 @@ class rcmail extends rcube
);
foreach ($emoticons as $idx => $file) {
// <img title="Cry" src="http://.../program/js/tiny_mce/plugins/emotions/img/smiley-cry.gif" border="0" alt="Cry" />
$search[] = '/<img title="[a-z ]+" src="https?:\/\/[a-z0-9_.\/-]+\/tiny_mce\/plugins\/emotions\/img\/'.$file.'.gif"[^>]+\/>/i';
// <img title="Cry" src="http://.../program/js/tinymce/plugins/emoticons/img/smiley-cry.gif" border="0" alt="Cry" />
$search[] = '/<img title="[a-z ]+" src="https?:\/\/[a-z0-9_.\/-]+\/tinymce\/plugins\/emoticons\/img\/'.$file.'.gif"[^>]+\/>/i';
$replace[] = $idx;
}

@ -556,12 +556,12 @@ function rcube_webmail()
// execute all foreign onload scripts
// @deprecated
for (var i in this.onloads) {
if (typeof this.onloads[i] === 'string')
eval(this.onloads[i]);
else if (typeof this.onloads[i] === 'function')
this.onloads[i]();
}
for (n in this.onloads) {
if (typeof this.onloads[n] === 'string')
eval(this.onloads[n]);
else if (typeof this.onloads[n] === 'function')
this.onloads[n]();
}
// start keep-alive and refresh intervals
this.start_refresh();
@ -1043,8 +1043,8 @@ function rcube_webmail()
this.stop_spellchecking();
}
else {
if (window.tinyMCE && tinyMCE.get(this.env.composebody)) {
tinyMCE.execCommand('mceSpellCheck', true);
if (window.tinymce && tinymce.get(this.env.composebody)) {
tinymce.execCommand('mceSpellCheck', true);
}
else if (this.env.spellcheck && this.env.spellcheck.spellCheck) {
this.env.spellcheck.spellCheck();
@ -3415,8 +3415,8 @@ function rcube_webmail()
// Apply spellcheck changes if spell checker is active
this.stop_spellchecking();
if (window.tinyMCE)
ed = tinyMCE.get(this.env.composebody);
if (window.tinymce)
ed = tinymce.get(this.env.composebody);
// check for empty body
if (!ed && input_message.val() == '' && !confirm(this.get_label('nobodywarning'))) {
@ -3429,7 +3429,7 @@ function rcube_webmail()
return false;
}
// move body from html editor to textarea (just to be sure, #1485860)
tinyMCE.triggerSave();
tinymce.triggerSave();
}
return true;
@ -3461,7 +3461,7 @@ function rcube_webmail()
data = data.replace(sig_mark, '<div id="_rc_sig">' + signature.html + '</div>');
input.val(data);
tinyMCE.execCommand('mceAddControl', false, props.id);
tinyMCE.execCommand('mceAddEditor', false, props.id);
if (ref.env.default_font)
setTimeout(function() {
@ -3490,7 +3490,7 @@ function rcube_webmail()
// convert html to text
result = this.html2plain(content, function(data) {
tinyMCE.execCommand('mceRemoveControl', false, props.id);
tinyMCE.execCommand('mceRemoveEditor', false, props.id);
// replace signture mark with text version of the signature
if (is_sig)
@ -3513,9 +3513,9 @@ function rcube_webmail()
if (!insert)
return false;
// insert into tinyMCE editor
// insert into tinymce editor
if ($("input[name='_is_html']").val() == '1') {
var editor = tinyMCE.get(this.env.composebody);
var editor = tinymce.get(this.env.composebody);
editor.getWin().focus(); // correct focus in IE & Chrome
editor.selection.setContent(this.quote_html(insert).replace(/\r?\n/g, '<br/>'), { format:'text' });
}
@ -3543,9 +3543,9 @@ function rcube_webmail()
{
var sigstart, text = '', strip = false;
// get selected text from tinyMCE editor
// get selected text from tinymce editor
if ($("input[name='_is_html']").val() == '1') {
var editor = tinyMCE.get(this.env.composebody);
var editor = tinymce.get(this.env.composebody);
editor.getWin().focus(); // correct focus in IE & Chrome
text = editor.selection.getContent({ format:'text' });
@ -3659,8 +3659,8 @@ function rcube_webmail()
{
var ed;
if (window.tinyMCE && (ed = tinyMCE.get(this.env.composebody))) {
if (ed.plugins && ed.plugins.spellchecker && ed.plugins.spellchecker.active)
if (window.tinymce && (ed = tinymce.get(this.env.composebody))) {
if (ed.plugins && ed.plugins.spellchecker && this.env.spellcheck_active)
ed.execCommand('mceSpellCheck');
}
else if (ed = this.env.spellcheck) {
@ -3675,8 +3675,8 @@ function rcube_webmail()
{
var ed, active;
if (window.tinyMCE && (ed = tinyMCE.get(this.env.composebody)) && ed.plugins && ed.plugins.spellchecker)
active = ed.plugins.spellchecker.active;
if (window.tinymce && (ed = tinymce.get(this.env.composebody)))
active = this.env.spellcheck_active;
else if ((ed = this.env.spellcheck) && ed.state)
active = ed.state != 'ready' && ed.state != 'no_error_found';
@ -3691,8 +3691,8 @@ function rcube_webmail()
{
var ed;
if (window.tinyMCE && (ed = tinyMCE.get(this.env.composebody)) && ed.plugins && ed.plugins.spellchecker)
return ed.plugins.spellchecker.selectedLang;
if (window.tinymce && (ed = tinymce.get(this.env.composebody)))
return ed.settings.spellchecker_language || this.env.spell_lang;
else if (this.env.spellcheck)
return GOOGIE_CUR_LANG;
};
@ -3701,8 +3701,8 @@ function rcube_webmail()
{
var ed;
if (window.tinyMCE && (ed = tinyMCE.get(this.env.composebody)) && ed.plugins)
ed.plugins.spellchecker.selectedLang = lang;
if (window.tinymce && (ed = tinymce.get(this.env.composebody)))
ed.settings.spellchecker_language = lang;
else if (this.env.spellcheck)
this.env.spellcheck.setCurrentLanguage(lang);
};
@ -3711,12 +3711,10 @@ function rcube_webmail()
this.spellcheck_resume = function(ishtml, data)
{
if (ishtml) {
var ed = tinyMCE.get(this.env.composebody);
sp = ed.plugins.spellchecker;
sp.active = 1;
sp._markWords(data);
ed.nodeChanged();
var ed = tinymce.get(this.env.composebody);
ed.settings.spellchecker_callback = function(name, text, done, error) { done(data); };
ed.execCommand('mceSpellCheck');
ed.settings.spellchecker_callback = null;
}
else {
var sp = this.env.spellcheck;
@ -3791,7 +3789,7 @@ function rcube_webmail()
if (val = $('[name="_' + hash_fields[i] + '"]').val())
str += val + ':';
if (window.tinyMCE && (ed = tinyMCE.get(this.env.composebody)))
if (window.tinymce && (ed = tinymce.get(this.env.composebody)))
str += ed.getContent();
else
str += $("[name='_message']").val();
@ -3813,8 +3811,8 @@ function rcube_webmail()
ed, empty = true;
// get fresh content from editor
if (window.tinyMCE && (ed = tinyMCE.get(this.env.composebody))) {
tinyMCE.triggerSave();
if (window.tinymce && (ed = tinymce.get(this.env.composebody))) {
tinymce.triggerSave();
}
if (this.env.draft_id) {
@ -3880,12 +3878,12 @@ function rcube_webmail()
// initialize HTML editor
if (formdata._is_html == '1') {
if (!html_mode) {
tinyMCE.execCommand('mceAddControl', false, this.env.composebody);
tinymce.execCommand('mceAddEditor', false, this.env.composebody);
this.triggerEvent('aftertoggle-editor', { mode:'html' });
}
}
else if (html_mode) {
tinyMCE.execCommand('mceRemoveControl', false, this.env.composebody);
tinymce.execCommand('mceRemoveEditor', false, this.env.composebody);
this.triggerEvent('aftertoggle-editor', { mode:'plain' });
}
}
@ -4034,7 +4032,7 @@ function rcube_webmail()
this.set_caret_pos(input_message.get(0), cursor_pos);
}
else if (show_sig && this.env.signatures) { // html
var editor = tinyMCE.get(this.env.composebody),
var editor = tinymce.get(this.env.composebody),
sigElem = editor.dom.get('_rc_sig');
// Append the signature as a div within the body
@ -4147,6 +4145,9 @@ function rcube_webmail()
// called from upload page
this.add2attachment_list = function(name, att, upload_id)
{
if (upload_id)
this.triggerEvent('fileuploaded', {name: name, attachment: att, id: upload_id});
if (!this.gui_objects.attachmentlist)
return false;

@ -32,51 +32,53 @@
function rcmail_editor_init(config)
{
var ret, conf = {
mode: 'textareas',
editor_selector: 'mce_editor',
apply_source_formatting: true,
theme: 'advanced',
selector: '.mce_editor',
theme: 'modern',
language: config.lang,
content_css: config.skin_path + '/editor_content.css?v2',
theme_advanced_toolbar_location: 'top',
theme_advanced_toolbar_align: 'left',
theme_advanced_buttons3: '',
theme_advanced_statusbar_location: 'none',
menubar: false,
statusbar: false,
toolbar_items_size: 'small',
extended_valid_elements: 'font[face|size|color|style],span[id|class|align|style]',
relative_urls: false,
remove_script_host: false,
gecko_spellcheck: true,
convert_urls: false, // #1486944
external_image_list: window.rcmail_editor_images,
rc_client: rcmail
image_description: false,
paste_webkit_style: "color font-size font-family",
paste_data_images: true
};
if (config.mode == 'identity')
$.extend(conf, {
plugins: 'paste,tabfocus',
theme_advanced_buttons1: 'bold,italic,underline,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,separator,outdent,indent,charmap,hr,link,unlink,code,forecolor',
theme_advanced_buttons2: 'fontselect,fontsizeselect'
plugins: ['charmap code hr link paste tabfocus textcolor'],
toolbar: 'bold italic underline alignleft aligncenter alignright alignjustify'
+ ' | outdent indent charmap hr link unlink code forecolor'
+ ' | fontselect fontsizeselect'
});
else { // mail compose
$.extend(conf, {
plugins: 'paste,emotions,media,nonbreaking,table,searchreplace,visualchars,directionality,inlinepopups,tabfocus' + (config.spellcheck ? ',spellchecker' : ''),
theme_advanced_buttons1: 'bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,outdent,indent,ltr,rtl,blockquote,|,forecolor,backcolor,fontselect,fontsizeselect',
theme_advanced_buttons2: 'link,unlink,table,|,emotions,charmap,image,media,|,code,search,undo,redo',
spellchecker_languages: (rcmail.env.spellcheck_langs ? rcmail.env.spellcheck_langs : 'Dansk=da,Deutsch=de,+English=en,Espanol=es,Francais=fr,Italiano=it,Nederlands=nl,Polski=pl,Portugues=pt,Suomi=fi,Svenska=sv'),
spellchecker_rpc_url: '?_task=utils&_action=spell_html&_remote=1',
spellchecker_enable_learn_rpc: config.spelldict,
plugins: ['charmap code directionality emoticons link image media nonbreaking'
+ ' paste table tabfocus textcolor searchreplace' + (config.spellcheck ? ' spellchecker' : '')],
toolbar: 'bold italic underline | alignleft aligncenter alignright alignjustify'
+ ' | bullist numlist outdent indent ltr rtl blockquote | forecolor backcolor | fontselect fontsizeselect'
+ ' | link unlink table | emoticons charmap image media | code searchreplace undo redo',
spellchecker_rpc_url: '../../../../../?_task=utils&_action=spell_html&_remote=1',
spellchecker_language: rcmail.env.spell_lang,
accessibility_focus: false,
oninit: 'rcmail_editor_callback'
file_browser_callback: rcmail_file_browser_callback,
// @todo: support more than image (types: file, image, media)
file_browser_callback_types: 'image'
});
// add handler for spellcheck button state update
conf.setup = function(ed) {
ed.onSetProgressState.add(function(ed, active) {
if (!active)
rcmail.spellcheck_state();
ed.on('init', rcmail_editor_callback);
// add handler for spellcheck button state update
ed.on('SpellcheckStart SpellcheckEnd', function(args) {
rcmail.env.spellcheck_active = args.type == 'spellcheckstart';
rcmail.spellcheck_state();
});
ed.onKeyPress.add(function(ed, e) {
rcmail.compose_type_activity++;
ed.on('keypress', function() {
rcmail.compose_type_activity++;
});
}
}
@ -85,7 +87,7 @@ function rcmail_editor_init(config)
if (window.rcmail_editor_settings)
$.extend(conf, window.rcmail_editor_settings);
tinyMCE.init(conf);
tinymce.init(conf);
}
// react to real individual tinyMCE editor init
@ -102,10 +104,13 @@ function rcmail_editor_callback()
css['font-size'] = rcmail.env.default_font_size;
if (css['font-family'] || css['font-size'])
$(tinyMCE.get(rcmail.env.composebody).getBody()).css(css);
$(tinymce.get(rcmail.env.composebody).getBody()).css(css);
if (elem && elem.type == 'select-one') {
rcmail.change_identity(elem);
// insert signature (only for the first time)
if (!rcmail.env.identities_initialized)
rcmail.change_identity(elem);
// Focus previously focused element
if (fe && fe.id != rcmail.env.composebody) {
// use setTimeout() for IE9 (#1488541)
@ -118,18 +123,19 @@ function rcmail_editor_callback()
// set tabIndex and set focus to element that was focused before
rcmail_editor_tabindex(fe && fe.id == rcmail.env.composebody);
// Trigger resize (needed for proper editor resizing in some browsers using default skin)
$(window).resize();
// Trigger resize (needed for proper editor resizing in some browsers)
window.setTimeout(function() { $(window).resize(); }, 100);
}
// set tabIndex on tinyMCE editor
// set tabIndex on tinymce editor
function rcmail_editor_tabindex(focus)
{
if (rcmail.env.task == 'mail') {
var editor = tinyMCE.get(rcmail.env.composebody);
var editor = tinymce.get(rcmail.env.composebody);
if (editor) {
var textarea = editor.getElement();
var node = editor.getContentAreaContainer().childNodes[0];
var textarea = editor.getElement(),
node = editor.getContentAreaContainer().childNodes[0];
if (textarea && node)
node.tabIndex = textarea.tabIndex;
if (focus)
@ -139,49 +145,171 @@ function rcmail_editor_tabindex(focus)
}
// switch html/plain mode
function rcmail_toggle_editor(select, textAreaId, flagElement)
function rcmail_toggle_editor(select, textAreaId)
{
var flag, ishtml;
if (select.tagName != 'SELECT')
ishtml = select.checked;
else
ishtml = select.value == 'html';
var res = rcmail.command('toggle-editor', {id:textAreaId, mode:ishtml?'html':'plain'});
if (ishtml) {
// #1486593
setTimeout("rcmail_editor_tabindex(true);", 500);
if (flagElement && (flag = rcube_find_object(flagElement)))
flag.value = '1';
}
else if (res) {
if (flagElement && (flag = rcube_find_object(flagElement)))
flag.value = '0';
var ishtml = select.tagName != 'SELECT' ? select.checked : select.value == 'html',
res = rcmail.command('toggle-editor', {id: textAreaId, mode: ishtml ? 'html' : 'plain'});
if (rcmail.env.composebody)
rcube_find_object(rcmail.env.composebody).focus();
}
else { // !res
if (!res) {
if (select.tagName == 'SELECT')
select.value = 'html';
else if (select.tagName == 'INPUT')
select.checked = true;
}
else if (ishtml) {
// #1486593
setTimeout("rcmail_editor_tabindex(true);", 500);
}
else if (rcmail.env.composebody) {
rcube_find_object(rcmail.env.composebody).focus();
}
}
// editor callbeck for images listing
function rcmail_editor_images()
// image selector
function rcmail_file_browser_callback(field_name, url, type, win)
{
var i, files = rcmail.env.attachments, list = [];
var i, elem, dialog, list = [], editor = tinyMCE.activeEditor;
// open image selector dialog
dialog = editor.windowManager.open({
title: rcmail.gettext('select' + type),
width: 500,
height: 300,
html: '<div id="image-selector-list"><ul></ul></div>'
+ '<div id="image-selector-form"><div id="image-upload-button" class="mce-widget mce-btn" role="button"></div></div>',
buttons: [{text: 'Cancel', onclick: function() { rcmail_file_browser_close(); }}]
});
rcmail.env.file_browser_field = field_name;
rcmail.env.file_browser_type = type;
for (i in files) {
att = files[i];
if (att.complete && att.mimetype.startsWith('image/')) {
list.push([att.name, rcmail.env.comm_path+'&_id='+rcmail.env.compose_id+'&_action=display-attachment&_file='+i]);
// fill images list with available images
for (i in rcmail.env.attachments) {
if (elem = rcmail_file_browser_entry(i, rcmail.env.attachments[i])) {
list.push(elem);
}
}
return list;
};
if (list.length) {
$('#image-selector-list > ul').append(list);
}
// add hint about max file size (in dialog footer)
$('div.mce-abs-end', dialog.getEl()).append($('<div class="hint">').text($('div.hint', rcmail.gui_objects.uploadform).text()));
// enable (smart) upload button
elem = $('#image-upload-button').append($('<span>').text(rcmail.gettext('add' + type)));
hack_file_input(elem, rcmail.gui_objects.uploadform);
// enable drag-n-drop area
if (rcmail.gui_objects.filedrop && rcmail.env.filedrop && ((window.XMLHttpRequest && XMLHttpRequest.prototype && XMLHttpRequest.prototype.sendAsBinary) || window.FormData)) {
rcmail.env.old_file_drop = rcmail.gui_objects.filedrop;
rcmail.gui_objects.filedrop = $('#image-selector-form');
rcmail.gui_objects.filedrop.addClass('droptarget')
.bind('dragover dragleave', function(e) {
e.preventDefault();
e.stopPropagation();
$(this)[(e.type == 'dragover' ? 'addClass' : 'removeClass')]('hover');
})
.get(0).addEventListener('drop', function(e) { return rcmail.file_dropped(e); }, false);
}
// register handler for successful file upload
if (!rcmail.env.file_dialog_event) {
rcmail.env.file_dialog_event = true;
rcmail.addEventListener('fileuploaded', function(attr) {
var elem;
if (elem = rcmail_file_browser_entry(attr.name, attr.attachment)) {
$('#image-selector-list > ul').prepend(elem);
}
});
}
}
// close file browser window
function rcmail_file_browser_close(url)
{
if (url)
$('#' + rcmail.env.file_browser_field).val(url);
tinyMCE.activeEditor.windowManager.close();
if (rcmail.env.old_file_drop)
rcmail.gui_objects.filedrop = rcmail.env.old_file_drop;
}
// creates file browser entry
function rcmail_file_browser_entry(file_id, file)
{
if (!file.complete || !file.mimetype) {
return;
}
if (file.mimetype.startsWith('image/')) {
var href = rcmail.env.comm_path+'&_id='+rcmail.env.compose_id+'&_action=display-attachment&_file='+file_id,
img = $('<img>').attr({title: file.name, src: href + '&_thumbnail=1'});
return $('<li>').data('url', href)
.append($('<span class="img">').append(img))
.append($('<span class="name">').text(file.name))
.click(function() { rcmail_file_browser_close($(this).data('url')); });
}
}
// create smart files upload button
function hack_file_input(elem, clone_form)
{
var link = $(elem),
file = $('<input>'),
form = $('<form>').attr({method: 'post', enctype: 'multipart/form-data'}),
offset = link.offset();
// clone existing upload form
if (clone_form) {
file.attr('name', $('input[type="file"]', clone_form).attr('name'));
form.attr('action', $(clone_form).attr('action'))
.append($('<input>').attr({type: 'hidden', name: '_token', value: rcmail.env.request_token}));
}
function move_file_input(e) {
file.css({top: (e.pageY - offset.top - 10) + 'px', left: (e.pageX - offset.left - 10) + 'px'});
}
file.attr({type: 'file', multiple: 'multiple', size: 5, title: ''})
.change(function() { rcmail.upload_file(form, 'upload'); })
.click(function() { setTimeout(function() { link.mouseleave(); }, 20); })
// opacity:0 does the trick, display/visibility doesn't work
.css({opacity: 0, cursor: 'pointer', position: 'relative', outline: 'none'})
.appendTo(form);
// In FF and IE we need to move the browser file-input's button under the cursor
// Thanks to the size attribute above we know the length of the input field
if (navigator.userAgent.match(/Firefox|MSIE/))
file.css({marginLeft: '-80px'});
// Note: now, I observe problem with cursor style on FF < 4 only
link.css({overflow: 'hidden', cursor: 'pointer'})
.mouseenter(function() { this.__active = true; })
// place button under the cursor
.mousemove(function(e) {
if (this.__active)
move_file_input(e);
// move the input away if button is disabled
else
$(this).mouseleave();
})
.mouseleave(function() {
file.css({top: '-10000px', left: '-10000px'});
this.__active = false;
})
.click(function(e) {
// forward click if mouse-enter event was missed
if (!this.__active) {
this.__active = true;
move_file_input(e);
file.trigger(e);
}
})
.mouseleave()
.append(form);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,5 +0,0 @@
input.radio {border:1px none #000; background:transparent; vertical-align:middle;}
.panel_wrapper div.current {height:80px;}
#width {width:50px; vertical-align:middle;}
#width2 {width:50px; vertical-align:middle;}
#size {width:100px;}

@ -1 +0,0 @@
(function(){tinymce.create("tinymce.plugins.AdvancedHRPlugin",{init:function(a,b){a.addCommand("mceAdvancedHr",function(){a.windowManager.open({file:b+"/rule.htm",width:250+parseInt(a.getLang("advhr.delta_width",0)),height:160+parseInt(a.getLang("advhr.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("advhr",{title:"advhr.advhr_desc",cmd:"mceAdvancedHr"});a.onNodeChange.add(function(d,c,e){c.setActive("advhr",e.nodeName=="HR")});a.onClick.add(function(c,d){d=d.target;if(d.nodeName==="HR"){c.selection.select(d)}})},getInfo:function(){return{longname:"Advanced HR",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advhr",tinymce.plugins.AdvancedHRPlugin)})();

@ -1,57 +0,0 @@
/**
* editor_plugin_src.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(function() {
tinymce.create('tinymce.plugins.AdvancedHRPlugin', {
init : function(ed, url) {
// Register commands
ed.addCommand('mceAdvancedHr', function() {
ed.windowManager.open({
file : url + '/rule.htm',
width : 250 + parseInt(ed.getLang('advhr.delta_width', 0)),
height : 160 + parseInt(ed.getLang('advhr.delta_height', 0)),
inline : 1
}, {
plugin_url : url
});
});
// Register buttons
ed.addButton('advhr', {
title : 'advhr.advhr_desc',
cmd : 'mceAdvancedHr'
});
ed.onNodeChange.add(function(ed, cm, n) {
cm.setActive('advhr', n.nodeName == 'HR');
});
ed.onClick.add(function(ed, e) {
e = e.target;
if (e.nodeName === 'HR')
ed.selection.select(e);
});
},
getInfo : function() {
return {
longname : 'Advanced HR',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr',
version : tinymce.majorVersion + "." + tinymce.minorVersion
};
}
});
// Register plugin
tinymce.PluginManager.add('advhr', tinymce.plugins.AdvancedHRPlugin);
})();

@ -1,43 +0,0 @@
var AdvHRDialog = {
init : function(ed) {
var dom = ed.dom, f = document.forms[0], n = ed.selection.getNode(), w;
w = dom.getAttrib(n, 'width');
f.width.value = w ? parseInt(w) : (dom.getStyle('width') || '');
f.size.value = dom.getAttrib(n, 'size') || parseInt(dom.getStyle('height')) || '';
f.noshade.checked = !!dom.getAttrib(n, 'noshade') || !!dom.getStyle('border-width');
selectByValue(f, 'width2', w.indexOf('%') != -1 ? '%' : 'px');
},
update : function() {
var ed = tinyMCEPopup.editor, h, f = document.forms[0], st = '';
h = '<hr';
if (f.size.value) {
h += ' size="' + f.size.value + '"';
st += ' height:' + f.size.value + 'px;';
}
if (f.width.value) {
h += ' width="' + f.width.value + (f.width2.value == '%' ? '%' : '') + '"';
st += ' width:' + f.width.value + (f.width2.value == '%' ? '%' : 'px') + ';';
}
if (f.noshade.checked) {
h += ' noshade="noshade"';
st += ' border-width: 1px; border-style: solid; border-color: #CCCCCC; color: #ffffff;';
}
if (ed.settings.inline_styles)
h += ' style="' + tinymce.trim(st) + '"';
h += ' />';
ed.execCommand("mceInsertContent", false, h);
tinyMCEPopup.close();
}
};
tinyMCEPopup.requireLangPack();
tinyMCEPopup.onInit.add(AdvHRDialog.init, AdvHRDialog);

@ -1 +0,0 @@
tinyMCE.addI18n('ar.advhr_dlg',{size:"\u0627\u0644\u0627\u0631\u062a\u0641\u0627\u0639",noshade:"\u0644\u0627 \u0638\u0644",width:"\u0627\u0644\u0639\u0631\u0636",normal:"\u0627\u0644\u0637\u0628\u064a\u0639\u064a",widthunits:"\u0627\u0644\u0648\u062d\u062f\u0627\u062a"});

@ -1 +0,0 @@
tinyMCE.addI18n('az.advhr_dlg',{size:"H\u00fcnd\u00fcrl\u00fcy\u00fc",noshade:"K\u00f6lg\u0259 yoxdur",width:"Eni",normal:"Normal",widthunits:"Units"});

@ -1 +0,0 @@
tinyMCE.addI18n('bg.advhr_dlg',{size:"\u0412\u0438\u0441\u043e\u0447\u0438\u043d\u0430",noshade:"\u0411\u0435\u0437 \u0441\u044f\u043d\u043a\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",normal:"\u041d\u043e\u0440\u043c\u0430\u043b\u043d\u0430",widthunits:"\u0415\u0434\u0438\u043d\u0438\u0446\u0438"});

@ -1 +0,0 @@
tinyMCE.addI18n('bn.advhr_dlg',{size:"Height",noshade:"No shadow",width:"Width",normal:"Normal",widthunits:"Units"});

@ -1 +0,0 @@
tinyMCE.addI18n('br.advhr_dlg',{size:"Altura",noshade:"Sem sombra",width:"Largura",normal:"Normal",widthunits:"Units"});

@ -1 +0,0 @@
tinyMCE.addI18n('bs.advhr_dlg',{size:"Visina",noshade:"Bez sjene",width:"\u0160irina",normal:"Normal",widthunits:"Units"});

@ -1 +0,0 @@
tinyMCE.addI18n('ca.advhr_dlg',{size:"Al\u00e7ada",noshade:"Sense sombra",width:"Amplada",normal:"Normal",widthunits:"Unitats"});

@ -1 +0,0 @@
tinyMCE.addI18n('cs.advhr_dlg',{size:"V\u00fd\u0161ka",noshade:"Bez st\u00ednu",width:"\u0160\u00ed\u0159ka",normal:"Norm\u00e1ln\u00ed",widthunits:"Jednotky"});

@ -1 +0,0 @@
tinyMCE.addI18n('cy.advhr_dlg',{size:"Uchder",noshade:"Dim cysgod",width:"Lled",normal:"Normal",widthunits:"Unedau"});

@ -1 +0,0 @@
tinyMCE.addI18n('da.advhr_dlg',{size:"H\u00f8jde",noshade:"Ingen skygge",width:"Bredde",normal:"Normal",widthunits:"Enheder"});

@ -1 +0,0 @@
tinyMCE.addI18n('de.advhr_dlg',{size:"H\u00f6he",noshade:"Kein Schatten",width:"Breite",normal:"Normal",widthunits:"Einheiten"});

@ -1 +0,0 @@
tinyMCE.addI18n('el.advhr_dlg',{size:"\u038e\u03c8\u03bf\u03c2",noshade:"\u03a7\u03c9\u03c1\u03af\u03c2 \u03c3\u03ba\u03b9\u03ac",width:"\u03a0\u03bb\u03ac\u03c4\u03bf\u03c2",normal:"Normal",widthunits:"Units"});

@ -1 +0,0 @@
tinyMCE.addI18n('en.advhr_dlg',{size:"Height",noshade:"No Shadow",width:"Width",normal:"Normal",widthunits:"Units"});

@ -1 +0,0 @@
tinyMCE.addI18n('eo.advhr_dlg',{size:"Alteco",noshade:"Sen ombro",width:"Lar\u011deco",normal:"Normal",widthunits:"Units"});

@ -1 +0,0 @@
tinyMCE.addI18n('es.advhr_dlg',{size:"Alto",noshade:"Sin sombra",width:"Ancho",normal:"Normal",widthunits:"Unidades"});

@ -1 +0,0 @@
tinyMCE.addI18n('et.advhr_dlg',{size:"K\u00f5rgus",noshade:"Ilma varjuta",width:"Laius",normal:"Normaalne",widthunits:"\u00dchikud"});

@ -1 +0,0 @@
tinyMCE.addI18n('eu.advhr_dlg',{size:"Altuera",noshade:"Itzalik gabe",width:"Zabalera",normal:"Normal",widthunits:"Units"});

@ -1 +0,0 @@
tinyMCE.addI18n('fa.advhr_dlg',{size:"\u0627\u0631\u062a\u0641\u0627\u0639",noshade:"\u0628\u062f\u0648\u0646 \u0633\u0627\u06cc\u0647",width:"\u067e\u0647\u0646\u0627",normal:"\u0645\u0639\u0645\u0648\u0644\u06cc",widthunits:"\u0648\u0627\u062d\u062f"});

@ -1 +0,0 @@
tinyMCE.addI18n('fi.advhr_dlg',{size:"Korkeus",noshade:"Ei varjoa",width:"Leveys",normal:"Normaali",widthunits:"Yksik\u00f6t"});

@ -1 +0,0 @@
tinyMCE.addI18n('fr.advhr_dlg',{size:"Hauteur",noshade:"Pas d\'ombre",width:"Largeur",normal:"Normal",widthunits:"Unit\u00e9s"});

@ -1 +0,0 @@
tinyMCE.addI18n('gl.advhr_dlg',{size:"Alto",noshade:"Sen sombra",width:"Ancho",normal:"Normal",widthunits:"Units"});

@ -1 +0,0 @@
tinyMCE.addI18n('he.advhr_dlg',{size:"\u05d2\u05d5\u05d1\u05d4",noshade:"\u05dc\u05dc\u05d0 \u05e6\u05dc",width:"\u05e8\u05d5\u05d7\u05d1",normal:"\u05e8\u05d2\u05d9\u05dc",widthunits:"\u05d9\u05d7\u05d9\u05d3\u05d5\u05ea"});

@ -1 +0,0 @@
tinyMCE.addI18n('hi.advhr_dlg',{size:"Height",noshade:"No shadow",width:"Width",normal:"Normal",widthunits:"Units"});

@ -1 +0,0 @@
tinyMCE.addI18n('hr.advhr_dlg',{size:"Visina",noshade:"Bez sjene",width:"\u0160irina",normal:"Normal",widthunits:"Units"});

@ -1 +0,0 @@
tinyMCE.addI18n('hu.advhr_dlg',{size:"Magass\u00e1g",noshade:"\u00c1rny\u00e9k n\u00e9lk\u00fcl",width:"Sz\u00e9less\u00e9g",normal:"Norm\u00e1l",widthunits:"M\u00e9rt\u00e9kegys\u00e9gek"});

@ -1 +0,0 @@
tinyMCE.addI18n('hy.advhr_dlg',{size:"\u0532\u0561\u0580\u0571\u0580\u0578\u0582\u0569\u0575\u0578\u0582\u0576",noshade:"\u0531\u057c\u0561\u0576\u0581 \u057d\u057f\u057e\u0565\u0580\u056b",width:"\u053c\u0561\u0575\u0576\u0578\u0582\u0569\u0575\u0578\u0582\u0576",normal:"Normal",widthunits:"Units"});

@ -1 +0,0 @@
tinyMCE.addI18n('id.advhr_dlg',{size:"Tinggi",noshade:"Tanpa bayangan",width:"Lebar",normal:"Normal",widthunits:"Units"});

@ -1 +0,0 @@
tinyMCE.addI18n('is.advhr_dlg',{size:"H\u00e6\u00f0",noshade:"Enginn skuggi",width:"Breidd",normal:"Normal",widthunits:"Units"});

@ -1 +0,0 @@
tinyMCE.addI18n('it.advhr_dlg',{size:"Altezza",noshade:"Senza ombreggiatura",width:"Larghezza",normal:"Normale",widthunits:"Unit\u00e0"});

@ -1 +0,0 @@
tinyMCE.addI18n('ja.advhr_dlg',{size:"\u9ad8\u3055",noshade:"\u5f71\u306a\u3057",width:"\u5e45",normal:"\u901a\u5e38",widthunits:"\u5358\u4f4d"});

@ -1 +0,0 @@
tinyMCE.addI18n('ka.advhr_dlg',{size:"\u10e1\u10d8\u10db\u10d0\u10e6\u10da\u10d4",noshade:"\u10e9\u10e0\u10d3\u10d8\u10da\u10d8\u10e1 \u10d2\u10d0\u10e0\u10d4\u10e8\u10d4",width:"\u10e1\u10d8\u10d2\u10d0\u10dc\u10d4",normal:"Normal",widthunits:"Units"});

@ -1 +0,0 @@
tinyMCE.addI18n('ko.advhr_dlg',{size:"\ub192\uc774",noshade:"\uadf8\ub9bc\uc790 \uc5c6\uc74c",width:"\ud3ed",normal:"\ubcf4\ud1b5",widthunits:"\ub2e8\uc704"});

@ -1 +0,0 @@
tinyMCE.addI18n('lt.advhr_dlg',{size:"Auk\u0161tis",noshade:"Be \u0161e\u0161\u0117lio",width:"Ilgis",normal:"Normalus",widthunits:"Vienetai"});

@ -1 +0,0 @@
tinyMCE.addI18n('lv.advhr_dlg',{size:"Augstums",noshade:"Bez \u0113nas",width:"Platums",normal:"Norm\u0101ls",widthunits:"Vien\u012bbas"});

@ -1 +0,0 @@
tinyMCE.addI18n('mk.advhr_dlg',{size:"\u0412\u0438\u0441\u0438\u043d\u0430",noshade:"\u0411\u0435\u0437 \u0441\u0435\u043d\u043a\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",normal:"\u041d\u043e\u0440\u043c\u0430\u043b\u043d\u043e",widthunits:"\u0415\u0434\u0438\u043d\u0438\u0446\u0438"});

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save