From 5bdbd2fc3c6c6b0393b8d63741ce027a58460b4f Mon Sep 17 00:00:00 2001 From: YuCheng Hu Date: Sat, 12 Jun 2010 19:44:12 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=B0=20trunk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +YUCHENG HU+ git-svn-id: https://svn.code.sf.net/p/hawebs/svn@193 a2543c7e-f6e9-4f8a-8bff-1ffc34733512 --- .../plugins/fullpage/editor_plugin.js | 1 + .../plugins/fullpage/editor_plugin_src.js | 146 +++++ .../tiny_mce/plugins/fullpage/fullpage.htm | 576 ++++++++++++++++++ .../tiny_mce/plugins/fullpage/index.html | 1 + .../tiny_mce/plugins/fullpage/langs/en.js | 92 +++ .../tiny_mce/plugins/fullpage/langs/en_dlg.js | 85 +++ .../plugins/fullpage/langs/index.html | 1 + 7 files changed, 902 insertions(+) create mode 100644 oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin.js create mode 100644 oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin_src.js create mode 100644 oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/fullpage.htm create mode 100644 oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/index.html create mode 100644 oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/langs/en.js create mode 100644 oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/langs/en_dlg.js create mode 100644 oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/langs/index.html diff --git a/oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin.js b/oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin.js new file mode 100644 index 00000000..8e11bfc4 --- /dev/null +++ b/oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.FullPagePlugin",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceFullPageProperties",function(){a.windowManager.open({file:b+"/fullpage.htm",width:430+parseInt(a.getLang("fullpage.delta_width",0)),height:495+parseInt(a.getLang("fullpage.delta_height",0)),inline:1},{plugin_url:b,head_html:c.head})});a.addButton("fullpage",{title:"fullpage.desc",cmd:"mceFullPageProperties"});a.onBeforeSetContent.add(c._setContent,c);a.onSetContent.add(c._setBodyAttribs,c);a.onGetContent.add(c._getContent,c)},getInfo:function(){return{longname:"Fullpage",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_setBodyAttribs:function(d,a){var l,c,e,g,b,h,j,f=this.head.match(/body(.*?)>/i);if(f&&f[1]){l=f[1].match(/\s*(\w+\s*=\s*".*?"|\w+\s*=\s*'.*?'|\w+\s*=\s*\w+|\w+)\s*/g);if(l){for(c=0,e=l.length;c",a);h.head=f.substring(0,a+1);j=f.indexOf("\n'}h.head+=d.getParam("fullpage_default_doctype",'');h.head+="\n\n\n"+d.getParam("fullpage_default_title","Untitled document")+"\n";if(g=d.getParam("fullpage_default_encoding")){h.head+='\n'}if(g=d.getParam("fullpage_default_font_family")){i+="font-family: "+g+";"}if(g=d.getParam("fullpage_default_font_size")){i+="font-size: "+g+";"}if(g=d.getParam("fullpage_default_text_color")){i+="color: "+g+";"}h.head+="\n\n";h.foot="\n\n"}},_getContent:function(a,c){var b=this;if(!c.source_view||!a.getParam("fullpage_hide_in_source_view")){c.content=tinymce.trim(b.head)+"\n"+tinymce.trim(c.content)+"\n"+tinymce.trim(b.foot)}}});tinymce.PluginManager.add("fullpage",tinymce.plugins.FullPagePlugin)})(); \ No newline at end of file diff --git a/oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin_src.js b/oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin_src.js new file mode 100644 index 00000000..c7d5aca3 --- /dev/null +++ b/oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin_src.js @@ -0,0 +1,146 @@ +/** + * $Id: editor_plugin_src.js 1029 2009-02-24 22:32:21Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + tinymce.create('tinymce.plugins.FullPagePlugin', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + // Register commands + ed.addCommand('mceFullPageProperties', function() { + ed.windowManager.open({ + file : url + '/fullpage.htm', + width : 430 + parseInt(ed.getLang('fullpage.delta_width', 0)), + height : 495 + parseInt(ed.getLang('fullpage.delta_height', 0)), + inline : 1 + }, { + plugin_url : url, + head_html : t.head + }); + }); + + // Register buttons + ed.addButton('fullpage', {title : 'fullpage.desc', cmd : 'mceFullPageProperties'}); + + ed.onBeforeSetContent.add(t._setContent, t); + ed.onSetContent.add(t._setBodyAttribs, t); + ed.onGetContent.add(t._getContent, t); + }, + + getInfo : function() { + return { + longname : 'Fullpage', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private plugin internal methods + + _setBodyAttribs : function(ed, o) { + var bdattr, i, len, kv, k, v, t, attr = this.head.match(/body(.*?)>/i); + + if (attr && attr[1]) { + bdattr = attr[1].match(/\s*(\w+\s*=\s*".*?"|\w+\s*=\s*'.*?'|\w+\s*=\s*\w+|\w+)\s*/g); + + if (bdattr) { + for(i = 0, len = bdattr.length; i < len; i++) { + kv = bdattr[i].split('='); + k = kv[0].replace(/\s/,''); + v = kv[1]; + + if (v) { + v = v.replace(/^\s+/,'').replace(/\s+$/,''); + t = v.match(/^["'](.*)["']$/); + + if (t) + v = t[1]; + } else + v = k; + + ed.dom.setAttrib(ed.getBody(), 'style', v); + } + } + } + }, + + _createSerializer : function() { + return new tinymce.dom.Serializer({ + dom : this.editor.dom, + apply_source_formatting : true + }); + }, + + _setContent : function(ed, o) { + var t = this, sp, ep, c = o.content, v, st = ''; + + if (o.source_view && ed.getParam('fullpage_hide_in_source_view')) + return; + + // Parse out head, body and footer + c = c.replace(/<(\/?)BODY/gi, '<$1body'); + sp = c.indexOf('', sp); + t.head = c.substring(0, sp + 1); + + ep = c.indexOf('\n'; + + t.head += ed.getParam('fullpage_default_doctype', ''); + t.head += '\n\n\n' + ed.getParam('fullpage_default_title', 'Untitled document') + '\n'; + + if (v = ed.getParam('fullpage_default_encoding')) + t.head += '\n'; + + if (v = ed.getParam('fullpage_default_font_family')) + st += 'font-family: ' + v + ';'; + + if (v = ed.getParam('fullpage_default_font_size')) + st += 'font-size: ' + v + ';'; + + if (v = ed.getParam('fullpage_default_text_color')) + st += 'color: ' + v + ';'; + + t.head += '\n\n'; + t.foot = '\n\n'; + } + }, + + _getContent : function(ed, o) { + var t = this; + + if (!o.source_view || !ed.getParam('fullpage_hide_in_source_view')) + o.content = tinymce.trim(t.head) + '\n' + tinymce.trim(o.content) + '\n' + tinymce.trim(t.foot); + } + }); + + // Register plugin + tinymce.PluginManager.add('fullpage', tinymce.plugins.FullPagePlugin); +})(); \ No newline at end of file diff --git a/oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/fullpage.htm b/oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/fullpage.htm new file mode 100644 index 00000000..3ea40810 --- /dev/null +++ b/oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/fullpage.htm @@ -0,0 +1,576 @@ + + + + {#fullpage_dlg.title} + + + + + + + +
+ + +
+
+
+ {#fullpage_dlg.meta_props} + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
 
 
 
 
  + +
+
+ +
+ {#fullpage_dlg.langprops} + + + + + + + + + + + + + + + + + + + + + + +
+ +
  + +
 
+ +
 
+
+
+ +
+
+ {#fullpage_dlg.appearance_textprops} + + + + + + + + + + + + + + + + +
+ +
+ +
+ + + + + +
 
+
+
+ +
+ {#fullpage_dlg.appearance_bgprops} + + + + + + + + + + +
+ + + + + +
 
+
+ + + + + +
 
+
+
+ +
+ {#fullpage_dlg.appearance_marginprops} + + + + + + + + + + + + + + +
+
+ +
+ {#fullpage_dlg.appearance_linkprops} + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+ + + + + +
 
+
+ + + + + +
 
+
  
+
+ +
+ {#fullpage_dlg.appearance_style} + + + + + + + + + + +
+ + + + +
 
+
+
+ +
+ + +
+ {#fullpage_dlg.head_elements} + +
+
+
+ + +
+
+ + +
+
+
+ +
+
+ +
+ {#fullpage_dlg.meta_element} + + + + + + + + + + + + + + +
+ + +
+ +
+ {#fullpage_dlg.title_element} + + + + + + +
+ + +
+ +
+ {#fullpage_dlg.script_element} + + + +
+ +
+
+ + + + + + + + + + + + + + + + + +
+ + + + +
 
+
+ +
+ +
+
+ + +
+ +
+ {#fullpage_dlg.style_element} + + + +
+ +
+
+ + + + + + + + + +
+
+ +
+ +
+
+ + +
+ +
+ {#fullpage_dlg.base_element} + + + + + + + + + + +
+ + +
+ + + +
+ {#fullpage_dlg.comment_element} + + + + +
+
+
+ +
+
+ +
+ +
+ +
+
+
+ + diff --git a/oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/index.html b/oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/langs/en.js b/oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/langs/en.js new file mode 100644 index 00000000..1864d3d5 --- /dev/null +++ b/oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/langs/en.js @@ -0,0 +1,92 @@ +// UK lang variables + +tinyMCE.addToLang('fullpage',{ + title : 'Document properties', + desc : 'Document properties', + meta_tab : 'General', + appearance_tab : 'Appearance', + advanced_tab : 'Advanced', + meta_props : 'Meta information', + langprops : 'Language and encoding', + meta_title : 'Title', + meta_keywords : 'Keywords', + meta_description : 'Description', + meta_robots : 'Robots', + doctypes : 'Doctype', + langcode : 'Language code', + langdir : 'Language direction', + ltr : 'Left to right', + rtl : 'Right to left', + xml_pi : 'XML declaration', + encoding : 'Character encoding', + appearance_bgprops : 'Background properties', + appearance_marginprops : 'Body margins', + appearance_linkprops : 'Link colors', + appearance_textprops : 'Text properties', + bgcolor : 'Background color', + bgimage : 'Background image', + left_margin : 'Left margin', + right_margin : 'Right margin', + top_margin : 'Top margin', + bottom_margin : 'Bottom margin', + text_color : 'Text color', + font_size : 'Font size', + font_face : 'Font face', + link_color : 'Link color', + hover_color : 'Hover color', + visited_color : 'Visited color', + active_color : 'Active color', + textcolor : 'Color', + fontsize : 'Font size', + fontface : 'Font family', + meta_index_follow : 'Index and follow the links', + meta_index_nofollow : 'Index and don\'t follow the links', + meta_noindex_follow : 'Do not index but follow the links', + meta_noindex_nofollow : 'Do not index and don\'t follow the links', + appearance_style : 'Stylesheet and style properties', + stylesheet : 'Stylesheet', + style : 'Style', + author : 'Author', + copyright : 'Copyright', + add : 'Add new element', + remove : 'Remove selected element', + moveup : 'Move selected element up', + movedown : 'Move selected element down', + head_elements : 'Head elements', + info : 'Information', + info_text : '', + add_title : 'Title element', + add_meta : 'Meta element', + add_script : 'Script element', + add_style : 'Style element', + add_link : 'Link element', + add_base : 'Base element', + add_comment : 'Comment node', + title_element : 'Title element', + script_element : 'Script element', + style_element : 'Style element', + base_element : 'Base element', + link_element : 'Link element', + meta_element : 'Meta element', + comment_element : 'Comment', + src : 'Src', + language : 'Language', + href : 'Href', + target : 'Target', + rel : 'Rel', + type : 'Type', + charset : 'Charset', + defer : 'Defer', + media : 'Media', + properties : 'Properties', + name : 'Name', + value : 'Value', + content : 'Content', + rel : 'Rel', + rev : 'Rev', + hreflang : 'Href lang', + general_props : 'General', + advanced_props : 'Advanced', + delta_width : 0, + delta_height : 0 +}); diff --git a/oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/langs/en_dlg.js b/oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/langs/en_dlg.js new file mode 100644 index 00000000..f5801b8b --- /dev/null +++ b/oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/langs/en_dlg.js @@ -0,0 +1,85 @@ +tinyMCE.addI18n('en.fullpage_dlg',{ +title:"Document properties", +meta_tab:"General", +appearance_tab:"Appearance", +advanced_tab:"Advanced", +meta_props:"Meta information", +langprops:"Language and encoding", +meta_title:"Title", +meta_keywords:"Keywords", +meta_description:"Description", +meta_robots:"Robots", +doctypes:"Doctype", +langcode:"Language code", +langdir:"Language direction", +ltr:"Left to right", +rtl:"Right to left", +xml_pi:"XML declaration", +encoding:"Character encoding", +appearance_bgprops:"Background properties", +appearance_marginprops:"Body margins", +appearance_linkprops:"Link colors", +appearance_textprops:"Text properties", +bgcolor:"Background color", +bgimage:"Background image", +left_margin:"Left margin", +right_margin:"Right margin", +top_margin:"Top margin", +bottom_margin:"Bottom margin", +text_color:"Text color", +font_size:"Font size", +font_face:"Font face", +link_color:"Link color", +hover_color:"Hover color", +visited_color:"Visited color", +active_color:"Active color", +textcolor:"Color", +fontsize:"Font size", +fontface:"Font family", +meta_index_follow:"Index and follow the links", +meta_index_nofollow:"Index and don't follow the links", +meta_noindex_follow:"Do not index but follow the links", +meta_noindex_nofollow:"Do not index and don\'t follow the links", +appearance_style:"Stylesheet and style properties", +stylesheet:"Stylesheet", +style:"Style", +author:"Author", +copyright:"Copyright", +add:"Add new element", +remove:"Remove selected element", +moveup:"Move selected element up", +movedown:"Move selected element down", +head_elements:"Head elements", +info:"Information", +add_title:"Title element", +add_meta:"Meta element", +add_script:"Script element", +add_style:"Style element", +add_link:"Link element", +add_base:"Base element", +add_comment:"Comment node", +title_element:"Title element", +script_element:"Script element", +style_element:"Style element", +base_element:"Base element", +link_element:"Link element", +meta_element:"Meta element", +comment_element:"Comment", +src:"Src", +language:"Language", +href:"Href", +target:"Target", +type:"Type", +charset:"Charset", +defer:"Defer", +media:"Media", +properties:"Properties", +name:"Name", +value:"Value", +content:"Content", +rel:"Rel", +rev:"Rev", +hreflang:"Href lang", +general_props:"General", +advanced_props:"Advanced" +}); \ No newline at end of file diff --git a/oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/langs/index.html b/oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/langs/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/plugins/editors/tinymce/jscripts/tiny_mce/plugins/fullpage/langs/index.html @@ -0,0 +1 @@ + \ No newline at end of file