Upgrade TinyMCE to 3.2.7. Fixes bug #10993.
This commit is contained in:
parent
dae7215922
commit
a2a2bac440
140 changed files with 8023 additions and 3591 deletions
|
|
@ -1 +1 @@
|
|||
(function(){tinymce.create('tinymce.plugins.StylePlugin',{init:function(ed,url){ed.addCommand('mceStyleProps',function(){ed.windowManager.open({file:url+'/props.htm',width:480+parseInt(ed.getLang('style.delta_width',0)),height:320+parseInt(ed.getLang('style.delta_height',0)),inline:1},{plugin_url:url,style_text:ed.selection.getNode().style.cssText});});ed.addCommand('mceSetElementStyle',function(ui,v){if(e=ed.selection.getNode()){ed.dom.setAttrib(e,'style',v);ed.execCommand('mceRepaint');}});ed.addButton('styleprops',{title:'style.desc',cmd:'mceStyleProps'});},getInfo:function(){return{longname:'Style',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('style',tinymce.plugins.StylePlugin);})();
|
||||
(function(){tinymce.create("tinymce.plugins.StylePlugin",{init:function(a,b){a.addCommand("mceStyleProps",function(){a.windowManager.open({file:b+"/props.htm",width:480+parseInt(a.getLang("style.delta_width",0)),height:320+parseInt(a.getLang("style.delta_height",0)),inline:1},{plugin_url:b,style_text:a.selection.getNode().style.cssText})});a.addCommand("mceSetElementStyle",function(d,c){if(e=a.selection.getNode()){a.dom.setAttrib(e,"style",c);a.execCommand("mceRepaint")}});a.onNodeChange.add(function(d,c,f){c.setDisabled("styleprops",f.nodeName==="BODY")});a.addButton("styleprops",{title:"style.desc",cmd:"mceStyleProps"})},getInfo:function(){return{longname:"Style",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("style",tinymce.plugins.StylePlugin)})();
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $
|
||||
* $Id: editor_plugin_src.js 787 2008-04-10 11:40:57Z spocke $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
|
||||
|
|
@ -28,6 +28,10 @@
|
|||
}
|
||||
});
|
||||
|
||||
ed.onNodeChange.add(function(ed, cm, n) {
|
||||
cm.setDisabled('styleprops', n.nodeName === 'BODY');
|
||||
});
|
||||
|
||||
// Register buttons
|
||||
ed.addButton('styleprops', {title : 'style.desc', cmd : 'mceStyleProps'});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ var defaultFonts = "" +
|
|||
"Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif";
|
||||
|
||||
var defaultSizes = "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger";
|
||||
var defaultMeasurement = "+pixels=px;points=pt;em;in;cm;mm;picas;ems;exs;%";
|
||||
var defaultSpacingMeasurement = "pixels=px;points=pt;in;cm;mm;picas;+ems;exs;%";
|
||||
var defaultIndentMeasurement = "pixels=px;+points=pt;in;cm;mm;picas;ems;exs;%";
|
||||
var defaultMeasurement = "+pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%";
|
||||
var defaultSpacingMeasurement = "pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;+ems=em;exs=ex;%";
|
||||
var defaultIndentMeasurement = "pixels=px;+points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%";
|
||||
var defaultWeight = "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900";
|
||||
var defaultTextStyle = "normal;italic;oblique";
|
||||
var defaultVariant = "normal;small-caps";
|
||||
|
|
@ -223,12 +223,12 @@ function setupFormData() {
|
|||
f.positioning_height.value = getNum(ce.style.height);
|
||||
selectByValue(f, 'positioning_height_measurement', getMeasurement(ce.style.height));
|
||||
|
||||
setupBox(f, ce, 'positioning_placement', '', '', new Array('top', 'right', 'bottom', 'left'));
|
||||
setupBox(f, ce, 'positioning_placement', '', '', ['top', 'right', 'bottom', 'left']);
|
||||
|
||||
s = ce.style.clip.replace(new RegExp("rect\\('?([^']*)'?\\)", 'gi'), "$1");
|
||||
s = s.replace(/,/g, ' ');
|
||||
|
||||
if (!hasEqualValues(new Array(getVal(s, 0), getVal(s, 1), getVal(s, 2), getVal(s, 3)))) {
|
||||
if (!hasEqualValues([getVal(s, 0), getVal(s, 1), getVal(s, 2), getVal(s, 3)])) {
|
||||
f.positioning_clip_top.value = getNum(getVal(s, 0));
|
||||
selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0)));
|
||||
f.positioning_clip_right.value = getNum(getVal(s, 1));
|
||||
|
|
@ -247,12 +247,12 @@ function setupFormData() {
|
|||
}
|
||||
|
||||
function getMeasurement(s) {
|
||||
return s.replace(/^([0-9]+)(.*)$/, "$2");
|
||||
return s.replace(/^([0-9.]+)(.*)$/, "$2");
|
||||
}
|
||||
|
||||
function getNum(s) {
|
||||
if (new RegExp('^[0-9]+[a-z%]+$', 'gi').test(s))
|
||||
return s.replace(/[^0-9]/g, '');
|
||||
if (new RegExp('^(?:[0-9.]+)(?:[a-z%]+)$', 'gi').test(s))
|
||||
return s.replace(/[^0-9.]/g, '');
|
||||
|
||||
return s;
|
||||
}
|
||||
|
|
@ -279,7 +279,7 @@ function setValue(f, n, v) {
|
|||
|
||||
function setupBox(f, ce, fp, pr, sf, b) {
|
||||
if (typeof(b) == "undefined")
|
||||
b = new Array('Top', 'Right', 'Bottom', 'Left');
|
||||
b = ['Top', 'Right', 'Bottom', 'Left'];
|
||||
|
||||
if (isSame(ce, pr, sf, b)) {
|
||||
f.elements[fp + "_same"].checked = true;
|
||||
|
|
@ -328,10 +328,10 @@ function setupBox(f, ce, fp, pr, sf, b) {
|
|||
}
|
||||
|
||||
function isSame(e, pr, sf, b) {
|
||||
var a = new Array(), i, x;
|
||||
var a = [], i, x;
|
||||
|
||||
if (typeof(b) == "undefined")
|
||||
b = new Array('Top', 'Right', 'Bottom', 'Left');
|
||||
b = ['Top', 'Right', 'Bottom', 'Left'];
|
||||
|
||||
if (typeof(sf) == "undefined" || sf == null)
|
||||
sf = "";
|
||||
|
|
@ -478,7 +478,7 @@ function generateCSS() {
|
|||
ce.style.borderBottomWidth = f.border_width_bottom.value + (isNum(f.border_width_bottom.value) ? f.border_width_bottom_measurement.value : "");
|
||||
ce.style.borderLeftWidth = f.border_width_left.value + (isNum(f.border_width_left.value) ? f.border_width_left_measurement.value : "");
|
||||
} else
|
||||
ce.style.borderWidth = f.border_width_top.value;
|
||||
ce.style.borderWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : "");
|
||||
|
||||
if (!f.border_color_same.checked) {
|
||||
ce.style.borderTopColor = f.border_color_top.value;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
||||
<script type="text/javascript" src="js/props.js"></script>
|
||||
<link href="css/props.css" rel="stylesheet" type="text/css" />
|
||||
<base target="_self" />
|
||||
</head>
|
||||
|
||||
<body id="styleprops" style="display: none">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue