- Updated TinyMCE to version 3.1.0.1

release-0.6
alecpl 16 years ago
parent bc0fe54235
commit 18240a9201

@ -1,6 +1,10 @@
CHANGELOG RoundCube Webmail
---------------------------
2008/07/18 (alec)
----------
- Updated TinyMCE to version 3.1.0.1
2008/07/14 (thomasb)
----------
- Re-enable autocomplete attribute for login form (#1485211)

@ -61,7 +61,7 @@ iespell_desc:"Run spell checking",
download:"ieSpell not detected. Do you want to install it now?"
},
advhr:{
advhr_desc:"Horizontale rule"
advhr_desc:"Horizontal rule"
},
emotions:{
emotions_desc:"Emotions"

File diff suppressed because one or more lines are too long

@ -559,6 +559,9 @@
translate : function(s) {
var c = this.settings.language, o;
if (!s)
return s;
o = tinymce.EditorManager.i18n[c + '.' + s] || s.replace(/{\#([^}]+)\}/g, function(a, b) {
return tinymce.EditorManager.i18n[c + '.' + b] || '{#' + b + '}';
});

@ -1 +1 @@
(function(){var Event=tinymce.dom.Event,each=tinymce.each,DOM=tinymce.DOM;tinymce.create('tinymce.plugins.ContextMenu',{init:function(ed){var t=this;t.editor=ed;t.onContextMenu=new tinymce.util.Dispatcher(this);ed.onContextMenu.add(function(ed,e){if(!e.ctrlKey){t._getMenu(ed).showMenu(e.clientX,e.clientY);Event.add(document,'click',hide);Event.cancel(e);}});function hide(){if(t._menu){t._menu.removeAll();t._menu.destroy();Event.remove(document,'click',hide);}};ed.onMouseDown.add(hide);ed.onKeyDown.add(hide);},getInfo:function(){return{longname:'Contextmenu',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_getMenu:function(ed){var t=this,m=t._menu,se=ed.selection,col=se.isCollapsed(),el=se.getNode()||ed.getBody(),am,p1,p2;if(m){m.removeAll();m.destroy();}p1=DOM.getPos(ed.getContentAreaContainer());p2=DOM.getPos(ed.getContainer());m=ed.controlManager.createDropMenu('contextmenu',{offset_x:p1.x,offset_y:p1.y,constrain:1});t._menu=m;m.add({title:'advanced.cut_desc',icon:'cut',cmd:'Cut'}).setDisabled(col);m.add({title:'advanced.copy_desc',icon:'copy',cmd:'Copy'}).setDisabled(col);m.add({title:'advanced.paste_desc',icon:'paste',cmd:'Paste'});if((el.nodeName=='A'&&!ed.dom.getAttrib(el,'name'))||!col){m.addSeparator();m.add({title:'advanced.link_desc',icon:'link',cmd:ed.plugins.advlink?'mceAdvLink':'mceLink',ui:true});m.add({title:'advanced.unlink_desc',icon:'unlink',cmd:'UnLink'});}m.addSeparator();m.add({title:'advanced.image_desc',icon:'image',cmd:ed.plugins.advimage?'mceAdvImage':'mceImage',ui:true});m.addSeparator();am=m.addMenu({title:'contextmenu.align'});am.add({title:'contextmenu.left',icon:'justifyleft',cmd:'JustifyLeft'});am.add({title:'contextmenu.center',icon:'justifycenter',cmd:'JustifyCenter'});am.add({title:'contextmenu.right',icon:'justifyright',cmd:'JustifyRight'});am.add({title:'contextmenu.full',icon:'justifyfull',cmd:'JustifyFull'});t.onContextMenu.dispatch(t,m,el,col);return m;}});tinymce.PluginManager.add('contextmenu',tinymce.plugins.ContextMenu);})();
(function(){var Event=tinymce.dom.Event,each=tinymce.each,DOM=tinymce.DOM;tinymce.create('tinymce.plugins.ContextMenu',{init:function(ed){var t=this;t.editor=ed;t.onContextMenu=new tinymce.util.Dispatcher(this);ed.onContextMenu.add(function(ed,e){if(!e.ctrlKey){t._getMenu(ed).showMenu(e.clientX,e.clientY);Event.add(ed.getDoc(),'click',hide);Event.cancel(e);}});function hide(){if(t._menu){t._menu.removeAll();t._menu.destroy();Event.remove(ed.getDoc(),'click',hide);}};ed.onMouseDown.add(hide);ed.onKeyDown.add(hide);},getInfo:function(){return{longname:'Contextmenu',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_getMenu:function(ed){var t=this,m=t._menu,se=ed.selection,col=se.isCollapsed(),el=se.getNode()||ed.getBody(),am,p1,p2;if(m){m.removeAll();m.destroy();}p1=DOM.getPos(ed.getContentAreaContainer());p2=DOM.getPos(ed.getContainer());m=ed.controlManager.createDropMenu('contextmenu',{offset_x:p1.x+ed.getParam('contextmenu_offset_x',0),offset_y:p1.y+ed.getParam('contextmenu_offset_y',0),constrain:1});t._menu=m;m.add({title:'advanced.cut_desc',icon:'cut',cmd:'Cut'}).setDisabled(col);m.add({title:'advanced.copy_desc',icon:'copy',cmd:'Copy'}).setDisabled(col);m.add({title:'advanced.paste_desc',icon:'paste',cmd:'Paste'});if((el.nodeName=='A'&&!ed.dom.getAttrib(el,'name'))||!col){m.addSeparator();m.add({title:'advanced.link_desc',icon:'link',cmd:ed.plugins.advlink?'mceAdvLink':'mceLink',ui:true});m.add({title:'advanced.unlink_desc',icon:'unlink',cmd:'UnLink'});}m.addSeparator();m.add({title:'advanced.image_desc',icon:'image',cmd:ed.plugins.advimage?'mceAdvImage':'mceImage',ui:true});m.addSeparator();am=m.addMenu({title:'contextmenu.align'});am.add({title:'contextmenu.left',icon:'justifyleft',cmd:'JustifyLeft'});am.add({title:'contextmenu.center',icon:'justifycenter',cmd:'JustifyCenter'});am.add({title:'contextmenu.right',icon:'justifyright',cmd:'JustifyRight'});am.add({title:'contextmenu.full',icon:'justifyfull',cmd:'JustifyFull'});t.onContextMenu.dispatch(t,m,el,col);return m;}});tinymce.PluginManager.add('contextmenu',tinymce.plugins.ContextMenu);})();

@ -1,5 +1,5 @@
/**
* $Id: editor_plugin_src.js 755 2008-03-29 19:14:42Z spocke $
* $Id: editor_plugin_src.js 848 2008-05-15 11:54:40Z spocke $
*
* @author Moxiecode
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
@ -18,7 +18,7 @@
ed.onContextMenu.add(function(ed, e) {
if (!e.ctrlKey) {
t._getMenu(ed).showMenu(e.clientX, e.clientY);
Event.add(document, 'click', hide);
Event.add(ed.getDoc(), 'click', hide);
Event.cancel(e);
}
});
@ -27,7 +27,7 @@
if (t._menu) {
t._menu.removeAll();
t._menu.destroy();
Event.remove(document, 'click', hide);
Event.remove(ed.getDoc(), 'click', hide);
}
};
@ -57,10 +57,8 @@
p2 = DOM.getPos(ed.getContainer());
m = ed.controlManager.createDropMenu('contextmenu', {
offset_x : p1.x,
offset_y : p1.y,
/* vp_offset_x : p2.x,
vp_offset_y : p2.y,*/
offset_x : p1.x + ed.getParam('contextmenu_offset_x', 0),
offset_y : p1.y + ed.getParam('contextmenu_offset_y', 0),
constrain : 1
});

@ -1,68 +1,16 @@
#id, #name, #hspace, #vspace, #class_name, #align {
width: 100px;
}
#hspace, #vspace {
width: 50px;
}
#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode {
width: 100px;
}
#flash_base, #flash_flashvars {
width: 240px;
}
#width, #height {
width: 40px;
}
#src, #media_type {
width: 250px;
}
#class {
width: 120px;
}
#prev {
margin: 0;
border: 1px solid black;
width: 99%;
height: 230px;
overflow: auto;
}
.panel_wrapper div.current {
height: 390px;
overflow: auto;
}
#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options {
display: none;
}
.mceAddSelectValue {
background-color: #DDDDDD;
}
#qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume {
width: 70px;
}
#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume {
width: 70px;
}
#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks {
width: 70px;
}
#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle {
width: 90px;
}
#qt_qtsrc {
width: 200px;
}
#id, #name, #hspace, #vspace, #class_name, #align { width: 100px }
#hspace, #vspace { width: 50px }
#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { width: 100px }
#flash_base, #flash_flashvars { width: 240px }
#width, #height { width: 40px }
#src, #media_type { width: 250px }
#class { width: 120px }
#prev { margin: 0; border: 1px solid black; width: 380px; height: 230px; overflow: auto }
.panel_wrapper div.current { height: 390px; overflow: auto }
#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { display: none }
.mceAddSelectValue { background-color: #DDDDDD }
#qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume { width: 70px }
#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume { width: 70px }
#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { width: 70px }
#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { width: 90px }
#qt_qtsrc { width: 200px }

File diff suppressed because one or more lines are too long

@ -1,5 +1,5 @@
/**
* $Id: editor_plugin_src.js 763 2008-04-03 13:25:45Z spocke $
* $Id: editor_plugin_src.js 870 2008-06-13 09:25:41Z spocke $
*
* @author Moxiecode
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
@ -19,6 +19,11 @@
return /^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(n.className);
};
ed.onPreInit.add(function() {
// Force in _value parameter this extra parameter is required for older Opera versions
ed.serializer.addRules('param[name|value|_value]');
});
// Register commands
ed.addCommand('mceMedia', function() {
ed.windowManager.open({
@ -83,6 +88,7 @@
});
h = h.replace(/<object([^>]*)>/gi, '<span class="mceItemObject" $1>');
h = h.replace(/<embed([^>]*)\/>/gi, '<span class="mceItemEmbed" $1>');
h = h.replace(/<embed([^>]*)>/gi, '<span class="mceItemEmbed" $1>');
h = h.replace(/<\/(object|embed)([^>]*)>/gi, '</span>');
h = h.replace(/<param([^>]*)>/gi, function(a, b) {return '<span ' + b.replace(/value=/gi, '_value=') + ' class="mceItemParam"></span>'});

@ -598,14 +598,17 @@ function generatePreview(c) {
pl.name = !pl.name ? 'eobj' : pl.name;
pl.align = !pl.align ? '' : pl.align;
h += '<object classid="clsid:' + cls + '" codebase="' + codebase + '" width="' + pl.width + '" height="' + pl.height + '" id="' + pl.id + '" name="' + pl.name + '" align="' + pl.align + '">';
// Avoid annoying warning about insecure items
if (!tinymce.isIE || document.location.protocol != 'https:') {
h += '<object classid="clsid:' + cls + '" codebase="' + codebase + '" width="' + pl.width + '" height="' + pl.height + '" id="' + pl.id + '" name="' + pl.name + '" align="' + pl.align + '">';
for (n in pl) {
h += '<param name="' + n + '" value="' + pl[n] + '">';
for (n in pl) {
h += '<param name="' + n + '" value="' + pl[n] + '">';
// Add extra url parameter if it's an absolute URL
if (n == 'src' && pl[n].indexOf('://') != -1)
h += '<param name="url" value="' + pl[n] + '" />';
// Add extra url parameter if it's an absolute URL
if (n == 'src' && pl[n].indexOf('://') != -1)
h += '<param name="url" value="' + pl[n] + '" />';
}
}
h += '<embed type="' + type + '" ';
@ -613,7 +616,11 @@ function generatePreview(c) {
for (n in pl)
h += n + '="' + pl[n] + '" ';
h += '></embed></object>';
h += '></embed>';
// Avoid annoying warning about insecure items
if (!tinymce.isIE || document.location.protocol != 'https:')
h += '</object>';
p.innerHTML = "<!-- x --->" + h;
}

File diff suppressed because one or more lines are too long

@ -1,5 +1,5 @@
/**
* $Id: editor_plugin_src.js 738 2008-03-20 20:00:48Z spocke $
* $Id: editor_plugin_src.js 862 2008-06-02 20:09:06Z spocke $
*
* @author Moxiecode
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
@ -103,7 +103,9 @@
return Event.cancel(e);
},
_insertText : function(content, bLinebreaks) {
_insertText : function(content, bLinebreaks) {
content = this.editor.dom.encode(content);
if (content && content.length > 0) {
if (bLinebreaks) {
// Special paragraph treatment
@ -154,7 +156,7 @@
content = content.replace(/\n/g, '<br />');
}
}
this.editor.execCommand("mceInsertRawHTML", false, content);
}
},

File diff suppressed because one or more lines are too long

@ -1,5 +1,5 @@
/**
* $Id: editor_plugin_src.js 768 2008-04-04 13:52:49Z spocke $
* $Id: editor_plugin_src.js 853 2008-05-27 08:05:35Z spocke $
*
* @author Moxiecode
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
@ -88,14 +88,32 @@
// Add undo level when new rows are created using the tab key
ed.onKeyDown.add(function(ed, e) {
if (e.keyCode == 9 && ed.dom.getParent(ed.selection.getNode(), 'TABLE'))
if (e.keyCode == 9 && ed.dom.getParent(ed.selection.getNode(), 'TABLE')) {
if (!tinymce.isGecko && !tinymce.isOpera) {
tinyMCE.execInstanceCommand(ed.editorId, "mceTableMoveToNextRow", true);
return tinymce.dom.Event.cancel(e);
}
ed.undoManager.add();
}
});
// Select whole table is a table border is clicked
if (!tinymce.isIE) {
if (ed.getParam('table_selection', true)) {
ed.onClick.add(function(ed, e) {
e = e.target;
if (e.nodeName === 'TABLE')
ed.selection.select(e);
});
}
}
ed.onNodeChange.add(function(ed, cm, n) {
var p = ed.dom.getParent(n, 'td,th,caption');
cm.setActive('table', !!p);
cm.setActive('table', n.nodeName === 'TABLE' || !!p);
if (p && p.nodeName === 'CAPTION')
p = null;
@ -127,6 +145,7 @@
// Is table command
switch (cmd) {
case "mceTableMoveToNextRow":
case "mceInsertTable":
case "mceTableRowProps":
case "mceTableCellProps":
@ -252,6 +271,19 @@
return null;
}
function getNextCell(table, cell) {
var cells = [], x = 0, i, j, cell, nextCell;
for (i = 0; i < table.rows.length; i++)
for (j = 0; j < table.rows[i].cells.length; j++, x++)
cells[x] = table.rows[i].cells[j];
for (i = 0; i < cells.length; i++)
if (cells[i] == cell)
if (nextCell = cells[i+1])
return nextCell;
}
function getTableGrid(table) {
var grid = [], rows = table.rows, x, y, td, sd, xstart, x2, y2;
@ -419,6 +451,19 @@
// Handle commands
switch (command) {
case "mceTableMoveToNextRow":
var nextCell = getNextCell(tableElm, tdElm);
if (!nextCell) {
inst.execCommand("mceTableInsertRowAfter", tdElm);
nextCell = getNextCell(tableElm, tdElm);
}
inst.selection.select(nextCell);
inst.selection.collapse(true);
return true;
case "mceTableRowProps":
if (trElm == null)
return true;
@ -631,7 +676,7 @@
var cpos = getCellPos(grid, tdElm);
// Only one row, remove whole table
if (grid.length == 1) {
if (grid.length == 1 && tableElm.nodeName == 'TBODY') {
inst.dom.remove(inst.dom.getParent(tableElm, "table"));
return true;
}
@ -754,7 +799,7 @@
var lastTDElm = null;
// Only one col, remove whole table
if (grid.length > 1 && grid[0].length <= 1) {
if ((grid.length > 1 && grid[0].length <= 1) && tableElm.nodeName == 'TBODY') {
inst.dom.remove(inst.dom.getParent(tableElm, "table"));
return true;
}
@ -892,7 +937,7 @@
if (!tdElm)
break;
if (tdElm.nodeName == "TD")
if (tdElm.nodeName == "TD" || tdElm.nodeName == "TH")
cells[cells.length] = tdElm;
}

@ -6,7 +6,7 @@ function init() {
tinyMCEPopup.resizeToInnerSize();
f.numcols.value = tinyMCEPopup.getWindowArg('numcols', 1);
f.numrows.value = tinyMCEPopup.getWindowArg('numcols', 1);
f.numrows.value = tinyMCEPopup.getWindowArg('numrows', 1);
}
function mergeCells() {

@ -46,13 +46,13 @@ function insertTable() {
// Validate table size
if (colLimit && cols > colLimit) {
alert(inst.getLang('table_col_limit', '', true, {cols : colLimit}));
inst.windowManager.alert(inst.getLang('table_dlg.col_limit').replace(/\{\$cols\}/g, colLimit));
return false;
} else if (rowLimit && rows > rowLimit) {
alert(inst.getLang('table_row_limit', '', true, {rows : rowLimit}));
inst.windowManager.alert(inst.getLang('table_dlg.row_limit').replace(/\{\$rows\}/g, rowLimit));
return false;
} else if (cellLimit && cols * rows > cellLimit) {
alert(inst.getLang('table_cell_limit', '', true, {cells : cellLimit}));
inst.windowManager.alert(inst.getLang('table_dlg.cell_limit').replace(/\{\$cells\}/g, cellLimit));
return false;
}

@ -112,21 +112,7 @@
<td class="column1"><label for="frame">{#table_dlg.frame}</label></td>
<td>
<select id="frame" name="frame" class="advfield">
<option value="">{#not_set}</option>
<option value="none">{#table_dlg.frame_none}</option>
<option value="groups">{#table_dlg.frame_groups}</option>
<option value="rows">{#table_dlg.frame_rows}</option>
<option value="cols">{#table_dlg.frame_cols}</option>
<option value="all">{#table_dlg.frame_all}</option>
</select>
</td>
</tr>
<tr>
<td class="column1"><label for="rules">{#table_dlg.rules}</label></td>
<td>
<select id="rules" name="rules" class="advfield">
<option value="">{#not_set}</option>
<option value="">{#not_set}</option>
<option value="void">{#table_dlg.rules_void}</option>
<option value="above">{#table_dlg.rules_above}</option>
<option value="below">{#table_dlg.rules_below}</option>
@ -136,6 +122,20 @@
<option value="vsides">{#table_dlg.rules_vsides}</option>
<option value="box">{#table_dlg.rules_box}</option>
<option value="border">{#table_dlg.rules_border}</option>
</select>
</td>
</tr>
<tr>
<td class="column1"><label for="rules">{#table_dlg.rules}</label></td>
<td>
<select id="rules" name="rules" class="advfield">
<option value="">{#not_set}</option>
<option value="none">{#table_dlg.frame_none}</option>
<option value="groups">{#table_dlg.frame_groups}</option>
<option value="rows">{#table_dlg.frame_rows}</option>
<option value="cols">{#table_dlg.frame_cols}</option>
<option value="all">{#table_dlg.frame_all}</option>
</select>
</td>
</tr>

@ -136,7 +136,7 @@ SXE.initElementDialog = function(element_name) {
element_name = element_name.toLowerCase();
var elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase());
if (elm != null && elm.nodeName == element_name.toUpperCase()) {
if (elm != null && elm.nodeName.toUpperCase() == element_name.toUpperCase()) {
SXE.currentAction = "update";
}
@ -185,7 +185,7 @@ SXE.insertElement = function(element_name) {
SXE.removeElement = function(element_name){
element_name = element_name.toLowerCase();
elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase());
if(elm && elm.nodeName == element_name.toUpperCase()){
if(elm && elm.nodeName.toUpperCase() == element_name.toUpperCase()){
tinyMCEPopup.execCommand('mceBeginUndoLevel');
tinyMCE.execCommand('mceRemoveNode', false, elm);
SXE.inst.nodeChanged();

File diff suppressed because one or more lines are too long

@ -1,5 +1,5 @@
/**
* $Id: editor_template_src.js 766 2008-04-03 20:37:06Z spocke $
* $Id: editor_template_src.js 852 2008-05-27 05:52:09Z spocke $
*
* @author Moxiecode
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
@ -158,7 +158,7 @@
return false;
},
_importClasses : function() {
_importClasses : function(e) {
var ed = this.editor, c = ed.controlManager.get('styleselect');
if (c.getLength() == 0) {
@ -188,8 +188,8 @@
});
c.onPostRender.add(function(ed, n) {
Event.add(n, 'focus', t._importClasses, t);
Event.add(n, 'mousedown', t._importClasses, t);
Event.add(n.id + '_text', 'focus', t._importClasses, t);
Event.add(n.id + '_text', 'mousedown', t._importClasses, t);
});
}
@ -210,7 +210,7 @@
},
_createFontSizeSelect : function() {
var c, t = this, lo = [
var t = this, ed = t.editor, c, lo = [
"1 (8 pt)",
"2 (10 pt)",
"3 (12 pt)",
@ -220,10 +220,10 @@
"7 (36 pt)"
], fz = [8, 10, 12, 14, 18, 24, 36];
c = t.editor.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', cmd : 'FontSize'});
c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', cmd : 'FontSize'});
if (c) {
each(explode(t.settings.theme_advanced_font_sizes), function(v) {
c.add(lo[parseInt(v) - 1], v, {'style' : 'font-size:' + fz[v - 1] + 'pt', 'class' : 'mceFontSize' + v});
each(ed.getParam('theme_advanced_font_sizes', t.settings.theme_advanced_font_sizes, 'hash'), function(v, k) {
c.add(k != v ? k : lo[parseInt(v) - 1], v, {'style' : 'font-size:' + fz[v - 1] + 'pt', 'class' : 'mceFontSize' + v});
});
}
@ -519,7 +519,7 @@
each(explode(s.theme_advanced_containers || ''), function(c, i) {
var v = s['theme_advanced_container_' + c] || '';
switch (c.toLowerCase()) {
switch (v.toLowerCase()) {
case 'mceeditor':
n = DOM.add(tb, 'tr');
n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
@ -530,7 +530,7 @@
break;
default:
a = s['theme_advanced_container_' + c + '_align'].toLowerCase();
a = (s['theme_advanced_container_' + c + '_align'] || da).toLowerCase();
a = 'mce' + t._ufirst(a);
n = DOM.add(DOM.add(tb, 'tr'), 'td', {
@ -797,7 +797,7 @@
c.select(ed.queryCommandValue('FontName'));
if (c = cm.get('fontsizeselect'))
c.select(ed.queryCommandValue('FontSize'));
c.select('' + ed.queryCommandValue('FontSize'));
if (s.theme_advanced_path && s.theme_advanced_statusbar_location) {
p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'});
@ -1023,7 +1023,9 @@
var t = this;
this._mceColorPicker(0, {
color: t.fgColor,
func : function(co) {
t.fgColor = co;
t.editor.execCommand('ForeColor', false, co);
}
});
@ -1033,7 +1035,9 @@
var t = this;
this._mceColorPicker(0, {
color: t.bgColor,
func : function(co) {
t.bgColor = co;
t.editor.execCommand('HiliteColor', false, co);
}
});

@ -230,7 +230,7 @@ function updateLight(r, g, b) {
color = finalR + finalG + finalB;
document.getElementById('gs' + i).style.backgroundColor = '#'+color;
setCol('gs' + i, '#'+color);
}
}
@ -238,8 +238,16 @@ function changeFinalColor(color) {
if (color.indexOf('#') == -1)
color = convertRGBToHex(color);
document.getElementById('preview').style.backgroundColor = color;
setCol('preview', color);
document.getElementById('color').value = color;
}
function setCol(e, c) {
try {
document.getElementById(e).style.backgroundColor = c;
} catch (ex) {
// Ignore IE warning
}
}
tinyMCEPopup.onInit.add(init);

@ -88,7 +88,7 @@ var ImageDialog = {
if (el && el.nodeName == 'IMG') {
ed.dom.setAttribs(el, args);
} else {
ed.execCommand('mceInsertContent', false, '<img id="__mce_tmp" src="javascript:;" />', {skip_undo : 1});
ed.execCommand('mceInsertContent', false, '<img id="__mce_tmp" />', {skip_undo : 1});
ed.dom.setAttribs('__mce_tmp', args);
ed.dom.setAttrib('__mce_tmp', 'id', '');
ed.undoManager.add();

@ -34,10 +34,10 @@ var LinkDialog = {
var f = document.forms[0], ed = tinyMCEPopup.editor, e, b;
tinyMCEPopup.restoreSelection();
e = ed.dom.getParent(ed.selection.getNode(), 'A');
// Remove element if there is no href
if (!f.href.value) {
e = ed.dom.getParent(ed.selection.getNode(), 'A');
if (e) {
tinyMCEPopup.execCommand("mceBeginUndoLevel");
b = ed.selection.getBookmark();
@ -49,13 +49,42 @@ var LinkDialog = {
}
}
ed.execCommand('mceInsertLink', false, {
href : f.href.value,
title : f.linktitle.value,
target : f.target_list ? f.target_list.options[f.target_list.selectedIndex].value : null,
'class' : f.class_list ? f.class_list.options[f.class_list.selectedIndex].value : null
});
tinyMCEPopup.execCommand("mceBeginUndoLevel");
// Create new anchor elements
if (e == null) {
tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1});
tinymce.each(ed.dom.select("a"), function(n) {
if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') {
e = n;
ed.dom.setAttribs(e, {
href : f.href.value,
title : f.linktitle.value,
target : f.target_list ? f.target_list.options[f.target_list.selectedIndex].value : null,
'class' : f.class_list ? f.class_list.options[f.class_list.selectedIndex].value : null
});
}
});
} else {
ed.dom.setAttribs(e, {
href : f.href.value,
title : f.linktitle.value,
target : f.target_list ? f.target_list.options[f.target_list.selectedIndex].value : null,
'class' : f.class_list ? f.class_list.options[f.class_list.selectedIndex].value : null
});
}
// Don't move caret if selection was image
if (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') {
ed.focus();
ed.selection.select(e);
ed.selection.collapse(0);
tinyMCEPopup.storeSelection();
}
tinyMCEPopup.execCommand("mceEndUndoLevel");
tinyMCEPopup.close();
},

@ -11,6 +11,13 @@ h6 {font-size: .75em}
a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(img/items.gif) no-repeat bottom left;}
img.mceItemAnchor {width:12px; height:12px; background:url(img/items.gif) no-repeat;}
img {border:0;}
table {cursor:default}
table td, table th {cursor:text}
ins {border-bottom:1px solid green; text-decoration: none; color:green}
del {color:red; text-decoration:line-through}
cite {border-bottom:1px dashed blue}
acronym {border-bottom:1px dotted #CCC; cursor:help}
abbr, html\:abbr {border-bottom:1px dashed #CCC; cursor:help}
/* IE */
* html body {

@ -34,10 +34,14 @@
.defaultSkin td.mceRight table {margin:0 0 0 auto;}
/* Button */
.defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:1px;}
.defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:1px}
.defaultSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0}
.defaultSkin a.mceButtonActive, .defaultSkin a.mceButtonSelected {border:1px solid #0A246A; background-color:#C2CBE0}
.defaultSkin .mceButtonDisabled .mceIcon {opacity:0.3; filter:alpha(opacity=30)}
.defaultSkin .mceButtonLabeled {width:auto}
.defaultSkin .mceButtonLabeled span.mceIcon {float:left}
.defaultSkin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica}
.defaultSkin .mceButtonDisabled .mceButtonLabel {color:#888}
/* Separator */
.defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px}
@ -154,8 +158,8 @@
.defaultSkin span.mce_blockquote {background-position:-220px 0}
.defaultSkin .mce_forecolor span.mceAction {background-position:-720px 0}
.defaultSkin .mce_backcolor span.mceAction {background-position:-760px 0}
.defaultSkin .mce_forecolorpicker {background-position:-720px 0}
.defaultSkin .mce_backcolorpicker {background-position:-760px 0}
.defaultSkin span.mce_forecolorpicker {background-position:-720px 0}
.defaultSkin span.mce_backcolorpicker {background-position:-760px 0}
/* Plugins */
.defaultSkin span.mce_advhr {background-position:-0px -20px}

