summaryrefslogtreecommitdiff
path: root/public/javascripts/tiny_mce/plugins/style
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-09-09 12:07:57 +0200
committerhukl <contact@smyck.org>2009-09-09 12:07:57 +0200
commita6292dd0fecd4482fe863ed849d126b5281b1a8a (patch)
tree7c4c32e1a3448c5d1995a236ed01c731018da13d /public/javascripts/tiny_mce/plugins/style
parent83fe1b1abd7d7bb85679be3f1341e5c88db0ae83 (diff)
huge tiny_mce update - now using the tiny_mce jquery build which allows tiny_mce to be initialized via jquery - great!
Diffstat (limited to 'public/javascripts/tiny_mce/plugins/style')
-rw-r--r--[-rwxr-xr-x]public/javascripts/tiny_mce/plugins/style/css/props.css0
-rw-r--r--[-rwxr-xr-x]public/javascripts/tiny_mce/plugins/style/editor_plugin.js2
-rw-r--r--[-rwxr-xr-x]public/javascripts/tiny_mce/plugins/style/editor_plugin_src.js0
-rw-r--r--[-rwxr-xr-x]public/javascripts/tiny_mce/plugins/style/js/props.js14
-rw-r--r--[-rwxr-xr-x]public/javascripts/tiny_mce/plugins/style/langs/en_dlg.js0
-rw-r--r--[-rwxr-xr-x]public/javascripts/tiny_mce/plugins/style/props.htm1
6 files changed, 8 insertions, 9 deletions
diff --git a/public/javascripts/tiny_mce/plugins/style/css/props.css b/public/javascripts/tiny_mce/plugins/style/css/props.css
index eb1f264..eb1f264 100755..100644
--- a/public/javascripts/tiny_mce/plugins/style/css/props.css
+++ b/public/javascripts/tiny_mce/plugins/style/css/props.css
diff --git a/public/javascripts/tiny_mce/plugins/style/editor_plugin.js b/public/javascripts/tiny_mce/plugins/style/editor_plugin.js
index 6ebaa91..cab2153 100755..100644
--- a/public/javascripts/tiny_mce/plugins/style/editor_plugin.js
+++ b/public/javascripts/tiny_mce/plugins/style/editor_plugin.js
@@ -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.onNodeChange.add(function(ed,cm,n){cm.setDisabled('styleprops',n.nodeName==='BODY');});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);})(); \ No newline at end of file (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)})(); \ No newline at end of file
diff --git a/public/javascripts/tiny_mce/plugins/style/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/style/editor_plugin_src.js
index 6c817ce..6c817ce 100755..100644
--- a/public/javascripts/tiny_mce/plugins/style/editor_plugin_src.js
+++ b/public/javascripts/tiny_mce/plugins/style/editor_plugin_src.js
diff --git a/public/javascripts/tiny_mce/plugins/style/js/props.js b/public/javascripts/tiny_mce/plugins/style/js/props.js
index cafd6b1..a8dd93d 100755..100644
--- a/public/javascripts/tiny_mce/plugins/style/js/props.js
+++ b/public/javascripts/tiny_mce/plugins/style/js/props.js
@@ -10,9 +10,9 @@ var defaultFonts = "" +
10 "Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif"; 10 "Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif";
11 11
12var defaultSizes = "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger"; 12var defaultSizes = "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger";
13var defaultMeasurement = "+pixels=px;points=pt;em;in;cm;mm;picas;ems;exs;%"; 13var defaultMeasurement = "+pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%";
14var defaultSpacingMeasurement = "pixels=px;points=pt;in;cm;mm;picas;+ems;exs;%"; 14var defaultSpacingMeasurement = "pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;+ems=em;exs=ex;%";
15var defaultIndentMeasurement = "pixels=px;+points=pt;in;cm;mm;picas;ems;exs;%"; 15var defaultIndentMeasurement = "pixels=px;+points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%";
16var defaultWeight = "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900"; 16var defaultWeight = "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900";
17var defaultTextStyle = "normal;italic;oblique"; 17var defaultTextStyle = "normal;italic;oblique";
18var defaultVariant = "normal;small-caps"; 18var defaultVariant = "normal;small-caps";
@@ -247,12 +247,12 @@ function setupFormData() {
247} 247}
248 248
249function getMeasurement(s) { 249function getMeasurement(s) {
250 return s.replace(/^([0-9]+)(.*)$/, "$2"); 250 return s.replace(/^([0-9.]+)(.*)$/, "$2");
251} 251}
252 252
253function getNum(s) { 253function getNum(s) {
254 if (new RegExp('^[0-9]+[a-z%]+$', 'gi').test(s)) 254 if (new RegExp('^(?:[0-9.]+)(?:[a-z%]+)$', 'gi').test(s))
255 return s.replace(/[^0-9]/g, ''); 255 return s.replace(/[^0-9.]/g, '');
256 256
257 return s; 257 return s;
258} 258}
@@ -478,7 +478,7 @@ function generateCSS() {
478 ce.style.borderBottomWidth = f.border_width_bottom.value + (isNum(f.border_width_bottom.value) ? f.border_width_bottom_measurement.value : ""); 478 ce.style.borderBottomWidth = f.border_width_bottom.value + (isNum(f.border_width_bottom.value) ? f.border_width_bottom_measurement.value : "");
479 ce.style.borderLeftWidth = f.border_width_left.value + (isNum(f.border_width_left.value) ? f.border_width_left_measurement.value : ""); 479 ce.style.borderLeftWidth = f.border_width_left.value + (isNum(f.border_width_left.value) ? f.border_width_left_measurement.value : "");
480 } else 480 } else
481 ce.style.borderWidth = f.border_width_top.value; 481 ce.style.borderWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : "");
482 482
483 if (!f.border_color_same.checked) { 483 if (!f.border_color_same.checked) {
484 ce.style.borderTopColor = f.border_color_top.value; 484 ce.style.borderTopColor = f.border_color_top.value;
diff --git a/public/javascripts/tiny_mce/plugins/style/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/style/langs/en_dlg.js
index 5026313..5026313 100755..100644
--- a/public/javascripts/tiny_mce/plugins/style/langs/en_dlg.js
+++ b/public/javascripts/tiny_mce/plugins/style/langs/en_dlg.js
diff --git a/public/javascripts/tiny_mce/plugins/style/props.htm b/public/javascripts/tiny_mce/plugins/style/props.htm
index 54538e3..3a1582c 100755..100644
--- a/public/javascripts/tiny_mce/plugins/style/props.htm
+++ b/public/javascripts/tiny_mce/plugins/style/props.htm
@@ -8,7 +8,6 @@
8 <script type="text/javascript" src="../../utils/form_utils.js"></script> 8 <script type="text/javascript" src="../../utils/form_utils.js"></script>
9 <script type="text/javascript" src="js/props.js"></script> 9 <script type="text/javascript" src="js/props.js"></script>
10 <link href="css/props.css" rel="stylesheet" type="text/css" /> 10 <link href="css/props.css" rel="stylesheet" type="text/css" />
11 <base target="_self" />
12</head> 11</head>
13 12
14<body id="styleprops" style="display: none"> 13<body id="styleprops" style="display: none">