Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -r1.74 -r1.75 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 6 May 2008 12:42:22 -0000 1.74 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 29 May 2008 19:13:43 -0000 1.75 @@ -704,7 +704,7 @@ ::xo::Page requireJS "/resources/xowiki/jquery/jquery.js" ::xo::Page requireJS "/resources/xowiki/wymeditor/jquery.wymeditor.pack.js" regsub -all {[.:]} [my id] {\\\\&} JID - set config "" + set config [list "skin: 'default'"] if {[my exists height] || [my exists width]} { set height_cmd "" set width_cmd "" @@ -716,10 +716,11 @@ $height_cmd $width_cmd }}] - set config "{ - $postInit - }" + lappend config $postInit } + if {$config ne ""} { + set config \{[join $config ,]\} + } ::xo::Page requireJS [subst -nocommand -nobackslash { jQuery(function() { jQuery("#$JID").wymeditor($config); Index: openacs-4/packages/xowiki/www/resources/wymeditor/MIT-license.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/MIT-license.txt,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xowiki/www/resources/wymeditor/MIT-license.txt 15 Jul 2007 16:07:45 -0000 1.1 +++ openacs-4/packages/xowiki/www/resources/wymeditor/MIT-license.txt 29 May 2008 19:13:43 -0000 1.2 @@ -1,4 +1,4 @@ -Copyright (C) 2007 H.O.net - http://www.honet.be/ +Copyright (c) 2008 Jean-Francois Hovinne, http://www.wymeditor.org/ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Index: openacs-4/packages/xowiki/www/resources/wymeditor/README =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/README,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xowiki/www/resources/wymeditor/README 15 Jul 2007 16:07:45 -0000 1.1 +++ openacs-4/packages/xowiki/www/resources/wymeditor/README 29 May 2008 19:13:43 -0000 1.2 @@ -1,5 +1,5 @@ WYMeditor : what you see is What You Mean web-based editor -Copyright (C) 2007 H.O.net - http://www.honet.be/ +Copyright (c) 2008 Jean-Francois Hovinne, http://www.wymeditor.org/ Dual licensed under the MIT (MIT-license.txt) and GPL (GPL-license.txt) licenses. @@ -8,13 +8,33 @@ File Name: README + Readme file. File Authors: - Jean-François Hovinne (jf.hovinne@wymeditor.org) + Jean-François Hovinne - http://www.hovinne.com/ -Important Note -============== +README +====== -For WYMeditor to work, you'll need at least jQuery 1.1.3 -Please see the documentation for more information: http://trac.wymeditor.org/ +For WYMeditor to work, you'll need at least jQuery 1.1.3.x +jQuery is available at http://jquery.com/ + +WYMeditor is compatible with MSIE 6.0+ +and Gecko-based browsers (e.g. Firefox 1.5+). + +Opera/Safari compatibility is still buggy/experimental. +Any help to improve it is welcome. + +WYMeditor is currently not compatible with Firefox 3 beta versions +(tested with Firefox 3 beta 5). + +WYMeditor integration examples are available in the 'examples' directory. + +For more information, please read the documentation, available at: +http://trac.wymeditor.org/trac/wiki + +If you need help, feel free to create an account on the forum or subscribe +to the WYMeditor-user mailing-list, and ask your question. +http://forum.wymeditor.org/ +http://lists.wymeditor.org/ Index: openacs-4/packages/xowiki/www/resources/wymeditor/jquery.wymeditor.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/jquery.wymeditor.js,v diff -u -r1.3 -r1.4 --- openacs-4/packages/xowiki/www/resources/wymeditor/jquery.wymeditor.js 14 Sep 2007 17:53:31 -0000 1.3 +++ openacs-4/packages/xowiki/www/resources/wymeditor/jquery.wymeditor.js 29 May 2008 19:13:44 -0000 1.4 @@ -1,157 +1,194 @@ -if(!WYM_STRINGS) var WYM_STRINGS = new Array(); - -var WYM_STRINGS_EN = { - Strong: 'Strong', - Emphasis: 'Emphasis', - Superscript: 'Superscript', - Subscript: 'Subscript', - Ordered_List: 'Ordered List', - Unordered_List: 'Unordered List', - Indent: 'Indent', - Outdent: 'Outdent', - Undo: 'Undo', - Redo: 'Redo', - Link: 'Link', - Unlink: 'Unlink', - Image: 'Image', - Table: 'Table', - HTML: 'HTML', - Paragraph: 'Paragraph', - Heading_1: 'Heading 1', - Heading_2: 'Heading 2', - Heading_3: 'Heading 3', - Heading_4: 'Heading 4', - Heading_5: 'Heading 5', - Heading_6: 'Heading 6', - Preformatted: 'Preformatted', - Blockquote: 'Blockquote', - Table_Header: 'Table Header', - URL: 'URL', - Title: 'Title', - Alternative_Text: 'Alternative text', - Caption: 'Caption', - Number_Of_Rows: 'Number of rows', - Number_Of_Cols: 'Number of cols', - Submit: 'Submit', - Cancel: 'Cancel', - Choose: 'Choose', - Preview: 'Preview', - Paste_From_Word: 'Paste from Word', - Tools: 'Tools', - Containers: 'Containers', - Classes: 'Classes', - Status: 'Status', - Source_Code: 'Source code' -}; - -WYM_STRINGS['en'] = WYM_STRINGS_EN; /* * WYMeditor : what you see is What You Mean web-based editor - * Copyright (C) 2007 H.O.net - http://www.honet.be/ + * Copyright (c) 2008 Jean-Francois Hovinne, http://www.wymeditor.org/ * Dual licensed under the MIT (MIT-license.txt) * and GPL (GPL-license.txt) licenses. * * For further information visit: * http://www.wymeditor.org/ * - * File Name: - * jquery.wymeditor.js - * Main JS file with core class and functions. + * File: jquery.wymeditor.js + * + * Main JS file with core classes and functions. * See the documentation for more info. * - * File Authors: - * Jean-Francois Hovinne (jf.hovinne@wymeditor.org) - * Volker Mische (vmx@gmx.de) - * Scott Lewis (scott@bright-crayon.com) + * About: authors + * + * Jean-Francois Hovinne (jf.hovinne a-t wymeditor dotorg) + * Volker Mische (vmx a-t gmx dotde) + * Scott Lewis (lewiscot a-t gmail dotcom) * Bermi Ferrer (wymeditor a-t bermi dotorg) - * Daniel Reszka (d.reszka@wymeditor.org) + * Daniel Reszka (d.reszka a-t wymeditor dotorg) */ +/* + Namespace: WYMeditor + Global WYMeditor namespace. +*/ +if(!WYMeditor) var WYMeditor = {}; -/********** CONSTANTS **********/ +jQuery.extend(WYMeditor, { - - - var WYM_INSTANCES = new Array(); - var WYM_NAME = "name"; - var WYM_INDEX = "{Wym_Index}"; - var WYM_BASE_PATH = "{Wym_Base_Path}"; - var WYM_CSS_PATH = "{Wym_Css_Path}"; - var WYM_WYM_PATH = "{Wym_Wym_Path}"; - var WYM_IFRAME_BASE_PATH = "{Wym_Iframe_Base_Path}"; - var WYM_IFRAME_DEFAULT = "iframe/default/"; - var WYM_JQUERY_PATH = "{Wym_Jquery_Path}"; - var WYM_TOOLS = "{Wym_Tools}"; - var WYM_TOOLS_ITEMS = "{Wym_Tools_Items}"; - var WYM_TOOL_NAME = "{Wym_Tool_Name}"; - var WYM_TOOL_TITLE = "{Wym_Tool_Title}"; - var WYM_TOOL_CLASS = "{Wym_Tool_Class}"; - var WYM_CLASSES = "{Wym_Classes}"; - var WYM_CLASSES_ITEMS = "{Wym_Classes_Items}"; - var WYM_CLASS_NAME = "{Wym_Class_Name}"; - var WYM_CLASS_TITLE = "{Wym_Class_Title}"; - var WYM_CONTAINERS = "{Wym_Containers}"; - var WYM_CONTAINERS_ITEMS = "{Wym_Containers_Items}"; - var WYM_CONTAINER_NAME = "{Wym_Container_Name}"; - var WYM_CONTAINER_TITLE = "{Wym_Containers_Title}"; - var WYM_CONTAINER_CLASS = "{Wym_Container_Class}"; - var WYM_HTML = "{Wym_Html}"; - var WYM_IFRAME = "{Wym_Iframe}"; - var WYM_STATUS = "{Wym_Status}"; - var WYM_DIALOG_TITLE = "{Wym_Dialog_Title}"; - var WYM_DIALOG_BODY = "{Wym_Dialog_Body}"; - var WYM_BODY = "body"; - var WYM_STRING = "string"; - var WYM_P = "p"; - var WYM_H1 = "h1"; - var WYM_H2 = "h2"; - var WYM_H3 = "h3"; - var WYM_H4 = "h4"; - var WYM_H5 = "h5"; - var WYM_H6 = "h6"; - var WYM_PRE = "pre"; - var WYM_BLOCKQUOTE = "blockquote"; - var WYM_TD = "td"; - var WYM_TH = "th"; - var WYM_A = "a"; - var WYM_BR = "br"; - var WYM_IMG = "img"; - var WYM_TABLE = "table"; - var WYM_UL = "ul"; - var WYM_OL = "ol"; - var WYM_LI = "li"; - var WYM_CLASS = "class"; - var WYM_HREF = "href"; - var WYM_SRC = "src"; - var WYM_TITLE = "title"; - var WYM_ALT = "alt"; - var WYM_DIALOG_LINK = "Link"; - var WYM_DIALOG_IMAGE = "Image"; - var WYM_DIALOG_TABLE = "Table"; - var WYM_DIALOG_PASTE = "Paste_From_Word"; - var WYM_BOLD = "Bold"; - var WYM_ITALIC = "Italic"; - var WYM_CREATE_LINK = "CreateLink"; - var WYM_INSERT_IMAGE = "InsertImage"; - var WYM_INSERT_TABLE = "InsertTable"; - var WYM_PASTE = "Paste"; - var WYM_INDENT = "Indent"; - var WYM_OUTDENT = "Outdent"; - var WYM_TOGGLE_HTML = "ToggleHtml"; - var WYM_FORMAT_BLOCK = "FormatBlock"; - var WYM_PREVIEW = "Preview"; - - var WYM_DEFAULT_SKIN = "default"; +/* + Constants: Global WYMeditor constants. - var WYM_MAIN_CONTAINERS = new Array(WYM_P,WYM_H1,WYM_H2,WYM_H3,WYM_H4, - WYM_H5,WYM_H6,WYM_PRE,WYM_BLOCKQUOTE); + VERSION - Defines WYMeditor version. + INSTANCES - An array of loaded WYMeditor.editor instances. + STRINGS - An array of loaded WYMeditor language pairs/values. + SKINS - An array of loaded WYMeditor skins. + NAME - The "name" attribute. + INDEX - A string replaced by the instance index. + BASE_PATH - A string replaced by WYMeditor's base path. + SKIN_PATH - A string replaced by WYMeditor's skin path. + WYM_PATH - A string replaced by WYMeditor's main JS file path. + SKINS_DEFAULT_PATH - The skins default base path. + SKINS_DEFAULT_CSS - The skins default CSS file. + LANG_DEFAULT_PATH - The language files default path. + IFRAME_BASE_PATH - A string replaced by the designmode iframe's base path. + IFRAME_DEFAULT - The iframe's default base path. + JQUERY_PATH - A string replaced by the computed jQuery path. + TOOLS - A string replaced by the toolbar's HTML. + TOOLS_ITEMS - A string replaced by the toolbar items. + TOOL_NAME - A string replaced by a toolbar item's name. + TOOL_TITLE - A string replaced by a toolbar item's title. + TOOL_CLASS - A string replaced by a toolbar item's class. + CLASSES - A string replaced by the classes panel's HTML. + CLASSES_ITEMS - A string replaced by the classes items. + CLASS_NAME - A string replaced by a class item's name. + CLASS_TITLE - A string replaced by a class item's title. + CONTAINERS - A string replaced by the containers panel's HTML. + CONTAINERS_ITEMS - A string replaced by the containers items. + CONTAINER_NAME - A string replaced by a container item's name. + CONTAINER_TITLE - A string replaced by a container item's title. + CONTAINER_CLASS - A string replaced by a container item's class. + HTML - A string replaced by the HTML view panel's HTML. + IFRAME - A string replaced by the designmode iframe. + STATUS - A string replaced by the status panel's HTML. + DIALOG_TITLE - A string replaced by a dialog's title. + DIALOG_BODY - A string replaced by a dialog's HTML body. + BODY - The BODY element. + STRING - The "string" type. + BODY,P, + H1,H2,H3,H4,H5,H6, + PRE,BLOCKQUOTE, + A,BR,IMG, + TABLE,TD,TH, + UL,OL,LI - HTML elements string representation. + CLASS,HREF,SRC, + TITLE,ALT - HTML attributes string representation. + DIALOG_LINK - A link dialog type. + DIALOG_IMAGE - An image dialog type. + DIALOG_TABLE - A table dialog type. + DIALOG_PASTE - A 'Paste from Word' dialog type. + BOLD - Command: (un)set selection to . + ITALIC - Command: (un)set selection to . + CREATE_LINK - Command: open the link dialog or (un)set link. + INSERT_IMAGE - Command: open the image dialog or insert an image. + INSERT_TABLE - Command: open the table dialog. + PASTE - Command: open the paste dialog. + INDENT - Command: nest a list item. + OUTDENT - Command: unnest a list item. + TOGGLE_HTML - Command: display/hide the HTML view. + FORMAT_BLOCK - Command: set a block element to another type. + PREVIEW - Command: open the preview dialog. + UNLINK - Command: unset a link. + INSERT_UNORDEREDLIST- Command: insert an unordered list. + INSERT_ORDEREDLIST - Command: insert an ordered list. + MAIN_CONTAINERS - An array of the main HTML containers used in WYMeditor. + BLOCKS - An array of the HTML block elements. + KEY - Standard key codes. + NODE - Node types. - var WYM_BLOCKS = new Array("address", "blockquote", "div", "dl", +*/ + + VERSION : "0.5-a1", + INSTANCES : [], + STRINGS : [], + SKINS : [], + NAME : "name", + INDEX : "{Wym_Index}", + BASE_PATH : "{Wym_Base_Path}", + CSS_PATH : "{Wym_Css_Path}", + WYM_PATH : "{Wym_Wym_Path}", + SKINS_DEFAULT_PATH : "skins/", + SKINS_DEFAULT_CSS : "skin.css", + SKINS_DEFAULT_JS : "skin.js", + LANG_DEFAULT_PATH : "lang/", + IFRAME_BASE_PATH : "{Wym_Iframe_Base_Path}", + IFRAME_DEFAULT : "iframe/default/", + JQUERY_PATH : "{Wym_Jquery_Path}", + TOOLS : "{Wym_Tools}", + TOOLS_ITEMS : "{Wym_Tools_Items}", + TOOL_NAME : "{Wym_Tool_Name}", + TOOL_TITLE : "{Wym_Tool_Title}", + TOOL_CLASS : "{Wym_Tool_Class}", + CLASSES : "{Wym_Classes}", + CLASSES_ITEMS : "{Wym_Classes_Items}", + CLASS_NAME : "{Wym_Class_Name}", + CLASS_TITLE : "{Wym_Class_Title}", + CONTAINERS : "{Wym_Containers}", + CONTAINERS_ITEMS : "{Wym_Containers_Items}", + CONTAINER_NAME : "{Wym_Container_Name}", + CONTAINER_TITLE : "{Wym_Containers_Title}", + CONTAINER_CLASS : "{Wym_Container_Class}", + HTML : "{Wym_Html}", + IFRAME : "{Wym_Iframe}", + STATUS : "{Wym_Status}", + DIALOG_TITLE : "{Wym_Dialog_Title}", + DIALOG_BODY : "{Wym_Dialog_Body}", + STRING : "string", + BODY : "body", + P : "p", + H1 : "h1", + H2 : "h2", + H3 : "h3", + H4 : "h4", + H5 : "h5", + H6 : "h6", + PRE : "pre", + BLOCKQUOTE : "blockquote", + A : "a", + BR : "br", + IMG : "img", + TABLE : "table", + TD : "td", + TH : "th", + UL : "ul", + OL : "ol", + LI : "li", + CLASS : "class", + HREF : "href", + SRC : "src", + TITLE : "title", + ALT : "alt", + DIALOG_LINK : "Link", + DIALOG_IMAGE : "Image", + DIALOG_TABLE : "Table", + DIALOG_PASTE : "Paste_From_Word", + BOLD : "Bold", + ITALIC : "Italic", + CREATE_LINK : "CreateLink", + INSERT_IMAGE : "InsertImage", + INSERT_TABLE : "InsertTable", + PASTE : "Paste", + INDENT : "Indent", + OUTDENT : "Outdent", + TOGGLE_HTML : "ToggleHtml", + FORMAT_BLOCK : "FormatBlock", + PREVIEW : "Preview", + + UNLINK : "Unlink", + INSERT_UNORDEREDLIST : "InsertUnorderedList", + INSERT_ORDEREDLIST : "InsertOrderedList", + + MAIN_CONTAINERS : new Array("p","h1","h2","h3","h4","h5","h6","pre","blockquote"), + + BLOCKS : new Array("address", "blockquote", "div", "dl", "fieldset", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "noscript", "ol", "p", "pre", "table", "ul", "dd", "dt", - "li", "tbody", "td", "tfoot", "th", "thead", "tr"); + "li", "tbody", "td", "tfoot", "th", "thead", "tr"), - var WYM_KEY = { + KEY : { BACKSPACE: 8, ENTER: 13, END: 35, @@ -162,15 +199,83 @@ DOWN: 40, CURSOR: new Array(37, 38, 39, 40), DELETE: 46 - }; + }, - var WYM_NODE = { + NODE : { ELEMENT: 1, ATTRIBUTE: 2, TEXT: 3 - }; + }, + + /* + Class: WYMeditor.editor + WYMeditor editor main class, instanciated for each editor occurrence. + */ + editor : function(elem, options) { + /* + Constructor: WYMeditor.editor + + Initializes main values (index, elements, paths, ...) + and call WYMeditor.editor.init which initializes the editor. + + Parameters: + + elem - The HTML element to be replaced by the editor. + options - The hash of options. + + Returns: + + Nothing. + + See Also: + + + */ + + //store the instance in the INSTANCES array and store the index + this._index = WYMeditor.INSTANCES.push(this) - 1; + //store the element replaced by the editor + this._element = elem; + //store the options + this._options = options; + //store the element's inner value + this._html = jQuery(elem).val(); + + //store the HTML option, if any + if(this._options.html) this._html = this._options.html; + //get or compute the base path (where the main JS file is located) + this._options.basePath = this._options.basePath + || this.computeBasePath(); + //get or set the skin path (where the skin files are located) + this._options.skinPath = this._options.skinPath + || this._options.basePath + WYMeditor.SKINS_DEFAULT_PATH + + this._options.skin + '/'; + //get or compute the main JS file location + this._options.wymPath = this._options.wymPath + || this.computeWymPath(); + //get or set the language files path + this._options.langPath = this._options.langPath + || this._options.basePath + WYMeditor.LANG_DEFAULT_PATH; + //get or set the designmode iframe's base path + this._options.iframeBasePath = this._options.iframeBasePath + || this._options.basePath + WYMeditor.IFRAME_DEFAULT; + //get or compute the jQuery JS file location + this._options.jQueryPath = this._options.jQueryPath + || this.computeJqueryPath(); + + //instanciate a WYMeditor Selection API class + this.selection = new WYMeditor.WymSelection(); + + //initialize the editor instance + this.init(); + + } + +}); + + /********** JQUERY **********/ /** @@ -201,37 +306,37 @@ basePath: false, - cssPath: false, + skinPath: false, wymPath: false, iframeBasePath: false, jQueryPath: false, - xhtmlParser: 'xhtml_parser.pack.js', - - cssParser: 'wym_css_parser.pack.js', - styles: false, stylesheet: false, + skin: "default", + initSkin: true, + loadSkin: true, + lang: "en", boxHtml: "
" + "
" - + WYM_TOOLS + + WYMeditor.TOOLS + "
" + "
" + "
" - + WYM_CONTAINERS - + WYM_CLASSES + + WYMeditor.CONTAINERS + + WYMeditor.CLASSES + "
" + "
" - + WYM_HTML - + WYM_IFRAME - + WYM_STATUS + + WYMeditor.HTML + + WYMeditor.IFRAME + + WYMeditor.STATUS + "
" + "", @@ -254,18 +359,18 @@ toolsHtml: "
" + "

{Tools}

" + "
    " - + WYM_TOOLS_ITEMS + + WYMeditor.TOOLS_ITEMS + "
" + "
", toolsItemHtml: "
  • " - + WYM_TOOL_TITLE + + WYMeditor.TOOL_TITLE + "
  • ", toolsItems: [ @@ -296,17 +401,17 @@ containersHtml: "
    " + "

    {Containers}

    " + "
      " - + WYM_CONTAINERS_ITEMS + + WYMeditor.CONTAINERS_ITEMS + "
    " + "
    ", containersItemHtml:"
  • " + "" - + WYM_CONTAINER_TITLE + + WYMeditor.CONTAINER_TITLE + "
  • ", containersItems: [ @@ -325,13 +430,13 @@ classesHtml: "
    " + "

    {Classes}

      " - + WYM_CLASSES_ITEMS + + WYMeditor.CLASSES_ITEMS + "
    ", classesItemHtml: "
  • " - + WYM_CLASS_TITLE + + WYMeditor.CLASS_TITLE + "
  • ", classesItems: [], @@ -390,30 +495,30 @@ + "" + "" + "" - + WYM_DIALOG_TITLE + + WYMeditor.DIALOG_TITLE + "" + "" + "" + "" - + WYM_DIALOG_BODY + + WYMeditor.DIALOG_BODY + "", dialogLinkHtml: "" + "
    " + "
    " + "" + "{Link}" + "
    " @@ -435,12 +540,12 @@ + "", dialogImageHtml: "" + "" + "
    " + "" + "{Image}" + "
    " @@ -466,12 +571,12 @@ + "", dialogTableHtml: "" + "" + "
    " + "" + "{Table}" + "
    " @@ -497,11 +602,11 @@ + "", dialogPasteHtml: "" + "" + "" + "
    " + "{Paste_From_Word}" @@ -519,12 +624,10 @@ + "", dialogPreviewHtml: "", dialogStyles: [], - - skin: WYM_DEFAULT_SKIN, stringDelimiterLeft: "{", stringDelimiterRight:"}", @@ -540,7 +643,7 @@ return this.each(function() { - new Wymeditor(jQuery(this),options); + new WYMeditor.editor(jQuery(this),options); }); }; @@ -549,98 +652,81 @@ */ jQuery.extend({ wymeditors: function(i) { - return (WYM_INSTANCES[i]); + return (WYMeditor.INSTANCES[i]); }, - wymstrings: function(lang, sKey) { - return (WYM_STRINGS[lang][sKey]); + wymstrings: function(sKey) { + return (WYMeditor.STRINGS[sKey]); } }); -/********** WYMEDITOR **********/ +/********** WYMeditor **********/ /* @name Wymeditor * @description WYMeditor class */ -function Wymeditor(elem,options) { - this._index = WYM_INSTANCES.push(this) - 1; - this._element = elem; - this._options = options; - this._html = jQuery(elem).val(); - - if(this._options.html) this._html = this._options.html; - this._options.basePath = this._options.basePath - || this.computeBasePath(); - this._options.cssPath = this._options.cssPath - || this.computeCssPath(); - this._options.wymPath = this._options.wymPath - || this.computeWymPath(); - this._options.iframeBasePath = this._options.iframeBasePath - || this._options.basePath + WYM_IFRAME_DEFAULT; - this._options.jQueryPath = this._options.jQueryPath - || this.computeJqueryPath(); - - this.init(); - -}; - /* @name init * @description Initializes a WYMeditor instance */ -Wymeditor.prototype.init = function() { +WYMeditor.editor.prototype.init = function() { //load subclass - browser specific //unsupported browsers: do nothing if (jQuery.browser.msie) { - var WymClass = new WymClassExplorer(this); + var WymClass = new WYMeditor.WymClassExplorer(this); + var WymSel = new WYMeditor.WymSelExplorer(this); } else if (jQuery.browser.mozilla) { - var WymClass = new WymClassMozilla(this); + var WymClass = new WYMeditor.WymClassMozilla(this); + var WymSel = new WYMeditor.WymSelMozilla(this); } else if (jQuery.browser.opera) { - var WymClass = new WymClassOpera(this); + var WymClass = new WYMeditor.WymClassOpera(this); + var WymSel = new WYMeditor.WymSelOpera(this); } else if (jQuery.browser.safari) { - //commented until supported - //var WymClass = new WymClassSafari(this); + var WymClass = new WYMeditor.WymClassSafari(this); + var WymSel = new WYMeditor.WymSelSafari(this); } if(WymClass) { if(jQuery.isFunction(this._options.preInit)) this._options.preInit(this); - - this.loadXhtmlParser(WymClass); + + var SaxListener = new WYMeditor.XhtmlSaxListener(); + jQuery.extend(SaxListener, WymClass); + this.parser = new WYMeditor.XhtmlParser(SaxListener); if(this._options.styles || this._options.stylesheet){ this.configureEditorUsingRawCss(); } - this.helper = new XmlHelper(); + this.helper = new WYMeditor.XmlHelper(); //extend the Wymeditor object //don't use jQuery.extend since 1.1.4 //jQuery.extend(this, WymClass); - for (prop in WymClass) { this[prop] = WymClass[prop]; } + for (var prop in WymClass) { this[prop] = WymClass[prop]; } //load wymbox this._box = jQuery(this._element).hide().after(this._options.boxHtml).next(); //construct the iframe var iframeHtml = this._options.iframeHtml; iframeHtml = iframeHtml - .replaceAll(WYM_INDEX,this._index) - .replaceAll(WYM_IFRAME_BASE_PATH, this._options.iframeBasePath); + .replaceAll(WYMeditor.INDEX,this._index) + .replaceAll(WYMeditor.IFRAME_BASE_PATH, this._options.iframeBasePath); //construct wymbox var boxHtml = jQuery(this._box).html(); - boxHtml = boxHtml.replaceAll(WYM_TOOLS, this._options.toolsHtml); - boxHtml = boxHtml.replaceAll(WYM_CONTAINERS,this._options.containersHtml); - boxHtml = boxHtml.replaceAll(WYM_CLASSES, this._options.classesHtml); - boxHtml = boxHtml.replaceAll(WYM_HTML, this._options.htmlHtml); - boxHtml = boxHtml.replaceAll(WYM_IFRAME, iframeHtml); - boxHtml = boxHtml.replaceAll(WYM_STATUS, this._options.statusHtml); + boxHtml = boxHtml.replaceAll(WYMeditor.TOOLS, this._options.toolsHtml); + boxHtml = boxHtml.replaceAll(WYMeditor.CONTAINERS,this._options.containersHtml); + boxHtml = boxHtml.replaceAll(WYMeditor.CLASSES, this._options.classesHtml); + boxHtml = boxHtml.replaceAll(WYMeditor.HTML, this._options.htmlHtml); + boxHtml = boxHtml.replaceAll(WYMeditor.IFRAME, iframeHtml); + boxHtml = boxHtml.replaceAll(WYMeditor.STATUS, this._options.statusHtml); //construct tools list var aTools = eval(this._options.toolsItems); @@ -650,15 +736,15 @@ var oTool = aTools[i]; if(oTool.name && oTool.title) sTools += this._options.toolsItemHtml - .replaceAll(WYM_TOOL_NAME, oTool.name) - .replaceAll(WYM_TOOL_TITLE, + .replaceAll(WYMeditor.TOOL_NAME, oTool.name) + .replaceAll(WYMeditor.TOOL_TITLE, this._options.stringDelimiterLeft + oTool.title + this._options.stringDelimiterRight) - .replaceAll(WYM_TOOL_CLASS, oTool.css); + .replaceAll(WYMeditor.TOOL_CLASS, oTool.css); } - boxHtml = boxHtml.replaceAll(WYM_TOOLS_ITEMS, sTools); + boxHtml = boxHtml.replaceAll(WYMeditor.TOOLS_ITEMS, sTools); //construct classes list var aClasses = eval(this._options.classesItems); @@ -668,11 +754,11 @@ var oClass = aClasses[i]; if(oClass.name && oClass.title) sClasses += this._options.classesItemHtml - .replaceAll(WYM_CLASS_NAME, oClass.name) - .replaceAll(WYM_CLASS_TITLE, oClass.title); + .replaceAll(WYMeditor.CLASS_NAME, oClass.name) + .replaceAll(WYMeditor.CLASS_TITLE, oClass.title); } - boxHtml = boxHtml.replaceAll(WYM_CLASSES_ITEMS, sClasses); + boxHtml = boxHtml.replaceAll(WYMeditor.CLASSES_ITEMS, sClasses); //construct containers list var aContainers = eval(this._options.containersItems); @@ -682,15 +768,15 @@ var oContainer = aContainers[i]; if(oContainer.name && oContainer.title) sContainers += this._options.containersItemHtml - .replaceAll(WYM_CONTAINER_NAME, oContainer.name) - .replaceAll(WYM_CONTAINER_TITLE, + .replaceAll(WYMeditor.CONTAINER_NAME, oContainer.name) + .replaceAll(WYMeditor.CONTAINER_TITLE, this._options.stringDelimiterLeft + oContainer.title + this._options.stringDelimiterRight) - .replaceAll(WYM_CONTAINER_CLASS, oContainer.css); + .replaceAll(WYMeditor.CONTAINER_CLASS, oContainer.css); } - boxHtml = boxHtml.replaceAll(WYM_CONTAINERS_ITEMS, sContainers); + boxHtml = boxHtml.replaceAll(WYMeditor.CONTAINERS_ITEMS, sContainers); //l10n boxHtml = this.replaceStrings(boxHtml); @@ -702,25 +788,33 @@ jQuery(this._box).find(this._options.htmlSelector).hide(); //enable the skin - this.skin(); + this.loadSkin(); } + + if(WymSel) { + + //extend the selection object + //don't use jQuery.extend since 1.1.4 + //jQuery.extend(this.selection, WymSel); + for (prop in WymSel) { this.selection[prop] = WymSel[prop]; } + } }; -Wymeditor.prototype.bindEvents = function() { +WYMeditor.editor.prototype.bindEvents = function() { //copy the instance var wym = this; //handle click event on tools buttons jQuery(this._box).find(this._options.toolSelector).click(function() { - wym.exec(jQuery(this).attr(WYM_NAME)); + wym.exec(jQuery(this).attr(WYMeditor.NAME)); return(false); }); //handle click event on containers buttons jQuery(this._box).find(this._options.containerSelector).click(function() { - wym.container(jQuery(this).attr(WYM_NAME)); + wym.container(jQuery(this).attr(WYMeditor.NAME)); return(false); }); @@ -733,12 +827,12 @@ jQuery(this._box).find(this._options.classSelector).click(function() { var aClasses = eval(wym._options.classesItems); - var sName = jQuery(this).attr(WYM_NAME); + var sName = jQuery(this).attr(WYMeditor.NAME); var oClass = aClasses.findByName(sName); if(oClass) { - jqexpr = oClass.expr; + var jqexpr = oClass.expr; wym.toggleClass(sName, jqexpr); } return(false); @@ -751,7 +845,7 @@ }); }; -Wymeditor.prototype.ready = function() { +WYMeditor.editor.prototype.ready = function() { return(this._doc != null); }; @@ -761,14 +855,14 @@ /* @name box * @description Returns the WYMeditor container */ -Wymeditor.prototype.box = function() { +WYMeditor.editor.prototype.box = function() { return(this._box); }; /* @name html * @description Get/Set the html value */ -Wymeditor.prototype.html = function(html) { +WYMeditor.editor.prototype.html = function(html) { if(html) jQuery(this._doc.body).html(html); else return(jQuery(this._doc.body).html()); @@ -777,42 +871,42 @@ /* @name xhtml * @description Cleans up the HTML */ -Wymeditor.prototype.xhtml = function() { +WYMeditor.editor.prototype.xhtml = function() { return this.parser.parse(this.html()); }; /* @name exec * @description Executes a button command */ -Wymeditor.prototype.exec = function(cmd) { +WYMeditor.editor.prototype.exec = function(cmd) { //base function for execCommand //open a dialog or exec switch(cmd) { - case WYM_CREATE_LINK: + case WYMeditor.CREATE_LINK: var container = this.container(); - if(container || this._selected_image) this.dialog(WYM_DIALOG_LINK); + if(container || this._selected_image) this.dialog(WYMeditor.DIALOG_LINK); break; - case WYM_INSERT_IMAGE: - this.dialog(WYM_DIALOG_IMAGE); + case WYMeditor.INSERT_IMAGE: + this.dialog(WYMeditor.DIALOG_IMAGE); break; - case WYM_INSERT_TABLE: - this.dialog(WYM_DIALOG_TABLE); + case WYMeditor.INSERT_TABLE: + this.dialog(WYMeditor.DIALOG_TABLE); break; - case WYM_PASTE: - this.dialog(WYM_DIALOG_PASTE); + case WYMeditor.PASTE: + this.dialog(WYMeditor.DIALOG_PASTE); break; - case WYM_TOGGLE_HTML: + case WYMeditor.TOGGLE_HTML: this.update(); this.toggleHtml(); break; - case WYM_PREVIEW: - this.dialog(WYM_PREVIEW); + case WYMeditor.PREVIEW: + this.dialog(WYMeditor.PREVIEW); break; default: @@ -824,49 +918,49 @@ /* @name container * @description Get/Set the selected container */ -Wymeditor.prototype.container = function(sType) { +WYMeditor.editor.prototype.container = function(sType) { if(sType) { var container = null; - if(sType.toLowerCase() == WYM_TH) { + if(sType.toLowerCase() == WYMeditor.TH) { container = this.container(); //find the TD or TH container switch(container.tagName.toLowerCase()) { - case WYM_TD: case WYM_TH: + case WYMeditor.TD: case WYMeditor.TH: break; default: - var aTypes = new Array(WYM_TD,WYM_TH); + var aTypes = new Array(WYMeditor.TD,WYMeditor.TH); container = this.findUp(this.container(), aTypes); break; } //if it exists, switch if(container!=null) { - sType = (container.tagName.toLowerCase() == WYM_TD)? WYM_TH: WYM_TD; + sType = (container.tagName.toLowerCase() == WYMeditor.TD)? WYMeditor.TH: WYMeditor.TD; this.switchTo(container,sType); this.update(); } } else { //set the container type - var aTypes=new Array(WYM_P,WYM_H1,WYM_H2,WYM_H3,WYM_H4,WYM_H5, - WYM_H6,WYM_PRE,WYM_BLOCKQUOTE); + var aTypes=new Array(WYMeditor.P,WYMeditor.H1,WYMeditor.H2,WYMeditor.H3,WYMeditor.H4,WYMeditor.H5, + WYMeditor.H6,WYMeditor.PRE,WYMeditor.BLOCKQUOTE); container = this.findUp(this.container(), aTypes); if(container) { var newNode = null; //blockquotes must contain a block level element - if(sType.toLowerCase() == WYM_BLOCKQUOTE) { + if(sType.toLowerCase() == WYMeditor.BLOCKQUOTE) { - var blockquote = this.findUp(this.container(), WYM_BLOCKQUOTE); + var blockquote = this.findUp(this.container(), WYMeditor.BLOCKQUOTE); if(blockquote == null) { @@ -902,32 +996,32 @@ /* @name toggleClass * @description Toggles class on selected element, or one of its parents */ -Wymeditor.prototype.toggleClass = function(sClass, jqexpr) { +WYMeditor.editor.prototype.toggleClass = function(sClass, jqexpr) { var container = (this._selected_image ? this._selected_image : jQuery(this.selected())); container = jQuery(container).parentsOrSelf(jqexpr); jQuery(container).toggleClass(sClass); - if(!jQuery(container).attr(WYM_CLASS)) jQuery(container).removeAttr(this._class); + if(!jQuery(container).attr(WYMeditor.CLASS)) jQuery(container).removeAttr(this._class); }; /* @name findUp * @description Returns the first parent or self container, based on its type */ -Wymeditor.prototype.findUp = function(node, filter) { +WYMeditor.editor.prototype.findUp = function(node, filter) { //filter is a string or an array of strings if(node) { var tagname = node.tagName.toLowerCase(); - if(typeof(filter) == WYM_STRING) { + if(typeof(filter) == WYMeditor.STRING) { - while(tagname != filter && tagname != WYM_BODY) { + while(tagname != filter && tagname != WYMeditor.BODY) { node = node.parentNode; tagname = node.tagName.toLowerCase(); @@ -937,7 +1031,7 @@ var bFound = false; - while(!bFound && tagname != WYM_BODY) { + while(!bFound && tagname != WYMeditor.BODY) { for(var i = 0; i < filter.length; i++) { if(tagname == filter[i]) { bFound = true; @@ -951,7 +1045,7 @@ } } - if(tagname != WYM_BODY) return(node); + if(tagname != WYMeditor.BODY) return(node); else return(null); } else return(null); @@ -960,7 +1054,7 @@ /* @name switchTo * @description Switch the node's type */ -Wymeditor.prototype.switchTo = function(node,sType) { +WYMeditor.editor.prototype.switchTo = function(node,sType) { var newNode = this._doc.createElement(sType); var html = jQuery(node).html(); @@ -969,16 +1063,23 @@ this.setFocusToNode(newNode); }; -Wymeditor.prototype.replaceStrings = function(sVal) { +WYMeditor.editor.prototype.replaceStrings = function(sVal) { + //check if the language file has already been loaded + //if not, get it via a synchronous ajax call + if(!WYMeditor.STRINGS[this._options.lang]) + eval(jQuery.ajax({url:this._options.langPath + + this._options.lang + '.js', async:false}).responseText); - for (var key in WYM_STRINGS[this._options.lang]) { + //replace all the strings in sVal and return it + for (var key in WYMeditor.STRINGS[this._options.lang]) { sVal = sVal.replaceAll(this._options.stringDelimiterLeft + key - + this._options.stringDelimiterRight, WYM_STRINGS[this._options.lang][key]); - } + + this._options.stringDelimiterRight, + WYMeditor.STRINGS[this._options.lang][key]); + }; return(sVal); }; -Wymeditor.prototype.encloseString = function(sVal) { +WYMeditor.editor.prototype.encloseString = function(sVal) { return(this._options.stringDelimiterLeft + sVal @@ -988,7 +1089,7 @@ /* @name status * @description Prints a status message */ -Wymeditor.prototype.status = function(sMessage) { +WYMeditor.editor.prototype.status = function(sMessage) { //print status message jQuery(this._box).find(this._options.statusSelector).html(sMessage); @@ -997,7 +1098,7 @@ /* @name update * @description Updates the element and textarea values */ -Wymeditor.prototype.update = function() { +WYMeditor.editor.prototype.update = function() { var html = this.xhtml(); jQuery(this._element).val(html); @@ -1007,7 +1108,7 @@ /* @name dialog * @description Opens a dialog box */ -Wymeditor.prototype.dialog = function(sType) { +WYMeditor.editor.prototype.dialog = function(sType) { var wDialog = window.open( '', @@ -1020,33 +1121,34 @@ switch(sType) { - case(WYM_DIALOG_LINK): + case(WYMeditor.DIALOG_LINK): sBodyHtml = this._options.dialogLinkHtml; break; - case(WYM_DIALOG_IMAGE): + case(WYMeditor.DIALOG_IMAGE): sBodyHtml = this._options.dialogImageHtml; break; - case(WYM_DIALOG_TABLE): + case(WYMeditor.DIALOG_TABLE): sBodyHtml = this._options.dialogTableHtml; break; - case(WYM_DIALOG_PASTE): + case(WYMeditor.DIALOG_PASTE): sBodyHtml = this._options.dialogPasteHtml; break; - case(WYM_PREVIEW): + case(WYMeditor.PREVIEW): sBodyHtml = this._options.dialogPreviewHtml; break; } //construct the dialog var dialogHtml = this._options.dialogHtml; dialogHtml = dialogHtml - .replaceAll(WYM_BASE_PATH, this._options.basePath) - .replaceAll(WYM_CSS_PATH, this._options.cssPath) - .replaceAll(WYM_WYM_PATH, this._options.wymPath) - .replaceAll(WYM_JQUERY_PATH, this._options.jQueryPath) - .replaceAll(WYM_DIALOG_TITLE, this.encloseString(sType)) - .replaceAll(WYM_DIALOG_BODY, sBodyHtml) - .replaceAll(WYM_INDEX, this._index); + .replaceAll(WYMeditor.BASE_PATH, this._options.basePath) + .replaceAll(WYMeditor.CSS_PATH, this._options.skinPath + + WYMeditor.SKINS_DEFAULT_CSS) + .replaceAll(WYMeditor.WYM_PATH, this._options.wymPath) + .replaceAll(WYMeditor.JQUERY_PATH, this._options.jQueryPath) + .replaceAll(WYMeditor.DIALOG_TITLE, this.encloseString(sType)) + .replaceAll(WYMeditor.DIALOG_BODY, sBodyHtml) + .replaceAll(WYMeditor.INDEX, this._index); dialogHtml = this.replaceStrings(dialogHtml); @@ -1059,16 +1161,16 @@ /* @name toggleHtml * @description Shows/Hides the HTML */ -Wymeditor.prototype.toggleHtml = function() { +WYMeditor.editor.prototype.toggleHtml = function() { jQuery(this._box).find(this._options.htmlSelector).toggle(); }; -Wymeditor.prototype.uniqueStamp = function() { - var now=new Date(); +WYMeditor.editor.prototype.uniqueStamp = function() { + var now = new Date(); return("wym-" + now.getTime()); }; -Wymeditor.prototype.paste = function(sData) { +WYMeditor.editor.prototype.paste = function(sData) { var sTmp; var container = this.selected(); @@ -1078,7 +1180,7 @@ var rExp = new RegExp(this._newLine, "g"); //add a P for each item - if(container && container.tagName.toLowerCase() != WYM_BODY) { + if(container && container.tagName.toLowerCase() != WYMeditor.BODY) { for(x = aP.length - 1; x >= 0; x--) { sTmp = aP[x]; //simple newlines are replaced by a break @@ -1096,7 +1198,7 @@ } }; -Wymeditor.prototype.addCssRules = function(doc, aCss) { +WYMeditor.editor.prototype.addCssRules = function(doc, aCss) { var styles = doc.styleSheets[0]; if(styles) { for(var i = 0; i < aCss.length; i++) { @@ -1108,58 +1210,33 @@ /********** CONFIGURATION **********/ -Wymeditor.prototype.computeBasePath = function() { +WYMeditor.editor.prototype.computeBasePath = function() { return jQuery(jQuery.grep(jQuery('script'), function(s){ return (s.src && s.src.match(/jquery\.wymeditor(\.pack){0,1}\.js(\?.*)?$/ )) })).attr('src').replace(/jquery\.wymeditor(\.pack){0,1}\.js(\?.*)?$/, ''); }; -Wymeditor.prototype.computeWymPath = function() { +WYMeditor.editor.prototype.computeWymPath = function() { return jQuery(jQuery.grep(jQuery('script'), function(s){ return (s.src && s.src.match(/jquery\.wymeditor(\.pack){0,1}\.js(\?.*)?$/ )) })).attr('src'); }; -Wymeditor.prototype.computeJqueryPath = function() { +WYMeditor.editor.prototype.computeJqueryPath = function() { return jQuery(jQuery.grep(jQuery('script'), function(s){ return (s.src && s.src.match(/jquery(-(.*)){0,1}(\.pack){0,1}\.js(\?.*)?$/ )) })).attr('src'); }; -Wymeditor.prototype.computeCssPath = function() { +WYMeditor.editor.prototype.computeCssPath = function() { return jQuery(jQuery.grep(jQuery('link'), function(s){ return (s.href && s.href.match(/wymeditor\/skins\/(.*)screen\.css(\?.*)?$/ )) })).attr('href'); }; -Wymeditor.prototype.loadXhtmlParser = function(WymClass) { - if(typeof XhtmlSaxListener != 'function'){ - // This is the only way to get loaded functions in the global scope until jQuery.globalEval works in safari - eval(jQuery.ajax({url:this._options.basePath - + this._options.xhtmlParser, async:false}).responseText); - window.XmlHelper = XmlHelper; - window.XhtmlValidator = XhtmlValidator; - window.ParallelRegex = ParallelRegex; - window.StateStack = StateStack; - window.Lexer = Lexer; - window.XhtmlLexer = XhtmlLexer; - window.XhtmlParser = XhtmlParser; - window.XhtmlSaxListener = XhtmlSaxListener; - - } - var SaxListener = new XhtmlSaxListener(); - jQuery.extend(SaxListener, WymClass); - this.parser = new XhtmlParser(SaxListener); -}; +WYMeditor.editor.prototype.configureEditorUsingRawCss = function() { -Wymeditor.prototype.configureEditorUsingRawCss = function() { - if(typeof WymCssParser != 'function'){ - eval(jQuery.ajax({url:this._options.basePath - + this._options.cssParser, async:false}).responseText); - window.WymCssLexer = WymCssLexer; - window.WymCssParser = WymCssParser; - } - var CssParser = new WymCssParser(); + var CssParser = new WYMeditor.WymCssParser(); if(this._options.stylesheet){ CssParser.parse(jQuery.ajax({url: this._options.stylesheet,async:false}).responseText); }else{ @@ -1179,7 +1256,7 @@ /********** EVENTS **********/ -Wymeditor.prototype.listen = function() { +WYMeditor.editor.prototype.listen = function() { //don't use jQuery.find() on the iframe body //because of MSIE + jQuery + expando issue (#JQ1143) @@ -1193,448 +1270,3105 @@ }; //mouseup handler -Wymeditor.prototype.mouseup = function(evt) { +WYMeditor.editor.prototype.mouseup = function(evt) { - var wym = WYM_INSTANCES[this.ownerDocument.title]; - if(this.tagName.toLowerCase() == WYM_IMG) wym._selected_image = this; + var wym = WYMeditor.INSTANCES[this.ownerDocument.title]; + if(this.tagName.toLowerCase() == WYMeditor.IMG) wym._selected_image = this; else wym._selected_image = null; evt.stopPropagation(); }; /********** SKINS **********/ -Wymeditor.prototype.skin = function() { - - switch(this._options.skin) { - - case WYM_DEFAULT_SKIN: +/* + * Function: WYMeditor.loadCss + * Loads a stylesheet in the document. + * + * Parameters: + * href - The CSS path. + */ +WYMeditor.loadCss = function(href) { - jQuery(this._box).addClass("wym_skin_default"); - - //render following sections as panels - jQuery(this._box).find(this._options.classesSelector) - .addClass("wym_panel"); + var link = document.createElement('link'); + link.rel = 'stylesheet'; + link.href = href; - //render following sections as buttons - jQuery(this._box).find(this._options.toolsSelector) - .addClass("wym_buttons"); + var head = jQuery('head').get(0); + head.appendChild(link); +}; - //render following sections as dropdown menus - jQuery(this._box).find(this._options.containersSelector) - .addClass("wym_dropdown") - .find(WYM_H2) - .append(" >"); +/* + * Function: WYMeditor.editor.loadSkin + * Loads the skin CSS and initialization script (if needed). + */ +WYMeditor.editor.prototype.loadSkin = function() { - // auto add some margin to the main area sides if left area - // or right area are not empty (if they contain sections) - jQuery(this._box).find("div.wym_area_right ul") - .parents("div.wym_area_right").show() - .parents(this._options.boxSelector) - .find("div.wym_area_main") - .css({"margin-right": "155px"}); + //does the user want to automatically load the CSS (default: yes)? + //we also test if it hasn't been already loaded by another instance + //see below for a better (second) test + if(this._options.loadSkin && !WYMeditor.SKINS[this._options.skin]) { - jQuery(this._box).find("div.wym_area_left ul") - .parents("div.wym_area_left").show() - .parents(this._options.boxSelector) - .find("div.wym_area_main") - .css({"margin-left": "155px"}); + //check if it hasn't been already loaded + //so we don't load it more than once + //(we check the existing elements) - //make hover work under IE < 7 - jQuery(this._box).find(".wym_section").hover(function(){ - jQuery(this).addClass("hover"); - },function(){ - jQuery(this).removeClass("hover"); - }); - - break; - - } + var found = false; + var rExp = new RegExp(this._options.skin + + '\/' + WYMeditor.SKINS_DEFAULT_CSS + '$'); + jQuery('link').each( function() { + if(this.href.match(rExp)) found = true; + }); + + //load it, using the skin path + if(!found) WYMeditor.loadCss( this._options.skinPath + + WYMeditor.SKINS_DEFAULT_CSS ); + } + + //put the classname (ex. wym_skin_default) on wym_box + jQuery(this._box).addClass( "wym_skin_" + this._options.skin ); + + //does the user want to use some JS to initialize the skin (default: yes)? + //also check if it hasn't already been loaded by another instance + if(this._options.initSkin && !WYMeditor.SKINS[this._options.skin]) { + + eval(jQuery.ajax({url:this._options.skinPath + + WYMeditor.SKINS_DEFAULT_JS, async:false}).responseText); + } + + //init the skin, if needed + if(WYMeditor.SKINS[this._options.skin] + && WYMeditor.SKINS[this._options.skin].init) + WYMeditor.SKINS[this._options.skin].init(this); + }; + /********** DIALOGS **********/ -function WYM_INIT_DIALOG(index) { +WYMeditor.INIT_DIALOG = function(index) { - var wym = window.opener.WYM_INSTANCES[index]; - var doc = window.document; - var selected = wym.selected(); - var dialogType = jQuery(wym._options.dialogTypeSelector).val(); - var sStamp = wym.uniqueStamp(); - - switch(dialogType) { - - case WYM_DIALOG_LINK: - //ensure that we select the link to populate the fields - if(selected && selected.tagName && selected.tagName.toLowerCase != WYM_A) - selected = jQuery(selected).parentsOrSelf(WYM_A); - - //fix MSIE selection if link image has been clicked - if(!selected && wym._selected_image) - selected = jQuery(wym._selected_image).parentsOrSelf(WYM_A); - break; + var wym = window.opener.WYMeditor.INSTANCES[index]; + var doc = window.document; + var selected = wym.selected(); + var dialogType = jQuery(wym._options.dialogTypeSelector).val(); + var sStamp = wym.uniqueStamp(); - } - - //pre-init functions - if(jQuery.isFunction(wym._options.preInitDialog)) - wym._options.preInitDialog(wym,window); - - //add css rules from options - var styles = doc.styleSheets[0]; - var aCss = eval(wym._options.dialogStyles); + switch(dialogType) { - wym.addCssRules(doc, aCss); - - //auto populate fields if selected container (e.g. A) - if(selected) { - jQuery(wym._options.hrefSelector).val(jQuery(selected).attr(WYM_HREF)); - jQuery(wym._options.srcSelector).val(jQuery(selected).attr(WYM_SRC)); - jQuery(wym._options.titleSelector).val(jQuery(selected).attr(WYM_TITLE)); - jQuery(wym._options.altSelector).val(jQuery(selected).attr(WYM_ALT)); - } - - //auto populate image fields if selected image - if(wym._selected_image) { - jQuery(wym._options.dialogImageSelector + " " + wym._options.srcSelector) - .val(jQuery(wym._selected_image).attr(WYM_SRC)); - jQuery(wym._options.dialogImageSelector + " " + wym._options.titleSelector) - .val(jQuery(wym._selected_image).attr(WYM_TITLE)); - jQuery(wym._options.dialogImageSelector + " " + wym._options.altSelector) - .val(jQuery(wym._selected_image).attr(WYM_ALT)); - } + case WYMeditor.DIALOG_LINK: + //ensure that we select the link to populate the fields + if(selected && selected.tagName && selected.tagName.toLowerCase != WYMeditor.A) + selected = jQuery(selected).parentsOrSelf(WYMeditor.A); - jQuery(wym._options.dialogLinkSelector + " " - + wym._options.submitSelector).click(function() { - - var sUrl = jQuery(wym._options.hrefSelector).val(); - if(sUrl.length > 0) { - wym._exec(WYM_CREATE_LINK, sStamp); - //don't use jQuery.find() see #JQ1143 - //var link = jQuery(wym._doc.body).find("a[@href=" + sStamp + "]"); - var link = null; - var nodes = wym._doc.body.getElementsByTagName(WYM_A); - for(var i=0; i < nodes.length; i++) { - if(jQuery(nodes[i]).attr(WYM_HREF) == sStamp) { - link = jQuery(nodes[i]); - break; - } + //fix MSIE selection if link image has been clicked + if(!selected && wym._selected_image) + selected = jQuery(wym._selected_image).parentsOrSelf(WYMeditor.A); + break; + + } + + //pre-init functions + if(jQuery.isFunction(wym._options.preInitDialog)) + wym._options.preInitDialog(wym,window); + + //add css rules from options + var styles = doc.styleSheets[0]; + var aCss = eval(wym._options.dialogStyles); + + wym.addCssRules(doc, aCss); + + //auto populate fields if selected container (e.g. A) + if(selected) { + jQuery(wym._options.hrefSelector).val(jQuery(selected).attr(WYMeditor.HREF)); + jQuery(wym._options.srcSelector).val(jQuery(selected).attr(WYMeditor.SRC)); + jQuery(wym._options.titleSelector).val(jQuery(selected).attr(WYMeditor.TITLE)); + jQuery(wym._options.altSelector).val(jQuery(selected).attr(WYMeditor.ALT)); + } + + //auto populate image fields if selected image + if(wym._selected_image) { + jQuery(wym._options.dialogImageSelector + " " + wym._options.srcSelector) + .val(jQuery(wym._selected_image).attr(WYMeditor.SRC)); + jQuery(wym._options.dialogImageSelector + " " + wym._options.titleSelector) + .val(jQuery(wym._selected_image).attr(WYMeditor.TITLE)); + jQuery(wym._options.dialogImageSelector + " " + wym._options.altSelector) + .val(jQuery(wym._selected_image).attr(WYMeditor.ALT)); + } + + jQuery(wym._options.dialogLinkSelector + " " + + wym._options.submitSelector).click(function() { + + var sUrl = jQuery(wym._options.hrefSelector).val(); + if(sUrl.length > 0) { + wym._exec(WYMeditor.CREATE_LINK, sStamp); + //don't use jQuery.find() see #JQ1143 + //var link = jQuery(wym._doc.body).find("a[@href=" + sStamp + "]"); + var link = null; + var nodes = wym._doc.body.getElementsByTagName(WYMeditor.A); + for(var i=0; i < nodes.length; i++) { + if(jQuery(nodes[i]).attr(WYMeditor.HREF) == sStamp) { + link = jQuery(nodes[i]); + break; } - if(link) { - link.attr(WYM_HREF, sUrl); - link.attr(WYM_TITLE, jQuery(wym._options.titleSelector).val()); + } + if(link) { + link.attr(WYMeditor.HREF, sUrl); + link.attr(WYMeditor.TITLE, jQuery(wym._options.titleSelector).val()); + } + } + window.close(); + }); + + jQuery(wym._options.dialogImageSelector + " " + + wym._options.submitSelector).click(function() { + + var sUrl = jQuery(wym._options.srcSelector).val(); + if(sUrl.length > 0) { + wym._exec(WYMeditor.INSERT_IMAGE, sStamp); + //don't use jQuery.find() see #JQ1143 + //var image = jQuery(wym._doc.body).find("img[@src=" + sStamp + "]"); + var image = null; + var nodes = wym._doc.body.getElementsByTagName(WYMeditor.IMG); + for(var i=0; i < nodes.length; i++) { + if(jQuery(nodes[i]).attr(WYMeditor.SRC) == sStamp) { + image = jQuery(nodes[i]); + break; } } - window.close(); - }); - - jQuery(wym._options.dialogImageSelector + " " - + wym._options.submitSelector).click(function() { - - var sUrl = jQuery(wym._options.srcSelector).val(); - if(sUrl.length > 0) { - wym._exec(WYM_INSERT_IMAGE, sStamp); - //don't use jQuery.find() see #JQ1143 - //var image = jQuery(wym._doc.body).find("img[@src=" + sStamp + "]"); - var image = null; - var nodes = wym._doc.body.getElementsByTagName(WYM_IMG); - for(var i=0; i < nodes.length; i++) { - if(jQuery(nodes[i]).attr(WYM_SRC) == sStamp) { - image = jQuery(nodes[i]); - break; + if(image) { + image.attr(WYMeditor.SRC, sUrl); + image.attr(WYMeditor.TITLE, jQuery(wym._options.titleSelector).val()); + image.attr(WYMeditor.ALT, jQuery(wym._options.altSelector).val()); + } + } + window.close(); + }); + + jQuery(wym._options.dialogTableSelector + " " + + wym._options.submitSelector).click(function() { + + var iRows = jQuery(wym._options.rowsSelector).val(); + var iCols = jQuery(wym._options.colsSelector).val(); + + if(iRows > 0 && iCols > 0) { + + var table = wym._doc.createElement(WYMeditor.TABLE); + var newRow = null; + var newCol = null; + + var sCaption = jQuery(wym._options.captionSelector).val(); + + //we create the caption + var newCaption = table.createCaption(); + newCaption.innerHTML = sCaption; + + //we create the rows and cells + for(x=0; x 0 + // (if the node contains trailign whitespaces) + else if (this.startOffset != 0) + return false; + + + for (var n=jQuery(startNode); n[0]!=parent[0]; n=n.parent()) { + var firstChild = n.parent().children(':first'); + + // node isn't first child => cursor can't be at the beginning + if (firstChild[0] != n[0] + || (firstChild[0].previousSibling + && !WYMeditor.isPhantomNode(firstChild[0].previousSibling))) + return false; + } + + return true; + }, + + isAtEnd: function(jqexpr) { + var parent = jQuery(this.endNode).parentsOrSelf(jqexpr); + + // jqexpr isn't a parent of the current cursor position + if (parent.length==0) + return false; + else + parent = parent[0]; + + + // This is the case if, e.g ("|" = cursor):

    textnode|

    , + // there the offset of endNode (endOffset) is 1 (behind the first node + // of

    ) + if (this.endNode == parent) { + // NOTE I don't know if it is a good idea to delete the
    + // here, as "atEnd()" probably shouldn't change the dom tree, + // but only searching it + if (this.endNode.lastChild.nodeName == "BR") + this.endNode.removeChild(endNode.lastChild); + + // if cursor is really at the end + if (this.endOffset == 0) + return false; + else { + for (var nNext=this.endNode.childNodes[this.endOffset-1].nextSibling; + nNext==null || nNext.nodeName == "BR"; + nNext=nNext.nextSibling) + + if (nNext==null) + return true; + } + + } + else { + var endNode = this.endNode; + if (endNode.nodeType == WYMeditor.NODE.TEXT) { + if ((endNode.nextSibling + && !WYMeditor.isPhantomNode(endNode.nextSibling)) + || (this.endOffset != endNode.data.length)) + return false; + else + endNode = endNode.parentNode; + } + + for (var n=endNode; n!=parent; n=n.parentNode) { + var lastChild = n.parentNode.lastChild; + // node isn't last child => cursor can't be at the end + // (is this true?) in gecko there the last child could be a + // phantom node + + // sometimes also whitespacenodes which aren't phatom nodes + // get stripped, but this is ok, as this is a wysiwym editor + if ((lastChild != n) || + (WYMeditor.isPhantomNode(lastChild) + && lastChild.previousSibling != n)) { + return false; } } - if(image) { - image.attr(WYM_SRC, sUrl); - image.attr(WYM_TITLE, jQuery(wym._options.titleSelector).val()); - image.attr(WYM_ALT, jQuery(wym._options.altSelector).val()); + } + + if (this.endOffset == this.endNode.length) + return true; + else + return false; + } +}; + +/********** XHTML LEXER/PARSER **********/ + +/* +* @name xml +* @description Use these methods to generate XML and XHTML compliant tags and +* escape tag attributes correctly +* @author Bermi Ferrer - http://bermi.org +* @author David Heinemeier Hansson http://loudthinking.com +*/ +WYMeditor.XmlHelper = function() +{ + this._entitiesDiv = document.createElement('div'); + return this; +}; + + +/* +* @name tag +* @description +* Returns an empty HTML tag of type *name* which by default is XHTML +* compliant. Setting *open* to true will create an open tag compatible +* with HTML 4.0 and below. Add HTML attributes by passing an attributes +* array to *options*. For attributes with no value like (disabled and +* readonly), give it a value of true in the *options* array. +* +* Examples: +* +* this.tag('br') +* # =>
    +* this.tag ('br', false, true) +* # =>
    +* this.tag ('input', jQuery({type:'text',disabled:true }) ) +* # => +*/ +WYMeditor.XmlHelper.prototype.tag = function(name, options, open) +{ + options = options || false; + open = open || false; + return '<'+name+(options ? this.tagOptions(options) : '')+(open ? '>' : ' />'); +}; + +/* +* @name contentTag +* @description +* Returns a XML block tag of type *name* surrounding the *content*. Add +* XML attributes by passing an attributes array to *options*. For attributes +* with no value like (disabled and readonly), give it a value of true in +* the *options* array. You can use symbols or strings for the attribute names. +* +* this.contentTag ('p', 'Hello world!' ) +* # =>

    Hello world!

    +* this.contentTag('div', this.contentTag('p', "Hello world!"), jQuery({class : "strong"})) +* # =>

    Hello world!

    +* this.contentTag("select", options, jQuery({multiple : true})) +* # => +*/ +WYMeditor.XmlHelper.prototype.contentTag = function(name, content, options) +{ + options = options || false; + return '<'+name+(options ? this.tagOptions(options) : '')+'>'+content+''; +}; + +/* +* @name cdataSection +* @description +* Returns a CDATA section for the given +content+. CDATA sections +* are used to escape blocks of text containing characters which would +* otherwise be recognized as markup. CDATA sections begin with the string +* <![CDATA[ and } with (and may not contain) the string +* ]]>. +*/ +WYMeditor.XmlHelper.prototype.cdataSection = function(content) +{ + return ''; +}; + + +/* +* @name escapeOnce +* @description +* Returns the escaped +xml+ without affecting existing escaped entities. +* +* this.escapeOnce( "1 > 2 & 3") +* # => "1 > 2 & 3" +*/ +WYMeditor.XmlHelper.prototype.escapeOnce = function(xml) +{ + return this._fixDoubleEscape(this.escapeEntities(xml)); +}; + +/* +* @name _fixDoubleEscape +* @description +* Fix double-escaped entities, such as &amp;, &#123;, etc. +*/ +WYMeditor.XmlHelper.prototype._fixDoubleEscape = function(escaped) +{ + return escaped.replace(/&([a-z]+|(#\d+));/ig, "&$1;"); +}; + +/* +* @name tagOptions +* @description +* Takes an array like the one generated by Tag.parseAttributes +* [["src", "http://www.editam.com/?a=b&c=d&f=g"], ["title", "Editam, CMS"]] +* or an object like {src:"http://www.editam.com/?a=b&c=d&f=g", title:"Editam, CMS"} +* and returns a string properly escaped like +* ' src = "http://www.editam.com/?a=b&c=d&f=g" title = "Editam, <Simplified> CMS"' +* which is valid for strict XHTML +*/ +WYMeditor.XmlHelper.prototype.tagOptions = function(options) +{ + var xml = this; + xml._formated_options = ''; + + for (var key in options) { + var formated_options = ''; + var value = options[key]; + if(typeof value != 'function' && value.length > 0) { + + if(parseInt(key) == key && typeof value == 'object'){ + key = value.shift(); + value = value.pop(); + } + if(key != '' && value != ''){ + xml._formated_options += ' '+key+'="'+xml.escapeOnce(value)+'"'; + } + } + } + return xml._formated_options; +}; + +/* +* @name escapeEntities +* @description +* Escapes XML/HTML entities <, >, & and ". If seccond parameter is set to false it +* will not escape ". If set to true it will also escape ' +*/ +WYMeditor.XmlHelper.prototype.escapeEntities = function(string, escape_quotes) +{ + this._entitiesDiv.innerHTML = string; + this._entitiesDiv.textContent = string; + var result = this._entitiesDiv.innerHTML; + if(typeof escape_quotes == 'undefined'){ + if(escape_quotes != false) result = result.replace('"', '"'); + if(escape_quotes == true) result = result.replace('"', '''); + } + return result; +}; + +/* +* Parses a string conatining tag attributes and values an returns an array formated like +* [["src", "http://www.editam.com"], ["title", "Editam, Simplified CMS"]] +*/ +WYMeditor.XmlHelper.prototype.parseAttributes = function(tag_attributes) +{ + // Use a compounded regex to match single quoted, double quoted and unquoted attribute pairs + var result = []; + var matches = tag_attributes.split(/((=\s*")(")("))|((=\s*\')(\')(\'))|((=\s*[^>\s]*))/g); + if(matches.toString() != tag_attributes){ + for (var k in matches) { + var v = matches[k]; + if(typeof v != 'function' && v.length != 0){ + var re = new RegExp('(\\w+)\\s*'+v); + if(match = tag_attributes.match(re) ){ + var value = v.replace(/^[\s=]+/, ""); + var delimiter = value.charAt(0); + delimiter = delimiter == '"' ? '"' : (delimiter=="'"?"'":''); + if(delimiter != ''){ + value = delimiter == '"' ? value.replace(/^"|"+$/g, '') : value.replace(/^'|'+$/g, ''); + } + tag_attributes = tag_attributes.replace(match[0],''); + result.push([match[1] , value]); + } + } + } + } + return result; +}; + +/** +* XhtmlValidator for validating tag attributes +* +* @author Bermi Ferrer - http://bermi.org +*/ +WYMeditor.XhtmlValidator = { + "_attributes": + { + "core": + { + "except":[ + "base", + "head", + "html", + "meta", + "param", + "script", + "style", + "title" + ], + "attributes":[ + "class", + "id", + "style", + "title", + "accesskey", + "tabindex" + ] + }, + "language": + { + "except":[ + "base", + "br", + "hr", + "iframe", + "param", + "script" + ], + "attributes": + { + "dir":[ + "ltr", + "rtl" + ], + "0":"lang", + "1":"xml:lang" + } + }, + "keyboard": + { + "attributes": + { + "accesskey":/^(\w){1}$/, + "tabindex":/^(\d)+$/ + } + } + }, + "_events": + { + "window": + { + "only":[ + "body" + ], + "attributes":[ + "onload", + "onunload" + ] + }, + "form": + { + "only":[ + "form", + "input", + "textarea", + "select", + "a", + "label", + "button" + ], + "attributes":[ + "onchange", + "onsubmit", + "onreset", + "onselect", + "onblur", + "onfocus" + ] + }, + "keyboard": + { + "except":[ + "base", + "bdo", + "br", + "frame", + "frameset", + "head", + "html", + "iframe", + "meta", + "param", + "script", + "style", + "title" + ], + "attributes":[ + "onkeydown", + "onkeypress", + "onkeyup" + ] + }, + "mouse": + { + "except":[ + "base", + "bdo", + "br", + "head", + "html", + "meta", + "param", + "script", + "style", + "title" + ], + "attributes":[ + "onclick", + "ondblclick", + "onmousedown", + "onmousemove", + "onmouseover", + "onmouseout", + "onmouseup" + ] + } + }, + "_tags": + { + "a": + { + "attributes": + { + "0":"charset", + "1":"coords", + "2":"href", + "3":"hreflang", + "4":"name", + "rel":/^(alternate|designates|stylesheet|start|next|prev|contents|index|glossary|copyright|chapter|section|subsection|appendix|help|bookmark| |shortcut|icon)+$/, + "rev":/^(alternate|designates|stylesheet|start|next|prev|contents|index|glossary|copyright|chapter|section|subsection|appendix|help|bookmark| |shortcut|icon)+$/, + "shape":/^(rect|rectangle|circ|circle|poly|polygon)$/, + "5":"type" + } + }, + "0":"abbr", + "1":"acronym", + "2":"address", + "area": + { + "attributes": + { + "0":"alt", + "1":"coords", + "2":"href", + "nohref":/^(true|false)$/, + "shape":/^(rect|rectangle|circ|circle|poly|polygon)$/ + }, + "required":[ + "alt" + ] + }, + "3":"b", + "base": + { + "attributes":[ + "href" + ], + "required":[ + "href" + ] + }, + "bdo": + { + "attributes": + { + "dir":/^(ltr|rtl)$/ + }, + "required":[ + "dir" + ] + }, + "4":"big", + "blockquote": + { + "attributes":[ + "cite" + ] + }, + "5":"body", + "6":"br", + "button": + { + "attributes": + { + "disabled":/^(disabled)$/, + "type":/^(button|reset|submit)$/, + "0":"value" + }, + "inside":"form" + }, + "7":"caption", + "8":"cite", + "9":"code", + "col": + { + "attributes": + { + "align":/^(right|left|center|justify)$/, + "0":"char", + "1":"charoff", + "span":/^(\d)+$/, + "valign":/^(top|middle|bottom|baseline)$/, + "2":"width" + }, + "inside":"colgroup" + }, + "colgroup": + { + "attributes": + { + "align":/^(right|left|center|justify)$/, + "0":"char", + "1":"charoff", + "span":/^(\d)+$/, + "valign":/^(top|middle|bottom|baseline)$/, + "2":"width" + } + }, + "10":"dd", + "del": + { + "attributes": + { + "0":"cite", + "datetime":/^([0-9]){8}/ + } + }, + "11":"div", + "12":"dfn", + "13":"dl", + "14":"dt", + "15":"em", + "fieldset": + { + "inside":"form" + }, + "form": + { + "attributes": + { + "0":"action", + "1":"accept", + "2":"accept-charset", + "3":"enctype", + "method":/^(get|post)$/ + }, + "required":[ + "action" + ] + }, + "head": + { + "attributes":[ + "profile" + ] + }, + "16":"h1", + "17":"h2", + "18":"h3", + "19":"h4", + "20":"h5", + "21":"h6", + "22":"hr", + "html": + { + "attributes":[ + "xmlns" + ] + }, + "23":"i", + "img": + { + "attributes":[ + "alt", + "src", + "height", + "ismap", + "longdesc", + "usemap", + "width" + ], + "required":[ + "alt", + "src" + ] + }, + "input": + { + "attributes": + { + "0":"accept", + "1":"alt", + "checked":/^(checked)$/, + "disabled":/^(disabled)$/, + "maxlength":/^(\d)+$/, + "2":"name", + "readonly":/^(readonly)$/, + "size":/^(\d)+$/, + "3":"src", + "type":/^(button|checkbox|file|hidden|image|password|radio|reset|submit|text)$/, + "4":"value" + }, + "inside":"form" + }, + "ins": + { + "attributes": + { + "0":"cite", + "datetime":/^([0-9]){8}/ + } + }, + "24":"kbd", + "label": + { + "attributes":[ + "for" + ], + "inside":"form" + }, + "25":"legend", + "26":"li", + "link": + { + "attributes": + { + "0":"charset", + "1":"href", + "2":"hreflang", + "media":/^(all|braille|print|projection|screen|speech|,|;| )+$/i, + //next comment line required by Opera! + /*"rel":/^(alternate|appendix|bookmark|chapter|contents|copyright|glossary|help|home|index|next|prev|section|start|stylesheet|subsection| |shortcut|icon)+$/i,*/ + "rel":/^(alternate|appendix|bookmark|chapter|contents|copyright|glossary|help|home|index|next|prev|section|start|stylesheet|subsection| |shortcut|icon)+$/i, + "rev":/^(alternate|appendix|bookmark|chapter|contents|copyright|glossary|help|home|index|next|prev|section|start|stylesheet|subsection| |shortcut|icon)+$/i, + "3":"type" + }, + "inside":"head" + }, + "map": + { + "attributes":[ + "id", + "name" + ], + "required":[ + "id" + ] + }, + "meta": + { + "attributes": + { + "0":"content", + "http-equiv":/^(content\-type|expires|refresh|set\-cookie)$/i, + "1":"name", + "2":"scheme" + }, + "required":[ + "content" + ] + }, + "27":"noscript", + "object": + { + "attributes":[ + "archive", + "classid", + "codebase", + "codetype", + "data", + "declare", + "height", + "name", + "standby", + "type", + "usemap", + "width" + ] + }, + "28":"ol", + "optgroup": + { + "attributes": + { + "0":"label", + "disabled": /^(disabled)$/ + }, + "required":[ + "label" + ] + }, + "option": + { + "attributes": + { + "0":"label", + "disabled":/^(disabled)$/, + "selected":/^(selected)$/, + "1":"value" + }, + "inside":"select" + }, + "29":"p", + "param": + { + "attributes": + { + "0":"type", + "valuetype":/^(data|ref|object)$/, + "1":"valuetype", + "2":"value" + }, + "required":[ + "name" + ] + }, + "30":"pre", + "q": + { + "attributes":[ + "cite" + ] + }, + "31":"samp", + "script": + { + "attributes": + { + "type":/^(text\/ecmascript|text\/javascript|text\/jscript|text\/vbscript|text\/vbs|text\/xml)$/, + "0":"charset", + "defer":/^(defer)$/, + "1":"src" + }, + "required":[ + "type" + ] + }, + "select": + { + "attributes": + { + "disabled":/^(disabled)$/, + "multiple":/^(multiple)$/, + "0":"name", + "1":"size" + }, + "inside":"form" + }, + "32":"small", + "33":"span", + "34":"strong", + "style": + { + "attributes": + { + "0":"type", + "media":/^(screen|tty|tv|projection|handheld|print|braille|aural|all)$/ + }, + "required":[ + "type" + ] + }, + "35":"sub", + "36":"sup", + "table": + { + "attributes": + { + "0":"border", + "1":"cellpadding", + "2":"cellspacing", + "frame":/^(void|above|below|hsides|lhs|rhs|vsides|box|border)$/, + "rules":/^(none|groups|rows|cols|all)$/, + "3":"summary", + "4":"width" + } + }, + "tbody": + { + "attributes": + { + "align":/^(right|left|center|justify)$/, + "0":"char", + "1":"charoff", + "valign":/^(top|middle|bottom|baseline)$/ + } + }, + "td": + { + "attributes": + { + "0":"abbr", + "align":/^(left|right|center|justify|char)$/, + "1":"axis", + "2":"char", + "3":"charoff", + "colspan":/^(\d)+$/, + "4":"headers", + "rowspan":/^(\d)+$/, + "scope":/^(col|colgroup|row|rowgroup)$/, + "valign":/^(top|middle|bottom|baseline)$/ + } + }, + "textarea": + { + "attributes":[ + "cols", + "rows", + "disabled", + "name", + "readonly" + ], + "required":[ + "cols", + "rows" + ], + "inside":"form" + }, + "tfoot": + { + "attributes": + { + "align":/^(right|left|center|justify)$/, + "0":"char", + "1":"charoff", + "valign":/^(top|middle|bottom)$/, + "2":"baseline" + } + }, + "th": + { + "attributes": + { + "0":"abbr", + "align":/^(left|right|center|justify|char)$/, + "1":"axis", + "2":"char", + "3":"charoff", + "colspan":/^(\d)+$/, + "4":"headers", + "rowspan":/^(\d)+$/, + "scope":/^(col|colgroup|row|rowgroup)$/, + "valign":/^(top|middle|bottom|baseline)$/ + } + }, + "thead": + { + "attributes": + { + "align":/^(right|left|center|justify)$/, + "0":"char", + "1":"charoff", + "valign":/^(top|middle|bottom|baseline)$/ + } + }, + "37":"title", + "tr": + { + "attributes": + { + "align":/^(right|left|center|justify|char)$/, + "0":"char", + "1":"charoff", + "valign":/^(top|middle|bottom|baseline)$/ + } + }, + "38":"tt", + "39":"ul", + "40":"var" + }, + + // Temporary skiped attributes + skiped_attributes : [], + skiped_attribute_values : [], + + getValidTagAttributes: function(tag, attributes) + { + var valid_attributes = {}; + var possible_attributes = this.getPossibleTagAttributes(tag); + for(var attribute in attributes) { + var value = attributes[attribute]; + if(!this.skiped_attributes.contains(attribute) && !this.skiped_attribute_values.contains(value)){ + if (typeof value != 'function' && possible_attributes.contains(attribute)) { + if (this.doesAttributeNeedsValidation(tag, attribute)) { + if(this.validateAttribute(tag, attribute, value)){ + valid_attributes[attribute] = value; } + }else{ + valid_attributes[attribute] = value; + } } - window.close(); - }); - - jQuery(wym._options.dialogTableSelector + " " - + wym._options.submitSelector).click(function() { - - var iRows = jQuery(wym._options.rowsSelector).val(); - var iCols = jQuery(wym._options.colsSelector).val(); - - if(iRows > 0 && iCols > 0) { - - var table = wym._doc.createElement(WYM_TABLE); - var newRow = null; - var newCol = null; - - var sCaption = jQuery(wym._options.captionSelector).val(); - - //we create the caption - var newCaption = table.createCaption(); - newCaption.innerHTML = sCaption; - - //we create the rows and cells - for(x=0; x 0 && !value.match(this._tags[tag]['attributes'][attribute])) || // invalid format + (this._tags[tag] && this._tags[tag]['required'] && this._tags[tag]['required'].contains(attribute) && value.length == 0) // required attribute + ) { + return false; + } + return this._tags[tag] != undefined; + }, + getPossibleTagAttributes : function(tag) + { + if (!this._possible_tag_attributes) { + this._possible_tag_attributes = {}; + } + if (!this._possible_tag_attributes[tag]) { + this._possible_tag_attributes[tag] = this.getUniqueAttributesAndEventsForTag(tag).concat(this.getDefaultAttributesAndEventsForTag(tag)); + } + return this._possible_tag_attributes[tag]; + } }; -/********** HELPERS **********/ +/** +* Compounded regular expression. Any of +* the contained patterns could match and +* when one does, it's label is returned. +* +* Constructor. Starts with no patterns. +* @param boolean case True for case sensitive, false +* for insensitive. +* @access public +* @author Marcus Baker (http://lastcraft.com) +* @author Bermi Ferrer (http://bermi.org) +*/ +WYMeditor.ParallelRegex = function(case_sensitive) +{ + this._case = case_sensitive; + this._patterns = []; + this._labels = []; + this._regex = null; + return this; +}; -// Returns true if it is a text node with whitespaces only -jQuery.fn.isPhantomNode = function() { - if (this[0].nodeType == 3) - return !(/[^\t\n\r ]/.test(this[0].data)); - return false; +/** +* Adds a pattern with an optional label. +* @param string pattern Perl style regex, but ( and ) +* lose the usual meaning. +* @param string label Label of regex to be returned +* on a match. +* @access public +*/ +WYMeditor.ParallelRegex.prototype.addPattern = function(pattern, label) +{ + label = label || true; + var count = this._patterns.length; + this._patterns[count] = pattern; + this._labels[count] = label; + this._regex = null; }; -function isPhantomNode(n) { - if (n.nodeType == 3) - return !(/[^\t\n\r ]/.test(n.data)); +/** +* Attempts to match all patterns at once against +* a string. +* @param string subject String to match against. +* +* @return boolean True on success. +* @return string match First matched portion of +* subject. +* @access public +*/ +WYMeditor.ParallelRegex.prototype.match = function(subject) +{ + if (this._patterns.length == 0) { + return [false, '']; + } + var matches = subject.match(this._getCompoundedRegex()); - return false; + if(!matches){ + return [false, '']; + } + var match = matches[0]; + for (var i = 1; i < matches.length; i++) { + if (matches[i]) { + return [this._labels[i-1], match]; + } + } + return [true, matches[0]]; }; -// Returns the Parents or the node itself -// jqexpr = a jQuery expression -jQuery.fn.parentsOrSelf = function(jqexpr) { - var n = this; +/** +* Compounds the patterns into a single +* regular expression separated with the +* "or" operator. Caches the regex. +* Will automatically escape (, ) and / tokens. +* @param array patterns List of patterns in order. +* @access private +*/ +WYMeditor.ParallelRegex.prototype._getCompoundedRegex = function() +{ + if (this._regex == null) { + for (var i = 0, count = this._patterns.length; i < count; i++) { + this._patterns[i] = '(' + this._untokenizeRegex(this._tokenizeRegex(this._patterns[i]).replace(/([\/\(\)])/g,'\\$1')) + ')'; + } + this._regex = new RegExp(this._patterns.join("|") ,this._getPerlMatchingFlags()); + } + return this._regex; +}; - if (n[0].nodeType == 3) - n = n.parents().slice(0,1); +/** +* Escape lookahead/lookbehind blocks +*/ +WYMeditor.ParallelRegex.prototype._tokenizeRegex = function(regex) +{ + return regex. + replace(/\(\?(i|m|s|x|U)\)/, '~~~~~~Tk1\$1~~~~~~'). + replace(/\(\?(\-[i|m|s|x|U])\)/, '~~~~~~Tk2\$1~~~~~~'). + replace(/\(\?\=(.*)\)/, '~~~~~~Tk3\$1~~~~~~'). + replace(/\(\?\!(.*)\)/, '~~~~~~Tk4\$1~~~~~~'). + replace(/\(\?\<\=(.*)\)/, '~~~~~~Tk5\$1~~~~~~'). + replace(/\(\?\<\!(.*)\)/, '~~~~~~Tk6\$1~~~~~~'). + replace(/\(\?\:(.*)\)/, '~~~~~~Tk7\$1~~~~~~'); +}; -// if (n.is(jqexpr)) // XXX should work, but doesn't (probably a jQuery bug) - if (n.filter(jqexpr).size() == 1) - return n; - else - return n.parents(jqexpr).slice(0,1); +/** +* Unscape lookahead/lookbehind blocks +*/ +WYMeditor.ParallelRegex.prototype._untokenizeRegex = function(regex) +{ + return regex. + replace(/~~~~~~Tk1(.{1})~~~~~~/, "(?\$1)"). + replace(/~~~~~~Tk2(.{2})~~~~~~/, "(?\$1)"). + replace(/~~~~~~Tk3(.*)~~~~~~/, "(?=\$1)"). + replace(/~~~~~~Tk4(.*)~~~~~~/, "(?!\$1)"). + replace(/~~~~~~Tk5(.*)~~~~~~/, "(?<=\$1)"). + replace(/~~~~~~Tk6(.*)~~~~~~/, "(?", 'Comment'); +}; + +WYMeditor.XhtmlLexer.prototype.addScriptTokens = function(scope) +{ + this.addEntryPattern("", 'Script'); +}; + +WYMeditor.XhtmlLexer.prototype.addCssTokens = function(scope) +{ + this.addEntryPattern("", 'Css'); +}; + +WYMeditor.XhtmlLexer.prototype.addTagTokens = function(scope) +{ + this.addSpecialPattern("<\\s*[a-z0-9:\-]+\\s*>", scope, 'OpeningTag'); + this.addEntryPattern("<[a-z0-9:\-]+"+'[\\\/ \\\>]+', scope, 'OpeningTag'); + this.addInTagDeclarationTokens('OpeningTag'); + + this.addSpecialPattern("", scope, 'ClosingTag'); + +}; + +WYMeditor.XhtmlLexer.prototype.addInTagDeclarationTokens = function(scope) +{ + this.addSpecialPattern('\\s+', scope, 'Ignore'); + + this.addAttributeTokens(scope); + + this.addExitPattern('/>', scope); + this.addExitPattern('>', scope); + +}; + +WYMeditor.XhtmlLexer.prototype.addAttributeTokens = function(scope) +{ + this.addSpecialPattern("\\s*[a-z-_0-9]*:?[a-z-_0-9]+\\s*(?=\=)\\s*", scope, 'TagAttributes'); + + this.addEntryPattern('=\\s*"', scope, 'DoubleQuotedAttribute'); + this.addPattern("\\\\\"", 'DoubleQuotedAttribute'); + this.addExitPattern('"', 'DoubleQuotedAttribute'); + + this.addEntryPattern("=\\s*'", scope, 'SingleQuotedAttribute'); + this.addPattern("\\\\'", 'SingleQuotedAttribute'); + this.addExitPattern("'", 'SingleQuotedAttribute'); + + this.addSpecialPattern('=\\s*[^>\\s]*', scope, 'UnquotedAttribute'); +}; + + + +/** +* XHTML Parser. +* +* This XHTML parser will trigger the events available on on +* current SaxListener +* +* @author Bermi Ferrer (http://bermi.org) +*/ +WYMeditor.XhtmlParser = function(Listener, mode) +{ + var mode = mode || 'Text'; + this._Lexer = new WYMeditor.XhtmlLexer(this); + this._Listener = Listener; + this._mode = mode; + this._matches = []; + this._last_match = ''; + this._current_match = ''; + + return this; +}; + +WYMeditor.XhtmlParser.prototype.parse = function(raw) +{ + this._Lexer.parse(this.beforeParsing(raw)); + return this.afterParsing(this._Listener.getResult()); +}; + +WYMeditor.XhtmlParser.prototype.beforeParsing = function(raw) +{ + if(raw.match(/class="MsoNormal"/) || raw.match(/ns = "urn:schemas-microsoft-com/)){ + // Usefull for cleaning up content pasted from other sources (MSWord) + this._Listener.avoidStylingTagsAndAttributes(); + } + return this._Listener.beforeParsing(raw); +}; + +WYMeditor.XhtmlParser.prototype.afterParsing = function(parsed) +{ + if(this._Listener._avoiding_tags_implicitly){ + this._Listener.allowStylingTagsAndAttributes(); + } + return this._Listener.afterParsing(parsed); +}; + + +WYMeditor.XhtmlParser.prototype.Ignore = function(match, state) +{ + return true; +}; + +WYMeditor.XhtmlParser.prototype.Text = function(text) +{ + this._Listener.addContent(text); + return true; +}; + +WYMeditor.XhtmlParser.prototype.Comment = function(match, status) +{ + return this._addNonTagBlock(match, status, 'addComment'); +}; + +WYMeditor.XhtmlParser.prototype.Script = function(match, status) +{ + return this._addNonTagBlock(match, status, 'addScript'); +}; + +WYMeditor.XhtmlParser.prototype.Css = function(match, status) +{ + return this._addNonTagBlock(match, status, 'addCss'); +}; + +WYMeditor.XhtmlParser.prototype._addNonTagBlock = function(match, state, type) +{ + switch (state){ + case WYMeditor.LEXER_ENTER: + this._non_tag = match; + break; + case WYMeditor.LEXER_UNMATCHED: + this._non_tag += match; + break; + case WYMeditor.LEXER_EXIT: + switch(type) { + case 'addComment': + this._Listener.addComment(this._non_tag+match); + break; + case 'addScript': + this._Listener.addScript(this._non_tag+match); + break; + case 'addCss': + this._Listener.addCss(this._non_tag+match); + break; + } + } + return true; +}; + +WYMeditor.XhtmlParser.prototype.OpeningTag = function(match, state) +{ + switch (state){ + case WYMeditor.LEXER_ENTER: + this._tag = this.normalizeTag(match); + this._tag_attributes = {}; + break; + case WYMeditor.LEXER_SPECIAL: + this._callOpenTagListener(this.normalizeTag(match)); + break; + case WYMeditor.LEXER_EXIT: + this._callOpenTagListener(this._tag, this._tag_attributes); + } + return true; +}; + +WYMeditor.XhtmlParser.prototype.ClosingTag = function(match, state) +{ + this._callCloseTagListener(this.normalizeTag(match)); + return true; +}; + +WYMeditor.XhtmlParser.prototype._callOpenTagListener = function(tag, attributes) +{ + var attributes = attributes || {}; + this.autoCloseUnclosedBeforeNewOpening(tag); + + if(this._Listener.isBlockTag(tag)){ + this._Listener._tag_stack.push(tag); + this._Listener.fixNestingBeforeOpeningBlockTag(tag, attributes); + this._Listener.openBlockTag(tag, attributes); + this._increaseOpenTagCounter(tag); + }else if(this._Listener.isInlineTag(tag)){ + this._Listener.inlineTag(tag, attributes); + }else{ + this._Listener.openUnknownTag(tag, attributes); + this._increaseOpenTagCounter(tag); + } + this._Listener.last_tag = tag; + this._Listener.last_tag_opened = true; + this._Listener.last_tag_attributes = attributes; +}; + +WYMeditor.XhtmlParser.prototype._callCloseTagListener = function(tag) +{ + if(this._decreaseOpenTagCounter(tag)){ + this.autoCloseUnclosedBeforeTagClosing(tag); + + if(this._Listener.isBlockTag(tag)){ + var expected_tag = this._Listener._tag_stack.pop(); + if(expected_tag == false){ + return; + }else if(expected_tag != tag){ + tag = expected_tag; + } + this._Listener.closeBlockTag(tag); + }else{ + this._Listener.closeUnknownTag(tag); + } + }else{ + this._Listener.closeUnopenedTag(tag); + } + this._Listener.last_tag = tag; + this._Listener.last_tag_opened = false; +}; + +WYMeditor.XhtmlParser.prototype._increaseOpenTagCounter = function(tag) +{ + this._Listener._open_tags[tag] = this._Listener._open_tags[tag] || 0; + this._Listener._open_tags[tag]++; +}; + +WYMeditor.XhtmlParser.prototype._decreaseOpenTagCounter = function(tag) +{ + if(this._Listener._open_tags[tag]){ + this._Listener._open_tags[tag]--; + if(this._Listener._open_tags[tag] == 0){ + this._Listener._open_tags[tag] = undefined; + } + return true; + } return false; }; -Array.prototype.indexOf = function (item) { - var ret=-1; - for(var i = 0; i < this.length; i++) { - if (this[i] == item) { - ret=i; break; +WYMeditor.XhtmlParser.prototype.autoCloseUnclosedBeforeNewOpening = function(new_tag) +{ + this._autoCloseUnclosed(new_tag, false); +}; + +WYMeditor.XhtmlParser.prototype.autoCloseUnclosedBeforeTagClosing = function(tag) +{ + this._autoCloseUnclosed(tag, true); +}; + +WYMeditor.XhtmlParser.prototype._autoCloseUnclosed = function(new_tag, closing) +{ + var closing = closing || false; + if(this._Listener._open_tags){ + for (var tag in this._Listener._open_tags) { + var counter = this._Listener._open_tags[tag]; + if(counter > 0 && this._Listener.shouldCloseTagAutomatically(tag, new_tag, closing)){ + this._callCloseTagListener(tag, true); + } } } - return(ret); }; -String.prototype.trim = function() { - return this.replace(/^(\s*)|(\s*)$/gm,''); +WYMeditor.XhtmlParser.prototype.getTagReplacements = function() +{ + return this._Listener.getTagReplacements(); }; -Array.prototype.findByName = function (name) { - for(var i = 0; i < this.length; i++) { - var Item = this[i]; - if(Item.name == name) { - return(Item); +WYMeditor.XhtmlParser.prototype.normalizeTag = function(tag) +{ + tag = tag.replace(/^([\s<\/>]*)|([\s<\/>]*)$/gm,'').toLowerCase(); + var tags = this._Listener.getTagReplacements(); + if(tags[tag]){ + return tags[tag]; + } + return tag; +}; + +WYMeditor.XhtmlParser.prototype.TagAttributes = function(match, state) +{ + if(WYMeditor.LEXER_SPECIAL == state){ + this._current_attribute = match; + } + return true; +}; + +WYMeditor.XhtmlParser.prototype.DoubleQuotedAttribute = function(match, state) +{ + if(WYMeditor.LEXER_UNMATCHED == state){ + this._tag_attributes[this._current_attribute] = match; + } + return true; +}; + +WYMeditor.XhtmlParser.prototype.SingleQuotedAttribute = function(match, state) +{ + if(WYMeditor.LEXER_UNMATCHED == state){ + this._tag_attributes[this._current_attribute] = match; + } + return true; +}; + +WYMeditor.XhtmlParser.prototype.UnquotedAttribute = function(match, state) +{ + this._tag_attributes[this._current_attribute] = match.replace(/^=/,''); + return true; +}; + + + +/** +* XHTML Sax parser. +* +* @author Bermi Ferrer (http://bermi.org) +*/ +WYMeditor.XhtmlSaxListener = function() +{ + this.output = ''; + this.helper = new WYMeditor.XmlHelper(); + this._open_tags = {}; + this.validator = WYMeditor.XhtmlValidator; + this._tag_stack = []; + this.avoided_tags = []; + + this.entities = { + ' ':' ','¡':'¡','¢':'¢', + '£':'£','¤':'¤','¥':'¥', + '¦':'¦','§':'§','¨':'¨', + '©':'©','ª':'ª','«':'«', + '¬':'¬','­':'­','®':'®', + '¯':'¯','°':'°','±':'±', + '²':'²','³':'³','´':'´', + 'µ':'µ','¶':'¶','·':'·', + '¸':'¸','¹':'¹','º':'º', + '»':'»','¼':'¼','½':'½', + '¾':'¾','¿':'¿','À':'À', + 'Á':'Á','Â':'Â','Ã':'Ã', + 'Ä':'Ä','Å':'Å','Æ':'Æ', + 'Ç':'Ç','È':'È','É':'É', + 'Ê':'Ê','Ë':'Ë','Ì':'Ì', + 'Í':'Í','Î':'Î','Ï':'Ï', + 'Ð':'Ð','Ñ':'Ñ','Ò':'Ò', + 'Ó':'Ó','Ô':'Ô','Õ':'Õ', + 'Ö':'Ö','×':'×','Ø':'Ø', + 'Ù':'Ù','Ú':'Ú','Û':'Û', + 'Ü':'Ü','Ý':'Ý','Þ':'Þ', + 'ß':'ß','à':'à','á':'á', + 'â':'â','ã':'ã','ä':'ä', + 'å':'å','æ':'æ','ç':'ç', + 'è':'è','é':'é','ê':'ê', + 'ë':'ë','ì':'ì','í':'í', + 'î':'î','ï':'ï','ð':'ð', + 'ñ':'ñ','ò':'ò','ó':'ó', + 'ô':'ô','õ':'õ','ö':'ö', + '÷':'÷','ø':'ø','ù':'ù', + 'ú':'ú','û':'û','ü':'ü', + 'ý':'ý','þ':'þ','ÿ':'ÿ', + 'Œ':'Œ','œ':'œ','Š':'Š', + 'š':'š','Ÿ':'Ÿ','ƒ':'ƒ', + 'ˆ':'ˆ','˜':'˜','Α':'Α', + 'Β':'Β','Γ':'Γ','Δ':'Δ', + 'Ε':'Ε','Ζ':'Ζ','Η':'Η', + 'Θ':'Θ','Ι':'Ι','Κ':'Κ', + 'Λ':'Λ','Μ':'Μ','Ν':'Ν', + 'Ξ':'Ξ','Ο':'Ο','Π':'Π', + 'Ρ':'Ρ','Σ':'Σ','Τ':'Τ', + 'Υ':'Υ','Φ':'Φ','Χ':'Χ', + 'Ψ':'Ψ','Ω':'Ω','α':'α', + 'β':'β','γ':'γ','δ':'δ', + 'ε':'ε','ζ':'ζ','η':'η', + 'θ':'θ','ι':'ι','κ':'κ', + 'λ':'λ','μ':'μ','ν':'ν', + 'ξ':'ξ','ο':'ο','π':'π', + 'ρ':'ρ','ς':'ς','σ':'σ', + 'τ':'τ','υ':'υ','φ':'φ', + 'χ':'χ','ψ':'ψ','ω':'ω', + 'ϑ':'ϑ','ϒ':'ϒ','ϖ':'ϖ', + ' ':' ',' ':' ',' ':' ', + '‌':'‌','‍':'‍','‎':'‎', + '‏':'‏','–':'–','—':'—', + '‘':'‘','’':'’','‚':'‚', + '“':'“','”':'”','„':'„', + '†':'†','‡':'‡','•':'•', + '…':'…','‰':'‰','′':'′', + '″':'″','‹':'‹','›':'›', + '‾':'‾','⁄':'⁄','€':'€', + 'ℑ':'ℑ','℘':'℘','ℜ':'ℜ', + '™':'™','ℵ':'ℵ','←':'←', + '↑':'↑','→':'→','↓':'↓', + '↔':'↔','↵':'↵','⇐':'⇐', + '⇑':'⇑','⇒':'⇒','⇓':'⇓', + '⇔':'⇔','∀':'∀','∂':'∂', + '∃':'∃','∅':'∅','∇':'∇', + '∈':'∈','∉':'∉','∋':'∋', + '∏':'∏','∑':'∑','−':'−', + '∗':'∗','√':'√','∝':'∝', + '∞':'∞','∠':'∠','∧':'∧', + '∨':'∨','∩':'∩','∪':'∪', + '∫':'∫','∴':'∴','∼':'∼', + '≅':'≅','≈':'≈','≠':'≠', + '≡':'≡','≤':'≤','≥':'≥', + '⊂':'⊂','⊃':'⊃','⊄':'⊄', + '⊆':'⊆','⊇':'⊇','⊕':'⊕', + '⊗':'⊗','⊥':'⊥','⋅':'⋅', + '⌈':'⌈','⌉':'⌉','⌊':'⌊', + '⌋':'⌋','⟨':'〈','⟩':'〉', + '◊':'◊','♠':'♠','♣':'♣', + '♥':'♥','♦':'♦'}; + + this.block_tags = ["a", "abbr", "acronym", "address", "area", "b", + "base", "bdo", "big", "blockquote", "body", "button", + "caption", "cite", "code", "col", "colgroup", "dd", "del", "div", + "dfn", "dl", "dt", "em", "fieldset", "form", "head", "h1", "h2", + "h3", "h4", "h5", "h6", "html", "i", "ins", + "kbd", "label", "legend", "li", "map", "noscript", + "object", "ol", "optgroup", "option", "p", "param", "pre", "q", + "samp", "script", "select", "small", "span", "strong", "style", + "sub", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", + "thead", "title", "tr", "tt", "ul", "var", "extends"]; + + + this.inline_tags = ["br", "hr", "img", "input"]; + + return this; +}; + +WYMeditor.XhtmlSaxListener.prototype.shouldCloseTagAutomatically = function(tag, now_on_tag, closing) +{ + var closing = closing || false; + if(tag == 'td'){ + if((closing && now_on_tag == 'tr') || (!closing && now_on_tag == 'td')){ + return true; } } - return(null); + if(tag == 'option'){ + if((closing && now_on_tag == 'select') || (!closing && now_on_tag == 'option')){ + return true; + } + } + return false; }; -/* - * WYMeditor : what you see is What You Mean web-based editor - * Copyright (C) 2007 H.O.net - http://www.honet.be/ - * Dual licensed under the MIT (MIT-license.txt) - * and GPL (GPL-license.txt) licenses. - * - * For further information visit: - * http://www.wymeditor.org/ - * - * File Name: - * jquery.wymeditor.explorer.js - * MSIE specific class and functions. - * See the documentation for more info. - * - * File Authors: - * Jean-Francois Hovinne (jf.hovinne@wymeditor.org) - * Bermi Ferrer (wymeditor a-t bermi dotorg) - * Frédéric Palluel-Lafleur (fpalluel@gmail.com) - */ -function WymClassExplorer(wym) { - - this._wym = wym; - this._class = "className"; - this._newLine = "\r\n"; +WYMeditor.XhtmlSaxListener.prototype.beforeParsing = function(raw) +{ + this.output = ''; + return raw; }; -WymClassExplorer.prototype.initIframe = function(iframe) { +WYMeditor.XhtmlSaxListener.prototype.afterParsing = function(xhtml) +{ + xhtml = this.replaceNamedEntities(xhtml); + xhtml = this.joinRepeatedEntities(xhtml); + xhtml = this.removeEmptyTags(xhtml); + return xhtml; +}; - //This function is executed twice, though it is called once! - //But MSIE needs that, otherwise designMode won't work. - //Weird. - - this._iframe = iframe; - this._doc = iframe.contentWindow.document; - - //add css rules from options - var styles = this._doc.styleSheets[0]; - var aCss = eval(this._options.editorStyles); +WYMeditor.XhtmlSaxListener.prototype.replaceNamedEntities = function(xhtml) +{ + for (var entity in this.entities) { + xhtml = xhtml.replace(entity, this.entities[entity]); + } + return xhtml; +}; - this.addCssRules(this._doc, aCss); +WYMeditor.XhtmlSaxListener.prototype.joinRepeatedEntities = function(xhtml) +{ + var tags = 'em|strong|sub|sup|acronym|pre|del|blockquote|address'; + return xhtml.replace(new RegExp('<\/('+tags+')><\\1>' ,''),''). + replace(new RegExp('(\s*<('+tags+')>\s*){2}(.*)(\s*<\/\\2>\s*){2}' ,''),'<\$2>\$3<\$2>'); +}; - this._doc.title = this._wym._index; - - //init html value - jQuery(this._doc.body).html(this._wym._html); - - //handle events - var wym = this; - - this._doc.body.onfocus = function() - {wym._doc.designMode = "on"; wym._doc = iframe.contentWindow.document;}; - this._doc.onbeforedeactivate = function() {wym.saveCaret();}; - this._doc.onkeyup = function() { - wym.saveCaret(); - wym.keyup(); - }; - this._doc.onclick = function() {wym.saveCaret();}; - - this._doc.body.onbeforepaste = function() { - wym._iframe.contentWindow.event.returnValue = false; - }; - - this._doc.body.onpaste = function() { - wym._iframe.contentWindow.event.returnValue = false; - wym.paste(window.clipboardData.getData("Text")); - }; - - //callback can't be executed twice, so we check - if(this._initialized) { - - //pre-bind functions - if(jQuery.isFunction(this._options.preBind)) this._options.preBind(this); - - //bind external events - this._wym.bindEvents(); - - //post-init functions - if(jQuery.isFunction(this._options.postInit)) this._options.postInit(this); - - //add event listeners to doc elements, e.g. images - this.listen(); +WYMeditor.XhtmlSaxListener.prototype.removeEmptyTags = function(xhtml) +{ + return xhtml.replace(new RegExp('<('+this.block_tags.join("|")+')>(
    | | |\\s)*<\/\\1>' ,'g'),''); +}; + +WYMeditor.XhtmlSaxListener.prototype.getResult = function() +{ + return this.output; +}; + +WYMeditor.XhtmlSaxListener.prototype.getTagReplacements = function() +{ + return {'b':'strong', 'i':'em'}; +}; + +WYMeditor.XhtmlSaxListener.prototype.addContent = function(text) +{ + this.output += text; +}; + +WYMeditor.XhtmlSaxListener.prototype.addComment = function(text) +{ + if(this.remove_comments){ + this.output += text; + } +}; + +WYMeditor.XhtmlSaxListener.prototype.addScript = function(text) +{ + if(!this.remove_scripts){ + this.output += text; + } +}; + +WYMeditor.XhtmlSaxListener.prototype.addCss = function(text) +{ + if(!this.remove_embeded_styles){ + this.output += text; + } +}; + +WYMeditor.XhtmlSaxListener.prototype.openBlockTag = function(tag, attributes) +{ + this.output += this.helper.tag(tag, this.validator.getValidTagAttributes(tag, attributes), true); +}; + +WYMeditor.XhtmlSaxListener.prototype.inlineTag = function(tag, attributes) +{ + this.output += this.helper.tag(tag, this.validator.getValidTagAttributes(tag, attributes)); +}; + +WYMeditor.XhtmlSaxListener.prototype.openUnknownTag = function(tag, attributes) +{ + //this.output += this.helper.tag(tag, attributes, true); +}; + +WYMeditor.XhtmlSaxListener.prototype.closeBlockTag = function(tag) +{ + this.output = this.output.replace(/
    $/, '')+this._getClosingTagContent('before', tag)+""+this._getClosingTagContent('after', tag); +}; + +WYMeditor.XhtmlSaxListener.prototype.closeUnknownTag = function(tag) +{ + //this.output += ""; +}; + +WYMeditor.XhtmlSaxListener.prototype.closeUnopenedTag = function(tag) +{ + this.output += ""; +}; + +WYMeditor.XhtmlSaxListener.prototype.avoidStylingTagsAndAttributes = function() +{ + this.avoided_tags = ['div','span']; + this.validator.skiped_attributes = ['style']; + this.validator.skiped_attribute_values = ['MsoNormal','main1']; // MS Word attributes for class + this._avoiding_tags_implicitly = true; +}; + +WYMeditor.XhtmlSaxListener.prototype.allowStylingTagsAndAttributes = function() +{ + this.avoided_tags = []; + this.validator.skiped_attributes = []; + this.validator.skiped_attribute_values = []; + this._avoiding_tags_implicitly = false; +}; + +WYMeditor.XhtmlSaxListener.prototype.isBlockTag = function(tag) +{ + return !this.avoided_tags.contains(tag) && this.block_tags.contains(tag); +}; + +WYMeditor.XhtmlSaxListener.prototype.isInlineTag = function(tag) +{ + return !this.avoided_tags.contains(tag) && this.inline_tags.contains(tag); +}; + +WYMeditor.XhtmlSaxListener.prototype.insertContentAfterClosingTag = function(tag, content) +{ + this._insertContentWhenClosingTag('after', tag, content); +}; + +WYMeditor.XhtmlSaxListener.prototype.insertContentBeforeClosingTag = function(tag, content) +{ + this._insertContentWhenClosingTag('before', tag, content); +}; + +WYMeditor.XhtmlSaxListener.prototype.fixNestingBeforeOpeningBlockTag = function(tag, attributes) +{ + if(tag != 'li' && (tag == 'ul' || tag == 'ol') && this.last_tag && !this.last_tag_opened && this.last_tag == 'li'){ + this.output = this.output.replace(/<\/li>$/, ''); + this.insertContentAfterClosingTag(tag, ''); } - - this._initialized = true; - - //init designMode - this._doc.designMode="on"; - try{ - // (bermi's note) noticed when running unit tests on IE6 - // Is this really needed, it trigger an unexisting property on IE6 - this._doc = iframe.contentWindow.document; - }catch(e){} }; -WymClassExplorer.prototype._exec = function(cmd,param) { +WYMeditor.XhtmlSaxListener.prototype._insertContentWhenClosingTag = function(position, tag, content) +{ + if(!this['_insert_'+position+'_closing']){ + this['_insert_'+position+'_closing'] = []; + } + if(!this['_insert_'+position+'_closing'][tag]){ + this['_insert_'+position+'_closing'][tag] = []; + } + this['_insert_'+position+'_closing'][tag].push(content); +}; - switch(cmd) { - - case WYM_INDENT: case WYM_OUTDENT: - - var container = this.findUp(this.container(), WYM_LI); - if(container) - this._doc.execCommand(cmd); - break; - default: - if(param) this._doc.execCommand(cmd,false,param); - else this._doc.execCommand(cmd); - break; - } - - this.listen(); +WYMeditor.XhtmlSaxListener.prototype._getClosingTagContent = function(position, tag) +{ + if( this['_insert_'+position+'_closing'] && + this['_insert_'+position+'_closing'][tag] && + this['_insert_'+position+'_closing'][tag].length > 0){ + return this['_insert_'+position+'_closing'][tag].pop(); + } + return ''; }; -WymClassExplorer.prototype.selected = function() { - var caretPos = this._iframe.contentWindow.document.caretPos; - if(caretPos!=null) { - if(caretPos.parentElement!=undefined) - return(caretPos.parentElement()); +/********** CSS PARSER **********/ + + +WYMeditor.WymCssLexer = function(parser, only_wym_blocks) +{ + var only_wym_blocks = (only_wym_blocks == undefined ? true : only_wym_blocks); + + jQuery.extend(this, new WYMeditor.Lexer(parser, (only_wym_blocks?'Ignore':'WymCss'))); + + this.mapHandler('WymCss', 'Ignore'); + + if(only_wym_blocks == true){ + this.addEntryPattern("/\\\x2a[<\\s]*WYMeditor[>\\s]*\\\x2a/", 'Ignore', 'WymCss'); + this.addExitPattern("/\\\x2a[<\/\\s]*WYMeditor[>\\s]*\\\x2a/", 'WymCss'); + } + + this.addSpecialPattern("\\\x2e[a-z-_0-9]+[\\sa-z]*", 'WymCss', 'WymCssStyleDeclaration'); + + this.addEntryPattern("/\\\x2a", 'WymCss', 'WymCssComment'); + this.addExitPattern("\\\x2a/", 'WymCssComment'); + + this.addEntryPattern("\x7b", 'WymCss', 'WymCssStyle'); + this.addExitPattern("\x7d", 'WymCssStyle'); + + this.addEntryPattern("/\\\x2a", 'WymCssStyle', 'WymCssFeddbackStyle'); + this.addExitPattern("\\\x2a/", 'WymCssFeddbackStyle'); + + return this; +}; + +WYMeditor.WymCssParser = function() +{ + this._in_style = false; + this._has_title = false; + this.only_wym_blocks = true; + this.css_settings = {'classesItems':[], 'editorStyles':[], 'dialogStyles':[]}; + return this; +}; + +WYMeditor.WymCssParser.prototype.parse = function(raw, only_wym_blocks) +{ + var only_wym_blocks = (only_wym_blocks == undefined ? this.only_wym_blocks : only_wym_blocks); + this._Lexer = new WYMeditor.WymCssLexer(this, only_wym_blocks); + this._Lexer.parse(raw); +}; + +WYMeditor.WymCssParser.prototype.Ignore = function(match, state) +{ + return true; +}; + +WYMeditor.WymCssParser.prototype.WymCssComment = function(text, status) +{ + if(text.match(/end[a-z0-9\s]*wym[a-z0-9\s]*/mi)){ + return false; + } + if(status == WYMeditor.LEXER_UNMATCHED){ + if(!this._in_style){ + this._has_title = true; + this._current_item = {'title':text.trim()}; + }else{ + if(this._current_item[this._current_element]){ + if(!this._current_item[this._current_element].expressions){ + this._current_item[this._current_element].expressions = [text]; + }else{ + this._current_item[this._current_element].expressions.push(text); } + } + } + this._in_style = true; + } + return true; }; -WymClassExplorer.prototype.saveCaret = function() { +WYMeditor.WymCssParser.prototype.WymCssStyle = function(match, status) +{ + if(status == WYMeditor.LEXER_UNMATCHED){ + match = match.trim(); + if(match != ''){ + this._current_item[this._current_element].style = match; + } + }else if (status == WYMeditor.LEXER_EXIT){ + this._in_style = false; + this._has_title = false; + this.addStyleSetting(this._current_item); + } + return true; +}; - this._doc.caretPos = this._doc.selection.createRange(); +WYMeditor.WymCssParser.prototype.WymCssFeddbackStyle = function(match, status) +{ + if(status == WYMeditor.LEXER_UNMATCHED){ + this._current_item[this._current_element].feedback_style = match.replace(/^([\s\/\*]*)|([\s\/\*]*)$/gm,''); + } + return true; }; -WymClassExplorer.prototype.addCssRule = function(styles, oCss) { +WYMeditor.WymCssParser.prototype.WymCssStyleDeclaration = function(match) +{ + match = match.replace(/^([\s\.]*)|([\s\.*]*)$/gm, ''); - styles.addRule(oCss.name, oCss.css); + var tag = ''; + if(match.indexOf(' ') > 0){ + var parts = match.split(' '); + this._current_element = parts[0]; + var tag = parts[1]; + }else{ + this._current_element = match; + } + + if(!this._has_title){ + this._current_item = {'title':(!tag?'':tag.toUpperCase()+': ')+this._current_element}; + this._has_title = true; + } + + if(!this._current_item[this._current_element]){ + this._current_item[this._current_element] = {'name':this._current_element}; + } + if(tag){ + if(!this._current_item[this._current_element].tags){ + this._current_item[this._current_element].tags = [tag]; + }else{ + this._current_item[this._current_element].tags.push(tag); + } + } + return true; }; -//keyup handler -WymClassExplorer.prototype.keyup = function() { - this._selected_image = null; +WYMeditor.WymCssParser.prototype.addStyleSetting = function(style_details) +{ + for (var name in style_details){ + var details = style_details[name]; + if(typeof details == 'object' && name != 'title'){ + + this.css_settings.classesItems.push({ + 'name': details.name.trim(), + 'title': style_details.title, + 'expr' : (details.expressions||details.tags).join(', ').trim() + }); + if(details.feedback_style){ + this.css_settings.editorStyles.push({ + 'name': '.'+details.name.trim(), + 'css': details.feedback_style + }); + } + if(details.style){ + this.css_settings.dialogStyles.push({ + 'name': '.'+details.name.trim(), + 'css': details.style + }); + } + } + } }; +/********** HELPERS **********/ -WymClassExplorer.prototype.setFocusToNode = function(node) { - var range = this._doc.selection.createRange(); - range.moveToElementText(node); - range.collapse(false); - range.move('character',-1); - range.select(); - node.focus(); +// Returns true if it is a text node with whitespaces only +jQuery.fn.isPhantomNode = function() { + if (this[0].nodeType == 3) + return !(/[^\t\n\r ]/.test(this[0].data)); + + return false; }; + +WYMeditor.isPhantomNode = function(n) { + if (n.nodeType == 3) + return !(/[^\t\n\r ]/.test(n.data)); + + return false; +}; + +WYMeditor.isPhantomString = function(str) { + return !(/[^\t\n\r ]/.test(str)); +}; + +// Returns the Parents or the node itself +// jqexpr = a jQuery expression +jQuery.fn.parentsOrSelf = function(jqexpr) { + var n = this; + + if (n[0].nodeType == 3) + n = n.parents().slice(0,1); + +// if (n.is(jqexpr)) // XXX should work, but doesn't (probably a jQuery bug) + if (n.filter(jqexpr).size() == 1) + return n; + else + return n.parents(jqexpr).slice(0,1); +}; + +// String helpers +if(!String.prototype.insertAt) { + String.prototype.insertAt = function(inserted, pos) { + return(this.substr(0,pos) + inserted + this.substring(pos)); + }; +}; + +if(!String.prototype.replaceAll) { + String.prototype.replaceAll = function(old, rep) { + var rExp = new RegExp(old, "g"); + return(this.replace(rExp, rep)); + }; +}; + +if(!String.prototype.trim) { + String.prototype.trim = function() { + return this.replace(/^(\s*)|(\s*)$/gm,''); + }; +}; + +// Array helpers + +// from http://forum.de.selfhtml.org/archiv/2004/3/t76079/#m438193 (2007-02-06) +if(!Array.prototype.contains) { + Array.prototype.contains = function (elem) { + for (var i = 0; i < this.length; i++) { + if (this[i] === elem) return true; + } + return false; + }; +}; + +if(!Array.prototype.indexof) { + Array.prototype.indexOf = function (item) { + var ret=-1; + for(var i = 0; i < this.length; i++) { + if (this[i] == item) { + ret=i; + break; + } + } + return(ret); + }; +}; + +if(!Array.prototype.findByName) { + Array.prototype.findByName = function (name) { + for(var i = 0; i < this.length; i++) { + var item = this[i]; + if(item.name == name) return(item); + } + return(null); + }; +}; +/* + * WYMeditor : what you see is What You Mean web-based editor + * Copyright (c) 2008 Jean-Francois Hovinne, http://www.wymeditor.org/ + * Dual licensed under the MIT (MIT-license.txt) + * and GPL (GPL-license.txt) licenses. + * + * For further information visit: + * http://www.wymeditor.org/ + * + * File Name: + * jquery.wymeditor.explorer.js + * MSIE specific class and functions. + * See the documentation for more info. + * + * File Authors: + * Jean-Francois Hovinne (jf.hovinne a-t wymeditor dotorg) + * Bermi Ferrer (wymeditor a-t bermi dotorg) + * Frédéric Palluel-Lafleur (fpalluel a-t gmail dotcom) + */ +WYMeditor.WymClassExplorer = function(wym) { + + this._wym = wym; + this._class = "className"; + this._newLine = "\r\n"; +}; + +WYMeditor.WymClassExplorer.prototype.initIframe = function(iframe) { + + //This function is executed twice, though it is called once! + //But MSIE needs that, otherwise designMode won't work. + //Weird. + + this._iframe = iframe; + this._doc = iframe.contentWindow.document; + + //add css rules from options + var styles = this._doc.styleSheets[0]; + var aCss = eval(this._options.editorStyles); + + this.addCssRules(this._doc, aCss); + + this._doc.title = this._wym._index; + + //init html value + jQuery(this._doc.body).html(this._wym._html); + + //handle events + var wym = this; + + this._doc.body.onfocus = function() + {wym._doc.designMode = "on"; wym._doc = iframe.contentWindow.document;}; + this._doc.onbeforedeactivate = function() {wym.saveCaret();}; + this._doc.onkeyup = function() { + wym.saveCaret(); + wym.keyup(); + }; + this._doc.onclick = function() {wym.saveCaret();}; + + this._doc.body.onbeforepaste = function() { + wym._iframe.contentWindow.event.returnValue = false; + }; + + this._doc.body.onpaste = function() { + wym._iframe.contentWindow.event.returnValue = false; + wym.paste(window.clipboardData.getData("Text")); + }; + + //callback can't be executed twice, so we check + if(this._initialized) { + + //pre-bind functions + if(jQuery.isFunction(this._options.preBind)) this._options.preBind(this); + + //bind external events + this._wym.bindEvents(); + + // NOTE v.mische this part will be changed on event-hacking + jQuery(this._doc).bind("keydown", this.handleKeydown); + + //post-init functions + if(jQuery.isFunction(this._options.postInit)) this._options.postInit(this); + + //add event listeners to doc elements, e.g. images + this.listen(); + } + + this._initialized = true; + + //init designMode + this._doc.designMode="on"; + try{ + // (bermi's note) noticed when running unit tests on IE6 + // Is this really needed, it trigger an unexisting property on IE6 + this._doc = iframe.contentWindow.document; + }catch(e){} +}; + +WYMeditor.WymClassExplorer.prototype._exec = function(cmd,param) { + + switch(cmd) { + + case WYMeditor.INDENT: case WYMeditor.OUTDENT: + + var container = this.findUp(this.container(), WYMeditor.LI); + if(container) + this._doc.execCommand(cmd); + break; + default: + if(param) this._doc.execCommand(cmd,false,param); + else this._doc.execCommand(cmd); + break; + } + + this.listen(); +}; + +WYMeditor.WymClassExplorer.prototype.selected = function() { + + var caretPos = this._iframe.contentWindow.document.caretPos; + if(caretPos!=null) { + if(caretPos.parentElement!=undefined) + return(caretPos.parentElement()); + } +}; + +WYMeditor.WymClassExplorer.prototype.saveCaret = function() { + + this._doc.caretPos = this._doc.selection.createRange(); +}; + +WYMeditor.WymClassExplorer.prototype.addCssRule = function(styles, oCss) { + + styles.addRule(oCss.name, oCss.css); +}; + +//keyup handler +WYMeditor.WymClassExplorer.prototype.keyup = function() { + this._selected_image = null; +}; + + +WYMeditor.WymClassExplorer.prototype.setFocusToNode = function(node) { + var range = this._doc.selection.createRange(); + range.moveToElementText(node); + range.collapse(false); + range.move('character',-1); + range.select(); + node.focus(); +}; + +WYMeditor.WymClassExplorer.prototype.handleKeydown = function(evt) { + + //'this' is the doc + var wym = WYMeditor.INSTANCES[this.title]; + + // "start" Selection API + var sel = wym.selection.getSelection(); + +/* + // some small tests for the Selection API + var containers = WYMeditor.MAIN_CONTAINERS.join(","); + if (sel.isAtStart(containers)) + alert("isAtStart: "+sel.startNode.parentNode.nodeName); + if (sel.isAtEnd(containers)) + alert("isAtEnd: "+sel.endNode.parentNode.nodeName); + if (evt.keyCode==WYMeditor.KEY.DELETE) { + // if deleteIfExpanded wouldn't work, no selected text would be + // deleted if you press del-key + if (sel.deleteIfExpanded()) + return false; + } + if (evt.keyCode==WYMeditor.KEY.HOME) { + // if cursorToStart won't work, the cursor won't be set to start + // if you press home-key + sel.cursorToStart(sel.container); + return false; + } + if (evt.keyCode==WYMeditor.KEY.END) + { + // if cursorToEnd won't work, the cursor won't be set to the end + // if you press end-key + sel.cursorToEnd(sel.container); + return false; + } +*/ +}; + +/********** SELECTION API **********/ +/* +Class: WymSelExplorer + Implementation of the Selection API for Microsoft Internet Explorer + +Properties: + original - (object) Selection Object + isCollapsed - (boolean) True if selection is collapsed to single position + startNode - (DOM node) Node where the selection starts + startOffset - (integer) Offset of the position in startNode + endNode - (DOM node) Node where the selection ends + endOffset - (integer) Offset of the position in endNode + container - (DOM node) Node which includes the whole selection + +Example: + "|" marks the start and the end of the selection. + (start code) +

    A sm|all examp|le.

    + (end code) + + isCollapsed - false + startNode - "small" + startOffset - 2 + endNode - " example" + endOffset - 6 + container -

    ...

    +*/ +WYMeditor.WymSelExplorer = function(wym) { + this._wym = wym; +}; + +WYMeditor.WymSelExplorer.prototype = { + /* + Property: getSelection + Return a Selection API object + + Example: + (start code) + var sel = wym.selection.getSelection(); + (end code) + + Returns: + (object) Selection API object + */ + getSelection: function() { + var sel = this._wym._iframe.contentWindow.document.selection; + var range = sel.createRange(); + + this.original = sel; + + if (sel.type == "None") + this.isCollapsed = true; + else + this.isCollapsed = false; + + // get start of the selection (resp. cursor position if collapsed) + var selStart = this._getNodeAndOffset(range.duplicate(), true); + this.startNode = selStart.node; + this.startOffset = selStart.offset; + + if (this.isCollapsed) { + this.endNode = this.startNode; + this.endOffset = this.startOffset; + } + else { + var selEnd = this._getNodeAndOffset(range.duplicate(), false); + this.endNode = selEnd.node; + this.endOffset = selEnd.offset; + } + + this.container = jQuery(range.parentElement()).parentsOrSelf( + WYMeditor.MAIN_CONTAINERS.join(","))[0]; + + return this; + }, + + + _getNodeAndOffset: function(range, collapseToStart) { + var parentElement = range.parentElement(); + + // range from the beginning of parentElement to cursor position + var parentRange = range.duplicate(); + + // length of parentElement's text + var parentLength; + + // offset from the beginning of parentElements to the cursor position + var parentOffset = 0; + + // offset of the position to its node + var offset = 0; + + // collapse to start or end + range.collapse(collapseToStart); + // select parent node and set range from the beginning of that node to + // the cursor position + parentRange.moveToElementText(parentElement); + parentLength = parentRange.text.length; + // XXX v.mische fix it + var backwardRange = parentRange.duplicate(); + var searchRange = parentRange.duplicate(); + + + parentRange.setEndPoint("EndToStart", range); + parentOffset = parentRange.text.length; + + // direction to search + // 1 = forward + // -1 = backward + var direction = 1; + + // where to start to find the position + var childPosition = 0; + + // ratio of the cursor position to the total parentElement text length + var offsetRatio = parentOffset/parentLength; + + // offset from start (if search direction==-1: end) to the child node + // we are currently at while searching the position + // finally: position of the cursor within its node + var offset = 0; + + var childNodes = parentElement.childNodes; + + // try to find a better start position for searching + //if (childNodes.length>20 && offsetRatio>0.1) { + if (childNodes.length>20 && offsetRatio>0.1) { + // range around the appropriate node + var childRange = searchRange.duplicate(); + // length from start to the beginning of a node near the node + // of the position we are looking for + //var childOffsetRange = parentRange.duplicate(); + + childPosition = Math.round(offsetRatio * childNodes.length-1); + + if (childPosition <= 0) + childPosition = 1; + + // moveToElementText doesn't work with text nodes + while ((childNodes[childPosition].nodeType == WYMeditor.NODE.TEXT + || childNodes[childPosition].nodeName == "BR") + && childPosition > 0) { + childPosition--; + } + + if (childPosition > 0) { + childRange.moveToElementText(childNodes[childPosition]); + // Range from start of parent node to the start of the proposed + // child node + childRange.setEndPoint("EndToStart", searchRange); + + // search forward + if (parentOffset > childRange.text.length) { + direction = 1; + searchRange.setEndPoint("StartToEnd", childRange); + searchRange.setEndPoint("EndToEnd", parentRange); + } + // search backwards + else { + direction = -1; + searchRange.setEndPoint("StartToEnd", parentRange); + searchRange.setEndPoint("EndToEnd", childRange); + + // caused by ranges + childPosition--; + } + + } + // start at the beginning + else { + direction = 1; + searchRange = parentRange.duplicate(); + } + } + else { + if (direction == 1) + searchRange = parentRange.duplicate(); + else { + searchRange = backwardRange.duplicate(); + searchRange.setEndPoint("StartToEnd", parentRange); + } + } + + var node=parentElement.childNodes[childPosition]; + + + var currentOffsetRange = searchRange.duplicate(); + if (direction==1) { + // text length of the current node + var nodeLength = 0; + var br = 0; + + while (node) { + if (node.nodeName == 'BR') + br++; + nodeLength = this._getTextLength(node); + if (currentOffsetRange.text.length > nodeLength) { + currentOffsetRange.moveStart('character', nodeLength + br); + br = 0; + } + else + break; + + node = node.nextSibling; + } + offset = currentOffsetRange.text.length; + } + // go backwards + else { + var nodeLength = 0; + var br = 0; + + while (node) { + if (node.nodeName == 'BR') + br++; + nodeLength = this._getTextLength(node); + + if (currentOffsetRange.text.length > nodeLength) { + var length = currentOffsetRange.text.length; + currentOffsetRange.moveEnd('character', -(nodeLength+br)); + // NOTE v.mische Sometimes the range isn't move as far as + // expected. I don't know whenwhy it happens, but it does + if (br == 0) { + var diff = (length-nodeLength) - currentOffsetRange.text.length; + currentOffsetRange.moveEnd('character', diff); + } + br = 0; + } + else + break; + + if (node.previousSibling) + node = node.previousSibling; + else + break; + } + + offset = nodeLength - currentOffsetRange.text.length; + } + + return {'node': node, 'offset': offset}; + }, + + /* + Property: _getTextLength + Get the length of the text of a DOM node. + + Arguments: + node - (DOM node) [required] The node you what to know the length of. + + Example: + (start code) + var node = document.createTextNode("foo"); + _getTextLength(node) // returns 3 + (end code) + + Returns: + (int) Length of a DOM node. + */ + _getTextLength: function(node) { + if (node.nodeType == WYMeditor.NODE.ELEMENT) + return node.innerText.length; + else if (node.nodeType == WYMeditor.NODE.TEXT) + return node.data.length; + }, + + /* + Property: deleteIfExpanded + Delete contents of a selection + + Example: + (start code) + var sel = wym.selection.getSelection(); + sel.deleteIfExpanded(); + (end code) + + Returns: + (boolean) True if it was expanded and thus deleted + */ + deleteIfExpanded: function() { + if(!this.isCollapsed) { + this.original.clear(); + return true; + } + return false; + } +}; + /* * WYMeditor : what you see is What You Mean web-based editor - * Copyright (C) 2007 H.O.net - http://www.honet.be/ + * Copyright (c) 2008 Jean-Francois Hovinne, http://www.wymeditor.org/ * Dual licensed under the MIT (MIT-license.txt) * and GPL (GPL-license.txt) licenses. * @@ -1647,20 +4381,20 @@ * See the documentation for more info. * * File Authors: - * Jean-Francois Hovinne (jf.hovinne@wymeditor.org) - * Volker Mische (vmx@gmx.de) + * Jean-Francois Hovinne (jf.hovinne a-t wymeditor dotorg) + * Volker Mische (vmx a-t gmx dotde) * Bermi Ferrer (wymeditor a-t bermi dotorg) - * Frédéric Palluel-Lafleur (fpalluel@gmail.com) + * Frédéric Palluel-Lafleur (fpalluel a-t gmail dotcom) */ -function WymClassMozilla(wym) { +WYMeditor.WymClassMozilla = function(wym) { this._wym = wym; this._class = "class"; this._newLine = "\n"; }; -WymClassMozilla.prototype.initIframe = function(iframe) { +WYMeditor.WymClassMozilla.prototype.initIframe = function(iframe) { this._iframe = iframe; this._doc = iframe.contentDocument; @@ -1705,7 +4439,7 @@ /* @name html * @description Get/Set the html value */ -WymClassMozilla.prototype.html = function(html) { +WYMeditor.WymClassMozilla.prototype.html = function(html) { if(html) { @@ -1728,30 +4462,30 @@ else return(jQuery(this._doc.body).html()); }; -WymClassMozilla.prototype._exec = function(cmd,param) { +WYMeditor.WymClassMozilla.prototype._exec = function(cmd,param) { if(!this.selected()) return(false); switch(cmd) { - case WYM_INDENT: case WYM_OUTDENT: + case WYMeditor.INDENT: case WYMeditor.OUTDENT: var focusNode = this.selected(); var sel = this._iframe.contentWindow.getSelection(); var anchorNode = sel.anchorNode; if(anchorNode.nodeName == "#text") anchorNode = anchorNode.parentNode; - focusNode = this.findUp(focusNode, WYM_BLOCKS); - anchorNode = this.findUp(anchorNode, WYM_BLOCKS); + focusNode = this.findUp(focusNode, WYMeditor.BLOCKS); + anchorNode = this.findUp(anchorNode, WYMeditor.BLOCKS); if(focusNode && focusNode == anchorNode - && focusNode.tagName.toLowerCase() == WYM_LI) { + && focusNode.tagName.toLowerCase() == WYMeditor.LI) { var ancestor = focusNode.parentNode.parentNode; if(focusNode.parentNode.childNodes.length>1 - || ancestor.tagName.toLowerCase() == WYM_OL - || ancestor.tagName.toLowerCase() == WYM_UL) + || ancestor.tagName.toLowerCase() == WYMeditor.OL + || ancestor.tagName.toLowerCase() == WYMeditor.UL) this._doc.execCommand(cmd,'',null); } @@ -1765,8 +4499,8 @@ //set to P if parent = BODY var container = this.selected(); - if(container.tagName.toLowerCase() == WYM_BODY) - this._exec(WYM_FORMAT_BLOCK, WYM_P); + if(container.tagName.toLowerCase() == WYMeditor.BODY) + this._exec(WYMeditor.FORMAT_BLOCK, WYMeditor.P); //add event handlers on doc elements @@ -1776,7 +4510,7 @@ /* @name selected * @description Returns the selected container */ -WymClassMozilla.prototype.selected = function() { +WYMeditor.WymClassMozilla.prototype.selected = function() { var sel = this._iframe.contentWindow.getSelection(); var node = sel.focusNode; @@ -1786,38 +4520,69 @@ } else return(null); }; -WymClassMozilla.prototype.addCssRule = function(styles, oCss) { +WYMeditor.WymClassMozilla.prototype.addCssRule = function(styles, oCss) { styles.insertRule(oCss.name + " {" + oCss.css + "}", styles.cssRules.length); }; //keydown handler, mainly used for keyboard shortcuts -WymClassMozilla.prototype.keydown = function(evt) { +WYMeditor.WymClassMozilla.prototype.keydown = function(evt) { //'this' is the doc - var wym = WYM_INSTANCES[this.title]; + var wym = WYMeditor.INSTANCES[this.title]; + // "start" Selection API + var sel = wym.selection.getSelection(); + +/* + // some small tests for the Selection API + var containers = WYMeditor.MAIN_CONTAINERS.join(","); + if (sel.isAtStart(containers)) + alert("isAtStart: "+sel.startNode.parentNode.nodeName); + if (sel.isAtEnd(containers)) + alert("isAtEnd: "+sel.endNode.parentNode.nodeName); + if (evt.keyCode==WYMeditor.KEY.DELETE) { + // if deleteIfExpanded wouldn't work, no selected text would be + // deleted if you press del-key + if (sel.deleteIfExpanded()) + return false; + } + if (evt.keyCode==WYMeditor.KEY.HOME) { + // if cursorToStart won't work, the cursor won't be set to start + // if you press home-key + sel.cursorToStart(sel.container); + return false; + } + if (evt.keyCode==WYMeditor.KEY.END) + { + // if cursorToEnd won't work, the cursor won't be set to the end + // if you press end-key + sel.cursorToEnd(sel.container); + return false; + } +*/ + if(evt.ctrlKey){ if(evt.keyCode == 66){ //CTRL+b => STRONG - wym._exec(WYM_BOLD); + wym._exec(WYMeditor.BOLD); return false; } if(evt.keyCode == 73){ //CTRL+i => EMPHASIS - wym._exec(WYM_ITALIC); + wym._exec(WYMeditor.ITALIC); return false; } } }; //keyup handler, mainly used for cleanups -WymClassMozilla.prototype.keyup = function(evt) { +WYMeditor.WymClassMozilla.prototype.keyup = function(evt) { //'this' is the doc - var wym = WYM_INSTANCES[this.title]; + var wym = WYMeditor.INSTANCES[this.title]; wym._selected_image = null; var container = null; @@ -1826,12 +4591,12 @@ //RETURN key //cleanup

    between paragraphs - jQuery(wym._doc.body).children(WYM_BR).remove(); + jQuery(wym._doc.body).children(WYMeditor.BR).remove(); //fix PRE bug #73 container = wym.selected(); - if(container && container.tagName.toLowerCase() == WYM_PRE) - wym._exec(WYM_FORMAT_BLOCK, WYM_P); //create P after PRE + if(container && container.tagName.toLowerCase() == WYMeditor.PRE) + wym._exec(WYMeditor.FORMAT_BLOCK, WYMeditor.P); //create P after PRE } else if(evt.keyCode != 8 @@ -1859,11 +4624,11 @@ ) name = container.parentNode.tagName.toLowerCase(); - if(name == WYM_BODY) wym._exec(WYM_FORMAT_BLOCK, WYM_P); + if(name == WYMeditor.BODY) wym._exec(WYMeditor.FORMAT_BLOCK, WYMeditor.P); } }; -WymClassMozilla.prototype.enableDesignMode = function() { +WYMeditor.WymClassMozilla.prototype.enableDesignMode = function() { if(this.designMode == "off") { try { this.designMode = "on"; @@ -1872,7 +4637,7 @@ } }; -WymClassMozilla.prototype.setFocusToNode = function(node) { +WYMeditor.WymClassMozilla.prototype.setFocusToNode = function(node) { var range = document.createRange(); range.selectNode(node); var selected = this._iframe.contentWindow.getSelection(); @@ -1881,7 +4646,7 @@ this._iframe.contentWindow.focus(); }; -WymClassMozilla.prototype.openBlockTag = function(tag, attributes) +WYMeditor.WymClassMozilla.prototype.openBlockTag = function(tag, attributes) { var attributes = this.validator.getValidTagAttributes(tag, attributes); @@ -1901,17 +4666,95 @@ this.output += this.helper.tag(tag, attributes, true); }; -WymClassMozilla.prototype.getTagForStyle = function(style) { +WYMeditor.WymClassMozilla.prototype.getTagForStyle = function(style) { if(/bold/.test(style)) return 'strong'; if(/italic/.test(style)) return 'em'; if(/sub/.test(style)) return 'sub'; if(/sub/.test(style)) return 'super'; return false; }; + +/********** SELECTION API **********/ + +WYMeditor.WymSelMozilla = function(wym) { + this._wym = wym; +}; + +WYMeditor.WymSelMozilla.prototype = { + getSelection: function() { + var _sel = this._wym._iframe.contentWindow.getSelection(); + // NOTE v.mische can startNode/endNote be phantom nodes? + this.startNode = _sel.getRangeAt(0).startContainer; + this.endNode = _sel.getRangeAt(0).endContainer; + this.startOffset = _sel.getRangeAt(0).startOffset; + this.endOffset = _sel.getRangeAt(0).endOffset; + this.isCollapsed = _sel.isCollapsed; + this.original = _sel; + this.container = jQuery(this.startNode).parentsOrSelf( + WYMeditor.MAIN_CONTAINERS.join(","))[0]; + + return this; + }, + + cursorToStart: function(jqexpr) { + if (jqexpr.nodeType == WYMeditor.NODE.TEXT) + jqexpr = jqexpr.parentNode; + + var firstTextNode = jQuery(jqexpr)[0]; + + while (firstTextNode.nodeType!=WYMeditor.NODE.TEXT) { + if (!firstTextNode.hasChildNodes()) + break; + firstTextNode = firstTextNode.firstChild; + } + + if (WYMeditor.isPhantomNode(firstTextNode)) + firstTextNode = firstTextNode.nextSibling; + + // e.g. an + if (firstTextNode.nodeType == WYMeditor.NODE.ELEMENT) + this.original.collapse(firstTextNode.parentNode, 0); + else + this.original.collapse(firstTextNode, 0); + }, + + cursorToEnd: function(jqexpr) { + if (jqexpr.nodeType == WYMeditor.NODE.TEXT) + jqexpr = jqexpr.parentNode; + + var lastTextNode = jQuery(jqexpr)[0]; + + while (lastTextNode.nodeType!=WYMeditor.NODE.TEXT) { + if (!lastTextNode.hasChildNodes()) + break; + lastTextNode = lastTextNode.lastChild; + } + + if (WYMeditor.isPhantomNode(lastTextNode)) + lastTextNode = lastTextNode.previousSibling; + + // e.g. an + if (lastTextNode.nodeType == WYMeditor.NODE.ELEMENT) + this.original.collapse(lastTextNode.parentNode, + lastTextNode.parentNode.childNodes.length); + else + this.original.collapse(lastTextNode, lastTextNode.length); + }, + + deleteIfExpanded: function() { + if(!this.original.isCollapsed) { + this.original.deleteFromDocument(); + return true; + } + return false; + } +}; + + /* * WYMeditor : what you see is What You Mean web-based editor - * Copyright (C) 2007 H.O.net - http://www.honet.be/ + * Copyright (c) 2008 Jean-Francois Hovinne, http://www.wymeditor.org/ * Dual licensed under the MIT (MIT-license.txt) * and GPL (GPL-license.txt) licenses. * @@ -1924,17 +4767,17 @@ * See the documentation for more info. * * File Authors: - * Jean-Francois Hovinne (jf.hovinne@wymeditor.org) + * Jean-Francois Hovinne (jf.hovinne a-t wymeditor dotorg) */ -function WymClassOpera(wym) { +WYMeditor.WymClassOpera = function(wym) { this._wym = wym; this._class = "class"; this._newLine = "\r\n"; }; -WymClassOpera.prototype.initIframe = function(iframe) { +WYMeditor.WymClassOpera.prototype.initIframe = function(iframe) { this._iframe = iframe; this._doc = iframe.contentWindow.document; @@ -1958,13 +4801,16 @@ //hide indent and outdent until supported jQuery(this._box).find(this._options.toolSelector - + '[@name=' + WYM_INDENT +']').hide(); + + '[@name=' + WYMeditor.INDENT +']').hide(); jQuery(this._box).find(this._options.toolSelector - + '[@name=' + WYM_OUTDENT +']').hide(); + + '[@name=' + WYMeditor.OUTDENT +']').hide(); //bind external events this._wym.bindEvents(); + //bind editor keydown events + jQuery(this._doc).bind("keydown", this.keydown); + //bind editor events jQuery(this._doc).bind("keyup", this.keyup); @@ -1975,11 +4821,11 @@ this.listen(); }; -WymClassOpera.prototype._exec = function(cmd,param) { +WYMeditor.WymClassOpera.prototype._exec = function(cmd,param) { switch(cmd) { - case WYM_INDENT: case WYM_OUTDENT: + case WYMeditor.INDENT: case WYMeditor.OUTDENT: //TODO: support nested lists //Opera creates blockquotes this.status("Unsupported feature."); @@ -1993,7 +4839,7 @@ this.listen(); }; -WymClassOpera.prototype.selected = function() { +WYMeditor.WymClassOpera.prototype.selected = function() { var sel=this._iframe.contentWindow.getSelection(); var node=sel.focusNode; @@ -2003,21 +4849,516 @@ } else return(null); }; -WymClassOpera.prototype.addCssRule = function(styles, oCss) { +WYMeditor.WymClassOpera.prototype.addCssRule = function(styles, oCss) { styles.insertRule(oCss.name + " {" + oCss.css + "}", styles.cssRules.length); }; +//keydown handler +WYMeditor.WymClassOpera.prototype.keydown = function(evt) { + + //'this' is the doc + var wym = WYMeditor.INSTANCES[this.title]; + + // "start" Selection API + var sel = wym.selection.getSelection(); + +/* + // some small tests for the Selection API + var containers = WYMeditor.MAIN_CONTAINERS.join(","); + if (sel.isAtStart(containers)) + alert("isAtStart: "+sel.startNode.parentNode.nodeName); + if (sel.isAtEnd(containers)) + alert("isAtEnd: "+sel.endNode.parentNode.nodeName); + if (evt.keyCode==WYMeditor.KEY.DELETE) { + // if deleteIfExpanded wouldn't work, no selected text would be + // deleted if you press del-key + if (sel.deleteIfExpanded()) + return false; + } + if (evt.keyCode==WYMeditor.KEY.HOME) { + // if cursorToStart won't work, the cursor won't be set to start + // if you press home-key + sel.cursorToStart(sel.container); + return false; + } + if (evt.keyCode==WYMeditor.KEY.END) + { + // if cursorToEnd won't work, the cursor won't be set to the end + // if you press end-key + sel.cursorToEnd(sel.container); + return false; + } +*/ + + + //Get a P instead of no container + if(!sel.container + && evt.keyCode != WYMeditor.KEY.ENTER + && evt.keyCode != WYMeditor.KEY.LEFT + && evt.keyCode != WYMeditor.KEY.UP + && evt.keyCode != WYMeditor.KEY.RIGHT + && evt.keyCode != WYMeditor.KEY.DOWN + && evt.keyCode != WYMeditor.KEY.BACKSPACE + && evt.keyCode != WYMeditor.KEY.DELETE) + wym._exec(WYMeditor.FORMAT_BLOCK, WYMeditor.P); + +}; + //keyup handler -WymClassOpera.prototype.keyup = function(evt) { +WYMeditor.WymClassOpera.prototype.keyup = function(evt) { //'this' is the doc - var wym = WYM_INSTANCES[this.title]; + var wym = WYMeditor.INSTANCES[this.title]; wym._selected_image = null; }; // TODO: implement me -WymClassOpera.prototype.setFocusToNode = function(node) { +WYMeditor.WymClassOpera.prototype.setFocusToNode = function(node) { }; + +/********** SELECTION API **********/ + +WYMeditor.WymSelOpera = function(wym) { + this._wym = wym; +}; + +WYMeditor.WymSelOpera.prototype = { + getSelection: function() { + var _sel = this._wym._iframe.contentWindow.getSelection(); + // NOTE v.mische can startNode/endNote be phantom nodes? + this.startNode = _sel.getRangeAt(0).startContainer; + this.endNode = _sel.getRangeAt(0).endContainer; + this.startOffset = _sel.getRangeAt(0).startOffset; + this.endOffset = _sel.getRangeAt(0).endOffset; + this.isCollapsed = _sel.isCollapsed; + this.original = _sel; + this.container = jQuery(this.startNode).parentsOrSelf( + WYMeditor.MAIN_CONTAINERS.join(","))[0]; + + return this; + }, + + cursorToStart: function(jqexpr) { + if (jqexpr.nodeType == WYMeditor.NODE.TEXT) + jqexpr = jqexpr.parentNode; + + var firstTextNode = jQuery(jqexpr)[0]; + + while (firstTextNode.nodeType!=WYMeditor.NODE.TEXT) { + if (!firstTextNode.hasChildNodes()) + break; + firstTextNode = firstTextNode.firstChild; + } + + if (WYMeditor.isPhantomNode(firstTextNode)) + firstTextNode = firstTextNode.nextSibling; + + // e.g. an + if (firstTextNode.nodeType == WYMeditor.NODE.ELEMENT) + this.original.collapse(firstTextNode.parentNode, 0); + else + this.original.collapse(firstTextNode, 0); + }, + + cursorToEnd: function(jqexpr) { + if (jqexpr.nodeType == WYMeditor.NODE.TEXT) + jqexpr = jqexpr.parentNode; + + var lastTextNode = jQuery(jqexpr)[0]; + + while (lastTextNode.nodeType!=WYMeditor.NODE.TEXT) { + if (!lastTextNode.hasChildNodes()) + break; + lastTextNode = lastTextNode.lastChild; + } + + if (WYMeditor.isPhantomNode(lastTextNode)) + lastTextNode = lastTextNode.previousSibling; + + // e.g. an + if (lastTextNode.nodeType == WYMeditor.NODE.ELEMENT) + this.original.collapse(lastTextNode.parentNode, + lastTextNode.parentNode.childNodes.length); + else + this.original.collapse(lastTextNode, lastTextNode.length); + }, + + deleteIfExpanded: function() { + if(!this.original.isCollapsed) { + this.original.deleteFromDocument(); + return true; + } + return false; + } +}; + + +/* + * WYMeditor : what you see is What You Mean web-based editor + * Copyright (c) 2008 Jean-Francois Hovinne, http://www.wymeditor.org/ + * Dual licensed under the MIT (MIT-license.txt) + * and GPL (GPL-license.txt) licenses. + * + * For further information visit: + * http://www.wymeditor.org/ + * + * File Name: + * jquery.wymeditor.safari.js + * Safari specific class and functions. + * See the documentation for more info. + * + * File Authors: + * Jean-Francois Hovinne (jf.hovinne a-t wymeditor dotorg) + * Scott Lewis (lewiscot a-t gmail dotcom) + */ + +WYMeditor.WymClassSafari = function(wym) { + + this._wym = wym; + this._class = "class"; + this._newLine = "\n"; +}; + +WYMeditor.WymClassSafari.prototype.initIframe = function(iframe) { + + this._iframe = iframe; + this._doc = iframe.contentDocument; + + //add css rules from options + + var styles = this._doc.styleSheets[0]; + var aCss = eval(this._options.editorStyles); + + this.addCssRules(this._doc, aCss); + + this._doc.title = this._wym._index; + + //init designMode + this._doc.designMode = "on"; + + //init html value + this.html(this._wym._html); + + //pre-bind functions + if(jQuery.isFunction(this._options.preBind)) this._options.preBind(this); + + //bind external events + this._wym.bindEvents(); + + //bind editor keydown events + jQuery(this._doc).bind("keydown", this.keydown); + + //bind editor keyup events + jQuery(this._doc).bind("keyup", this.keyup); + + //post-init functions + if(jQuery.isFunction(this._options.postInit)) this._options.postInit(this); + + //add event listeners to doc elements, e.g. images + this.listen(); +}; + +WYMeditor.WymClassSafari.prototype._exec = function(cmd,param) { + + if(!this.selected()) return(false); + + switch(cmd) { + + case WYMeditor.INDENT: case WYMeditor.OUTDENT: + + var focusNode = this.selected(); + var sel = this._iframe.contentWindow.getSelection(); + var anchorNode = sel.anchorNode; + if(anchorNode.nodeName == "#text") anchorNode = anchorNode.parentNode; + + focusNode = this.findUp(focusNode, WYMeditor.BLOCKS); + anchorNode = this.findUp(anchorNode, WYMeditor.BLOCKS); + + if(focusNode && focusNode == anchorNode + && focusNode.tagName.toLowerCase() == WYMeditor.LI) { + + var ancestor = focusNode.parentNode.parentNode; + + if(focusNode.parentNode.childNodes.length>1 + || ancestor.tagName.toLowerCase() == WYMeditor.OL + || ancestor.tagName.toLowerCase() == WYMeditor.UL) + this._doc.execCommand(cmd,'',null); + } + + break; + + case WYMeditor.INSERT_ORDEREDLIST: case WYMeditor.INSERT_UNORDEREDLIST: + + this._doc.execCommand(cmd,'',null); + + //Safari creates lists in e.g. paragraphs. + //Find the container, and remove it. + var focusNode = this.selected(); + var container = this.findUp(focusNode, WYMeditor.MAIN_CONTAINERS); + if(container) jQuery(container).replaceWith(jQuery(container).html()); + + break; + + default: + + if(param) this._doc.execCommand(cmd,'',param); + else this._doc.execCommand(cmd,'',null); + } + + //set to P if parent = BODY + var container = this.selected(); + if(container && container.tagName.toLowerCase() == WYMeditor.BODY) + this._exec(WYMeditor.FORMAT_BLOCK, WYMeditor.P); + + //add event handlers on doc elements + this.listen(); +}; + +/* @name selected + * @description Returns the selected container + */ +WYMeditor.WymClassSafari.prototype.selected = function() { + + var sel = this._iframe.contentWindow.getSelection(); + var node = sel.focusNode; + if(node) { + if(node.nodeName == "#text") return(node.parentNode); + else return(node); + } else return(null); +}; + +WYMeditor.WymClassSafari.prototype.addCssRule = function(styles, oCss) { + + styles.insertRule(oCss.name + " {" + oCss.css + "}", + styles.cssRules.length); +}; + + +//keydown handler, mainly used for keyboard shortcuts +WYMeditor.WymClassSafari.prototype.keydown = function(evt) { + + //'this' is the doc + var wym = WYMeditor.INSTANCES[this.title]; + + // "start" Selection API + //var sel = wym.selection.getSelection(); + +/* + // some small tests for the Selection API + var containers = WYMeditor.MAIN_CONTAINERS.join(","); + if (sel.isAtStart(containers)) + alert("isAtStart: "+sel.startNode.parentNode.nodeName); + if (sel.isAtEnd(containers)) + alert("isAtEnd: "+sel.endNode.parentNode.nodeName); + if (evt.keyCode==WYMeditor.KEY.DELETE) { + // if deleteIfExpanded wouldn't work, no selected text would be + // deleted if you press del-key + if (sel.deleteIfExpanded()) + return false; + } + if (evt.keyCode==WYMeditor.KEY.HOME) { + // if cursorToStart won't work, the cursor won't be set to start + // if you press home-key + sel.cursorToStart(sel.container); + return false; + } + if (evt.keyCode==WYMeditor.KEY.END) + { + // if cursorToEnd won't work, the cursor won't be set to the end + // if you press end-key + sel.cursorToEnd(sel.container); + return false; + } +*/ + + if(evt.ctrlKey){ + if(evt.keyCode == 66){ + //CTRL+b => STRONG + wym._exec(WYMeditor.BOLD); + return false; + } + if(evt.keyCode == 73){ + //CTRL+i => EMPHASIS + wym._exec(WYMeditor.ITALIC); + return false; + } + } +}; + +//keyup handler, mainly used for cleanups +WYMeditor.WymClassSafari.prototype.keyup = function(evt) { + + //'this' is the doc + var wym = WYMeditor.INSTANCES[this.title]; + + wym._selected_image = null; + var container = null; + + if(evt.keyCode == 13 && !evt.shiftKey) { + + //RETURN key + //cleanup

    between paragraphs + jQuery(wym._doc.body).children(WYMeditor.BR).remove(); + + //fix PRE bug #73 + container = wym.selected(); + if(container && container.tagName.toLowerCase() == WYMeditor.PRE) + wym._exec(WYMeditor.FORMAT_BLOCK, WYMeditor.P); //create P after PRE + } + + else if(evt.keyCode != 8 + && evt.keyCode != 17 + && evt.keyCode != 46 + && evt.keyCode != 224 + && !evt.metaKey + && !evt.ctrlKey) { + + //NOT BACKSPACE, NOT DELETE, NOT CTRL, NOT COMMAND + //text nodes replaced by P + + container = wym.selected(); + var name = container.tagName.toLowerCase(); + + //fix forbidden main containers + if( + name == "strong" || + name == "b" || + name == "em" || + name == "i" || + name == "sub" || + name == "sup" || + name == "a" + + ) name = container.parentNode.tagName.toLowerCase(); + + if(name == WYMeditor.BODY) wym._exec(WYMeditor.FORMAT_BLOCK, WYMeditor.P); + } +}; + +//TODO +WYMeditor.WymClassSafari.prototype.setFocusToNode = function(node) { + /*var range = document.createRange(); + range.selectNode(node); + var selected = this._iframe.contentWindow.getSelection(); + selected.addRange(range); + selected.collapse(node, node.childNodes.length); + this._iframe.contentWindow.focus();*/ +}; + +WYMeditor.WymClassSafari.prototype.openBlockTag = function(tag, attributes) +{ + var attributes = this.validator.getValidTagAttributes(tag, attributes); + + // Handle Safari styled spans + if(tag == 'span' && attributes.style) { + var new_tag = this.getTagForStyle(attributes.style); + if(new_tag){ + this._tag_stack.pop(); + var tag = new_tag; + this._tag_stack.push(new_tag); + attributes.style = ''; + } else { + return; + } + } + + this.output += this.helper.tag(tag, attributes, true); +}; + +WYMeditor.WymClassSafari.prototype.getTagForStyle = function(style) { + + if(/bold/.test(style)) return 'strong'; + if(/italic/.test(style)) return 'em'; + if(/sub/.test(style)) return 'sub'; + if(/super/.test(style)) return 'sup'; + return false; +}; + +/* @name xhtml + * @description Cleans up the HTML + */ +WYMeditor.editor.prototype.xhtml = function() { + jQuery('.Apple-style-span', this._doc.body).removeClass('Apple-style-span'); + return this.parser.parse(this.html()); +}; + +/********** SELECTION API **********/ + +WYMeditor.WymSelSafari = function(wym) { + this._wym = wym; +}; + +WYMeditor.WymSelSafari.prototype = { + getSelection: function() { + var _sel = this._wym._iframe.contentWindow.getSelection(); + // NOTE v.mische can startNode/endNote be phantom nodes? + this.startNode = _sel.getRangeAt(0).startContainer; + this.endNode = _sel.getRangeAt(0).endContainer; + this.startOffset = _sel.getRangeAt(0).startOffset; + this.endOffset = _sel.getRangeAt(0).endOffset; + this.isCollapsed = _sel.isCollapsed; + this.original = _sel; + this.container = jQuery(this.startNode).parentsOrSelf( + WYMeditor.MAIN_CONTAINERS.join(","))[0]; + + return this; + }, + + cursorToStart: function(jqexpr) { + if (jqexpr.nodeType == WYMeditor.NODE.TEXT) + jqexpr = jqexpr.parentNode; + + var firstTextNode = jQuery(jqexpr)[0]; + + while (firstTextNode.nodeType!=WYMeditor.NODE.TEXT) { + if (!firstTextNode.hasChildNodes()) + break; + firstTextNode = firstTextNode.firstChild; + } + + if (WYMeditor.isPhantomNode(firstTextNode)) + firstTextNode = firstTextNode.nextSibling; + + // e.g. an + if (firstTextNode.nodeType == WYMeditor.NODE.ELEMENT) + this.original.collapse(firstTextNode.parentNode, 0); + else + this.original.collapse(firstTextNode, 0); + }, + + cursorToEnd: function(jqexpr) { + if (jqexpr.nodeType == WYMeditor.NODE.TEXT) + jqexpr = jqexpr.parentNode; + + var lastTextNode = jQuery(jqexpr)[0]; + + while (lastTextNode.nodeType!=WYMeditor.NODE.TEXT) { + if (!lastTextNode.hasChildNodes()) + break; + lastTextNode = lastTextNode.lastChild; + } + + if (WYMeditor.isPhantomNode(lastTextNode)) + lastTextNode = lastTextNode.previousSibling; + + // e.g. an + if (lastTextNode.nodeType == WYMeditor.NODE.ELEMENT) + this.original.collapse(lastTextNode.parentNode, + lastTextNode.parentNode.childNodes.length); + else + this.original.collapse(lastTextNode, lastTextNode.length); + }, + + deleteIfExpanded: function() { + if(!this.original.isCollapsed) { + this.original.deleteFromDocument(); + return true; + } + return false; + } +}; + + Index: openacs-4/packages/xowiki/www/resources/wymeditor/jquery.wymeditor.pack.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/jquery.wymeditor.pack.js,v diff -u -r1.3 -r1.4 --- openacs-4/packages/xowiki/www/resources/wymeditor/jquery.wymeditor.pack.js 14 Sep 2007 17:53:31 -0000 1.3 +++ openacs-4/packages/xowiki/www/resources/wymeditor/jquery.wymeditor.pack.js 29 May 2008 19:13:44 -0000 1.4 @@ -1 +1 @@ -eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('f(!2y)9 2y=Y 1q();9 8P={63:\'63\',62:\'62\',4i:\'4i\',4h:\'4h\',8C:\'co 8T\',8B:\'cn 8T\',3m:\'3m\',3l:\'3l\',4g:\'4g\',4f:\'4f\',3j:\'3j\',4e:\'4e\',3i:\'3i\',2G:\'2G\',60:\'60\',5Y:\'5Y\',8w:\'2H 1\',8v:\'2H 2\',8u:\'2H 3\',8t:\'2H 4\',8s:\'2H 5\',8r:\'2H 6\',5X:\'5X\',5W:\'5W\',8q:\'2G cm\',4c:\'4c\',4b:\'4b\',88:\'cl 18\',5P:\'5P\',84:\'8S 8R 7Y\',82:\'8S 8R 7X\',2F:\'2F\',2E:\'2E\',8Q:\'8Q\',3k:\'3k\',49:\'61 ck cj\',64:\'64\',5Z:\'5Z\',5V:\'5V\',5U:\'5U\',8p:\'ci ch\'};2y[\'8F\']=8P;9 1r=Y 1q();9 43="o";9 1C="{cg}";9 7m="{cf}";9 5d="{ce}";9 5c="{cd}";9 5L="{cc}";9 7U="19/1X/";9 5b="{cb}";9 5K="{ca}";9 5B="{c9}";9 5D="{c8}";9 44="{c7}";9 5C="{c6}";9 5I="{c5}";9 5x="{c4}";9 5z="{c3}";9 5y="{c2}";9 5J="{c1}";9 5r="{c0}";9 5u="{bZ}";9 5t="{bY}";9 5s="{bX}";9 5H="{bW}";9 5G="{bV}";9 5F="{bU}";9 5a="{bT}";9 59="{bS}";9 23="H";9 7x="bR";9 2k="p";9 5o="8O";9 3L="1j";9 5n="8N";9 5m="8M";9 5l="8L";9 5k="8K";9 3C="8I";9 3a="1E";9 3b="8H";9 3c="8G";9 2V="a";9 6i="br";9 4H="70";9 6K="26";9 6l="1n";9 6m="8J";9 4q="1V";9 7y="l";9 3K="1A";9 2S="1g";9 2R="w";9 3I="bQ";9 2X="3j";9 3Y="3i";9 3X="2G";9 3W="49";9 6k="8E";9 6j="8D";9 4K="8A";9 4J="8z";9 7D="8y";9 7C="61";9 2J="3m";9 2I="3l";9 7B="8x";9 3B="bP";9 3V="3k";9 4S="1X";9 6G=Y 1q(2k,5o,3L,5n,5m,5l,5k,3C,3a);9 4r=Y 1q("bO","1E","m","bN","1G","1F","8O","1j","8N","8M","8L","8K","bM","bL","8J","p","8I","26","1n","bK","bJ","1V","bI","8H","bH","8G","bG","bF");9 bE={bD:8,bC:13,bB:35,bA:36,bz:37,by:38,bx:39,bw:40,bv:Y 1q(37,38,39,40),bu:46};9 bt={bs:1,bq:2,bp:3};d.4y.2u=j(2C){2C=d.54({A:"",29:F,3U:F,3T:F,45:F,3S:F,7b:\'bo.2w.2v\',72:\'bn.2w.2v\',W:F,30:F,34:"8F",K:""+""+5K+""+""+""+5J+5I+""+""+5H+5G+5F+""+""+"bj"+""+"",2B:""+"<19 "+"1g=\'"+5L+"bi.A\' "+"2D=\'7.1d.bh.1r["+1C+"].3t(7)\' "+">"+"",21:[],7S:""+"<1j>{64}"+"<1n>"+5B+""+"",7M:"<1V l=\'"+5C+"\'>"+44+"",7N:[{\'o\':\'8E\',\'w\':\'63\',\'z\':\'bg\'},{\'o\':\'8D\',\'w\':\'62\',\'z\':\'bf\'},{\'o\':\'4i\',\'w\':\'4i\',\'z\':\'be\'},{\'o\':\'4h\',\'w\':\'4h\',\'z\':\'bd\'},{\'o\':\'bc\',\'w\':\'8C\',\'z\':\'bb\'},{\'o\':\'ba\',\'w\':\'8B\',\'z\':\'b9\'},{\'o\':\'3m\',\'w\':\'3m\',\'z\':\'b8\'},{\'o\':\'3l\',\'w\':\'3l\',\'z\':\'b7\'},{\'o\':\'4g\',\'w\':\'4g\',\'z\':\'b6\'},{\'o\':\'4f\',\'w\':\'4f\',\'z\':\'b5\'},{\'o\':\'8A\',\'w\':\'3j\',\'z\':\'b4\'},{\'o\':\'4e\',\'w\':\'4e\',\'z\':\'b3\'},{\'o\':\'8z\',\'w\':\'3i\',\'z\':\'b2\'},{\'o\':\'8y\',\'w\':\'2G\',\'z\':\'b1\'},{\'o\':\'61\',\'w\':\'49\',\'z\':\'b0\'},{\'o\':\'8x\',\'w\':\'60\',\'z\':\'aZ\'},{\'o\':\'3k\',\'w\':\'3k\',\'z\':\'aY\'}],7R:""+"<1j>{5Z}"+"<1n>"+5r+""+"",7J:"<1V l=\'"+5s+"\'>"+""+5t+"",7K:[{\'o\':\'P\',\'w\':\'5Y\',\'z\':\'aX\'},{\'o\':\'aW\',\'w\':\'8w\',\'z\':\'aV\'},{\'o\':\'aU\',\'w\':\'8v\',\'z\':\'aT\'},{\'o\':\'aS\',\'w\':\'8u\',\'z\':\'aR\'},{\'o\':\'aQ\',\'w\':\'8t\',\'z\':\'aO\'},{\'o\':\'aN\',\'w\':\'8s\',\'z\':\'aM\'},{\'o\':\'aL\',\'w\':\'8r\',\'z\':\'aK\'},{\'o\':\'aJ\',\'w\':\'5X\',\'z\':\'aI\'},{\'o\':\'aH\',\'w\':\'5W\',\'z\':\'aG\'},{\'o\':\'aF\',\'w\':\'8q\',\'z\':\'aE\'}],7Q:""+"<1j>{5V}<1n>"+5x+"",7L:"<1V>"+5y+"",2t:[],7O:""+"<1j>{5U}"+"",7P:""+"<1j>{8p}"+"<48 l=\'8k\'>"+"",4P:".8o",6Y:".5T",aD:" 1n",6X:".5S",6Z:".5R",56:".8n",aC:".8m 19",7u:".8l",3r:".5T a",7I:".5S a",7H:".5R a",5e:".8k",4L:".8b",3J:".89",2Q:".5Q",3H:".87",6E:".7Z",6M:".83",6L:".81",6J:".85",2P:".3g",6A:".3f",6B:"",6R:".3h",6O:".8c",2U:".8a",6N:".86",6F:".80",6C:".7W",7G:".aB",7F:"1O",7s:"aA=4d,az=4d,ay=4d,ax=4d"+",aw=av,au=at,as=0,6U=0",1Q:""+"<8d>"+"<27 ah=\'30\' M=\'18/z\' ag=\'7d\'"+" 1A=\'"+5d+"\' />"+""+5a+""+"<2a M=\'18/8e\'"+" 1g=\'"+5b+"\'>"+"<2a M=\'18/8e\'"+" 1g=\'"+5c+"\'>"+""+59+"",7r:""+"<1F>"+"<1G>"+""+"<1U>{3j}"+""+"<16>{4c}"+""+""+""+"<16>{4b}"+""+""+""+""+""+""+""+""+"",7q:""+"<1F>"+"<1G>"+""+"<1U>{3i}"+""+"<16>{4c}"+""+""+""+"<16>{88}"+""+""+""+"<16>{4b}"+""+""+""+""+""+""+""+""+"",7p:""+"<1F>"+"<1G>"+""+"<1U>{2G}"+""+"<16>{5P}"+""+""+""+"<16>{84}"+""+""+""+"<16>{82}"+""+""+""+""+""+""+""+""+"",7o:""+"<1F>"+""+"<1G>"+"<1U>{49}"+""+"<48 l=\'7Z\' 7Y=\'10\' 7X=\'50\'>"+""+""+""+""+""+""+""+"",7n:"",2W:[],3M:4S,33:"{",32:"}",5N:D,20:D,1Y:D,4M:D,4z:D},2C);q 7.af(j(){Y C(d(7),2C)})};d.54({ae:j(i){q(1r[i])},ad:j(34,7V){q(2y[34][7V])}});j C(2N,2C){7.2g=1r.6b(7)-1;7.5f=2N;7.c=2C;7.2K=d(2N).S();f(7.c.A)7.2K=7.c.A;7.c.29=7.c.29||7.7h();7.c.3U=7.c.3U||7.7e();7.c.3T=7.c.3T||7.7g();7.c.45=7.c.45||7.c.29+7U;7.c.3S=7.c.3S||7.7f();7.7T()};C.k.7T=j(){f(d.47.ac){9 1z=Y 1x(7)}I f(d.47.ab){9 1z=Y 1f(7)}I f(d.47.aa){9 1z=Y 1H(7)}I f(d.47.a9){}f(1z){f(d.1v(7.c.5N))7.c.5N(7);7.7c(1z);f(7.c.W||7.c.30){7.74()}7.6a=Y 55();X(5M 7v 1z){7[5M]=1z[5M]}7.Q=d(7.5f).3q().4B(7.c.K).a8();9 2B=7.c.2B;2B=2B.G(1C,7.2g).G(5L,7.c.45);9 K=d(7.Q).A();K=K.G(5K,7.c.7S);K=K.G(5J,7.c.7R);K=K.G(5I,7.c.7Q);K=K.G(5H,7.c.7P);K=K.G(5G,2B);K=K.G(5F,7.c.7O);9 5E=1p(7.c.7N);9 5A="";X(9 i=0;i<5E.L;i++){9 2A=5E[i];f(2A.o&&2A.w)5A+=7.c.7M.G(5D,2A.o).G(44,7.c.33+2A.w+7.c.32).G(5C,2A.z)}K=K.G(5B,5A);9 3d=1p(7.c.2t);9 5w="";X(9 i=0;i<3d.L;i++){9 1S=3d[i];f(1S.o&&1S.w)5w+=7.c.7L.G(5z,1S.o).G(5y,1S.w)}K=K.G(5x,5w);9 5v=1p(7.c.7K);9 5q="";X(9 i=0;i<5v.L;i++){9 2z=5v[i];f(2z.o&&2z.w)5q+=7.c.7J.G(5u,2z.o).G(5t,7.c.33+2z.w+7.c.32).G(5s,2z.z)}K=K.G(5r,5q);K=7.58(K);d(7.Q).A(K);d(7.Q).V(7.c.56).3q();7.3M()}};C.k.3p=j(){9 h=7;d(7.Q).V(7.c.3r).1O(j(){h.7E(d(7).N(43));q(F)});d(7.Q).V(7.c.7I).1O(j(){h.v(d(7).N(43));q(F)});d(7.Q).V(7.c.5e).1s(j(){d(h.u.H).A(d(7).S())});d(7.Q).V(7.c.7H).1O(j(){9 3d=1p(h.c.2t);9 5p=d(7).N(43);9 1S=3d.6s(5p);f(1S){25=1S.a7;h.5i(5p,25)}q(F)});d(7.c.7G).1Z(7.c.7F,j(){h.31()})};C.k.a6=j(){q(7.u!=D)};C.k.a5=j(){q(7.Q)};C.k.A=j(A){f(A)d(7.u.H).A(A);I q(d(7.u.H).A())};C.k.4A=j(){q 7.75.4V(7.A())};C.k.7E=j(Z){1I(Z){O 4K:9 v=7.v();f(v||7.1a)7.2c(2X);J;O 4J:7.2c(3Y);J;O 7D:7.2c(3X);J;O 7C:7.2c(3W);J;O 7B:7.31();7.7k();J;O 3V:7.2c(3V);J;1X:7.1l(Z);J}};C.k.v=j(1h){f(1h){9 v=D;f(1h.11()==3c){v=7.v();1I(v.14.11()){O 3b:O 3c:J;1X:9 42=Y 1q(3b,3c);v=7.1N(7.v(),42);J}f(v!=D){1h=(v.14.11()==3b)?3c:3b;7.5h(v,1h);7.31()}}I{9 42=Y 1q(2k,5o,3L,5n,5m,5l,5k,3C,3a);v=7.1N(7.v(),42);f(v){9 1D=D;f(1h.11()==3a){9 1E=7.1N(7.v(),3a);f(1E==D){1D=7.u.4G(1h);v.1b.7A(1D,v);1D.a4(v);7.2d(1D.a3)}I{9 1i=1E.4m;9 5j=1i.L;9 41=D;f(5j>0)41=1i.3F(0);X(9 x=0;x<5j;x++){1E.1b.7A(1i.3F(0),1E)}1E.1b.a2(1E);f(41)7.2d(41)}}I 7.5h(v,1h);7.31()}}}I q(7.E())};C.k.5i=j(7z,25){9 v=(7.1a?7.1a:d(7.E()));v=d(v).3G(25);d(v).5i(7z);f(!d(v).N(7y))d(v).a1(7.3u)};C.k.1N=j(B,2n){f(B){9 1R=B.14.11();f(51(2n)==7x){7w(1R!=2n&&1R!=23){B=B.1b;1R=B.14.11()}}I{9 3Z=F;7w(!3Z&&1R!=23){X(9 i=0;i<2n.L;i++){f(1R==2n[i]){3Z=3y;J}}f(!3Z){B=B.1b;1R=B.14.11()}}}f(1R!=23)q(B);I q(D)}I q(D)};C.k.5h=j(B,1h){9 1D=7.u.4G(1h);9 A=d(B).A();B.1b.a0(1D,B);d(1D).A(A);7.2d(1D)};C.k.58=j(2x){X(9 5g 7v 2y[7.c.34]){2x=2x.G(7.c.33+5g+7.c.32,2y[7.c.34][5g])}q(2x)};C.k.7l=j(2x){q(7.c.33+2x+7.c.32)};C.k.68=j(7t){d(7.Q).V(7.c.7u).A(7t)};C.k.31=j(){9 A=7.4A();d(7.5f).S(A);d(7.Q).V(7.c.5e).S(A)};C.k.2c=j(1h){9 57=R.9Z(\'\',\'2c\',7.1e.c.7s);f(57){9 2b="";1I(1h){O(2X):2b=7.c.7r;J;O(3Y):2b=7.c.7q;J;O(3X):2b=7.c.7p;J;O(3W):2b=7.c.7o;J;O(3V):2b=7.c.7n;J}9 1Q=7.c.1Q;1Q=1Q.G(7m,7.c.29).G(5d,7.c.3U).G(5c,7.c.3T).G(5b,7.c.3S).G(5a,7.7l(1h)).G(59,2b).G(1C,7.2g);1Q=7.58(1Q);9 1P=57.1J;1P.9Y(1Q);1P.2o()}};C.k.7k=j(){d(7.Q).V(7.c.56).9X()};C.k.6Q=j(){9 7j=Y 9W();q("h-"+7j.9V())};C.k.4s=j(7i){9 1B;9 v=7.E();9 aP=7i.9U(7.2h+7.2h);9 2O=Y 6v(7.2h,"g");f(v&&v.14.11()!=23){X(x=aP.L-1;x>=0;x--){1B=aP[x];1B=1B.1w(2O,"
    ");d(v).4B("

    "+1B+"

    ")}}I{X(x=0;x");d(7.u.H).4C("

    "+1B+"

    ")}}};C.k.2L=j(1P,1m){9 W=1P.2M[0];f(W){X(9 i=0;i<1m.L;i++){9 1c=1m[i];f(1c.o&&1c.z)7.3n(W,1c)}}};C.k.7h=j(){q d(d.3Q(d(\'2a\'),j(s){q(s.1g&&s.1g.3P(/3R\\.2u(\\.2w){0,1}\\.2v(\\?.*)?$/))})).N(\'1g\').1w(/3R\\.2u(\\.2w){0,1}\\.2v(\\?.*)?$/,\'\')};C.k.7g=j(){q d(d.3Q(d(\'2a\'),j(s){q(s.1g&&s.1g.3P(/3R\\.2u(\\.2w){0,1}\\.2v(\\?.*)?$/))})).N(\'1g\')};C.k.7f=j(){q d(d.3Q(d(\'2a\'),j(s){q(s.1g&&s.1g.3P(/3R(-(.*)){0,1}(\\.2w){0,1}\\.2v(\\?.*)?$/))})).N(\'1g\')};C.k.7e=j(){q d(d.3Q(d(\'27\'),j(s){q(s.1A&&s.1A.3P(/2u\\/9T\\/(.*)7d\\.z(\\?.*)?$/))})).N(\'1A\')};C.k.7c=j(1z){f(51 3O!=\'j\'){1p(d.4Z({4Y:7.c.29+7.c.7b,4X:F}).4W);R.55=55;R.7a=7a;R.79=79;R.78=78;R.77=77;R.76=76;R.53=53;R.3O=3O}9 52=Y 3O();d.54(52,1z);7.75=Y 53(52)};C.k.74=j(){f(51 3N!=\'j\'){1p(d.4Z({4Y:7.c.29+7.c.72,4X:F}).4W);R.71=71;R.3N=3N}9 2s=Y 3N();f(7.c.30){2s.4V(d.4Z({4Y:7.c.30,4X:F}).4W)}I{2s.4V(7.c.W,F)}f(7.c.2t.L==0){7.c.2t=2s.4U.2t}f(7.c.21.L==0){7.c.21=2s.4U.21}f(7.c.2W.L==0){7.c.2W=2s.4U.2W}};C.k.1W=j(){d(7.u.H).1Z("2Z",7.2Z);9 4T=7.u.H.4I("70");X(9 i=0;i<4T.L;i++){d(4T[i]).1Z("2Z",7.2Z)}};C.k.2Z=j(12){9 h=1r[7.9S.w];f(7.14.11()==4H)h.1a=7;I h.1a=D;12.9R()};C.k.3M=j(){1I(7.c.3M){O 4S:d(7.Q).2Y("9Q");d(7.Q).V(7.c.6Z).2Y("9P");d(7.Q).V(7.c.6Y).2Y("9O");d(7.Q).V(7.c.6X).2Y("9N").V(3L).4C("<4k>&9M;&9L;");d(7.Q).V("m.4R 1n").2m("m.4R").6W().2m(7.c.4P).V("m.4O").z({"6V-9K":"6T"});d(7.Q).V("m.4Q 1n").2m("m.4Q").6W().2m(7.c.4P).V("m.4O").z({"6V-6U":"6T"});d(7.Q).V(".28").4N(j(){d(7).2Y("4N")},j(){d(7).9J("4N")});J}};j 2r(6S){9 h=R.9I.1r[6S];9 1P=R.1J;9 E=h.E();9 6P=d(h.c.6R).S();9 2T=h.6Q();1I(6P){O 2X:f(E&&E.14&&E.14.11!=2V)E=d(E).3G(2V);f(!E&&h.1a)E=d(h.1a).3G(2V);J}f(d.1v(h.c.4M))h.c.4M(h,R);9 W=1P.2M[0];9 1m=1p(h.c.2W);h.2L(1P,1m);f(E){d(h.c.4L).S(d(E).N(3K));d(h.c.3J).S(d(E).N(2S));d(h.c.2Q).S(d(E).N(2R));d(h.c.3H).S(d(E).N(3I))}f(h.1a){d(h.c.2U+" "+h.c.3J).S(d(h.1a).N(2S));d(h.c.2U+" "+h.c.2Q).S(d(h.1a).N(2R));d(h.c.2U+" "+h.c.3H).S(d(h.1a).N(3I))}d(h.c.6O+" "+h.c.2P).1O(j(){9 2q=d(h.c.4L).S();f(2q.L>0){h.1l(4K,2T);9 27=D;9 1i=h.u.H.4I(2V);X(9 i=0;i<1i.L;i++){f(d(1i[i]).N(3K)==2T){27=d(1i[i]);J}}f(27){27.N(3K,2q);27.N(2R,d(h.c.2Q).S())}}R.2o()});d(h.c.2U+" "+h.c.2P).1O(j(){9 2q=d(h.c.3J).S();f(2q.L>0){h.1l(4J,2T);9 2p=D;9 1i=h.u.H.4I(4H);X(9 i=0;i<1i.L;i++){f(d(1i[i]).N(2S)==2T){2p=d(1i[i]);J}}f(2p){2p.N(2S,2q);2p.N(2R,d(h.c.2Q).S());2p.N(3I,d(h.c.3H).S())}}R.2o()});d(h.c.6N+" "+h.c.2P).1O(j(){9 4F=d(h.c.6M).S();9 4E=d(h.c.6L).S();f(4F>0&&4E>0){9 26=h.u.4G(6K);9 4D=D;9 9H=D;9 6H=d(h.c.6J).S();9 6I=26.9G();6I.9F=6H;X(x=0;x<4F;x++){4D=26.9E(x);X(y=0;y<4E;y++){4D.9D(y)}}9 B=d(h.1N(h.v(),6G)).9C(0);f(!B||!B.1b)d(h.u.H).4C(26);I d(B).4B(26)}R.2o()});d(h.c.6F+" "+h.c.2P).1O(j(){9 6D=d(h.c.6E).S();h.4s(6D);R.2o()});d(h.c.6C+" "+h.c.6B).A(h.4A());d(h.c.6A).9B(j(){R.2o()});f(d.1v(h.c.4z))h.c.4z(h,R)};d.4y.6z=j(){f(7[0].4x==3)q!(/[^\\t\\n\\r ]/.2i(7[0].6y));q F};j 6z(n){f(n.4x==3)q!(/[^\\t\\n\\r ]/.2i(n.6y));q F};d.4y.3G=j(25){9 n=7;f(n[0].4x==3)n=n.2m().6x(0,1);f(n.2n(25).1y()==1)q n;I q n.2m(25).6x(0,1)};4u.k.9A=j(6w,4w){q(7.9z(0,4w)+6w+7.9y(4w))};4u.k.G=j(6u,6t){9 2O=Y 6v(6u,"g");q(7.1w(2O,6t))};1q.k.9x=j(2N){X(9 i=0;i<7.L;i++){f(7[i]===2N){q 3y}}q F};1q.k.9w=j(3F){9 4v=-1;X(9 i=0;i<7.L;i++){f(7[i]==3F){4v=i;J}}q(4v)};4u.k.9v=j(){q 7.1w(/^(\\s*)|(\\s*)$/9u,\'\')};1q.k.6s=j(o){X(9 i=0;i<7.L;i++){9 4t=7[i];f(4t.o==o){q(4t)}}q(D)};j 1x(h){7.1e=h;7.3u="9t";7.2h="\\r\\n"};1x.k.3t=j(19){7.1k=19;7.u=19.1d.1J;9 W=7.u.2M[0];9 1m=1p(7.c.21);7.2L(7.u,1m);7.u.w=7.1e.2g;d(7.u.H).A(7.1e.2K);9 h=7;7.u.H.9s=j(){h.u.2f="3s";h.u=19.1d.1J};7.u.9r=j(){h.3E()};7.u.9q=j(){h.3E();h.1s()};7.u.9p=j(){h.3E()};7.u.H.9o=j(){h.1k.1d.6r.6q=F};7.u.H.9n=j(){h.1k.1d.6r.6q=F;h.4s(R.9m.9l("9k"))};f(7.6p){f(d.1v(7.c.20))7.c.20(7);7.1e.3p();f(d.1v(7.c.1Y))7.c.1Y(7);7.1W()}7.6p=3y;7.u.2f="3s";6f{7.u=19.1d.1J}6e(e){}};1x.k.1l=j(Z,1u){1I(Z){O 2J:O 2I:9 v=7.1N(7.v(),4q);f(v)7.u.1t(Z);J;1X:f(1u)7.u.1t(Z,F,1u);I 7.u.1t(Z);J}7.1W()};1x.k.E=j(){9 2l=7.1k.1d.1J.2l;f(2l!=D){f(2l.6o!=9j)q(2l.6o())}};1x.k.3E=j(){7.u.2l=7.u.6n.4n()};1x.k.3n=j(W,1c){W.9i(1c.o,1c.z)};1x.k.1s=j(){7.1a=D};1x.k.2d=j(B){9 1L=7.u.6n.4n();1L.9h(B);1L.6d(F);1L.9g(\'9f\',-1);1L.9e();B.4l()};j 1f(h){7.1e=h;7.3u="l";7.2h="\\n"};1f.k.3t=j(19){7.1k=19;7.u=19.9d;9 W=7.u.2M[0];9 1m=1p(7.c.21);7.2L(7.u,1m);7.u.w=7.1e.2g;7.A(7.1e.2K);7.3A();f(d.1v(7.c.20))7.c.20(7);7.1e.3p();d(7.u).1Z("4o",7.4o);d(7.u).1Z("1s",7.1s);d(7.u).1Z("4l",7.3A);f(d.1v(7.c.1Y))7.c.1Y(7);7.1W()};1f.k.A=j(A){f(A){7.u.2f="6g";A=A.1w(/<3w([^>]*)>/3D,"").1w(/<\\/3w>/3D,"").1w(/<3x([^>]*)>/3D,"").1w(/<\\/3x>/3D,"");d(7.u.H).A(A);7.3A()}I q(d(7.u.H).A())};1f.k.1l=j(Z,1u){f(!7.E())q(F);1I(Z){O 2J:O 2I:9 1o=7.E();9 2e=7.1k.1d.3o();9 1M=2e.1M;f(1M.4j=="#18")1M=1M.1b;1o=7.1N(1o,4r);1M=7.1N(1M,4r);f(1o&&1o==1M&&1o.14.11()==4q){9 4p=1o.1b.1b;f(1o.1b.4m.L>1||4p.14.11()==6m||4p.14.11()==6l)7.u.1t(Z,\'\',D)}J;1X:f(1u)7.u.1t(Z,\'\',1u);I 7.u.1t(Z,\'\',D)}9 v=7.E();f(v.14.11()==23)7.1l(3B,2k);7.1W()};1f.k.E=j(){9 2e=7.1k.1d.3o();9 B=2e.1o;f(B){f(B.4j=="#18")q(B.1b);I q(B)}I q(D)};1f.k.3n=j(W,1c){W.67(1c.o+" {"+1c.z+"}",W.65.L)};1f.k.4o=j(12){9 h=1r[7.w];f(12.6h){f(12.24==66){h.1l(6k);q F}f(12.24==73){h.1l(6j);q F}}};1f.k.1s=j(12){9 h=1r[7.w];h.1a=D;9 v=D;f(12.24==13&&!12.9c){d(h.u.H).9b(6i).9a();v=h.E();f(v&&v.14.11()==3C)h.1l(3B,2k);}I f(12.24!=8&&12.24!=17&&12.24!=46&&12.24!=99&&!12.98&&!12.6h){v=h.E();9 o=v.14.11();f(o=="3x"||o=="b"||o=="3w"||o=="i"||o=="3v"||o=="97"||o=="a")o=v.1b.14.11();f(o==23)h.1l(3B,2k)}};1f.k.3A=j(){f(7.2f=="6g"){6f{7.2f="3s";7.1t("96",\'\',F)}6e(e){}}};1f.k.2d=j(B){9 1L=1J.4n();1L.95(B);9 E=7.1k.1d.3o();E.94(1L);E.6d(B,B.4m.L);7.1k.1d.4l()};1f.k.93=j(2j,22){9 22=7.92.91(2j,22);f(2j==\'4k\'&&22.1K){9 3z=7.69(22.1K);f(3z){7.6c.90();9 2j=3z;7.6c.6b(3z);22.1K=\'\'}I{q}}7.8Z+=7.6a.2j(2j,22,3y)};1f.k.69=j(1K){f(/8Y/.2i(1K))q\'3x\';f(/8X/.2i(1K))q\'3w\';f(/3v/.2i(1K))q\'3v\';f(/3v/.2i(1K))q\'8W\';q F};j 1H(h){7.1e=h;7.3u="l";7.2h="\\r\\n"};1H.k.3t=j(19){7.1k=19;7.u=19.1d.1J;9 W=7.u.2M[0];9 1m=1p(7.c.21);7.2L(7.u,1m);7.u.w=7.1e.2g;7.u.2f="3s";7.A(7.1e.2K);f(d.1v(7.c.20))7.c.20(7);d(7.Q).V(7.c.3r+\'[@o=\'+2J+\']\').3q();d(7.Q).V(7.c.3r+\'[@o=\'+2I+\']\').3q();7.1e.3p();d(7.u).1Z("1s",7.1s);f(d.1v(7.c.1Y))7.c.1Y(7);7.1W()};1H.k.1l=j(Z,1u){1I(Z){O 2J:O 2I:7.68("8V 8U.");J;1X:f(1u)7.u.1t(Z,F,1u);I 7.u.1t(Z);J}7.1W()};1H.k.E=j(){9 2e=7.1k.1d.3o();9 B=2e.1o;f(B){f(B.4j=="#18")q(B.1b);I q(B)}I q(D)};1H.k.3n=j(W,1c){W.67(1c.o+" {"+1c.z+"}",W.65.L)};1H.k.1s=j(12){9 h=1r[7.w];h.1a=D};1H.k.2d=j(B){};',62,769,'|||||||this||var|||_options|jQuery||if||wym||function|prototype|class|div||name||return||||_doc|container|title|||css|html|node|Wymeditor|null|selected|false|replaceAll|body|else|break|boxHtml|length|type|attr|case||_box|window|val|value|input|find|styles|for|new|cmd||toLowerCase|evt||tagName|row|label||text|iframe|_selected_image|parentNode|oCss|contentWindow|_wym|WymClassMozilla|src|sType|nodes|h2|_iframe|_exec|aCss|ul|focusNode|eval|Array|WYM_INSTANCES|keyup|execCommand|param|isFunction|replace|WymClassExplorer|size|WymClass|href|sTmp|WYM_INDEX|newNode|blockquote|form|fieldset|WymClassOpera|switch|document|style|range|anchorNode|findUp|click|doc|dialogHtml|tagname|oClass|button|legend|li|listen|default|postInit|bind|preBind|editorStyles|attributes|WYM_BODY|keyCode|jqexpr|table|link|wym_section|basePath|script|sBodyHtml|dialog|setFocusToNode|sel|designMode|_index|_newLine|test|tag|WYM_P|caretPos|parents|filter|close|image|sUrl|WYM_INIT_DIALOG|CssParser|classesItems|wymeditor|js|pack|sVal|WYM_STRINGS|oContainer|oTool|iframeHtml|options|onload|Cancel|Submit|Table|Heading|WYM_OUTDENT|WYM_INDENT|_html|addCssRules|styleSheets|elem|rExp|submitSelector|titleSelector|WYM_TITLE|WYM_SRC|sStamp|dialogImageSelector|WYM_A|dialogStyles|WYM_DIALOG_LINK|addClass|mouseup|stylesheet|update|stringDelimiterRight|stringDelimiterLeft|lang||||||WYM_BLOCKQUOTE|WYM_TD|WYM_TH|aClasses|wym_dialog|wym_cancel|wym_submit|wym_dialog_type|Image|Link|Preview|Outdent|Indent|addCssRule|getSelection|bindEvents|hide|toolSelector|on|initIframe|_class|sub|em|strong|true|new_tag|enableDesignMode|WYM_FORMAT_BLOCK|WYM_PRE|gi|saveCaret|item|parentsOrSelf|altSelector|WYM_ALT|srcSelector|WYM_HREF|WYM_H2|skin|WymCssParser|XhtmlSaxListener|match|grep|jquery|jQueryPath|wymPath|cssPath|WYM_PREVIEW|WYM_DIALOG_PASTE|WYM_DIALOG_TABLE|WYM_DIALOG_IMAGE|bFound||firstNode|aTypes|WYM_NAME|WYM_TOOL_TITLE|iframeBasePath||browser|textarea|Paste_From_Word|hidden|Title|URL|no|Unlink|Redo|Undo|Subscript|Superscript|nodeName|span|focus|childNodes|createRange|keydown|ancestor|WYM_LI|WYM_BLOCKS|paste|Item|String|ret|pos|nodeType|fn|postInitDialog|xhtml|after|append|newRow|iCols|iRows|createElement|WYM_IMG|getElementsByTagName|WYM_INSERT_IMAGE|WYM_CREATE_LINK|hrefSelector|preInitDialog|hover|wym_area_main|boxSelector|wym_area_left|wym_area_right|WYM_DEFAULT_SKIN|images|css_settings|parse|responseText|async|url|ajax||typeof|SaxListener|XhtmlParser|extend|XmlHelper|htmlSelector|wDialog|replaceStrings|WYM_DIALOG_BODY|WYM_DIALOG_TITLE|WYM_JQUERY_PATH|WYM_WYM_PATH|WYM_CSS_PATH|htmlValSelector|_element|key|switchTo|toggleClass|lgt|WYM_H6|WYM_H5|WYM_H4|WYM_H3|WYM_H1|sName|sContainers|WYM_CONTAINERS_ITEMS|WYM_CONTAINER_CLASS|WYM_CONTAINER_TITLE|WYM_CONTAINER_NAME|aContainers|sClasses|WYM_CLASSES_ITEMS|WYM_CLASS_TITLE|WYM_CLASS_NAME|sTools|WYM_TOOLS_ITEMS|WYM_TOOL_CLASS|WYM_TOOL_NAME|aTools|WYM_STATUS|WYM_IFRAME|WYM_HTML|WYM_CLASSES|WYM_CONTAINERS|WYM_TOOLS|WYM_IFRAME_BASE_PATH|prop|preInit|indent|Caption|wym_title|wym_classes|wym_containers|wym_tools|Status|Classes|Blockquote|Preformatted|Paragraph|Containers|HTML|Paste|Emphasis|Strong|Tools|cssRules||insertRule|status|getTagForStyle|helper|push|_tag_stack|collapse|catch|try|off|ctrlKey|WYM_BR|WYM_ITALIC|WYM_BOLD|WYM_UL|WYM_OL|selection|parentElement|_initialized|returnValue|event|findByName|rep|old|RegExp|inserted|slice|data|isPhantomNode|cancelSelector|previewSelector|dialogPreviewSelector|sText|textSelector|dialogPasteSelector|WYM_MAIN_CONTAINERS|sCaption|newCaption|captionSelector|WYM_TABLE|colsSelector|rowsSelector|dialogTableSelector|dialogLinkSelector|dialogType|uniqueStamp|dialogTypeSelector|index|155px|left|margin|show|containersSelector|toolsSelector|classesSelector|img|WymCssLexer|cssParser||configureEditorUsingRawCss|parser|XhtmlLexer|Lexer|StateStack|ParallelRegex|XhtmlValidator|xhtmlParser|loadXhtmlParser|screen|computeCssPath|computeJqueryPath|computeWymPath|computeBasePath|sData|now|toggleHtml|encloseString|WYM_BASE_PATH|dialogPreviewHtml|dialogPasteHtml|dialogTableHtml|dialogImageHtml|dialogLinkHtml|dialogFeatures|sMessage|statusSelector|in|while|WYM_STRING|WYM_CLASS|sClass|insertBefore|WYM_TOGGLE_HTML|WYM_PASTE|WYM_INSERT_TABLE|exec|updateEvent|updateSelector|classSelector|containerSelector|containersItemHtml|containersItems|classesItemHtml|toolsItemHtml|toolsItems|statusHtml|htmlHtml|classesHtml|containersHtml|toolsHtml|init|WYM_IFRAME_DEFAULT|sKey|wym_dialog_preview|cols|rows|wym_text|wym_dialog_paste|wym_cols|Number_Of_Cols|wym_rows|Number_Of_Rows|wym_caption|wym_dialog_table|wym_alt|Alternative_Text|wym_src|wym_dialog_image|wym_href|wym_dialog_link|head|javascript|xhtml1|DTD|org|www|http|wym_html_val|wym_status|wym_iframe|wym_html|wym_box|Source_Code|Table_Header|Heading_6|Heading_5|Heading_4|Heading_3|Heading_2|Heading_1|ToggleHtml|InsertTable|InsertImage|CreateLink|Unordered_List|Ordered_List|Italic|Bold|en|th|td|pre|ol|h6|h5|h4|h3|h1|WYM_STRINGS_EN|Choose|of|Number|List|feature|Unsupported|super|italic|bold|output|pop|getValidTagAttributes|validator|openBlockTag|addRange|selectNode|styleWithCSS|sup|metaKey|224|remove|children|shiftKey|contentDocument|select|character|move|moveToElementText|addRule|undefined|Text|getData|clipboardData|onpaste|onbeforepaste|onclick|onkeyup|onbeforedeactivate|onfocus|className|gm|trim|indexOf|contains|substring|substr|insertAt|mousedown|get|insertCell|insertRow|innerHTML|createCaption|newCol|opener|removeClass|right|gt|nbsp|wym_dropdown|wym_buttons|wym_panel|wym_skin_default|stopPropagation|ownerDocument|skins|split|getTime|Date|toggle|write|open|replaceChild|removeAttr|removeChild|firstChild|appendChild|box|ready|expr|next|safari|opera|mozilla|msie|wymstrings|wymeditors|each|media|rel|dtd|strict|TR|w3|EN|Strict|XHTML|W3C|PUBLIC|DOCTYPE|top|300|height|560|width|resizable|toolbar|titlebar|menubar|wymupdate|iframeSelector|toolsListSelector|wym_containers_th|TH|wym_containers_blockquote|BLOCKQUOTE|wym_containers_pre|PRE|wym_containers_h6|H6|wym_containers_h5|H5|wym_containers_h4||H4|wym_containers_h3|H3|wym_containers_h2|H2|wym_containers_h1|H1|wym_containers_p|wym_tools_preview|wym_tools_html|wym_tools_paste|wym_tools_table|wym_tools_image|wym_tools_unlink|wym_tools_link|wym_tools_redo|wym_tools_undo|wym_tools_outdent|wym_tools_indent|wym_tools_unordered_list|InsertUnorderedList|wym_tools_ordered_list|InsertOrderedList|wym_tools_subscript|wym_tools_superscript|wym_tools_emphasis|wym_tools_strong|parent|wymiframe|WYMeditor|wym_wymeditor_link|wym_area_bottom|wym_area_top|wym_css_parser|xhtml_parser|TEXT|ATTRIBUTE||ELEMENT|WYM_NODE|DELETE|CURSOR|DOWN|RIGHT|UP|LEFT|HOME|END|ENTER|BACKSPACE|WYM_KEY|tr|thead|tfoot|tbody|dt|dd|noscript|hr|dl|address|FormatBlock|alt|string|Wym_Dialog_Body|Wym_Dialog_Title|Wym_Status|Wym_Iframe|Wym_Html|Wym_Container_Class|Wym_Containers_Title|Wym_Container_Name|Wym_Containers_Items|Wym_Containers|Wym_Class_Title|Wym_Class_Name|Wym_Classes_Items|Wym_Classes|Wym_Tool_Class|Wym_Tool_Title|Wym_Tool_Name|Wym_Tools_Items|Wym_Tools|Wym_Jquery_Path|Wym_Iframe_Base_Path|Wym_Wym_Path|Wym_Css_Path|Wym_Base_Path|Wym_Index|code|Source|Word|from|Alternative|Header|Unordered|Ordered'.split('|'),0,{})) +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('if(!f)h f={};B.5v(f,{rL:"0.5-a1",2A:[],6D:[],5M:[],8e:"E",4f:"{rK}",ea:"{rJ}",a2:"{rI}",a0:"{rH}",fk:"e2/",80:"3w.1e",dW:"3w.js",fj:"47/",aA:"{rG}",fi:"1N/4m/",9Z:"{rF}",az:"{rE}",ar:"{rD}",at:"{rC}",8f:"{rB}",as:"{rA}",ax:"{rz}",an:"{ry}",ap:"{rx}",ao:"{rw}",ay:"{rv}",ah:"{ru}",ak:"{rt}",aj:"{rs}",ai:"{rr}",8g:"{rq}",aw:"{rp}",av:"{ro}",9Y:"{rn}",9X:"{rm}",ej:"6n",3V:"1m",P:"p",ae:"h1",ad:"h2",ac:"h3",ab:"h4",aa:"h5",a9:"h6",5X:"5w",6E:"2G",A:"a",4l:"br",9I:"7f",dO:"45",6F:"5x",5R:"7g",8x:"2V",8y:"ol",6P:"li",ek:"N",7Z:"2a",6v:"2d",6u:"O",7X:"5F",6y:"aI",8a:"aH",89:"aF",88:"aD",8u:"fh",8t:"fg",9L:"f9",9K:"f8",er:"f7",eq:"f6",5k:"aQ",5j:"aO",ep:"f5",4k:"rl",87:"aM",rk:"aN",aY:"fc",aZ:"fd",4P:1g 3i("p","h1","h2","h3","h4","h5","h6","5w","2G"),5Z:1g 3i("7a","2G","R","dl","3q","1P","h1","h2","h3","h4","h5","h6","hr","9a","ol","p","5w","45","2V","dd","dt","li","99","5x","98","7g","97","7e"),4n:{b2:8,b7:13,rj:35,ri:36,b6:37,b5:38,b4:39,b3:40,rh:1g 3i(37,38,39,40),b1:46},1x:{4h:1,rg:2,2b:3},1n:j(63,1R){c.4U=f.2A.2h(c)-1;c.a4=63;c.u=1R;c.5l=B(63).1L();if(c.u.W)c.5l=c.u.W;c.u.5c=c.u.5c||c.e5();c.u.5N=c.u.5N||c.u.5c+f.fk+c.u.3w+\'/\';c.u.86=c.u.86||c.e4();c.u.a5=c.u.a5||c.u.5c+f.fj;c.u.8h=c.u.8h||c.u.5c+f.fi;c.u.85=c.u.85||c.e3();c.4o=1g f.7V();c.5A()}});B.fn.5P=j(1R){1R=B.5v({W:"",5c:G,5N:G,86:G,8h:G,85:G,1D:G,3Q:G,3w:"4m",dX:Q,81:Q,47:"en",1y:""+""+f.az+""+""+""+f.ay+f.ax+""+""+f.8g+f.aw+f.av+""+""+"f"+""+"",5U:""+"<1N "+"2d=\'"+f.aA+"r8.W\' "+"5a=\'c.1O.2Y.f.2A["+f.4f+"].61(c)\'"+">"+"",3D:[],eG:""+"

    {r7}

    "+"<2V>"+f.ar+""+"
    ",eA:"
  • "+f.8f+"
  • ",eB:[{\'E\':\'fh\',\'O\':\'r6\',\'1e\':\'r5\'},{\'E\':\'fg\',\'O\':\'r4\',\'1e\':\'r3\'},{\'E\':\'ff\',\'O\':\'ff\',\'1e\':\'r2\'},{\'E\':\'fe\',\'O\':\'fe\',\'1e\':\'r1\'},{\'E\':\'fd\',\'O\':\'r0\',\'1e\':\'qZ\'},{\'E\':\'fc\',\'O\':\'qY\',\'1e\':\'qX\'},{\'E\':\'aQ\',\'O\':\'aQ\',\'1e\':\'qW\'},{\'E\':\'aO\',\'O\':\'aO\',\'1e\':\'qV\'},{\'E\':\'fb\',\'O\':\'fb\',\'1e\':\'qU\'},{\'E\':\'fa\',\'O\':\'fa\',\'1e\':\'qT\'},{\'E\':\'f9\',\'O\':\'aI\',\'1e\':\'qS\'},{\'E\':\'aN\',\'O\':\'aN\',\'1e\':\'qR\'},{\'E\':\'f8\',\'O\':\'aH\',\'1e\':\'qQ\'},{\'E\':\'f7\',\'O\':\'aF\',\'1e\':\'qP\'},{\'E\':\'f6\',\'O\':\'aD\',\'1e\':\'qO\'},{\'E\':\'f5\',\'O\':\'8g\',\'1e\':\'qN\'},{\'E\':\'aM\',\'O\':\'aM\',\'1e\':\'qM\'}],eF:""+"

    {qL}

    "+"<2V>"+f.ah+""+"
    ",ex:"
  • "+""+f.aj+"
  • ",ey:[{\'E\':\'P\',\'O\':\'qK\',\'1e\':\'qJ\'},{\'E\':\'ae\',\'O\':\'qI\',\'1e\':\'qH\'},{\'E\':\'ad\',\'O\':\'qG\',\'1e\':\'qF\'},{\'E\':\'ac\',\'O\':\'qE\',\'1e\':\'qD\'},{\'E\':\'ab\',\'O\':\'qC\',\'1e\':\'qB\'},{\'E\':\'aa\',\'O\':\'qA\',\'1e\':\'qz\'},{\'E\':\'a9\',\'O\':\'qy\',\'1e\':\'qx\'},{\'E\':\'5X\',\'O\':\'qw\',\'1e\':\'qv\'},{\'E\':\'6E\',\'O\':\'qu\',\'1e\':\'qt\'},{\'E\':\'5R\',\'O\':\'qs\',\'1e\':\'qr\'}],eE:""+"

    {qq}

    <2V>"+f.an+"
    ",ez:"
  • "+f.ao+"
  • ",4t:[],eC:""+"

    {qp}

    "+"
    ",eD:""+"

    {qo}

    "+"<56 N=\'f0\'>"+"
    ",qn:".f4",qm:".aL",ql:" 2V",qk:".aK",qj:".aJ",9U:".f3",qi:".f2 1N",ei:".f1",6R:".aL a",ew:".aK a",ev:".aJ a",a3:".f0",9M:".eU",7Y:".eR",6t:".aG",7W:".eQ",dI:".eJ",dQ:".eM",dP:".eL",dN:".eN",6s:".6J",dE:".6I",dF:"",dV:".6K",dS:".eV",6x:".eT",dR:".eO",dJ:".eK",dG:".eI",eu:".qh",et:"4I",eg:"qg=no,qf=no,qe=no,qd=no"+",5D=qc,9x=qb,4a=0,4b=0",4K:""+"<3p>"+"<2y 7S=\'3Q\' 1i=\'T/1e\' 9v=\'7C\'"+" 2a=\'"+f.a2+"\' />"+""+f.9Y+""+"<2t 1i=\'T/9w\'"+" 2d=\'"+f.9Z+"\'>"+"<2t 1i=\'T/9w\'"+" 2d=\'"+f.a0+"\'>"+""+f.9X+"",ef:"<1m N=\'6H eV\'"+" 5a=\'f.5L("+f.4f+")\'"+">"+"<1P>"+"<3q>"+"<1C 1i=\'6p\' N=\'6K\' S=\'"+f.6y+"\' />"+"<3L>{aI}"+""+"<1s>{eS}"+"<1C 1i=\'T\' N=\'eU\' S=\'\' 3j=\'40\' />"+""+""+"<1s>{eP}"+"<1C 1i=\'T\' N=\'aG\' S=\'\' 3j=\'40\' />"+""+""+"<1C N=\'6J\' 1i=\'2H\'"+" S=\'{8k}\' />"+"<1C N=\'6I\' 1i=\'2H\'"+"S=\'{8j}\' />"+""+""+""+"",ee:"<1m N=\'6H eT\'"+" 5a=\'f.5L("+f.4f+")\'"+">"+"<1P>"+"<3q>"+"<1C 1i=\'6p\' N=\'6K\' S=\'"+f.8a+"\' />"+"<3L>{aH}"+""+"<1s>{eS}"+"<1C 1i=\'T\' N=\'eR\' S=\'\' 3j=\'40\' />"+""+""+"<1s>{q0}"+"<1C 1i=\'T\' N=\'eQ\' S=\'\' 3j=\'40\' />"+""+""+"<1s>{eP}"+"<1C 1i=\'T\' N=\'aG\' S=\'\' 3j=\'40\' />"+""+""+"<1C N=\'6J\' 1i=\'2H\'"+" S=\'{8k}\' />"+"<1C N=\'6I\' 1i=\'2H\'"+"S=\'{8j}\' />"+""+""+""+"",ed:"<1m N=\'6H eO\'"+" 5a=\'f.5L("+f.4f+")\'"+">"+"<1P>"+"<3q>"+"<1C 1i=\'6p\' N=\'6K\' S=\'"+f.89+"\' />"+"<3L>{aF}"+""+"<1s>{pZ}"+"<1C 1i=\'T\' N=\'eN\' S=\'\' 3j=\'40\' />"+""+""+"<1s>{pY}"+"<1C 1i=\'T\' N=\'eM\' S=\'3\' 3j=\'3\' />"+""+""+"<1s>{pX}"+"<1C 1i=\'T\' N=\'eL\' S=\'2\' 3j=\'3\' />"+""+""+"<1C N=\'6J\' 1i=\'2H\'"+" S=\'{8k}\' />"+"<1C N=\'6I\' 1i=\'2H\'"+"S=\'{8j}\' />"+""+""+""+"",ec:"<1m N=\'6H eK\'"+" 5a=\'f.5L("+f.4f+")\'"+">"+"<1P>"+"<1C 1i=\'6p\' N=\'6K\' S=\'"+f.88+"\' />"+"<3q>"+"<3L>{aD}"+""+"<56 N=\'eJ\' 7A=\'10\' 7B=\'50\'>"+""+""+"<1C N=\'6J\' 1i=\'2H\'"+" S=\'{8k}\' />"+"<1C N=\'6I\' 1i=\'2H\'"+"S=\'{8j}\' />"+""+""+""+"",eb:"<1m N=\'6H eI\'"+" 5a=\'f.5L("+f.4f+")\'"+">",51:[],6C:"{",6B:"}",aC:1d,3Y:1d,3X:1d,9N:1d,9E:1d},1R);l c.dZ(j(){1g f.1n(B(c),1R)})};B.5v({pW:j(i){l(f.2A[i])},pV:j(eH){l(f.6D[eH])}});f.1n.o.5A=j(){if(B.8i.pU){h 4N=1g f.3I(c);h 5e=1g f.8K(c)}J if(B.8i.pT){h 4N=1g f.2D(c);h 5e=1g f.8A(c)}J if(B.8i.pS){h 4N=1g f.3Z(c);h 5e=1g f.8z(c)}J if(B.8i.pR){h 4N=1g f.3c(c);h 5e=1g f.8q(c)}if(4N){if(B.3f(c.u.aC))c.u.aC(c);h aB=1g f.1q();B.5v(aB,4N);c.3S=1g f.1t(aB);if(c.u.1D||c.u.3Q){c.e1()}c.5g=1g f.3s();1j(h 57 in 4N){c[57]=4N[57]}c.2p=B(c.a4).6Q().69(c.u.1y).6o();h 5U=c.u.5U;5U=5U.1p(f.4f,c.4U).1p(f.aA,c.u.8h);h 1y=B(c.2p).W();1y=1y.1p(f.az,c.u.eG);1y=1y.1p(f.ay,c.u.eF);1y=1y.1p(f.ax,c.u.eE);1y=1y.1p(f.8g,c.u.eD);1y=1y.1p(f.aw,5U);1y=1y.1p(f.av,c.u.eC);h au=2P(c.u.eB);h aq="";1j(h i=0;i0)8c=2Z.4Y(0);1j(h x=0;x=0;x--){4e=aP[x];4e=4e.Z(4Z,"
    ");B(K).69("

    "+4e+"

    ")}}J{1j(x=0;x");B(c.H.1m).dK("

    "+4e+"

    ")}}};f.1n.o.5m=j(4J,2C){h 1D=4J.5n[0];if(1D){1j(h i=0;i<2C.I;i++){h 2i=2C[i];if(2i.E&&2i.1e)c.5Y(1D,2i)}}};f.1n.o.e5=j(){l B(B.82(B(\'2t\'),j(s){l(s.2d&&s.2d.M(/84\\.5P(\\.83){0,1}\\.js(\\?.*)?$/))})).1F(\'2d\').Z(/84\\.5P(\\.83){0,1}\\.js(\\?.*)?$/,\'\')};f.1n.o.e4=j(){l B(B.82(B(\'2t\'),j(s){l(s.2d&&s.2d.M(/84\\.5P(\\.83){0,1}\\.js(\\?.*)?$/))})).1F(\'2d\')};f.1n.o.e3=j(){l B(B.82(B(\'2t\'),j(s){l(s.2d&&s.2d.M(/84(-(.*)){0,1}(\\.83){0,1}\\.js(\\?.*)?$/))})).1F(\'2d\')};f.1n.o.pJ=j(){l B(B.82(B(\'2y\'),j(s){l(s.2a&&s.2a.M(/5P\\/e2\\/(.*)7C\\.1e(\\?.*)?$/))})).1F(\'2a\')};f.1n.o.e1=j(){h 5O=1g f.41();if(c.u.3Q){5O.3R(B.9R({9Q:c.u.3Q,9P:G}).9O)}J{5O.3R(c.u.1D,G)}if(c.u.4t.I==0){c.u.4t=5O.52.4t}if(c.u.3D.I==0){c.u.3D=5O.52.3D}if(c.u.51.I==0){c.u.51=5O.52.51}};f.1n.o.3W=j(){B(c.H.1m).3g("6z",c.6z);h 9T=c.H.1m.9J("7f");1j(h i=0;i<9T.I;i++){B(9T[i]).3g("6z",c.6z)}};f.1n.o.6z=j(1f){h D=f.2A[c.pI.O];if(c.1A.1v()==f.9I)D.2n=c;J D.2n=1d;1f.pH()};f.dY=j(2a){h 2y=3h.6r(\'2y\');2y.7S=\'3Q\';2y.2a=2a;h 3p=B(\'3p\').9z(0);3p.e0(2y)};f.1n.o.81=j(){if(c.u.81&&!f.5M[c.u.3w]){h 9S=G;h 4Z=1g 4s(c.u.3w+\'\\/\'+f.80+\'$\');B(\'2y\').dZ(j(){if(c.2a.M(4Z))9S=Q});if(!9S)f.dY(c.u.5N+f.80)}B(c.2p).pG("pF"+c.u.3w);if(c.u.dX&&!f.5M[c.u.3w]){2P(B.9R({9Q:c.u.5N+f.dW,9P:G}).9O)}if(f.5M[c.u.3w]&&f.5M[c.u.3w].5A)f.5M[c.u.3w].5A(c)};f.5L=j(5E){h D=2T.pE.f.2A[5E];h 4J=2T.3h;h 1h=D.1h();h dT=B(D.u.dV).1L();h 6w=D.dU();3e(dT){1l f.6y:if(1h&&1h.1A&&1h.1A.1v!=f.A)1h=B(1h).3z(f.A);if(!1h&&D.2n)1h=B(D.2n).3z(f.A);X}if(B.3f(D.u.9N))D.u.9N(D,2T);h 1D=4J.5n[0];h 2C=2P(D.u.51);D.5m(4J,2C);if(1h){B(D.u.9M).1L(B(1h).1F(f.7Z));B(D.u.7Y).1L(B(1h).1F(f.6v));B(D.u.6t).1L(B(1h).1F(f.6u));B(D.u.7W).1L(B(1h).1F(f.7X))}if(D.2n){B(D.u.6x+" "+D.u.7Y).1L(B(D.2n).1F(f.6v));B(D.u.6x+" "+D.u.6t).1L(B(D.2n).1F(f.6u));B(D.u.6x+" "+D.u.7W).1L(B(D.2n).1F(f.7X))}B(D.u.dS+" "+D.u.6s).4I(j(){h 5K=B(D.u.9M).1L();if(5K.I>0){D.1U(f.9L,6w);h 2y=1d;h 2Z=D.H.1m.9J(f.A);1j(h i=0;i<2Z.I;i++){if(B(2Z[i]).1F(f.7Z)==6w){2y=B(2Z[i]);X}}if(2y){2y.1F(f.7Z,5K);2y.1F(f.6u,B(D.u.6t).1L())}}2T.5J()});B(D.u.6x+" "+D.u.6s).4I(j(){h 5K=B(D.u.7Y).1L();if(5K.I>0){D.1U(f.9K,6w);h 4v=1d;h 2Z=D.H.1m.9J(f.9I);1j(h i=0;i<2Z.I;i++){if(B(2Z[i]).1F(f.6v)==6w){4v=B(2Z[i]);X}}if(4v){4v.1F(f.6v,5K);4v.1F(f.6u,B(D.u.6t).1L());4v.1F(f.7X,B(D.u.7W).1L())}}2T.5J()});B(D.u.dR+" "+D.u.6s).4I(j(){h 9H=B(D.u.dQ).1L();h 9G=B(D.u.dP).1L();if(9H>0&&9G>0){h 45=D.H.6r(f.dO);h 9F=1d;h pD=1d;h dL=B(D.u.dN).1L();h dM=45.pC();dM.9B=dL;1j(x=0;x<9H;x++){9F=45.pB(x);1j(y=0;y<9G;y++){9F.pA(y)}}h L=B(D.3d(D.K(),f.4P)).9z(0);if(!L||!L.1c)B(D.H.1m).dK(45);J B(L).69(45)}2T.5J()});B(D.u.dJ+" "+D.u.6s).4I(j(){h dH=B(D.u.dI).1L();D.8L(dH);2T.5J()});B(D.u.dG+" "+D.u.dF).W(D.1M());B(D.u.dE).pz(j(){2T.5J()});if(B.3f(D.u.9E))D.u.9E(D,2T)};f.7V=j(){c.2v="2v py 7V"};f.7V.o={px:j(Y){h 2Y=B(c.1S).3z(Y);if(2Y.I==0)l G;h 1S=c.1S;if(1S.1r==f.1x.2b){if((1S.3x&&!f.2J(1S.3x))||(c.3a!=0&&!f.bx(1S.4W.64(0,c.3a))))l G;J 1S=1S.1c}J if(c.3a!=0)l G;1j(h n=B(1S);n[0]!=2Y[0];n=n.2Y()){h 4j=n.2Y().8s(\':pw\');if(4j[0]!=n[0]||(4j[0].3x&&!f.2J(4j[0].3x)))l G}l Q},pv:j(Y){h 2Y=B(c.1H).3z(Y);if(2Y.I==0)l G;J 2Y=2Y[0];if(c.1H==2Y){if(c.1H.3y.3C=="4l")c.1H.dD(1H.3y);if(c.2L==0)l G;J{1j(h 5I=c.1H.2e[c.2L-1].4i;5I==1d||5I.3C=="4l";5I=5I.4i)if(5I==1d)l Q}}J{h 1H=c.1H;if(1H.1r==f.1x.2b){if((1H.4i&&!f.2J(1H.4i))||(c.2L!=1H.4W.I))l G;J 1H=1H.1c}1j(h n=1H;n!=2Y;n=n.1c){h 3y=n.1c.3y;if((3y!=n)||(f.2J(3y)&&3y.3x!=n)){l G}}}if(c.2L==c.1H.I)l Q;J l G}};f.3s=j(){c.7U=3h.6r(\'R\');l c};f.3s.o.C=j(E,1R,6q){1R=1R||G;6q=6q||G;l\'<\'+E+(1R?c.9D(1R):\'\')+(6q?\'>\':\' />\')};f.3s.o.pu=j(E,1X,1R){1R=1R||G;l\'<\'+E+(1R?c.9D(1R):\'\')+\'>\'+1X+\'\'};f.3s.o.pt=j(1X){l\'\'};f.3s.o.dA=j(4d){l c.dC(c.dz(4d))};f.3s.o.dC=j(dB){l dB.Z(/≺([a-z]+|(#\\d+));/ig,"&$1;")};f.3s.o.9D=j(1R){h 4d=c;4d.9C=\'\';1j(h 1Y in 1R){h pq=\'\';h S=1R[1Y];if(3l S!=\'j\'&&S.I>0){if(cV(1Y)==1Y&&3l S==\'53\'){1Y=S.pp();S=S.5h()}if(1Y!=\'\'&&S!=\'\'){4d.9C+=\' \'+1Y+\'="\'+4d.dA(S)+\'"\'}}}l 4d.9C};f.3s.o.dz=j(6n,7T){c.7U.9B=6n;c.7U.po=6n;h 1Q=c.7U.9B;if(3l 7T==\'2q\'){if(7T!=G)1Q=1Q.Z(\'"\',\'&pn;\');if(7T==Q)1Q=1Q.Z(\'"\',\'&#pm;\')}l 1Q};f.3s.o.pl=j(5G){h 1Q=[];h 3P=5G.8S(/((=\\s*")(")("))|((=\\s*\\\')(\\\')(\\\'))|((=\\s*[^>\\s]*))/g);if(3P.pk()!=5G){1j(h k in 3P){h v=3P[k];if(3l v!=\'j\'&&v.I!=0){h re=1g 4s(\'(\\\\w+)\\\\s*\'+v);if(M=5G.M(re)){h S=v.Z(/^[\\s=]+/,"");h 5H=S.pj(0);5H=5H==\'"\'?\'"\':(5H=="\'"?"\'":\'\');if(5H!=\'\'){S=5H==\'"\'?S.Z(/^"|"+$/g,\'\'):S.Z(/^\'|\'+$/g,\'\')}5G=5G.Z(M[0],\'\');1Q.2h([M[1],S])}}}}l 1Q};f.ca={"9r":{"ph":{"5C":["5z","3p","W","7E","1W","2t","1o","O"],"F":["N","id","1o","O","dy","dx"]},"pg":{"5C":["5z","br","hr","1N","1W","2t"],"F":{"9A":["dm","dk"],"0":"47","1":"4d:47"}},"dw":{"F":{"dy":/^(\\w){1}$/,"dx":/^(\\d)+$/}}},"9s":{"2T":{"7y":["1m"],"F":["5a","pf"]},"1P":{"7y":["1P","1C","56","5q","a","1s","2H"],"F":["pe","pd","pc","pb","pa","bn"]},"dw":{"5C":["5z","7i","br","d4","p9","3p","W","1N","7E","1W","2t","1o","O"],"F":["p8","p7","bm"]},"p6":{"5C":["5z","7i","br","3p","W","7E","1W","2t","1o","O"],"F":["bl","p5","p4","p3","p2","p1","p0"]}},"1K":{"a":{"F":{"0":"7D","1":"du","2":"2a","3":"df","4":"E","7S":/^(7R|dv|3Q|2X|6o|7J|7N|5E|7L|7M|7O|7I|7H|7Q|7K|7P||7G|7F)+$/,"de":/^(7R|dv|3Q|2X|6o|7J|7N|5E|7L|7M|7O|7I|7H|7Q|7K|7P||7G|7F)+$/,"ds":/^(dr|dq|9b|dp|do|dn)$/,"5":"1i"}},"0":"7j","1":"94","2":"7a","c8":{"F":{"0":"5F","1":"du","2":"2a","oZ":/^(Q|G)$/,"ds":/^(dr|dq|9b|dp|do|dn)$/},"2l":["5F"]},"3":"b","5z":{"F":["2a"],"2l":["2a"]},"7i":{"F":{"9A":/^(dm|dk)$/},"2l":["9A"]},"4":"c7","2G":{"F":["5y"]},"5":"1m","6":"br","2H":{"F":{"3v":/^(3v)$/,"1i":/^(2H|di|dh)$/,"0":"S"},"4c":"1P"},"7":"c6","8":"5y","9":"c5","7h":{"F":{"4H":/^(4G|4b|4F|4E)$/,"0":"3u","1":"4D","3T":/^(\\d)+$/,"4C":/^(4a|4B|4A|4z)$/,"2":"5D"},"4c":"6c"},"6c":{"F":{"4H":/^(4G|4b|4F|4E)$/,"0":"3u","1":"4D","3T":/^(\\d)+$/,"4C":/^(4a|4B|4A|4z)$/,"2":"5D"}},"10":"dd","93":{"F":{"0":"5y","dg":/^([0-9]){8}/}},"11":"R","12":"c4","13":"dl","14":"dt","15":"em","3q":{"4c":"1P"},"1P":{"F":{"0":"6f","1":"6i","2":"6i-7D","3":"oY","oX":/^(9z|oW)$/},"2l":["6f"]},"3p":{"F":["oV"]},"16":"h1","17":"h2","18":"h3","19":"h4","20":"h5","21":"h6","22":"hr","W":{"F":["oU"]},"23":"i","7f":{"F":["5F","2d","9x","oT","oS","db","5D"],"2l":["5F","2d"]},"1C":{"F":{"0":"6i","1":"5F","dj":/^(dj)$/,"3v":/^(3v)$/,"oR":/^(\\d)+$/,"2":"E","9t":/^(9t)$/,"3j":/^(\\d)+$/,"3":"2d","1i":/^(2H|oQ|oP|6p|4v|oO|oN|di|dh|T)$/,"4":"S"},"4c":"1P"},"c3":{"F":{"0":"5y","dg":/^([0-9]){8}/}},"24":"c2","1s":{"F":["1j"],"4c":"1P"},"25":"3L","26":"li","2y":{"F":{"0":"7D","1":"2a","2":"df","9v":/^(9u|d5|d6|d7|7C|oM|,|;|)+$/i,"7S":/^(7R|7Q|7P|7O|7N|7M|7L|7K|dc|5E|6o|7J|7I|2X|3Q|7H||7G|7F)+$/i,"de":/^(7R|7Q|7P|7O|7N|7M|7L|7K|dc|5E|6o|7J|7I|2X|3Q|7H||7G|7F)+$/i,"3":"1i"},"4c":"3p"},"c1":{"F":["id","E"],"2l":["id"]},"7E":{"F":{"0":"1X","9y-c9":/^(1X\\-1i|oL|oK|oJ\\-oI)$/i,"1":"E","2":"oH"},"2l":["1X"]},"27":"9a","53":{"F":["oG","oF","oE","oD","4W","oC","9x","E","oB","1i","db","5D"]},"28":"ol","c0":{"F":{"0":"1s","3v":/^(3v)$/},"2l":["1s"]},"7d":{"F":{"0":"1s","3v":/^(3v)$/,"1h":/^(1h)$/,"1":"S"},"4c":"5q"},"29":"p","1W":{"F":{"0":"1i","da":/^(4W|oA|53)$/,"1":"da","2":"S"},"2l":["E"]},"30":"5w","q":{"F":["5y"]},"31":"bZ","2t":{"F":{"1i":/^(T\\/oz|T\\/9w|T\\/oy|T\\/ox|T\\/ow|T\\/4d)$/,"0":"7D","d9":/^(d9)$/,"1":"2d"},"2l":["1i"]},"5q":{"F":{"3v":/^(3v)$/,"d8":/^(d8)$/,"0":"E","1":"3j"},"4c":"1P"},"32":"bY","33":"3T","34":"3A","1o":{"F":{"0":"1i","9v":/^(7C|ov|ou|d7|ot|d6|d5|os|9u)$/},"2l":["1i"]},"35":"3b","36":"4Q","45":{"F":{"0":"d2","1":"oq","2":"op","d4":/^(oo|om|ok|oj|oi|oh|og|d3|d2)$/,"of":/^(oe|od|7A|7B|9u)$/,"3":"oc","4":"5D"}},"99":{"F":{"4H":/^(4G|4b|4F|4E)$/,"0":"3u","1":"4D","4C":/^(4a|4B|4A|4z)$/}},"5x":{"F":{"0":"7j","4H":/^(4b|4G|4F|4E|3u)$/,"1":"d1","2":"3u","3":"4D","d0":/^(\\d)+$/,"4":"cZ","cY":/^(\\d)+$/,"1E":/^(7h|6c|1Z|cX)$/,"4C":/^(4a|4B|4A|4z)$/}},"56":{"F":["7B","7A","3v","E","9t"],"2l":["7B","7A"],"4c":"1P"},"98":{"F":{"4H":/^(4G|4b|4F|4E)$/,"0":"3u","1":"4D","4C":/^(4a|4B|4A)$/,"2":"4z"}},"7g":{"F":{"0":"7j","4H":/^(4b|4G|4F|4E|3u)$/,"1":"d1","2":"3u","3":"4D","d0":/^(\\d)+$/,"4":"cZ","cY":/^(\\d)+$/,"1E":/^(7h|6c|1Z|cX)$/,"4C":/^(4a|4B|4A|4z)$/}},"97":{"F":{"4H":/^(4G|4b|4F|4E)$/,"0":"3u","1":"4D","4C":/^(4a|4B|4A|4z)$/}},"37":"O","7e":{"F":{"4H":/^(4G|4b|4F|4E|3u)$/,"0":"3u","1":"4D","4C":/^(4a|4B|4A|4z)$/}},"38":"bX","39":"2V","40":"h"},75:[],74:[],5W:j(C,F){h 7z={};h cW=c.cQ(C);1j(h 2u in F){h S=F[2u];if(!c.75.2E(2u)&&!c.74.2E(S)){if(3l S!=\'j\'&&cW.2E(2u)){if(c.cS(C,2u)){if(c.cR(C,2u,S)){7z[2u]=S}}J{7z[2u]=S}}}}l 7z},cP:j(C){h 1Q=[];if(c.1K[C]&&c.1K[C][\'F\']){1j(k in c.1K[C][\'F\']){1Q.2h(cV(k)==k?c.1K[C][\'F\'][k]:k)}}l 1Q},cT:j(){h 1Q=[];1j(h 1Y in c.9s){1Q.2h(c.9s[1Y])}1j(h 1Y in c.9r){1Q.2h(c.9r[1Y])}l 1Q},cU:j(C){if(c.1K[C]){l Q}1j(h 1Y in c.1K){if(c.1K[1Y]==C){l Q}}l G},cO:j(C){h 9p=[];if(c.cU(C)){h 9q=c.cT();1j(h 1Y in 9q){h 49=9q[1Y];if(3l 49==\'53\'){if((49[\'5C\']&&49[\'5C\'].2E(C))||(49[\'7y\']&&!49[\'7y\'].2E(C))){ob}h 7x=49[\'F\']?49[\'F\']:49[\'oa\'];1j(h k in 7x){9p.2h(3l 7x[k]!=\'6n\'?k:7x[k])}}}}l 9p},cS:j(C,2u){l c.1K[C]&&((c.1K[C][\'F\']&&c.1K[C][\'F\'][2u])||(c.1K[C][\'2l\']&&c.1K[C][\'2l\'].2E(2u)))},cR:j(C,2u,S){if(c.1K[C]&&(c.1K[C][\'F\']&&c.1K[C][\'F\'][2u]&&S.I>0&&!S.M(c.1K[C][\'F\'][2u]))||(c.1K[C]&&c.1K[C][\'2l\']&&c.1K[C][\'2l\'].2E(2u)&&S.I==0)){l G}l c.1K[C]!=2q},cQ:j(C){if(!c.6m){c.6m={}}if(!c.6m[C]){c.6m[C]=c.cP(C).o9(c.cO(C))}l c.6m[C]}};f.3t=j(7v){c.59=7v;c.4y=[];c.9o=[];c.6k=1d;l c};f.3t.o.4x=j(3O,1s){1s=1s||Q;h 6l=c.4y.I;c.4y[6l]=3O;c.9o[6l]=1s;c.6k=1d};f.3t.o.M=j(cN){if(c.4y.I==0){l[G,\'\']}h 3P=cN.M(c.cM());if(!3P){l[G,\'\']}h M=3P[0];1j(h i=1;i<3P.I;i++){if(3P[i]){l[c.9o[i-1],M]}}l[Q,3P[0]]};f.3t.o.cM=j(){if(c.6k==1d){1j(h i=0,6l=c.4y.I;i<6l;i++){c.4y[i]=\'(\'+c.cK(c.cL(c.4y[i]).Z(/([\\/\\(\\)])/g,\'\\\\$1\'))+\')\'}c.6k=1g 4s(c.4y.4O("|"),c.cC())}l c.6k};f.3t.o.cL=j(7w){l 7w.Z(/\\(\\?(i|m|s|x|U)\\)/,\'~~~~~~cJ\\$1~~~~~~\').Z(/\\(\\?(\\-[i|m|s|x|U])\\)/,\'~~~~~~cI\\$1~~~~~~\').Z(/\\(\\?\\=(.*)\\)/,\'~~~~~~cH\\$1~~~~~~\').Z(/\\(\\?\\!(.*)\\)/,\'~~~~~~cG\\$1~~~~~~\').Z(/\\(\\?\\<\\=(.*)\\)/,\'~~~~~~cF\\$1~~~~~~\').Z(/\\(\\?\\<\\!(.*)\\)/,\'~~~~~~cE\\$1~~~~~~\').Z(/\\(\\?\\:(.*)\\)/,\'~~~~~~cD\\$1~~~~~~\')};f.3t.o.cK=j(7w){l 7w.Z(/~~~~~~cJ(.{1})~~~~~~/,"(?\\$1)").Z(/~~~~~~cI(.{2})~~~~~~/,"(?\\$1)").Z(/~~~~~~cH(.*)~~~~~~/,"(?=\\$1)").Z(/~~~~~~cG(.*)~~~~~~/,"(?!\\$1)").Z(/~~~~~~cF(.*)~~~~~~/,"(?<=\\$1)").Z(/~~~~~~cE(.*)~~~~~~/,"(?",\'9i\')};f.3M.o.co=j(1E){c.3m("<2t",1E,\'9h\');c.2U("",\'9h\')};f.3M.o.cn=j(1E){c.3m("<1o",1E,\'9g\');c.2U("",\'9g\')};f.3M.o.cm=j(1E){c.55("<\\\\s*[a-68-9:\\-]+\\\\s*>",1E,\'7r\');c.3m("<[a-68-9:\\-]+"+\'[\\\\\\/ \\\\\\>]+\',1E,\'7r\');c.cl(\'7r\');c.55("",1E,\'ch\')};f.3M.o.cl=j(1E){c.55(\'\\\\s+\',1E,\'5u\');c.ck(1E);c.2U(\'/>\',1E);c.2U(\'>\',1E)};f.3M.o.ck=j(1E){c.55("\\\\s*[a-z-8V-9]*:?[a-z-8V-9]+\\\\s*(?=\\=)\\\\s*",1E,\'cc\');c.3m(\'=\\\\s*"\',1E,\'7m\');c.4x("\\\\\\\\\\"",\'7m\');c.2U(\'"\',\'7m\');c.3m("=\\\\s*\'",1E,\'7l\');c.4x("\\\\\\\\\'",\'7l\');c.2U("\'",\'7l\');c.55(\'=\\\\s*[^>\\\\s]*\',1E,\'cb\')};f.1t=j(cj,V){h V=V||\'3J\';c.71=1g f.3M(c);c.1a=cj;c.4w=V;c.o7=[];c.o6=\'\';c.o5=\'\';l c};f.1t.o.3R=j(1w){c.71.3R(c.7c(1w));l c.7b(c.1a.bQ())};f.1t.o.7c=j(1w){if(1w.M(/N="bI"/)||1w.M(/ns = "o4:o3-o2-o1/)){c.1a.bJ()}l c.1a.7c(1w)};f.1t.o.7b=j(48){if(c.1a.92){c.1a.bH()}l c.1a.7b(48)};f.1t.o.5u=j(M,2k){l Q};f.1t.o.3J=j(T){c.1a.bP(T);l Q};f.1t.o.9i=j(M,2o){l c.7s(M,2o,\'78\')};f.1t.o.9h=j(M,2o){l c.7s(M,2o,\'77\')};f.1t.o.9g=j(M,2o){l c.7s(M,2o,\'76\')};f.1t.o.7s=j(M,2k,1i){3e(2k){1l f.7q:c.6e=M;X;1l f.42:c.6e+=M;X;1l f.67:3e(1i){1l\'78\':c.1a.78(c.6e+M);X;1l\'77\':c.1a.77(c.6e+M);X;1l\'76\':c.1a.76(c.6e+M);X}}l Q};f.1t.o.7r=j(M,2k){3e(2k){1l f.7q:c.ci=c.7o(M);c.6d={};X;1l f.7n:c.9f(c.7o(M));X;1l f.67:c.9f(c.ci,c.6d)}l Q};f.1t.o.ch=j(M,2k){c.9c(c.7o(M));l Q};f.1t.o.9f=j(C,F){h F=F||{};c.cf(C);if(c.1a.91(C)){c.1a.4R.2h(C);c.1a.bD(C,F);c.1a.6N(C,F);c.9e(C)}J if(c.1a.bG(C)){c.1a.bO(C,F)}J{c.1a.bN(C,F);c.9e(C)}c.1a.72=C;c.1a.8Z=Q;c.1a.o0=F};f.1t.o.9c=j(C){if(c.cg(C)){c.ce(C);if(c.1a.91(C)){h 7p=c.1a.4R.5h();if(7p==G){l}J if(7p!=C){C=7p}c.1a.bM(C)}J{c.1a.bL(C)}}J{c.1a.bK(C)}c.1a.72=C;c.1a.8Z=G};f.1t.o.9e=j(C){c.1a.3r[C]=c.1a.3r[C]||0;c.1a.3r[C]++};f.1t.o.cg=j(C){if(c.1a.3r[C]){c.1a.3r[C]--;if(c.1a.3r[C]==0){c.1a.3r[C]=2q}l Q}l G};f.1t.o.cf=j(2N){c.9d(2N,G)};f.1t.o.ce=j(C){c.9d(C,Q)};f.1t.o.9d=j(2N,3o){h 3o=3o||G;if(c.1a.3r){1j(h C in c.1a.3r){h cd=c.1a.3r[C];if(cd>0&&c.1a.bW(C,2N,3o)){c.9c(C,Q)}}}};f.1t.o.79=j(){l c.1a.79()};f.1t.o.7o=j(C){C=C.Z(/^([\\s<\\/>]*)|([\\s<\\/>]*)$/gm,\'\').1v();h 3K=c.1a.79();if(3K[C]){l 3K[C]}l C};f.1t.o.cc=j(M,2k){if(f.7n==2k){c.7k=M}l Q};f.1t.o.7m=j(M,2k){if(f.42==2k){c.6d[c.7k]=M}l Q};f.1t.o.7l=j(M,2k){if(f.42==2k){c.6d[c.7k]=M}l Q};f.1t.o.cb=j(M,2k){c.6d[c.7k]=M.Z(/^=/,\'\');l Q};f.1q=j(){c.2g=\'\';c.5g=1g f.3s();c.3r={};c.3U=f.ca;c.4R=[];c.6a=[];c.96={\'&bR;\':\'&#bS;\',\'&nZ;\':\'&#nY;\',\'&nX;\':\'&#nW;\',\'&nV;\':\'&#nU;\',\'&nT;\':\'&#nS;\',\'&nR;\':\'&#nQ;\',\'&nP;\':\'&#nO;\',\'&nN;\':\'&#nM;\',\'&nL;\':\'&#nK;\',\'&nJ;\':\'&#nI;\',\'&nH;\':\'&#nG;\',\'&nF;\':\'&#nE;\',\'&nD;\':\'&#nC;\',\'&nB;\':\'&#nA;\',\'&nz;\':\'&#ny;\',\'&nx;\':\'&#nw;\',\'&nv;\':\'&#nt;\',\'&nr;\':\'&#nq;\',\'&np;\':\'&#nn;\',\'&nm;\':\'&#nl;\',\'&nk;\':\'&#nj;\',\'&nh;\':\'&#ng;\',\'&nf;\':\'&#nd;\',\'&nc;\':\'&#nb;\',\'&na;\':\'&#n9;\',\'&n8;\':\'&#n7;\',\'&n6;\':\'&#n5;\',\'&n4;\':\'&#n3;\',\'&n2;\':\'&#n1;\',\'&n0;\':\'&#mZ;\',\'&mY;\':\'&#mX;\',\'&mW;\':\'&#mV;\',\'&mU;\':\'&#mT;\',\'&mS;\':\'&#mR;\',\'&mQ;\':\'&#mP;\',\'&mO;\':\'&#mN;\',\'&mM;\':\'&#mL;\',\'&mK;\':\'&#mJ;\',\'&mI;\':\'&#mH;\',\'&mG;\':\'&#mF;\',\'&mE;\':\'&#mD;\',\'&mC;\':\'&#mB;\',\'&mA;\':\'&#mz;\',\'&my;\':\'&#mx;\',\'&mw;\':\'&#mv;\',\'&mt;\':\'&#ms;\',\'&mr;\':\'&#mq;\',\'∓\':\'&#mo;\',\'&mn;\':\'&#mm;\',\'&ml;\':\'&#mk;\',\'&mj;\':\'&#mh;\',\'&mg;\':\'&#mf;\',\'&me;\':\'&#md;\',\'&mc;\':\'&#mb;\',\'&ma;\':\'&#m9;\',\'&m8;\':\'&#m7;\',\'&m6;\':\'&#m5;\',\'&m4;\':\'&#m3;\',\'&m2;\':\'&#m1;\',\'&m0;\':\'&#lZ;\',\'&lY;\':\'&#lX;\',\'&lW;\':\'&#lV;\',\'&lU;\':\'&#lT;\',\'&lS;\':\'&#lR;\',\'&lQ;\':\'r;\',\'&lP;\':\'&#lO;\',\'&lN;\':\'&#lM;\',\'&lL;\':\'&#lK;\',\'&lJ;\':\'&#lI;\',\'&lH;\':\'&#lG;\',\'&lF;\':\'&#lE;\',\'&lD;\':\'&#lC;\',\'&lB;\':\'&#lA;\',\'&lz;\':\'&#ly;\',\'&lx;\':\'&#lw;\',\'&lv;\':\'&#lu;\',\'<\':\'&#ls;\',\'&lr;\':\'&#lq;\',\'&lp;\':\'&#lo;\',\'&ln;\':\'&#lm;\',\'≪\':\'&#lk;\',\'&lj;\':\'&#lh;\',\'≶\':\'&#lf;\',\'&ld;\':\'&#lc;\',\'&lb;\':\'&#la;\',\'&l9;\':\'&#l8;\',\'&l7;\':\'&#l6;\',\'&l5;\':\'&#l4;\',\'&l3;\':\'&#l2;\',\'&l1;\':\'&#l0;\',\'&kZ;\':\'&#kY;\',\'&kX;\':\'&#kW;\',\'&kV;\':\'&#kU;\',\'&kT;\':\'&#kS;\',\'&kR;\':\'&#kQ;\',\'&kP;\':\'&#kO;\',\'&kN;\':\'&#kM;\',\'&kL;\':\'&#kK;\',\'&kJ;\':\'&#kI;\',\'&kH;\':\'&#kG;\',\'&kF;\':\'&#kE;\',\'&kD;\':\'&#kC;\',\'&9b;\':\'&#kB;\',\'&kA;\':\'&#kz;\',\'&ky;\':\'&#kx;\',\'&kw;\':\'&#kv;\',\'&ku;\':\'&#kt;\',\'&ks;\':\'&#kr;\',\'&kq;\':\'&#kp;\',\'&ko;\':\'&#kn;\',\'&km;\':\'&#kl;\',\'&kk;\':\'&#kj;\',\'&ki;\':\'&#kh;\',\'&kg;\':\'&#kf;\',\'&ke;\':\'&#kd;\',\'&kc;\':\'&#kb;\',\'&ka;\':\'&#k9;\',\'&k8;\':\'&#k7;\',\'&k6;\':\'&#k5;\',\'&k4;\':\'&#k3;\',\'&k2;\':\'&#k1;\',\'&k0;\':\'&#jZ;\',\'&jY;\':\'&#jX;\',\'&jW;\':\'&#jV;\',\'&jU;\':\'&#jT;\',\'&jS;\':\'&#jR;\',\'&jQ;\':\'&#jP;\',\'&jO;\':\'&#jN;\',\'&jM;\':\'&#jL;\',\'&jK;\':\'&#jJ;\',\'&jI;\':\'&#jH;\',\'&jG;\':\'&#jF;\',\'&jE;\':\'&#jD;\',\'&jC;\':\'&#jB;\',\'&jA;\':\'&#jz;\',\'&jy;\':\'&#jx;\',\'&jw;\':\'&#jv;\',\'&ju;\':\'&#jt;\',\'&jr;\':\'&#jq;\',\'μ\':\'&#jp;\',\'ν\':\'&#jo;\',\'&jn;\':\'&#jm;\',\'&jl;\':\'&#jk;\',\'π\':\'&#jj;\',\'&ji;\':\'&#jh;\',\'&jg;\':\'&#jf;\',\'&je;\':\'&#jd;\',\'&jc;\':\'&#jb;\',\'&ja;\':\'&#j9;\',\'&j8;\':\'&#j7;\',\'&j6;\':\'&#j5;\',\'&j4;\':\'&#j3;\',\'&j2;\':\'&#j1;\',\'&j0;\':\'&#iZ;\',\'&iY;\':\'&#iX;\',\'&iW;\':\'&#iV;\',\'&iU;\':\'&#iT;\',\'&iS;\':\'&#iR;\',\'&iQ;\':\'&#iP;\',\'&iO;\':\'&#iN;\',\'&iM;\':\'&#iL;\',\'&iK;\':\'&#iJ;\',\'&iI;\':\'&#iH;\',\'&iG;\':\'&#iF;\',\'&iE;\':\'&#iD;\',\'&iC;\':\'&#iB;\',\'&iA;\':\'&#iz;\',\'&iy;\':\'&#ix;\',\'&iw;\':\'&#iv;\',\'&iu;\':\'&#it;\',\'&is;\':\'&#ir;\',\'&iq;\':\'&#ip;\',\'&io;\':\'&#im;\',\'&il;\':\'&#ik;\',\'&ij;\':\'&#ii;\',\'&ih;\':\'&#ie;\',\'⁣\':\'&#ib;\',\'&ia;\':\'&#i9;\',\'&i8;\':\'&#i7;\',\'&i6;\':\'&#i5;\',\'&i4;\':\'&#i3;\',\'&i2;\':\'&#i1;\',\'&i0;\':\'&#hZ;\',\'&4v;\':\'&#hY;\',\'&hX;\':\'&#hW;\',\'&hV;\':\'&#hU;\',\'&hT;\':\'&#hS;\',\'&hR;\':\'&#hQ;\',\'&hP;\':\'&#hO;\',\'&hN;\':\'&#hM;\',\'&hL;\':\'&#hK;\',\'&hJ;\':\'&#hI;\',\'&hH;\':\'&#hG;\',\'&hF;\':\'&#hE;\',\'&hD;\':\'&#hC;\',\'&hB;\':\'&#hA;\',\'&hz;\':\'&#hy;\',\'&hx;\':\'&#hw;\',\'&hv;\':\'&#hu;\',\'&ht;\':\'&#hs;\',\'&hq;\':\'&#hp;\',\'&ho;\':\'&#hn;\',\'&hm;\':\'&#hl;\',\'&hk;\':\'&#hj;\',\'&hi;\':\'&#hh;\',\'&hg;\':\'&#hf;\',\'∋\':\'&#he;\',\'&hd;\':\'&#hc;\',\'&hb;\':\'&#ha;\',\'&h9;\':\'&#h8;\',\'&h7;\':\'&#h0;\',\'&gZ;\':\'&#gY;\',\'&57;\':\'&#gX;\',\'&gW;\':\'&#gV;\',\'&gU;\':\'&#gT;\',\'&gS;\':\'&#gR;\',\'∨\':\'&#gQ;\',\'&gP;\':\'&#gO;\',\'&gN;\':\'&#gM;\',\'&gL;\':\'&#gK;\',\'&gJ;\':\'&#gI;\',\'&gH;\':\'&#gG;\',\'&gF;\':\'&#gE;\',\'&gD;\':\'&#gC;\',\'≠\':\'&#gB;\',\'&c9;\':\'&#gA;\',\'≤\':\'&#gz;\',\'≥\':\'&#gy;\',\'&3b;\':\'&#gx;\',\'&4Q;\':\'&#gw;\',\'&gv;\':\'&#gu;\',\'>\':\'&#gs;\',\'&gr;\':\'&#gq;\',\'&gp;\':\'&#go;\',\'&gn;\':\'&#gl;\',\'&gk;\':\'&#gj;\',\'&gh;\':\'&#gg;\',\'&gf;\':\'&#gd;\',\'&gc;\':\'&#gb;\',\'&ga;\':\'&#g9;\',\'&g8;\':\'&#g7;\',\'&47;\':\'&#g6;\',\'&g5;\':\'&#g4;\',\'&g3;\':\'&#g2;\',\'&g1;\':\'&#g0;\',\'&fZ;\':\'&#fY;\',\'&fX;\':\'&#fW;\',\'&fV;\':\'&#fU;\'};c.90=["a","7j","94","7a","c8","b","5z","7i","c7","2G","1m","2H","c6","5y","c5","7h","6c","dd","93","R","c4","dl","dt","em","3q","1P","3p","h1","h2","h3","h4","h5","h6","W","i","c3","c2","1s","3L","li","c1","9a","53","ol","c0","7d","p","1W","5w","q","bZ","2t","5q","bY","3T","3A","1o","3b","4Q","45","99","5x","56","98","7g","97","O","7e","bX","2V","h","fT"];c.bF=["br","hr","7f","1C"];l c};f.1q.o.bW=j(C,6b,3o){h 3o=3o||G;if(C==\'5x\'){if((3o&&6b==\'7e\')||(!3o&&6b==\'5x\')){l Q}}if(C==\'7d\'){if((3o&&6b==\'5q\')||(!3o&&6b==\'7d\')){l Q}}l G};f.1q.o.7c=j(1w){c.2g=\'\';l 1w};f.1q.o.7b=j(1M){1M=c.bV(1M);1M=c.bU(1M);1M=c.bT(1M);l 1M};f.1q.o.bV=j(1M){1j(h 95 in c.96){1M=1M.Z(95,c.96[95])}l 1M};f.1q.o.bU=j(1M){h 3K=\'em|3A|3b|4Q|94|5w|93|2G|7a\';l 1M.Z(1g 4s(\'<\\/(\'+3K+\')><\\\\1>\',\'\'),\'\').Z(1g 4s(\'(\\s*<(\'+3K+\')>\\s*){2}(.*)(\\s*<\\/\\\\2>\\s*){2}\',\'\'),\'<\\$2>\\$3<\\$2>\')};f.1q.o.bT=j(1M){l 1M.Z(1g 4s(\'<(\'+c.90.4O("|")+\')>(
    |&#bS;|&bR;|\\\\s)*<\\/\\\\1>\',\'g\'),\'\')};f.1q.o.bQ=j(){l c.2g};f.1q.o.79=j(){l{\'b\':\'3A\',\'i\':\'em\'}};f.1q.o.bP=j(T){c.2g+=T};f.1q.o.78=j(T){if(c.fS){c.2g+=T}};f.1q.o.77=j(T){if(!c.fR){c.2g+=T}};f.1q.o.76=j(T){if(!c.fQ){c.2g+=T}};f.1q.o.6N=j(C,F){c.2g+=c.5g.C(C,c.3U.5W(C,F),Q)};f.1q.o.bO=j(C,F){c.2g+=c.5g.C(C,c.3U.5W(C,F))};f.1q.o.bN=j(C,F){};f.1q.o.bM=j(C){c.2g=c.2g.Z(/
    $/,\'\')+c.8X(\'bE\',C)+""+c.8X(\'69\',C)};f.1q.o.bL=j(C){};f.1q.o.bK=j(C){c.2g+=""};f.1q.o.bJ=j(){c.6a=[\'R\',\'3T\'];c.3U.75=[\'1o\'];c.3U.74=[\'bI\',\'fP\'];c.92=Q};f.1q.o.bH=j(){c.6a=[];c.3U.75=[];c.3U.74=[];c.92=G};f.1q.o.91=j(C){l!c.6a.2E(C)&&c.90.2E(C)};f.1q.o.bG=j(C){l!c.6a.2E(C)&&c.bF.2E(C)};f.1q.o.bC=j(C,1X){c.8Y(\'69\',C,1X)};f.1q.o.fO=j(C,1X){c.8Y(\'bE\',C,1X)};f.1q.o.bD=j(C,F){if(C!=\'li\'&&(C==\'2V\'||C==\'ol\')&&c.72&&!c.8Z&&c.72==\'li\'){c.2g=c.2g.Z(/<\\/li>$/,\'\');c.bC(C,\'\')}};f.1q.o.8Y=j(3n,C,1X){if(!c[\'44\'+3n+\'43\']){c[\'44\'+3n+\'43\']=[]}if(!c[\'44\'+3n+\'43\'][C]){c[\'44\'+3n+\'43\'][C]=[]}c[\'44\'+3n+\'43\'][C].2h(1X)};f.1q.o.8X=j(3n,C){if(c[\'44\'+3n+\'43\']&&c[\'44\'+3n+\'43\'][C]&&c[\'44\'+3n+\'43\'][C].I>0){l c[\'44\'+3n+\'43\'][C].5h()}l\'\'};f.bB=j(3S,2F){h 2F=(2F==2q?Q:2F);B.5v(c,1g f.2s(3S,(2F?\'5u\':\'54\')));c.8W(\'54\',\'5u\');if(2F==Q){c.3m("/\\\\\\4u[<\\\\s]*f[>\\\\s]*\\\\\\4u/",\'5u\',\'54\');c.2U("/\\\\\\4u[<\\/\\\\s]*f[>\\\\s]*\\\\\\4u/",\'54\')}c.55("\\\\\\fN[a-z-8V-9]+[\\\\fM-z]*",\'54\',\'bA\');c.3m("/\\\\\\4u",\'54\',\'8U\');c.2U("\\\\\\4u/",\'8U\');c.3m("\\fL",\'54\',\'70\');c.2U("\\fK",\'70\');c.3m("/\\\\\\4u",\'70\',\'8T\');c.2U("\\\\\\4u/",\'8T\');l c};f.41=j(){c.6Z=G;c.65=G;c.2F=Q;c.52={\'4t\':[],\'3D\':[],\'51\':[]};l c};f.41.o.3R=j(1w,2F){h 2F=(2F==2q?c.2F:2F);c.71=1g f.bB(c,2F);c.71.3R(1w)};f.41.o.5u=j(M,2k){l Q};f.41.o.8U=j(T,2o){if(T.M(/fJ[a-68-9\\s]*D[a-68-9\\s]*/mi)){l G}if(2o==f.42){if(!c.6Z){c.65=Q;c.2w={\'O\':T.4r()}}J{if(c.2w[c.2r]){if(!c.2w[c.2r].6X){c.2w[c.2r].6X=[T]}J{c.2w[c.2r].6X.2h(T)}}}c.6Z=Q}l Q};f.41.o.70=j(M,2o){if(2o==f.42){M=M.4r();if(M!=\'\'){c.2w[c.2r].1o=M}}J if(2o==f.67){c.6Z=G;c.65=G;c.bz(c.2w)}l Q};f.41.o.8T=j(M,2o){if(2o==f.42){c.2w[c.2r].8Q=M.Z(/^([\\s\\/\\*]*)|([\\s\\/\\*]*)$/gm,\'\')}l Q};f.41.o.bA=j(M){M=M.Z(/^([\\s\\.]*)|([\\s\\.*]*)$/gm,\'\');h C=\'\';if(M.8O(\' \')>0){h 8R=M.8S(\' \');c.2r=8R[0];h C=8R[1]}J{c.2r=M}if(!c.65){c.2w={\'O\':(!C?\'\':C.fI()+\': \')+c.2r};c.65=Q}if(!c.2w[c.2r]){c.2w[c.2r]={\'E\':c.2r}}if(C){if(!c.2w[c.2r].3K){c.2w[c.2r].3K=[C]}J{c.2w[c.2r].3K.2h(C)}}l Q};f.41.o.bz=j(6Y){1j(h E in 6Y){h 3k=6Y[E];if(3l 3k==\'53\'&&E!=\'O\'){c.52.4t.2h({\'E\':3k.E.4r(),\'O\':6Y.O,\'by\':(3k.6X||3k.3K).4O(\', \').4r()});if(3k.8Q){c.52.3D.2h({\'E\':\'.\'+3k.E.4r(),\'1e\':3k.8Q})}if(3k.1o){c.52.51.2h({\'E\':\'.\'+3k.E.4r(),\'1e\':3k.1o})}}}};B.fn.2J=j(){if(c[0].1r==3)l!(/[^\\t\\n\\r ]/.2v(c[0].4W));l G};f.2J=j(n){if(n.1r==3)l!(/[^\\t\\n\\r ]/.2v(n.4W));l G};f.bx=j(bw){l!(/[^\\t\\n\\r ]/.2v(bw))};B.fn.3z=j(Y){h n=c;if(n[0].1r==3)n=n.bv().bu(0,1);if(n.5t(Y).3j()==1)l n;J l n.bv(Y).bu(0,1)};if(!5s.o.bt){5s.o.bt=j(bq,8P){l(c.bs(0,8P)+bq+c.64(8P))}};if(!5s.o.1p){5s.o.1p=j(bp,bo){h 4Z=1g 4s(bp,"g");l(c.Z(4Z,bo))}};if(!5s.o.4r){5s.o.4r=j(){l c.Z(/^(\\s*)|(\\s*)$/gm,\'\')}};if(!3i.o.2E){3i.o.2E=j(63){1j(h i=0;i20&&8F>0.1){h 5p=2Q.3H();2R=fx.fw(8F*2e.I-1);if(2R<=0)2R=1;2K((2e[2R].1r==f.1x.2b||2e[2R].3C=="4l")&&2R>0){2R--}if(2R>0){5p.8E(2e[2R]);5p.4X("bf",2Q);if(6V>5p.T.I){5o=1;2Q.4X("8D",5p);2Q.4X("be",2S)}J{5o=-1;2Q.4X("8D",2S);2Q.4X("be",5p);2R--}}J{5o=1;2Q=2S.3H()}}J{if(5o==1)2Q=2S.3H();J{2Q=bd.3H();2Q.4X("8D",2S)}}h L=4q.2e[2R];h 3F=2Q.3H();if(5o==1){h 3G=0;h br=0;2K(L){if(L.3C==\'4l\')br++;3G=c.8C(L);if(3F.T.I>3G){3F.fv(\'6U\',3G+br);br=0}J X;L=L.4i}4p=3F.T.I}J{h 3G=0;h br=0;2K(L){if(L.3C==\'4l\')br++;3G=c.8C(L);if(3F.T.I>3G){h I=3F.T.I;3F.bc(\'6U\',-(3G+br));if(br==0){h bb=(I-3G)-3F.T.I;3F.bc(\'6U\',bb)}br=0}J X;if(L.3x)L=L.3x;J X}4p=3G-3F.T.I}l{\'L\':L,\'4p\':4p}},8C:j(L){if(L.1r==f.1x.4h)l L.fu.I;J if(L.1r==f.1x.2b)l L.4W.I},6L:j(){if(!c.2z){c.1z.ft();l Q}l G}};f.2D=j(D){c.1u=D;c.62="N";c.4V="\\n"};f.2D.o.61=j(1N){c.1T=1N;c.H=1N.b0;h 1D=c.H.5n[0];h 2C=2P(c.u.3D);c.5m(c.H,2C);c.H.O=c.1u.4U;c.W(c.1u.5l);c.6T();if(B.3f(c.u.3Y))c.u.3Y(c);c.1u.60();B(c.H).3g("3B",c.3B);B(c.H).3g("2O",c.2O);B(c.H).3g("8B",c.6T);if(B.3f(c.u.3X))c.u.3X(c);c.3W()};f.2D.o.W=j(W){if(W){c.H.4T="ba";W=W.Z(/]*)>/gi,"").Z(/<\\/em>/gi,"").Z(/<3A([^>]*)>/gi,"").Z(/<\\/3A>/gi,"");B(c.H.1m).W(W);c.6T()}J l(B(c.H.1m).W())};f.2D.o.1U=j(1B,1W){if(!c.1h())l(G);3e(1B){1l f.5k:1l f.5j:h 1J=c.1h();h 1V=c.1T.1O.2f();h 2j=1V.2j;if(2j.3C=="#T")2j=2j.1c;1J=c.3d(1J,f.5Z);2j=c.3d(2j,f.5Z);if(1J&&1J==2j&&1J.1A.1v()==f.6P){h 5i=1J.1c.1c;if(1J.1c.2e.I>1||5i.1A.1v()==f.8y||5i.1A.1v()==f.8x)c.H.2B(1B,\'\',1d)}X;4m:if(1W)c.H.2B(1B,\'\',1W);J c.H.2B(1B,\'\',1d)}h K=c.1h();if(K.1A.1v()==f.3V)c.1U(f.4k,f.P);c.3W()};f.2D.o.1h=j(){h 1V=c.1T.1O.2f();h L=1V.1J;if(L){if(L.3C=="#T")l(L.1c);J l(L)}J l(1d)};f.2D.o.5Y=j(1D,2i){1D.8w(2i.E+" {"+2i.1e+"}",1D.8v.I)};f.2D.o.3B=j(1f){h D=f.2A[c.O];h 1V=D.4o.2f();if(1f.6O){if(1f.1I==66){D.1U(f.8u);l G}if(1f.1I==73){D.1U(f.8t);l G}}};f.2D.o.2O=j(1f){h D=f.2A[c.O];D.2n=1d;h K=1d;if(1f.1I==13&&!1f.aX){B(D.H.1m).8s(f.4l).aW();K=D.1h();if(K&&K.1A.1v()==f.5X)D.1U(f.4k,f.P);}J if(1f.1I!=8&&1f.1I!=17&&1f.1I!=46&&1f.1I!=8r&&!1f.aV&&!1f.6O){K=D.1h();h E=K.1A.1v();if(E=="3A"||E=="b"||E=="em"||E=="i"||E=="3b"||E=="4Q"||E=="a")E=K.1c.1A.1v();if(E==f.3V)D.1U(f.4k,f.P)}};f.2D.o.6T=j(){if(c.4T=="ba"){b9{c.4T="on";c.2B("fs",\'\',G)}b8(e){}}};f.2D.o.4S=j(L){h 2c=3h.6S();2c.fr(L);h 1h=c.1T.1O.2f();1h.fq(2c);1h.2m(L,L.2e.I);c.1T.1O.8B()};f.2D.o.6N=j(C,F){h F=c.3U.5W(C,F);if(C==\'3T\'&&F.1o){h 2N=c.6M(F.1o);if(2N){c.4R.5h();h C=2N;c.4R.2h(2N);F.1o=\'\'}J{l}}c.2g+=c.5g.C(C,F,Q)};f.2D.o.6M=j(1o){if(/aU/.2v(1o))l\'3A\';if(/aT/.2v(1o))l\'em\';if(/3b/.2v(1o))l\'3b\';if(/3b/.2v(1o))l\'aS\';l G};f.8A=j(D){c.1u=D};f.8A.o={2f:j(){h 1G=c.1u.1T.1O.2f();c.1S=1G.2M(0).8p;c.1H=1G.2M(0).8o;c.3a=1G.2M(0).3a;c.2L=1G.2M(0).2L;c.2z=1G.2z;c.1z=1G;c.K=B(c.1S).3z(f.4P.4O(","))[0];l c},8n:j(Y){if(Y.1r==f.1x.2b)Y=Y.1c;h 1k=B(Y)[0];2K(1k.1r!=f.1x.2b){if(!1k.5f())X;1k=1k.4j}if(f.2J(1k))1k=1k.4i;if(1k.1r==f.1x.4h)c.1z.2m(1k.1c,0);J c.1z.2m(1k,0)},8m:j(Y){if(Y.1r==f.1x.2b)Y=Y.1c;h 1b=B(Y)[0];2K(1b.1r!=f.1x.2b){if(!1b.5f())X;1b=1b.3y}if(f.2J(1b))1b=1b.3x;if(1b.1r==f.1x.4h)c.1z.2m(1b.1c,1b.1c.2e.I);J c.1z.2m(1b,1b.I)},6L:j(){if(!c.1z.2z){c.1z.8l();l Q}l G}};f.3Z=j(D){c.1u=D;c.62="N";c.4V="\\r\\n"};f.3Z.o.61=j(1N){c.1T=1N;c.H=1N.1O.3h;h 1D=c.H.5n[0];h 2C=2P(c.u.3D);c.5m(c.H,2C);c.H.O=c.1u.4U;c.H.4T="on";c.W(c.1u.5l);if(B.3f(c.u.3Y))c.u.3Y(c);B(c.2p).3E(c.u.6R+\'[@E=\'+f.5k+\']\').6Q();B(c.2p).3E(c.u.6R+\'[@E=\'+f.5j+\']\').6Q();c.1u.60();B(c.H).3g("3B",c.3B);B(c.H).3g("2O",c.2O);if(B.3f(c.u.3X))c.u.3X(c);c.3W()};f.3Z.o.1U=j(1B,1W){3e(1B){1l f.5k:1l f.5j:c.2o("fp fo.");X;4m:if(1W)c.H.2B(1B,G,1W);J c.H.2B(1B);X}c.3W()};f.3Z.o.1h=j(){h 1V=c.1T.1O.2f();h L=1V.1J;if(L){if(L.3C=="#T")l(L.1c);J l(L)}J l(1d)};f.3Z.o.5Y=j(1D,2i){1D.8w(2i.E+" {"+2i.1e+"}",1D.8v.I)};f.3Z.o.3B=j(1f){h D=f.2A[c.O];h 1V=D.4o.2f();if(!1V.K&&1f.1I!=f.4n.b7&&1f.1I!=f.4n.b6&&1f.1I!=f.4n.b5&&1f.1I!=f.4n.b4&&1f.1I!=f.4n.b3&&1f.1I!=f.4n.b2&&1f.1I!=f.4n.b1)D.1U(f.4k,f.P)};f.3Z.o.2O=j(1f){h D=f.2A[c.O];D.2n=1d};f.3Z.o.4S=j(L){};f.8z=j(D){c.1u=D};f.8z.o={2f:j(){h 1G=c.1u.1T.1O.2f();c.1S=1G.2M(0).8p;c.1H=1G.2M(0).8o;c.3a=1G.2M(0).3a;c.2L=1G.2M(0).2L;c.2z=1G.2z;c.1z=1G;c.K=B(c.1S).3z(f.4P.4O(","))[0];l c},8n:j(Y){if(Y.1r==f.1x.2b)Y=Y.1c;h 1k=B(Y)[0];2K(1k.1r!=f.1x.2b){if(!1k.5f())X;1k=1k.4j}if(f.2J(1k))1k=1k.4i;if(1k.1r==f.1x.4h)c.1z.2m(1k.1c,0);J c.1z.2m(1k,0)},8m:j(Y){if(Y.1r==f.1x.2b)Y=Y.1c;h 1b=B(Y)[0];2K(1b.1r!=f.1x.2b){if(!1b.5f())X;1b=1b.3y}if(f.2J(1b))1b=1b.3x;if(1b.1r==f.1x.4h)c.1z.2m(1b.1c,1b.1c.2e.I);J c.1z.2m(1b,1b.I)},6L:j(){if(!c.1z.2z){c.1z.8l();l Q}l G}};f.3c=j(D){c.1u=D;c.62="N";c.4V="\\n"};f.3c.o.61=j(1N){c.1T=1N;c.H=1N.b0;h 1D=c.H.5n[0];h 2C=2P(c.u.3D);c.5m(c.H,2C);c.H.O=c.1u.4U;c.H.4T="on";c.W(c.1u.5l);if(B.3f(c.u.3Y))c.u.3Y(c);c.1u.60();B(c.H).3g("3B",c.3B);B(c.H).3g("2O",c.2O);if(B.3f(c.u.3X))c.u.3X(c);c.3W()};f.3c.o.1U=j(1B,1W){if(!c.1h())l(G);3e(1B){1l f.5k:1l f.5j:h 1J=c.1h();h 1V=c.1T.1O.2f();h 2j=1V.2j;if(2j.3C=="#T")2j=2j.1c;1J=c.3d(1J,f.5Z);2j=c.3d(2j,f.5Z);if(1J&&1J==2j&&1J.1A.1v()==f.6P){h 5i=1J.1c.1c;if(1J.1c.2e.I>1||5i.1A.1v()==f.8y||5i.1A.1v()==f.8x)c.H.2B(1B,\'\',1d)}X;1l f.aZ:1l f.aY:c.H.2B(1B,\'\',1d);h 1J=c.1h();h K=c.3d(1J,f.4P);if(K)B(K).fm(B(K).W());X;4m:if(1W)c.H.2B(1B,\'\',1W);J c.H.2B(1B,\'\',1d)}h K=c.1h();if(K&&K.1A.1v()==f.3V)c.1U(f.4k,f.P);c.3W()};f.3c.o.1h=j(){h 1V=c.1T.1O.2f();h L=1V.1J;if(L){if(L.3C=="#T")l(L.1c);J l(L)}J l(1d)};f.3c.o.5Y=j(1D,2i){1D.8w(2i.E+" {"+2i.1e+"}",1D.8v.I)};f.3c.o.3B=j(1f){h D=f.2A[c.O];if(1f.6O){if(1f.1I==66){D.1U(f.8u);l G}if(1f.1I==73){D.1U(f.8t);l G}}};f.3c.o.2O=j(1f){h D=f.2A[c.O];D.2n=1d;h K=1d;if(1f.1I==13&&!1f.aX){B(D.H.1m).8s(f.4l).aW();K=D.1h();if(K&&K.1A.1v()==f.5X)D.1U(f.4k,f.P);}J if(1f.1I!=8&&1f.1I!=17&&1f.1I!=46&&1f.1I!=8r&&!1f.aV&&!1f.6O){K=D.1h();h E=K.1A.1v();if(E=="3A"||E=="b"||E=="em"||E=="i"||E=="3b"||E=="4Q"||E=="a")E=K.1c.1A.1v();if(E==f.3V)D.1U(f.4k,f.P)}};f.3c.o.4S=j(L){};f.3c.o.6N=j(C,F){h F=c.3U.5W(C,F);if(C==\'3T\'&&F.1o){h 2N=c.6M(F.1o);if(2N){c.4R.5h();h C=2N;c.4R.2h(2N);F.1o=\'\'}J{l}}c.2g+=c.5g.C(C,F,Q)};f.3c.o.6M=j(1o){if(/aU/.2v(1o))l\'3A\';if(/aT/.2v(1o))l\'em\';if(/3b/.2v(1o))l\'3b\';if(/aS/.2v(1o))l\'4Q\';l G};f.1n.o.1M=j(){B(\'.aR-1o-3T\',c.H.1m).fl(\'aR-1o-3T\');l c.3S.3R(c.W())};f.8q=j(D){c.1u=D};f.8q.o={2f:j(){h 1G=c.1u.1T.1O.2f();c.1S=1G.2M(0).8p;c.1H=1G.2M(0).8o;c.3a=1G.2M(0).3a;c.2L=1G.2M(0).2L;c.2z=1G.2z;c.1z=1G;c.K=B(c.1S).3z(f.4P.4O(","))[0];l c},8n:j(Y){if(Y.1r==f.1x.2b)Y=Y.1c;h 1k=B(Y)[0];2K(1k.1r!=f.1x.2b){if(!1k.5f())X;1k=1k.4j}if(f.2J(1k))1k=1k.4i;if(1k.1r==f.1x.4h)c.1z.2m(1k.1c,0);J c.1z.2m(1k,0)},8m:j(Y){if(Y.1r==f.1x.2b)Y=Y.1c;h 1b=B(Y)[0];2K(1b.1r!=f.1x.2b){if(!1b.5f())X;1b=1b.3y}if(f.2J(1b))1b=1b.3x;if(1b.1r==f.1x.4h)c.1z.2m(1b.1c,1b.1c.2e.I);J c.1z.2m(1b,1b.I)},6L:j(){if(!c.1z.2z){c.1z.8l();l Q}l G}};',62,1722,'||||||||||||this|||WYMeditor||var||function||return|||prototype||||||_options|||||||jQuery|tag|wym|name|attributes|false|_doc|length|else|container|node|match|class|title||true|div|value|text||mode|html|break|jqexpr|replace|||||||||||_Listener|lastTextNode|parentNode|null|css|evt|new|selected|type|for|firstTextNode|case|body|editor|style|replaceAll|XhtmlSaxListener|nodeType|label|XhtmlParser|_wym|toLowerCase|raw|NODE|boxHtml|original|tagName|cmd|input|styles|scope|attr|_sel|endNode|keyCode|focusNode|_tags|val|xhtml|iframe|contentWindow|form|result|options|startNode|_iframe|_exec|sel|param|content|key|row|||||||||||href|TEXT|range|src|childNodes|getSelection|output|push|oCss|anchorNode|state|required|collapse|_selected_image|status|_box|undefined|_current_element|Lexer|script|attribute|test|_current_item|_regexes|link|isCollapsed|INSTANCES|execCommand|aCss|WymClassMozilla|contains|only_wym_blocks|blockquote|button|sType|isPhantomNode|while|endOffset|getRangeAt|new_tag|keyup|eval|searchRange|childPosition|parentRange|window|addExitPattern|ul|_mode_handlers|start|parent|nodes|||||||||||startOffset|sub|WymClassSafari|findUp|switch|isFunction|bind|document|Array|size|details|typeof|addEntryPattern|position|closing|head|fieldset|_open_tags|XmlHelper|ParallelRegex|char|disabled|skin|previousSibling|lastChild|parentsOrSelf|strong|keydown|nodeName|editorStyles|find|currentOffsetRange|nodeLength|duplicate|WymClassExplorer|Text|tags|legend|XhtmlLexer|matched|pattern|matches|stylesheet|parse|parser|span|validator|BODY|listen|postInit|preBind|WymClassOpera||WymCssParser|LEXER_UNMATCHED|_closing|_insert_|table||lang|parsed|defaults|top|left|inside|xml|sTmp|INDEX|newNode|ELEMENT|nextSibling|firstChild|FORMAT_BLOCK|BR|default|KEY|selection|offset|parentElement|trim|RegExp|classesItems|x2a|image|_mode|addPattern|_patterns|baseline|bottom|middle|valign|charoff|justify|center|right|align|click|doc|dialogHtml|tagname|oClass|WymClass|join|MAIN_CONTAINERS|sup|_tag_stack|setFocusToNode|designMode|_index|_newLine|data|setEndPoint|item|rExp||dialogStyles|css_settings|object|WymCss|addSpecialPattern|textarea|prop|_invokeParser|_case|onload|sBodyHtml|basePath|dialog|WymSel|hasChildNodes|helper|pop|ancestor|OUTDENT|INDENT|_html|addCssRules|styleSheets|direction|childRange|select|caretPos|String|filter|Ignore|extend|pre|td|cite|base|init|_stack|except|width|index|alt|tag_attributes|delimiter|nNext|close|sUrl|INIT_DIALOG|SKINS|skinPath|CssParser|wymeditor|sVal|TH|oContainer|oTool|iframeHtml|wym_section|getValidTagAttributes|PRE|addCssRule|BLOCKS|bindEvents|initIframe|_class|elem|substring|_has_title||LEXER_EXIT|z0|after|avoided_tags|now_on_tag|colgroup|_tag_attributes|_non_tag|action|special|new_mode|accept|StateStack|_regex|count|_possible_tag_attributes|string|next|hidden|open|createElement|submitSelector|titleSelector|TITLE|SRC|sStamp|dialogImageSelector|DIALOG_LINK|mouseup|update|stringDelimiterRight|stringDelimiterLeft|STRINGS|BLOCKQUOTE|TD|aClasses|wym_dialog|wym_cancel|wym_submit|wym_dialog_type|deleteIfExpanded|getTagForStyle|openBlockTag|ctrlKey|LI|hide|toolSelector|createRange|enableDesignMode|character|parentOffset|saveCaret|expressions|style_details|_in_style|WymCssStyle|_Lexer|last_tag||skiped_attribute_values|skiped_attributes|addCss|addScript|addComment|getTagReplacements|address|afterParsing|beforeParsing|option|tr|img|th|col|bdo|abbr|_current_attribute|SingleQuotedAttribute|DoubleQuotedAttribute|LEXER_SPECIAL|normalizeTag|expected_tag|LEXER_ENTER|OpeningTag|_addNonTagBlock|handler|unmatched|case_sensitive|regex|tag_defaults|only|valid_attributes|rows|cols|screen|charset|meta|icon|shortcut|subsection|section|prev|help|glossary|copyright|contents|chapter|bookmark|appendix|alternate|rel|escape_quotes|_entitiesDiv|WymSelection|altSelector|ALT|srcSelector|HREF|SKINS_DEFAULT_CSS|loadSkin|grep|pack|jquery|jQueryPath|wymPath|PREVIEW|DIALOG_PASTE|DIALOG_TABLE|DIALOG_IMAGE|bFound|firstNode|aTypes|NAME|TOOL_TITLE|HTML|iframeBasePath|browser|Cancel|Submit|deleteFromDocument|cursorToEnd|cursorToStart|endContainer|startContainer|WymSelSafari|224|children|ITALIC|BOLD|cssRules|insertRule|UL|OL|WymSelOpera|WymSelMozilla|focus|_getTextLength|StartToEnd|moveToElementText|offsetRatio|parentLength|_getNodeAndOffset|selEnd|selStart|WymSelExplorer|paste|findByName|ret|indexOf|pos|feedback_style|parts|split|WymCssFeddbackStyle|WymCssComment|_0|mapHandler|_getClosingTagContent|_insertContentWhenClosingTag|last_tag_opened|block_tags|isBlockTag|_avoiding_tags_implicitly|del|acronym|entity|entities|thead|tfoot|tbody|noscript|circ|_callCloseTagListener|_autoCloseUnclosed|_increaseOpenTagCounter|_callOpenTagListener|Css|Script|Comment|unparsed_character_count|getCurrent|_parser|enter|leave|_labels|default_attributes|default_attributes_and_events|_attributes|_events|readonly|all|media|javascript|height|http|get|dir|innerHTML|_formated_options|tagOptions|postInitDialog|newRow|iCols|iRows|IMG|getElementsByTagName|INSERT_IMAGE|CREATE_LINK|hrefSelector|preInitDialog|responseText|async|url|ajax|found|images|htmlSelector|wDialog|replaceStrings|DIALOG_BODY|DIALOG_TITLE|JQUERY_PATH|WYM_PATH||CSS_PATH|htmlValSelector|_element|langPath|switchTo|toggleClass|lgt|H6|H5|H4|H3|H2|H1|sName|sContainers|CONTAINERS_ITEMS|CONTAINER_CLASS|CONTAINER_TITLE|CONTAINER_NAME|aContainers|sClasses|CLASSES_ITEMS|CLASS_TITLE|CLASS_NAME|sTools|TOOLS_ITEMS|TOOL_CLASS|TOOL_NAME|aTools|STATUS|IFRAME|CLASSES|CONTAINERS|TOOLS|IFRAME_BASE_PATH|SaxListener|preInit|Paste_From_Word|indent|Table|wym_title|Image|Link|wym_classes|wym_containers|wym_tools|Preview|Unlink|Outdent||Indent|Apple|super|italic|bold|metaKey|remove|shiftKey|INSERT_UNORDEREDLIST|INSERT_ORDEREDLIST|contentDocument|DELETE|BACKSPACE|DOWN|RIGHT|UP|LEFT|ENTER|catch|try|off|diff|moveEnd|backwardRange|EndToEnd|EndToStart|collapseToStart|handleKeydown|_initialized|returnValue|event|onclick|onkeyup|onfocus|rep|old|inserted||substr|insertAt|slice|parents|str|isPhantomString|expr|addStyleSetting|WymCssStyleDeclaration|WymCssLexer|insertContentAfterClosingTag|fixNestingBeforeOpeningBlockTag|before|inline_tags|isInlineTag|allowStylingTagsAndAttributes|MsoNormal|avoidStylingTagsAndAttributes|closeUnopenedTag|closeUnknownTag|closeBlockTag|openUnknownTag|inlineTag|addContent|getResult|nbsp|160|removeEmptyTags|joinRepeatedEntities|replaceNamedEntities|shouldCloseTagAutomatically|tt|small|samp|optgroup|map|kbd|ins|dfn|code|caption|big|area|equiv|XhtmlValidator|UnquotedAttribute|TagAttributes|counter|autoCloseUnclosedBeforeTagClosing|autoCloseUnclosedBeforeNewOpening|_decreaseOpenTagCounter|ClosingTag|_tag|Listener|addAttributeTokens|addInTagDeclarationTokens|addTagTokens|addCssTokens|addScriptTokens|addCommentTokens|addTokens|unparsed|_reduce|is_match|current|_decodeSpecial|_|_isSpecialMode|__exit|_isModeEnd|LEXER_MATCHED|_dispatchTokens|_getPerlMatchingFlags|Tk7|Tk6|Tk5|Tk4|Tk3|Tk2|Tk1|_untokenizeRegex|_tokenizeRegex|_getCompoundedRegex|subject|getDefaultAttributesAndEventsForTag|getUniqueAttributesAndEventsForTag|getPossibleTagAttributes|validateAttribute|doesAttributeNeedsValidation|getDefaultAttributesAndEventsForTags|isValidTag|parseInt|possible_attributes|rowgroup|rowspan|headers|colspan|axis|border|box|frame|braille|print|projection|multiple|defer|valuetype|usemap|home||rev|hreflang|datetime|submit|reset|checked|rtl||ltr|polygon|poly|circle|rectangle|rect|shape||coords|designates|keyboard|tabindex|accesskey|escapeEntities|escapeOnce|escaped|_fixDoubleEscape|removeChild|cancelSelector|previewSelector|dialogPreviewSelector|sText|textSelector|dialogPasteSelector|append|sCaption|newCaption|captionSelector|TABLE|colsSelector|rowsSelector|dialogTableSelector|dialogLinkSelector|dialogType|uniqueStamp|dialogTypeSelector|SKINS_DEFAULT_JS|initSkin|loadCss|each|appendChild|configureEditorUsingRawCss|skins|computeJqueryPath|computeWymPath|computeBasePath|sData|now|toggleHtml|encloseString|BASE_PATH|dialogPreviewHtml|dialogPasteHtml|dialogTableHtml|dialogImageHtml|dialogLinkHtml|dialogFeatures|sMessage|statusSelector|STRING|CLASS|sClass|||insertBefore|TOGGLE_HTML|PASTE|INSERT_TABLE|exec|updateEvent|updateSelector|classSelector|containerSelector|containersItemHtml|containersItems|classesItemHtml|toolsItemHtml|toolsItems|statusHtml|htmlHtml|classesHtml|containersHtml|toolsHtml|sKey|wym_dialog_preview|wym_text|wym_dialog_paste|wym_cols|wym_rows|wym_caption|wym_dialog_table|Title|wym_alt|wym_src|URL|wym_dialog_image|wym_href|wym_dialog_link|xhtml1|DTD|org|www|wym_html_val|wym_status|wym_iframe|wym_html|wym_box|ToggleHtml|Paste|InsertTable|InsertImage|CreateLink|Redo|Undo|InsertUnorderedList|InsertOrderedList|Subscript|Superscript|Italic|Bold|IFRAME_DEFAULT|LANG_DEFAULT_PATH|SKINS_DEFAULT_PATH|removeClass|replaceWith||feature|Unsupported|addRange|selectNode|styleWithCSS|clear|innerText|moveStart|round|Math|None|move|addRule|getData|clipboardData|onpaste|onbeforepaste|onbeforedeactivate|className|indexof|toUpperCase|end|x7d|x7b|sa|x2e|insertContentBeforeClosingTag|main1|remove_embeded_styles|remove_scripts|remove_comments|extends|9830|diams|9829|hearts|9827|clubs|9824|spades|9674|loz|9002|rang|9001|8971|rfloor|8970|lfloor|8969|rceil|8968||lceil|8901|sdot||8869|perp|8855||otimes|8853|oplus|8839|supe|8838|sube|8836|nsub|8835|8834|8805|8804|8801|8800|8776|asymp|8773|cong|8764|sim|8756|there4|8747|int|8746|cup|8745|cap|8744|8743|and|8736|ang|8734|infin|8733|8730|radic|8727|||||||lowast|8722|minus|8721|sum|8719|prod|8715|8713|notin|8712|isin|8711|nabla|8709|empty|8707|exist|8706|part||8704|forall|8660|hArr|8659|dArr|8658|rArr|8657|uArr|8656|lArr|8629|crarr|8596|harr|8595|darr|8594|rarr|8593|uarr|8592|larr|8501|alefsym|8482|trade|8476|real|8472|weierp|8465|8364|euro|8260|frasl|8254|oline|8250|rsaquo|8249|lsaquo|8243|Prime|8242|prime||8240|||permil|8230|hellip|8226|bull|8225||Dagger|8224|dagger|8222|bdquo|8221|rdquo|8220|ldquo|8218|sbquo|8217|rsquo|8216|lsquo|8212|mdash|8211|ndash|8207|rlm|8206|lrm|8205|zwj|8204|zwnj|8201|thinsp|8195|emsp|8194|ensp|982|piv|978|upsih|977|thetasym|969|omega|968|psi|967|chi|966|phi|965|upsilon|964|tau|963|sigma|962|sigmaf|961|rho|960|959|omicron|958|xi|957|956|955|lambda||954|kappa|953|iota|952|theta|951|eta|950|zeta|949|epsilon|948|delta|947|gamma|946|beta|945|alpha|937|Omega|936|Psi|935|Chi|934|Phi|933|Upsilon|932|Tau|931|Sigma|929|Rho|928|Pi|927|Omicron|926|Xi|925|Nu|924|Mu|923|Lambda|922|Kappa|921|Iota|920|Theta|919|Eta|918|Zeta|917|Epsilon|916|Delta|915|Gamma|914|Beta|913|Alpha|732|tilde|710|402|fnof|376|Yuml|353|scaron|352|Scaron|339|oelig|338|OElig|255|yuml|254|thorn|253|yacute|252|uuml|251|ucirc|250|uacute|249|ugrave|248|oslash|247|divide|246|ouml|245|otilde|244|ocirc|243|oacute||242|ograve|241||ntilde|240|eth|239|iuml|238|icirc|237|iacute|236|igrave|235|euml|234|ecirc|233|eacute|232|egrave|231|ccedil|230|aelig|229|aring|228|auml|227|atilde|226|acirc|225|aacute|agrave|223|szlig|222|THORN|221|Yacute|220|Uuml|219|Ucirc|218|Uacute|217|Ugrave|216|Oslash|215|times|214|Ouml|213|Otilde|212|Ocirc|211|Oacute|210||Ograve|209|Ntilde|208|ETH|207|Iuml|206|Icirc|205|Iacute||204|Igrave|203|Euml|202|Ecirc|201|Eacute|200|Egrave|199|Ccedil|198|AElig|197|Aring|196|Auml|195|Atilde|194|Acirc|193|Aacute|192|Agrave|191|iquest|190|frac34|189|frac12|188|frac14|187|raquo|186|ordm|185|sup1|184|cedil|183|middot|182||para|181|micro||180|acute|179|sup3|178||sup2|177|plusmn||176||deg|175|macr|174|reg|173|shy|172|not|171|laquo|170|ordf|169|copy|168|uml|167|sect|166|brvbar|165|yen|164|curren|163|pound|162|cent|161|iexcl|last_tag_attributes|com|microsoft|schemas|urn|_current_match|_last_match|_matches|boolean|concat|events|continue|summary|groups|none|rules|vsides|rhs|lhs|hsides|below||above||void|cellspacing|cellpadding||aural|handheld|tv|tty|vbs|vbscript|jscript|ecmascript|ref|standby|declare|codetype|codebase|classid|archive|scheme|cookie|set|refresh|expires|speech|radio|password|file|checkbox|maxlength|longdesc|ismap|xmlns|profile|post|method|enctype|nohref|onmouseup|onmouseout|onmouseover|onmousemove|onmousedown|ondblclick|mouse|onkeypress|onkeydown|frameset|onblur|onselect|onreset|onsubmit|onchange|onunload|language|core||charAt|toString|parseAttributes|039|quot|textContent|shift|formated_options|amp|CDATA|cdataSection|contentTag|isAtEnd|first|isAtStart|from|mousedown|insertCell|insertRow|createCaption|newCol|opener|wym_skin_|addClass|stopPropagation|ownerDocument|computeCssPath|getTime|Date|toggle|write|replaceChild|removeAttr|ready|safari|opera|mozilla|msie|wymstrings|wymeditors|Number_Of_Cols|Number_Of_Rows|Caption|Alternative_Text|dtd|strict|TR|w3|EN|Strict|XHTML|W3C|PUBLIC|DOCTYPE|300|560|resizable|toolbar|titlebar|menubar|wymupdate|iframeSelector|classesSelector|containersSelector|toolsListSelector|toolsSelector|boxSelector|Source_Code|Status|Classes|wym_containers_th|Table_Header|wym_containers_blockquote|Blockquote|wym_containers_pre|Preformatted|wym_containers_h6|Heading_6|wym_containers_h5|Heading_5|wym_containers_h4|Heading_4|wym_containers_h3|Heading_3|wym_containers_h2|Heading_2|wym_containers_h1|Heading_1|wym_containers_p|Paragraph|Containers|wym_tools_preview|wym_tools_html|wym_tools_paste|wym_tools_table|wym_tools_image|wym_tools_unlink|wym_tools_link|wym_tools_redo|wym_tools_undo|wym_tools_outdent|wym_tools_indent|wym_tools_unordered_list|Unordered_List|wym_tools_ordered_list|Ordered_List|wym_tools_subscript|wym_tools_superscript|wym_tools_emphasis|Emphasis|wym_tools_strong|Strong|Tools|wymiframe|wym_wymeditor_link|wym_area_bottom|wym_area_main|wym_area_right|wym_area_left||wym_area_top|ATTRIBUTE|CURSOR|HOME|END|UNLINK|FormatBlock|Wym_Dialog_Body|Wym_Dialog_Title|Wym_Status|Wym_Iframe|Wym_Html|Wym_Container_Class|Wym_Containers_Title|Wym_Container_Name|Wym_Containers_Items|Wym_Containers|Wym_Class_Title|Wym_Class_Name|Wym_Classes_Items|Wym_Classes|Wym_Tool_Class|Wym_Tool_Title|Wym_Tool_Name|Wym_Tools_Items|Wym_Tools|Wym_Jquery_Path|Wym_Iframe_Base_Path|Wym_Wym_Path|Wym_Css_Path|Wym_Base_Path|Wym_Index|VERSION'.split('|'),0,{})) Index: openacs-4/packages/xowiki/www/resources/wymeditor/iframe/default/wymiframe.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/iframe/default/wymiframe.css,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xowiki/www/resources/wymeditor/iframe/default/wymiframe.css 15 Jul 2007 16:07:45 -0000 1.1 +++ openacs-4/packages/xowiki/www/resources/wymeditor/iframe/default/wymiframe.css 29 May 2008 19:13:44 -0000 1.2 @@ -1,6 +1,6 @@ /* * WYMeditor : what you see is What You Mean web-based editor - * Copyright (C) 2007 H.O.net - http://www.honet.be/ + * Copyright (c) 2008 Jean-Francois Hovinne, http://www.wymeditor.org/ * Dual licensed under the MIT (MIT-license.txt) * and GPL (GPL-license.txt) licenses. * @@ -13,8 +13,8 @@ * See the documentation for more info. * * File Authors: - * Jean-Francois Hovinne (jf.hovinne@wymeditor.org) - * Daniel Reszka (d.reszka@wymeditor.org) + * Jean-Francois Hovinne (jf.hovinne a-t wymeditor dotorg) + * Daniel Reszka (d.reszka a-t wymeditor dotorg) */ /* VISUAL FEEDBACK */ Index: openacs-4/packages/xowiki/www/resources/wymeditor/iframe/default/wymiframe.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/iframe/default/wymiframe.html,v diff -u -r1.3 -r1.4 --- openacs-4/packages/xowiki/www/resources/wymeditor/iframe/default/wymiframe.html 14 Sep 2007 17:53:31 -0000 1.3 +++ openacs-4/packages/xowiki/www/resources/wymeditor/iframe/default/wymiframe.html 29 May 2008 19:13:44 -0000 1.4 @@ -1,7 +1,7 @@ Index: openacs-4/packages/xowiki/www/resources/wymeditor/lang/ca.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/lang/ca.js,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xowiki/www/resources/wymeditor/lang/ca.js 15 Jul 2007 16:07:46 -0000 1.1 +++ openacs-4/packages/xowiki/www/resources/wymeditor/lang/ca.js 29 May 2008 19:13:44 -0000 1.2 @@ -1,6 +1,4 @@ -if(!WYM_STRINGS) var WYM_STRINGS = new Array(); - -var WYM_STRINGS_CA = { +WYMeditor.STRINGS['ca'] = { Strong: 'Ressaltar', Emphasis: 'Emfatitzar', Superscript: 'Superindex', @@ -44,4 +42,3 @@ Source_Code: 'Codi font' }; -WYM_STRINGS['ca'] = WYM_STRINGS_CA; Index: openacs-4/packages/xowiki/www/resources/wymeditor/lang/de.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/lang/de.js,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xowiki/www/resources/wymeditor/lang/de.js 15 Jul 2007 16:07:46 -0000 1.1 +++ openacs-4/packages/xowiki/www/resources/wymeditor/lang/de.js 29 May 2008 19:13:44 -0000 1.2 @@ -1,6 +1,4 @@ -if(!WYM_STRINGS) var WYM_STRINGS = new Array(); - -var WYM_STRINGS_DE = { +WYMeditor.STRINGS['de'] = { Strong: 'Fett', Emphasis: 'Kursiv', Superscript: 'Text hochstellen', @@ -44,4 +42,3 @@ Source_Code: 'Quellcode' }; -WYM_STRINGS['de'] = WYM_STRINGS_DE; Index: openacs-4/packages/xowiki/www/resources/wymeditor/lang/en.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/lang/en.js,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xowiki/www/resources/wymeditor/lang/en.js 15 Jul 2007 16:07:46 -0000 1.1 +++ openacs-4/packages/xowiki/www/resources/wymeditor/lang/en.js 29 May 2008 19:13:44 -0000 1.2 @@ -1,6 +1,4 @@ -if(!WYM_STRINGS) var WYM_STRINGS = new Array(); - -var WYM_STRINGS_EN = { +WYMeditor.STRINGS['en'] = { Strong: 'Strong', Emphasis: 'Emphasis', Superscript: 'Superscript', @@ -44,4 +42,3 @@ Source_Code: 'Source code' }; -WYM_STRINGS['en'] = WYM_STRINGS_EN; Index: openacs-4/packages/xowiki/www/resources/wymeditor/lang/es.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/lang/es.js,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xowiki/www/resources/wymeditor/lang/es.js 15 Jul 2007 16:07:46 -0000 1.1 +++ openacs-4/packages/xowiki/www/resources/wymeditor/lang/es.js 29 May 2008 19:13:44 -0000 1.2 @@ -1,6 +1,4 @@ -if(!WYM_STRINGS) var WYM_STRINGS = new Array(); - -var WYM_STRINGS_ES = { +WYMeditor.STRINGS['es'] = { Strong: 'Resaltar', Emphasis: 'Enfatizar', Superscript: 'Superindice', @@ -44,4 +42,3 @@ Source_Code: 'Código fuente' }; -WYM_STRINGS['es'] = WYM_STRINGS_ES; Index: openacs-4/packages/xowiki/www/resources/wymeditor/lang/fa.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/lang/fa.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/www/resources/wymeditor/lang/fa.js 29 May 2008 19:13:44 -0000 1.1 @@ -0,0 +1,45 @@ +//Translation To Persian: Ghassem Tofighi (http://ght.ir) +WYMeditor.STRINGS['fa'] = { + Strong: 'پررنگ',//Strong + Emphasis: 'ایتالیک',//Emphasis + Superscript: 'بالانويس‌ ',//Superscript + Subscript: 'زيرنويس‌',//Subscript + Ordered_List: 'لیست مرتب',//Ordered List + Unordered_List: 'لیست نامرتب',//Unordered List + Indent: 'افزودن دندانه',//Indent + Outdent: 'کاهش دندانه',//Outdent + Undo: 'واگردانی',//Undo + Redo: 'تکرار',//Redo + Link: 'ساختن پیوند',//Link + Unlink: 'برداشتن پیوند',//Unlink + Image: 'تصویر',//Image + Table: 'جدول',//Table + HTML: 'HTML',//HTML + Paragraph: 'پاراگراف',//Paragraph + Heading_1: 'سرتیتر ۱',//Heading 1 + Heading_2: 'سرتیتر ۲',//Heading 2 + Heading_3: 'سرتیتر ۳',//Heading 3 + Heading_4: 'سرتیتر ۴',//Heading 4 + Heading_5: 'سرتیتر ۵',//Heading 5 + Heading_6: 'سرتیتر ۶',//Heading 6 + Preformatted: 'قالب آماده',//Preformatted + Blockquote: 'نقل قول',//Blockquote + Table_Header: 'سرجدول',//Table Header + URL: 'آدرس اینترنتی',//URL + Title: 'عنوان',//Title + Alternative_Text: 'متن جایگزین',//Alternative text + Caption: 'عنوان',//Caption + Number_Of_Rows: 'تعداد سطرها',//Number of rows + Number_Of_Cols: 'تعداد ستون‌ها',//Number of cols + Submit: 'فرستادن',//Submit + Cancel: 'لغو',//Cancel + Choose: 'انتخاب',//Choose + Preview: 'پیش‌نمایش',//Preview + Paste_From_Word: 'انتقال از ورد',//Paste from Word + Tools: 'ابزار',//Tools + Containers: '‌قالب‌ها',//Containers + Classes: 'کلاس‌ها',//Classes + Status: 'وضعیت',//Status + Source_Code: 'کد مبدأ'//Source code +}; + Index: openacs-4/packages/xowiki/www/resources/wymeditor/lang/fr.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/lang/fr.js,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xowiki/www/resources/wymeditor/lang/fr.js 15 Jul 2007 16:07:46 -0000 1.1 +++ openacs-4/packages/xowiki/www/resources/wymeditor/lang/fr.js 29 May 2008 19:13:44 -0000 1.2 @@ -1,6 +1,4 @@ -if(!WYM_STRINGS) var WYM_STRINGS = new Array(); - -var WYM_STRINGS_FR = { +WYMeditor.STRINGS['fr'] = { Strong: 'Mise en évidence', Emphasis: 'Emphase', Superscript: 'Exposant', @@ -44,4 +42,3 @@ Source_Code: 'Code source' }; -WYM_STRINGS['fr'] = WYM_STRINGS_FR; Index: openacs-4/packages/xowiki/www/resources/wymeditor/lang/hu.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/lang/hu.js,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xowiki/www/resources/wymeditor/lang/hu.js 15 Jul 2007 16:07:46 -0000 1.1 +++ openacs-4/packages/xowiki/www/resources/wymeditor/lang/hu.js 29 May 2008 19:13:44 -0000 1.2 @@ -1,6 +1,4 @@ -if(!WYM_STRINGS) var WYM_STRINGS = new Array(); - -var WYM_STRINGS_HU = { +WYMeditor.STRINGS['hu'] = { Strong: 'Félkövér', Emphasis: 'Kiemelt', Superscript: 'Felső index', @@ -44,4 +42,3 @@ Source_Code: 'Forráskód' }; -WYM_STRINGS['hu'] = WYM_STRINGS_HU; Index: openacs-4/packages/xowiki/www/resources/wymeditor/lang/it.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/lang/it.js,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xowiki/www/resources/wymeditor/lang/it.js 15 Jul 2007 16:07:46 -0000 1.1 +++ openacs-4/packages/xowiki/www/resources/wymeditor/lang/it.js 29 May 2008 19:13:44 -0000 1.2 @@ -1,6 +1,4 @@ -if(!WYM_STRINGS) var WYM_STRINGS = new Array(); - -var WYM_STRINGS_IT = { +WYMeditor.STRINGS['it'] = { Strong: 'Grassetto', Emphasis: 'Corsetto', Superscript: 'Apice', @@ -44,4 +42,3 @@ Source_Code: 'Codice Sorgente' }; -WYM_STRINGS['it'] = WYM_STRINGS_IT; Index: openacs-4/packages/xowiki/www/resources/wymeditor/lang/nl.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/lang/nl.js,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xowiki/www/resources/wymeditor/lang/nl.js 15 Jul 2007 16:07:46 -0000 1.1 +++ openacs-4/packages/xowiki/www/resources/wymeditor/lang/nl.js 29 May 2008 19:13:44 -0000 1.2 @@ -1,6 +1,4 @@ -if(!WYM_STRINGS) var WYM_STRINGS = new Array(); - -var WYM_STRINGS_NL = { +WYMeditor.STRINGS['nl'] = { Strong: 'Sterk benadrukken', Emphasis: 'Benadrukken', Superscript: 'Bovenschrift', @@ -17,15 +15,15 @@ Table: 'Tabel', HTML: 'HTML', Paragraph: 'Paragraaf', - Heading_1: 'Hoofding 1', - Heading_2: 'Hoofding 2', - Heading_3: 'Hoofding 3', - Heading_4: 'Hoofding 4', - Heading_5: 'Hoofding 5', - Heading_6: 'Hoofding 6', + Heading_1: 'Kop 1', + Heading_2: 'Kop 2', + Heading_3: 'Kop 3', + Heading_4: 'Kop 4', + Heading_5: 'Kop 5', + Heading_6: 'Kop 6', Preformatted: 'Voorgeformatteerd', - Blockquote: 'Aanhaling', - Table_Header: 'Tabel hoofding', + Blockquote: 'Citaat', + Table_Header: 'Tabel-kop', URL: 'URL', Title: 'Titel', Alternative_Text: 'Alternatieve tekst', @@ -37,11 +35,10 @@ Choose: 'Kiezen', Preview: 'Voorbeeld bekijken', Paste_From_Word: 'Plakken uit Word', - Tools: 'Tools', - Containers: 'Containers', - Classes: 'Classes', + Tools: 'Hulpmiddelen', + Containers: 'Teksttypes', + Classes: 'Klassen', Status: 'Status', Source_Code: 'Broncode' }; -WYM_STRINGS['nl'] = WYM_STRINGS_NL; Index: openacs-4/packages/xowiki/www/resources/wymeditor/lang/pl.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/lang/pl.js,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xowiki/www/resources/wymeditor/lang/pl.js 15 Jul 2007 16:07:46 -0000 1.1 +++ openacs-4/packages/xowiki/www/resources/wymeditor/lang/pl.js 29 May 2008 19:13:44 -0000 1.2 @@ -1,6 +1,4 @@ -if(!WYM_STRINGS) var WYM_STRINGS = new Array(); - -var WYM_STRINGS_PL = { +WYMeditor.STRINGS['pl'] = { Strong: 'Nacisk', Emphasis: 'Emfaza', Superscript: 'Indeks górny', @@ -44,4 +42,3 @@ Source_Code: 'Kod źródłowy' }; -WYM_STRINGS['pl'] = WYM_STRINGS_PL; Index: openacs-4/packages/xowiki/www/resources/wymeditor/lang/pt-br.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/lang/pt-br.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/www/resources/wymeditor/lang/pt-br.js 29 May 2008 19:13:44 -0000 1.1 @@ -0,0 +1,44 @@ +WYMeditor.STRINGS['pt-br'] = { + Strong: 'Resaltar', + Emphasis: 'Enfatizar', + Superscript: 'Sobre escrito', + Subscript: 'Sub escrito ', + Ordered_List: 'Lista ordenada', + Unordered_List: 'Lista desordenada', + Indent: 'Indentado', + Outdent: 'Desidentar', + Undo: 'Desfazer', + Redo: 'Refazer', + Link: 'Link', + Unlink: 'Remover Link', + Image: 'Imagem', + Table: 'Tabela', + HTML: 'HTML', + Paragraph: 'Parágrafo', + Heading_1: 'Título 1', + Heading_2: 'Título 2', + Heading_3: 'Título 3', + Heading_4: 'Título 4', + Heading_5: 'Título 5', + Heading_6: 'Título 6', + Preformatted: 'Preformatado', + Blockquote: 'Citação', + Table_Header: 'Título de tabela', + URL: 'URL', + Title: 'Título', + Alternative_Text: 'Texto alternativo', + Caption: 'Legenda', + Number_Of_Rows: 'Número de linhas', + Number_Of_Cols: 'Número de colunas', + Submit: 'Enviar', + Cancel: 'Cancelar', + Choose: 'Selecionar', + Preview: 'Previsualizar', + Paste_From_Word: 'Copiar do Word', + Tools: 'Ferramentas', + Containers: 'Conteneiners', + Classes: 'Classes', + Status: 'Estado', + Source_Code: 'Código fonte' +}; + Index: openacs-4/packages/xowiki/www/resources/wymeditor/lang/pt.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/lang/pt.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/www/resources/wymeditor/lang/pt.js 29 May 2008 19:13:44 -0000 1.1 @@ -0,0 +1,44 @@ +WYMeditor.STRINGS['pt'] = { + Strong: 'Negrito', + Emphasis: 'Itálico', + Superscript: 'Sobrescrito', + Subscript: 'Subsescrito', + Ordered_List: 'Lista Numerada', + Unordered_List: 'Lista Marcada', + Indent: 'Aumentar Indentaçã', + Outdent: 'Diminuir Indentaçã', + Undo: 'Desfazer', + Redo: 'Restaurar', + Link: 'Link', + Unlink: 'Tirar link', + Image: 'Imagem', + Table: 'Tabela', + HTML: 'HTML', + Paragraph: 'Parágrafo', + Heading_1: 'Título 1', + Heading_2: 'Título 2', + Heading_3: 'Título 3', + Heading_4: 'Título 4', + Heading_5: 'Título 5', + Heading_6: 'Título 6', + Preformatted: 'Pré-formatado', + Blockquote: 'Citação', + Table_Header: 'Cabeçalho Tabela', + URL: 'URL', + Title: 'Título', + Alternative_Text: 'Texto Alterativo', + Caption: 'Título Tabela', + Number_Of_Rows: 'Número de Linhas', + Number_Of_Cols: 'Número de Colunas', + Submit: 'Enviar', + Cancel: 'Cancelar', + Choose: 'Escolha', + Preview: 'Prever', + Paste_From_Word: 'Colar do Word', + Tools: 'Ferramentas', + Containers: 'Containers', + Classes: 'Classes', + Status: 'Status', + Source_Code: 'Código Fonte' +}; + Index: openacs-4/packages/xowiki/www/resources/wymeditor/lang/ru.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/lang/ru.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/www/resources/wymeditor/lang/ru.js 29 May 2008 19:13:44 -0000 1.1 @@ -0,0 +1,44 @@ +WYMeditor.STRINGS['ru'] = { + Strong: 'Жирный', + Emphasis: 'Наклонный', + Superscript: 'Надстрочный', + Subscript: 'Подстрочный', + Ordered_List: 'Нумерованый список', + Unordered_List: 'Ненумерованый список', + Indent: 'Увеличить отступ', + Outdent: 'Уменьшить отступ', + Undo: 'Отменить', + Redo: 'Повторить', + Link: 'Ссылка', + Unlink: 'Удалить ссылку', + Image: 'Изображение', + Table: 'Таблица', + HTML: 'Править HTML', + Paragraph: 'Параграф', + Heading_1: 'Заголовок 1', + Heading_2: 'Заголовок 2', + Heading_3: 'Заголовок 3', + Heading_4: 'Заголовок 4', + Heading_5: 'Заголовок 5', + Heading_6: 'Заголовок 6', + Preformatted: 'Preformatted', + Blockquote: 'Цитата', + Table_Header: 'Заголовок таблицы', + URL: 'URL', + Title: 'Заголовок', + Alternative_Text: 'Альтернативный текст', + Caption: 'Надпись', + Number_Of_Rows: 'Кол-во строк', + Number_Of_Cols: 'Кол-во столбцов', + Submit: 'Отправить', + Cancel: 'Отмена', + Choose: 'Выбор', + Preview: 'Просмотр', + Paste_From_Word: 'Вставить из Word', + Tools: 'Инструменты', + Containers: 'Контейнеры', + Classes: 'Классы', + Status: 'Статус', + Source_Code: 'Исходный код' +}; + Index: openacs-4/packages/xowiki/www/resources/wymeditor/lang/sv.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/lang/sv.js,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xowiki/www/resources/wymeditor/lang/sv.js 15 Jul 2007 16:07:46 -0000 1.1 +++ openacs-4/packages/xowiki/www/resources/wymeditor/lang/sv.js 29 May 2008 19:13:44 -0000 1.2 @@ -1,6 +1,4 @@ -if(!WYM_STRINGS) var WYM_STRINGS = new Array(); - -var WYM_STRINGS_SV = { +WYMeditor.STRINGS['sv'] = { Strong: 'Viktigt', Emphasis: 'Betoning', Superscript: 'Upphöjt', @@ -44,4 +42,3 @@ Source_Code: 'Källkod' }; -WYM_STRINGS['sv'] = WYM_STRINGS_SV; Index: openacs-4/packages/xowiki/www/resources/wymeditor/lang/zh_cn.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/lang/zh_cn.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/www/resources/wymeditor/lang/zh_cn.js 29 May 2008 19:13:44 -0000 1.1 @@ -0,0 +1,46 @@ +WYMeditor.STRINGS['zh_cn'] = { + Strong: '加粗', + Emphasis: '斜体', + Superscript: '上标', + Subscript: '下标', + Ordered_List: '有序列表', + Unordered_List: '无序列表', + Indent: '增加缩进', + Outdent: '减少缩进', + Undo: '撤消', + Redo: '重做', + Link: '链接', + Unlink: '取消链接', + Image: '图片', + Table: '表格', + HTML: 'HTML源代码', + Paragraph: '段落', + Heading_1: '标题 1', + Heading_2: '标题 2', + Heading_3: '标题 3', + Heading_4: '标题 4', + Heading_5: '标题 5', + Heading_6: '标题 6', + Preformatted: '原始文本', + Blockquote: '引语', + Table_Header: '表头', + URL: '地址', + Title: '提示文字', + Alternative_Text: '失效文字', + Caption: '标题', + Number_Of_Rows: '行数', + Number_Of_Cols: '列数', + Submit: '提交', + Cancel: '放弃', + Choose: '选择', + Preview: '预览', + Paste_From_Word: '从Word粘贴纯文本', + Tools: '工具', + Containers: '容器', + Classes: '预定义样式', + Status: '状态', + Source_Code: '源代码', + Attachment: '附件', + NewParagraph: '新段落' +}; + Index: openacs-4/packages/xowiki/www/resources/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js,v diff -u -r1.2 -r1.3 --- openacs-4/packages/xowiki/www/resources/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js 27 Jul 2007 01:15:21 -0000 1.2 +++ openacs-4/packages/xowiki/www/resources/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js 29 May 2008 19:13:44 -0000 1.3 @@ -1,6 +1,6 @@ -/* +/* * WYMeditor : what you see is What You Mean web-based editor - * Copyright (C) 2007 H.O.net - http://www.honet.be/ + * Copyright (c) 2008 Jean-Francois Hovinne, http://www.wymeditor.org/ * Dual licensed under the MIT (MIT-license.txt) * and GPL (GPL-license.txt) licenses. * @@ -12,11 +12,11 @@ * hovertools plugin for WYMeditor * * File Authors: - * Jean-Francois Hovinne (jf.hovinne@wymeditor.org) + * Jean-Francois Hovinne (jf.hovinne a-t wymeditor dotorg) */ //Extend WYMeditor -Wymeditor.prototype.hovertools = function() { +WYMeditor.editor.prototype.hovertools = function() { var wym = this; @@ -35,7 +35,7 @@ jQuery(this._box).find(this._options.classSelector).hover( function() { var aClasses = eval(wym._options.classesItems); - var sName = jQuery(this).attr(WYM_NAME); + var sName = jQuery(this).attr(WYMeditor.NAME); var oClass = aClasses.findByName(sName); if(oClass){ Index: openacs-4/packages/xowiki/www/resources/wymeditor/plugins/tidy/README =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/plugins/tidy/README,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xowiki/www/resources/wymeditor/plugins/tidy/README 15 Jul 2007 16:07:46 -0000 1.1 +++ openacs-4/packages/xowiki/www/resources/wymeditor/plugins/tidy/README 29 May 2008 19:13:44 -0000 1.2 @@ -1,5 +1,5 @@ WYMeditor : what you see is What You Mean web-based editor -Copyright (C) 2007 H.O.net - http://www.honet.be/ +Copyright (c) 2008 Jean-Francois Hovinne, http://www.wymeditor.org/ Dual licensed under the MIT (MIT-license.txt) and GPL (GPL-license.txt) licenses. @@ -10,7 +10,7 @@ README - HTML Tidy plugin for WYMeditor File Authors: - Jean-François Hovinne (jf.hovinne@wymeditor.org) + Jean-François Hovinne (jf.hovinne a-t wymeditor dotorg) Credits: 'HTML Tidy' by Dave Ragget - http://tidy.sourceforge.net/ Index: openacs-4/packages/xowiki/www/resources/wymeditor/plugins/tidy/jquery.wymeditor.tidy.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/plugins/tidy/jquery.wymeditor.tidy.js,v diff -u -r1.2 -r1.3 --- openacs-4/packages/xowiki/www/resources/wymeditor/plugins/tidy/jquery.wymeditor.tidy.js 27 Jul 2007 01:15:21 -0000 1.2 +++ openacs-4/packages/xowiki/www/resources/wymeditor/plugins/tidy/jquery.wymeditor.tidy.js 29 May 2008 19:13:44 -0000 1.3 @@ -1,6 +1,6 @@ -/* +/* * WYMeditor : what you see is What You Mean web-based editor - * Copyright (C) 2007 H.O.net - http://www.honet.be/ + * Copyright (c) 2008 Jean-Francois Hovinne, http://www.wymeditor.org/ * Dual licensed under the MIT (MIT-license.txt) * and GPL (GPL-license.txt) licenses. * @@ -12,11 +12,11 @@ * HTML Tidy plugin for WYMeditor * * File Authors: - * Jean-Francois Hovinne (jf.hovinne@wymeditor.org) + * Jean-Francois Hovinne (jf.hovinne a-t wymeditor dotorg) */ //Extend WYMeditor -Wymeditor.prototype.tidy = function(options) { +WYMeditor.editor.prototype.tidy = function(options) { var tidy = new WymTidy(options, this); return(tidy); }; Index: openacs-4/packages/xowiki/www/resources/wymeditor/skins/default/skin.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/skins/default/skin.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/www/resources/wymeditor/skins/default/skin.css 29 May 2008 19:13:44 -0000 1.1 @@ -0,0 +1,133 @@ +/* + * WYMeditor : what you see is What You Mean web-based editor + * Copyright (c) 2008 Jean-Francois Hovinne, http://www.wymeditor.org/ + * Dual licensed under the MIT (MIT-license.txt) + * and GPL (GPL-license.txt) licenses. + * + * For further information visit: + * http://www.wymeditor.org/ + * + * File Name: + * screen.css + * main stylesheet for the default WYMeditor skin + * See the documentation for more info. + * + * File Authors: + * Daniel Reszka (d.reszka a-t wymeditor dotorg) +*/ + +/*TRYING TO RESET STYLES THAT MAY INTERFERE WITH WYMEDITOR*/ + .wym_skin_default p, .wym_skin_default h2, .wym_skin_default h3, + .wym_skin_default ul, .wym_skin_default li { background: transparent url(); margin: 0; padding: 0; border-width:0; list-style: none; } + + +/*HIDDEN BY DEFAULT*/ + .wym_skin_default .wym_area_left { display: none; } + .wym_skin_default .wym_area_right { display: block; } + + +/*TYPO*/ + .wym_skin_default { font-size: 62.5%; font-family: Verdana, Arial, sans-serif; } + .wym_skin_default h2 { font-size: 110%; /* = 11px */} + .wym_skin_default h3 { font-size: 100%; /* = 10px */} + .wym_skin_default li { font-size: 100%; /* = 10px */} + + +/*WYM_BOX*/ + .wym_skin_default { border: 1px solid gray; background: #f2f2f2; padding: 5px} + + /*auto-clear the wym_box*/ + .wym_skin_default:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } + * html .wym_skin_default { height: 1%;} + + +/*WYM_HTML*/ + .wym_skin_default .wym_html { width: 98%;} + .wym_skin_default .wym_html textarea { width: 100%; height: 200px; border: 1px solid gray; background: white; } + + +/*WYM_IFRAME*/ + .wym_skin_default .wym_iframe { width: 98%;} + .wym_skin_default .wym_iframe iframe { width: 100%; height: 200px; border: 1px solid gray; background: white } + + +/*AREAS*/ + .wym_skin_default .wym_area_left { width: 150px; float: left;} + .wym_skin_default .wym_area_right { width: 150px; float: right;} + .wym_skin_default .wym_area_bottom { height: 1%; clear: both;} + * html .wym_skin_default .wym_area_main { height: 1%;} + * html .wym_skin_default .wym_area_top { height: 1%;} + *+html .wym_skin_default .wym_area_top { height: 1%;} + +/*SECTIONS SYSTEM*/ + + /*common defaults for all sections*/ + .wym_skin_default .wym_section { margin-bottom: 5px; } + .wym_skin_default .wym_section h2, + .wym_skin_default .wym_section h3 { padding: 1px 3px; margin: 0; } + .wym_skin_default .wym_section a { padding: 0 3px; display: block; text-decoration: none; color: black; } + .wym_skin_default .wym_section a:hover { background-color: yellow; } + /*hide section titles by default*/ + .wym_skin_default .wym_section h2 { display: none; } + /*disable any margin-collapse*/ + .wym_skin_default .wym_section { padding-top: 1px; padding-bottom: 1px; } + /*auto-clear sections*/ + .wym_skin_default .wym_section ul:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } + * html .wym_skin_default .wym_section ul { height: 1%;} + + /*option: add this class to a section to make it render as a panel*/ + .wym_skin_default .wym_panel { } + .wym_skin_default .wym_panel h2 { display: block; } + + /*option: add this class to a section to make it render as a dropdown menu*/ + .wym_skin_default .wym_dropdown h2 { display: block; } + .wym_skin_default .wym_dropdown ul { display: none; position: absolute; background: white; } + .wym_skin_default .wym_dropdown:hover ul, + .wym_skin_default .wym_dropdown.hover ul { display: block; } + + /*option: add this class to a section to make its elements render buttons (icons are only available for the wym_tools section for now)*/ + .wym_skin_default .wym_buttons li { float:left;} + .wym_skin_default .wym_buttons a { width: 20px; height: 20px; overflow: hidden; padding: 2px } + /*image replacements*/ + .wym_skin_default .wym_buttons li a { background: url(icons.png) no-repeat; text-indent: -9999px;} + .wym_skin_default .wym_buttons li.wym_tools_strong a { background-position: 0 -382px;} + .wym_skin_default .wym_buttons li.wym_tools_emphasis a { background-position: 0 -22px;} + .wym_skin_default .wym_buttons li.wym_tools_superscript a { background-position: 0 -430px;} + .wym_skin_default .wym_buttons li.wym_tools_subscript a { background-position: 0 -454px;} + .wym_skin_default .wym_buttons li.wym_tools_ordered_list a { background-position: 0 -48px;} + .wym_skin_default .wym_buttons li.wym_tools_unordered_list a{ background-position: 0 -72px;} + .wym_skin_default .wym_buttons li.wym_tools_indent a { background-position: 0 -574px;} + .wym_skin_default .wym_buttons li.wym_tools_outdent a { background-position: 0 -598px;} + .wym_skin_default .wym_buttons li.wym_tools_undo a { background-position: 0 -502px;} + .wym_skin_default .wym_buttons li.wym_tools_redo a { background-position: 0 -526px;} + .wym_skin_default .wym_buttons li.wym_tools_link a { background-position: 0 -96px;} + .wym_skin_default .wym_buttons li.wym_tools_unlink a { background-position: 0 -168px;} + .wym_skin_default .wym_buttons li.wym_tools_image a { background-position: 0 -121px;} + .wym_skin_default .wym_buttons li.wym_tools_table a { background-position: 0 -144px;} + .wym_skin_default .wym_buttons li.wym_tools_paste a { background-position: 0 -552px;} + .wym_skin_default .wym_buttons li.wym_tools_html a { background-position: 0 -193px;} + .wym_skin_default .wym_buttons li.wym_tools_preview a { background-position: 0 -408px;} + +/*DECORATION*/ + .wym_skin_default .wym_section h2 { background: #ddd; border: solid gray; border-width: 0 0 1px;} + .wym_skin_default .wym_section h2 span { color: gray;} + .wym_skin_default .wym_panel { padding: 0; border: solid gray; border-width: 1px; background: white;} + .wym_skin_default .wym_panel ul { margin: 2px 0 5px; } + .wym_skin_default .wym_dropdown { padding: 0; border: solid gray; border-width: 1px 1px 0 1px; } + .wym_skin_default .wym_dropdown ul { border: solid gray; border-width: 0 1px 1px 1px; margin-left: -1px; padding: 5px 10px 5px 3px;} + +/*DIALOGS*/ + .wym_dialog div.row { margin-bottom: 5px;} + .wym_dialog div.row input { margin-right: 5px;} + .wym_dialog div.row label { float: left; width: 150px; display: block; text-align: right; margin-right: 10px; } + .wym_dialog div.row-indent { padding-left: 160px; } + /*autoclearing*/ + .wym_dialog div.row:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } + .wym_dialog div.row { display: inline-block; } + /* Hides from IE-mac \*/ + * html .wym_dialog div.row { height: 1%; } + .wym_dialog div.row { display: block; } + /* End hide from IE-mac */ + +/*WYMEDITOR_LINK*/ + a.wym_wymeditor_link { text-indent: -9999px; float: right; display: block; width: 50px; height: 15px; background: url(../wymeditor_icon.png); overflow: hidden; text-decoration: none; } Index: openacs-4/packages/xowiki/www/resources/wymeditor/skins/default/skin.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/skins/default/skin.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/www/resources/wymeditor/skins/default/skin.js 29 May 2008 19:13:44 -0000 1.1 @@ -0,0 +1,40 @@ +WYMeditor.SKINS['default'] = { + + init: function(wym) { + + //render following sections as panels + jQuery(wym._box).find(wym._options.classesSelector) + .addClass("wym_panel"); + + //render following sections as buttons + jQuery(wym._box).find(wym._options.toolsSelector) + .addClass("wym_buttons"); + + //render following sections as dropdown menus + jQuery(wym._box).find(wym._options.containersSelector) + .addClass("wym_dropdown") + .find(WYMeditor.H2) + .append(" >"); + + // auto add some margin to the main area sides if left area + // or right area are not empty (if they contain sections) + jQuery(wym._box).find("div.wym_area_right ul") + .parents("div.wym_area_right").show() + .parents(wym._options.boxSelector) + .find("div.wym_area_main") + .css({"margin-right": "155px"}); + + jQuery(wym._box).find("div.wym_area_left ul") + .parents("div.wym_area_left").show() + .parents(wym._options.boxSelector) + .find("div.wym_area_main") + .css({"margin-left": "155px"}); + + //make hover work under IE < 7 + jQuery(wym._box).find(".wym_section").hover(function(){ + jQuery(this).addClass("hover"); + },function(){ + jQuery(this).removeClass("hover"); + }); + } +}; Index: openacs-4/packages/xowiki/www/resources/wymeditor/skins/minimal/skin.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/skins/minimal/skin.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/www/resources/wymeditor/skins/minimal/skin.css 29 May 2008 19:13:44 -0000 1.1 @@ -0,0 +1,19 @@ +.wym_skin_minimal div.wym_iframe iframe { + width: 90%; + height: 200px; +} + +.wym_skin_minimal div.wym_section ul { + margin: 0; +} + +.wym_skin_minimal div.wym_section ul li { + float: left; + list-style-type: none; + margin-right: 5px; +} + +.wym_skin_minimal h2 { + margin: 0; + clear: both; +} \ No newline at end of file Index: openacs-4/packages/xowiki/www/resources/wymeditor/skins/minimal/skin.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/skins/minimal/skin.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/www/resources/wymeditor/skins/minimal/skin.js 29 May 2008 19:13:44 -0000 1.1 @@ -0,0 +1,9 @@ +WYMeditor.SKINS['minimal'] = { + //placeholder for the skin JS, if needed + + //init the skin + //wym is the WYMeditor.editor instance + init: function(wym) { + //do something + } +}; Index: openacs-4/packages/xowiki/www/resources/wymeditor/skins/silver/COPYING =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/skins/silver/COPYING,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/www/resources/wymeditor/skins/silver/COPYING 29 May 2008 19:13:45 -0000 1.1 @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. Index: openacs-4/packages/xowiki/www/resources/wymeditor/skins/silver/README =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/skins/silver/README,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/www/resources/wymeditor/skins/silver/README 29 May 2008 19:13:45 -0000 1.1 @@ -0,0 +1,27 @@ +/** +* @version Alpha 0.1 2008-05-10 23:28:43 $ +* @package Silver skin for WYMeditor +* @copyright Copyright (C) 2008 Scott Edwin Lewis. All rights reserved. +* @license GNU/GPL, see COPYING +* Silver skin for WYMeditor is free software and is licensed under the +* GNU General Public License. See COPYING for copyright notices and details. +*/ + +Adds custom buttons and color palette to the WYMeditor XHTML Editor. + +INSTALLATION: + +1. Copy the entire /silver/ directory to /wymeditor/skins/ +2. Initialize the WYMeditor 'skin' option as below: + + + +That's it. You're done. Index: openacs-4/packages/xowiki/www/resources/wymeditor/skins/silver/skin.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/skins/silver/skin.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/www/resources/wymeditor/skins/silver/skin.css 29 May 2008 19:13:45 -0000 1.1 @@ -0,0 +1,297 @@ +/* + * WYMeditor : what you see is What You Mean web-based editor + * Copyright (c) 2008 Jean-Francois Hovinne, http://www.wymeditor.org/ + * Dual licensed under the MIT (MIT-license.txt) + * and GPL (GPL-license.txt) licenses. + * + * For further information visit: + * http://www.wymeditor.org/ + * + * File Name: + * screen.css + * main stylesheet for the default WYMeditor skin + * See the documentation for more info. + * + * File Authors: + * Daniel Reszka (d.reszka a-t wymeditor dotorg) + * Scott Edwin Lewis +*/ + +/*TRYING TO RESET STYLES THAT MAY INTERFERE WITH WYMEDITOR*/ + .wym_skin_silver p, .wym_skin_silver h2, .wym_skin_silver h3, + .wym_skin_silver ul, .wym_skin_silver li { background: transparent url(); margin: 0; padding: 0; border-width:0; list-style: none; } + + +/*HIDDEN BY DEFAULT*/ + .wym_skin_silver .wym_area_left { display: none; } + .wym_skin_silver .wym_area_right { display: block; } + + +/*TYPO*/ + .wym_skin_silver { font-size: 62.5%; font-family: Verdana, Arial, sans-serif; } + .wym_skin_silver h2 { font-size: 110%; /* = 11px */} + .wym_skin_silver h3 { font-size: 100%; /* = 10px */} + .wym_skin_silver li { font-size: 100%; /* = 10px */} + + +/*WYM_BOX*/ + .wym_skin_silver { border: 1px solid gray; background: #f2f2f2; padding: 0px; margin: 0px;} + + /*auto-clear the wym_box*/ + .wym_skin_silver:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } + * html .wym_skin_silver { height: 1%;} + + +/*WYM_HTML*/ + .wym_skin_silver .wym_html { width: 98%;} + .wym_skin_silver .wym_html textarea { width: 100%; height: 200px; border: 1px solid gray; background: white; } + + +/*WYM_IFRAME*/ + .wym_skin_silver .wym_iframe { width: 98%;} + .wym_skin_silver .wym_iframe iframe { width: 100%; height: 200px; border: 1px solid gray; background: white } + + +/*AREAS*/ + .wym_skin_silver .wym_area_left { width: 150px; float: left;} + .wym_skin_silver .wym_area_right { width: 150px; float: right;} + .wym_skin_silver .wym_area_bottom { height: 1%; clear: both;} + * html .wym_skin_silver .wym_area_main { height: 1%;} + * html .wym_skin_silver .wym_area_top { height: 1%;} + *+html .wym_skin_silver .wym_area_top { height: 1%;} + +/*SECTIONS SYSTEM*/ + + /*common defaults for all sections*/ + .wym_skin_silver .wym_section { margin-bottom: 5px; } + .wym_skin_silver .wym_section h2, + .wym_skin_silver .wym_section h3 { padding: 1px 3px; margin: 0; cursor: pointer; } + .wym_skin_silver .wym_section a { padding: 5px 0px 0px 10px; display: block; text-decoration: none; color: black; } + .wym_skin_silver .wym_section a:hover { /*background-color: #DDD;*/} + /*hide section titles by default*/ + .wym_skin_silver .wym_section h2 { display: none; } + /*disable any margin-collapse*/ + .wym_skin_silver .wym_section { padding-top: 1px; padding-bottom: 1px; } + /*auto-clear sections*/ + .wym_skin_silver .wym_section ul:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; padding: 0px; } + * html .wym_skin_silver .wym_section ul { height: 1%;} + .wym_skin_silver .wym_section li {} + + /*option: add this class to a section to make it render as a panel*/ + .wym_skin_silver .wym_panel { } + .wym_skin_silver .wym_panel h2 { display: block; font-size: 11px; } + + /*option: add this class to a section to make it render as a dropdown menu*/ + .wym_skin_silver .wym_dropdown h2 { display: block; font-size: 11px;} + .wym_skin_silver .wym_dropdown ul { position: absolute; background: white; padding: 0px;} + .wym_skin_silver .wym_dropdown:hover ul, + .wym_skin_silver .wym_dropdown.hover ul { cursor: pointer;} + .wym_skin_silver .wym_dropdown ul li a {/*border-bottom: 1px solid #AAA;*/} + + /*option: add this class to a section to make its elements render buttons (icons are only available for the wym_tools section for now)*/ + .wym_skin_silver .wym_buttons li { float:left;} + .wym_skin_silver .wym_buttons a { width: 20px; height: 20px; overflow: hidden; padding: 2px; text-decoration: none !important; border: 1px solid #666; } + .wym_skin_silver .wym_buttons a:hover { text-decoration: none !important; border: 1px solid #000;} + /*image replacements*/ + .wym_skin_silver .wym_buttons li a { background: url(images/icons.silver.gif) no-repeat; text-indent: -9999px;} + .wym_skin_silver .wym_buttons li.wym_tools_strong a { background-position: 0 -384px;} + .wym_skin_silver .wym_buttons li.wym_tools_emphasis a { background-position: 0 -24px;} + .wym_skin_silver .wym_buttons li.wym_tools_superscript a { background-position: 0 -432px;} + .wym_skin_silver .wym_buttons li.wym_tools_subscript a { background-position: 0 -456px;} + .wym_skin_silver .wym_buttons li.wym_tools_ordered_list a { background-position: 0 -48px;} + .wym_skin_silver .wym_buttons li.wym_tools_unordered_list a{ background-position: 0 -72px;} + .wym_skin_silver .wym_buttons li.wym_tools_indent a { background-position: 0 -600px;} + .wym_skin_silver .wym_buttons li.wym_tools_outdent a { background-position: 0 -624px;} + .wym_skin_silver .wym_buttons li.wym_tools_undo a { background-position: 0 -504px;} + .wym_skin_silver .wym_buttons li.wym_tools_redo a { background-position: 0 -528px;} + .wym_skin_silver .wym_buttons li.wym_tools_link a { background-position: 0 -96px;} + .wym_skin_silver .wym_buttons li.wym_tools_unlink a { background-position: 0 -168px;} + .wym_skin_silver .wym_buttons li.wym_tools_image a { background-position: 0 -120px;} + .wym_skin_silver .wym_buttons li.wym_tools_table a { background-position: 0 -144px;} + .wym_skin_silver .wym_buttons li.wym_tools_paste a { background-position: 0 -552px;} + .wym_skin_silver .wym_buttons li.wym_tools_html a { background-position: 0 -192px;} + .wym_skin_silver .wym_buttons li.wym_tools_preview a { background-position: 0 -408px;} + .wym_skin_silver .wym_buttons li.wym_tools_gadget a { background-position: 0 -576px;} + + .wym_skin_silver .wym_buttons li.wym_tools_strong a:hover { background-position: -24px -384px;} + .wym_skin_silver .wym_buttons li.wym_tools_emphasis a:hover { background-position: -24px -24px;} + .wym_skin_silver .wym_buttons li.wym_tools_superscript a:hover { background-position: -24px -432px;} + .wym_skin_silver .wym_buttons li.wym_tools_subscript a:hover { background-position: -24px -456px;} + .wym_skin_silver .wym_buttons li.wym_tools_ordered_list a:hover { background-position: -24px -48px;} + .wym_skin_silver .wym_buttons li.wym_tools_unordered_list a:hover{ background-position: -24px -72px;} + .wym_skin_silver .wym_buttons li.wym_tools_indent a:hover { background-position: -24px -600px;} + .wym_skin_silver .wym_buttons li.wym_tools_outdent a:hover { background-position: -24px -624px;} + .wym_skin_silver .wym_buttons li.wym_tools_undo a:hover { background-position: -24px -504px;} + .wym_skin_silver .wym_buttons li.wym_tools_redo a:hover { background-position: -24px -528px;} + .wym_skin_silver .wym_buttons li.wym_tools_link a:hover { background-position: -24px -96px;} + .wym_skin_silver .wym_buttons li.wym_tools_unlink a:hover { background-position: -24px -168px;} + .wym_skin_silver .wym_buttons li.wym_tools_image a:hover { background-position: -24px -120px;} + .wym_skin_silver .wym_buttons li.wym_tools_table a:hover { background-position: -24px -144px;} + .wym_skin_silver .wym_buttons li.wym_tools_paste a:hover { background-position: -24px -552px;} + .wym_skin_silver .wym_buttons li.wym_tools_html a:hover { background-position: -24px -192px;} + .wym_skin_silver .wym_buttons li.wym_tools_preview a:hover { background-position: -24px -408px;} + .wym_skin_silver .wym_buttons li.wym_tools_gadget a:hover { background-position: -24px -576px;} + +/*DECORATION*/ + .wym_skin_silver .wym_section h2 { background: #ddd; border: none;} + .wym_skin_silver .wym_section h2 span { color: gray;} + .wym_skin_silver .wym_panel { padding: 0; border: solid gray; border-width: 0px;} + .wym_skin_silver .wym_panel ul { margin: 2px 0 5px; } + .wym_skin_silver .wym_dropdown { padding: 0; border: none; } + .wym_skin_silver .wym_dropdown ul { border: none; margin-left: -1px; padding: 0px;} + +/*DIALOGS*/ + .wym_dialog div.row { margin-bottom: 5px;} + .wym_dialog div.row input { margin-right: 5px;} + .wym_dialog div.row label { float: left; width: 150px; display: block; text-align: right; margin-right: 10px; } + .wym_dialog div.row-indent { padding-left: 160px; } + /*autoclearing*/ + .wym_dialog div.row:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } + .wym_dialog div.row { display: inline-block; } + /* Hides from IE-mac \*/ + * html .wym_dialog div.row { height: 1%; } + .wym_dialog div.row { display: block; } + /* End hide from IE-mac */ + +/*WYMEDITOR_LINK*/ + a.wym_wymeditor_link + { + text-indent: -9999px; + float: right; + display: block; + width: 50px; + height: 15px; + background: url(../wymeditor_icon.png); + background-position: 1px 1px; + background-repeat: no-repeat; + overflow: hidden; + text-decoration: none; + padding: 1px !important; + border: 1px solid #333 !important; + background-color: #FFF !important; + } + +.wym_box +{ + padding: 0px !important; + margin: 0px; +} +.wym_inner +{ + border-left: 1px solid #FFF; + border-top: 1px solid #FFF; + border-right: 1px solid #FFF; + border-bottom: 1px solid #FFF; + padding: 5px; + background-color: #B8C1C4; + height: auto; +} + +.clear {clear: both;} + +div.wym_dropdown +{ + cursor: pointer; + width: 138px !important; + margin: 0px 4px 10px 0px !important; + padding: 0px; + z-index: 1001; + display: block; + border: 1px solid red; +} + +div.wym_dropdown ul +{ + display: none; + width: 124px; + padding: 0px !important; + margin: 0px !important; + list-style-type: none; + list-style-image: none; + z-index: 1002; + position: absolute; + border-top: 1px solid #AAA; +} + +div.wym_dropdown ul li +{ + width: 146px; + height: 20px; + padding: 0px !important; + margin: 0px; + border: 1px solid #777; + border-top: none; + background: #DDD; + list-style-image: none; +} + +div.wym_dropdown h2 +{ + width: 138px; + height: 16px; + color: #000 !important; + background-image: url(images/bg.selector.silver.gif) !important; + background-position: 0px -18px; + background-repeat: no-repeat; + border: none; + font-family: "Trebuchet MS", Verdana, Arial, Helvetica, Sanserif; + font-size: 12px !important; + font-weight: bold !important; + padding: 2px 0px 0px 10px !important; + margin: 0px !important; +} + +.wym_skin_silver .wym_panel h2 +{ + width: 138px; + height: 16px; + color: #000 !important; + background-image: url(images/bg.header.gif) !important; + background-position: 0px 0px; + background-repeat: no-repeat; + border: none; + font-family: "Trebuchet MS", Verdana, Arial, Helvetica, Sanserif; + font-size: 12px !important; + font-weight: bold !important; + padding: 2px 0px 0px 10px !important; + margin: 0px !important; +} + +.wym_skin_silver .wym_panel ul +{ + margin-top: 0px !important; +} + +.wym_skin_silver .wym_panel ul li +{ + width: 146px; + height: 20px; + padding: 0px !important; + margin: 0px; + border: 1px solid #777; + border-top: none; + background: #DDD; + list-style-image: none; +} + +.wym_skin_silver .wym_panel a, +div.wym_dropdown a +{ + text-decoration: none; + font-family: "Trebuchet MS", Verdana, Arial, Helvetica, Sanserif; + font-size: 12px; + padding: 5px 0px 0px 10px !important; + display: block; + width: 136px; + height: 15px; + color: #000; + text-align: left !important; + margin-left: 0px !important; +} + +div.wym_dropdown a:hover, +.wym_skin_silver .wym_panel a:hover +{ + background: #BBB; + border-bottom: none !important; +} Index: openacs-4/packages/xowiki/www/resources/wymeditor/skins/silver/skin.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/skins/silver/skin.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/www/resources/wymeditor/skins/silver/skin.js 29 May 2008 19:13:45 -0000 1.1 @@ -0,0 +1,61 @@ +/* This file is part of the Silver skin for WYMeditor by Scott Edwin Lewis */ + +jQuery.fn.selectify = function() { + return this.each(function() { + jQuery(this).hover( + function() { + jQuery("h2", this).css("background-position", "0px -18px"); + jQuery("ul", this).fadeIn("fast"); + }, + function() { + jQuery("h2", this).css("background-position", ""); + jQuery("ul", this).fadeOut("fast"); + } + ); + }); +}; + +WYMeditor.SKINS['silver'] = { + + init: function(wym) { + + //add some elements to improve the rendering + jQuery(wym._box) + .append('
    ') + .wrapInner('
    '); + + //render following sections as panels + jQuery(wym._box).find(wym._options.classesSelector) + .addClass("wym_panel"); + + //render following sections as buttons + jQuery(wym._box).find(wym._options.toolsSelector) + .addClass("wym_buttons"); + + //render following sections as dropdown menus + jQuery(wym._box).find(wym._options.containersSelector) + .addClass("wym_dropdown") + .selectify(); + + // auto add some margin to the main area sides if left area + // or right area are not empty (if they contain sections) + jQuery(wym._box).find("div.wym_area_right ul") + .parents("div.wym_area_right").show() + .parents(wym._options.boxSelector) + .find("div.wym_area_main") + .css({"margin-right": "155px"}); + + jQuery(wym._box).find("div.wym_area_left ul") + .parents("div.wym_area_left").show() + .parents(wym._options.boxSelector) + .find("div.wym_area_main") + .css({"margin-left": "155px"}); + + //make hover work under IE < 7 + jQuery(wym._box).find(".wym_section").hover(function(){ + jQuery(this).addClass("hover"); + },function(){ + jQuery(this).removeClass("hover"); + }); + } +}; Index: openacs-4/packages/xowiki/www/resources/wymeditor/skins/silver/images/bg.header.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/skins/silver/images/bg.header.gif,v diff -u Binary files differ Index: openacs-4/packages/xowiki/www/resources/wymeditor/skins/silver/images/bg.selector.silver.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/skins/silver/images/bg.selector.silver.gif,v diff -u Binary files differ Index: openacs-4/packages/xowiki/www/resources/wymeditor/skins/silver/images/bg.wymeditor.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/skins/silver/images/bg.wymeditor.png,v diff -u Binary files differ Index: openacs-4/packages/xowiki/www/resources/wymeditor/skins/silver/images/icons.silver.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/skins/silver/images/icons.silver.gif,v diff -u Binary files differ