@ -11,6 +11,13 @@ h6 {font-size: .75em}
a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(../default/img/items.gif) no-repeat bottom left;}
img.mceItemAnchor {width:12px; height:12px; background:url(../default/img/items.gif) no-repeat;}
img {border:0;}
table {cursor:default}
table td, table th {cursor:text}
ins {border-bottom:1px solid green; text-decoration: none; color:green}
del {color:red; text-decoration:line-through}
cite {border-bottom:1px dashed blue}
acronym {border-bottom:1px dotted #CCC; cursor:help}
abbr, html\:abbr {border-bottom:1px dashed #CCC; cursor:help}
/* IE */
* html body {

@ -41,6 +41,10 @@
.o2k7Skin a.mceButtonEnabled:hover {background-color:#B2BBD0; background-position:0 -22px}
.o2k7Skin a.mceButtonActive, .o2k7Skin a.mceButtonSelected {background-position:0 -44px}
.o2k7Skin .mceButtonDisabled .mceIcon {opacity:0.3; filter:alpha(opacity=30)}
.o2k7Skin .mceButtonLabeled {width:auto}
.o2k7Skin .mceButtonLabeled span.mceIcon {float:left}
.o2k7Skin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica}
.o2k7Skin .mceButtonDisabled .mceButtonLabel {color:#888}
/* Separator */
.o2k7Skin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px}
@ -77,8 +81,8 @@
.o2k7Skin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
.o2k7Skin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
.o2k7Skin a.mceMoreColors:hover {border:1px solid #0A246A}
.o2k7Skin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a}
.o2k7Skin .mce_forecolor span.mceAction, .o2k7Skin .mce_backcolor span.mceAction {height:15px}
.o2k7Skin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a;overflow:hidden}
.o2k7Skin .mce_forecolor span.mceAction, .o2k7Skin .mce_backcolor span.mceAction {height:15px;overflow:hidden}
/* Menu */
.o2k7Skin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #ABC6DD}
@ -154,8 +158,8 @@
.o2k7Skin span.mce_blockquote {background-position:-220px 0}
.o2k7Skin .mce_forecolor span.mceAction {background-position:-720px 0}
.o2k7Skin .mce_backcolor span.mceAction {background-position:-760px 0}
.o2k7Skin .mce_forecolorpicker {background-position:-720px 0}
.o2k7Skin .mce_backcolorpicker {background-position:-760px 0}
.o2k7Skin span.mce_forecolorpicker {background-position:-720px 0}
.o2k7Skin span.mce_backcolorpicker {background-position:-760px 0}
/* Plugins */
.o2k7Skin span.mce_advhr {background-position:-0px -20px}

File diff suppressed because one or more lines are too long

@ -101,7 +101,7 @@ tinyMCEPopup = {
u += '/langs/' + this.editor.settings.language + '_dlg.js';
if (!tinymce.ScriptLoader.isDone(u)) {
document.write('<script type="text/javascript" src="' + u + '"></script>');
document.write('<script type="text/javascript" src="' + tinymce._addVer(u) + '"></script>');
tinymce.ScriptLoader.markDone(u);
}
}
@ -132,7 +132,7 @@ tinyMCEPopup = {
// To avoid domain relaxing issue in Opera
function close() {
t.editor.windowManager.close(window, t.id);
t.editor.windowManager.close(window);
tinymce = tinyMCE = t.editor = t.params = t.dom = t.dom.doc = null; // Cleanup
};
@ -183,7 +183,7 @@ tinyMCEPopup = {
// Set inline title
if (!t.isWindow)
t.editor.windowManager.setTitle(ti, t.id);
t.editor.windowManager.setTitle(window, ti);
else
window.focus();

File diff suppressed because it is too large Load Diff

@ -1,5 +1,5 @@
/**
* $Id: editable_selects.js 520 2008-01-07 16:30:32Z spocke $
* $Id: editable_selects.js 867 2008-06-09 20:33:40Z spocke $
*
* Makes select boxes editable.
*
@ -39,6 +39,7 @@ var TinyMCE_EditableSelects = {
se.style.display = 'none';
ne.focus();
ne.onblur = TinyMCE_EditableSelects.onBlurEditableSelectInput;
ne.onkeydown = TinyMCE_EditableSelects.onKeyDown;
TinyMCE_EditableSelects.editSelectElm = se;
}
},
@ -57,5 +58,12 @@ var TinyMCE_EditableSelects = {
se.parentNode.removeChild(se.previousSibling);
TinyMCE_EditableSelects.editSelectElm = null;
}
},
onKeyDown : function(e) {
e = e || window.event;
if (e.keyCode == 13)
TinyMCE_EditableSelects.onBlurEditableSelectInput();
}
};

Loading…
Cancel
Save