From 4dd50a41ee477806745a05772d5abbf16d23db89 Mon Sep 17 00:00:00 2001 From: till Date: Wed, 2 Nov 2011 15:14:32 +0000 Subject: fix path/structure (my bad) --- program/js/tiny_mce/plugins/advhr/css/advhr.css | 5 ++ program/js/tiny_mce/plugins/advhr/editor_plugin.js | 1 + .../js/tiny_mce/plugins/advhr/editor_plugin_src.js | 57 +++++++++++++++++++++ program/js/tiny_mce/plugins/advhr/js/rule.js | 43 ++++++++++++++++ program/js/tiny_mce/plugins/advhr/langs/en_dlg.js | 1 + program/js/tiny_mce/plugins/advhr/rule.htm | 58 ++++++++++++++++++++++ 6 files changed, 165 insertions(+) create mode 100644 program/js/tiny_mce/plugins/advhr/css/advhr.css create mode 100644 program/js/tiny_mce/plugins/advhr/editor_plugin.js create mode 100644 program/js/tiny_mce/plugins/advhr/editor_plugin_src.js create mode 100644 program/js/tiny_mce/plugins/advhr/js/rule.js create mode 100644 program/js/tiny_mce/plugins/advhr/langs/en_dlg.js create mode 100644 program/js/tiny_mce/plugins/advhr/rule.htm (limited to 'program/js/tiny_mce/plugins/advhr') diff --git a/program/js/tiny_mce/plugins/advhr/css/advhr.css b/program/js/tiny_mce/plugins/advhr/css/advhr.css new file mode 100644 index 000000000..0e2283498 --- /dev/null +++ b/program/js/tiny_mce/plugins/advhr/css/advhr.css @@ -0,0 +1,5 @@ +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;} diff --git a/program/js/tiny_mce/plugins/advhr/editor_plugin.js b/program/js/tiny_mce/plugins/advhr/editor_plugin.js new file mode 100644 index 000000000..4d3b062de --- /dev/null +++ b/program/js/tiny_mce/plugins/advhr/editor_plugin.js @@ -0,0 +1 @@ +(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)})(); \ No newline at end of file diff --git a/program/js/tiny_mce/plugins/advhr/editor_plugin_src.js b/program/js/tiny_mce/plugins/advhr/editor_plugin_src.js new file mode 100644 index 000000000..0c652d330 --- /dev/null +++ b/program/js/tiny_mce/plugins/advhr/editor_plugin_src.js @@ -0,0 +1,57 @@ +/** + * 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); +})(); \ No newline at end of file diff --git a/program/js/tiny_mce/plugins/advhr/js/rule.js b/program/js/tiny_mce/plugins/advhr/js/rule.js new file mode 100644 index 000000000..b6cbd66c7 --- /dev/null +++ b/program/js/tiny_mce/plugins/advhr/js/rule.js @@ -0,0 +1,43 @@ +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 = ' + + + {#advhr.advhr_desc} + + + + + + + +
+ + +
+
+ + + + + + + + + + + + + +
+ + + +
+
+
+ +
+ + +
+
+ + -- cgit v1.2.3